From 778f33be2f7f3d52f70f9de00cf2bef4c04321b2 Mon Sep 17 00:00:00 2001 From: Chen-Yang Su Date: Thu, 19 Nov 2026 18:16:34 -0800 Subject: [PATCH] Fix dead links and anchors in the documentation Four links return 404 because their targets moved: - faq.qmd: CodeExcerpts/DerivedTables was removed; the era scripts now live on the SQL Scripts page (sqlScripts.html#era-tables). - indices-primary-foreign.qmd: there is no v5.4 branch or tag; point the CSV and Redshift DDL links at main/inst/. - cdm54erd.qmd: the printable ERD moved from rmd/images to site/man/images. The Quarto migration changed heading anchors to lowercase, hyphenated ids, so these links open the right page but not the right section: - sqlScripts.html#drug_eras / #condition_eras (DRUG_ERA and CONDITION_ERA table descriptions, v5.3-v5.5) and #Source_to_Standard. - dataModelConventions.html#concept_relationships (v5.3-v5.5 field specs). - cdm54.html#CONDITION_ERA etc. in the FAQ (upper case; one also misspelled CONDITION_OCCURENCE) and #Standardized-Vocabularies -> #vocabulary-tables. - cdm531.html is now a stub that points to cdm53.html, so its #death, #payer_plan_period, #condition_era and #observation anchors moved there. Re-rendered the affected pages and kept only the link changes in docs/. --- docs/cdm53.html | 8 ++++---- docs/cdm54.html | 6 +++--- docs/cdm54erd.html | 2 +- docs/cdm55.html | 6 +++--- docs/cdm60.html | 2 +- docs/customConcepts.html | 2 +- docs/faq.html | 8 ++++---- docs/indices-primary-foreign.html | 4 ++-- inst/csv/OMOP_CDMv5.3_Field_Level.csv | 2 +- inst/csv/OMOP_CDMv5.3_Table_Level.csv | 6 +++--- inst/csv/OMOP_CDMv5.4_Field_Level.csv | 2 +- inst/csv/OMOP_CDMv5.4_Table_Level.csv | 4 ++-- inst/csv/OMOP_CDMv5.5_Field_Level.csv | 2 +- inst/csv/OMOP_CDMv5.5_Table_Level.csv | 4 ++-- site/cdm54erd.qmd | 2 +- site/cdm60.qmd | 2 +- site/customConcepts.qmd | 2 +- site/faq.qmd | 8 ++++---- site/indices-primary-foreign.qmd | 4 ++-- 19 files changed, 38 insertions(+), 38 deletions(-) diff --git a/docs/cdm53.html b/docs/cdm53.html index d70d08d1..31dba099 100644 --- a/docs/cdm53.html +++ b/docs/cdm53.html @@ -2388,7 +2388,7 @@

C

Table Description

This table contains records of Events of a Person suggesting the presence of a disease or medical condition stated as a diagnosis, a sign, or a symptom, which is either observed by a Provider or reported by the patient.

User Guide

-

Conditions are defined by Concepts from the Condition domain, which form a complex hierarchy. As a result, the same Person with the same disease may have multiple Condition records, which belong to the same hierarchical family. Most Condition records are mapped from diagnostic codes, but recorded signs, symptoms and summary descriptions also contribute to this table. Rule out diagnoses should not be recorded in this table, but in reality their negating nature is not always captured in the source data, and other precautions must be taken when when identifying Persons who should suffer from the recorded Condition. Record all conditions as they exist in the source data. Any decisions about diagnosis/phenotype definitions would be done through cohort specifications. These cohorts can be housed in the COHORT table. Conditions span a time interval from start to end, but are typically recorded as single snapshot records with no end date. The reason is twofold: (i) At the time of the recording the duration is not known and later not recorded, and (ii) the Persons typically cease interacting with the healthcare system when they feel better, which leads to incomplete capture of resolved Conditions. The CONDITION_ERA table addresses this issue. Family history and past diagnoses (‘history of’) are not recorded in this table. Instead, they are listed in the OBSERVATION table. Codes written in the process of establishing the diagnosis, such as ‘question of’ of and ‘rule out’, should not represented here. Instead, they should be recorded in the OBSERVATION table, if they are used for analyses. However, this information is not always available.

+

Conditions are defined by Concepts from the Condition domain, which form a complex hierarchy. As a result, the same Person with the same disease may have multiple Condition records, which belong to the same hierarchical family. Most Condition records are mapped from diagnostic codes, but recorded signs, symptoms and summary descriptions also contribute to this table. Rule out diagnoses should not be recorded in this table, but in reality their negating nature is not always captured in the source data, and other precautions must be taken when when identifying Persons who should suffer from the recorded Condition. Record all conditions as they exist in the source data. Any decisions about diagnosis/phenotype definitions would be done through cohort specifications. These cohorts can be housed in the COHORT table. Conditions span a time interval from start to end, but are typically recorded as single snapshot records with no end date. The reason is twofold: (i) At the time of the recording the duration is not known and later not recorded, and (ii) the Persons typically cease interacting with the healthcare system when they feel better, which leads to incomplete capture of resolved Conditions. The CONDITION_ERA table addresses this issue. Family history and past diagnoses (‘history of’) are not recorded in this table. Instead, they are listed in the OBSERVATION table. Codes written in the process of establishing the diagnosis, such as ‘question of’ of and ‘rule out’, should not represented here. Instead, they should be recorded in the OBSERVATION table, if they are used for analyses. However, this information is not always available.

ETL Conventions

Source codes and source text fields mapped to Standard Concepts of the Condition Domain have to be recorded here.

@@ -9212,7 +9212,7 @@

DRUG_ERA

Table Description

A Drug Era is defined as a span of time when the Person is assumed to be exposed to a particular active ingredient. A Drug Era is not the same as a Drug Exposure: Exposures are individual records corresponding to the source when Drug was delivered to the Person, while successive periods of Drug Exposures are combined under certain rules to produce continuous Drug Eras. Every record in the DRUG_EXPOSURE table should be part of a drug era based on the dates of exposure.

ETL Conventions

-

The SQL script for generating DRUG_ERA records can be found here.

+

The SQL script for generating DRUG_ERA records can be found here.

@@ -9668,7 +9668,7 @@

CONDITIO
  • It allows aggregation of multiple, closely timed doctor visits for the same Condition to avoid double-counting the Condition Occurrences. For example, consider a Person who visits her Primary Care Physician (PCP) and who is referred to a specialist. At a later time, the Person visits the specialist, who confirms the PCP’s original diagnosis and provides the appropriate treatment to resolve the condition. These two independent doctor visits should be aggregated into one Condition Era.
  • ETL Conventions

    -

    Each Condition Era corresponds to one or many Condition Occurrence records that form a continuous interval. The condition_concept_id field contains Concepts that are identical to those of the CONDITION_OCCURRENCE table records that make up the Condition Era. In contrast to Drug Eras, Condition Eras are not aggregated to contain Conditions of different hierarchical layers. The SQl Script for generating CONDITION_ERA records can be found here The Condition Era Start Date is the start date of the first Condition Occurrence. The Condition Era End Date is the end date of the last Condition Occurrence. Condition Eras are built with a Persistence Window of 30 days, meaning, if no occurrence of the same condition_concept_id happens within 30 days of any one occurrence, it will be considered the condition_era_end_date.

    +

    Each Condition Era corresponds to one or many Condition Occurrence records that form a continuous interval. The condition_concept_id field contains Concepts that are identical to those of the CONDITION_OCCURRENCE table records that make up the Condition Era. In contrast to Drug Eras, Condition Eras are not aggregated to contain Conditions of different hierarchical layers. The SQl Script for generating CONDITION_ERA records can be found here The Condition Era Start Date is the start date of the first Condition Occurrence. The Condition Era End Date is the end date of the last Condition Occurrence. Condition Eras are built with a Persistence Window of 30 days, meaning, if no occurrence of the same condition_concept_id happens within 30 days of any one occurrence, it will be considered the condition_era_end_date.

    @@ -11203,7 +11203,7 @@

    C relationship_id

    diff --git a/docs/cdm54.html b/docs/cdm54.html index 7441102d..36cb06b0 100644 --- a/docs/cdm54.html +++ b/docs/cdm54.html @@ -9779,7 +9779,7 @@

    DRUG_ERA

    Table Description

    A Drug Era is defined as a span of time when the Person is assumed to be exposed to a particular active ingredient. A Drug Era is not the same as a Drug Exposure: Exposures are individual records corresponding to the source when Drug was delivered to the Person, while successive periods of Drug Exposures are combined under certain rules to produce continuous Drug Eras. Every record in the DRUG_EXPOSURE table should be part of a drug era based on the dates of exposure.

    ETL Conventions

    -

    The SQL script for generating DRUG_ERA records can be found here.

    +

    The SQL script for generating DRUG_ERA records can be found here.

    -The relationship between CONCEPT_ID_1 and CONCEPT_ID_2. Please see the Vocabulary Conventions. for more information. +The relationship between CONCEPT_ID_1 and CONCEPT_ID_2. Please see the Vocabulary Conventions. for more information.
    @@ -10235,7 +10235,7 @@

    CONDITIO
  • It allows aggregation of multiple, closely timed doctor visits for the same Condition to avoid double-counting the Condition Occurrences. For example, consider a Person who visits her Primary Care Physician (PCP) and who is referred to a specialist. At a later time, the Person visits the specialist, who confirms the PCP’s original diagnosis and provides the appropriate treatment to resolve the condition. These two independent doctor visits should be aggregated into one Condition Era.
  • ETL Conventions

    -

    Each Condition Era corresponds to one or many Condition Occurrence records that form a continuous interval. The condition_concept_id field contains Concepts that are identical to those of the CONDITION_OCCURRENCE table records that make up the Condition Era. In contrast to Drug Eras, Condition Eras are not aggregated to contain Conditions of different hierarchical layers. The SQl Script for generating CONDITION_ERA records can be found here The Condition Era Start Date is the start date of the first Condition Occurrence. The Condition Era End Date is the end date of the last Condition Occurrence. Condition Eras are built with a Persistence Window of 30 days, meaning, if no occurrence of the same condition_concept_id happens within 30 days of any one occurrence, it will be considered the condition_era_end_date.

    +

    Each Condition Era corresponds to one or many Condition Occurrence records that form a continuous interval. The condition_concept_id field contains Concepts that are identical to those of the CONDITION_OCCURRENCE table records that make up the Condition Era. In contrast to Drug Eras, Condition Eras are not aggregated to contain Conditions of different hierarchical layers. The SQl Script for generating CONDITION_ERA records can be found here The Condition Era Start Date is the start date of the first Condition Occurrence. The Condition Era End Date is the end date of the last Condition Occurrence. Condition Eras are built with a Persistence Window of 30 days, meaning, if no occurrence of the same condition_concept_id happens within 30 days of any one occurrence, it will be considered the condition_era_end_date.

    @@ -12376,7 +12376,7 @@

    C relationship_id

    diff --git a/docs/cdm54erd.html b/docs/cdm54erd.html index 78066ab9..87299c39 100644 --- a/docs/cdm54erd.html +++ b/docs/cdm54erd.html @@ -516,7 +516,7 @@

    OMOP CDM v5.4 ERD

    -
    CDM v5.4 Printable ERD - click here to download
    +
    CDM v5.4 Printable ERD - click here to download
    diff --git a/docs/cdm55.html b/docs/cdm55.html index 1028c0c9..35b4fc02 100644 --- a/docs/cdm55.html +++ b/docs/cdm55.html @@ -9947,7 +9947,7 @@

    DRUG_ERA

    Table Description

    A Drug Era is defined as a span of time when the Person is assumed to be exposed to a particular active ingredient. A Drug Era is not the same as a Drug Exposure: Exposures are individual records corresponding to the source when Drug was delivered to the Person, while successive periods of Drug Exposures are combined under certain rules to produce continuous Drug Eras. Every record in the DRUG_EXPOSURE table should be part of a drug era based on the dates of exposure.

    ETL Conventions

    -

    The SQL script for generating DRUG_ERA records can be found here.

    +

    The SQL script for generating DRUG_ERA records can be found here.

    -The relationship between CONCEPT_ID_1 and CONCEPT_ID_2. Please see the Vocabulary Conventions. for more information. +The relationship between CONCEPT_ID_1 and CONCEPT_ID_2. Please see the Vocabulary Conventions. for more information.
    @@ -10403,7 +10403,7 @@

    CONDITIO
  • It allows aggregation of multiple, closely timed doctor visits for the same Condition to avoid double-counting the Condition Occurrences. For example, consider a Person who visits her Primary Care Physician (PCP) and who is referred to a specialist. At a later time, the Person visits the specialist, who confirms the PCP’s original diagnosis and provides the appropriate treatment to resolve the condition. These two independent doctor visits should be aggregated into one Condition Era.
  • ETL Conventions

    -

    Each Condition Era corresponds to one or many Condition Occurrence records that form a continuous interval. The condition_concept_id field contains Concepts that are identical to those of the CONDITION_OCCURRENCE table records that make up the Condition Era. In contrast to Drug Eras, Condition Eras are not aggregated to contain Conditions of different hierarchical layers. The SQl Script for generating CONDITION_ERA records can be found here The Condition Era Start Date is the start date of the first Condition Occurrence. The Condition Era End Date is the end date of the last Condition Occurrence. Condition Eras are built with a Persistence Window of 30 days, meaning, if no occurrence of the same condition_concept_id happens within 30 days of any one occurrence, it will be considered the condition_era_end_date.

    +

    Each Condition Era corresponds to one or many Condition Occurrence records that form a continuous interval. The condition_concept_id field contains Concepts that are identical to those of the CONDITION_OCCURRENCE table records that make up the Condition Era. In contrast to Drug Eras, Condition Eras are not aggregated to contain Conditions of different hierarchical layers. The SQl Script for generating CONDITION_ERA records can be found here The Condition Era Start Date is the start date of the first Condition Occurrence. The Condition Era End Date is the end date of the last Condition Occurrence. Condition Eras are built with a Persistence Window of 30 days, meaning, if no occurrence of the same condition_concept_id happens within 30 days of any one occurrence, it will be considered the condition_era_end_date.

    @@ -12570,7 +12570,7 @@

    C relationship_id

    diff --git a/docs/cdm60.html b/docs/cdm60.html index e800e7ce..b9ccd8fc 100644 --- a/docs/cdm60.html +++ b/docs/cdm60.html @@ -578,7 +578,7 @@

    Changes in v6.0

  • All primary keys were changed to bigint
  • The name of ADMISSION_SOURCE_CONCEPT_ID was changed to ADMITTED_FROM_CONCEPT_ID in VISIT_OCCURRENCE and VISIT_DETAIL
  • All Concept_Ids are now mandatory except for UNIT_CONCEPT_ID, VALUE_AS_CONCEPT_ID, and OPERATOR_CONCEPT_ID. If there is no value available then a Concept_Id should be set to 0 instead of NULL.
  • -
  • DEATH table removed and DEATH_DATETIME field added to the PERSON table. Cause of death is stored in the CONDITION_OCCURRENCE
  • +
  • DEATH table removed and DEATH_DATETIME field added to the PERSON table. Cause of death is stored in the CONDITION_OCCURRENCE
  • DATETIME fields were made mandatory and date fields were made optional.
  • diff --git a/docs/customConcepts.html b/docs/customConcepts.html index 048a6436..1585a370 100644 --- a/docs/customConcepts.html +++ b/docs/customConcepts.html @@ -705,7 +705,7 @@

    Mapping relationship<

    -The relationship between CONCEPT_ID_1 and CONCEPT_ID_2. Please see the Vocabulary Conventions. for more information. +The relationship between CONCEPT_ID_1 and CONCEPT_ID_2. Please see the Vocabulary Conventions. for more information.
    -

    See the Source To Standard query to map a code in the source data to a standard concept.

    +

    See the Source To Standard query to map a code in the source data to a standard concept.

    diff --git a/docs/faq.html b/docs/faq.html index 8e04c667..d8a887cc 100644 --- a/docs/faq.html +++ b/docs/faq.html @@ -524,9 +524,9 @@

    OMOP CDM Frequently Asked Questions

  • Observation_period: Contains records which uniquely define the spans of time for which a Person is at-risk to have clinical events recorded within the source systems.
  • CDM_Source: Contains information on the CDM instance including the vocabulary version used, the date the native data were released and the date the CDM was released.
  • -

    It is then up to you which tables to populate, though the core event tables are generally agreed upon to be Condition_occurrence, Procedure_occurrence, Drug_exposure, Measurement, and Observation. Each table has certain required fields, a full list of which can be found on the Common Data Model wiki page.

    +

    It is then up to you which tables to populate, though the core event tables are generally agreed upon to be Condition_occurrence, Procedure_occurrence, Drug_exposure, Measurement, and Observation. Each table has certain required fields, a full list of which can be found on the Common Data Model wiki page.

    4. Does the data model include any derived information? Which tables or values are derived?

    -

    The common data model stores verbatim data from the source across various clinical domains, such as records for conditions, drugs, procedures, and measurements. In addition, to assist the analyst, the common data model also provides some derived tables, based on commonly used analytic procedures. For example, the Condition_era table is derived from the Condition_occurrence table and both the Drug_era and Dose_era tables are derived from the Drug_exposure table. An era is defined as a span of time when a patient is assumed to have a given condition or exposure to a particular active ingredient. Members of the community have written code to create these tables and it is out on the github if you choose to use it in your CDM build. It is important to reinforce, the analyst has the opportunity, but not the obligation, to use any of the derived tables and all of the source data is still available for direct use if the analysis calls for different assumptions.

    +

    The common data model stores verbatim data from the source across various clinical domains, such as records for conditions, drugs, procedures, and measurements. In addition, to assist the analyst, the common data model also provides some derived tables, based on commonly used analytic procedures. For example, the Condition_era table is derived from the Condition_occurrence table and both the Drug_era and Dose_era tables are derived from the Drug_exposure table. An era is defined as a span of time when a patient is assumed to have a given condition or exposure to a particular active ingredient. Members of the community have written code to create these tables and it is out on the github if you choose to use it in your CDM build. It is important to reinforce, the analyst has the opportunity, but not the obligation, to use any of the derived tables and all of the source data is still available for direct use if the analysis calls for different assumptions.

    5. How is age captured in the model?

    Year_of_birth, month_of_birth, day_of_birth and birth_datetime are all fields in the Person table designed to capture some form of date of birth. While only year_of_birth is required, these fields allow for maximum flexibility over a wide range of data sources.

    6. How are gender, race, and ethnicity captured in the model? Are they coded using values a human reader can understand?

    @@ -546,11 +546,11 @@

    OMOP CDM Frequently Asked Questions

    Vocabulary Mapping

    12. Do I have to map my source codes to Standard Concepts myself? Are there vocabulary mappings that already exist for me to leverage?

    -

    If your data use any of the 55 source vocabularies that are currently supported, the mappings have been done for you. The full list is available from the open-source ATHENA tool under the download tab (see below). You can choose to download the ten vocabulary tables from there as well – you will need a copy in your environment if you plan on building a CDM.

    +

    If your data use any of the 55 source vocabularies that are currently supported, the mappings have been done for you. The full list is available from the open-source ATHENA tool under the download tab (see below). You can choose to download the ten vocabulary tables from there as well – you will need a copy in your environment if you plan on building a CDM.

    The ATHENA tool also allows you to explore the vocabulary before downloading it if you are curious about the mappings or if you have a specific code in mind and would like to know which standard concept it is associated with; just click on the search tab and type in a keyword to begin searching.

    13. If I want to apply the mappings myself, can I do so? Are they transparent to all users?

    -

    Yes, all mappings are available in the Concept_relationship table (which can be downloaded from ATHENA). Each value in a supported source terminology is assigned a Concept_id (which is considered non-standard). Each Source_concept_id will have a mapping to a Standard_concept_id. For example:

    +

    Yes, all mappings are available in the Concept_relationship table (which can be downloaded from ATHENA). Each value in a supported source terminology is assigned a Concept_id (which is considered non-standard). Each Source_concept_id will have a mapping to a Standard_concept_id. For example:

    In this case the standard SNOMED concept 201826 for type 2 diabetes mellitus would be stored in the Condition_occurrence table as the Condition_concept_id and the ICD10CM concept 1567956 for type 2 diabetes mellitus would be stored as the Condition_source_concept_id.

    14. Can RXNorm codes be stored in the model? Can I store multiple levels if I so choose? What if one collaborator uses a different level of RXNorm than I use when transforming their database?

    diff --git a/docs/indices-primary-foreign.html b/docs/indices-primary-foreign.html index cb6fd4fa..e2d23d6a 100644 --- a/docs/indices-primary-foreign.html +++ b/docs/indices-primary-foreign.html @@ -535,7 +535,7 @@

    General Recommenda
  • Indexing on all columns containing an “_id” (e.g. condition_occurrence_id, drug_exposure_id, measurement_id, procedure_occurrence_id, etc.)
  • Indexing on primary and foreign keys
  • -

    For all databases, regardless of custom indice support, primary and foreign keys should be set. This is a step towards ensuring data integrity. Information on what table level attributes should be set as primary and foreign keys can be found within the *_Field_Level.csv file(s) located in the INST/CSV directory

    +

    For all databases, regardless of custom indice support, primary and foreign keys should be set. This is a step towards ensuring data integrity. Information on what table level attributes should be set as primary and foreign keys can be found within the *_Field_Level.csv file(s) located in the INST/CSV directory

    Database support

    @@ -551,7 +551,7 @@

    PostgreSQL

    Amazon Redshift

    -

    On AWS Redshift it is important to ensure that your data is properly distributed and sorted across nodes. Compression on certain columns may also help. The designed DDL does set DISTKEYS in an effort to optimize performance. This configuration can be seen within the Redshift-specific DDL.

    +

    On AWS Redshift it is important to ensure that your data is properly distributed and sorted across nodes. Compression on certain columns may also help. The designed DDL does set DISTKEYS in an effort to optimize performance. This configuration can be seen within the Redshift-specific DDL.

    Impala

    diff --git a/inst/csv/OMOP_CDMv5.3_Field_Level.csv b/inst/csv/OMOP_CDMv5.3_Field_Level.csv index c6de06a8..02f88bf5 100644 --- a/inst/csv/OMOP_CDMv5.3_Field_Level.csv +++ b/inst/csv/OMOP_CDMv5.3_Field_Level.csv @@ -426,7 +426,7 @@ Clinical Finding, Ingredient, etc.",NA,No,No,NA,NA,NA,NA concept_class,concept_class_concept_id,Yes,integer,A Concept that represents the Concept Class.,NA,No,Yes,CONCEPT,CONCEPT_ID,NA,NA concept_relationship,concept_id_1,Yes,integer,NA,NA,No,Yes,CONCEPT,CONCEPT_ID,NA,NA concept_relationship,concept_id_2,Yes,integer,NA,NA,No,Yes,CONCEPT,CONCEPT_ID,NA,NA -concept_relationship,relationship_id,Yes,varchar(20),The relationship between CONCEPT_ID_1 and CONCEPT_ID_2. Please see the [Vocabulary Conventions](https://ohdsi.github.io/CommonDataModel/dataModelConventions.html#concept_relationships). for more information.,NA,No,Yes,RELATIONSHIP,RELATIONSHIP_ID,NA,NA +concept_relationship,relationship_id,Yes,varchar(20),The relationship between CONCEPT_ID_1 and CONCEPT_ID_2. Please see the [Vocabulary Conventions](https://ohdsi.github.io/CommonDataModel/dataModelConventions.html#concept-relationships). for more information.,NA,No,Yes,RELATIONSHIP,RELATIONSHIP_ID,NA,NA concept_relationship,valid_start_date,Yes,date,The date when the relationship is first recorded.,NA,No,No,NA,NA,NA,NA concept_relationship,valid_end_date,Yes,date,The date when the relationship is invalidated.,NA,No,No,NA,NA,NA,NA concept_relationship,invalid_reason,No,varchar(1),"Reason the relationship was invalidated. Possible values are 'D' (deleted), 'U' (updated) or NULL.",NA,No,No,NA,NA,NA,NA diff --git a/inst/csv/OMOP_CDMv5.3_Table_Level.csv b/inst/csv/OMOP_CDMv5.3_Table_Level.csv index de252269..47e5765e 100644 --- a/inst/csv/OMOP_CDMv5.3_Table_Level.csv +++ b/inst/csv/OMOP_CDMv5.3_Table_Level.csv @@ -17,7 +17,7 @@ visit_occurrence,CDM,No,VISIT_,Yes,0,NA,"This table contains Events where Person The Visit duration, or 'length of stay', is defined as VISIT_END_DATE - VISIT_START_DATE. For all Visits this is <1 day, except Inpatient Visits and Non-hospital institution Visits. The CDM also contains the VISIT_DETAIL table where additional information about the Visit is stored, for example, transfers between units during an inpatient Visit.","Visits can be derived easily if the source data contain coding systems for Place of Service or Procedures, like CPT codes for well visits. In those cases, the codes can be looked up and mapped to a Standard Visit Concept. Otherwise, Visit Concepts have to be identified in the ETL process. This table will contain concepts in the Visit domain. These concepts are arranged in a hierarchical structure to facilitate cohort definitions by rolling up to generally familiar Visits adopted in most healthcare systems worldwide. Visits can be adjacent to each other, i.e. the end date of one can be identical with the start date of the other. As a consequence, more than one-day Visits or their descendants can be recorded for the same day. Multi-day visits must not overlap, i.e. share days other than start and end days. It is often the case that some logic should be written for how to define visits and how to assign Visit_Concept_Id. For example, in US claims outpatient visits that appear to occur within the time period of an inpatient visit can be rolled into one with the same Visit_Occurrence_Id. In EHR data inpatient visits that are within one day of each other may be strung together to create one visit. It will all depend on the source data and how encounter records should be translated to visit occurrences. Providers can be associated with a Visit through the PROVIDER_ID field, or indirectly through PROCEDURE_OCCURRENCE records linked both to the VISIT and PROVIDER tables." visit_detail,CDM,No,VISIT_DETAIL_,Yes,0,NA,The VISIT_DETAIL table is an optional table used to represents details of each record in the parent VISIT_OCCURRENCE table. A good example of this would be the movement between units in a hospital during an inpatient stay or claim lines associated with a one insurance claim. For every record in the VISIT_OCCURRENCE table there may be 0 or more records in the VISIT_DETAIL table with a 1:n relationship where n may be 0. The VISIT_DETAIL table is structurally very similar to VISIT_OCCURRENCE table and belongs to the visit domain.,"The configuration defining the Visit Detail is described by Concepts in the Visit Domain, which form a hierarchical structure. The Visit Detail record will have an associated to the Visit Occurrence record in two ways:
    1. The Visit Detail record will have the VISIT_OCCURRENCE_ID it is associated to 2. The VISIT_DETAIL_CONCEPT_ID will be a descendant of the VISIT_CONCEPT_ID for the Visit.","It is not mandatory that the VISIT_DETAIL table be filled in, but if you find that the logic to create VISIT_OCCURRENCE records includes the roll-up of multiple smaller records to create one picture of a Visit then it is a good idea to use VISIT_DETAIL. In EHR data, for example, a Person may be in the hospital but instead of one over-arching Visit their encounters are recorded as times they interacted with a health care provider. A Person in the hospital interacts with multiple providers multiple times a day so the encounters must be strung together using some heuristic (defined by the ETL) to identify the entire Visit. In this case the encounters would be considered Visit Details and the entire Visit would be the Visit Occurrence. In this example it is also possible to use the Vocabulary to distinguish Visit Details from a Visit Occurrence by setting the VISIT_CONCEPT_ID to [9201](https://athena.ohdsi.org/search-terms/terms/9201) and the VISIT_DETAIL_CONCEPT_IDs either to 9201 or its children to indicate where the patient was in the hospital at the time of care." -condition_occurrence,CDM,No,CONDITION_,Yes,0,NA,"This table contains records of Events of a Person suggesting the presence of a disease or medical condition stated as a diagnosis, a sign, or a symptom, which is either observed by a Provider or reported by the patient.","Conditions are defined by Concepts from the Condition domain, which form a complex hierarchy. As a result, the same Person with the same disease may have multiple Condition records, which belong to the same hierarchical family. Most Condition records are mapped from diagnostic codes, but recorded signs, symptoms and summary descriptions also contribute to this table. Rule out diagnoses should not be recorded in this table, but in reality their negating nature is not always captured in the source data, and other precautions must be taken when when identifying Persons who should suffer from the recorded Condition. Record all conditions as they exist in the source data. Any decisions about diagnosis/phenotype definitions would be done through cohort specifications. These cohorts can be housed in the [COHORT](https://ohdsi.github.io/CommonDataModel/cdm531.html#payer_plan_period) table. Conditions span a time interval from start to end, but are typically recorded as single snapshot records with no end date. The reason is twofold: (i) At the time of the recording the duration is not known and later not recorded, and (ii) the Persons typically cease interacting with the healthcare system when they feel better, which leads to incomplete capture of resolved Conditions. The [CONDITION_ERA](https://ohdsi.github.io/CommonDataModel/cdm531.html#condition_era) table addresses this issue. Family history and past diagnoses ('history of') are not recorded in this table. Instead, they are listed in the [OBSERVATION](https://ohdsi.github.io/CommonDataModel/cdm531.html#observation) table. Codes written in the process of establishing the diagnosis, such as 'question of' of and 'rule out', should not represented here. Instead, they should be recorded in the [OBSERVATION](https://ohdsi.github.io/CommonDataModel/cdm531.html#observation) table, if they are used for analyses. However, this information is not always available.",Source codes and source text fields mapped to Standard Concepts of the Condition Domain have to be recorded here. +condition_occurrence,CDM,No,CONDITION_,Yes,0,NA,"This table contains records of Events of a Person suggesting the presence of a disease or medical condition stated as a diagnosis, a sign, or a symptom, which is either observed by a Provider or reported by the patient.","Conditions are defined by Concepts from the Condition domain, which form a complex hierarchy. As a result, the same Person with the same disease may have multiple Condition records, which belong to the same hierarchical family. Most Condition records are mapped from diagnostic codes, but recorded signs, symptoms and summary descriptions also contribute to this table. Rule out diagnoses should not be recorded in this table, but in reality their negating nature is not always captured in the source data, and other precautions must be taken when when identifying Persons who should suffer from the recorded Condition. Record all conditions as they exist in the source data. Any decisions about diagnosis/phenotype definitions would be done through cohort specifications. These cohorts can be housed in the [COHORT](https://ohdsi.github.io/CommonDataModel/cdm53.html#payer_plan_period) table. Conditions span a time interval from start to end, but are typically recorded as single snapshot records with no end date. The reason is twofold: (i) At the time of the recording the duration is not known and later not recorded, and (ii) the Persons typically cease interacting with the healthcare system when they feel better, which leads to incomplete capture of resolved Conditions. The [CONDITION_ERA](https://ohdsi.github.io/CommonDataModel/cdm53.html#condition_era) table addresses this issue. Family history and past diagnoses ('history of') are not recorded in this table. Instead, they are listed in the [OBSERVATION](https://ohdsi.github.io/CommonDataModel/cdm53.html#observation) table. Codes written in the process of establishing the diagnosis, such as 'question of' of and 'rule out', should not represented here. Instead, they should be recorded in the [OBSERVATION](https://ohdsi.github.io/CommonDataModel/cdm53.html#observation) table, if they are used for analyses. However, this information is not always available.",Source codes and source text fields mapped to Standard Concepts of the Condition Domain have to be recorded here. drug_exposure,CDM,No,DRUG_,Yes,0,NA,"This table captures records about the exposure to a Drug ingested or otherwise introduced into the body. A Drug is a biochemical substance formulated in such a way that when administered to a Person it will exert a certain biochemical effect on the metabolism. Drugs include prescription and over-the-counter medicines, vaccines, and large-molecule biologic therapies. Radiological devices ingested or applied locally do not count as Drugs.","The purpose of records in this table is to indicate an exposure to a certain drug as best as possible. In this context a drug is defined as an active ingredient. Drug Exposures are defined by Concepts from the Drug domain, which form a complex hierarchy. As a result, one DRUG_SOURCE_CONCEPT_ID may map to multiple standard concept ids if it is a combination product. Records in this table represent prescriptions written, prescriptions dispensed, and drugs administered by a provider to name a few. The DRUG_TYPE_CONCEPT_ID can be used to find and filter on these types. This table includes additional information about the drug products, the quantity given, and route of administration.","Information about quantity and dose is provided in a variety of different ways and it is important for the ETL to provide as much information as possible from the data. Depending on the provenance of the data fields may be captured differently i.e. quantity for drugs administered may have a separate meaning from quantity for prescriptions dispensed. If a patient has multiple records on the same day for the same drug or procedures the ETL should not de-dupe them unless there is probable reason to believe the item is a true data duplicate. Take note on how to handle refills for prescriptions written.

    For detailed conventions on how to populate this table, please refer to the [THEMIS repository](https://ohdsi.github.io/Themis/drug_exposure.html)." procedure_occurrence,CDM,No,PROCEDURE_,Yes,0,NA,"This table contains records of activities or processes ordered by, or carried out by, a healthcare provider on the patient with a diagnostic or therapeutic purpose.","Lab tests are not a procedure, if something is observed with an expected resulting amount and unit then it should be a measurement. Phlebotomy is a procedure but so trivial that it tends to be rarely captured. It can be assumed that there is a phlebotomy procedure associated with many lab tests, therefore it is unnecessary to add them as separate procedures. If the user finds the same procedure over concurrent days, it is assumed those records are part of a procedure lasting more than a day. This logic is in lieu of the procedure_end_date, which will be added in a future version of the CDM.","If a procedure lasts more than 24 hours, then it should be recorded as a separate record for each day the procedure occurred, this logic is in lieu of the PROCEDURE_END_DATE, which will be added in a future version of the CDM. When dealing with duplicate records, the ETL must determine whether to sum them up into one record or keep them separate. Things to consider are: - Same Procedure - Same PROCEDURE_DATETIME - Same Visit Occurrence or Visit Detail - Same Provider - Same Modifier for Procedures. Source codes and source text fields mapped to Standard Concepts of the Procedure Domain have to be recorded here." device_exposure,CDM,No,DEVICE_,Yes,0,NA,"The Device domain captures information about a person's exposure to a foreign physical object or instrument which is used for diagnostic or therapeutic purposes through a mechanism beyond chemical action. Devices include implantable objects (e.g. pacemakers, stents, artificial joints), medical equipment and supplies (e.g. bandages, crutches, syringes), other instruments used in medical procedures (e.g. sutures, defibrillators) and material used in clinical care (e.g. adhesives, body material, dental material, surgical material).","The distinction between Devices or supplies and Procedures are sometimes blurry, but the former are physical objects while the latter are actions, often to apply a Device or supply.",Source codes and source text fields mapped to Standard Concepts of the Device Domain have to be recorded here. @@ -47,14 +47,14 @@ payer_plan_period,CDM,No,NA,Yes,0,NA,"The PAYER_PLAN_PERIOD table captures detai cost,CDM,No,NA,No,NA,NA,"The COST table captures records containing the cost of any medical event recorded in one of the OMOP clinical event tables such as DRUG_EXPOSURE, PROCEDURE_OCCURRENCE, VISIT_OCCURRENCE, VISIT_DETAIL, DEVICE_OCCURRENCE, OBSERVATION or MEASUREMENT. Each record in the cost table account for the amount of money transacted for the clinical event. So, the COST table may be used to represent both receivables (charges) and payments (paid), each transaction type represented by its COST_CONCEPT_ID. The COST_TYPE_CONCEPT_ID field will use concepts in the Standardized Vocabularies to designate the source (provenance) of the cost data. A reference to the health plan information in the PAYER_PLAN_PERIOD table is stored in the record for information used for the adjudication system to determine the persons benefit for the clinical event.","When dealing with summary costs, the cost of the goods or services the provider provides is often not known directly, but derived from the hospital charges multiplied by an average cost-to-charge ratio.","One cost record is generated for each response by a payer. In a claims databases, the payment and payment terms reported by the payer for the goods or services billed will generate one cost record. If the source data has payment information for more than one payer (i.e. primary insurance and secondary insurance payment for one entity), then a cost record is created for each reporting payer. Therefore, it is possible for one procedure to have multiple cost records for each payer, but typically it contains one or no record per entity. Payer reimbursement cost records will be identified by using the PAYER_PLAN_ID field. Drug costs are composed of ingredient cost (the amount charged by the wholesale distributor or manufacturer), the dispensing fee (the amount charged by the pharmacy and the sales tax)." -drug_era,CDM,No,NA,Yes,0,NA,"A Drug Era is defined as a span of time when the Person is assumed to be exposed to a particular active ingredient. A Drug Era is not the same as a Drug Exposure: Exposures are individual records corresponding to the source when Drug was delivered to the Person, while successive periods of Drug Exposures are combined under certain rules to produce continuous Drug Eras. Every record in the DRUG_EXPOSURE table should be part of a drug era based on the dates of exposure. ",NA,The SQL script for generating DRUG_ERA records can be found [here](https://ohdsi.github.io/CommonDataModel/sqlScripts.html#drug_eras). +drug_era,CDM,No,NA,Yes,0,NA,"A Drug Era is defined as a span of time when the Person is assumed to be exposed to a particular active ingredient. A Drug Era is not the same as a Drug Exposure: Exposures are individual records corresponding to the source when Drug was delivered to the Person, while successive periods of Drug Exposures are combined under certain rules to produce continuous Drug Eras. Every record in the DRUG_EXPOSURE table should be part of a drug era based on the dates of exposure. ",NA,The SQL script for generating DRUG_ERA records can be found [here](https://ohdsi.github.io/CommonDataModel/sqlScripts.html#drug-eras). dose_era,CDM,No,NA,Yes,0,NA,A Dose Era is defined as a span of time when the Person is assumed to be exposed to a constant dose of a specific active ingredient.,NA,"Dose Eras will be derived from records in the DRUG_EXPOSURE table and the Dose information from the DRUG_STRENGTH table using a standardized algorithm. Dose Form information is not taken into account. So, if the patient changes between different formulations, or different manufacturers with the same formulation, the Dose Era is still spanning the entire time of exposure to the Ingredient." condition_era,CDM,No,NA,Yes,0,NA,"A Condition Era is defined as a span of time when the Person is assumed to have a given condition. Similar to Drug Eras, Condition Eras are chronological periods of Condition Occurrence and every Condition Occurrence record should be part of a Condition Era. Combining individual Condition Occurrences into a single Condition Era serves two purposes: - It allows aggregation of chronic conditions that require frequent ongoing care, instead of treating each Condition Occurrence as an independent event. - It allows aggregation of multiple, closely timed doctor visits for the same Condition to avoid double-counting the Condition Occurrences. For example, consider a Person who visits her Primary Care Physician (PCP) and who is referred to a specialist. At a later time, the Person visits the specialist, who confirms the PCP's original diagnosis and provides the appropriate treatment to resolve the condition. These two independent doctor visits should be aggregated into one Condition Era.",NA,"Each Condition Era corresponds to one or many Condition Occurrence records that form a continuous interval. -The condition_concept_id field contains Concepts that are identical to those of the CONDITION_OCCURRENCE table records that make up the Condition Era. In contrast to Drug Eras, Condition Eras are not aggregated to contain Conditions of different hierarchical layers. The SQl Script for generating CONDITION_ERA records can be found [here](https://ohdsi.github.io/CommonDataModel/sqlScripts.html#condition_eras) +The condition_concept_id field contains Concepts that are identical to those of the CONDITION_OCCURRENCE table records that make up the Condition Era. In contrast to Drug Eras, Condition Eras are not aggregated to contain Conditions of different hierarchical layers. The SQl Script for generating CONDITION_ERA records can be found [here](https://ohdsi.github.io/CommonDataModel/sqlScripts.html#condition-eras) The Condition Era Start Date is the start date of the first Condition Occurrence. The Condition Era End Date is the end date of the last Condition Occurrence. Condition Eras are built with a Persistence Window of 30 days, meaning, if no occurrence of the same condition_concept_id happens within 30 days of any one occurrence, it will be considered the condition_era_end_date." metadata,CDM,No,NA,No,NA,NA,The METADATA table contains metadata information about a dataset that has been transformed to the OMOP Common Data Model.,NA,NA diff --git a/inst/csv/OMOP_CDMv5.4_Field_Level.csv b/inst/csv/OMOP_CDMv5.4_Field_Level.csv index f07fbca9..56ce0ee4 100644 --- a/inst/csv/OMOP_CDMv5.4_Field_Level.csv +++ b/inst/csv/OMOP_CDMv5.4_Field_Level.csv @@ -462,7 +462,7 @@ Clinical Finding, Ingredient, etc.",NA,FALSE,FALSE,NA,NA,NA,NA concept_class,concept_class_concept_id,TRUE,integer,A Concept that represents the Concept Class.,NA,FALSE,TRUE,CONCEPT,CONCEPT_ID,NA,NA concept_relationship,concept_id_1,TRUE,integer,NA,NA,FALSE,TRUE,CONCEPT,CONCEPT_ID,NA,NA concept_relationship,concept_id_2,TRUE,integer,NA,NA,FALSE,TRUE,CONCEPT,CONCEPT_ID,NA,NA -concept_relationship,relationship_id,TRUE,varchar(20),The relationship between CONCEPT_ID_1 and CONCEPT_ID_2. Please see the [Vocabulary Conventions](https://ohdsi.github.io/CommonDataModel/dataModelConventions.html#concept_relationships). for more information.,NA,FALSE,TRUE,RELATIONSHIP,RELATIONSHIP_ID,NA,NA +concept_relationship,relationship_id,TRUE,varchar(20),The relationship between CONCEPT_ID_1 and CONCEPT_ID_2. Please see the [Vocabulary Conventions](https://ohdsi.github.io/CommonDataModel/dataModelConventions.html#concept-relationships). for more information.,NA,FALSE,TRUE,RELATIONSHIP,RELATIONSHIP_ID,NA,NA concept_relationship,valid_start_date,TRUE,date,The date when the relationship is first recorded.,NA,FALSE,FALSE,NA,NA,NA,NA concept_relationship,valid_end_date,TRUE,date,The date when the relationship is invalidated.,NA,FALSE,FALSE,NA,NA,NA,NA concept_relationship,invalid_reason,FALSE,varchar(1),"Reason the relationship was invalidated. Possible values are 'D' (deleted), 'U' (updated) or NULL.",NA,FALSE,FALSE,NA,NA,NA,NA diff --git a/inst/csv/OMOP_CDMv5.4_Table_Level.csv b/inst/csv/OMOP_CDMv5.4_Table_Level.csv index 39817348..c2732aa4 100644 --- a/inst/csv/OMOP_CDMv5.4_Table_Level.csv +++ b/inst/csv/OMOP_CDMv5.4_Table_Level.csv @@ -55,14 +55,14 @@ payer_plan_period,CDM,FALSE,NA,TRUE,0,NA,"The PAYER_PLAN_PERIOD table captures d cost,CDM,FALSE,NA,FALSE,NA,NA,"The COST table captures records containing the cost of any medical event recorded in one of the OMOP clinical event tables such as DRUG_EXPOSURE, PROCEDURE_OCCURRENCE, VISIT_OCCURRENCE, VISIT_DETAIL, DEVICE_OCCURRENCE, OBSERVATION or MEASUREMENT. Each record in the cost table account for the amount of money transacted for the clinical event. So, the COST table may be used to represent both receivables (charges) and payments (paid), each transaction type represented by its COST_CONCEPT_ID. The COST_TYPE_CONCEPT_ID field will use concepts in the Standardized Vocabularies to designate the source (provenance) of the cost data. A reference to the health plan information in the PAYER_PLAN_PERIOD table is stored in the record for information used for the adjudication system to determine the persons benefit for the clinical event.","When dealing with summary costs, the cost of the goods or services the provider provides is often not known directly, but derived from the hospital charges multiplied by an average cost-to-charge ratio.","One cost record is generated for each response by a payer. In a claims databases, the payment and payment terms reported by the payer for the goods or services billed will generate one cost record. If the source data has payment information for more than one payer (i.e. primary insurance and secondary insurance payment for one entity), then a cost record is created for each reporting payer. Therefore, it is possible for one procedure to have multiple cost records for each payer, but typically it contains one or no record per entity. Payer reimbursement cost records will be identified by using the PAYER_PLAN_ID field. Drug costs are composed of ingredient cost (the amount charged by the wholesale distributor or manufacturer), the dispensing fee (the amount charged by the pharmacy and the sales tax)." -drug_era,CDM,FALSE,NA,TRUE,0,NA,"A Drug Era is defined as a span of time when the Person is assumed to be exposed to a particular active ingredient. A Drug Era is not the same as a Drug Exposure: Exposures are individual records corresponding to the source when Drug was delivered to the Person, while successive periods of Drug Exposures are combined under certain rules to produce continuous Drug Eras. Every record in the DRUG_EXPOSURE table should be part of a drug era based on the dates of exposure. ",NA,The SQL script for generating DRUG_ERA records can be found [here](https://ohdsi.github.io/CommonDataModel/sqlScripts.html#drug_eras). +drug_era,CDM,FALSE,NA,TRUE,0,NA,"A Drug Era is defined as a span of time when the Person is assumed to be exposed to a particular active ingredient. A Drug Era is not the same as a Drug Exposure: Exposures are individual records corresponding to the source when Drug was delivered to the Person, while successive periods of Drug Exposures are combined under certain rules to produce continuous Drug Eras. Every record in the DRUG_EXPOSURE table should be part of a drug era based on the dates of exposure. ",NA,The SQL script for generating DRUG_ERA records can be found [here](https://ohdsi.github.io/CommonDataModel/sqlScripts.html#drug-eras). dose_era,CDM,FALSE,NA,TRUE,0,NA,A Dose Era is defined as a span of time when the Person is assumed to be exposed to a constant dose of a specific active ingredient.,NA,"Dose Eras will be derived from records in the DRUG_EXPOSURE table and the Dose information from the DRUG_STRENGTH table using a standardized algorithm. Dose Form information is not taken into account. So, if the patient changes between different formulations, or different manufacturers with the same formulation, the Dose Era is still spanning the entire time of exposure to the Ingredient." condition_era,CDM,FALSE,NA,TRUE,0,NA,"A Condition Era is defined as a span of time when the Person is assumed to have a given condition. Similar to Drug Eras, Condition Eras are chronological periods of Condition Occurrence and every Condition Occurrence record should be part of a Condition Era. Combining individual Condition Occurrences into a single Condition Era serves two purposes: - It allows aggregation of chronic conditions that require frequent ongoing care, instead of treating each Condition Occurrence as an independent event. - It allows aggregation of multiple, closely timed doctor visits for the same Condition to avoid double-counting the Condition Occurrences. For example, consider a Person who visits her Primary Care Physician (PCP) and who is referred to a specialist. At a later time, the Person visits the specialist, who confirms the PCP's original diagnosis and provides the appropriate treatment to resolve the condition. These two independent doctor visits should be aggregated into one Condition Era.",NA,"Each Condition Era corresponds to one or many Condition Occurrence records that form a continuous interval. -The condition_concept_id field contains Concepts that are identical to those of the CONDITION_OCCURRENCE table records that make up the Condition Era. In contrast to Drug Eras, Condition Eras are not aggregated to contain Conditions of different hierarchical layers. The SQl Script for generating CONDITION_ERA records can be found [here](https://ohdsi.github.io/CommonDataModel/sqlScripts.html#condition_eras) +The condition_concept_id field contains Concepts that are identical to those of the CONDITION_OCCURRENCE table records that make up the Condition Era. In contrast to Drug Eras, Condition Eras are not aggregated to contain Conditions of different hierarchical layers. The SQl Script for generating CONDITION_ERA records can be found [here](https://ohdsi.github.io/CommonDataModel/sqlScripts.html#condition-eras) The Condition Era Start Date is the start date of the first Condition Occurrence. The Condition Era End Date is the end date of the last Condition Occurrence. Condition Eras are built with a Persistence Window of 30 days, meaning, if no occurrence of the same condition_concept_id happens within 30 days of any one occurrence, it will be considered the condition_era_end_date." episode,CDM,FALSE,NA,FALSE,NA,NA,"The EPISODE table aggregates lower-level clinical events (VISIT_OCCURRENCE, DRUG_EXPOSURE, PROCEDURE_OCCURRENCE, DEVICE_EXPOSURE) into a higher-level abstraction representing clinically and analytically relevant disease phases,outcomes and treatments. The EPISODE_EVENT table connects qualifying clinical events (VISIT_OCCURRENCE, DRUG_EXPOSURE, PROCEDURE_OCCURRENCE, DEVICE_EXPOSURE) to the appropriate EPISODE entry. For example cancers including their development over time, their treatment, and final resolution.","Valid Episode Concepts belong to the 'Episode' domain. For more information on how to populate this table, please see the [article](https://ohdsi.github.io/OncologyWG/model.html#episodes) on the Oncology Workgroup website. If your source data does not have all episodes that are relevant to the therapeutic area, write only those you can easily derive from the data. It is understood that that table is not currently expected to be comprehensive.",NA diff --git a/inst/csv/OMOP_CDMv5.5_Field_Level.csv b/inst/csv/OMOP_CDMv5.5_Field_Level.csv index b518711d..285beb3f 100644 --- a/inst/csv/OMOP_CDMv5.5_Field_Level.csv +++ b/inst/csv/OMOP_CDMv5.5_Field_Level.csv @@ -469,7 +469,7 @@ Clinical Finding, Ingredient, etc.",NA,false,false,NA,NA,NA,NA concept_class,concept_class_concept_id,true,integer,A Concept that represents the Concept Class.,NA,false,true,CONCEPT,CONCEPT_ID,NA,NA concept_relationship,concept_id_1,true,integer,NA,NA,false,true,CONCEPT,CONCEPT_ID,NA,NA concept_relationship,concept_id_2,true,integer,NA,NA,false,true,CONCEPT,CONCEPT_ID,NA,NA -concept_relationship,relationship_id,true,varchar(20),"The relationship between CONCEPT_ID_1 and CONCEPT_ID_2. Please see the [Vocabulary Conventions](https://ohdsi.github.io/CommonDataModel/dataModelConventions.html#concept_relationships). for more information.",NA,false,true,RELATIONSHIP,RELATIONSHIP_ID,NA,NA +concept_relationship,relationship_id,true,varchar(20),"The relationship between CONCEPT_ID_1 and CONCEPT_ID_2. Please see the [Vocabulary Conventions](https://ohdsi.github.io/CommonDataModel/dataModelConventions.html#concept-relationships). for more information.",NA,false,true,RELATIONSHIP,RELATIONSHIP_ID,NA,NA concept_relationship,valid_start_date,true,date,The date when the relationship is first recorded.,NA,false,false,NA,NA,NA,NA concept_relationship,valid_end_date,true,date,The date when the relationship is invalidated.,NA,false,false,NA,NA,NA,NA concept_relationship,invalid_reason,false,varchar(1),"Reason the relationship was invalidated. Possible values are 'D' (deleted), 'U' (updated) or NULL.",NA,false,false,NA,NA,NA,NA diff --git a/inst/csv/OMOP_CDMv5.5_Table_Level.csv b/inst/csv/OMOP_CDMv5.5_Table_Level.csv index 3e751886..b0f34286 100644 --- a/inst/csv/OMOP_CDMv5.5_Table_Level.csv +++ b/inst/csv/OMOP_CDMv5.5_Table_Level.csv @@ -55,14 +55,14 @@ payer_plan_period,CDM,FALSE,NA,TRUE,0,NA,"The PAYER_PLAN_PERIOD table captures d cost,CDM,FALSE,NA,FALSE,NA,NA,"The COST table captures records containing the cost of any medical event recorded in one of the OMOP clinical event tables such as DRUG_EXPOSURE, PROCEDURE_OCCURRENCE, VISIT_OCCURRENCE, VISIT_DETAIL, DEVICE_OCCURRENCE, OBSERVATION or MEASUREMENT. Each record in the cost table account for the amount of money transacted for the clinical event. So, the COST table may be used to represent both receivables (charges) and payments (paid), each transaction type represented by its COST_CONCEPT_ID. The COST_TYPE_CONCEPT_ID field will use concepts in the Standardized Vocabularies to designate the source (provenance) of the cost data. A reference to the health plan information in the PAYER_PLAN_PERIOD table is stored in the record for information used for the adjudication system to determine the persons benefit for the clinical event.","When dealing with summary costs, the cost of the goods or services the provider provides is often not known directly, but derived from the hospital charges multiplied by an average cost-to-charge ratio.","One cost record is generated for each response by a payer. In a claims databases, the payment and payment terms reported by the payer for the goods or services billed will generate one cost record. If the source data has payment information for more than one payer (i.e. primary insurance and secondary insurance payment for one entity), then a cost record is created for each reporting payer. Therefore, it is possible for one procedure to have multiple cost records for each payer, but typically it contains one or no record per entity. Payer reimbursement cost records will be identified by using the PAYER_PLAN_ID field. Drug costs are composed of ingredient cost (the amount charged by the wholesale distributor or manufacturer), the dispensing fee (the amount charged by the pharmacy and the sales tax)." -drug_era,CDM,FALSE,NA,TRUE,0,NA,"A Drug Era is defined as a span of time when the Person is assumed to be exposed to a particular active ingredient. A Drug Era is not the same as a Drug Exposure: Exposures are individual records corresponding to the source when Drug was delivered to the Person, while successive periods of Drug Exposures are combined under certain rules to produce continuous Drug Eras. Every record in the DRUG_EXPOSURE table should be part of a drug era based on the dates of exposure. ",NA,The SQL script for generating DRUG_ERA records can be found [here](https://ohdsi.github.io/CommonDataModel/sqlScripts.html#drug_eras). +drug_era,CDM,FALSE,NA,TRUE,0,NA,"A Drug Era is defined as a span of time when the Person is assumed to be exposed to a particular active ingredient. A Drug Era is not the same as a Drug Exposure: Exposures are individual records corresponding to the source when Drug was delivered to the Person, while successive periods of Drug Exposures are combined under certain rules to produce continuous Drug Eras. Every record in the DRUG_EXPOSURE table should be part of a drug era based on the dates of exposure. ",NA,The SQL script for generating DRUG_ERA records can be found [here](https://ohdsi.github.io/CommonDataModel/sqlScripts.html#drug-eras). dose_era,CDM,FALSE,NA,TRUE,0,NA,A Dose Era is defined as a span of time when the Person is assumed to be exposed to a constant dose of a specific active ingredient.,NA,"Dose Eras will be derived from records in the DRUG_EXPOSURE table and the Dose information from the DRUG_STRENGTH table using a standardized algorithm. Dose Form information is not taken into account. So, if the patient changes between different formulations, or different manufacturers with the same formulation, the Dose Era is still spanning the entire time of exposure to the Ingredient." condition_era,CDM,FALSE,NA,TRUE,0,NA,"A Condition Era is defined as a span of time when the Person is assumed to have a given condition. Similar to Drug Eras, Condition Eras are chronological periods of Condition Occurrence and every Condition Occurrence record should be part of a Condition Era. Combining individual Condition Occurrences into a single Condition Era serves two purposes: - It allows aggregation of chronic conditions that require frequent ongoing care, instead of treating each Condition Occurrence as an independent event. - It allows aggregation of multiple, closely timed doctor visits for the same Condition to avoid double-counting the Condition Occurrences. For example, consider a Person who visits her Primary Care Physician (PCP) and who is referred to a specialist. At a later time, the Person visits the specialist, who confirms the PCP's original diagnosis and provides the appropriate treatment to resolve the condition. These two independent doctor visits should be aggregated into one Condition Era.",NA,"Each Condition Era corresponds to one or many Condition Occurrence records that form a continuous interval. -The condition_concept_id field contains Concepts that are identical to those of the CONDITION_OCCURRENCE table records that make up the Condition Era. In contrast to Drug Eras, Condition Eras are not aggregated to contain Conditions of different hierarchical layers. The SQl Script for generating CONDITION_ERA records can be found [here](https://ohdsi.github.io/CommonDataModel/sqlScripts.html#condition_eras) +The condition_concept_id field contains Concepts that are identical to those of the CONDITION_OCCURRENCE table records that make up the Condition Era. In contrast to Drug Eras, Condition Eras are not aggregated to contain Conditions of different hierarchical layers. The SQl Script for generating CONDITION_ERA records can be found [here](https://ohdsi.github.io/CommonDataModel/sqlScripts.html#condition-eras) The Condition Era Start Date is the start date of the first Condition Occurrence. The Condition Era End Date is the end date of the last Condition Occurrence. Condition Eras are built with a Persistence Window of 30 days, meaning, if no occurrence of the same condition_concept_id happens within 30 days of any one occurrence, it will be considered the condition_era_end_date." episode,CDM,FALSE,NA,FALSE,NA,NA,"The EPISODE table aggregates lower-level clinical events (VISIT_OCCURRENCE, DRUG_EXPOSURE, PROCEDURE_OCCURRENCE, DEVICE_EXPOSURE) into a higher-level abstraction representing clinically and analytically relevant disease phases,outcomes and treatments. The EPISODE_EVENT table connects qualifying clinical events (VISIT_OCCURRENCE, DRUG_EXPOSURE, PROCEDURE_OCCURRENCE, DEVICE_EXPOSURE) to the appropriate EPISODE entry. For example cancers including their development over time, their treatment, and final resolution.","Valid Episode Concepts belong to the 'Episode' domain. For more information on how to populate this table, please see the [article](https://ohdsi.github.io/OncologyWG/model.html#episodes) on the Oncology Workgroup website. If your source data does not have all episodes that are relevant to the therapeutic area, write only those you can easily derive from the data. It is understood that that table is not currently expected to be comprehensive.",NA diff --git a/site/cdm54erd.qmd b/site/cdm54erd.qmd index 9a99dbf1..0abe28a5 100644 --- a/site/cdm54erd.qmd +++ b/site/cdm54erd.qmd @@ -20,4 +20,4 @@ format: html Late in 2022 we held a community contest to find the best entity-relationship diagram and we crowned two winners! Martijn Schuemie and Renske Los created the best printable version and Vishnu Chandrabalan created the best [interactive version](https://omop-erd.surge.sh/). -![CDM v5.4 Printable ERD - [click here to download](https://github.com/OHDSI/CommonDataModel/raw/main/rmd/images/erd.jpg)](man/images/erd.jpg){width=150%} +![CDM v5.4 Printable ERD - [click here to download](https://github.com/OHDSI/CommonDataModel/raw/main/site/man/images/erd.jpg)](man/images/erd.jpg){width=150%} diff --git a/site/cdm60.qmd b/site/cdm60.qmd index 7966d01e..85bdba82 100644 --- a/site/cdm60.qmd +++ b/site/cdm60.qmd @@ -19,7 +19,7 @@ Below is the specification document for the OMOP Common Data Model, v6.0. Each t - All primary keys were changed to bigint - The name of ADMISSION_SOURCE_CONCEPT_ID was changed to ADMITTED_FROM_CONCEPT_ID in [VISIT_OCCURRENCE](https://ohdsi.github.io/CommonDataModel/cdm60.html#visit_occurrence) and [VISIT_DETAIL](https://ohdsi.github.io/CommonDataModel/cdm60.html#visit_detail) - All Concept_Ids are now mandatory except for UNIT_CONCEPT_ID, VALUE_AS_CONCEPT_ID, and OPERATOR_CONCEPT_ID. If there is no value available then a Concept_Id should be set to 0 instead of NULL. -- [DEATH](https://ohdsi.github.io/CommonDataModel/cdm531.html#death) table removed and DEATH_DATETIME field added to the [PERSON](https://ohdsi.github.io/CommonDataModel/cdm60.html#person) table. Cause of death is stored in the [CONDITION_OCCURRENCE](https://ohdsi.github.io/CommonDataModel/cdm60.html#condition_occurrence) +- [DEATH](https://ohdsi.github.io/CommonDataModel/cdm53.html#death) table removed and DEATH_DATETIME field added to the [PERSON](https://ohdsi.github.io/CommonDataModel/cdm60.html#person) table. Cause of death is stored in the [CONDITION_OCCURRENCE](https://ohdsi.github.io/CommonDataModel/cdm60.html#condition_occurrence) - DATETIME fields were made mandatory and date fields were made optional. ```{r docLoop60, echo=FALSE, results='asis'} diff --git a/site/customConcepts.qmd b/site/customConcepts.qmd index e82086ce..3b37f77a 100644 --- a/site/customConcepts.qmd +++ b/site/customConcepts.qmd @@ -89,7 +89,7 @@ After creating these records, we can use the custom concept in our ETL to popula | valid_end_date | 2099-12-31 | | invalid_reason | `NULL` | -See the [Source To Standard query](https://ohdsi.github.io/CommonDataModel/sqlScripts.html#Source_to_Standard) to map a code in the source data to a standard concept. +See the [Source To Standard query](https://ohdsi.github.io/CommonDataModel/sqlScripts.html#source-to-standard) to map a code in the source data to a standard concept. ## Getting your vocabulary into the OMOP vocabularies diff --git a/site/faq.qmd b/site/faq.qmd index 5d6697f5..cc1df330 100644 --- a/site/faq.qmd +++ b/site/faq.qmd @@ -23,11 +23,11 @@ It is expected that all tables will be present in a CDM though it is not a requi * [Observation_period](https://ohdsi.github.io/CommonDataModel/cdm54.html#observation_period): Contains records which uniquely define the spans of time for which a Person is at-risk to have clinical events recorded within the source systems. * [CDM_Source](https://ohdsi.github.io/CommonDataModel/cdm54.html#cdm_source): Contains information on the CDM instance including the vocabulary version used, the date the native data were released and the date the CDM was released. -It is then up to you which tables to populate, though the core event tables are generally agreed upon to be [Condition_occurrence](https://ohdsi.github.io/CommonDataModel/cdm54.html#CONDITION_OCCURRENCE), [Procedure_occurrence](https://ohdsi.github.io/CommonDataModel/cdm54.html#PROCEDURE_OCCURRENCE), [Drug_exposure](https://ohdsi.github.io/CommonDataModel/cdm54.html#DRUG_EXPOSURE), [Measurement](https://ohdsi.github.io/CommonDataModel/cdm54.html#MEASUREMENT), and [Observation](https://ohdsi.github.io/CommonDataModel/cdm54.html#OBSERVATION). Each table has certain required fields, a full list of which can be found on the Common Data Model [wiki page](https://ohdsi.github.io/CommonDataModel/cdm54.html#). +It is then up to you which tables to populate, though the core event tables are generally agreed upon to be [Condition_occurrence](https://ohdsi.github.io/CommonDataModel/cdm54.html#condition_occurrence), [Procedure_occurrence](https://ohdsi.github.io/CommonDataModel/cdm54.html#procedure_occurrence), [Drug_exposure](https://ohdsi.github.io/CommonDataModel/cdm54.html#drug_exposure), [Measurement](https://ohdsi.github.io/CommonDataModel/cdm54.html#measurement), and [Observation](https://ohdsi.github.io/CommonDataModel/cdm54.html#observation). Each table has certain required fields, a full list of which can be found on the Common Data Model [wiki page](https://ohdsi.github.io/CommonDataModel/cdm54.html#). **4. Does the data model include any derived information? Which tables or values are derived?** -The common data model stores verbatim data from the source across various clinical domains, such as records for conditions, drugs, procedures, and measurements. In addition, to assist the analyst, the common data model also provides some derived tables, based on commonly used analytic procedures. For example, the [Condition_era](https://ohdsi.github.io/CommonDataModel/cdm54.html#CONDITION_ERA) table is derived from the [Condition_occurrence](https://ohdsi.github.io/CommonDataModel/cdm54.html#CONDITION_OCCURENCE) table and both the [Drug_era](https://ohdsi.github.io/CommonDataModel/cdm54.html#DRUG_ERA) and [Dose_era](https://ohdsi.github.io/CommonDataModel/cdm54.html#DOSE_ERA) tables are derived from the [Drug_exposure](https://ohdsi.github.io/CommonDataModel/cdm54.html#DRUG_EXPOSURE) table. An era is defined as a span of time when a patient is assumed to have a given condition or exposure to a particular active ingredient. Members of the community have written code to create these tables and it is out on the [github](https://github.com/OHDSI/CommonDataModel/tree/master/CodeExcerpts/DerivedTables) if you choose to use it in your CDM build. It is important to reinforce, the analyst has the opportunity, but not the obligation, to use any of the derived tables and all of the source data is still available for direct use if the analysis calls for different assumptions. +The common data model stores verbatim data from the source across various clinical domains, such as records for conditions, drugs, procedures, and measurements. In addition, to assist the analyst, the common data model also provides some derived tables, based on commonly used analytic procedures. For example, the [Condition_era](https://ohdsi.github.io/CommonDataModel/cdm54.html#condition_era) table is derived from the [Condition_occurrence](https://ohdsi.github.io/CommonDataModel/cdm54.html#condition_occurrence) table and both the [Drug_era](https://ohdsi.github.io/CommonDataModel/cdm54.html#drug_era) and [Dose_era](https://ohdsi.github.io/CommonDataModel/cdm54.html#dose_era) tables are derived from the [Drug_exposure](https://ohdsi.github.io/CommonDataModel/cdm54.html#drug_exposure) table. An era is defined as a span of time when a patient is assumed to have a given condition or exposure to a particular active ingredient. Members of the community have written code to create these tables and it is out on the [github](https://ohdsi.github.io/CommonDataModel/sqlScripts.html#era-tables) if you choose to use it in your CDM build. It is important to reinforce, the analyst has the opportunity, but not the obligation, to use any of the derived tables and all of the source data is still available for direct use if the analysis calls for different assumptions. **5. How is age captured in the model?** @@ -65,7 +65,7 @@ An observation period is considered as the time at which a patient is at-risk to **12. Do I have to map my source codes to Standard Concepts myself? Are there vocabulary mappings that already exist for me to leverage?** -If your data use any of the 55 source vocabularies that are currently supported, the mappings have been done for you. The full list is available from the open-source [ATHENA](https://athena.ohdsi.org/search-terms/terms) tool under the download tab (see below). You can choose to download the ten [vocabulary tables](https://ohdsi.github.io/CommonDataModel/cdm54.html#Standardized-Vocabularies) from there as well – you will need a copy in your environment if you plan on building a CDM. +If your data use any of the 55 source vocabularies that are currently supported, the mappings have been done for you. The full list is available from the open-source [ATHENA](https://athena.ohdsi.org/search-terms/terms) tool under the download tab (see below). You can choose to download the ten [vocabulary tables](https://ohdsi.github.io/CommonDataModel/cdm54.html#vocabulary-tables) from there as well – you will need a copy in your environment if you plan on building a CDM. ![](man/images/Athena_download_box.png) @@ -73,7 +73,7 @@ The [ATHENA](https://athena.ohdsi.org/search-terms/terms) tool also allows you t **13. If I want to apply the mappings myself, can I do so? Are they transparent to all users?** -Yes, all mappings are available in the [Concept_relationship](https://ohdsi.github.io/CommonDataModel/cdm54.html#CONCEPT_RELATIONSHIP) table (which can be downloaded from [ATHENA](https://athena.ohdsi.org/search-terms/terms)). Each value in a supported source terminology is assigned a Concept_id (which is considered non-standard). Each Source_concept_id will have a mapping to a Standard_concept_id. For example: +Yes, all mappings are available in the [Concept_relationship](https://ohdsi.github.io/CommonDataModel/cdm54.html#concept_relationship) table (which can be downloaded from [ATHENA](https://athena.ohdsi.org/search-terms/terms)). Each value in a supported source terminology is assigned a Concept_id (which is considered non-standard). Each Source_concept_id will have a mapping to a Standard_concept_id. For example: ![](man/images/Sepsis_to_SNOMED.png) diff --git a/site/indices-primary-foreign.qmd b/site/indices-primary-foreign.qmd index 2a7b40d9..893e3692 100644 --- a/site/indices-primary-foreign.qmd +++ b/site/indices-primary-foreign.qmd @@ -16,7 +16,7 @@ Should your database of choice support indexing, the OMOP CDM Working Group reco * Indexing on all columns containing an "_id" (e.g. condition_occurrence_id, drug_exposure_id, measurement_id, procedure_occurrence_id, etc.) * Indexing on primary and foreign keys -For all databases, regardless of custom indice support, primary and foreign keys should be set. This is a step towards ensuring data integrity. Information on what table level attributes should be set as primary and foreign keys can be found within the *_Field_Level.csv file(s) located in the [INST/CSV directory](https://github.com/OHDSI/CommonDataModel/tree/v5.4/inst/csv) +For all databases, regardless of custom indice support, primary and foreign keys should be set. This is a step towards ensuring data integrity. Information on what table level attributes should be set as primary and foreign keys can be found within the *_Field_Level.csv file(s) located in the [INST/CSV directory](https://github.com/OHDSI/CommonDataModel/tree/main/inst/csv) ## Database support The OHDSI/CommonDataModel package leverages OHDSI/SQLRender and as a result is only capable of supporting sources that are supported by OHDSI/SQLRender. The following databases are currently supported. @@ -26,7 +26,7 @@ The OHDSI/CommonDataModel package leverages OHDSI/SQLRender and as a result is o ### PostgreSQL ### Amazon Redshift -On AWS Redshift it is important to ensure that your data is properly distributed and sorted across nodes. Compression on certain columns may also help. The designed DDL does set DISTKEYS in an effort to optimize performance. This configuration can be seen within the [Redshift-specific DDL](https://github.com/OHDSI/CommonDataModel/blob/v5.4/ddl/5.4/redshift/OMOPCDM_redshift_5.4_ddl.sql). +On AWS Redshift it is important to ensure that your data is properly distributed and sorted across nodes. Compression on certain columns may also help. The designed DDL does set DISTKEYS in an effort to optimize performance. This configuration can be seen within the [Redshift-specific DDL](https://github.com/OHDSI/CommonDataModel/blob/main/inst/ddl/5.4/redshift/OMOPCDM_redshift_5.4_ddl.sql). ### Impala ### IBM Netezza