Reference Application v2.12.2
Question: Hello, everyone. I am new to using OpenMRS and I am developing CDS for OpenMRS using FHIR R4 and CQL rules. One of the rules requires a drug: metformin.
Here are my steps: I added a concept for metformin in OpenMRS and mapped it to RxNorm Code 6809 using OpenMRS admin Ui.
However, when I request the drug with the FHIR endpoint (GET http://localhost:8081/openmrs-standalone/ws/fhir2/R4/Medication/{metformin id}
), I do not get the RxNorm code for metformin. Instead, I get the internal code for metformin (see below).
Results from calling GET http://localhost:8081/openmrs-standalone/ws/fhir2/R4/Medication/ef21e81f-58b4-4229-a7bf-3dea06200b45
{
"resourceType": "Medication",
"id": "ef21e81f-58b4-4229-a7bf-3dea06200b45",
"meta": {
"versionId": "1696646761000",
"lastUpdated": "2023-10-06T22:46:01.000-04:00"
},
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><table class=\"hapiPropertyTable\"><tbody><tr><td>Id:</td><td>ef21e81f-58b4-4229-a7bf-3dea06200b45</td></tr><tr><td>Code:</td><td>Metformin</td></tr><tr><td>Status:</td><td>ACTIVE</td></tr></tbody></table></div>"
},
"extension": [
{
"url": "http://fhir.openmrs.org/ext/medicine",
"extension": [
{
"url": "http://fhir.openmrs.org/ext/medicine#drugName",
"valueString": "Metformin"
}
]
}
],
"code": {
"coding": [
{
"code": "43d37f2e-f98b-4017-b667-05fe720485ee",
"display": "Metformin"
}
],
"text": "Metformin"
},
"status": "active"
}
Unless I am misunderstanding something, this should return the RxNorm code for metformin in the code.coding
part of the FHIR resource. However, it is not. Is this the correct behavior?