diff --git a/sql/codesystem/cs-admission-class.sql b/sql/codesystem/cs-admission-class.sql index 07cc375..c94daf9 100644 --- a/sql/codesystem/cs-admission-class.sql +++ b/sql/codesystem/cs-admission-class.sql @@ -1,5 +1,5 @@ -- Admission class CodeSystem --- Codes will need to be mapped to match US Core Act Encounter Code - http://terminology.hl7.org/CodeSystem/v3-ActCode +-- Codes will need to be mapped to match US Core Act Encounter Code - http://terminology.hl7.org/ValueSet/v3-ActEncounterCode DROP TABLE IF EXISTS fhir_trm.cs_admission_class; CREATE TABLE fhir_trm.cs_admission_class( diff --git a/sql/codesystem/cs-admission-type.sql b/sql/codesystem/cs-admission-type.sql index 71b8713..7f14eb0 100644 --- a/sql/codesystem/cs-admission-type.sql +++ b/sql/codesystem/cs-admission-type.sql @@ -1,5 +1,5 @@ -- Admission type CodeSystem --- Codes will need to be mapped to match US Core Encounter Type -http://hl7.org/fhir/v3/ActPriority/vs.html +-- Codes will need to be mapped to match US Core Encounter Type -http://hl7.org/fhir/ValueSet/encounter-type DROP TABLE IF EXISTS fhir_trm.cs_admission_type; CREATE TABLE fhir_trm.cs_admission_type( diff --git a/sql/codesystem/cs-chartevents-d-items.sql b/sql/codesystem/cs-chartevents-d-items.sql index 65a2a90..3271688 100644 --- a/sql/codesystem/cs-chartevents-d-items.sql +++ b/sql/codesystem/cs-chartevents-d-items.sql @@ -1,5 +1,5 @@ -- Generate unique item codes for only the chartevents --- This is pulled from the d-items CodeSystem +-- This is pulled from the d-items CodeSystem, map to LOINC codes http://hl7.org/fhir/valueset-observation-codes.html DROP TABLE IF EXISTS fhir_trm.cs_chartevents_d_items; diff --git a/sql/codesystem/cs-d-items.sql b/sql/codesystem/cs-d-items.sql index 67c8688..f824f07 100644 --- a/sql/codesystem/cs-d-items.sql +++ b/sql/codesystem/cs-d-items.sql @@ -1,5 +1,6 @@ -- Generate codesystem for icu item codes --- Will be referenced by chartevents, datetimeevents, and outputevents +-- Will be referenced by procedureevents, datetimeevents, and outputevents +-- chartevents too large, an individual codesystem created for it DROP TABLE IF EXISTS fhir_trm.cs_d_items; CREATE TABLE fhir_trm.cs_d_items( @@ -11,4 +12,5 @@ INSERT INTO fhir_trm.cs_d_items SELECT DISTINCT itemid AS code , label AS display -FROM mimic_icu.d_items di \ No newline at end of file +FROM mimic_icu.d_items di +WHERE linksto IN ('procedureevents', 'datetimeevents', 'outputevents'); diff --git a/sql/codesystem/cs-lab-fluid.sql b/sql/codesystem/cs-lab-fluid.sql index 9c5561b..bc28328 100644 --- a/sql/codesystem/cs-lab-fluid.sql +++ b/sql/codesystem/cs-lab-fluid.sql @@ -1,5 +1,5 @@ -- Lab fluid CodeSystem --- Codes will need to be mapped to something like the Specimen type example-v2 - http://hl7.org/fhir/v2/0487/index.html +-- Codes will need to be mapped to something like the Specimen type example-v2 - http://terminology.hl7.org/ValueSet/v2-0487 DROP TABLE IF EXISTS fhir_trm.cs_lab_fluid; CREATE TABLE fhir_trm.cs_lab_fluid( diff --git a/sql/codesystem/cs-medication-frequency.sql b/sql/codesystem/cs-medication-frequency.sql index 05db017..f7e0481 100644 --- a/sql/codesystem/cs-medication-frequency.sql +++ b/sql/codesystem/cs-medication-frequency.sql @@ -1,4 +1,5 @@ -- Medication Frequency CodeSystem +-- Map the frequency values to http://hl7.org/fhir/ValueSet/timing-abbreviation DROP TABLE IF EXISTS fhir_trm.cs_medication_frequency; CREATE TABLE fhir_trm.cs_medication_frequency( diff --git a/sql/codesystem/cs-observation-category.sql b/sql/codesystem/cs-observation-category.sql index fe191f9..777b33b 100644 --- a/sql/codesystem/cs-observation-category.sql +++ b/sql/codesystem/cs-observation-category.sql @@ -1,4 +1,5 @@ -- Observation Category CodeSystem +-- Map values to http://hl7.org/fhir/valueset-observation-category.html DROP TABLE IF EXISTS fhir_trm.cs_observation_category; CREATE TABLE fhir_trm.cs_observation_category( diff --git a/sql/codesystem/cs-spec-type-desc.sql b/sql/codesystem/cs-spec-type-desc.sql index 40e28ec..cfff0c5 100644 --- a/sql/codesystem/cs-spec-type-desc.sql +++ b/sql/codesystem/cs-spec-type-desc.sql @@ -1,5 +1,5 @@ -- Specimen type labs CodeSystem --- Codes will need to be mapped to something like the Specimen type example-v2 - http://hl7.org/fhir/v2/0487/index.html +-- Codes will need to be mapped to something like the Specimen type example-v2 - http://terminology.hl7.org/ValueSet/v2-0487 DROP TABLE IF EXISTS fhir_trm.cs_spec_type_desc; CREATE TABLE fhir_trm.cs_spec_type_desc(