Skip to content

Commit 589855f

Browse files
CDM v5.3.1 updates
1 parent 8c6859f commit 589855f

26 files changed

Lines changed: 764 additions & 721 deletions

BigQuery/OMOP CDM bigquery ddl.txt

Lines changed: 48 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/*OMOP CDM v5.3.1 14June2018*/
12
#standardsql
23
create table concept (
34
concept_id INT64 not null ,
@@ -9,7 +10,7 @@ create table concept (
910
concept_code STRING not null ,
1011
valid_start_DATE DATE not null ,
1112
valid_end_DATE DATE not null ,
12-
invalid_reason STRING
13+
invalid_reason STRING
1314
)
1415
;
1516

@@ -46,7 +47,7 @@ create table concept_relationship (
4647
relationship_id STRING not null,
4748
valid_start_DATE DATE not null,
4849
valid_end_DATE DATE not null,
49-
invalid_reason STRING
50+
invalid_reason STRING
5051
)
5152
;
5253

@@ -88,7 +89,7 @@ create table source_to_concept_map (
8889
target_vocabulary_id STRING not null,
8990
valid_start_DATE DATE not null,
9091
valid_end_DATE DATE not null,
91-
invalid_reason STRING
92+
invalid_reason STRING
9293
)
9394
;
9495

@@ -107,7 +108,7 @@ create table drug_strength (
107108
box_size INT64 ,
108109
valid_start_DATE DATE not null,
109110
valid_end_DATE DATE not null,
110-
invalid_reason STRING
111+
invalid_reason STRING
111112
)
112113
;
113114

@@ -120,7 +121,7 @@ create table cohort_definition (
120121
definition_type_concept_id INT64 not null,
121122
cohort_definition_syntax STRING ,
122123
subject_concept_id INT64 not null,
123-
cohort_initiation_DATE DATE
124+
cohort_initiation_DATE DATE
124125
)
125126
;
126127

@@ -130,7 +131,7 @@ create table attribute_definition (
130131
attribute_name STRING not null,
131132
attribute_description STRING ,
132133
attribute_type_concept_id INT64 not null,
133-
attribute_syntax STRING
134+
attribute_syntax STRING
134135
)
135136
;
136137

@@ -146,7 +147,7 @@ create table cdm_source
146147
source_release_DATE DATE ,
147148
cdm_release_DATE DATE ,
148149
cdm_version STRING ,
149-
vocabulary_version STRING
150+
vocabulary_version STRING
150151
)
151152
;
152153

@@ -159,7 +160,7 @@ create table metadata
159160
value_as_string STRING ,
160161
value_as_concept_id INT64 ,
161162
metadata_DATE DATE ,
162-
metadata_DATETIME DATETIME
163+
metadata_DATETIME DATETIME
163164
)
164165
;
165166

@@ -185,7 +186,7 @@ create table person
185186
race_source_value STRING ,
186187
race_source_concept_id INT64 ,
187188
ethnicity_source_value STRING ,
188-
ethnicity_source_concept_id INT64
189+
ethnicity_source_concept_id INT64
189190
)
190191
;
191192

@@ -219,7 +220,7 @@ create table specimen
219220
specimen_source_value STRING ,
220221
unit_source_value STRING ,
221222
anatomic_site_source_value STRING ,
222-
disease_status_source_value STRING
223+
disease_status_source_value STRING
223224
)
224225
;
225226

@@ -233,7 +234,7 @@ create table death
233234
death_type_concept_id INT64 not null ,
234235
cause_concept_id INT64 ,
235236
cause_source_value STRING ,
236-
cause_source_concept_id INT64
237+
cause_source_concept_id INT64
237238
)
238239
;
239240

@@ -257,33 +258,33 @@ create table visit_occurrence
257258
admitting_source_value STRING ,
258259
discharge_to_concept_id INT64 ,
259260
discharge_to_source_value STRING ,
260-
preceding_visit_occurrence_id INT64
261+
preceding_visit_occurrence_id INT64
261262
)
262263
;
263264

264265

265266
--HINT DISTRIBUTE_ON_KEY(person_id)
266267
create table visit_detail
267268
(
268-
visit_detail_id INT64 not null ,
269-
person_id INT64 not null ,
270-
visit_detail_concept_id INT64 not null ,
271-
visit_start_DATE DATE not null ,
272-
visit_start_DATETIME DATETIME ,
273-
visit_end_DATE DATE not null ,
274-
visit_end_DATETIME DATETIME ,
275-
visit_type_concept_id INT64 not null ,
276-
provider_id INT64 ,
277-
care_site_id INT64 ,
278-
admitting_source_concept_id INT64 ,
279-
discharge_to_concept_id INT64 ,
280-
preceding_visit_detail_id INT64 ,
281-
visit_source_value STRING ,
282-
visit_source_concept_id INT64 ,
283-
admitting_source_value STRING ,
284-
discharge_to_source_value STRING ,
285-
visit_detail_parent_id INT64 ,
286-
visit_occurrence_id INT64 not null
269+
visit_detail_id INT64 not null ,
270+
person_id INT64 not null ,
271+
visit_detail_concept_id INT64 not null ,
272+
visit_detail_start_DATE DATE not null ,
273+
visit_detail_start_DATETIME DATETIME ,
274+
visit_detail_end_DATE DATE not null ,
275+
visit_detail_end_DATETIME DATETIME ,
276+
visit_deatil_type_concept_id INT64 not null ,
277+
provider_id INT64 ,
278+
care_site_id INT64 ,
279+
admitting_source_concept_id INT64 ,
280+
discharge_to_concept_id INT64 ,
281+
preceding_visit_detail_id INT64 ,
282+
visit_detail_source_value STRING ,
283+
visit_deatil_source_concept_id INT64 ,
284+
admitting_source_value STRING ,
285+
discharge_to_source_value STRING ,
286+
visit_detail_parent_id INT64 ,
287+
visit_occurrence_id INT64 not null
287288
)
288289
;
289290

@@ -304,7 +305,7 @@ create table procedure_occurrence
304305
visit_detail_id INT64 ,
305306
procedure_source_value STRING ,
306307
procedure_source_concept_id INT64 ,
307-
modifier_source_value STRING
308+
modifier_source_value STRING
308309
)
309310
;
310311

@@ -334,7 +335,7 @@ create table drug_exposure
334335
drug_source_value STRING ,
335336
drug_source_concept_id INT64 ,
336337
route_source_value STRING ,
337-
dose_unit_source_value STRING
338+
dose_unit_source_value STRING
338339
)
339340
;
340341

@@ -356,7 +357,7 @@ create table device_exposure
356357
visit_occurrence_id INT64 ,
357358
visit_detail_id INT64 ,
358359
device_source_value STRING ,
359-
device_source_concept_id INT64
360+
device_source_concept_id INT64
360361
)
361362
;
362363

@@ -379,7 +380,7 @@ create table condition_occurrence
379380
condition_source_value STRING ,
380381
condition_source_concept_id INT64 ,
381382
condition_status_source_value STRING ,
382-
condition_status_concept_id INT64
383+
condition_status_concept_id INT64
383384
)
384385
;
385386

@@ -406,7 +407,7 @@ create table measurement
406407
measurement_source_value STRING ,
407408
measurement_source_concept_id INT64 ,
408409
unit_source_value STRING ,
409-
value_source_value STRING
410+
value_source_value STRING
410411
)
411412
;
412413

@@ -427,7 +428,7 @@ create table note
427428
provider_id INT64 ,
428429
visit_occurrence_id INT64 ,
429430
visit_detail_id INT64 ,
430-
note_source_value STRING
431+
note_source_value STRING
431432
)
432433
;
433434

@@ -448,7 +449,7 @@ create table note_nlp
448449
nlp_DATETIME DATETIME ,
449450
term_exists STRING ,
450451
term_temporal STRING ,
451-
term_modifiers STRING
452+
term_modifiers STRING
452453
)
453454
;
454455

@@ -473,7 +474,7 @@ create table observation
473474
observation_source_value STRING ,
474475
observation_source_concept_id INT64 ,
475476
unit_source_value STRING ,
476-
qualifier_source_value STRING
477+
qualifier_source_value STRING
477478
)
478479
;
479480

@@ -498,7 +499,7 @@ create table location
498499
state STRING ,
499500
zip STRING ,
500501
county STRING ,
501-
location_source_value STRING
502+
location_source_value STRING
502503
)
503504
;
504505

@@ -510,7 +511,7 @@ create table care_site
510511
place_of_service_concept_id INT64 ,
511512
location_id INT64 ,
512513
care_site_source_value STRING ,
513-
place_of_service_source_value STRING
514+
place_of_service_source_value STRING
514515
)
515516
;
516517

@@ -529,7 +530,7 @@ create table provider
529530
specialty_source_value STRING ,
530531
specialty_source_concept_id INT64 ,
531532
gender_source_value STRING ,
532-
gender_source_concept_id INT64
533+
gender_source_concept_id INT64
533534
)
534535
;
535536

@@ -553,7 +554,7 @@ create table payer_plan_period
553554
family_source_value STRING ,
554555
stop_reason_concept_id INT64 ,
555556
stop_reason_source_value STRING ,
556-
stop_reason_source_concept_id INT64
557+
stop_reason_source_concept_id INT64
557558
)
558559
;
559560

@@ -581,7 +582,7 @@ create table cost
581582
revenue_code_concept_id INT64 ,
582583
revenue_code_source_value STRING ,
583584
drg_concept_id INT64 ,
584-
drg_source_value STRING
585+
drg_source_value STRING
585586
)
586587
;
587588

@@ -606,7 +607,7 @@ create table cohort_attribute
606607
cohort_end_DATE DATE not null ,
607608
attribute_definition_id INT64 not null ,
608609
value_as_number FLOAT64 ,
609-
value_as_concept_id INT64
610+
value_as_concept_id INT64
610611
)
611612
;
612613

@@ -620,7 +621,7 @@ create table drug_era
620621
drug_era_start_DATE DATE not null ,
621622
drug_era_end_DATE DATE not null ,
622623
drug_exposure_count INT64 ,
623-
gap_days INT64
624+
gap_days INT64
624625
)
625626
;
626627

@@ -647,6 +648,6 @@ create table condition_era
647648
condition_concept_id INT64 not null ,
648649
condition_era_start_DATE DATE not null ,
649650
condition_era_end_DATE DATE not null ,
650-
condition_occurrence_count INT64
651+
condition_occurrence_count INT64
651652
)
652653
;

Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/CONDITION_OCCURRENCE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ Field|Required|Type|Description
1616
| stop_reason | No | varchar(20) | The reason that the condition was no longer present, as indicated in the source data. |
1717
| provider_id | No | integer | A foreign key to the Provider in the PROVIDER table who was responsible for capturing (diagnosing) the Condition. |
1818
| visit_occurrence_id | No | integer | A foreign key to the visit in the VISIT_OCCURRENCE table during which the Condition was determined (diagnosed). |
19-
| visit_detail_id | No | integer | A foreign key to the visit in the VISIT_DETAIL table during which the Condition was determined (diagnosed). | visit_detail_id | No | integer | A foreign key to the visit in the VISIT_DETAIL table during which the Condition was determined (diagnosed). |
19+
| visit_detail_id | No | integer | A foreign key to the visit in the VISIT_DETAIL table during which the Condition was determined (diagnosed). |
2020
| condition_source_value | No | varchar(50) | The source code for the condition as it appears in the source data. This code is mapped to a standard condition concept in the Standardized Vocabularies and the original code is stored here for reference. |
2121
| condition_source_concept_id | No | integer | A foreign key to a Condition Concept that refers to the code used in the source. |
22-
| condition_status_source_value | No | varchar(50) | The source code for the condition status as it appears in the source data. |
23-
| condition_status_concept_id | No | integer | A foreign key to the predefined Concept in the Standard Vocabulary reflecting the condition status | |
22+
| condition_status_source_value | No | varchar(50) | The source code for the condition status as it appears in the source data. |
23+
| condition_status_concept_id | No | integer | A foreign key to the predefined Concept in the Standard Vocabulary reflecting the condition status |
2424

2525
### Conventions
2626

Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/DEVICE_EXPOSURE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Field|Required|Type|Description
1616
|visit_occurrence_id|No|integer|A foreign key to the visit in the VISIT_OCCURRENCE table during which the device was used.|
1717
|visit_detail_id|No|integer|A foreign key to the visit detail in the VISIT_DETAIL table during which the Drug Exposure was initiated.|
1818
|device_source_value|No|varchar(50)|The source code for the Device as it appears in the source data. This code is mapped to a standard Device Concept in the Standardized Vocabularies and the original code is stored here for reference.|
19-
|device_source_ concept_id|No|integer|A foreign key to a Device Concept that refers to the code used in the source.|
19+
|device_source_concept_id|No|integer|A foreign key to a Device Concept that refers to the code used in the source.|
2020

2121
### Conventions
2222

Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/NOTE_NLP.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ note_nlp_concept_id | No | integer | A foreign key to the predefined Concept i
1212
note_nlp_source_concept_id | No | integer | A foreign key to a Concept that refers to the code in the source vocabulary used by the NLP system
1313
nlp_system | No | varchar(250) | Name and version of the NLP system that extracted the term.Useful for data provenance.
1414
nlp_date | Yes | date | The date of the note processing.Useful for data provenance.
15-
nlp_date_time | No | datetime | The date and time of the note processing. Useful for data provenance.
16-
term_exists | No | varchar(1) | A summary modifier that signifies presence or absence of the term for a given patient. Useful for quick querying. *
15+
nlp_datetime | No | datetime | The date and time of the note processing. Useful for data provenance.
16+
term_exists | No | varchar(1) | A summary modifier that signifies presence or absence of the term for a given patient. Useful for quick querying.
1717
term_temporal | No | varchar(50) | An optional time modifier associated with the extracted term. (for now “past” or “present” only). Standardize it later.
1818
term_modifiers | No | varchar(2000) | A compact description of all the modifiers of the specific term extracted by the NLP system. (e.g. “son has rash” ? “negated=no,subject=family, certainty=undef,conditional=false,general=false”).
1919

Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/Standardized-Clinical-Data-Tables.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
[SPECIMEN](https://github.com/OHDSI/CommonDataModel/wiki/SPECIMEN)
44
[DEATH](https://github.com/OHDSI/CommonDataModel/wiki/DEATH)
55
[VISIT_OCCURRENCE](https://github.com/OHDSI/CommonDataModel/wiki/VISIT_OCCURRENCE)
6+
[VISIT_DETAIL](https://github.com/OHDSI/CommonDataModel/wiki/VISIT_DETAIL)
67
[PROCEDURE_OCCURRENCE](https://github.com/OHDSI/CommonDataModel/wiki/PROCEDURE_OCCURRENCE)
78
[DRUG_EXPOSURE](https://github.com/OHDSI/CommonDataModel/wiki/DRUG_EXPOSURE)
89
[DEVICE_EXPOSURE](https://github.com/OHDSI/CommonDataModel/wiki/DEVICE_EXPOSURE)

Documentation/CommonDataModel_Wiki_Files/StandardizedMetadata/CDM_SOURCE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Field|Required|Type|Description
77
|cdm_holder|No|varchar(255)|The name of the organization responsible for the development of the CDM instance|
88
|source_description|No|CLOB|A description of the source data origin and purpose for collection. The description may contain a summary of the period of time that is expected to be covered by this dataset.|
99
|source_documentation_reference|No|varchar(255)|URL or other external reference to location of source documentation|
10-
|cdm_etl _reference|No|varchar(255)|URL or other external reference to location of ETL specification documentation and ETL source code|
10+
|cdm_etl_reference|No|varchar(255)|URL or other external reference to location of ETL specification documentation and ETL source code|
1111
|source_release_date|No|date|The date for which the source data are most current, such as the last day of data capture|
1212
|cdm_release_date|No|date|The date when the CDM was instantiated|
1313
|cdm_version|No|varchar(10)|The version of CDM used|

Documentation/CommonDataModel_Wiki_Files/StandardizedVocabularies/ATTRIBUTE_DEFINITION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
The ATTRIBUTE_DEFINITION table contains records defining Attributes, or covariates, to members of a Cohort through an associated description and syntax and upon instantiation (execution of the algorithm) placed into the COHORT_ATTRIBUTE table. Attributes are derived elements that can be selected or calculated for a subject in a Cohort. The ATTRIBUTE_DEFINITION table provides a standardized structure for maintaining the rules governing the calculation of covariates for a subject in a Cohort, and can store operational programming code to instantiate the Attributes for a given Cohort within the OMOP Common Data Model.
22

33
Field|Required|Type|Description
4-
:-------------------------|:--------|:-----|:--------------------------------------
4+
:-------------------------|:------|:--------------|:--------------------------------------
55
|attribute_definition_id|Yes|integer|A unique identifier for each Attribute.|
66
|attribute_name|Yes|varchar(255)|A short description of the Attribute.|
77
|attribute_description|No|varchar(MAX)|A complete description of the Attribute definition|

Documentation/CommonDataModel_Wiki_Files/StandardizedVocabularies/COHORT_DEFINITION.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
The COHORT_DEFINITION table contains records defining a Cohort derived from the data through the associated description and syntax and upon instantiation (execution of the algorithm) placed into the COHORT table. Cohorts are a set of subjects that satisfy a given combination of inclusion criteria for a duration of time. The COHORT_DEFINITION table provides a standardized structure for maintaining the rules governing the inclusion of a subject into a cohort, and can store operational programming code to instantiate the cohort within the OMOP Common Data Model.
22

33
Field|Required|Type|Description
4-
:------------------------------|:--------|:-----|:-----------------------------------------------
4+
:------------------------------|:--------|:--------------|:-----------------------------------------------
55
|cohort_definition_id|Yes|integer|A unique identifier for each Cohort.|
66
|cohort_definition_name|Yes|varchar(255)|A short description of the Cohort.|
77
|cohort_definition_description|No|varchar(MAX)|A complete description of the Cohort definition|
88
|definition_type_concept_id|Yes|integer|Type defining what kind of Cohort Definition the record represents and how the syntax may be executed|
99
|cohort_definition_syntax|No|varchar(MAX)|Syntax or code to operationalize the Cohort definition|
1010
|subject_concept_id|Yes|integer|A foreign key to the Concept to which defines the domain of subjects that are members of the cohort (e.g., Person, Provider, Visit).|
11-
|cohort_initiation_date|No|Date|A date to indicate when the Cohort was instantiated in the COHORT table|
11+
|cohort_initiation_date|No|Date|A date to indicate when the Cohort was initiated in the COHORT table|
1212

1313
### Conventions
1414
* The cohort_definition_syntax does not prescribe any specific syntax or programming language. Typically, it would be any flavor SQL, a cohort definition language, or a free-text description of the algorithm.

Documentation/CommonDataModel_Wiki_Files/StandardizedVocabularies/CONCEPT_SYNONYM.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The CONCEPT_SYNONYM table is used to store alternate names and descriptions for Concepts.
22

3-
|Field|Required|Type|Description|
3+
Field|Required|Type|Description
44
:---------------------|:---------|:------------|:------------------------
55
|concept_id|Yes|Integer|A foreign key to the Concept in the CONCEPT table.|
66
|concept_synonym_name|Yes|varchar(1000)|The alternative name for the Concept.|

0 commit comments

Comments
 (0)