Skip to content

Commit c66539b

Browse files
authored
Merge pull request #67 from OHDSI/cdm_to_cdm-docs
Cdm to cdm docs
2 parents a4ec416 + 320cc8f commit c66539b

18 files changed

+845
-0
lines changed

docs/CDM_to_CDM/cdm_to_cdm.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
layout: default
3+
title: CDM to CDM
4+
nav_order: 10
5+
description: "Documentation for how to map an existing CDM instance (v5.4) with new vocabulary or data quality fixes"
6+
has_children: true
7+
permalink: /docs/CDM_to_CDM
8+
---
9+
10+
# Mapping an existing CDM instance with a new vocabulary or data quality fixes
11+
12+
It is often the case that we want to
+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
layout: default
3+
title: Care Site
4+
nav_order: 4
5+
parent: CDM to CDM
6+
description: "CARE_SITE mapping from an existing CDM instance"
7+
---
8+
9+
## Table name: **CARE_SITE**
10+
11+
Map the new CARE_SITE table from the existing CARE_SITE table.
12+
13+
## Reading from CARE_SITE
14+
15+
| Destination Field | Source field | Logic | Comment field |
16+
| --- | --- | --- | --- |
17+
| care_site_id |care_site_id | | |
18+
| care_site_name |care_site_name | | |
19+
| place_of_service_concept_id | place_of_service_concept_id | | |
20+
| location_id | location_id| | |
21+
| care_site_source_value |care_site_source_value | | |
22+
| place_of_service_source_value | place_of_service_source_value | | |
23+
24+
## Change log

docs/CDM_to_CDM/cdm_to_cdm_cost.md

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
layout: default
3+
title: Cost
4+
nav_order: 9
5+
parent: CDM to CDM
6+
description: "COST mapping from an existing CDM instance"
7+
---
8+
9+
## Table name: **COST**
10+
11+
Map the new COST table from the existing COST table.
12+
13+
### Reading from **COST**
14+
15+
| Destination Field | Source field | Logic | Comment field |
16+
| --- | --- | --- | --- |
17+
| cost_id | cost_id | | |
18+
| cost_event_id | cost_event_id | | |
19+
| cost_domain_id | cost_domain_id | | |
20+
| cost_type_concept_id | cost_type_concept_id | | |
21+
| currency_concept_id | currency_concept_id | | |
22+
| total_charge | total_charge | | |
23+
| total_cost | total_cost| | |
24+
| total_paid | total_paid| | |
25+
| paid_by_payer | paid_by_payer | | |
26+
| paid_by_patient | paid_by_patient | | |
27+
| paid_patient_copay | paid_patient_copay | | |
28+
| paid_patient_coinsurance | paid_patient_coinsurance| | |
29+
| paid_patient_deductible | paid_patient_deductible| | |
30+
| paid_by_primary | paid_by_primary| | |
31+
| paid_ingredient_cost | paid_ingredient_cost | | |
32+
| paid_dispensing_fee | paid_dispensing_fee| | |
33+
| payer_plan_period_id | payer_plan_period_id| | |
34+
| amount_allowed | amount_allowed | | |
35+
| revenue_code_concept_id | revenue_code_concept_id | | |
36+
| revenue_code_source_value | revenue_code_source_value | | |
37+
| drg_concept_id | drg_concept_id | | |
38+
| drg_source_value | drg_source_value | | |
39+
40+
## Change log

docs/CDM_to_CDM/cdm_to_cdm_death.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
layout: default
3+
title: Death
4+
nav_order: 3
5+
parent: CDM to CDM
6+
description: "DEATH mapping from an existing CDM instance"
7+
---
8+
9+
## Table name: **DEATH**
10+
11+
Map the new DEATH table from the existing DEATH table.The following data quality fixes are employed:
12+
13+
- Any death records with a death_date and/or death_datetime that occurs in the future is removed.
14+
15+
### Reading from **DEATH**
16+
17+
| destination field | source field | logic | comment field |
18+
| --- | --- | --- | --- |
19+
| person_id | person_id | | |
20+
| death_date | death_date | | |
21+
| death_datetime | death_datetime | | |
22+
| death_type_concept_id | death_type_concept_id | | |
23+
| cause_concept_id | cause_concept_id| | |
24+
| cause_source_value | cause_source_value | | |
25+
| cause_source_concept_id | cause_source_concept_id | | |
26+
27+
## Change log
+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
layout: default
3+
title: Location
4+
nav_order: 2
5+
parent: CDM to CDM
6+
description: "LOCATION mapping from an existing CDM instance"
7+
---
8+
9+
## Table name: **LOCATION**
10+
11+
Map the new LOCATION table from the existing LOCATION table.
12+
13+
### Reading from **LOCATION**
14+
15+
| destination field | source field | logic | comment field |
16+
| --- | --- | --- | --- |
17+
| location_id | location_id |||
18+
| address_1 | address_1 |||
19+
| address_2 | address_2 |||
20+
| city | city |||
21+
| state | state |||
22+
| zip | zip |||
23+
| county | county |||
24+
| location_source_value | location_source_value |||
25+
| country_concept_id | country_concept_id (v5.4) |||
26+
| country_source_value | country_source_value (v5.4) |||
27+
| latitude | latitude (v5.4) |||
28+
| longitude | longitude (v5.4) |||
29+
30+
## Change log
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
layout: default
3+
title: Observation Period
4+
nav_order: 2
5+
parent: CDM to CDM
6+
description: "Observation Period mapping from an existing CDM instance"
7+
8+
---
9+
10+
# CDM Table name: OBSERVATION_PERIOD
11+
12+
Map the new OBSERVATION_PERIOD table from the existing OBSERVATION_PERIOD table. The following data quality fixes are employed:
13+
14+
- Any person with an implausible observation period is removed. If any of the below rules are violated the person and all their data are removed.
15+
- Persons with an observation_period_start_date in the future are removed.
16+
- Persons with an observation_period_start_date that occurs after the observation_period_end_date are removed.
17+
- If the observation_period_end_date is a future date it is truncated either to the current date or to the end date of the database.
18+
19+
20+
## Reading from OBSERVATION_PERIOD
21+
22+
| Destination Field | Source field | Logic | Comment field |
23+
| --- | --- | --- | --- |
24+
| OBSERVATION_PERIOD_ID | OBSERVATION_PERIOD_ID | - | - |
25+
| PERSON_ID | PERSON_ID | - | - |
26+
| OBSERVATION_PERIOD_START_DATE | OBSERVATION_PERIOD_START_DATE | - | - |
27+
| OBSERVATION_PERIOD_END_DATE | OBSERVATION_PERIOD_END_DATE | - | |
28+
| PERIOD_TYPE_CONCEPT_ID | PERIOD_TYPE_CONCEPT_ID | - | - |
29+
30+
31+
## Change Log
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
layout: default
3+
title: Payer Plan Period
4+
nav_order: 5
5+
parent: CDM to CDM
6+
description: "PAYER_PLAN_PERIOD mapping from an existing CDM instance"
7+
---
8+
9+
## Table name: **PAYER_PLAN_PERIOD**
10+
11+
Map the new PAYER_PLAN_PERIOD table from the existing PAYER_PLAN_PERIOD table.
12+
13+
### Reading from **PAYER_PLAN_PERIOD**
14+
15+
| Destination Field | Source field | Logic | Comment field |
16+
| --- | --- | --- | --- |
17+
| payer_plan_period_id | payer_plan_period_id | | |
18+
| person_id | person_id | | |
19+
| payer_plan_period_start_date | payer_plan_period_start_date | | |
20+
| payer_plan_period_end_date |payer_plan_period_end_date | | |
21+
| payer_concept_id | payer_concept_id| | |
22+
| payer_source_value | payer_source_value| | |
23+
| payer_source_concept_id | payer_source_concept_id | | |
24+
| plan_concept_id | plan_concept_id | | |
25+
| plan_source_value | plan_source_value| | |
26+
| plan_source_concept_id | plan_source_concept_id | | |
27+
| sponsor_concept_id | sponsor_concept_id | | |
28+
| sponsor_source_value | sponsor_source_value | | |
29+
| sponsor_source_concept_id | sponsor_source_concept_id | | |
30+
| family_source_value | family_source_value | | |
31+
| stop_reason_concept_id | stop_reason_concept_id | | |
32+
| stop_reason_source_value | stop_reason_source_value| | |
33+
| stop_reason_source_concept_id | stop_reason_source_concept_id | | |
34+
35+
## Change log

docs/CDM_to_CDM/cdm_to_cdm_person.md

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
layout: default
3+
title: Person
4+
nav_order: 1
5+
parent: CDM to CDM
6+
description: "Person mapping from an existing CDM instance"
7+
8+
---
9+
10+
# CDM Table name: PERSON
11+
12+
Map the new PERSON table from the existing PERSON table. The following data quality fixes are employed:
13+
14+
- Any person with an unknown year_of_birth is removed.
15+
- Any person with an implausible year_of_birth is removed.
16+
- Persons with a year_of_birth in the future are removed.
17+
- Persons with a year_of_birth prior to 1875 are removed.
18+
19+
## Reading from PERSON
20+
21+
| Destination Field | Source field | Logic | Comment field |
22+
| --- | --- | :---: | --- |
23+
| person_id | person_id | | |
24+
| gender_concept_id | gender_concept_id | | |
25+
| year_of_birth | year_of_birth | | |
26+
| month_of_birth | month_of_birth | | |
27+
| day_of_birth | day_of_birth | | |
28+
| birth_datetime | birth_datetime | | |
29+
| race_concept_id | race_concept_id | | |
30+
| ethnicity_concept_id | ethnicity_concept_id | | |
31+
| location_id | location_id | | |
32+
| provider_id | provider_id | | |
33+
| care_site_id | care_site_id | | |
34+
| person_source_value | person_source_value | | |
35+
| gender_source_value | gender_source_value | | |
36+
| gender_source_concept_id | gender_source_concept_id | | |
37+
| race_source_value | race_source_value | | |
38+
| race_source_concept_id | race_source_concept_id | | |
39+
| ethnicity_source_value | ethnicity_source_value | | |
40+
41+
## Change log
+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
layout: default
3+
title: Provider
4+
nav_order: 6
5+
parent: CDM to CDM
6+
description: "PROVIDER mapping from an existing CDM instance"
7+
---
8+
9+
## Table name: **PROVIDER**
10+
11+
Map the new PROVIDER table from the existing PROVIDER table.
12+
13+
### Reading from **PROVIDER**
14+
15+
| Destination Field | Source field | Logic | Comment field |
16+
| --- | --- | --- | --- |
17+
| provider_id | provider_id | | |
18+
| provider_name | provider_name | | |
19+
| npi | npi | | |
20+
| dea | dea | | |
21+
| specialty_concept_id |specialty_concept_id | | |
22+
| care_site_id | care_site_id | | |
23+
| year_of_birth |year_of_birth| | |
24+
| gender_concept_id | gender_concept_id | | |
25+
| provider_source_value | provider_source_value | | |
26+
| specialty_source_value | specialty_source_value | | |
27+
| specialty_source_concept_id | specialty_source_concept_id | | |
28+
| gender_source_value | gender_source_value | | |
29+
| gender_source_concept_id | gender_source_concept_id | | |
30+
31+
## Change log

docs/CDM_to_CDM/cdm_to_cdm_stem.md

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
layout: default
3+
title: CDM to CDM to STEM
4+
nav_order: 10
5+
parent: CDM to CDM
6+
has_children: true
7+
description: "STEM table description"
8+
---
9+
10+
## CDM Table: STEM
11+
12+
The STEM table is a staging area where source codes like ICD9 codes will first be mapped to concept_ids. The STEM table itself is an amalgamation of the OMOP event tables to facilitate record movement. This means that all fields present across the OMOP event tables are present in the STEM table. After a record is mapped and staged, the domain of the concept_id dictates which OMOP table (CONDITION_OCCURRENCE, DRUG_EXPOSURE, PROCEDURE_OCCURRENCE, MEASUREMENT, OBSERVATION, DEVICE_EXPOSURE) the record will move to. Please see the STEM → CDM mapping files for a description of which STEM fields move to which STEM tables.
13+
14+
15+
### Fields in the STEM table
16+
17+
| Field |
18+
| --- |
19+
| ID |
20+
| DOMAIN_ID |
21+
| PERSON_ID |
22+
| VISIT_OCCURRENCE_ID |
23+
| PROVIDER_ID |
24+
| START_DATETIME |
25+
| CONCEPT_ID |
26+
| SOURCE_CONCEPT_ID |
27+
| TYPE_CONCEPT_ID |
28+
| OPERATOR_CONCEPT_ID |
29+
| UNIT_CONCEPT_ID |
30+
| UNIT_SOURCE_VALUE |
31+
| START_DATE |
32+
| END_DATE |
33+
| RANGE_HIGH |
34+
| RANGE_LOW |
35+
| VALUE_AS_NUMBER |
36+
| VALUE_AS_STRING |
37+
| VALUE_AS_CONCEPT_ID |
38+
| VALUE_SOURCE_VALUE |
39+
| END_DATETIME |
40+
| VERBATIM_END_DATE |
41+
| DAYS_SUPPLY |
42+
| DOSE_UNIT_SOURCE_VALUE |
43+
| LOT_NUMBER |
44+
| MODIFIER_CONCEPT_ID |
45+
| MODIFIER_SOURCE_VALUE |
46+
| QUANTITY |
47+
| REFILLS |
48+
| ROUTE_CONCEPT_ID |
49+
| ROUTE_SOURCE_VALUE |
50+
| SIG |
51+
| STOP_REASON |
52+
| UNIQUE_DEVICE_ID |
53+
| ANATOMIC_SITE_CONCEPT_ID |
54+
| DISEASE_STATUS_CONCEPT_ID |
55+
| SPECIMEN_SOURCE_ID |
56+
| ANATOMIC_SITE_SOURCE_VALUE |
57+
| DISEASE_STATUS_SOURCE_VALUE |
58+
| CONDITION_STATUS_CONCEPT_ID |
59+
| CONDITION_STATUS_SOURCE_VALUE |
60+
| EVENT_FIELD_CONCEPT_ID |
61+
| EVENT_ID |
62+
| QUALIFIER_CONCEPT_ID |
63+
| QUALIFIER_SOURCE_VALUE |
64+
| SIG |
65+
| SOURCE_VALUE |
66+
| VALUE_AS_DATETIME |
67+
| VISIT_DETAIL_ID |

0 commit comments

Comments
 (0)