Topics: |
A KornShell (ksh) script has been created to execute all of the various Omni-Payer™ HealthViews scripts in the correct order.
This script relies on configuration settings that must be defined in the db2.config configuration file. The script must also be run in the no hangup (nohup) mode so that it can be run uninterrupted in the background. Two scripts provided (one to run all Omni-Payer™ HealthViews scripts automatically and one to run an individual script).
This section describes the contents and settings of the db2.config configuration file.
Defines the database type, which must always be set to db2.
Defines the address of the database, which can be logical or an IP address.
Defines the name of the database.
Defines the user name to log on to the database.
Defines the password for the user of the database.
Defines the name of the schema for Omni-Payer™, which is usually set to omnipayer.
Defines the name of the schema for Omni-Payer™ HealthViews, which is usually set to healthviews.
Defines the method for the schema.
In general, the build_all.sh script does not need to be edited. The first section defines variables, including the path to the db2_config.properties file. The default path is $HOME/db_config/db2_config.properties. Change this path only if you placed your db2_config.properties file in a different location.
Before you run the build_all.sh script, you must set the environment variables for DB2 by typing:
For the DEV environment:
. /udbhome/udbinst3/sqllib/db2profile
or
For the QA environment:
. /udbhome/udbinst4/sqllib/db2profile
You can run the build_all.sh script by typing:
For the DEV environment:
nohup sh build_all.sh > hv_dev.out 2>&1 &
or
For the QA environment:
nohup sh build_all.sh > hv_qa.out 2>&1 &
As mentioned earlier in this document, the nohup command instructs the build_all.sh script to run in the no hangup mode.
The >hv_dev.out or >hv_qa.out commands direct the output of the scripts to a log file called hv_dev.out or hv_qa.out.
The ampersand character (&) in the command string instructs the build_all.sh script to run in the background.
After loading the initial data from Omni-Payer to HealthViews, incremental scripts can be used. The incremental scripts only update the HealthViews tables with new records from Omni-Payer rather than reloading all of the data from scratch.
A separate directory below the full load scripts directory is provided for running incremental loads. Run the build_all.sh script from this location to execute an incremental load.
Note: The build_all.sh script contains the L_OMD variable. This variable is used to define the as of date. Typically this as of date is two days behind the current date. This variable must be set each time an incremental update is executed.
The following table lists and describes all of the available scripts for Omni-Payer™ HealthViews.
Script |
Description |
---|---|
000_Healthviews_DB2_create_schema_script.sql |
Used to create the HealthViews schema, not normally run. |
001_t_date_dimension.sql |
Defines all dates in the system. |
002_t_time_dimension.sql |
Defines all times in the system. |
003_t_dim_codeset.sql |
Defines all codesets in the system. |
003_t_dim_codeset_inc.sql |
Incremental update of codesets in the system. |
003_v_dim_codeset_lookup.sql |
View for looking up codesets. |
003_t_source_code_relation.sql |
Describes all source code relations in the system. |
003_t_source_code_relation_inc.sql |
Incremental update of source code relations. |
003_v_source_code_relation.sql |
View for looking up source code relations. |
300_t_member_m.sql |
All mastered members in the system. |
300_t_member_m_inc.sql |
Incremental update of mastered members. |
300_v_member_m.sql |
View for mastered members. |
302_t_member_identifier_m.sql |
All mastered member identifiers in the system. |
302_t_member_identifier_m_inc.sql |
Incremental update of member identifiers. |
302_v_member_identifier_m.sql |
View for all mastered member identifiers. |
303_t_member.sql |
All member instances in the system. |
303_t_member_inc.sql |
Incremental update of all member instances. |
303_v_member.sql |
View for all member instances. |
304_t_member_identifier.sql |
All member identifiers in the system. |
304_t_member_identifier_inc.sql |
Incremental update of member identifiers. |
304_v_member_identifier.sql |
View for all member identifiers. |
305_t_provider.sql |
All providers in the system. |
305_t_provider_inc.sql |
Incremental update of providers. |
305_v_provider_.sql |
View for all providers. |
306_1_tmp_events_create.sql |
Temporary table used for various events. |
306_t_encounter.sql |
All encounters in the system. |
306_t_encounter_inc.sql |
Incremental update of encounters. |
306_v_encounter.sql |
View for all encounters. |
307_t_procedure_event.sql |
All procedure events in the system. |
307_t_procedure_event_inc.sql |
Incremental update for procedure events. |
307_v_procedure_event.sql |
View for all procedure events. |
308_t_observation_event.sql |
All observation events in the system. |
308_t_observation_event_inc.sql |
Incremental update for observation events. |
308_v_observation_event.sql |
View for all observation events. |
309_t_diagnosis_event.sql |
All diagnosis events in the system. |
309_t_diagnosis_event_inc.sql |
Incremental update for diagnosis events. |
309_v_diagnosis_event.sql |
View for all diagnosis events. |
310_1_tmp_events_drop.sql |
Drops the temporary table used for events. |
310_t_payer_claim.sql |
All payer claims in the system. |
310_t_payer_claim_inc.sql |
Incremental update for payer claims. |
310_v_payer_claim.sql |
View for all payer claims. |
311_t_payer_claim_line_item.sql |
All payer claim line items in the system. |
311_t_payer_claim_line_item_inc.sql |
Incremental update for payer line items. |
311_v_payer_claim_line_item.sql |
View for all payer claim line items. |
312_t_payer_claim_line_item_diagnosis.sql |
All payer claim line item diagnosis records in the system. |
312_v_payer_claim_line_item_diagnosis.sql |
View for all payer claim line item diagnosis records. |
313_t_event_note.sql |
All event notes in the system. |
313_t_event_note_inc.sql |
Incremental update of event notes. |
313_v_event_note.sql |
View for all event notes. |
314_t_reference_range.sql |
All reference range records in the system. |
314_t_reference_range_inc.sql |
Incremental update of reference range records. |
314_v_reference_range.sql |
View for all reference range records. |
315_t_allergy.sql |
All allergy records in the system. |
315_t_allergy_inc.sql |
Incremental update of allergy records. |
315_v_allergy.sql |
View for all allergy records. |
316_t_pharmacy_prescription_order.sql |
All pharmacy prescription orders in the system. |
316_t_pharmacy_prescription_order_event_inc.sql |
Incremental update of pharmacy prescription order events. |
316_v_pharmacy_prescription_order.sql |
View for all pharmacy prescription orders. |
317_t_pharmacy_administration_route.sql |
All pharmacy administration route records in the system. |
317_t_pharmacy_administration_route_inc.sql |
Incremental update for pharmacy administration route records. |
317_v_pharmacy_administration_route.sql |
View for all pharmacy administration route records. |
318_t_provider_m.sql |
All mastered providers in the system. |
318_t_provider_m_inc.sql |
Incremental update of mastered providers. |
318_v_provider_m.sql |
View for all mastered providers. |
319_t_provider_identifier.sql |
All provider identifiers in the system. |
319_t_provider_identifier_inc.sql |
Incremental update of provider identifiers. |
319_v_provider_identifier.sql |
View of all provider identifiers. |
320_t_provider_identifier_m.sql |
All mastered provider identifiers in the system. |
320_t_provider_identifier_m_inc.sql |
Incremental update of all provider identifiers. |
320_v_provider_identifier_m.sql |
View of all mastered provider identifiers. |
321_t_family_history.sql |
All family history records in the system. |
321_v_family_history.sql |
View for all family history records. |
322_t_pharmacy_dispense_event.sql |
All pharmacy dispense events in the system. |
322_v_pharmacy_dispense_event.sql |
View for all pharmacy dispense events. |
323_t_medication_admin_event.sql |
All medication administration events in the system. |
323_v_medication_admin_event.sql |
View for all medication administration events. |
324_t_vaccination_admin_event.sql |
All vaccination administration events in the system. |
324_v_vaccination_admin_event.sql |
View for all vaccination administration events. |
325_t_adt_event.sql |
All ADT events in the system. |
325_v_adt_event.sql |
View for all ADT events in the system. |
390_1_tmp_events_drop.sql |
Script to drop temporary tables. |
501_t_pj_member.sql |
All patient journey member records in the system. |
501_v_pj_member.sql |
View for all patient journey member records. |
502_t_pj_procedure.sql |
All patient journey procedure records in the system. |
502_v_pj_procedure.sql |
View for all patient journey procedure records. |
503_t_pj_diagnosis.sql |
All patient journey diagnosis records in the system. |
503_v_pj_diagnosis.sql |
View for all patient journey diagnosis records. |
504_t_pj_laborder.sql |
All patient journey lab order records in the system. |
504_v_pj_laborder.sql |
View for all patient journey lab orders records. |
505_t_pj_labresult.sql |
All patient journey lab result records in the system. |
505_v_pj_labresult.sql |
View for all patient journey lab result records. |
506_t_pj_vitalsign.sql |
All patient journey vital sign records in the system. |
506_v_pj_vitalsign.sql |
View for all patient journey vital sign records. |
507_t_pj_socialhistory.sql |
All patient journey social history records in the system. |
507_v_pj_socialhistory.sql |
View for all patient journey social history records. |
508_t_pj_allergy.sql |
All patient journey allergy records in the system. |
508_v_pj_allergy.sql |
View for all patient journey allergy records. |
509_t_pj_encounter.sql |
All patient journey encounter records in the system. |
509_v_pj_encounter.sql |
View for all patient journey encounter records. |
510_t_pj_medicationhistory.sql |
All patient journey medication history records in the system. |
510_v_pj_medicationhistory.sql |
View for all patient journey medication history records. |
511_t_pj_immunizationhistory.sql |
All patient journey immunization history records in the system. |
511_v_pj_immunizationhistory.sql |
View for all patient journey immunization history records. |
541_pj_create_indexes.sql |
Script to create indexes for all patient journey tables. |
901_t_hv_availability.sql |
Date of the Omni-Payer™ HealthViews build. |
901_v_hv_availability.sql |
View for the date of the Omni-Payer™ HealthViews build. |
902_v_hv_release.sql |
The version of Omni-Payer™ HealthViews that is installed. |
941_create_indexes_script.sql |
Script to create all indexes. |
947_record_counts.sql |
Generates record counts. |
951_Grant_Select.sql |
Generates user and group rights to the Omni-Payer™ HealthViews schema. For more information, see Granting Users and Groups Access to Omni-Payer™ HealthViews. |