Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This article describes how to configure data is integrated integration between nSPECT and nCORE.

Configuring

Inspection Types

nCORE/nSPECT Integration

The nCORE "Evaluation Type" and the nSPECT "Inspection Type" drive the initial data integration between the two systems. Inspections are scheduled in nSPECT via the Evaluation Type provided by nCORE. first step in configuring inspection integration between nCORE and nSPECT is setting up one or more nCORE Evaluation Types to integrate with nSPECT.

When a new Evaluation Type is added to nCORE, a new Inspection Type will be added to nSpect nSPECT when the user clicks the checkbox "Enable nSPECT Integration" and saves the record:

Image Modified

Once the "Enable nSPECT Integration" checkbox is clicked, a number of additional settings are displayed, as shown in the image above:

  1. Set Inspection Report to "Final" Status when nSpect Inspection is Completed - the Inspection Report Document will be set to "Final" status in nCORE automatically

  2. nSPECT Inspection Report File Type - Can be set to "docx" or "pdf". Default file type is set in APP_DEPLOY_SETTING where CODE = 'NSPECT_RPT_EXT'

  3. Default

Followup
  1. Follow-up Evaluation Type -  If an Inspection Form in nSPECT is configured to schedule a

followup
  1. follow-up evaluation, it will be created with the type specified. If no type is specified, the

followup
  1. follow-up will be created as the same type as the current inspection. See section Outbound Tags for more information on configuring

Followup
  1. Follow-up Evaluations.

Configuring Integration Tags in

nSpect

nSPECT

Integration tags are configured on nSPECT questions , and during form design. Integration tags can be used to pass data from nCORE into nSPECT (CME Prefill), and for new inspections and back from nSPECT to nCORE to perform various actions. There are four flavors of data transfer:

  • Prefilling nSPECT Forms with CME data from nCORE using Data Integration Tags
  • Updating nCORE data and performing actions using Data Integration Tags
  • Populating

    when an inspection is complete.

    There are three aspects of data integration between nSPECT and nCORE:

    1. Using Data Integration Tags to prefill nSPECT Forms with data from nCORE and to update nCORE data from completed nSPECT inspections

    2. Using Data Integration Context to populate the nCORE "Inspection Results" tab

    using the Data Integration Context
  • Creating Violations in nCORE using the Regulation Reference
  • Inbound to nSpect

    Image Removed

    Data can be prefilled into nSPECT forms using nCORE data. Data elements are defined in the nSpectImport.CME_INSPECTION_% database views:

    1. nSpectImport.CME_INSPECTION_MASTER - base view required for Prefill, defines any non-repeating data elements
    2. nSpectImport.CME_INSPECTION_EVAL_CONTCT - prefills repeating contact sections. Pulls all contacts related to the source evaluation (EVAL) record
    3. nSpectImport.CME_INSPECTION_PRMT_FEATR - prefills repeating feature sections using features referenced on the source permit. Useful for sampling inspections

    Additional repeating or custom views can be developed on client request.

    See below for tag definitions for each of the above views:

    nSpectImport.CME_INSPECTION_MASTER (non-repeating data)

    nSPECT Data Integration TagnCORE Database Field NameCommentsSITE_NUMSITE.SITE_NUMSite NumberSITE_SITE_NAMESITE.SITE_NAME Site Name, non-standard tag as SITE_NAME is reserved by nSpectSITE_ADDRSITE.ADDR_1, SITE.ADDR_2, SITE.CITY, SITE.REF_STATE_CODE, SITE.ZIP_CODEConcatenated Site Address fieldsSITE_ADDR_1SITE.ADDR_1 SITE_ADDR_2S.ADDR_2 SITE_CITYSITE.CITY SITE_STATESITE.REF_STATE_CODE SITE_ZIP_CODESITE.ZIP_CODE SITE_CNTYREF_CNTY.DESCR EVAL_NUMEVAL.EVAL_NUM PRMT_NUMPRMT.PRMT_NUMPermit information is pulled from corresponding EVAL.PRMT_ID recordPRMT_VERSNPRMT.PRMT_VERSNREF_PRMT_CATG_DESCRREF_PRMT_CATG.DESCRREF_PRMT_STAT_DESCRREF_PRMT_STAT.DESCRREF_PRMT_TYPE_DESCRREF_PRMT_TYPE.DESCRPRMT_ISSUE_DATEPRMT.ISSUE_DATEPRMT_EFCTV_DATEPRMT.EFCTV_DATEPRMT_EXPR_DATEPRMT.EXPR_DATEPROJ_NAMESUBM.RESRC_PROJ_NAMEICONT_CONTCT_NAMECONTCT.CONTCT_NAMEPulled from EVAL.ICONT_CONTCT_IDICONT_CONTCT_FIRST_NAMECONTCT.FIRST_NAMEICONT_CONTCT_LAST_NAMECONTCT.LAST_NAMEICONT_CONTCT_ORG_NAMECONTCT.ORG_NAMEICONT_CONTCT_ADDRCONTCT.ADDR_1, CONTCT.ADDR_2, CONTCT.CITY, CONTCT.REF_STATE_CODE, CONTCT.ZIP_CODEConcatenated Contact Address fieldsICONT_CONTCT_ADDR_1CONTCT.ADDR_1ICONT_CONTCT_ADDR_2CONTCT.ADDR_2ICONT_CONTCT_CITYCONTCT.CITYICONT_CONTCT_STATECONTCT.REF_STATE_CodeICONT_CONTCT_PHONEPHONE.PHONEPERMT_CONTCT_NAMECONTCT.CONTCT_NAMEPulled from PRMT.PERMT_CONTCT_IDPERMT_CONTCT_FIRST_NAMECONTCT.FIRST_NAMEPERMT_CONTCT_LAST_NAMECONTCT.LAST_NAMEPERMT_CONTCT_ORG_NAMECONTCT.ORG_NAMEPERMT_CONTCT_ADDRCONTCT.ADDR_1, CONTCT.ADDR_2, CONTCT.CITY, CONTCT.REF_STATE_CODE, CONTCT.ZIP_CODEConcatenated Contact Address fieldsPERMT_CONTCT_ADDR_1CONTCT.ADDR_1PERMT_CONTCT_ADDR_2CONTCT.ADDR_2PERMT_CONTCT_CITYCONTCT.CITYPERMT_CONTCT_STATECONTCT.REF_STATE_CODEPERMT_CONTCT_PHONEPHONE.PHONE

    nSpectImport.CME_INSPECTION_EVAL_CONTCT (repeating data)

    nSPECT Data Integration TagnCORE Database Field NameCommentsEVAL_CONTCT_NAMECONTCT.CONTCT_NAMEEVAL_CONTCT_FIRST_NAMECONTCT.FIRST_NAMEEVAL_CONTCT_LAST_NAMECONTCT.LAST_NAMEEVAL_CONTCT_TITLECONTCT.TITLEEVAL_CONTCT_ORG_NAMECONTCT.ORG_NAMEEVAL_CONTCT_ADDRCONTCT.ADDR_1, CONTCT.ADDR_2, CONTCT.CITY, CONTCT.REF_STATE_CODE, CONTCT.ZIP_CODEConcatenated Contact Address fieldsEVAL_CONTCT_ADDR_1CONTCT.ADDR_1EVAL_CONTCT_ADDR_2CONTCT.ADDR_2EVAL_CONTCT_CITYCONTCT.CITYEVAL_CONTCT_STATECONTCT.REF_STATE_CODEEVAL_CONTCT_ZIP_CODECONTCT.ZIP_CODEEVAL_CONTCT_PHONEPHONE.PHONEEVAL_CONTCT_PHONE_EXTPHONE.PHONE_EXTEVAL_CONTCT_AFFIL_CONCATREF_AFFIL_TYPE.DESCRConcatenated Contact Evaluation Affiliation (Role) Types separated by commas

    nSpectImport.CME_INSPECTION_PRMT_FEATR (repeating data)

    These tags populate features for the permit specified in the evaluation record.

    nSPECT Data Integration TagnCORE Database Field NameCommentsFEATR_LOCFEATR_LOC_GEOG.LAT, FEATR_LOC_GEOG.LONGConcatenated feature latitude, longitude separated by a commaPRMT_FEATR_DESCRFEATR.DESCRPRMT_FEATR_ID_TXTFEATR.FEATR_ID_TXTPRMT_FEATR_TYPEREF_FEATR_TYPE.DESCR

    Outbound to nCORE

    Image Removed

    Data integration tags can also be used to populate data in nCORE, and perform various actions. See below for configured tags and integration descriptions:

    nSPECT Data Integration TagnCORE Field TagDescriptionSTART_DATE (valid on nSPECT "Date" control)EVAL.START_DATEIn conjunction with START_TIME, Will fill in nCORE Evaluation Field "Start Date" when inspection is completed in nSPECT. APP_DEPLOY_SETTING for code NSPECT_OVRRD_START_DATE must be set to "1".START_TIME (valid on nSPECT "Time" control)EVAL.START_TIMEIn conjunction with START_DATE, Will fill in nCORE Evaluation Field "Start Date" when inspection is completed in nSPECT. APP_DEPLOY_SETTING for code NSPECT_OVRRD_START_DATE must be set to "1".END_DATE (valid on nSPECT "Date" control)EVAL.END_DATEIn conjunction with END_TIME, Will fill in nCORE Evaluation Field "End Date" when inspection is completed in nSPECT. APP_DEPLOY_SETTING for code NSPECT_OVRRD_START_DATE must be set to "1".

    END_TIME (valid on nSPECT "Time" control)

    EVAL.END_TIMEIn conjunction with END_DATE, Will fill in nCORE Evaluation Field "End Date" when inspection is completed in nSPECT. APP_DEPLOY_SETTING for code NSPECT_OVRRD_START_DATE must be set to "1".FOLLOWUP_DATE (valid on nSPECT "Date" control)See DescriptionCreates a new Evaluation (EVAL) record in nCORE using the date specified in the control and the Evaluation Type (REF_EVAL_TYPE_CODE) specified as the followup inspection type.EVAL_DCSNEVAL.REF_DCSN_CODEMatches values from nSPECT control to REF_DCSN.DESCR, and populates Evaluation Decision (EVAL.REF_DCSN_CODE) with the matching value.

    Inspection Results Tab

    Image Removed

    Entering "AREA" into the "Data Integration Context" field in an nSPECT inspection question causes the question and response to display in the nCORE evaluation record's Inspection Results tab.

    Violations

    Image Removed

    Questions marked as Violations in nSPECT can be configured to create violation records in nCORE using the "Reference / Citation" field on the nSPECT screen where form questions are edited. First, Citation Reference Text must be entered in the nSPECT "Reference / Citation" field (field QUESTION_REFERENCE in nSPECT FORM_CONTROL table). Then, the same text must be entered into the appropriate "Violation Types to Categories" record in the nCORE Lookups admin screen in the "nSPECT Data Integration Tag" field:

    Image Removed

     Once the appropriate record is found, enter the violation reference text in "nSPECT Data Integration Tag" field:

    Image Removed

    On this page

    Table of Contents

    Sub-Topics

    Page Treeroot@self
    1. from a completed nSPECT Inspection

    2. Using Reference / Citation to create violations in nCORE from questions marked as a violation in nSPECT

    These three topics are discussed in the sections below.

    Using Data Integration Tags to move data between nCORE and nSPECT

    When designing an nSPECT form, the Data Integration Tags field is used to to prefill nSPECT Forms with data from nCORE and to update nCORE data from completed nSPECT inspections.

    Image Added

    For a complete list of the available data integration tags, see the nCORE / nSPECT Data Integration Tags page.

    Using Data Integration Context to populate nCORE Evaluation Results from Completed nSPECT Inspections

    The nCORE Evaluation Details page can show a list of questions and answers configured on an nSPECT form for completed inspections. To enable this feature, entering "AREA" into the Data Integration Context field in an nSPECT inspection question.

    Image Added

    Questions configured with the text "AREA" in the Data Integration Context will appear along with the answer in the Inspection Results tab in nVIRO. 

    Using Reference/Citation to Create Violations in nCORE from Completed nSPECT Inspections

    Questions marked as violations in nSPECT can be configured to create violation records in nCORE, but must be configured to do so.

    1. In nSPECT, edit the form question that should result in a violation

    2. In the Reference / Citation field, enter a unique value for the violation reference. This value will be used in the next section to map to an nCORE Violation Type/Category

      Image Added
    3. Ensure that the radio button is selected that indicates the user is allowed to mark the inspection as a violation

    4. Click Save at the top of the screen to ensure the changes are saved.

    5. Navigate to the nCORE Admin → Lookups → Violation Types to Categories screen

      Image Added
    6. Either create a new Violation Type to Category Association or edit an existing Violation Type to Category Association that the violation will map to.

    7. In the nSPECT Reference / Citation Integration Tag field, enter the same value as entered in step 2 above.

      Image Added
    8. Click Save to save the changes.

    Note that after saving, beneath the nSPECT Data Integration Tag field, a message will indicate whether the mapping is successful or not by display either one of the following messages:

    • "No nSPECT questions use this 'Reference / Citation' text", or

    • "Success! 'Reference / Citation' value exists in nSPECT"

    When a violation is created in nCORE from nSPECT, the violation comment is set to the following:

    Question: (question from nSPECT form); Answer: (answer from nSPECT form); Comments: (comments from nSPECT form, or “(No Comments)” if none)

    Technical Aspects of nSPECT to nCORE integration

    Steps performed for integration:

    1. On a regular interval, nCORE invokes the Integration - Process Completed nSpect Inspections scheduled task. This process performs the following steps:

      1. WSL queries VW_EVAL_NSPECT_CMPL to find inspections marked Complete in nSPECT but are not staged in EVAL_NSPECT_SUB

      2. WSL iterates through each completed inspection and performs the following steps:

        1. Invokes the nSPECT GetCompletedInspection API to fetch inspection data

        2. Inserts inspection data into the data is staged to EVAL_NSPECT_SUB

        3. Inserts inspection question answers into NSPECT_EVAL_SUB_DTL

      3. WSL invokes Stored procedure SP_IMPORT_NSPECT_DATA to move data from the staging tables back to nCORE. Specific steps include:

        1. Fetch all records from EVAL_NSPECT_SUB where PRCSS_DT IS NULL. For each record found:

          1. Insert into NSPECT_EVAL_FILE_PRCSS for the inspection report

          2. Insert new EVAL if evaluation does not exist in nCORE (for ad-hoc inspections)

          3. Synchronize nCORE Evaluation Start Date, End Date, Report Transmittal Date, Assigned User, and set evaluation status to “Processed”

          4. Insert question/answers into EVAL_NSPECT_SUMM where questions are tagged ‘Area’

          5. Insert violations

          6. Schedule follow-up inspections

    2. On a separate schedule, nCORE invokes the Integration - Import nSPECT Submission Files scheduled task. This process performs the following steps:

      1. WSL queries NSPECT_EVAL_FILE_PRCSS for any records that are active (IS_ACTIVE=1) and have not yet been moved to nCORE (DOC_MGMT_ID is null)

      2. For each file found, invokes the nSPECT client API to fetch either the PDF or DOCX inspection report and saves to nCORE DOC_MGMT table

        1. The inspection report DOC_CREATE_TYPE_ID, DOC_STATUS_TYPE_ID and DOC_CATG_ID are fetched from Deployment Settings ncore.documentCreateTypeId, ncore.documentStatusTypeId and ncore.documentCategoryId respectively.

      3. For each file successfully copied to nCORE, the DOC_MGMT_ID and PRCSS_DATE are set in NSPECT_EVAL_FILE_PRCSS

      4. Then, procedure SP_ADD_NSPECT_REQST_FILE performs finalization tasks:

        1. Sets NSPECT_EVAL_FILE_PRCSS records to Inactive that were copied to nCORE successfully or are over two weeks old and WSL has not generated a PDF.

        2. Sets document status from “Draft” to "Final" of configured to do so based on Evaluation Type lookup setting.

        3. Sets document security status based on Deployment setting NSPECT.DOC.DEFAULT_SEC_TYPE_CODE (default is “Public”)

          1. ^^^ This may be moved to an Evaluation Type setting pending enhancement ALVIRO-6865

        4. Processes inspection media files (photos):

          1. Inserts any inspection media (photos) from nSPECT into nCORE DOC_MGMT, sets document status to “Final”, sets document name and description, sets Security type to “Internal”.

          2. Sets the nSPECT binary media (photo) data to NULL

        5. Performs final cleanup, deleting NSPECT_EVAL_FILE_PRCSS records where IS_ACTIVE=0 and no errors were recorded in the import process

    Removing an Inspection from nSPECT

    In nSPECT, an authorized user can choose "Remove Inspection" from the main Inspections list. When this is done, the inspection is removed from the nSPECT database. A nCORE nightly batch update procedure will set the inspection back to "Planned" that evening.

    On this page

    Table of Contents
    maxLevel5

    Related Content