obsgroup and concepts

Tags: #<Tag:0x00007fa3ef5b2c60> #<Tag:0x00007fa3ef5b2b98>

Hello all, I have used obsgroup in some forms. After I saving the forms, I noticed that the concepts are showing in random order. is there any way that I can use to resolve this issue.

Thanks again

Can you share with us a screenshot?

Here you go @dkayiwa You can notice that the order of concepts does not match the way it is on form.

Thanks for your help

@yadamz, in OpenMRS obs are not naturally sorted within obs groups, so often they will show up out of order, unless you are specifically reopening the form.

Why are you using an obs group to group the vital signs? You might group SBP and DBP, for example, but there’s generally no value in grouping observations whose values can be interpreted individually.

Yes @darius I reproduced the error on the demo server and I used Vitals as a quick code. So it was a quick example :slight_smile: .

I agree that grouping values that can be interpreted individually does not add value. However, it depends on how you designed the form, there are many occasions where you need to sort concepts naturally. This is specially true if you add profession specific terminology standards. for example, lets say that you need to decide on wound inspection as obsgroup. This will include concepts such as location of wound, description of wound, treatment used etc. If you document on several wounds on the same form and each obsgroup is sorted differently it will be very confusing for end users. Now if you dont use obsgroup, the way the encounter will be presented will also be confusing as it will display observations from all wounds in a list format. the only solution here is to use one form per wound assessment. in complex assessments this will create so many encounters under the same visit which might be overwhelming.

I hope that makes sense. If you have a better idea in mind please let me know

I understand. (Sorry, I hadn’t realized that you were just using vitals as a convenient example.)

So, generally within the OpenMRS platform, we can only render obs group members in order if we’re using the original form entry technology to render it. (Because the form does know the order of things.) This is not done in the generic preview (because it doesn’t know about the ordering).

I bet it would probably be possible for us to improve the code in the coreapps module so we get a consistent order for the obs group members, based on the order of the concepts in the concept set that the obs group points to. Would this address your use case?

(If so, create a ticket, and see if someone can work on it.)

Yes @darius is it perfect. I just created the ticket I have few other improvement suggestions in general. where can I post/suggest them ?

If you want to make suggestions to OpenMRS developers, they you should post a new message in the #dev category.

@darius do you know if there is a progress on this issue,because me too i have the same error.,after saving some data the concepts come in random order.please i need your help

@lcdamy do you happen to know the ticket which was created?

yes i know when,sorry to jump in after 3years but i need help from you.let me know if you want that i create another ticket maybe.