![]() |
Oracle Health Sciences Cohort Explorer Implementation Scripts Guide |
Contents Previous Next Title Page |
Oracle Health Sciences Cohort Explorer 1.0 provides the following implementation scripts:
cohort_hdwf_sample_data_load_v1.0.sql script populates a minimum number of HDWF tables with a few sample data rows to exercise the ETL mappings delivered with Oracle Health Sciences Cohort Explorer (OHSCE) 1.0. HDWF supports a versioning architecture that lets almost every table maintain multiple time based versions of every persisted business entity. Most HDWF tables have a compound key that consists of a surrogate prefix (For example, PT_ID) logically concatenated with a version number suffix (for example, PT_VN). The versions are managed by standard columns EFFECTIVE_FROM_DT, EFFECTIVE_TO_DT, and CURRENT_FLG.
For example, a Patient entity might have any number of time based versions starting with an original version and ending with a current version with any number of intermediate versions between. By definition, versions cannot overlap and the last or current version always carries an Effective To Date of 12/31/9999. OHSCE does not currently utilize HDWF versioning and therefore this test data set does not include such data.
All HDWF sample data has a single version (Version Number/VN=0). In most sample queries, the version number suffix is ignored. Also, the EFFECTIVE_FROM_DT is set to an arbitrary 'start of time' value that is 01/01/1970. In an actual HDWF implementation employing versioning, it would be important to match the EFFECTIVE_FROM_DT for the original and any subsequent versions to the actual source system timestamps. Refer to Oracle Health Sciences Healthcare Data Warehouse Foundation Programmer's Guide for more details.
Both HDWF and OHSCE are fully dependent on alternate unique identifier (unique keys) derived from the source system. This information is persisted in a compound key that consists of DATASOURCE_NUM_ID and INTEGRATION_ID. The INTEGRATION_ID contains a single or concatenated key derived from the source system that logically binds or links HDWF data with the source system. In some cases the source system key might be a natural key, in others it might be a local surrogate key.
There are complicated scenarios in which multiple source systems deliver data to HDWF and the DATASOURCE_NUM_ID can contain a ‘tie breaker’ value, which allows for the rare situation where a business key from multiple source systems might randomly have the same value.
In the sample data a single DATASOURCE_NUM_ID=0 is used. In an actual deployment it may be necessary to identify and utilize multiple values.
After you load data into empty target tables, you see the following:
TABLE RECS Logical Entity Name (from HDWF Logical Data Model) and description
------------------------ ---- ----------------------------------------------
1 HDM_CD_SYS 1 "Code System" - describes a 'vocabulary' of codes maintained by a single entity (customer, Oracle, outside standards body/vendor).
2 HDM_CD_TYP 41 "Code Type" - describes the logical subsets of codes grouped for purposes of validation and selection.
3 HDM_CD_REPOSITORY 184 "Code Repository" - contains codes used in HDM.
4 HDM_CD_REPOSITORY_CD_TYP 269 "Code Repository Code Type" – an intersection or associative entity that allows codes to be reused in many "Code Types".
5 HDM_CD_HIER 48 "Code Hierarchy" – a self-associative entity that allows codes to be optionally arranged into parent-child hierarchies.
6 HDM_PRTY 10 "Party" – a generic entity for individual or organizational entities.
7 HDM_IND_PRTY 10 "Individual Party" - a logical subtype of Party which supports the Individual variant of the generic Party.
8 HDM_IND_PRTY_RC 12 "Individual Party Race" – a child entity of the Individual Party that allows zero, one or more Race codes to be associated to the Individual Party.
9 HDM_IND_PRTY_ETHN 11 "Individual Party Ethnicity" – a child entity of the Individual party that allows zero, one or more Ethnicity codes to be associated to the Individual Party.
10 HDM_LOC 10 "Location" – a generic Location (aka Address) utility entity.
11 HDM_PRTY_ADDR 10 "Party Address" – an intersection entity that allows a Party to be associated with multiple Locations (and vice versa).
12 HDM_PT 10 "Patient" - the Patient specific 'Role' of Party (has an optional 1:1 relationship with Party).
13 HDM_CNSNT 11 "Consent" - contains Consent information for a Patient.
14 HDM_SPCMN 11 "Specimen" - contains Specimen information for a Patient.
15 HDM_PT_HX 11 "Patient History" - contains Patient History information related to a Patient.
16 HDM_SUBST_HX 11 "Substance History" – a logical subtype of Patient History which supports the Substance specific variant of the generic Patient History.
17 HDM_CNRN 11 "Concern" - contains Concern information for a Patient (note that the most typical 'Concern' is a Diagnosis).
18 HDM_CNRN_ANATSITE 12 "Concern Anatomical Site" – a child entity of Concern that allows zero, one or more Anatomical Site Codes to be associated with the Concern.
19 HDM_INTVN 44 "Intervention" - contains Intervention information for a Patient. There are many different subtypes and types of the generic 'Intervention'.
20 HDM_SUBADMN 17 "Substance Administration" – a logical subtype of Intervention which is specific to 'Substance Administration'.
21 HDM_INTVN_SUBST 18 "Intervention Substance" – a child entity of Intervention which supports associating zero, one or more Substances to the Intervention.
22 HDM_OBSV 17 "Observation" contains Observation information for a Patient. Note that Observations can be used to model results of Medical Tests.
23 HDM_INTVN_OBSV 17 "Intervention Observation" – an intersection entity that allows an Intervention to associate with multiple Observations (and less commonly, vice versa).
24 HDM_RELTD_INTVN 27 "Related Intervention" – a self-referential intersection entity for Intervention that allows various Interventions to be related together.
Top
Data is loaded from HDWF to OHSCE in three phases:
This is a prerequisite for loading subsequent Patient and Transactional data. The Code Repository is the primary source for the following OHSCE tables:
Following are the details of this data load:
select sys_id, sys_cd, sys_nm, sys_version, integration_id from hdm_cd_sys;
select typ_id, typ_cd, typ_nm, integration_id from hdm_cd_typ order
by typ_cd;
select cd_id, cd, cd_nm, sys_id, integration_id from hdm_cd_repository order
by integration_id;
select cd_repository_cd_typ_id, cd_id, typ_id, integration_id from hdm_cd_repository_cd_typ
order by integration_id;
select t.typ_cd, lpad(' ',(level-1)*4,' ')||c.cd cd, lpad(' ',(level-1)*4,'
')||c.cd_nm cd_nm, c.cd_id, h.prnt_cd_id
from hdm_cd_repository c
inner join hdm_cd_hier h on h.cd_id=c.cd_id
inner join hdm_cd_repository_cd_typ rt on c.cd_id=rt.cd_id
inner join hdm_cd_typ t on rt.typ_id=t.typ_id
where t.typ_cd in ('DIAGNOSIS_CODE', 'DIAGNOSIS_CATEGORY', 'ANATOMICAL_SITE_CODE',
'ANATOMICAL_SITE_CATEGORY')
start with h.prnt_cd_id=0
connect by prior h.cd_id=h.prnt_cd_id;
Patient-related data load
Patient-related data (built on Party) is loaded in this phase. The Patient-Party is the primary source for OHSCE tables:
Following are the details of this load:
select prty_id, prty_nbr, prty_nm, integration_id from hdm_prty;
select prty_id, bir_dt, decd_dt, frst_nm, lst_nm, integration_id from hdm_ind_prty;
select ind_prty_rc_id, prty_id, integration_id from hdm_ind_prty_rc;
select ind_prty_ethn_id, prty_id, integration_id from hdm_ind_prty_ethn;
select loc_id, cit, pstl_cd, st_cd_id, integration_id from hdm_loc;
select prty_addr_id, prty_id, loc_id, addr_typ_id, addr_stcd_id, integration_id
from hdm_prty_addr;
select pt_id, prty_id, pt_nbr, integration_id from hdm_pt;
Transactional data load
Transactional data (for example, Consents, Specimens, History, Diagnoses, Interventions, and Observations) is loaded in this phase. These typically have a one-to-many relationship from Patients.
Following are the details of this load:
select cnsnt_id, pt_id, cnsnt_typ_id, cnsnt_stcd_id, cnsnt_nbr, cnsnt_eff_strt_dt,
cnsnt_eff_end_dt, integration_id from hdm_cnsnt;
select spcmn_id, pt_id, intvn_id, spcmn_subtyp_id, spcmn_typ_cd_id,
targ_anatsite_cd_id, spcmn_nbr, spcmn_qty, spcmn_qty_uomcd_id, integration_id
from hdm_spcmn;
select pt_hx_id, pt_id, pt_hx_subtyp_id, pt_hx_cd_id, pt_hx_nbr, pt_hx_eff_strt_dt,
pt_hx_eff_end_dt, integration_id from hdm_pt_hx;
select pt_hx_id, dos, dos_uomcd_id, freq, freq_uomcd_id, integration_id from
hdm_subst_hx;
select cnrn_id, pt_id, cnrn_subtyp_id, cnrn_cd_id, cnrn_stcd_id, cnrn_nbr,
cnrn_recd_dt, cnrn_onst_dt, cnrn_reslutn_dt, integration_id from hdm_cnrn;
select cnrn_anatsite_id, cnrn_id, anatsite_cd_id, integration_id from hdm_cnrn_anatsite;
select intvn_id, pt_id, intvn_subtyp_id, intvn_cd_id, intvn_nbr, strt_dt,
end_dt, integration_id from hdm_intvn where intvn_nbr like 'PN%'; -- Procedures
only
select intvn_id, pt_id, intvn_subtyp_id, intvn_cd_id, intvn_nbr, strt_dt,
end_dt, integration_id from hdm_intvn where intvn_nbr like 'SA%'; -- Substance
Administration only
select intvn_id, dos, dos_uomcd_id, integration_id from hdm_subadmn;
select intvn_subst_id, intvn_id, genrc_nm_cd_id, integration_id from hdm_intvn_subst;
select intvn_id, pt_id, intvn_subtyp_id, intvn_cd_id, intvn_nbr, strt_dt,
end_dt, integration_id from hdm_intvn where intvn_nbr like 'DG%'; -- Diagnostic
Test only
select obsv_id, pt_id, obsv_subtyp_id, obsv_val_cd_id, obsv_val_nmeric, obsv_val_uomcd_id,
obsv_nbr, integration_id from hdm_obsv;
select intvn_obsv_id, intvn_id, obsv_id, intvn_obsv_rlshptyp_id, integration_id
from hdm_intvn_obsv;
select reltd_intvn_id, src_intvn_id, targ_intvn_id, intvn_rlshptyp_id,
integration_id from hdm_reltd_intvn where integration_id like '%PN%DG%';
select reltd_intvn_id, src_intvn_id, targ_intvn_id, intvn_rlshptyp_id,
integration_id from hdm_reltd_intvn where integration_id like '%PN%SA%';
select reltd_intvn_id, src_intvn_id, targ_intvn_id, intvn_rlshptyp_id,
integration_id from hdm_reltd_intvn where integration_id like '%DG%SA%';
This script populates a minimum number of HDWF tables with a few sample data rows to exercise the ETL mappings delivered with Oracle Health Sciences Cohort Explorer (OHSCE) 1.0. This script does not delete data from the target tables. If you want to reload or perform a fresh load of the data, run the associated delete script. This script does not COMMIT by default. If you want to commit INSERT DML statements, run the script, and then issue the COMMIT command explicitly. Click cohort_hdwf_sample_data_load_v1.0.sql to see the script contents.
This script deletes all the data from multiple HDWF tables. You must run this script before running the associated insert script. If you want to commit DELETE DML statements, issue the COMMIT command explicitly after running the Delete script. Click cohort_hdwf_sample_data_delete_v1.0.sql to see the script contents.
This script creates OHSCE data mart schema. When executed, it will create a cdm database schema and grant privileges required for subsequent installation and use of OHSCE. DBA privileges are required to execute this script. Click create_cxe_user_example.sql to see the script contents.
Contents Previous Next Title Page |
Copyright © 2011 Oracle, All rights reserved. |
About OracleContact UsLegal Notices and Terms for UsePrivacy Statement |