Cant get Diagnostic report in fhir2 API (bahmni 0.92)bahmni

Hi All,

I have set up Bahmni 0.92 in my server. I’m able to get all the required data from fhir2-1.1.0 except for Diagnostic report. Without Diagnostic report /openmrs/ws/fhir2/R4/Observation?patient=patientUUID sends proper data, but once the diagnostic report is added in openelis the result from api is

statusCode: 500

response {"resourceType":"OperationOutcome","text":{"status":"generated","div":"<div xmlns=\"\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Cannot create reference of undetermined order type</pre></td>\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t</tr>\n\t\t</table>\n\t</div>"},"issue":[{"severity":"error","code":"processing","diagnostics":"Cannot create reference of undetermined order type"}]}

Note : After adding data in openelis, data gets reflected in Bahmni screen. and also one row gets added in markers table after failed api call.

cc to @surangak @harsha89

In Bahmni Clinical screen, “Lab Result” have value which comes from openelis whereas “Lab Orders Fullfillment” Shows No Observation Captured

the “fulfilment” widget works in a different way (btw, the name probably can be changed to something else). In Bahmni, there is also option of “Order fulfilment” (using the orders) app - when you specify results through that, it shows up in the “fulfilment” widget. Regarding using the FHIR APIs, you can add the openmrs fhir2 module as addon.

The FHIR2 module is already added, Every other result comes fine from FHIR2. I doubt it has to do something with the order module.

I wonder if this could be a library dependency issue. Are any of your other modules using FHIR-related things? (Not that I know what I’m talking about here; I just learned recently from @ibacher that we’d need to do deeper architectural work to the FHIR2 module for it to run well at the same time as for example the OpenIMS data exchange module NepalEHR built that uses FHIR as well)

Not Sure if any other app uses FHIR, Here is the list of openMRS Modules .


@saqibkhaleel Thanks for bringing this up. This is actually a bug in the FHIR2 module. I will fix it and try to have a new release available for you to use soon. If you have any FHIR module related questions, please feel free to ping me.

Hi @ibacher,

There is another issue in Medication/Prescription which I have posted in this Link, Please do look into that as well.

Note : drug_order table have a column called “dosing type” which has value “org.openmrs.module.bahmniemrapi.drugorder.dosinginstructions.FlexibleDosingInstructions” for every medication in the table.

@saqibkhaleel For the other error, are you able to locate a full stack trace in your log file somewhere? That would be helpful in tracking the error down.

Hi @ibacher ,

I couldn’t trace the error in logs. One thing is that when dosing_type column in drug_order table is replaced with NULL “fhir2 api for medication works perfectly” but bahmni UI under clinical screen pops error when dosing_type is NULL (where as UI works fine when dosing_type in drug_order table is “org.openmrs.module.bahmniemrapi.drugorder.dosinginstructions.FlexibleDosingInstructions”).

the dosing_type gets deseriallized using the class thats mentioned here. most likely because the fhir2 omod does not have visibility to the class because the classloader is different. One option is to get the Fhir2 module, have the module dependency to the bahmni emr api mentioned in the config xml, build the omod and deploy again.

Hi @ibacher

Any further update on the changes in FHIR2 module to get diagnostic report ?

Hi @saqibkhaleel,

I have done a preliminary search for how to add the FHIR2 module to a plain Bhamni distribution, as you seem to have done, but I didn’t find any explicit documentation on this. Do you have a pointer to the OpenMRS Wiki, or Talk, or the Bhamni Wiki that explains how to add additional modules that are not bundled with Bahmni 0.92?

Thanks in advance, …|<

@praveenad you guys have used the FHIR2 module on Bahmni, can you help here? As much as I know, you just need to drop the module in the /opt/openmrs/modules directory.

Hi @keithduddy , you just need to place the FHIR2 modules (or any other module) in “/opt/openmrs/modules” and then restart openmrs

Thanks @saqibkhaleel,

I thought it would be something simple like this… I’m preparing materials for a colleague who will be installing Bhamni for us… so I didn’t get a chance to go looking in the installation as I would normally do.

cheers, |<

Hi @ibacher , Is FHIR2 module’s updated version released ?

Awaiting for the updated FHIR2 module

@saqibkhaleel There are a few other bug fixes that I’m trying to get done before making a new release.

Hi @ibacher

We are currently experiencing this error in the latest version (1.1.0). Do you know when we can expect the next release? I know you are currently fixing a few more bugs before doing the release.

Thanks for working on this!

Tagging @bashir

1 Like

Hi @saqibkhaleel , this issue was fixed in fhir2-1.2.1 . I tested it using bahmni 0.92 and it works well.