Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • BL -> Boolean
  • CS/CV/CE/CD -> Coded
  • INT -> Numeric
  • PQ -> Numeric (units are also checked)
  • ST, II, TEL -> Text
  • ED / SD -> Complex
  • TS -> DateTime
  • CO -> Numeric if "value" is used, Coded if "code" is used
  • RTO, MO -> Text

If none of concept source, reference term, or concept are found then it is created and mapped accordingly. Where possible built in OpenMRS concepts are used. Additionally, whenever a Numeric concept is found to represent a PQ where the units do not match, the module will check to see if the units are convertible. For example, if an openMRS concept for Height is found however the PQ in the CDA is represented in m instead of cm the unit is converted to cm before storage.

Because CDA uses a variety of codes from SNOMED, LOINC and others, there is a need to bulk-import concepts and their mapping to MVP/CIEL upon module install. This is done via the ReferenceTermDictionary.xml file in the resources folder. Upon build, this XML file is transformed to a liquibase.xml file and placed in the omod file. This file contains mapping to CIEL concepts where appropriate and allows the module to use those mappings in an easy to maintain XML File (editable within Microsoft Excel as a table)

Orders

Many entries within the CDA document carry what are known as moodCodes. These mood codes identify the mode of the entry.

  • Entries carrying a mood code of EVN (event) represent something did occur (i.e. I did observe X)
  • Entries carrying a mood code of INT (intent) represent the intent to do what the entry represents (i.e. I intend to observe X, or I would like someone to observe X)
  • Entries carrying a mood code of GOL (goal) mean the entry represents a desired end state such as in a care plan (i.e. The goal is to observe X by Y date)
  • Entries carrying a mood code of PRP (proposal) mean the entry represents a proposal to perform something

Within the CDA import module, entries are imported into OpenMRS' data model depending on their mood code. Below is a table representing the source CDA RMIM class by moodCode and the resulting structure in OpenMRS.

RMIM Class / MoodEVNINTGOLPRP
ObservationObsObservationOrderObs Group (having GOAL sub-obs)Obs Group (having PROPOSAL sub-obs)
OrganizerObs GroupN/AN/AN/A
SubstanceAdministrationObs Group (160741)DrugOrderN/AN/A
ProcedureObs Group  (160714)ProcedureOrderObs Group (having GOAL sub-obs)Obs Group (having PROPOSAL sub-obs)
ActActiveListItem (Allergy or Problem)N/AN/AN/A

Note: ProcedureOrder and ObservationOrder are extended orders having additional data placed in the procedure_order and observation_order tables in OpenSHR's data model respectively. These classes were extended to qualify the type of order as well as track additional data required such as targetSiteCode, procedure/observation requested, and goal ranges.

Known Issues / Todo

Most up-to date listed here: https://github.com/jembi/openmrs-module-shr-cdahandler/issues

...