# Obs are displayed twice when a concept translation is provided

**URL:** <https://talk.openmrs.org/t/obs-are-displayed-twice-when-a-concept-translation-is-provided/11718>\
**Category:** Bahmni\
**Tags:** locale, i18n, observations, concept\
**Created:** [June 2, 2017, 12:08pm UTC](https://talk.openmrs.org/t/obs-are-displayed-twice-when-a-concept-translation-is-provided/11718 "2017-06-02T12:08:31Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![mksrom](https://talk.openmrs.org/user_avatar/talk.openmrs.org/mksrom/32/20221_2.png) [@mksrom](https://talk.openmrs.org/u/mksrom)\
**Post date:** [June 2, 2017, 12:08pm UTC](https://talk.openmrs.org/t/obs-are-displayed-twice-when-a-concept-translation-is-provided/11718/1 "2017-06-02T12:08:32Z")

</div>

Hi guys!

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

[observationService.fetch()](https://github.com/Bahmni/openmrs-module-bahmniapps/blob/master/ui/app/common/domain/services/observationsService.js#L5) 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](https://demo.mybahmni.org/openmrs/dictionary/concept.htm?conceptId=118)) 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:

![](https://talk.openmrs.org/uploads/default/original/2X/f/fe442bd639ed11b07a648a1badaab56860e69e05.png)

[observationService#L23](https://github.com/Bahmni/openmrs-module-bahmniapps/blob/master/ui/app/common/domain/services/observationsService.js#L23) fetches 2 times the same object. See [bahmniObservation directive #L73](https://github.com/Bahmni/openmrs-module-bahmniapps/blob/master/ui/app/common/displaycontrols/observation/directives/bahmniObservation.js#L73):

![](https://talk.openmrs.org/uploads/default/original/2X/1/1b352a0b1060a6351f85f9367ac5e35c51522c2c.png)

---

<div class="post-metadata">

**Author:** ![swathivarkala](https://talk.openmrs.org/user_avatar/talk.openmrs.org/swathivarkala/32/3234_2.png) [@swathivarkala](https://talk.openmrs.org/u/swathivarkala)\
**Post date:** [June 5, 2017, 2:22pm UTC](https://talk.openmrs.org/t/obs-are-displayed-twice-when-a-concept-translation-is-provided/11718/2 "2017-06-05T14:22:51Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![darius](https://talk.openmrs.org/user_avatar/talk.openmrs.org/darius/32/8082_2.png) [@darius](https://talk.openmrs.org/u/darius)\
**Post date:** [June 6, 2017, 4:58am UTC](https://talk.openmrs.org/t/obs-are-displayed-twice-when-a-concept-translation-is-provided/11718/3 "2017-06-06T04:58:55Z")

</div>

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

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.)

---

<div class="post-metadata">

**Author:** ![swathivarkala](https://talk.openmrs.org/user_avatar/talk.openmrs.org/swathivarkala/32/3234_2.png) [@swathivarkala](https://talk.openmrs.org/u/swathivarkala)\
**Post date:** [June 6, 2017, 5:10am UTC](https://talk.openmrs.org/t/obs-are-displayed-twice-when-a-concept-translation-is-provided/11718/4 "2017-06-06T05:10:04Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mksrom](https://talk.openmrs.org/user_avatar/talk.openmrs.org/mksrom/32/20221_2.png) [@mksrom](https://talk.openmrs.org/u/mksrom)\
**Post date:** [June 6, 2017, 6:41am UTC](https://talk.openmrs.org/t/obs-are-displayed-twice-when-a-concept-translation-is-provided/11718/5 "2017-06-06T06:41:45Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![swathivarkala](https://talk.openmrs.org/user_avatar/talk.openmrs.org/swathivarkala/32/3234_2.png) [@swathivarkala](https://talk.openmrs.org/u/swathivarkala)\
**Post date:** [June 6, 2017, 6:43am UTC](https://talk.openmrs.org/t/obs-are-displayed-twice-when-a-concept-translation-is-provided/11718/6 "2017-06-06T06:43:51Z")

</div>

[https://bahmni.mingle.thoughtworks.com/projects/bahmni\_emr/cards/3613](https://bahmni.mingle.thoughtworks.com/projects/bahmni_emr/cards/3613)

---

<div class="post-metadata">

**Author:** ![mksrom](https://talk.openmrs.org/user_avatar/talk.openmrs.org/mksrom/32/20221_2.png) [@mksrom](https://talk.openmrs.org/u/mksrom)\
**Post date:** [June 12, 2017, 4:26pm UTC](https://talk.openmrs.org/t/obs-are-displayed-twice-when-a-concept-translation-is-provided/11718/7 "2017-06-12T16:26:56Z")

</div>

Thanks.

I have looked into this and I propose a PR ([PR #13](https://github.com/Bahmni/bahmni-core/pull/13)).

---

<div class="post-metadata">

**Author:** ![sdeepak](https://talk.openmrs.org/user_avatar/talk.openmrs.org/sdeepak/32/2503_2.png) [@sdeepak](https://talk.openmrs.org/u/sdeepak)\
**Post date:** [June 14, 2017, 7:48am UTC](https://talk.openmrs.org/t/obs-are-displayed-twice-when-a-concept-translation-is-provided/11718/8 "2017-06-14T07:48:24Z")

</div>

Thank you. The PR above is merged.

---

<div class="post-metadata">

**Author:** ![mksrom](https://talk.openmrs.org/user_avatar/talk.openmrs.org/mksrom/32/20221_2.png) [@mksrom](https://talk.openmrs.org/u/mksrom)\
**Post date:** [June 14, 2017, 8:00am UTC](https://talk.openmrs.org/t/obs-are-displayed-twice-when-a-concept-translation-is-provided/11718/9 "2017-06-14T08:00:59Z")

</div>

👍 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](https://github.com/Bahmni/bahmni-core/pull/15) 🙂
