From 2ba2bf2a5ab53dd1984a998d5abf766e5f9b856b Mon Sep 17 00:00:00 2001 From: schuemie Date: Fri, 24 Jun 2016 08:13:05 +0200 Subject: [PATCH] Added support for CDM v5.0.1. and made it the default. --- .../ohdsi/rabbitInAHat/RabbitInAHatMain.java | 13 +- .../rabbitInAHat/dataModel/CDMV5.0.1.csv | 269 ++++++++++++++++++ .../rabbitInAHat/dataModel/Database.java | 3 +- 3 files changed, 282 insertions(+), 3 deletions(-) create mode 100644 src/org/ohdsi/rabbitInAHat/dataModel/CDMV5.0.1.csv diff --git a/src/org/ohdsi/rabbitInAHat/RabbitInAHatMain.java b/src/org/ohdsi/rabbitInAHat/RabbitInAHatMain.java index b689a4e4..821e2f5a 100644 --- a/src/org/ohdsi/rabbitInAHat/RabbitInAHatMain.java +++ b/src/org/ohdsi/rabbitInAHat/RabbitInAHatMain.java @@ -64,7 +64,8 @@ public class RabbitInAHatMain implements ResizeListener, ActionListener { public final static String ACTION_CMD_MAKE_MAPPING = "Make Mappings"; public final static String ACTION_CMD_REMOVE_MAPPING = "Remove Mappings"; public final static String ACTION_CMD_SET_TARGET_V4 = "CDM v4"; - public final static String ACTION_CMD_SET_TARGET_V5 = "CDM v5"; + public final static String ACTION_CMD_SET_TARGET_V5 = "CDM v5.0.0"; + public final static String ACTION_CMD_SET_TARGET_V501 = "CDM v5.0.1"; public final static String ACTION_CMD_SET_TARGET_CUSTOM = "Load Custom..."; public final static String ACTION_CMD_MARK_COMPLETED = "Mark Highlighted As Complete"; public final static String ACTION_CMD_UNMARK_COMPLETED = "Mark Highlighted As Incomplete"; @@ -109,7 +110,7 @@ public void windowClosing(WindowEvent e) { frame.setJMenuBar(createMenuBar()); ETL etl = new ETL(); - etl.setTargetDatabase(Database.generateCDMModel(CDMVersion.CDMV5)); + etl.setTargetDatabase(Database.generateCDMModel(CDMVersion.CDMV501)); ObjectExchange.etl = etl; @@ -242,6 +243,11 @@ private JMenuBar createMenuBar() { targetCDMV5.addActionListener(this); targetCDMV5.setActionCommand(ACTION_CMD_SET_TARGET_V5); setTarget.add(targetCDMV5); + + JMenuItem targetCDMV501 = new JMenuItem(ACTION_CMD_SET_TARGET_V501); + targetCDMV501.addActionListener(this); + targetCDMV501.setActionCommand(ACTION_CMD_SET_TARGET_V501); + setTarget.add(targetCDMV501); JMenuItem loadTarget = new JMenuItem(ACTION_CMD_SET_TARGET_CUSTOM); loadTarget.addActionListener(this); @@ -388,6 +394,9 @@ public void actionPerformed(ActionEvent event) { case ACTION_CMD_SET_TARGET_V5: doSetTargetCDM(CDMVersion.CDMV5); break; + case ACTION_CMD_SET_TARGET_V501: + doSetTargetCDM(CDMVersion.CDMV501); + break; case ACTION_CMD_SET_TARGET_CUSTOM: doSetTargetCustom(chooseOpenPath(FILE_FILTER_CSV)); break; diff --git a/src/org/ohdsi/rabbitInAHat/dataModel/CDMV5.0.1.csv b/src/org/ohdsi/rabbitInAHat/dataModel/CDMV5.0.1.csv new file mode 100644 index 00000000..8408ae68 --- /dev/null +++ b/src/org/ohdsi/rabbitInAHat/dataModel/CDMV5.0.1.csv @@ -0,0 +1,269 @@ +TABLE_NAME,COLUMN_NAME,IS_NULLABLE,DATA_TYPE,DESCRIPTION +LOCATION,LOCATION_ID,NO,INTEGER,A unique identifier for each geographic location. +LOCATION,ADDRESS_1,YES,CHARACTER VARYING,"The address field 1, typically used for the street address, as it appears in the source data." +LOCATION,ADDRESS_2,YES,CHARACTER VARYING,"The address field 2, typically used for additional detail such as buildings, suites, floors, as it appears in the source data." +LOCATION,CITY,YES,CHARACTER VARYING,The city field as it appears in the source data. +LOCATION,STATE,YES,CHARACTER VARYING,The state field as it appears in the source data. +LOCATION,ZIP,YES,CHARACTER VARYING,The zip or postal code. +LOCATION,COUNTY,YES,CHARACTER VARYING,The county. +LOCATION,LOCATION_SOURCE_VALUE,YES,CHARACTER VARYING,The verbatim information that is used to uniquely identify the location as it appears in the source data. +PERSON,PERSON_ID,NO,INTEGER,A unique identifier for each person. +PERSON,GENDER_CONCEPT_ID,NO,INTEGER,A foreign key that refers to an identifier in the CONCEPT table for the unique gender of the person. +PERSON,YEAR_OF_BIRTH,NO,INTEGER,"The year of birth of the person. For data sources with date of birth, the year is extracted. For data sources where the year of birth is not available, the approximate year of birth is derived based on any age group categorization available." +PERSON,MONTH_OF_BIRTH,YES,INTEGER,"The month of birth of the person. For data sources that provide the precise date of birth, the month is extracted and stored in this field." +PERSON,DAY_OF_BIRTH,YES,INTEGER,"The day of the month of birth of the person. For data sources that provide the precise date of birth, the day is extracted and stored in this field." +PERSON,TIME_OF_BIRTH,YES,CHARACTER VARYING,The time of birth at the birth day +PERSON,RACE_CONCEPT_ID,NO,INTEGER,A foreign key that refers to an identifier in the CONCEPT table for the unique race of the person. +PERSON,ETHNICITY_CONCEPT_ID,NO,INTEGER,A foreign key that refers to the standard concept identifier in the Standardized Vocabularies for the ethnicity of the person. +PERSON,LOCATION_ID,YES,INTEGER,"A foreign key to the place of residency for the person in the location table, where the detailed address information is stored." +PERSON,PROVIDER_ID,YES,INTEGER,A foreign key to the primary care provider the person is seeing in the provider table. +PERSON,CARE_SITE_ID,YES,INTEGER,"A foreign key to the site of primary care in the care_site table, where the details of the care site are stored." +PERSON,PERSON_SOURCE_VALUE,YES,CHARACTER VARYING,An (encrypted) key derived from the person identifier in the source data. This is necessary when a use case requires a link back to the person data at the source dataset. +PERSON,GENDER_SOURCE_VALUE,YES,CHARACTER VARYING,The source code for the gender of the person as it appears in the source data. The person’s gender is mapped to a standard gender concept in the Standardized Vocabularies; the original value is stored here for reference. +PERSON,GENDER_SOURCE_CONCEPT_ID,YES,INTEGER,A foreign key to the gender concept that refers to the code used in the source. +PERSON,RACE_SOURCE_VALUE,YES,CHARACTER VARYING,The source code for the race of the person as it appears in the source data. The person race is mapped to a standard race concept in the Standardized Vocabularies and the original value is stored here for reference. +PERSON,RACE_SOURCE_CONCEPT_ID,YES,INTEGER,A foreign key to the race concept that refers to the code used in the source. +PERSON,ETHNICITY_SOURCE_VALUE,YES,CHARACTER VARYING,"The source code for the ethnicity of the person as it appears in the source data. The person ethnicity is mapped to a standard ethnicity concept in the Standardized Vocabularies and the original code is, stored here for reference." +PERSON,ETHNICITY_SOURCE_CONCEPT_ID,YES,INTEGER,A foreign key to the ethnicity concept that refers to the code used in the source. +OBSERVATION_PERIOD,OBSERVATION_PERIOD_ID,NO,INTEGER,A unique identifier for each observation period. +OBSERVATION_PERIOD,PERSON_ID,NO,INTEGER,A foreign key identifier to the person for whom the observation period is defined. The demographic details of that person are stored in the person table. +OBSERVATION_PERIOD,OBSERVATION_PERIOD_START_DATE,NO,DATE,The start date of the observation period for which data are available from the data source. +OBSERVATION_PERIOD,OBSERVATION_PERIOD_END_DATE,NO,DATE,The end date of the observation period for which data are available from the data source. +OBSERVATION_PERIOD,PERIOD_TYPE_CONCEPT_ID,NO,INTEGER,A foreign key identifier to the predefined concept in the Standardized Vocabularies reflecting the source of the observation period information +CARE_SITE,CARE_SITE_ID,NO,INTEGER,A unique identifier for each Care Site. +CARE_SITE,CARE_SITE_NAME,YES,CHARACTER VARYING,The description or name of the Care Site +CARE_SITE,PLACE_OF_SERVICE_CONCEPT_ID,YES,INTEGER,A foreign key that refers to a Place of Service Concept ID in the Standardized Vocabularies. +CARE_SITE,LOCATION_ID,YES,INTEGER,"A foreign key to the geographic Location of the Care Site in the LOCATION table, where the detailed address information is stored." +CARE_SITE,CARE_SITE_SOURCE_VALUE,YES,CHARACTER VARYING,"The identifier for the Care Site in the source data, stored here for reference." +CARE_SITE,PLACE_OF_SERVICE_SOURCE_VALUE,YES,CHARACTER VARYING,"The source code for the Place of Service as it appears in the source data, stored here for reference." +VISIT_OCCURRENCE,VISIT_OCCURRENCE_ID,NO,INTEGER,A unique identifier for each Person's visit or encounter at a healthcare provider. +VISIT_OCCURRENCE,PERSON_ID,NO,INTEGER,A foreign key identifier to the Person for whom the visit is recorded. The demographic details of that Person are stored in the PERSON table. +VISIT_OCCURRENCE,VISIT_CONCEPT_ID,NO,INTEGER,A foreign key that refers to a visit Concept identifier in the Standardized Vocabularies. +VISIT_OCCURRENCE,VISIT_START_DATE,NO,DATE,The start date of the visit. +VISIT_OCCURRENCE,VISIT_START_TIME,YES,CHARACTER VARYING,The time the visit started. +VISIT_OCCURRENCE,VISIT_END_DATE,NO,DATE,The end date of the visit. If this is a one-day visit the end date should match the start date. +VISIT_OCCURRENCE,VISIT_END_TIME,YES,CHARACTER VARYING,The time the visit ended. +VISIT_OCCURRENCE,VISIT_TYPE_CONCEPT_ID,NO,INTEGER,A foreign key to the predefined Concept identifier in the Standardized Vocabularies reflecting the type of source data from which the visit record is derived. +VISIT_OCCURRENCE,PROVIDER_ID,YES,INTEGER,A foreign key to the provider in the provider table who was associated with the visit. +VISIT_OCCURRENCE,CARE_SITE_ID,YES,INTEGER,A foreign key to the care site in the care site table that was visited. +VISIT_OCCURRENCE,VISIT_SOURCE_VALUE,YES,CHARACTER VARYING,The source code for the visit as it appears in the source data. +VISIT_OCCURRENCE,VISIT_SOURCE_CONCEPT_ID,YES,INTEGER,A foreign key to a Concept that refers to the code used in the source. +PROVIDER,PROVIDER_ID,NO,INTEGER,A unique identifier for each Provider. +PROVIDER,PROVIDER_NAME,YES,CHARACTER VARYING,A description of the Provider. +PROVIDER,NPI,YES,CHARACTER VARYING,The National Provider Identifier (NPI) of the provider. +PROVIDER,DEA,YES,CHARACTER VARYING,The Drug Enforcement Administration (DEA) number of the provider. +PROVIDER,SPECIALTY_CONCEPT_ID,YES,INTEGER,A foreign key to a Standard Specialty Concept ID in the Standardized Vocabularies. +PROVIDER,CARE_SITE_ID,YES,INTEGER,A foreign key to the main Care Site where the provider is practicing. +PROVIDER,YEAR_OF_BIRTH,YES,INTEGER,The year of birth of the Provider. +PROVIDER,GENDER_CONCEPT_ID,YES,INTEGER,The gender of the Provider. +PROVIDER,PROVIDER_SOURCE_VALUE,YES,CHARACTER VARYING,"The identifier used for the Provider in the source data, stored here for reference." +PROVIDER,SPECIALTY_SOURCE_VALUE,YES,CHARACTER VARYING,"The source code for the Provider specialty as it appears in the source data, stored here for reference." +PROVIDER,SPECIALTY_SOURCE_CONCEPT_ID,YES,INTEGER,A foreign key to a Concept that refers to the code used in the source. +PROVIDER,GENDER_SOURCE_VALUE,YES,CHARACTER VARYING,"The gender code for the Provider as it appears in the source data, stored here for reference." +PROVIDER,GENDER_SOURCE_CONCEPT_ID,YES,INTEGER,A foreign key to a Concept that refers to the code used in the source. +CONDITION_OCCURRENCE,CONDITION_OCCURRENCE_ID,NO,INTEGER,A unique identifier for each Condition Occurrence event. +CONDITION_OCCURRENCE,PERSON_ID,NO,INTEGER,A foreign key identifier to the Person who is experiencing the condition. The demographic details of that Person are stored in the PERSON table. +CONDITION_OCCURRENCE,CONDITION_CONCEPT_ID,NO,INTEGER,A foreign key that refers to a Standard Condition Concept identifier in the Standardized Vocabularies. +CONDITION_OCCURRENCE,CONDITION_START_DATE,NO,DATE,The date when the instance of the Condition is recorded. +CONDITION_OCCURRENCE,CONDITION_END_DATE,YES,DATE,The date when the instance of the Condition is considered to have ended. +CONDITION_OCCURRENCE,CONDITION_TYPE_CONCEPT_ID,NO,INTEGER,"A foreign key to the predefined Concept identifier in the Standardized Vocabularies reflecting the source data from which the condition was recorded, the level of standardization, and the type of occurrence." +CONDITION_OCCURRENCE,STOP_REASON,YES,CHARACTER VARYING,"The reason that the condition was no longer present, as indicated in the source data." +CONDITION_OCCURRENCE,PROVIDER_ID,YES,INTEGER,A foreign key to the Provider in the PROVIDER table who was responsible for capturing (diagnosing) the Condition. +CONDITION_OCCURRENCE,VISIT_OCCURRENCE_ID,YES,INTEGER,A foreign key to the visit in the VISIT table during which the Condition was determined (diagnosed). +CONDITION_OCCURRENCE,CONDITION_SOURCE_VALUE,YES,CHARACTER VARYING,The source code for the condition as it appears in the source data. This code is mapped to a standard condition concept in the Standardized Vocabularies and the original code is stored here for reference. +CONDITION_OCCURRENCE,CONDITION_SOURCE_CONCEPT_ID,YES,INTEGER,A foreign key to a Condition Concept that refers to the code used in the source. +DEATH,PERSON_ID,NO,INTEGER,A foreign key identifier to the deceased person. The demographic details of that person are stored in the person table. +DEATH,DEATH_DATE,NO,DATE,"The date the person was deceased. If the precise date including day or month is not known or not allowed, December is used as the default month, and the last day of the month the default day." +DEATH,DEATH_TYPE_CONCEPT_ID,NO,INTEGER,A foreign key referring to the predefined concept identifier in the Standardized Vocabularies reflecting how the death was represented in the source data. +DEATH,CAUSE_CONCEPT_ID,YES,INTEGER,A foreign key referring to a standard concept identifier in the Standardized Vocabularies for conditions. +DEATH,CAUSE_SOURCE_VALUE,YES,CHARACTER VARYING,"The source code for the cause of death as it appears in the source data. This code is mapped to a standard concept in the Standardized Vocabularies and the original code is, stored here for reference." +DEATH,CAUSE_SOURCE_CONCEPT_ID,YES,INTEGER,"A foreign key to the concept that refers to the code used in the source. Note, this variable name is abbreviated to ensure it will be allowable across database platforms." +DRUG_EXPOSURE,DRUG_EXPOSURE_ID,NO,INTEGER,A system-generated unique identifier for each Drug utilization event. +DRUG_EXPOSURE,PERSON_ID,NO,INTEGER,A foreign key identifier to the person who is subjected to the Drug. The demographic details of that person are stored in the person table. +DRUG_EXPOSURE,DRUG_CONCEPT_ID,NO,INTEGER,A foreign key that refers to a Standard Concept identifier in the Standardized Vocabularies for the Drug concept. +DRUG_EXPOSURE,DRUG_EXPOSURE_START_DATE,NO,DATE,"The start date for the current instance of Drug utilization. Valid entries include a start date of a prescription, the date a prescription was filled, or the date on which a Drug administration procedure was recorded." +DRUG_EXPOSURE,DRUG_EXPOSURE_END_DATE,YES,DATE,The end date for the current instance of Drug utilization. It is not available from all sources. +DRUG_EXPOSURE,DRUG_TYPE_CONCEPT_ID,NO,INTEGER,A foreign key to the predefined Concept identifier in the Standardized Vocabularies reflecting the type of Drug Exposure recorded. It indicates how the Drug Exposure was represented in the source data. +DRUG_EXPOSURE,STOP_REASON,YES,CHARACTER VARYING,"The reason the Drug was stopped. Reasons include regimen completed, changed, removed, etc." +DRUG_EXPOSURE,REFILLS,YES,INTEGER,"The number of refills after the initial prescription. The initial prescription is not counted, values start with 0." +DRUG_EXPOSURE,QUANTITY,YES,NUMERIC,The quantity of drug as recorded in the original prescription or dispensing record. +DRUG_EXPOSURE,DAYS_SUPPLY,YES,INTEGER,The number of days of supply of the medication as recorded in the original prescription or dispensing record. +DRUG_EXPOSURE,SIG,YES,TEXT,The directions (“signetur”) on the Drug prescription as recorded in the original prescription (and printed on the container) or dispensing record. +DRUG_EXPOSURE,ROUTE_CONCEPT_ID,YES,INTEGER,A foreign key to a predefined concept in the Standardized Vocabularies reflecting the route of administration. +DRUG_EXPOSURE,EFFECTIVE_DRUG_DOSE,YES,NUMERIC,Numerical value of Drug dose for this Drug Exposure record. +DRUG_EXPOSURE,DOSE_UNIT_CONCEPT_ID,YES,INTEGER,A foreign key to a predefined concept in the Standardized Vocabularies reflecting the unit the effective_drug_dose value is expressed. +DRUG_EXPOSURE,LOT_NUMBER,YES,CHARACTER VARYING,An identifier assigned to a particular quantity or lot of Drug product from the manufacturer. +DRUG_EXPOSURE,PROVIDER_ID,YES,INTEGER,A foreign key to the provider in the provider table who initiated (prescribed or administered) the Drug Exposure. +DRUG_EXPOSURE,VISIT_OCCURRENCE_ID,YES,INTEGER,A foreign key to the visit in the visit table during which the Drug Exposure was initiated. +DRUG_EXPOSURE,DRUG_SOURCE_VALUE,YES,CHARACTER VARYING,"The source code for the Drug as it appears in the source data. This code is mapped to a Standard Drug concept in the Standardized Vocabularies and the original code is, stored here for reference." +DRUG_EXPOSURE,DRUG_SOURCE_CONCEPT_ID,YES,INTEGER,A foreign key to a Drug Concept that refers to the code used in the source. +DRUG_EXPOSURE,ROUTE_SOURCE_VALUE,YES,CHARACTER VARYING,The information about the route of administration as detailed in the source. +DRUG_EXPOSURE,DOSE_UNIT_SOURCE_VALUE,YES,CHARACTER VARYING,The information about the dose unit as detailed in the source. +DEVICE_EXPOSURE,DEVICE_EXPOSURE_ID,NO,INTEGER,A system-generated unique identifier for each Device Exposure. +DEVICE_EXPOSURE,PERSON_ID,NO,INTEGER,A foreign key identifier to the Person who is subjected to the Device. The demographic details of that person are stored in the Person table. +DEVICE_EXPOSURE,DEVICE_CONCEPT_ID,NO,INTEGER,A foreign key that refers to a Standard Concept identifier in the Standardized Vocabularies for the Device concept. +DEVICE_EXPOSURE,DEVICE_EXPOSURE_START_DATE,NO,DATE,The date the Device or supply was applied or used. +DEVICE_EXPOSURE,DEVICE_EXPOSURE_END_DATE,YES,DATE,The date the Device or supply was removed from use. +DEVICE_EXPOSURE,DEVICE_TYPE_CONCEPT_ID,NO,INTEGER,A foreign key to the predefined Concept identifier in the Standardized Vocabularies reflecting the type of Device Exposure recorded. It indicates how the Device Exposure was represented in the source data. +DEVICE_EXPOSURE,UNIQUE_DEVICE_ID,YES,CHARACTER VARYING,A UDI or equivalent identifying the instance of the Device used in the Person. +DEVICE_EXPOSURE,QUANTITY,YES,INTEGER,The number of individual Devices used for the exposure. +DEVICE_EXPOSURE,PROVIDER_ID,YES,INTEGER,A foreign key to the provider in the PROVIDER table who initiated of administered the Device. +DEVICE_EXPOSURE,VISIT_OCCURRENCE_ID,YES,INTEGER,A foreign key to the visit in the VISIT table during which the device was used. +DEVICE_EXPOSURE,DEVICE_SOURCE_VALUE,YES,CHARACTER VARYING,The source code for the Device as it appears in the source data. This code is mapped to a standard Device Concept in the Standardized Vocabularies and the original code is stored here for reference. +DEVICE_EXPOSURE,DEVICE_SOURCE_CONCEPT_ID,YES,INTEGER,A foreign key to a Device Concept that refers to the code used in the source. +PROCEDURE_OCCURRENCE,PROCEDURE_OCCURRENCE_ID,NO,INTEGER,A system-generated unique identifier for each Procedure Occurrence. +PROCEDURE_OCCURRENCE,PERSON_ID,NO,INTEGER,A foreign key identifier to the Person who is subjected to the Procedure. The demographic details of that Person are stored in the PERSON table. +PROCEDURE_OCCURRENCE,PROCEDURE_CONCEPT_ID,NO,INTEGER,A foreign key that refers to a standard procedure Concept identifier in the Standardized Vocabularies. +PROCEDURE_OCCURRENCE,PROCEDURE_DATE,NO,DATE,The date on which the Procedure was performed. +PROCEDURE_OCCURRENCE,PROCEDURE_TYPE_CONCEPT_ID,NO,INTEGER,A foreign key to the predefined Concept identifier in the Standardized Vocabularies reflecting the type of source data from which the procedure record is derived. +PROCEDURE_OCCURRENCE,MODIFIER_CONCEPT_ID,YES,INTEGER,A foreign key to a Standard Concept identifier for a modifier to the Procedure (e.g. bilateral) +PROCEDURE_OCCURRENCE,QUANTITY,YES,INTEGER,The quantity of procedures ordered or administered. +PROCEDURE_OCCURRENCE,PROVIDER_ID,YES,INTEGER,A foreign key to the provider in the provider table who was responsible for carrying out the procedure. +PROCEDURE_OCCURRENCE,VISIT_OCCURRENCE_ID,YES,INTEGER,A foreign key to the visit in the visit table during which the Procedure was carried out. +PROCEDURE_OCCURRENCE,PROCEDURE_SOURCE_VALUE,YES,CHARACTER VARYING,"The source code for the Procedure as it appears in the source data. This code is mapped to a standard procedure Concept in the Standardized Vocabularies and the original code is, stored here for reference. Procedure source codes are typically ICD-9-Proc, CPT-4, HCPCS or OPCS-4 codes." +PROCEDURE_OCCURRENCE,PROCEDURE_SOURCE_CONCEPT_ID,YES,INTEGER,A foreign key to a Procedure Concept that refers to the code used in the source. +PROCEDURE_OCCURRENCE,QUALIFIER_SOURCE_VALUE,YES,CHARACTER VARYING,The source code for the qualifier as it appears in the source data. +MEASUREMENT,MEASUREMENT_ID,NO,INTEGER,A unique identifier for each Measurement. +MEASUREMENT,PERSON_ID,NO,INTEGER,A foreign key identifier to the Person about whom the measurement was recorded. The demographic details of that Person are stored in the PERSON table. +MEASUREMENT,MEASUREMENT_CONCEPT_ID,NO,INTEGER,A foreign key to the standard measurement concept identifier in the Standardized Vocabularies. +MEASUREMENT,MEASUREMENT_DATE,NO,DATE,The date of the Measurement. +MEASUREMENT,MEASUREMENT_TIME,YES,CHARACTER VARYING,"The time of the Measurement. (Some database systems don't have a datatype of time. To accomodate all temporal analyses, datatype datetime can be used (combining measurement_date and measurement_time)Relevant Forum Discussion" +MEASUREMENT,MEASUREMENT_TYPE_CONCEPT_ID,NO,INTEGER,A foreign key to the predefined Concept in the Standardized Vocabularies reflecting the provenance from where the Measurement record was recorded. +MEASUREMENT,OPERATOR_CONCEPT_ID,YES,INTEGER,"A foreign key identifier to the predefined Concept in the Standardized Vocabularies reflecting the mathematical operator that is applied to the value_as_number. Operators are <, ?, =, ?, >." +MEASUREMENT,VALUE_AS_NUMBER,YES,NUMERIC,A Measurement result where the result is expressed as a numeric value. +MEASUREMENT,VALUE_AS_CONCEPT_ID,YES,INTEGER,"A foreign key to a Measurement result represented as a Concept from the Standardized Vocabularies (e.g., positive/negative, present/absent, low/high, etc.)." +MEASUREMENT,UNIT_CONCEPT_ID,YES,INTEGER,A foreign key to a Standard Concept ID of Measurement Units in the Standardized Vocabularies. +MEASUREMENT,RANGE_LOW,YES,NUMERIC,The lower limit of the normal range of the Measurement result. The lower range is assumed to be of the same unit of measure as the Measurement value. +MEASUREMENT,RANGE_HIGH,YES,NUMERIC,The upper limit of the normal range of the Measurement. The upper range is assumed to be of the same unit of measure as the Measurement value. +MEASUREMENT,PROVIDER_ID,YES,INTEGER,A foreign key to the provider in the PROVIDER table who was responsible for initiating or obtaining the measurement. +MEASUREMENT,VISIT_OCCURRENCE_ID,YES,INTEGER,A foreign key to the Visit in the VISIT_OCCURRENCE table during which the Measurement was recorded. +MEASUREMENT,MEASUREMENT_SOURCE_VALUE,YES,CHARACTER VARYING,The Measurement name as it appears in the source data. This code is mapped to a Standard Concept in the Standardized Vocabularies and the original code is stored here for reference. +MEASUREMENT,MEASUREMENT_SOURCE_CONCEPT_ID,YES,INTEGER,A foreign key to a Concept in the Standard Vocabularies that refers to the code used in the source. +MEASUREMENT,UNIT_SOURCE_VALUE,YES,CHARACTER VARYING,The source code for the unit as it appears in the source data. This code is mapped to a standard unit concept in the Standardized Vocabularies and the original code is stored here for reference. +MEASUREMENT,VALUE_SOURCE_VALUE,YES,CHARACTER VARYING,The source value associated with the content of the value_as_number or value_as_concept as stored in the source data. +OBSERVATION,OBSERVATION_ID,NO,INTEGER,A unique identifier for each observation. +OBSERVATION,PERSON_ID,NO,INTEGER,A foreign key identifier to the Person about whom the observation was recorded. The demographic details of that Person are stored in the PERSON table. +OBSERVATION,OBSERVATION_CONCEPT_ID,NO,INTEGER,A foreign key to the standard observation concept identifier in the Standardized Vocabularies. +OBSERVATION,OBSERVATION_DATE,NO,DATE,The date of the observation. +OBSERVATION,OBSERVATION_TIME,YES,CHARACTER VARYING,The time of the observation. +OBSERVATION,OBSERVATION_TYPE_CONCEPT_ID,NO,INTEGER,A foreign key to the predefined concept identifier in the Standardized Vocabularies reflecting the type of the observation. +OBSERVATION,VALUE_AS_NUMBER,YES,NUMERIC,The observation result stored as a number. This is applicable to observations where the result is expressed as a numeric value. +OBSERVATION,VALUE_AS_STRING,YES,CHARACTER VARYING,The observation result stored as a string. This is applicable to observations where the result is expressed as verbatim text. +OBSERVATION,VALUE_AS_CONCEPT_ID,YES,INTEGER,"A foreign key to an observation result stored as a Concept ID. This is applicable to observations where the result can be expressed as a Standard Concept from the Standardized Vocabularies (e.g., positive/negative, present/absent, low/high, etc.)." +OBSERVATION,QUALIFIER_CONCEPT_ID,YES,INTEGER,"A foreign key to a Standard Concept ID for a qualifier (e.g., severity of drug-drug interaction alert)" +OBSERVATION,UNIT_CONCEPT_ID,YES,INTEGER,A foreign key to a Standard Concept ID of measurement units in the Standardized Vocabularies. +OBSERVATION,PROVIDER_ID,YES,INTEGER,A foreign key to the provider in the PROVIDER table who was responsible for making the observation. +OBSERVATION,VISIT_OCCURRENCE_ID,YES,INTEGER,A foreign key to the visit in the VISIT_OCCURRENCE table during which the observation was recorded. +OBSERVATION,OBSERVATION_SOURCE_VALUE,YES,CHARACTER VARYING,"The observation code as it appears in the source data. This code is mapped to a Standard Concept in the Standardized Vocabularies and the original code is, stored here for reference." +OBSERVATION,OBSERVATION_SOURCE_CONCEPT_ID,YES,INTEGER,A foreign key to a Concept that refers to the code used in the source. +OBSERVATION,UNIT_SOURCE_VALUE,YES,CHARACTER VARYING,"The source code for the unit as it appears in the source data. This code is mapped to a standard unit concept in the Standardized Vocabularies and the original code is, stored here for reference." +OBSERVATION,QUALIFIER_SOURCE_VALUE,YES,CHARACTER VARYING,The source value associated with a qualifier to characterize the observation +NOTE,NOTE_ID,NO,INTEGER,A unique identifier for each note. +NOTE,PERSON_ID,NO,INTEGER,A foreign key identifier to the Person about whom the Note was recorded. The demographic details of that Person are stored in the PERSON table. +NOTE,NOTE_DATE,NO,DATE,The date the note was recorded. +NOTE,NOTE_TIME,YES,CHARACTER VARYING,The time the note was recorded. +NOTE,NOTE_TYPE_CONCEPT_ID,NO,INTEGER,"A foreign key to the predefined Concept in the Standardized Vocabularies reflecting the type, origin or provenance of the Note." +NOTE,NOTE_TEXT,NO,TEXT,The content of the Note. +NOTE,PROVIDER_ID,YES,INTEGER,A foreign key to the Provider in the PROVIDER table who took the Note. +NOTE,VISIT_OCCURRENCE_ID,YES,INTEGER,Foreign key to the Visit in the VISIT_OCCURRENCE table when the Note was taken. +NOTE,NOTE_SOURCE_VALUE,YES,CHARACTER VARYING,"The source value associated with the origin of the Note, as standardized using the note_tyype_concept_id" +SPECIMEN,SPECIMEN_ID,NO,INTEGER,A unique identifier for each specimen. +SPECIMEN,PERSON_ID,NO,INTEGER,A foreign key identifier to the Person for whom the Specimen is recorded. +SPECIMEN,SPECIMEN_CONCEPT_ID,NO,INTEGER,A foreign key referring to a Standard Concept identifier in the Standardized Vocabularies for the Specimen. +SPECIMEN,SPECIMEN_TYPE_CONCEPT_ID,NO,INTEGER,A foreign key referring to the Concept identifier in the Standardized Vocabularies reflecting the system of record from which the Specimen was represented in the source data. +SPECIMEN,SPECIMEN_DATE,NO,DATE,The date the specimen was obtained from the Person. +SPECIMEN,SPECIMEN_TIME,YES,CHARACTER VARYING,The time on the date when the Specimen was obtained from the person. +SPECIMEN,QUANTITY,YES,NUMERIC,The amount of specimen collection from the person during the sampling procedure. +SPECIMEN,UNIT_CONCEPT_ID,YES,INTEGER,A foreign key to a Standard Concept identifier for the Unit associated with the numeric quantity of the Specimen collection. +SPECIMEN,ANATOMIC_SITE_CONCEPT_ID,YES,INTEGER,A foreign key to a Standard Concept identifier for the anatomic location of specimen collection. +SPECIMEN,DISEASE_STATUS_CONCEPT_ID,YES,INTEGER,A foreign key to a Standard Concept identifier for the Disease Status of specimen collection. +SPECIMEN,SPECIMEN_SOURCE_ID,YES,CHARACTER VARYING,The Specimen identifier as it appears in the source data. +SPECIMEN,SPECIMEN_SOURCE_VALUE,YES,CHARACTER VARYING,"The Specimen value as it appears in the source data. This value is mapped to a Standard Concept in the Standardized Vocabularies and the original code is, stored here for reference." +SPECIMEN,UNIT_SOURCE_VALUE,YES,CHARACTER VARYING,The information about the Unit as detailed in the source. +SPECIMEN,ANATOMIC_SITE_SOURCE_VALUE,YES,CHARACTER VARYING,The information about the anatomic site as detailed in the source. +SPECIMEN,DISEASE_STATUS_SOURCE_VALUE,YES,CHARACTER VARYING,The information about the disease status as detailed in the source. +FACT_RELATIONSHIP,DOMAIN_CONCEPT_ID_1,NO,INTEGER,"The concept representing the domain of fact one, from which the corresponding table can be inferred." +FACT_RELATIONSHIP,FACT_ID_1,NO,INTEGER,The unique identifier in the table corresponding to the domain of fact one. +FACT_RELATIONSHIP,DOMAIN_CONCEPT_ID_2,NO,INTEGER,"The concept representing the domain of fact two, from which the corresponding table can be inferred." +FACT_RELATIONSHIP,FACT_ID_2,NO,INTEGER,The unique identifier in the table corresponding to the domain of fact two. +FACT_RELATIONSHIP,RELATIONSHIP_CONCEPT_ID,NO,INTEGER,A foreign key to a Standard Concept ID of relationship in the Standardized Vocabularies. +PAYER_PLAN_PERIOD,PAYER_PLAN_PERIOD_ID,NO,INTEGER,"A identifier for each unique combination of payer, plan, family code and time span." +PAYER_PLAN_PERIOD,PERSON_ID,NO,INTEGER,A foreign key identifier to the Person covered by the payer. The demographic details of that Person are stored in the PERSON table. +PAYER_PLAN_PERIOD,PAYER_PLAN_PERIOD_START_DATE,NO,DATE,The start date of the payer plan period. +PAYER_PLAN_PERIOD,PAYER_PLAN_PERIOD_END_DATE,NO,DATE,The end date of the payer plan period. +PAYER_PLAN_PERIOD,PAYER_SOURCE_VALUE,YES,CHARACTER VARYING,The source code for the payer as it appears in the source data. +PAYER_PLAN_PERIOD,PLAN_SOURCE_VALUE,YES,CHARACTER VARYING,The source code for the Person's health benefit plan as it appears in the source data. +PAYER_PLAN_PERIOD,FAMILY_SOURCE_VALUE,YES,CHARACTER VARYING,The source code for the Person's family as it appears in the source data. +DRUG_ERA,DRUG_ERA_ID,NO,INTEGER,A unique identifier for each Drug Era. +DRUG_ERA,PERSON_ID,NO,INTEGER,A foreign key identifier to the Person who is subjected to the Drug during the fDrug Era. The demographic details of that Person are stored in the PERSON table. +DRUG_ERA,DRUG_CONCEPT_ID,NO,INTEGER,A foreign key that refers to a Standard Concept identifier in the Standardized Vocabularies for the Ingredient Concept. +DRUG_ERA,DRUG_ERA_START_DATE,NO,DATE,The start date for the Drug Era constructed from the individual instances of Drug Exposures. It is the start date of the very first chronologically recorded instance of conutilization of a Drug. +DRUG_ERA,DRUG_ERA_END_DATE,NO,DATE,The end date for the drug era constructed from the individual instance of drug exposures. It is the end date of the final continuously recorded instance of utilization of a drug. +DRUG_ERA,DRUG_EXPOSURE_COUNT,YES,INTEGER,The number of individual Drug Exposure occurrences used to construct the Drug Era. +DRUG_ERA,GAP_DAYS,YES,INTEGER,The number of observed days of gap between Drug Exposure records which was tolerated in the building of the Drug Era record. +DOSE_ERA,DOSE_ERA_ID,NO,INTEGER,A unique identifier for each Dose Era. +DOSE_ERA,PERSON_ID,NO,INTEGER,A foreign key identifier to the Person who is subjected to the drug during the drug era. The demographic details of that Person are stored in the PERSON table. +DOSE_ERA,DRUG_CONCEPT_ID,NO,INTEGER,A foreign key that refers to a Standard Concept identifier in the Standardized Vocabularies for the active Ingredient Concept. +DOSE_ERA,UNIT_CONCEPT_ID,NO,INTEGER,A foreign key that refers to a Standard Concept identifier in the Standardized Vocabularies for the unit concept. +DOSE_ERA,DOSE_VALUE,NO,NUMERIC,The numeric value of the dose. +DOSE_ERA,DOSE_ERA_START_DATE,NO,DATE,The start date for the drug era constructed from the individual instances of drug exposures. It is the start date of the very first chronologically recorded instance of utilization of a drug. +DOSE_ERA,DOSE_ERA_END_DATE,NO,DATE,The end date for the drug era constructed from the individual instance of drug exposures. It is the end date of the final continuously recorded instance of utilization of a drug. +CONDITION_ERA,CONDITION_ERA_ID,NO,INTEGER,A unique identifier for each Condition Era. +CONDITION_ERA,PERSON_ID,NO,INTEGER,A foreign key identifier to the Person who is experiencing the Condition during the Condition Era. The demographic details of that Person are stored in the PERSON table. +CONDITION_ERA,CONDITION_CONCEPT_ID,NO,INTEGER,A foreign key that refers to a standard Condition Concept identifier in the Standardized Vocabularies. +CONDITION_ERA,CONDITION_ERA_START_DATE,NO,DATE,The start date for the Condition Era constructed from the individual instances of Condition Occurrences. It is the start date of the very first chronologically recorded instance of the condition. +CONDITION_ERA,CONDITION_ERA_END_DATE,NO,DATE,The end date for the Condition Era constructed from the individual instances of Condition Occurrences. It is the end date of the final continuously recorded instance of the Condition. +CONDITION_ERA,CONDITION_OCCURRENCE_COUNT,YES,INTEGER,The number of individual Condition Occurrences used to construct the condition era. +CDM_SOURCE,CDM_SOURCE_NAME,NO,CHARACTER VARYING,The full name of the source +CDM_SOURCE,CDM_SOURCE_ABBREVIATION,YES,CHARACTER VARYING,An abbreviation of the name +CDM_SOURCE,CDM_HOLDER,YES,CHARACTER VARYING,The name of the organization responsible for the development of the CDM instance +CDM_SOURCE,SOURCE_DESCRIPTION,YES,TEXT,A description of the source data origin and purpose for collection. The description may contain a summary of the period of time that is expected to be covered by this dataset. +CDM_SOURCE,SOURCE_DOCUMENTATION_REFERENCE,YES,CHARACTER VARYING,URL or other external reference to location of source documentation +CDM_SOURCE,CDM_ETL_REFERENCE,YES,CHARACTER VARYING,URL or other external reference to location of ETL specification documentation and ETL source code +CDM_SOURCE,SOURCE_RELEASE_DATE,YES,DATE,"The date for which the source data are most current, such as the last day of data capture" +CDM_SOURCE,CDM_RELEASE_DATE,YES,DATE,The date when the CDM was instantiated +CDM_SOURCE,CDM_VERSION,YES,CHARACTER VARYING,The version of CDM used +CDM_SOURCE,VOCABULARY_VERSION,YES,CHARACTER VARYING,The version of the vocabulary used +COHORT,COHORT_DEFINITION_ID,NO,INTEGER,A foreign key to a record in the COHORT_DEFINITION table containing relevant Cohort Definition information. +COHORT,SUBJECT_ID,NO,INTEGER,"A foreign key to the subject in the cohort. These could be referring to records in the PERSON, PROVIDER, VISIT_OCCURRENCE table." +COHORT,COHORT_START_DATE,NO,DATE,"The date when the Cohort Definition criteria for the Person, Provider or Visit first match." +COHORT,COHORT_END_DATE,NO,DATE,"The date when the Cohort Definition criteria for the Person, Provider or Visit no longer match or the Cohort membership was terminated." +COHORT_DEFINITION,COHORT_DEFINITION_ID,NO,INTEGER,A unique identifier for each Cohort. +COHORT_DEFINITION,COHORT_DEFINITION_NAME,NO,CHARACTER VARYING,A short description of the Cohort. +COHORT_DEFINITION,COHORT_DEFINITION_DESCRIPTION,YES,TEXT,A complete description of the Cohort definition +COHORT_DEFINITION,DEFINITION_TYPE_CONCEPT_ID,NO,INTEGER,Type defining what kind of Cohort Definition the record represents and how the syntax may be executed +COHORT_DEFINITION,COHORT_DEFINITION_SYNTAX,YES,TEXT,Syntax or code to operationalize the Cohort definition +COHORT_DEFINITION,SUBJECT_CONCEPT_ID,NO,INTEGER,"A foreign key to the Concept to which defines the domain of subjects that are members of the cohort (e.g., Person, Provider, Visit)." +COHORT_DEFINITION,COHORT_INSTANTIATION_DATE,YES,DATE,A date to indicate when the Cohort was instantiated in the COHORT table +COHORT_ATTRIBUTE,COHORT_DEFINITION_ID,NO,INTEGER,A foreign key to a record in the COHORT_DEFINITION table containing relevant Cohort Definition information. +COHORT_ATTRIBUTE,COHORT_START_DATE,NO,DATE,"The date when the Cohort Definition criteria for the Person, Provider or Visit first match." +COHORT_ATTRIBUTE,COHORT_END_DATE,NO,DATE,"The date when the Cohort Definition criteria for the Person, Provider or Visit no longer match or the Cohort membership was terminated." +COHORT_ATTRIBUTE,SUBJECT_ID,NO,INTEGER,"A foreign key to the subject in the Cohort. These could be referring to records in the PERSON, PROVIDER, VISIT_OCCURRENCE table." +COHORT_ATTRIBUTE,ATTRIBUTE_DEFINITION_ID,NO,INTEGER,A foreign key to a record in the ATTRIBUTE_DEFINITIONtable containing relevant Attribute Definition information. +COHORT_ATTRIBUTE,VALUE_AS_NUMBER,YES,NUMERIC,The attribute result stored as a number. This is applicable to attributes where the result is expressed as a numeric value. +COHORT_ATTRIBUTE,VALUE_AS_CONCEPT_ID,YES,INTEGER,The attribute result stored as a Concept ID. This is applicable to attributes where the result is expressed as a categorical value. +ATTRIBUTE_DEFINITION,ATTRIBUTE_DEFINITION_ID,NO,INTEGER,A unique identifier for each Attribute. +ATTRIBUTE_DEFINITION,ATTRIBUTE_NAME,NO,CHARACTER VARYING,A short description of the Attribute. +ATTRIBUTE_DEFINITION,ATTRIBUTE_DESCRIPTION,YES,TEXT,A complete description of the Attribute definition +ATTRIBUTE_DEFINITION,ATTRIBUTE_TYPE_CONCEPT_ID,NO,INTEGER,Type defining what kind of Attribute Definition the record represents and how the syntax may be executed +ATTRIBUTE_DEFINITION,ATTRIBUTE_SYNTAX,YES,TEXT,Syntax or code to operationalize the Attribute definition +COST,COST_ID,NO,INTEGER,A unique identifier for each COST record. +COST,COST_EVENT_ID,NO,INTEGER,"A foreign key identifier to the event (e.g. Measurement, Procedure, Visit, Drug Exposure, etc) record for which cost data are recorded." +COST,COST_DOMAIN_ID,NO,CHARACTER VARYING,"The concept representing the domain of the cost event, from which the corresponding table can be inferred that contains the entity for which cost information is recorded." +COST,COST_TYPE_CONCEPT_ID,NO,INTEGER,"A foreign key identifier to a concept in the CONCEPT table for the provenance or the source of the COST data: Calculated from insurance claim information, provider revenue, calculated from cost-to-charge ratio, reported from accounting database, etc." +COST,CURRENCY_CONCEPT_ID,YES,INTEGER,"A foreign key identifier to the concept representing the 3-letter code used to delineate international currencies, such as USD for US Dollar." +COST,TOTAL_CHARGE,YES,NUMERIC,"The total amount charged by some provider of goods or services (e.g. hospital, physician pharmacy, dme provider) to payers (insurance companies, the patient)." +COST,TOTAL_COST,YES,NUMERIC,The cost incurred by the provider of goods or services. +COST,TOTAL_PAID,YES,NUMERIC,The total amount actually paid from all payers for goods or services of the provider. +COST,PAID_BY_PAYER,YES,NUMERIC,The amount paid by the Payer for the goods or services. +COST,PAID_BY_PATIENT,YES,NUMERIC,The total amount paid by the Person as a share of the expenses. +COST,PAID_PATIENT_COPAY,YES,NUMERIC,The amount paid by the Person as a fixed contribution to the expenses. +COST,PAID_PATIENT_COINSURANCE,YES,NUMERIC,"The amount paid by the Person as a joint assumption of risk. Typically, this is a percentage of the expenses defined by the Payer Plan after the Person's deductible is exceeded." +COST,PAID_PATIENT_DEDUCTIBLE,YES,NUMERIC,The amount paid by the Person that is counted toward the deductible defined by the Payer Plan. paid_patient_deductible does contribute to the paid_by_patient variable. +COST,PAID_BY_PRIMARY,YES,NUMERIC,The amount paid by a primary Payer through the coordination of benefits. +COST,PAID_INGREDIENT_COST,YES,NUMERIC,"The amount paid by the Payer to a pharmacy for the drug, excluding the amount paid for dispensing the drug. paid_ingredient_cost contributes to the paid_by_payer field if this field is populated with a nonzero value." +COST,PAID_DISPENSING_FEE,YES,NUMERIC,"The amount paid by the Payer to a pharmacy for dispensing a drug, excluding the amount paid for the drug ingredient. paid_dispensing_fee contributes to the paid_by_payer field if this field is populated with a nonzero value." +COST,PAYER_PLAN_PERIOD_ID,YES,INTEGER,"A foreign key to the PAYER_PLAN_PERIOD table, where the details of the Payer, Plan and Family are stored. Record the payer_plan_id that relates to the payer who contributed to the paid_by_payer field." +COST,AMOUNT_ALLOWED,YES,NUMERIC,The contracted amount agreed between the payer and provider. +COST,REVENUE_CODE_CONCEPT_ID,YES,INTEGER,A foreign key referring to a Standard Concept ID in the Standardized Vocabularies for Revenue codes. +COST,REVENUE_CODE_SOURCE_VALUE,YES,CHARACTER VARYING,"The source code for the Revenue code as it appears in the source data, stored here for reference." diff --git a/src/org/ohdsi/rabbitInAHat/dataModel/Database.java b/src/org/ohdsi/rabbitInAHat/dataModel/Database.java index 11fdd8ac..fd2f574c 100644 --- a/src/org/ohdsi/rabbitInAHat/dataModel/Database.java +++ b/src/org/ohdsi/rabbitInAHat/dataModel/Database.java @@ -36,7 +36,8 @@ public class Database implements Serializable { public enum CDMVersion { CDMV4 ("CDMV4.csv"), - CDMV5 ("CDMV5.csv"); + CDMV5 ("CDMV5.csv"), + CDMV501 ("CDMV5.0.1.csv"); private final String fileName;