Skip to content

Commit

Permalink
Merge pull request #59 from OHDSI/doc-upd-march-2024
Browse files Browse the repository at this point in the history
Doc upd march 2024
  • Loading branch information
clairblacketer authored Mar 18, 2024
2 parents 21c04b5 + b735617 commit c5f5e62
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 29 deletions.
7 changes: 6 additions & 1 deletion docs/CPRD/CPRD_Provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Use the staff table to populate the provider table. In CPRD, the staffid field r
| provider_name | | | |
| npi | | | |
| dea | | | |
| specialty_concept_id | role | Join onto SOURCE_TO_CONCEPT_MAP, lookup the role in the source_code field using the [SOURCE_TO_STANDARD](https://github.com/OHDSI/ETL-LambdaBuilder/blob/master/docs/Standard%20Queries/SOURCE_TO_STANDARD.sql) query with the following filter: WHERE SOURCE_VOCABULARY_ID = 'JNJ_CPRD_PROV_SPEC' | Use the file [CPRD_Native_Specialties.sql](https://github.com/OHDSI/ETL-LambdaBuilder/blob/master/docs/CPRD/Vocab%20Updates/CPRD_Native_Specialties.sql) to find all provider specialities and counts if mapping updates to the SOURCE_TO_CONCEPT_MAP need to be made. |
| specialty_concept_id | role | Join onto SOURCE_TO_CONCEPT_MAP, lookup the role in the source_code field using the [SOURCE_TO_STANDARD](https://github.com/OHDSI/ETL-LambdaBuilder/blob/master/docs/Standard%20Queries/SOURCE_TO_STANDARD.sql) query with the following filter: WHERE SOURCE_VOCABULARY_ID = 'JNJ_CPRD_PROV_SPEC' | Use the file [CPRD_Native_Specialties.sql](https://github.com/OHDSI/ETL-LambdaBuilder/blob/master/docs/CPRD/Vocab%20Updates/CPRD_Native_Specialties.sql) to find all provider specialities and counts if mapping updates to the SOURCE_TO_CONCEPT_MAP need to be made. <br><br> Set SPECIALTY_CONCEPT_ID as 38004514 (Unknown Physician Specialty) if role is missing or cannot be mapped. |
| care_site_id | staffid | right(staffid,3) | Last 3 digits of the staffid are the practice identifier with the leading zeros removed. |
| year_of_birth | | | |
| gender_concept_id | gender | Map the CPRD gender code to gender_concept_id using the following logic: <br>1 = 8507<br>2 = 8532<br>(0,3,4) = 0 | |
Expand All @@ -30,3 +30,8 @@ Use the staff table to populate the provider table. In CPRD, the staffid field r
| specialty_source_concept_id | | | 0 |
| gender_source_value | gender | logic: <br>1 = M<br>2 = F | |
| gender_source_concept_id | | | 0 |

## Change Log

### March 12, 2024
- specialty_concept_id added Unknown Physician Specialty for missing role
5 changes: 4 additions & 1 deletion docs/JMDC/JMDC_Condition_Occurrence.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ When an ICD10 code in the diagnosis table maps to a concept in the Condition dom
| 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 | Outpatient: **32859** (Outpatient claim) Inpatient or DPC: **32853** (Inpatient claim) condition-era type record 38000246 (Condition era - 0 days persistence window) | |
| condition_type_concept_id | type_of_claim | Outpatient: **32859** (Outpatient claim) <br> Inpatient or DPC: **32853** (Inpatient claim) | |
| condition_start_date | month_and_year_of_medical_care date_of_medical_care_start | Use start of visit. Create additional condition occurrences (condition 'eras') if date_of_medical_care_start is earlier than the start of month_and_year of_medical_care. If date_of_medical_care_start precedes the observation_period_start date, set start to observation_period_start_date. | |
| condition_end_date | month_and_year_of_medical_care | For condition era type records, the end date should be the end of the last diagnosis for that patient that has the specific date_of_medical_care_start, medical_facility_id, and standard_disease_code. For all other records set to null. | |
| condition_concept_id | standard_disease_code | | Lookup icd10_level4_code in diagnosis_master table, and use vocab to map to standard concept. Remove '-' prior to mapping (e.g. 'I50-' should map to 'I50'), and ignore period (e.g. 'I500' should map to 'I50.0') |
Expand Down Expand Up @@ -67,6 +67,9 @@ The **annual_health_checkup** table is a wide table with one row per date and ma

## Change Log

### March 12, 2024
- condition_type_concept_id cleaned up

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

Expand Down
5 changes: 4 additions & 1 deletion docs/JMDC/JMDC_Drug_Exposure.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ description: "Drug_Exposure mapping from JMDC drug table"
| person_id | member_id | Remove 'M' prefix | |
| drug_type_concept_id | type_of_claim | Pharmacy, Outpatient: 32869 (Pharmacy claim) Inpatient or DPC: 32818 (EHR administration record) | |
| drug_exposure_start_date | date_of_prescription month_and_year_of_medical_care | Use date of prescription if available, otherwise set to start of visit. | |
| drug_exposure_end_date | month_and_year_of_medical_care date_of_prescription administered_days | Drug_exposure_end_date = drug_exposure_start_date + min(administered_days,180) | |
| drug_exposure_end_date | month_and_year_of_medical_care date_of_prescription administered_days | Drug_exposure_end_date = drug_exposure_start_date+min(administered_days,180)-1 | |
| days_supply | administered_days | If value > 180, set to 180 (occurs in 74 prescriptions) | |
| drug_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'. | |
| drug_source_value | jmdc_drug_code | | |
Expand All @@ -41,5 +41,8 @@ description: "Drug_Exposure mapping from JMDC drug table"

## Change Log

### March 12, 2024
- drug_exposure_end_date fixed logic

### April 6, 2022
- The drug mapping table has now been integrated in the Vocabulary (before it was a separate mapping file).The codes in the jmdc_drug_code field can be linked to the concept_code of the concepts in the 'JMDC' vocabulary in the concept table.
11 changes: 8 additions & 3 deletions docs/OPTUM_PANTHER/Optum_Panther_Med_Admin_STEM.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ description: "OPTUM EHR Medication_Administrations table to STEM"
| visit_occurrence_id | encid | Lookup the VISIT_OCCURRENCE_ID based on the encid |If encid is blank then use admin_date to determine which VISIT_OCCURRENCE_ID the diagnosis should be associated to|
| visit_detail_id| encid | Lookup the VISIT_DETAIL_ID based on the encid|If encid is blank then leave VISIT_DETAIL_ID blank|
| provider_id | provid | Lookup the PROVIDER_ID in the PROVIDER table using provid|If provid then leave PROVIDER_ID blank|
| start_date | admin_date | | |
| end_date | admin_date | | |
| start_date | admin_date | | Use order_date if admin_date is epmty or null. |
| end_date | admin_date | | Use order_date if admin_date is epmty or null. |
| start_datetime | admin_time | Combine admin_date and admin_time into a datetime| |
| end_datetime | admin_time| Combine admin_date and admin_time into a datetime| |
| concept_id |ndc |Use the [SOURCE_TO_STANDARD](https://github.com/OHDSI/ETL-LambdaBuilder/blob/master/docs/Standard%20Queries/SOURCE_TO_STANDARD.sql) query to map the code to standard concept(s) with the following filters: <br> <br> Where source_vocabulary_id = 'NDC' and Target_standard_concept = 'S' and target_invalid_reason is NULL and admin_date between valid_start_date and valid_end_date<br><br>If there is no mapping available, set concept_id to zero.| |
Expand Down Expand Up @@ -56,4 +56,9 @@ description: "OPTUM EHR Medication_Administrations table to STEM"
| anatomic_site_source_value | | | |
| disease_status_source_value | | | |
| condition_status_concept_id | | | |
| condition_status_source_value | | | |
| condition_status_source_value | | | |

## Change Log

### March 12, 2024
- start/end date added use order_date if admin_date is epmty or null
23 changes: 9 additions & 14 deletions docs/PREMIER/Premier_Measurement.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,10 @@ layout: default

# Table Name: Measurement

The MEASUREMENT table will house records from PATBILL, PATCPT, VITALS, GENLAB, LAB_RESULT and PATICD_DIAG that have been mapped to the measurement domain. Additionally, procedures that occur on the same day as billing records for operation time will have operation time calculated and recorded in the measurement table.
The MEASUREMENT table will house records from PATBILL, PATCPT, VITALS, GENLAB, LAB_RESULT and PATICD_DIAG that have been mapped to the measurement domain.

Measurements are recorded in the PATBILL table as standard charges. Premier captures the date the measurement is made in the SERV_DATE field thus, the MEASUREMENT_DATE is determined from the VISIT_START_DATE from VISIT_OCCURRENCE and PATBILL.SERV_DATE unless the start date is greater than the end of the month, then it’s truncated to the end of month. For measurements recorded in the PATCPT table, the date the measurement was made is unknown so MEASUREMENT_DATE is recorded as VISIT_END_DATE.

In Premier, many procedures are recorded in the PATICD_PROC table, which includes the date the procedure was performed as PATICD_PROC.PROC_DATE. Certain billing records in PATBILL include information on surgical operation time. The sample code below the field mapping table returns surgical operation time values in minutes for procedures where operation time billing record(s) happen on the same day. It is assumed that if a procedure and an operating time bill happen on the same day, then the operating time is associated with the procedure. These operation time values move to the MEASUREMENT table and the MEASUREMENT_DATE equals the corresponding PROCEDURE_DATE (which is PROC_DATE). To associate a surgical operation time with a procedure: MEASUREMENT.VISIT_OCCURRENCE_ID=PROCEDURE_OCCURRENCE.VISIT_OCCURRENCE_ID AND MEASUREMENT.MEASUREMENT_DATE=PROCEDURE_OCCURRENCE.PROCEDURE_DATE.
There are three providers that exist in Premier, the admitting, attending, and procedure. This ETL makes the decision to use admitting physician for all measurements except operation time because it is unknown whether the admitting provider, attending provider or another person obtained the measurement.

##TODO:
- For operation time measurements, the provider is set as the procedure physician.
Only records that fall within an OBSERVATION_PERIOD are available for each person. The VISIT_OCCURRENCE table must be created before the MEASUREMENT table is created.

## Reading from PATBILL, PATCPT, PATICD_DIAG

The field mapping is performed as follows:
Expand All @@ -27,19 +20,19 @@ The field mapping is performed as follows:
| --- | --- | --- | --- |
| MEASUREMENT_ID | - | System generated | |
| PERSON_ID | PAT.MEDREC_KEY | | |
| MEASUREMENT_CONCEPT_ID | PATCPT.CPT_CODE<br>PATBILL.STD_CHG_CODE<br>PATICD_DIAG.ICD_CODE<br>PATBILL.STD_CHG_DESC | QUERY: SOURCE TO STANDARD <br> <code>SELECT TARGET_CONCEPT_ID FROM CTE_VOCAB_MAP WHERE SOURCE_VOCABULARY_ID IN ('CPT4', 'HCPCS', 'ICD10CM', 'ICD9CM', 'JNJ_PMR_PROC_CHRG_CD') AND TARGET_DOMAIN_ID = 'Measurement'</code> <br>When operation time measurement values then 3016562 | Only capture those records that have a domain map to Measurement. |
| MEASUREMENT_DATE | VISIT_OCCURRENCE.VISIT_START_DATEPATBILL.SERV_DATE <br>Or<br>VISIT_OCCURRENCE.VISIT_END_DATE <br>Or<br> VISIT_OCCURRENCE.VISIT_START_DATEPATICD_PROC.PROC_DAY | | If measurement is from PATBILL use service date and visit start date unless the service date is greater than the end of the month <br> If measurement comes from PATCPT then use visit end date <br> For operation time measurement, a combination of procedure date and visit start date unless the procedure date is greater than the end of the month |
| MEASUREMENT_CONCEPT_ID | PATCPT.CPT_CODE<br>PATBILL.STD_CHG_CODE<br>PATICD_DIAG.ICD_CODE<br>PATBILL.STD_CHG_DESC | QUERY: SOURCE TO STANDARD <br> <code>SELECT TARGET_CONCEPT_ID FROM CTE_VOCAB_MAP WHERE SOURCE_VOCABULARY_ID IN ('CPT4', 'HCPCS', 'ICD10CM', 'ICD9CM', 'JNJ_PMR_PROC_CHRG_CD') AND TARGET_DOMAIN_ID = 'Measurement'</code> | Only capture those records that have a domain map to Measurement. |
| MEASUREMENT_DATE | VISIT_OCCURRENCE.VISIT_START_DATEPATBILL.SERV_DATE <br>Or<br>VISIT_OCCURRENCE.VISIT_END_DATE <br>Or<br> VISIT_OCCURRENCE.VISIT_START_DATEPATICD_PROC.PROC_DAY | | If measurement is from PATBILL use service date and visit start date unless the service date is greater than the end of the month <br> If measurement comes from PATCPT then use visit end date |
| MEASUREMENT_DATETIME | - | NULL | |
| MEASUREMENT_TYPE_CONCEPT_ID | - | All records within the measurement table should have a measurement_type_concept_id = 32875 (Provider financial system) | |
| OPERATOR_CONCEPT_ID | - | NULL | |
| VALUE_AS_NUMBER | - | See query below | |
| VALUE_AS_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;<br>Set UNIT_CONCEPT_ID = 0 when source unit value is not NULL but doesn't have a mapping |
| UNIT_CONCEPT_ID | - | |Set UNIT_CONCEPT_ID = NULL when the source unit value is NULL;<br>Set UNIT_CONCEPT_ID = 0 when source unit value is not NULL but doesn't have a mapping |
| RANGE_LOW | - | NULL | |
| RANGE_HIGH | - | NULL | |
| PROVIDER_ID | PATICD_PROC.PROC_PHY<br>PAT.ADMPHY | When operation time PATICD_PROC.PROC_PHY Else PAT.ADMPHY | |
| PROVIDER_ID | PATICD_PROC.PROC_PHY<br>PAT.ADMPHY | | |
| VISIT_OCCURRENCE_ID | PAT.PAT_KEY | | |
| MEASUREMENT_SOURCE_VALUE | | <code>SELECT SOURCE_VALUE FROM (SELECT CONCAT(STD_CHG_DESC, ' / ', HOSP_CHG_DESC) AS SOURCE_VALUE FROM PATBILL A JOIN CHGMSTR B ON A.STD_CHG_CODE=B.STD_CHG_CODE JOIN hospchg C ON A.hosp_chg_id=C.hosp_chg_id ) A UNION(SELECT CPT_CODE AS SOURCE_VALUE FROM PATCPT)</code> <br>For operation time records, NULL for now | |
| MEASUREMENT_SOURCE_VALUE | | <code>SELECT SOURCE_VALUE FROM (SELECT CONCAT(STD_CHG_DESC, ' / ', HOSP_CHG_DESC) AS SOURCE_VALUE FROM PATBILL A JOIN CHGMSTR B ON A.STD_CHG_CODE=B.STD_CHG_CODE JOIN hospchg C ON A.hosp_chg_id=C.hosp_chg_id ) A UNION(SELECT CPT_CODE AS SOURCE_VALUE FROM PATCPT)</code> | |
| MEASUREMENT_SOURCE_CONCEPT_ID | - | QUERY: SOURCE TO SOURCE <br> <code>SELECT SOURCE_CONCEPT_ID FROM CTE_VOCAB_MAP WHERE SOURCE_VOCABULARY_ID IN ('CPT4', 'HCPCS') AND TARGET_VOCABULARY_ID IN ('CPT4', 'HCPCS') AND DOMAIN_ID='Measurement'</code> | Only populated for standard coding CPT4, and HCPCS codes |
| UNIT_SOURCE_VALUE | - | NULL | |
| VALUE_SOURCE_VALUE | - | NULL | |
Expand Down Expand Up @@ -863,7 +856,9 @@ WHERE PAT.PAT_KEY = GEN_LAB.PAT_KEY


## Change Log:
### 2024.03.12:
Moved Surgery (concept_id=3016562) to the Observation table
### 2021.08.11:
Updated MEASUREMENT_TYPE_CONCEPT_ID to leverage standard concept id.
### 29-Aug-2023
Added readings from VITALS, GENLAB, LAB_RESULT
Added readings from VITALS, GENLAB, LAB_RESULT
Loading

0 comments on commit c5f5e62

Please sign in to comment.