Diagnosis not showing up on the visit details

Hi, we have a diagnosis form on our implementation that captures diagnosis using the <encounterDiagnosis /> widget. The form is working properly and we can see the diagnosis being saved on encounter_diagnosis table when the form is submitted. The problem is that these diagnosis are not showing up on the visit details. Tracking the code I can see that the visits list code is still looking for diagnosis on the obs table: https://github.com/openmrs/openmrs-module-coreapps/blob/master/omod/src/main/java/org/openmrs/module/coreapps/fragment/controller/visit/VisitDetailsFragmentController.java#L180

We managed to make it work by performing a hack on coreapps module to force it to always use the class EncounterDiagnosesElement (https://github.com/openmrs/openmrs-module-coreapps/blob/master/api-pre2.2/src/main/java/org/openmrs/module/coreapps/htmlformentry/EncounterDiagnosesElement.java#L58) from coreapps-api-pre2.2 submodule, but we are looking for a proper solution for this problem. Does anyone has tips about the issue or knows if it is already reported or being worked on somewhere?

We are using the latest snapshot of reference application: 2.9.0-SNAPSHOT.

2 Likes

We ran into a similar issue… however, we are not using the core apps visit details section, so our fix isn’t going in there…

Diagnoses are available on the encounter in 2.2. so assumedly we’d need to update the VisitDetailsFragmentController in a 2.2 context to parse diagnoses as well as obs.

Take care, Mark

1 Like

Thanks for your answer Mark. I’m working with Edrisse, and we will attempt to fix this, but wanted to check first if there’s someone using the visit details section that might be also fixing it currently.

@wyclif @burke @ball any ideas on this?

Thanks everyone, will update with jira ticket if/when we start with the fix. Laura

@lauravignoli Can you send a screenshot or explain where you want to see this? The clinician-facing dashboard? PIH doesn’t use encounterdiagnoses (yet). We are moving to show the condition list on the dashboard instead of every diagnoses.

Hi Ellen,

Thanks for the reply. We would like to see this in the patient dashboard. The endpoint we are calling to get this info is:

http://localhost:8080/openmrs/coreapps/visit/visitDetails/getEncounterDetails.action?encounterId=5879&amp;

And the problem is that we receive an empty array of diagnoses.

This is a screenshot of how it’s working on reference application 2.5.0:

We are using reference application 2.9.0-SNAPSHOT, and when we click “Show Details”, the diagnosis array is empty in the response, and diagnosis are not displayed:

As @edrisse said, we identified the problem here: openmrs-module-coreapps/VisitDetailsFragmentController.java at master · openmrs/openmrs-module-coreapps · GitHub

This controller needs to be changed to get the diagnosis from the encounter_diagnosis table. We can work on it, but were wondering if someone else is already investigating the issue.

Thanks, Laura

Am not aware of any one working on this. So go ahead and create the ticket.

@dkayiwa Thanks

Keep us updated on how that goes.

1 Like