Skip to content

Commit

Permalink
Merge pull request #127 from OHDSI/premier_visit_updates
Browse files Browse the repository at this point in the history
Premier visit updates
  • Loading branch information
bradanton authored Oct 17, 2024
2 parents 94d0ef2 + 8095a51 commit 5e7ccb8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
13 changes: 8 additions & 5 deletions docs/PREMIER/Premier_Observation.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ layout: default

# Table Name: Observation

The observation table houses additional demographic and visit data that is housed in Premier. Certain ICD9, CPT, and standard charge codes map to standardized observation table concept. Marital status, admission information, discharge status, and patient type records are specific to Premier and map to non-standard observation table concepts.
The observation table houses additional demographic and visit data that is housed in Premier. Certain ICD9, CPT, and standard charge codes map to standardized observation table concept. Marital status and patient type records are specific to Premier and map to non-standard observation table concepts.

Additionally, procedures that occur on the same day as billing records for operation time will have operation time calculated and recorded in the observation table.

PATICD_DIAG.ICD_CODE, PATICD_PROC.ICD_CODE, PATCPT.CPT_CODE, and PATBILL.STD_CHG_CODE map to OBSERVATION.OBSERVATION_CONCEPT_ID using the source to standard cte_vocab_map. These records also map to OBSERVATION.OBSERVATION_SOURCE_CONCEPT_ID using the source to source cte_vocab_map.

PAT.MART_STATUS, PAT.POINT_OF_ORIGIN, PAT.DISC_STATUS, and PAT.PATTYPE map to set OBSERVATION_CONCEPT_ID codes described in the table below and OBSERVATION_SOURCE_CONCEPT_ID=0.
PAT.MART_STATUS and PAT.PATTYPE map to set OBSERVATION_CONCEPT_ID codes described in the table below and OBSERVATION_SOURCE_CONCEPT_ID=0.

The observation start date is assigned the VISIT_START_DATE. The ASSOCIATED_PROVIDER_ID that is provided is the randomly generated key provided by Premier for the provider that admitted the patient. There are two providers that exist in Premier, the admitting and attending. This ETL makes the decision to use admitting because it is unknown whether the admitting provider, attending provider or another person diagnosed the person.

Expand All @@ -32,12 +32,12 @@ The field mapping is performed as follows:
|--- |--- |--- |--- |
|OBSERVATION_ID|-|System-generated||
|PERSON_ID|PAT.MEDREC_KEY|||
|OBSERVATION_CONCEPT_ID|PATCPT.CPT_COD<br>PATBILL.STD_CHG_CODE<br>PATICD_PROC.ICD_CODEPAT<br>ICD_DIAG.ICD_CODE|For records from PATCPT.CPT_CODE, and PATBILL.STD_CHG_CODE: <br><br>QUERY: SOURCE TO STANDARD <code>SELECT TARGET_CONCEPT_ID FROM CTE_VOCAB_MAP WHERE SOURCE_VOCABULARY_ID IN ('CPT4', 'HCPCS', 'JNJ_PMR_OBS_CODE', 'JNJ_PMR_PROC_CHRG_CD') AND TARGET_DOMAIN_ID = 'Observation'</code> <br><br> For records from PATICD_PROC.ICD_CODE and PATICD_DIAG.ICD_CODE: where ICD_VERSION=9 QUERY: SOURCE TO STANDARD <code> SELECT TARGET_CONCEPT_ID FROM CTE_VOCAB_MAP WHERE SOURCE_VOCABULARY_ID IN ('ICD9CM') AND TARGET_DOMAIN_ID = 'Observation'</code> <br><br>For records from PATICD_PROC.ICD_CODE and PATICD_DIAG.ICD_CODE:where ICD_VERSION=10 QUERY: SOURCE TO STANDARD <code>SELECT TARGET_CONCEPT_ID FROM CTE_VOCAB_MAP WHERE SOURCE_VOCABULARY_ID IN ('ICD10CM') AND TARGET_DOMAIN_ID = 'Observation'</code> <br><br>For PAT.MART_STATUS, OBSERVATION_CONCEPT_ID=4053609 <br><br>For PAT.POINT_OF_ORIGIN, OBSERVATION_CONCEPT_ID=40757183 <br><br>For PAT.DISC_STATUS, OBSERVATION_CONCEPT_ID=40757177 <br><br>For PAT.PATTYPE, OBSERVATION_CONCEPT_ID=40769091 <br><br>When operation time observation values then 3016562||
|OBSERVATION_CONCEPT_ID|PATCPT.CPT_COD<br>PATBILL.STD_CHG_CODE<br>PATICD_PROC.ICD_CODEPAT<br>ICD_DIAG.ICD_CODE|For records from PATCPT.CPT_CODE, and PATBILL.STD_CHG_CODE: <br><br>QUERY: SOURCE TO STANDARD <code>SELECT TARGET_CONCEPT_ID FROM CTE_VOCAB_MAP WHERE SOURCE_VOCABULARY_ID IN ('CPT4', 'HCPCS', 'JNJ_PMR_OBS_CODE', 'JNJ_PMR_PROC_CHRG_CD') AND TARGET_DOMAIN_ID = 'Observation'</code> <br><br> For records from PATICD_PROC.ICD_CODE and PATICD_DIAG.ICD_CODE: where ICD_VERSION=9 QUERY: SOURCE TO STANDARD <code> SELECT TARGET_CONCEPT_ID FROM CTE_VOCAB_MAP WHERE SOURCE_VOCABULARY_ID IN ('ICD9CM') AND TARGET_DOMAIN_ID = 'Observation'</code> <br><br>For records from PATICD_PROC.ICD_CODE and PATICD_DIAG.ICD_CODE:where ICD_VERSION=10 QUERY: SOURCE TO STANDARD <code>SELECT TARGET_CONCEPT_ID FROM CTE_VOCAB_MAP WHERE SOURCE_VOCABULARY_ID IN ('ICD10CM') AND TARGET_DOMAIN_ID = 'Observation'</code> <br><br>For PAT.MART_STATUS, OBSERVATION_CONCEPT_ID=4053609 <br><br>For PAT.PATTYPE, OBSERVATION_CONCEPT_ID=40769091 <br><br>When operation time observation values then 3016562||
|OBSERVATION_DATE|PATBILL.SERV_DATE <br>VISIT_OCCURRENCE.VISIT_START_DATE OR VISIT_OCCURRENCE.VISIT_START_DATE|If observation is from PATBILL use service date<br>If observation comes from PAT.MS_DRG, PATCPT.CPT_CODE, PATICD_PROC.ICD_CODE, PATICD_DIAG.ICD_CODE then use visit start date <br><br> For operation time observation, a combination of procedure date and visit start date unless the procedure date is greater than the end of the month||
|OBSERVATION_DATETIME|-|NULL||
|OBSERVATION_TYPE_CONCEPT_ID|-|38000281 Observation recorded from EHR with text result||
|VALUE_AS_NUMBER||||
|VALUE_AS_STRING|PAT.MART_STATUSPAT.POINT_OF_ORIGIN<br>PAT.DISC_STATUS<br>PAT.PAT_TYPE|Value_as_string only populated for Premier-specific fields mart_status, point_of_origin, disc_status, and pat_type<br>Marital status values populated directly from PAT.MART_STATUS as ‘M’, ‘S’, ‘O’, or ‘U’ <br><code>select point_of_origin_desc from poorgin pojoin pat p on p.mart_status=po.point_of_origin</code> <br><br> <code>select disc_status from poorgin pojoin pat p on p.mart_status=po.point_of_origin</code> <br><br> <code>select pat_type_desc from pattype pjoin pat p1 on p1.pat_type=p.pat_type</code>|Use look up values in the text fields.|
|VALUE_AS_STRING|PAT.MART_STATUS<br>PAT.PAT_TYPE|Value_as_string only populated for Premier-specific fields mart_status and pat_type<br>Marital status values populated directly from PAT.MART_STATUS as ‘M’, ‘S’, ‘O’, or ‘U’ <br> <br><br> <code>select pat_type_desc from pattype pjoin pat p1 on p1.pat_type=p.pat_type</code>|Use look up values in the text fields.|
|VALUE_AS_CONCEPT_ID|PATCPT.CPT_COD <br>PATBILL.STD_CHG_CODE <br>PATICD_PROC.ICD_CODEPAT<br> ICD_DIAG.ICD_CODE |same rules as for concept_id and source_concept_id, but use 'Maps to value' relationship||
|QUALIFER_CONCEPT_ID|-|NULL||
|UNIT_CONCEPT_ID|-|For operation time records 8550 Else NULL|Set UNIT_CONCEPT_ID = NULL when the source unit value is NULL;Set UNIT_CONCEPT_ID = 0 when source unit value is not NULL but doesn't have a mapping|
Expand All @@ -48,9 +48,12 @@ The field mapping is performed as follows:
|UNITS_SOURCE_VALUE|-|NULL||
|QUALIFIER_SOURCE_VALUE|-|NULL||

### 27-Sept-2024
- Removed admitting source and discharge destination from cdm.observation

### 03-Mar-2024
- Added Surgery (concept_id=3016562)

### 01-Aug-2023
- Added Maps to value logic
- Cleared formatting
- Cleared formatting
5 changes: 3 additions & 2 deletions docs/PREMIER/Premier_Visit_Occurrence.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,14 @@ Admitting and discharge information is captured in Premier as the place of servi
|CARE_SITE_ID|PAT.PROV_ID|||
|VISIT_SOURCE_VALUE|PAT.I_O_IND|||
|VISIT_SOURCE_CONCEPT_ID|-|||
|ADMITTING_SOURCE_CONCEPT_ID|PAT.POINT_OF_ORIGIN|if POINT_OF_ORIGIN then ADMITTING_SOURCE_CONCEPT_ID<br>0 then 8976<br>1 then 8844<br>2 then 8716<br>3 then 8844<br>4 then 8717<br>45 then 581384<br>46 then 8650<br>5 then 8863<br>6 then 8844<br>7 then 8870<br>8 then 8844<br>9 then 8844<br>A then 8761<br>B then 8536<br>C then 8536<br>D then 8717<br>E then 8883<br>F then 8546<br>||
|ADMITTING_SOURCE_CONCEPT_ID|PAT.POINT_OF_ORIGIN|if POINT_OF_ORIGIN then ADMITTING_SOURCE_CONCEPT_ID<br>0 then 8976<br>1 then 8844<br>2 then 8716<br>3 then 8844<br>4 then 8717<br>45 then 581384<br>46 then 8844<br>5 then 8863<br>6 then 8844<br>7 then 8870<br>8 then 8844<br>9 then 0<br>A then 8761<br>B then 8536<br>C then 8536<br>D then 8717<br>E then 8883<br>F then 8546<br>G then 8844<br>||
|ADMITTING_SOURCE_VALUE|PAT. POINT_OF_ORIGIN|PAT. POINT_OF_ORIGIN||
|DISCHARGE_TO_CONCEPT_ID|PAT.DISC_STATUS|If DISC_STATUS then DISCHARGE_TO_CONCEPT_ID<br>1 then 8536, 2 then 8844<br>3 then 8863, 4 then 8863<br>5 then 8844, 6 then 8536<br>7 then 8844, 8 then 8536<br>9 then 8717, 20 then NULL<br>21 then 8844, 30 then 8844<br>40 then 8546, 41 then 8546<br>42 then 8546, 43 then 8966<br>50 then 8546, 51 then 8546<br>61 then 8863, 62 then 8920<br>63 then 8970, 64 then 8676<br>65 then 8971, 66 then 581379<br>69 then 8844, 70 then 8844<br>71 then 8844, 72 then 8717<br>81 then 8536, 82 then 581379<br>83 then 8863, 84 then 8827<br>85 then 8844, 86 then 8536<br>87 then 8844, 88 then 8966<br>89 then 8863, 90 then 581379<br>91 then 581379, 92 then 8676<br>93 then 8971, 94 then 581379<br>95 then 8844, 99 then 8844<br>||
|DISCHARGE_TO_CONCEPT_ID|PAT.DISC_STATUS|If DISC_STATUS then DISCHARGE_TO_CONCEPT_ID<br>1 then 8536, 2 then 8844<br>3 then 8863, 4 then 8863<br>5 then 8844, 6 then 8536<br>7 then 8844, 8 then 8536<br>9 then 8717, 20 then NULL<br>21 then 8844, 30 then 8844<br>40 then 0, 41 then 0<br>42 then 0, 43 then 8844<br>50 then 8546, 51 then 8546<br>61 then 8863, 62 then 8920<br>63 then 8970, 64 then 8676<br>65 then 8971, 66 then 581379<br>69 then 8844, 70 then 8844<br>71 then 8844, 72 then 8717<br>81 then 8536, 82 then 581379<br>83 then 8863, 84 then 8827<br>85 then 8844, 86 then 8536<br>87 then 8844, 88 then 8844<br>89 then 8863, 90 then 581379<br>91 then 581379, 92 then 8676<br>93 then 8971, 94 then 581379<br>95 then 8844, 99 then 0<br>||
|DISCHARGE_TO_SOURCE_VALUE|PAT.DISC_STATUS|PAT.DISC_STATUS||
|PRECEDING_VISIT_OCCURRENCE_ID|VISIT_OCCURRENCE.VISIT_OCCURRENCE_ID|For a given person, find the visit prior to this one and reference it here|A foreign key to the VISIT_OCCURRENCE table of the visit immediately preceding this visit|

## Change Log:
* 2024.10.16: Updated mappings for discharge_to and admitted_from concept_ids to better represent source data.
* 2024.03.12: Updated VISIT_CONCEPT_ID
* 2023.10.23: Updated visit logic, the exact date of visits is now available.
* 2021.08.11: Updated VISIT_TYPE_CONCEPT_ID to leverage standard concept id.

0 comments on commit 5e7ccb8

Please sign in to comment.