Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions docs/cdm53.html
Original file line number Diff line number Diff line change
Expand Up @@ -3817,7 +3817,7 @@ <h3 class="tabset tabset-pills anchored" data-anchor-id="procedure_occurrence">P
No
</td>
<td style="text-align:left;">
No
Yes
</td>
<td style="text-align:left;">
PROVIDER
Expand Down Expand Up @@ -3845,7 +3845,7 @@ <h3 class="tabset tabset-pills anchored" data-anchor-id="procedure_occurrence">P
No
</td>
<td style="text-align:left;">
No
Yes
</td>
<td style="text-align:left;">
VISIT_OCCURRENCE
Expand Down Expand Up @@ -3873,7 +3873,7 @@ <h3 class="tabset tabset-pills anchored" data-anchor-id="procedure_occurrence">P
No
</td>
<td style="text-align:left;">
No
Yes
</td>
<td style="text-align:left;">
VISIT_DETAIL
Expand Down Expand Up @@ -3928,7 +3928,7 @@ <h3 class="tabset tabset-pills anchored" data-anchor-id="procedure_occurrence">P
No
</td>
<td style="text-align:left;">
No
Yes
</td>
<td style="text-align:left;">
CONCEPT
Expand Down Expand Up @@ -6289,9 +6289,10 @@ <h3 class="tabset tabset-pills anchored" data-anchor-id="note_nlp">NOTE_NLP</h3>
No
</td>
<td style="text-align:left;">
No
Yes
</td>
<td style="text-align:left;">
NOTE
</td>
<td style="text-align:left;">
</td>
Expand Down Expand Up @@ -9745,7 +9746,7 @@ <h3 class="tabset tabset-pills anchored" data-anchor-id="condition_era">CONDITIO
No
</td>
<td style="text-align:left;">
No
Yes
</td>
<td style="text-align:left;">
PERSON
Expand Down
4 changes: 2 additions & 2 deletions docs/search.json

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions inst/csv/OMOP_CDMv5.3_Field_Level.csv
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@ procedure_occurrence,procedure_datetime,No,datetime,NA,"If the procedure has a s
procedure_occurrence,procedure_type_concept_id,Yes,integer,"This field can be used to determine the provenance of the Procedure record, as in whether the procedure was from an EHR system, insurance claim, registry, or other sources.","Choose the PROCEDURE_TYPE_CONCEPT_ID that best represents the provenance of the record, for example whether it came from an EHR record or billing claim. If a procedure is recorded as an EHR encounter, the PROCEDURE_TYPE_CONCEPT would be 'EHR encounter record'. [Accepted Concepts](https://athena.ohdsi.org/search-terms/terms?domain=Type+Concept&standardConcept=Standard&page=1&pageSize=15&query=). A more detailed explanation of each Type Concept can be found on the [vocabulary wiki](https://github.com/OHDSI/Vocabulary-v5.0/wiki/Vocab.-TYPE_CONCEPT).",No,Yes,CONCEPT,CONCEPT_ID,Type Concept,NA
procedure_occurrence,modifier_concept_id,No,integer,The modifiers are intended to give additional information about the procedure but as of now the vocabulary is under review.,"It is up to the ETL to choose how to map modifiers if they exist in source data. These concepts are typically distinguished by 'Modifier' concept classes (e.g., 'CPT4 Modifier' as part of the 'CPT4' vocabulary). If there is more than one modifier on a record, one should be chosen that pertains to the procedure rather than provider. [Accepted Concepts](https://athena.ohdsi.org/search-terms/terms?conceptClass=CPT4+Modifier&conceptClass=HCPCS+Modifier&vocabulary=CPT4&vocabulary=HCPCS&standardConcept=Standard&page=1&pageSize=15&query=).",No,Yes,CONCEPT,CONCEPT_ID,NA,NA
procedure_occurrence,quantity,No,integer,"If the quantity value is omitted, a single procedure is assumed.","If a Procedure has a quantity of '0' in the source, this should default to '1' in the ETL. If there is a record in the source it can be assumed the exposure occurred at least once",No,No,NA,NA,NA,NA
procedure_occurrence,provider_id,No,integer,"The provider associated with the procedure record, e.g. the provider who performed the Procedure.","The ETL may need to make a choice as to which PROVIDER_ID to put here. Based on what is available this may or may not be different than the provider associated with the overall VISIT_OCCURRENCE record, for example the admitting vs attending physician on an EHR record.",No,No,PROVIDER,PROVIDER_ID,NA,NA
procedure_occurrence,visit_occurrence_id,No,integer,The visit during which the procedure occurred.,"Depending on the structure of the source data, this may have to be determined based on dates. If a PROCEDURE_DATE occurs within the start and end date of a Visit it is a valid ETL choice to choose the VISIT_OCCURRENCE_ID from the Visit that subsumes it, even if not explicitly stated in the data. While not required, an attempt should be made to locate the VISIT_OCCURRENCE_ID of the PROCEDURE_OCCURRENCE record.",No,No,VISIT_OCCURRENCE,VISIT_OCCURRENCE_ID,NA,NA
procedure_occurrence,visit_detail_id,No,integer,"The VISIT_DETAIL record during which the Procedure occurred. For example, if the Person was in the ICU at the time of the Procedure the VISIT_OCCURRENCE record would reflect the overall hospital stay and the VISIT_DETAIL record would reflect the ICU stay during the hospital visit.",Same rules apply as for the VISIT_OCCURRENCE_ID.,No,No,VISIT_DETAIL,VISIT_DETAIL_ID,NA,NA
procedure_occurrence,provider_id,No,integer,"The provider associated with the procedure record, e.g. the provider who performed the Procedure.","The ETL may need to make a choice as to which PROVIDER_ID to put here. Based on what is available this may or may not be different than the provider associated with the overall VISIT_OCCURRENCE record, for example the admitting vs attending physician on an EHR record.",No,Yes,PROVIDER,PROVIDER_ID,NA,NA
procedure_occurrence,visit_occurrence_id,No,integer,The visit during which the procedure occurred.,"Depending on the structure of the source data, this may have to be determined based on dates. If a PROCEDURE_DATE occurs within the start and end date of a Visit it is a valid ETL choice to choose the VISIT_OCCURRENCE_ID from the Visit that subsumes it, even if not explicitly stated in the data. While not required, an attempt should be made to locate the VISIT_OCCURRENCE_ID of the PROCEDURE_OCCURRENCE record.",No,Yes,VISIT_OCCURRENCE,VISIT_OCCURRENCE_ID,NA,NA
procedure_occurrence,visit_detail_id,No,integer,"The VISIT_DETAIL record during which the Procedure occurred. For example, if the Person was in the ICU at the time of the Procedure the VISIT_OCCURRENCE record would reflect the overall hospital stay and the VISIT_DETAIL record would reflect the ICU stay during the hospital visit.",Same rules apply as for the VISIT_OCCURRENCE_ID.,No,Yes,VISIT_DETAIL,VISIT_DETAIL_ID,NA,NA
procedure_occurrence,procedure_source_value,No,varchar(50),"This field houses the verbatim value from the source data representing the procedure that occurred. For example, this could be an CPT4 or OPCS4 code.",Use this value to look up the source concept id and then map the source concept id to a standard concept id.,No,No,NA,NA,NA,NA
procedure_occurrence,procedure_source_concept_id,No,integer,"This is the concept representing the procedure source value and may not necessarily be standard. This field is discouraged from use in analysis because it is not required to contain Standard Concepts that are used across the OHDSI community, and should only be used when Standard Concepts do not adequately represent the source detail for the Procedure necessary for a given analytic use case. Consider using PROCEDURE_CONCEPT_ID instead to enable standardized analytics that can be consistent across the network.",If the PROCEDURE_SOURCE_VALUE is coded in the source data using an OMOP supported vocabulary put the concept id representing the source value here.,No,No,CONCEPT,CONCEPT_ID,NA,NA
procedure_occurrence,procedure_source_concept_id,No,integer,"This is the concept representing the procedure source value and may not necessarily be standard. This field is discouraged from use in analysis because it is not required to contain Standard Concepts that are used across the OHDSI community, and should only be used when Standard Concepts do not adequately represent the source detail for the Procedure necessary for a given analytic use case. Consider using PROCEDURE_CONCEPT_ID instead to enable standardized analytics that can be consistent across the network.",If the PROCEDURE_SOURCE_VALUE is coded in the source data using an OMOP supported vocabulary put the concept id representing the source value here.,No,Yes,CONCEPT,CONCEPT_ID,NA,NA
procedure_occurrence,modifier_source_value,No,varchar(50),This field houses the verbatim value from the source data representing the modifier code for the procedure that occurred.,The value stored here is mapped to a MODIFIER_CONCEPT_ID.,No,No,NA,NA,NA,NA
device_exposure,device_exposure_id,Yes,integer,The unique key given to records a person's exposure to a foreign physical object or instrument.,Each instance of an exposure to a foreign object or device present in the source data should be assigned this unique key.,Yes,No,NA,NA,NA,NA
device_exposure,person_id,Yes,integer,NA,NA,No,Yes,PERSON,PERSON_ID,NA,NA
Expand Down Expand Up @@ -203,7 +203,7 @@ note,visit_occurrence_id,No,integer,The Visit during which the note was written.
note,visit_detail_id,No,integer,The Visit Detail during which the note was written.,NA,No,Yes,VISIT_DETAIL,VISIT_DETAIL_ID,NA,NA
note,note_source_value,No,varchar(50),NA,The source value mapped to the NOTE_CLASS_CONCEPT_ID.,No,No,NA,NA,NA,NA
note_nlp,note_nlp_id,Yes,integer,A unique identifier for the NLP record.,NA,Yes,No,NA,NA,NA,NA
note_nlp,note_id,Yes,integer,This is the NOTE_ID for the NOTE record the NLP record is associated to.,NA,No,No,NA,NA,NA,NA
note_nlp,note_id,Yes,integer,This is the NOTE_ID for the NOTE record the NLP record is associated to.,NA,No,Yes,NOTE,NOTE_ID,NA,NA
note_nlp,section_concept_id,No,integer,NA,"The SECTION_CONCEPT_ID should be used to represent the note section contained in the NOTE_NLP record. These concepts can be found as parts of document panels and are based on the type of note written, i.e. a discharge summary. These panels can be found as concepts with the relationship 'Subsumes' to CONCEPT_ID [45875957](https://athena.ohdsi.org/search-terms/terms/45875957).",No,Yes,CONCEPT,CONCEPT_ID,NA,NA
note_nlp,snippet,No,varchar(250),A small window of text surrounding the term,NA,No,No,NA,NA,NA,NA
note_nlp,offset,No,varchar(50),Character offset of the extracted term in the input note,NA,No,No,NA,NA,NA,NA
Expand Down Expand Up @@ -334,7 +334,7 @@ dose_era,dose_value,Yes,float,The numeric value of the dosage of the drug_ingred
dose_era,dose_era_start_date,Yes,date,"The date the Person started on the specific dosage, with at least 31 days since any prior exposure.",NA,No,No,NA,NA,NA,NA
dose_era,dose_era_end_date,Yes,date,NA,The date the Person was no longer exposed to the dosage of the specific drug ingredient. An era is ended if there are 31 days or more between dosage records.,No,No,NA,NA,NA,NA
condition_era,condition_era_id,Yes,integer,NA,NA,Yes,No,NA,NA,NA,NA
condition_era,person_id,Yes,integer,NA,NA,No,No,PERSON,PERSON_ID,NA,NA
condition_era,person_id,Yes,integer,NA,NA,No,Yes,PERSON,PERSON_ID,NA,NA
condition_era,condition_concept_id,Yes,integer,The Concept Id representing the Condition.,NA,No,Yes,CONCEPT,CONCEPT_ID,Condition,NA
condition_era,condition_era_start_date,Yes,date,"The start date for the Condition Era
constructed from the individual
Expand Down
6 changes: 6 additions & 0 deletions inst/ddl/5.3/bigquery/OMOPCDM_bigquery_5.3_constraints.sql
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ alter table @cdmDatabaseSchema.procedure_occurrence add constraint fpk_procedure
alter table @cdmDatabaseSchema.procedure_occurrence add constraint fpk_procedure_occurrence_procedure_concept_id foreign key (procedure_concept_id) references @cdmDatabaseSchema.concept (concept_id);
alter table @cdmDatabaseSchema.procedure_occurrence add constraint fpk_procedure_occurrence_procedure_type_concept_id foreign key (procedure_type_concept_id) references @cdmDatabaseSchema.concept (concept_id);
alter table @cdmDatabaseSchema.procedure_occurrence add constraint fpk_procedure_occurrence_modifier_concept_id foreign key (modifier_concept_id) references @cdmDatabaseSchema.concept (concept_id);
alter table @cdmDatabaseSchema.procedure_occurrence add constraint fpk_procedure_occurrence_provider_id foreign key (provider_id) references @cdmDatabaseSchema.provider (provider_id);
alter table @cdmDatabaseSchema.procedure_occurrence add constraint fpk_procedure_occurrence_visit_occurrence_id foreign key (visit_occurrence_id) references @cdmDatabaseSchema.visit_occurrence (visit_occurrence_id);
alter table @cdmDatabaseSchema.procedure_occurrence add constraint fpk_procedure_occurrence_visit_detail_id foreign key (visit_detail_id) references @cdmDatabaseSchema.visit_detail (visit_detail_id);
alter table @cdmDatabaseSchema.procedure_occurrence add constraint fpk_procedure_occurrence_procedure_source_concept_id foreign key (procedure_source_concept_id) references @cdmDatabaseSchema.concept (concept_id);
alter table @cdmDatabaseSchema.device_exposure add constraint fpk_device_exposure_person_id foreign key (person_id) references @cdmDatabaseSchema.person (person_id);
alter table @cdmDatabaseSchema.device_exposure add constraint fpk_device_exposure_device_concept_id foreign key (device_concept_id) references @cdmDatabaseSchema.concept (concept_id);
alter table @cdmDatabaseSchema.device_exposure add constraint fpk_device_exposure_device_type_concept_id foreign key (device_type_concept_id) references @cdmDatabaseSchema.concept (concept_id);
Expand Down Expand Up @@ -89,6 +93,7 @@ alter table @cdmDatabaseSchema.note add constraint fpk_note_language_concept_id
alter table @cdmDatabaseSchema.note add constraint fpk_note_provider_id foreign key (provider_id) references @cdmDatabaseSchema.provider (provider_id);
alter table @cdmDatabaseSchema.note add constraint fpk_note_visit_occurrence_id foreign key (visit_occurrence_id) references @cdmDatabaseSchema.visit_occurrence (visit_occurrence_id);
alter table @cdmDatabaseSchema.note add constraint fpk_note_visit_detail_id foreign key (visit_detail_id) references @cdmDatabaseSchema.visit_detail (visit_detail_id);
alter table @cdmDatabaseSchema.note_nlp add constraint fpk_note_nlp_note_id foreign key (note_id) references @cdmDatabaseSchema.note (note_id);
alter table @cdmDatabaseSchema.note_nlp add constraint fpk_note_nlp_section_concept_id foreign key (section_concept_id) references @cdmDatabaseSchema.concept (concept_id);
alter table @cdmDatabaseSchema.note_nlp add constraint fpk_note_nlp_note_nlp_concept_id foreign key (note_nlp_concept_id) references @cdmDatabaseSchema.concept (concept_id);
alter table @cdmDatabaseSchema.note_nlp add constraint fpk_note_nlp_note_nlp_source_concept_id foreign key (note_nlp_source_concept_id) references @cdmDatabaseSchema.concept (concept_id);
Expand Down Expand Up @@ -127,6 +132,7 @@ alter table @cdmDatabaseSchema.drug_era add constraint fpk_drug_era_drug_concept
alter table @cdmDatabaseSchema.dose_era add constraint fpk_dose_era_person_id foreign key (person_id) references @cdmDatabaseSchema.person (person_id);
alter table @cdmDatabaseSchema.dose_era add constraint fpk_dose_era_drug_concept_id foreign key (drug_concept_id) references @cdmDatabaseSchema.concept (concept_id);
alter table @cdmDatabaseSchema.dose_era add constraint fpk_dose_era_unit_concept_id foreign key (unit_concept_id) references @cdmDatabaseSchema.concept (concept_id);
alter table @cdmDatabaseSchema.condition_era add constraint fpk_condition_era_person_id foreign key (person_id) references @cdmDatabaseSchema.person (person_id);
alter table @cdmDatabaseSchema.condition_era add constraint fpk_condition_era_condition_concept_id foreign key (condition_concept_id) references @cdmDatabaseSchema.concept (concept_id);
alter table @cdmDatabaseSchema.metadata add constraint fpk_metadata_metadata_concept_id foreign key (metadata_concept_id) references @cdmDatabaseSchema.concept (concept_id);
alter table @cdmDatabaseSchema.metadata add constraint fpk_metadata_metadata_type_concept_id foreign key (metadata_type_concept_id) references @cdmDatabaseSchema.concept (concept_id);
Expand Down
6 changes: 6 additions & 0 deletions inst/ddl/5.3/duckdb/OMOPCDM_duckdb_5.3_constraints.sql
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ ALTER TABLE @cdmDatabaseSchema.procedure_occurrence ADD CONSTRAINT fpk_procedure
ALTER TABLE @cdmDatabaseSchema.procedure_occurrence ADD CONSTRAINT fpk_procedure_occurrence_procedure_concept_id FOREIGN KEY (procedure_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.procedure_occurrence ADD CONSTRAINT fpk_procedure_occurrence_procedure_type_concept_id FOREIGN KEY (procedure_type_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.procedure_occurrence ADD CONSTRAINT fpk_procedure_occurrence_modifier_concept_id FOREIGN KEY (modifier_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.procedure_occurrence ADD CONSTRAINT fpk_procedure_occurrence_provider_id FOREIGN KEY (provider_id) REFERENCES @cdmDatabaseSchema.PROVIDER (PROVIDER_ID);
ALTER TABLE @cdmDatabaseSchema.procedure_occurrence ADD CONSTRAINT fpk_procedure_occurrence_visit_occurrence_id FOREIGN KEY (visit_occurrence_id) REFERENCES @cdmDatabaseSchema.VISIT_OCCURRENCE (VISIT_OCCURRENCE_ID);
ALTER TABLE @cdmDatabaseSchema.procedure_occurrence ADD CONSTRAINT fpk_procedure_occurrence_visit_detail_id FOREIGN KEY (visit_detail_id) REFERENCES @cdmDatabaseSchema.VISIT_DETAIL (VISIT_DETAIL_ID);
ALTER TABLE @cdmDatabaseSchema.procedure_occurrence ADD CONSTRAINT fpk_procedure_occurrence_procedure_source_concept_id FOREIGN KEY (procedure_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.device_exposure ADD CONSTRAINT fpk_device_exposure_person_id FOREIGN KEY (person_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID);
ALTER TABLE @cdmDatabaseSchema.device_exposure ADD CONSTRAINT fpk_device_exposure_device_concept_id FOREIGN KEY (device_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.device_exposure ADD CONSTRAINT fpk_device_exposure_device_type_concept_id FOREIGN KEY (device_type_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
Expand Down Expand Up @@ -89,6 +93,7 @@ ALTER TABLE @cdmDatabaseSchema.note ADD CONSTRAINT fpk_note_language_concept_id
ALTER TABLE @cdmDatabaseSchema.note ADD CONSTRAINT fpk_note_provider_id FOREIGN KEY (provider_id) REFERENCES @cdmDatabaseSchema.PROVIDER (PROVIDER_ID);
ALTER TABLE @cdmDatabaseSchema.note ADD CONSTRAINT fpk_note_visit_occurrence_id FOREIGN KEY (visit_occurrence_id) REFERENCES @cdmDatabaseSchema.VISIT_OCCURRENCE (VISIT_OCCURRENCE_ID);
ALTER TABLE @cdmDatabaseSchema.note ADD CONSTRAINT fpk_note_visit_detail_id FOREIGN KEY (visit_detail_id) REFERENCES @cdmDatabaseSchema.VISIT_DETAIL (VISIT_DETAIL_ID);
ALTER TABLE @cdmDatabaseSchema.note_nlp ADD CONSTRAINT fpk_note_nlp_note_id FOREIGN KEY (note_id) REFERENCES @cdmDatabaseSchema.NOTE (NOTE_ID);
ALTER TABLE @cdmDatabaseSchema.note_nlp ADD CONSTRAINT fpk_note_nlp_section_concept_id FOREIGN KEY (section_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.note_nlp ADD CONSTRAINT fpk_note_nlp_note_nlp_concept_id FOREIGN KEY (note_nlp_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.note_nlp ADD CONSTRAINT fpk_note_nlp_note_nlp_source_concept_id FOREIGN KEY (note_nlp_source_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
Expand Down Expand Up @@ -127,6 +132,7 @@ ALTER TABLE @cdmDatabaseSchema.drug_era ADD CONSTRAINT fpk_drug_era_drug_concept
ALTER TABLE @cdmDatabaseSchema.dose_era ADD CONSTRAINT fpk_dose_era_person_id FOREIGN KEY (person_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID);
ALTER TABLE @cdmDatabaseSchema.dose_era ADD CONSTRAINT fpk_dose_era_drug_concept_id FOREIGN KEY (drug_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.dose_era ADD CONSTRAINT fpk_dose_era_unit_concept_id FOREIGN KEY (unit_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.condition_era ADD CONSTRAINT fpk_condition_era_person_id FOREIGN KEY (person_id) REFERENCES @cdmDatabaseSchema.PERSON (PERSON_ID);
ALTER TABLE @cdmDatabaseSchema.condition_era ADD CONSTRAINT fpk_condition_era_condition_concept_id FOREIGN KEY (condition_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.metadata ADD CONSTRAINT fpk_metadata_metadata_concept_id FOREIGN KEY (metadata_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
ALTER TABLE @cdmDatabaseSchema.metadata ADD CONSTRAINT fpk_metadata_metadata_type_concept_id FOREIGN KEY (metadata_type_concept_id) REFERENCES @cdmDatabaseSchema.CONCEPT (CONCEPT_ID);
Expand Down
Loading