Skip to content

Commit

Permalink
Merge branch 'OHDSI:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
bradanton authored Nov 20, 2023
2 parents 47c2c20 + 48bd2ca commit 3908435
Show file tree
Hide file tree
Showing 88 changed files with 40,712 additions and 31,267 deletions.
2 changes: 1 addition & 1 deletion docs/CPRD/CPRD_Additional_STEM.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ These concatenated source values will then be mapped to standard concepts using
| concept_id | | Map the source value (add_int.enttype + '-' + add_int.category + '-' + add_int.description + '-' + add_int.data) to a concept using the [SOURCE_TO_STANDARD_QUERY](https://github.com/OHDSI/ETL-LambdaBuilder/blob/master/docs/Standard%20Queries/SOURCE_TO_STANDARD.sql) with the filters: <br><br> WHERE source_vocabulary_id = 'JNJ_CPRD_ADD_ENTTYPE' AND standard_concept = 'S' AND target_invalid_reason is NULL | |
| source_value | | Concatenate add_int.enttype + '-' + add_int.category + '-' + add_int.description + '-' + add_int.data. | This will retain the information from the entity table about the record and the specific data field being mapped. Please refer to [appendix 2](https://github.com/OHDSI/ETL-LambdaBuilder/blob/master/docs/CPRD/Appendix_2_Additional_Table_Descriptions.xlsx) which is a table showing the enttypes and data_field descriptions from the additional table and counts of each. |
| source_concept_id | | 0 | |
| type_concept_id | | Use **32851** - Health professional filled survey |
| type_concept_id | | Use **32817** - EHR |
| unit_concept_id | | Look up add_int.unit_source_value in the CONCEPT table where vocabulary_id = 'UCUM' and standard_concept = 'S' and invalid_reason is NULL. | |
| unit_source_value | add_int.unit_source_value | | |
| start_date | add_int.eventdate | | For the additional table, the adid is used to link back to the clinical table to get the eventdate. |
Expand Down
2 changes: 1 addition & 1 deletion docs/CPRD/CPRD_Clinical_STEM.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ Any record with one of the SARS-COV-2 read codes listed below should be mapped t
| concept_id | medcode | Use the medcode to link to the medical table to find the read code. Use the [SOURCE_TO_STANDARD](https://github.com/OHDSI/ETL-LambdaBuilder/blob/master/docs/Standard%20Queries/SOURCE_TO_STANDARD.sql) query to map the read code to standard concept(s) with the following filters: <br> <br> Where source_vocabulary_id = 'Read' and Target_standard_concept = 'S' and target_invalid_reason is NULL<br><br>*BE CAREFUL - READ CODES ARE CASE SENSITIVE*. If there is no mapping available, set concept_id to zero. | See the query [CPRD_Clinical_Medcodes.sql](https://github.com/OHDSI/ETL-LambdaBuilder/blob/master/docs/CPRD/Queries/CPRD_Clinical_Medcodes.sql) as a high-level look at the domains covered by this table and how the link to the medical table should be made. |
| source_value | medical.read_code | Use the medcode to link to the medical table to find the read code. Store read code as source_value. | |
| source_concept_id | medcode | Use the medcode to link to the medical table to find the read code. Use the [SOURCE_TO_SOURCE](https://github.com/OHDSI/ETL-LambdaBuilder/blob/master/docs/Standard%20Queries/SOURCE_TO_SOURCE.sql) query to map the read code to a source concept id with the following filters:<br><br> Where source_vocabulary_id = 'Read' <br><br>*BE CAREFUL - READ CODES ARE CASE SENSITIVE*. If there is no mapping available set source_concept_id to zero. | |
| type_concept_id | | Use **32827** - EHR encounter record | |
| type_concept_id | | Use **32817** - EHR | |
4 changes: 2 additions & 2 deletions docs/CPRD/CPRD_Death.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Per CPRD cause-specific mortality is not reliably recorded in the General Practi
PERSON_ID|Patient.Patid||
DEATH_DATE|Patient.Deathdate|
DEATH_DATETIME|Set time to 00:00:00 UTC Tz||
DEATH_TYPE_CONCEPT_ID|32815 (Death Certificate)
DEATH_TYPE_CONCEPT_ID|32817 (EHR)
CAUSE_OF_DEATH_CONCEPT_ID|0||
CAUSE_OF_DEATH_SOURCE_VALUE|0||
CAUSE_SOURCE_CONCEPT_ID|0||
CAUSE_SOURCE_CONCEPT_ID|0||
2 changes: 1 addition & 1 deletion docs/CPRD/CPRD_Immunisation_STEM.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ In the below table, only the relevant STEM fields are shown. Any fields that do
| concept_id | medcode | Use the medcode to link to the medical table to find the read code. Use the [SOURCE_TO_STANDARD](https://github.com/OHDSI/ETL-LambdaBuilder/blob/master/docs/Standard%20Queries/SOURCE_TO_STANDARD.sql) query to map the read code to standard concept(s) with the following filters: <br> <br> Where source_vocabulary_id = 'Read' and Target_standard_concept = 'S' and target_invalid_reason is NULL<br><br>*BE CAREFUL - READ CODES ARE CASE SENSITIVE*. If there is no mapping available, set concept_id to zero. | See the query [CPRD_Immunisation_Medcodes.sql](https://github.com/OHDSI/ETL-LambdaBuilder/blob/master/docs/CPRD/Queries/CPRD_Immunisation_Medcodes.sql) as a high-level look at the domains covered by this table and how the link to the medical table should be made. |
| source_value | medical.read_code | Use the medcode to link to the medical table to find the read code. Store read code as source_value. | |
| source_concept_id | medcode | Use the medcode to link to the medical table to find the read code. Use the [SOURCE_TO_SOURCE](https://github.com/OHDSI/ETL-LambdaBuilder/blob/master/docs/Standard%20Queries/SOURCE_TO_SOURCE.sql) query to map the read code to a source concept id with the following filters:<br><br> Where source_vocabulary_id = 'Read' <br><br>*BE CAREFUL - READ CODES ARE CASE SENSITIVE*. If there is no mapping available set source_concept_id to zero. | |
| type_concept_id | | Use **32827** - EHR encounter record | |
| type_concept_id | | Use **32818** - EHR administration | |
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
2 changes: 1 addition & 1 deletion docs/CPRD/CPRD_Referral_STEM.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ Any record with one of the SARS-COV-2 read codes listed below should be mapped t
| concept_id | medcode | Use the medcode to link to the medical table to find the read code. Use the [SOURCE_TO_STANDARD](https://github.com/OHDSI/ETL-LambdaBuilder/blob/master/docs/Standard%20Queries/SOURCE_TO_STANDARD.sql) query to map the read code to standard concept(s) with the following filters: <br> <br> Where source_vocabulary_id = 'Read' and Target_standard_concept = 'S' and target_invalid_reason is NULL<br><br>*BE CAREFUL - READ CODES ARE CASE SENSITIVE*. If there is no mapping available, set concept_id to zero. | See [CPRD_Referral_Medcodes.sql](https://github.com/OHDSI/ETL-LambdaBuilder/blob/master/docs/CPRD/Queries/CPRD_Referral_Medcodes.sql) for an idea of how the codes in the referral table map to the vocabulary and how the link between the referral table and medical table should be made. |
| source_value | medical.read_code | Use the medcode to link to the medical table to find the read code. Store read code as source_value. | | |
| source_concept_id | medcode | Use the medcode to link to the medical table to find the read code. Use the [SOURCE_TO_SOURCE](https://github.com/OHDSI/ETL-LambdaBuilder/blob/master/docs/Standard%20Queries/SOURCE_TO_SOURCE.sql) query to map the read code to a source concept id with the following filters:<br><br> Where source_vocabulary_id = 'Read' <br><br>*BE CAREFUL - READ CODES ARE CASE SENSITIVE*. If there is no mapping available set source_concept_id to zero. | |
| type_concept_id | | Use **32842** - EHR referral record | |
| type_concept_id | | Use **32817** - EHR | |

2 changes: 1 addition & 1 deletion docs/CPRD/CPRD_Visit_Detail.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ For datetime fields, set time to midnight 00:00:00.
| visit_detail_start_datetime | eventdate | Use the same logic used to set visit_detail_start_date. Set time to 00:00:00 | |
| visit_detail_end_date | | Set as visit_detail_start_date | |
| visit_detail_end_datetime | | Set as visit_detail_start_datetime | |
| visit_detail_type_concept_id | | Use **32827** - EHR encounter record | |
| visit_detail_type_concept_id | | Use **32817** - EHR | |
| provider_id | staffid | | |
| care_site_id | patid | Use the last three digits of the patid (removing leading zeros) to look up the care_site_id in the care_site table. | |
| visit_detail_source_value | constype | Use the consid to link back to the consultation table. Use the constype from the consultation table as the visit_detail_source_value. If there are two based on how the visit detail was defined, choose one. | |
Expand Down
2 changes: 1 addition & 1 deletion docs/CPRD/CPRD_Visit_Occurrence.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ For datetime fields, set time to midnight 00:00:00.
| visit_start_datetime | visit_detail_start_datetime | | |
| visit_end_date | visit_detail_end_date | | |
| visit_end_datetime | visit_detail_end_datetime || |
| visit_type_concept_id | | Use **32827** - EHR encounter record | |
| visit_type_concept_id | | Use **32817** - EHR | |
| provider_id | visit_detail.provider_id | Choose one provider_id if a patient saw more than one provider on the same day. | |
| care_site_id | visit_detail.care_site_id| | |
| visit_source_value | visit_detail_source_value | Choose one visit_detail_source_value for this field if a patient had more than one visit_detail_source_value on the same day. | |
Expand Down
2 changes: 1 addition & 1 deletion docs/CPRD_Aurum/CPRD_Aurum_Observation_STEM.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ In the below table, only the relevant STEM fields are shown.
| type_concept_id | | Set all from observation as **32840** - observation recorded from EHR | |
| range_high | numrangehigh | |
| range_low | numrangelow | |
| unit_concept_id | numunitid | Lookup up the unitid in the lookup tables and use the [SOURCE_TO_STANDARD](https://github.com/OHDSI/ETL-LambdaBuilder/blob/master/docs/Standard%20Queries/SOURCE_TO_STANDARD.sql) query to map either the numunitid to standard concept(s) with the following filters: <br> <br> Where source_vocabulary_id in ('UCUM', 'CPRD_Units') and target_standard_concept = 'S' and target_invalid_reason is NULL |
| unit_concept_id | numunitid | Lookup up the unitid in the lookup tables and use the [SOURCE_TO_STANDARD](https://github.com/OHDSI/ETL-LambdaBuilder/blob/master/docs/Standard%20Queries/SOURCE_TO_STANDARD.sql) query to map either the numunitid to standard concept(s) with the following filters: <br> <br> Where source_vocabulary_id in ('UCUM', 'CPRD_Units') and target_standard_concept = 'S' and target_invalid_reason is NULL<br>When numinitid is NULL, set unit_concept_id = NULL |
| unit_source_value | numunitid | Lookup the unitid in the lookup tables and put the english version of the unit here |
| value_as_number | value | |
| value_source_value | value | |
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
2 changes: 1 addition & 1 deletion docs/IBM_CCAE_MDCR/CCAE_MDCR_stem_lab.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ IF RESULT > -999999.99999 THEN DO;
| LOT_NUMBER | - | NULL | - |
| MODIFIER_CONCEPT_ID | - | NULL | - |
| MODIFIER_SOURCE_VALUE | - | NULL | - |
| OPERATOR_CONCEPT_ID | - | 0 | - |
| OPERATOR_CONCEPT_ID | - | NULL | - |
| QUANTITY | - | NULL | - |
| RANGE_HIGH | REFHIGH | - | - |
| RANGE_LOW | REFLOW | - | - |
Expand Down
Loading

0 comments on commit 3908435

Please sign in to comment.