Drug Order Model

Hi all,

Well I’m working on eSaude Pharmacy Module for OpenMRS in Mozambique which aims to provide drugs dispenses, however I’d like to have an overview behind the drug and orders modeling. I intend to be able to dispense drugs supporting the drug and order data model that already exist in OpenMRS.

Is there a kind of module on top of the data model? How does drugs and orders supposed to be linked with patients? I saw that there is and encounter_id on orders table, is the only way?just to make sure the I going on the right direction.

I used the link: http://burkeware.com/openmrs-data-model/openmrs-data-model-1.11.html# in the analysis.

I’d appreciate if you guys could help me on this.

regards

1 Like

Maybe these pages will be useful:

1 Like

Sure @pascal I’ll have a look on that.

Cheers

In OpenmRS we have generic Orders, we also provide 2 specific orders types i.e drug and test orders, the API really only supports placing, discontinuing and revising orders, there is no support for dispensing and fulfillment, you would have to implement those in a custom module, there might be some modules already that have been developed implementing these features or one of them most likely by the Bahmni team, I think @darius can chime in on this

1 Like

As Wyclif says, the core platform supports orders but not dispensing.

Our suggested approach has been to record the actual dispensing of a medication as an obs group. There is a Dispensing module (whose code is unfortunately PIH-specific) that illustrates a similar obs group approach (within an HTML Form). Ideally someone (like your team!) will write a module that provides a REST API that treats dispensing as a first-class resource. (Under the hood these could be stored in a new table in the module, or else using obs groups.)

Tying everything together:

  • an order is for a patient during an encounter
  • dispensing would usually happen in a later encounter
  • the dispensing event should point to what order it is fulfilling (and say whether this is partial or complete fulfillment)

I have uploaded the Dispensing Module 1.0 on Demo Server and but it is not working. here are the screenshots,

Is this error caused by UTF-8 encoding? here is also another post which is almost similar

@hpardess do you have a concept in your dictionary that has a SAME AS mapping to source=“org.openmrs.module.emrapi” code=“Dispensing Medication Concept Set”? The error message is saying you do not.

@darius, I did not understand about concepts you mentioned. Although I have imported openmrs_concepts_2.0_20170224v2.sql and openmrs_drug_1.10.0_20141226.sql in my database.

@hpardess

I doubt that the dispensing module is generally usable by other implementations besides the one that originally wrote it (PIH/Mirebalais), but you’re welcome to try.

You would need to manually make changes to the CIEL database, by adding a mapping for each concept listed here:

I think the right concept to use is https://openconceptlab.org/orgs/CIEL/sources/CIEL/concepts/163711.

The mappings would look something like this: https://openconceptlab.org/orgs/CIEL/sources/CIEL/mappings/583f35eb65baaa000771c0d0/

(I don’t know if this is documented anywhere, and I don’t have time to look any further, so you’re going to have to look at the code to understand this…)

I already have following concepts in my database. Do I need anything else?

Yes, you would need to add mappings. See concept 159947 for an example of the general idea.

Based on code you shared, following concepts are required to for Dispensing Module 1.0,

  1. Dispensing Medication Concept Set
  2. Medication Orders
  3. Quantity of medication dispensed
  4. Coded drug frequency
  5. Quantity of medication prescribed per dose
  6. Units of medication prescribed per dose
  7. Medication duration
  8. Time units
  9. Hospital prescription timing
  10. Discharge location
  11. Prescription instructions non-coded

I have the latest CIEL Concept Dictionary in my database. I have attached the screenshot of concepts i found in my database. I will add following mapping to all concepts i found, SAME AS mapping to source=“org.openmrs.module.emrapi” code=“Dispensing Medication Concept Set”

Should I add following mapping for all 11 concepts required by Dispensing Module? or it will differ for each concept SAME AS mapping to source=“org.openmrs.module.emrapi” code=“Dispensing Medication Concept Set”

Also some of the concept does not exist among standard CIEL Concept Dictionary.

Each concept needs a different mapping.

Similar to what is done with the emrapi mappings on

I don’t know if all the concepts are required or not for this module to work. You could try it out, or else look at the code. If more concepts are required than the CIEL ones then you’d need to manually create those concepts (and/or ask Andy to create them in CIEL).

  • Visit Diagnoses (159947) - Already exists in CIEL Concept Dictionary with required mapping Relationship: SAME-AS Source: org.openmrs.module.emrapi Code: Diagnosis Concept Set

  • Diagnosis or problem, non-coded (161602) - Already exists in CIEL Concept Dictionary with required mapping Relationship: SAME-AS Source: org.openmrs.module.emrapi Code: Non-Coded Diagnosis

@akanter, could you please help me with following concepts:

  1. Dispensing Medication Concept Set
  2. Medication Orders
  3. Quantity of medication dispensed
  4. Coded drug frequency
  5. Quantity of medication prescribed per dose
  6. Units of medication prescribed per dose
  7. Medication duration
  8. Time units
  9. Hospital prescription timing
  10. Discharge location
  11. Prescription instructions non-coded

Although i have imported updated set of CIEL Concept Dictionary (openmrs_concepts_2.0_20170224v2.sql and openmrs_drug_1.10.0_20141226.sql) in my database but Dispensing module is not working due to missing primary concepts.

  1. Dispensing Medication Concept Set AK> Not sure what this is.
  2. Medication Orders AK> CIEL: 1282
  3. Quantity of medication dispensed AK> CIEL: 1443
  4. Coded drug frequency AK> CIEL: 160855
  5. Quantity of medication prescribed per dose AK> CIEL: 160856
  6. Units of medication prescribed per dose AK> CIEL: 161563
  7. Medication duration AK> CIEL: 159368
  8. Time units AK> 161244
  9. Hospital prescription timing AK> Don’t know what this is.
  10. Discharge location AK> CIEL: 162682
  11. Prescription instructions non-coded AK> Don’t know what this is. Perhaps it is mapped to a free text comment?

Can someone provide me the formal mappings for this module, or at least clarify what the concept required is? I can add mappings with CIEL or add missing concepts if it is clear. I am not sure these should be labeled with the .emrapi source as this should be identified as the particular module as the source requirement.

@darius can provide us detailed information about missing concepts and missing mapping to add to CIEL Concept Dictionary.

I have searched for all concept based on ID you have provided. I have observed their names are little different and also the required mapping with emrapi does not exits in Concepts Dictionary.

  • Medication orders (1282) - Already exists in CIEL Concept Dictionary but the required emrapi mapping doesn’t exist
  • Medication dispensed (1443) - Already exists in CIEL Concept Dictionary but the required emrapi mapping doesn’t exist
  • Medication frequency (160855) - Already exists in CIEL Concept Dictionary but the required emrapi mapping doesn’t exist
  • Quantity of medication prescribed per dose (160856) - Already exists in CIEL Concept Dictionary but the required emrapi mapping doesn’t exist
  • Medication strength units (161563) - Already exists in CIEL Concept Dictionary but the required emrapi mapping doesn’t exist
  • Medication duration (159368) - Already exists in CIEL Concept Dictionary but the required emrapi mapping doesn’t exist
  • Unit of time (161244) - Already exists in CIEL Concept Dictionary but the required emrapi mapping doesn’t exist
  • Location patient discharged from (162682) - Already exists in CIEL Concept Dictionary but the required emrapi mapping doesn’t exist

@hpardess I think you need to do more research on this before asking @akanter to get involved.

  1. Take a look at https://github.com/openmrs/openmrs-module-dispensing/blob/master/omod/src/main/webapp/resources/htmlforms/dispensing.xml#L175 and particularly at all of the <obs> tags that refer to either PIH or CIEL concepts.
  2. I believe that you can see the details of these in this metadata sharing package. Either you’ll need to inspect the xml in that zip file, or else import it to a server using the MDS module.
  3. Verify that by creating these concepts on your own server, the module will work and satisfy your use case.
  4. Only if so, then you should ask Andy to create these concepts in CIEL (and you can describe them in better detail).

Good luck!