Skip to content

Commit

Permalink
Merge pull request #24 from OHDSI/Aug_2023_update
Browse files Browse the repository at this point in the history
Aug 2023 update
  • Loading branch information
bradanton authored Sep 13, 2023
2 parents 71063b4 + 2a4d582 commit a740da0
Show file tree
Hide file tree
Showing 45 changed files with 5,009 additions and 144 deletions.
16 changes: 10 additions & 6 deletions docs/CPRD/CPRD_Person.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,19 @@ The patients in the CDM are restricted to the subset of all CPRD patients deemed
| month_of_birth | mob | | Mob is only populated for children, if 0 set as NULL |
| day_of_birth | | | |
| birth_datetime | | | |
| race_concept_id | | 0 | |
| ethnicity_concept_id | | 0 | It could be possible to write an algorithm in the future using the Read codes that are available for a patient. |
| race_concept_id | | STEM.concept_id | populate if STEM.concept_id has domain 'Race' |
| ethnicity_concept_id | | 0 | |
| location_id | | | |
| provider_id | | | |
| care_site_id | patid | Last 3 digits of patient.patid is the practice identifier and can be used in the CARE_SITE table to lookup the care_site_id. | |
| person_source_value | patid | | |
| gender_source_value | gender | | 'M' if gender = 1, 'F' if gender = 2 |
| gender_source_concept_id | | 0 | |
| race_source_value | | | |
| race_source_concept_id | | 0 | |
| ethnicity_source_value | | | |
| ethnicity_source_concept_id | | 0 | |
| race_source_value | | STEM.source_value | populate if STEM.concept_id has domain 'Race' |
| race_source_concept_id | | STEM.source_concept_id | populate if STEM.concept_id has domain 'Race' |
| ethnicity_source_value | | | |

## Change log

### 08-Aug-2023
- added rule: populate Race from the STEM table
7 changes: 5 additions & 2 deletions docs/IBM_CCAE_MDCR/CCAE_MDCR_stem_inpatient_admissions.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ For every record in STEM there should be 1 row record in VISIT_DETAIL (n:1 join)
| UNIQUE_DEVICE_ID | - | NULL | - |
| UNIT_CONCEPT_ID | - | 0 | - |
| UNIT_SOURCE_VALUE | - | NULL | - |
| VALUE_AS_CONCEPT_ID | - | 0 | - |
| VALUE_AS_CONCEPT_ID | PDX<br>DX1-15<br>PPROC<br>PROC1-15 | TARGET_VALUE_AS_CONCEPT_ID from the Source_to_Standard Query (resulting from **'Maps to value'** relationsip);<br> See SOURCE_CONCEPT_ID field logic of how to define SOURCE_CONCEPT_ID being mapped| - |
| VALUE_AS_NUMBER | - | NULL | - |
| VALUE_AS_STRING | - | NULL | - |
| VALUE_SOURCE_VALUE | - | NULL | - |
Expand Down Expand Up @@ -91,4 +91,7 @@ For every record in STEM there should be 1 row record in VISIT_DETAIL (n:1 join)
* Remove any duplicate records
* Set VISIT_PROVID and VISIT_PROVSTD as PPROV and PROVCAT
* As data is being assigned a CONCEPT_ID check the domain, this tells you what domain table the data should land.<br><br>If the CONCEPT = 0 the PDX, DX1-15 rows should land in **CONDITION_OCCURRENCE** and the PPROC, PROC1-15 should land in the **PROCEDURE_OCCURRENCE** table.
* Instead any code without a mapping is assigned a CONCEPT_ID of zero and a DOMAIN_ID of OBSERVATION.
* Instead any code without a mapping is assigned a CONCEPT_ID of zero and a DOMAIN_ID of OBSERVATION.

### Aug-01-2023
- Added 'Maps to value' logic
5 changes: 4 additions & 1 deletion docs/IBM_CCAE_MDCR/CCAE_MDCR_stem_inpatient_services.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Records will be written from the INPATIENT_SERVICES table mapping the field REVC
| UNIQUE_DEVICE_ID | - | NULL | - |
| UNIT_CONCEPT_ID | - | 0 | - |
| UNIT_SOURCE_VALUE | - | NULL | - |
| VALUE_AS_CONCEPT_ID | - | 0 | - |
| VALUE_AS_CONCEPT_ID | PDX<br>DX1-5<br>PPROC<br>PROC1 | TARGET_VALUE_AS_CONCEPT_ID from the Source_to_Standard Query (resulting from **'Maps to value'** relationsip);<br> See SOURCE_CONCEPT_ID field logic of how to define SOURCE_CONCEPT_ID being mapped| - |
| VALUE_AS_NUMBER | - | NULL | - |
| VALUE_AS_STRING | - | NULL | - |
| VALUE_SOURCE_VALUE | - | NULL | - |
Expand Down Expand Up @@ -97,3 +97,6 @@ Records will be written from the INPATIENT_SERVICES table mapping the field REVC
* Added CONDITION_STATUS_CONCEPT_ID information

* Added information on how to map revenue codes

### Aug-01-2023
- Added 'Maps to value' logic
7 changes: 5 additions & 2 deletions docs/IBM_MDCD/MDCD_stem_inpatient_admissions.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ For every record in STEM there should be 1 row record in VISIT_DETAIL (n:1 join)
| UNIQUE_DEVICE_ID | - | NULL | - |
| UNIT_CONCEPT_ID | - | 0 | - |
| UNIT_SOURCE_VALUE | - | NULL | - |
| VALUE_AS_CONCEPT_ID | - | 0 | - |
| VALUE_AS_CONCEPT_ID | PDX<br>DX1-15<br>PPROC<br>PROC1-15 | TARGET_VALUE_AS_CONCEPT_ID from the Source_to_Standard Query (resulting from **'Maps to value'** relationsip);<br> See SOURCE_CONCEPT_ID field logic of how to define SOURCE_CONCEPT_ID being mapped | - |
| VALUE_AS_NUMBER | - | NULL | - |
| VALUE_AS_STRING | - | NULL | - |
| VALUE_SOURCE_VALUE | - | NULL | - |
Expand Down Expand Up @@ -91,4 +91,7 @@ For every record in STEM there should be 1 row record in VISIT_DETAIL (n:1 join)
* Remove any duplicate records
* Set VISIT_PROVID and VISIT_PROVSTD as PPROV and PROVCAT
* As data is being assigned a CONCEPT_ID check the domain, this tells you what domain table the data should land.<br><br>If the CONCEPT = 0 the PDX, DX1-15 rows should land in **CONDITION_OCCURRENCE** and the PPROC, PROC1-15 should land in the **PROCEDURE_OCCURRENCE** table.
* Instead any code without a mapping is assigned a CONCEPT_ID of zero and a DOMAIN_ID of OBSERVATION.
* Instead any code without a mapping is assigned a CONCEPT_ID of zero and a DOMAIN_ID of OBSERVATION.

### Aug-01-2023
- Added 'Maps to value' logic
7 changes: 5 additions & 2 deletions docs/IBM_MDCD/MDCD_stem_inpatient_services.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Records will be written from the INPATIENT_SERVICES table mapping the field REVC
| UNIQUE_DEVICE_ID | - | NULL | - |
| UNIT_CONCEPT_ID | - | 0 | - |
| UNIT_SOURCE_VALUE | - | NULL | - |
| VALUE_AS_CONCEPT_ID | - | 0 | - |
| VALUE_AS_CONCEPT_ID | PDX<br>DX1-5<br>PPROC<br>PROC1 | TARGET_VALUE_AS_CONCEPT_ID from the Source_to_Standard Query (resulting from **'Maps to value'** relationsip);<br> See SOURCE_CONCEPT_ID field logic of how to define SOURCE_CONCEPT_ID being mapped | - |
| VALUE_AS_NUMBER | - | NULL | - |
| VALUE_AS_STRING | - | NULL | - |
| VALUE_SOURCE_VALUE | - | NULL | - |
Expand Down Expand Up @@ -96,4 +96,7 @@ Records will be written from the INPATIENT_SERVICES table mapping the field REVC

* Added CONDITION_STATUS_CONCEPT_ID information

* Added information on how to map revenue codes
* Added information on how to map revenue codes

### Aug-01-2023
- Added 'Maps to value' logic
8 changes: 4 additions & 4 deletions docs/IBM_MDCD/MDCD_visit_detail.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ The **VISIT_DETAIL** table will have 1:1 record level referential integrity to *
| --- | --- | --- | --- |
| VISIT_DETAIL_ID | - | System generated. | - |
| PERSON_ID | ENROLID | - | |
| VISIT_DETAIL_CONCEPT_ID | STDPLAC | Use the <a href="https://ohdsi.github.io/CommonDataModel/sqlScripts.html">Source-to-Standard Query</a> with the filter<br><br> `WHERE SOURCE_VOCABULARY_ID IN ('CMS Place of Service’)`<br>`AND TARGET_STANDARD_CONCEPT = 'S'`<br/><br/>If no map is made, assign to 0.|**NOTE:** The STDPLAC value in OUTPATIENT_SERVICES is only one digit for the numbers 1-9. In the OMOP Vocabulary these are two digits, presented as 01, 02, etc. Please add a leading zero prior to mapping to make sure they are not erroneously set to zero.<br><br>If STDPLAC = 22 and TSVCDAT - SVCDATE > 1 then set VISIT_DETAIL_CONCEPT_ID to 9201|
| VISIT_DETAIL_CONCEPT_ID | STDPLAC | Use the <a href="https://ohdsi.github.io/CommonDataModel/sqlScripts.html">Source-to-Standard Query</a> with the filter<br><br> `WHERE SOURCE_VOCABULARY_ID IN ('CMS Place of Service’)`<br>`AND TARGET_STANDARD_CONCEPT = 'S'`<br/><br/>If no map is made, assign to 9202 (Outpatient Visit).|**NOTE:** The STDPLAC value in OUTPATIENT_SERVICES is only one digit for the numbers 1-9. In the OMOP Vocabulary these are two digits, presented as 01, 02, etc. Please add a leading zero prior to mapping to make sure they are not erroneously set to zero.<br><br>If STDPLAC = 22 and TSVCDAT - SVCDATE > 1 then set VISIT_DETAIL_CONCEPT_ID to 9201|
| VISIT_DETAIL_START_DATE | SVCDATE | NULL | - |
| VISIT_DETAIL_START_DATETIME | SVCDATE | - | Set time to 00:00:00. |
| VISIT_DETAIL_END_DATE | TSVCDAT (See *Logic* column for exceptions)| If STDPLAC is blank, NULL, does not have a mapping or is equal to 02, 08, 17, 53, 57, 71, 72, 11, 01, 95, 12, 20, 49, 60, 15, 81, 42, 41, 14, 04, 18, 09, 03, 65 or 16 then set visit_detail_end_date equal to visit_detail_start_date. <br><br>If STDPLAC is equal to 23, 24, 19, 25, 50, 62 and TSVCDAT - SVCDATE > 1 then set visit_detail_end_date equal to visit_detail_start_date <br><br>If STDPLAC = 22 and TSVCDAT - SVCDATE > 1 then set VISIT_DETAIL_CONCEPT_ID to 9201 | - |
Expand All @@ -76,7 +76,7 @@ The **VISIT_DETAIL** table will have 1:1 record level referential integrity to *
| --- | --- | --- | --- |
| VISIT_DETAIL_ID | - | System generated. | - |
| PERSON_ID | ENROLID | - | - |
| VISIT_DETAIL_CONCEPT_ID | STDPLAC | Use the <a href="https://ohdsi.github.io/CommonDataModel/sqlScripts.html">Source-to-Standard Query</a> with the filter<br><br> `WHERE SOURCE_VOCABULARY_ID IN ('CMS Place of Service’)`<br>`AND TARGET_STANDARD_CONCEPT = 'S'`<br/><br/>If no map is made, assign to 0.|***NOTE:** The STDPLAC value in INPATIENT_SERVICES is only one digit for the numbers 1-9. In the OMOP Vocabulary these are two digits, presented as 01, 02, etc. Please add a leading zero prior to mapping to make sure they are not erroneously set to zero.<br><br>If STDPLAC = 22 and TSVCDAT - SVCDATE > 1 then set VISIT_DETAIL_CONCEPT_ID to 9201|
| VISIT_DETAIL_CONCEPT_ID | STDPLAC | Use the <a href="https://ohdsi.github.io/CommonDataModel/sqlScripts.html">Source-to-Standard Query</a> with the filter<br><br> `WHERE SOURCE_VOCABULARY_ID IN ('CMS Place of Service’)`<br>`AND TARGET_STANDARD_CONCEPT = 'S'`<br/><br/>If no map is made, assign to 9201 (Inpatient Visit).|***NOTE:** The STDPLAC value in INPATIENT_SERVICES is only one digit for the numbers 1-9. In the OMOP Vocabulary these are two digits, presented as 01, 02, etc. Please add a leading zero prior to mapping to make sure they are not erroneously set to zero.<br><br>If STDPLAC = 22 and TSVCDAT - SVCDATE > 1 then set VISIT_DETAIL_CONCEPT_ID to 9201|
| VISIT_DETAIL_START_DATE | SVCDATE | NULL | - |
| VISIT_DETAIL_START_DATETIME | SVCDATE | - | Set time to 00:00:00. |
| VISIT_DETAIL_END_DATE | TSVCDAT (See *Logic* column for exceptions)| If STDPLAC is blank, NULL, does not have a mapping or is equal to 02, 08, 17, 53, 57, 71, 72, 11, 01, 95, 12, 20, 49, 60, 15, 81, 42, 41, 14, 04, 18, 09, 03, 65 or 16 then set visit_detail_end_date equal to visit_detail_start_date. <br><br>If STDPLAC is equal to 23, 24, 19, 25, 50, 62 and TSVCDAT - SVCDATE > 1 then set visit_detail_end_date equal to visit_detail_start_date <br><br>If STDPLAC = 22 and TSVCDAT - SVCDATE > 1 then set VISIT_DETAIL_CONCEPT_ID to 9201 | - |
Expand All @@ -101,7 +101,7 @@ The **VISIT_DETAIL** table will have 1:1 record level referential integrity to *
| --- | --- | --- | --- |
| VISIT_DETAIL_ID | - | System generated. | - |
| PERSON_ID | ENROLID | - | |
| VISIT_DETAIL_CONCEPT_ID | STDPLAC | Use the <a href="https://ohdsi.github.io/CommonDataModel/sqlScripts.html">Source-to-Standard Query</a> with the filter<br><br> `WHERE SOURCE_VOCABULARY_ID IN ('CMS Place of Service’)`<br>`AND TARGET_STANDARD_CONCEPT = 'S'`<br/><br/>If no map is made, assign to 0.|**NOTE:** The STDPLAC value is only one digit for the numbers 1-9. In the OMOP Vocabulary these are two digits, presented as 01, 02, etc. Please add a leading zero prior to mapping to make sure they are not erroneously set to zero.<br><br>If STDPLAC = 22 and TSVCDAT - SVCDATE > 1 then set VISIT_DETAIL_CONCEPT_ID to 9201|
| VISIT_DETAIL_CONCEPT_ID | STDPLAC | Use the <a href="https://ohdsi.github.io/CommonDataModel/sqlScripts.html">Source-to-Standard Query</a> with the filter<br><br> `WHERE SOURCE_VOCABULARY_ID IN ('CMS Place of Service’)`<br>`AND TARGET_STANDARD_CONCEPT = 'S'`<br/><br/>If no map is made, assign to 9202 (Outpatient).|**NOTE:** The STDPLAC value is only one digit for the numbers 1-9. In the OMOP Vocabulary these are two digits, presented as 01, 02, etc. Please add a leading zero prior to mapping to make sure they are not erroneously set to zero.<br><br>If STDPLAC = 22 and TSVCDAT - SVCDATE > 1 then set VISIT_DETAIL_CONCEPT_ID to 9201|
| VISIT_DETAIL_START_DATE | SVCDATE | NULL | - |
| VISIT_DETAIL_START_DATETIME | SVCDATE | - | Set time to 00:00:00. |
| VISIT_DETAIL_END_DATE | TSVCDAT (See *Logic* column for exceptions)| If STDPLAC is blank, NULL, does not have a mapping or is equal to 02, 08, 17, 53, 57, 71, 72, 11, 01, 95, 12, 20, 49, 60, 15, 81, 42, 41, 14, 04, 18, 09, 03, 65 or 16 then set visit_detail_end_date equal to visit_detail_start_date. <br><br>If STDPLAC is equal to 23, 24, 19, 25, 50, 62 and TSVCDAT - SVCDATE > 1 then set visit_detail_end_date equal to visit_detail_start_date <br><br>If STDPLAC = 22 and TSVCDAT - SVCDATE > 1 then set VISIT_DETAIL_CONCEPT_ID to 9201 | - |
Expand Down Expand Up @@ -179,7 +179,7 @@ The **VISIT_DETAIL** table will have 1:1 record level referential integrity to *
| --- | --- | --- | --- |
| VISIT_DETAIL_ID | - | System generated. | - |
| PERSON_ID | ENROLID | - | |
| VISIT_DETAIL_CONCEPT_ID | STDPLAC | Use the <a href="https://ohdsi.github.io/CommonDataModel/sqlScripts.html">Source-to-Standard Query</a> with the filter<br><br> `WHERE SOURCE_VOCABULARY_ID IN ('CMS Place of Service’)`<br>`AND TARGET_STANDARD_CONCEPT = 'S'`<br/><br/>If no map is made, assign to 0.| **NOTE:** The STDPLAC value is only one digit for the numbers 1-9. In the OMOP Vocabulary these are two digits, presented as 01, 02, etc. Please add a leading zero prior to mapping to make sure they are not erroneously set to zero.<br><br>If STDPLAC = 22 and TSVCDAT - SVCDATE > 1 then set VISIT_DETAIL_CONCEPT_ID to 9201 |
| VISIT_DETAIL_CONCEPT_ID | STDPLAC | Use the <a href="https://ohdsi.github.io/CommonDataModel/sqlScripts.html">Source-to-Standard Query</a> with the filter<br><br> `WHERE SOURCE_VOCABULARY_ID IN ('CMS Place of Service’)`<br>`AND TARGET_STANDARD_CONCEPT = 'S'`<br/><br/>If no map is made, assign to 42898160 (Non-hospital institution Visit).| **NOTE:** The STDPLAC value is only one digit for the numbers 1-9. In the OMOP Vocabulary these are two digits, presented as 01, 02, etc. Please add a leading zero prior to mapping to make sure they are not erroneously set to zero.<br><br>If STDPLAC = 22 and TSVCDAT - SVCDATE > 1 then set VISIT_DETAIL_CONCEPT_ID to 9201 |
| VISIT_DETAIL_START_DATE | SVCDATE | NULL | - |
| VISIT_DETAIL_START_DATETIME | SVCDATE | - | Set time to 00:00:00. |
| VISIT_DETAIL_END_DATE | TSVCDAT (See *Logic* column for exceptions)| If STDPLAC is blank, NULL, does not have a mapping or is equal to 02, 08, 17, 53, 57, 71, 72, 11, 01, 95, 12, 20, 49, 60, 15, 81, 42, 41, 14, 04, 18, 09, 03, 65 or 16 then set visit_detail_end_date equal to visit_detail_start_date. <br><br>If STDPLAC is equal to 23, 24, 19, 25, 50, 62 and TSVCDAT - SVCDATE > 1 then set visit_detail_end_date equal to visit_detail_start_date <br><br>If STDPLAC = 22 and TSVCDAT - SVCDATE > 1 then set VISIT_DETAIL_CONCEPT_ID to 9201 | - |
Expand Down
28 changes: 27 additions & 1 deletion docs/JMDC/JMDC_Condition_Occurrence.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,34 @@ When an ICD10 code in the diagnosis table maps to a concept in the Condition dom
| condition_status_concept_id | main_disease_flag | If main_disease_flag = 1 set to `32902` (primary condition) , else set to `32908` (secondary condition) | |
| preceding_visit_occurrence_id | | | |

## Reading from Annual_Health_Checkup

The **annual_health_checkup** table is a wide table with one row per date and many columns representing individual values like BMI, fasting blood sugar, and sleep quality. These columns are mapped to standard concepts as detailed in the mapping file [here](https://github.com/OHDSI/ETL-LambdaBuilder/blob/master/docs/JMDC/Vocab%20Updates/Annual_Health_Checkup_Mapping.xlsx). Some variable-value pairs are mapped to condition concept

| Destination Field | Source Field | Logic | Comment Field |
|-|-|-|-|
| condition_occurrence_id | | | |
| person_id | member_id | Remove 'M' prefix | |
| visit_occurrence_id | claim_id | Remove ‘C’ prefix | |
| condition_type_concept_id | type_of_claim | 32836 (EHR physical examination) | |
| condition_start_date | date_of_health_checkup | | |
| condition_end_date | NULL | | |
| condition_concept_id | mapped concept | | See the mappings for these columns in the manual mapping file |
| condition_source_value | column name from annual_health_checkup | | |
| condition_source_concept_id | 0 | | |
| provider_id | | | |
| condition_start_datetime | | | |
| condition_end_datetime | | | |
| stop_reason | | | |
| visit_detail_id | | | |
| condition_status_source_value | | | |
| condition_status_concept_id | | | |
| preceding_visit_occurrence_id |

## Change Log

### April 6, 2022
- Added logic to map CONDITION_STATUS_CONCEPT_ID from **main_disease_flag** in diagnosis
- Added logic to map CONDITION_STATUS_CONCEPT_ID from **main_disease_flag** in diagnosis

### Aug 10, 2023
- Added reading from Annual_Health_Checkup
34 changes: 34 additions & 0 deletions docs/JMDC/JMDC_Device_Exposure.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
title: "Device Exposure"
parent: JMDC
nav_order: 15
layout: default
---

# Table Name: Device Exposure

The DEVICE_EXPOSURE table will house records from JMDC.Drug that mapped to a Device domain

The field mapping is as follows:

| Destination Field  | Source Field  | Applied Rule  | Comment  |
| --- | --- | --- | --- |
| DEVICE_EXPOSURE_ID  || System-generated  | |
| PERSON_ID  | member_id | Remove 'M' prefix | |
| DEVICE_CONCEPT_ID  | jmdc_drug_code | Map to standard concepts using the <a href="https://ohdsi.github.io/CommonDataModel/sqlScripts.html">Source-to-Standard Query</a> where source_vocabulary_id = 'JMDC' and domain of target_concept = 'Device' | |
| DEVICE_EXPOSURE_START_DATE  |date_of_prescription month_and_year_of_medical_care | Use date of prescription if available, otherwise set to start of visit. | |
| DEVICE_EXPOSURE_START_DATETIME  || NULL  | |
| DEVICE_EXPOSURE_END_DATE  |    | | |
| DEVICE_EXPOSURE_END_DATETIME  || NULL  | |
| DEVICE_TYPE_CONCEPT_ID | type_of_claim | Pharmacy, Outpatient: 32869 (Pharmacy claim) Inpatient or DPC: 32818 (EHR administration record) | |
| UNIQUE_DEVICE_ID  || NULL  | |
| PROVIDER_ID  | medical_facility_id | | Use the dummy providers we created per institution. |
| VISIT_OCCURRENCE_ID  | claim_id | Remove ‘C’ prefix | |
| DEVICE_SOURCE_VALUE  | jmdc_drug_code | | |
| DEVICE_SOURCE_CONCEPT_ID  | jmdc_drug_code | Use the <a href="https://ohdsi.github.io/CommonDataModel/sqlScripts.html">Source-to-Source Query</a> where source_vocabulary_id = 'JMDC' and domain of target_concept = 'Device' | |

## Change Log:

### 10-Aug-2023
Table added

Loading

0 comments on commit a740da0

Please sign in to comment.