Obs are displayed twice when a concept translation is provided

Hi guys!

I think there is a bug in the way to fetch observations in Bahmni Apps.

observationService.fetch() in BahmniApps is returning one observation per locale available in the Concept translations, when the Fully Qualified Name is identical in each locale. In other words, if a concept translation is provided in ‘en’ and ‘sp’ with the same FQN, and we record ONE observation to it, then TWO observations are returned by the ObservationService. That makes the obs appear twice in a number of Display Controls.

For instance, let’s take the concept ‘HEIGHT’ (id:118 on the demo) and add the ‘Spanish’ locale’s Fully Qualfied Name as ‘HEIGHT’ too. Then the observations returned by the ObservationService are duplicated, which makes it displayed twice in the dashboard:

observationService#L23 fetches 2 times the same object. See bahmniObservation directive #L73:

Hi @mksrom, thank you for identifying the bug. Can you create an issue in github repo with the above details so that it will be tracked. In case if you are interested in contributing the fix for this bug please go ahead and let us know if you need any help.

Wait, don’t create a github issue for this, we don’t use those! :slight_smile:

Someone from the dev team will create a Mingle card for this.

(We’re working on migrating to JIRA, where @mksrom could have an account and create the issue directly.)

Checked with Product team. They already have a card for this issue.

This is something we’ll need be fixed soon before end of June… (either by Bahmni team or ourselves). Could I have the link to the Mingle card (even just read-only)? There may be some additional information on there to help troubleshooting the bug.



I have looked into this and I propose a PR (PR #13).

1 Like

Thank you. The PR above is merged.

1 Like

:+1: thanks. Could we back-port it to release-0.89 branch as well?

PR #15 is ready https://github.com/Bahmni/bahmni-core/pull/15 :slight_smile: