Skip to content

Latest commit

 

History

History
64 lines (47 loc) · 3.64 KB

File metadata and controls

64 lines (47 loc) · 3.64 KB

Domain 'drugs'

The drugs subfolder contains CSV import files for saving drugs in bulk. This is a possible example of its content:

drugs/
├── drugs.csv
└── ...

Here is an example of a drug header line:

Uuid Void/Retire Name Description Concept Drug ... _version:1 _order:1000

Let's review some important headers.

Header Name
Header Description
Header Concept Drug

The value under this header links to the concept representing the drug. The concept can either be provided by

  • Name, eg. "Cetirizine" ;
  • Concept mapping, eg. "WHO:R06AE07" ;
  • UUID, eg. "2bcf7212-d218-4572-8893-25c4b5b71934".

REMARK: since the Drug object requires an underlying concept to be referenced to as part of its definition, it is wise to ensure that the concept indeed exists in the first place. To help work around this possible issue the drugs domain is processed after the concepts domain.

Header Concept Dosage Form

The value under this header links to the concept representing the dosage form. The same way as for the concept drug its value can be provided as a concept name, concept mapping or UUID.

Header Strength

Eg. "10ml", "500mg" ... etc.

Here is an example of valid basic CSV line to defining a drug:

Uuid Name Concept Drug Concept Dosage Form Strength
Cetirizine 10mg Tablet Cetirizine Tablet 10mg

In this example both "Cetirizine" and "Tablet" are assumed to be names of existing concepts.

Mappings headers

Drugs support one or more mappings to concept reference terms, which are created as DrugReferenceMaps. Each of these mappings are configurable with a mapping type, a source, and a code.

Important note: Due to a bug in OpenMRS core, use of Mappings headers will fail if your core version does not meet one of the following minimum versions:

  • 2.7.0+
  • 2.6.1+
  • 2.5.11+
  • 2.4.6+
  • 2.3.6+

In order to specify mappings on a given concept, the values for those mappings can be set under ad-hoc headers starting with the special prefix Mappings|. Mappings headers should be specified in the following format:

Option 1: Column header specifies the mapping type, but not the source. In this case, the column values must be one or more source:code pairs. If specifying multiple source:code pairs, these must be separated by semi-colons. Example:

... Mappings|SAME-AS Mappings|NARROWER-THAN
... CIEL:5089; SNOMED CT:27113001 LOINC:3141-9

Option 2: Column header specifies both the mapping type and the source. In this case, the column values must only be the codes. If specifiying multiple codes for the same mapping type and source, these must be separated by semi-colons, or they can alternatively be added as separate columns. In the case of adding them as separate columns, and additional suffix is supported on the header to enable each column header to be unique. Example:

... Mappings|SAME-AS|CIEL Mappings|SAME-AS|SNOMED CT Mappings|SAME-AS|PIH|Code Mappings|SAME-AS|PIH|Name
... 5089 27113001 5089 WEIGHT (KG)

Further examples:

Please look at the test configuration folder for sample import files for all domains, see here.