Skip to content

CodeSystem Generation

alexmbennett2 edited this page Feb 1, 2022 · 5 revisions

CodeSystem Generation Steps

The CodeSystem for MIMIC were generated in three steps:

  1. In SQL, query and get the distinct codes for a desired codesystem
  2. Add the codes to the CSV CodeSystem template
  3. Generate the CodeSystem using Python code to convert the CSV template to a FHIR json CodeSystem

CodeSystem Template

The template consists of the following columns:

Column Details Default
code Code that identifies a concept Must be specified
display Human interpretation of the code NULL, will be dropped if empty
id CodeSystem identifier, used for referencing
url Canonical url for the CodeSystem http://fhir.mimic.mimit.edu/CodeSystem/
version Version of the CodeSystem 0.1.0
name Captial case version of id Drop - and capitalize words
date Date the CodeSystem was created Current date
publisher Creator of the CodeSystem SickKids
description Short description of the CodeSystem

General Notes

  • Text formatting: Need to trim any values with free text, since FHIR validator does not allow leading/trailing white spaces or double spaces.
  • Template format: Most MIMIC codesystems only have a code value and no display since the additional information is not available. Just left display blank.
  • Condition
    • Created CodeSystem for ICD9 and ICD10 but only one ValueSet that combines the two
  • Medication
    • medication-method CodeSystem combined both the mimic_hosp.emar and mimic_icu.inputevents distinct values
    • medication-drug needs to be updated to remove duplicate prescriptions of single drugs
  • Procedure
    • Created CodeSystem for ICD9 and ICD10 but only one ValueSet that combines the two
Clone this wiki locally