Adding more sections & Customizable Widgets to the Clinician Dashboard

Sorry @jesplana for the late reply.

I just re-tested this widget in our environment here at PIH and it works fine for us. How many results the following REST calls return? One is for the Height obs and the other for the Weight obs. Please replace the PATIENT_UUID below with your test patient.

http://YOUR_SERVER_URL/openmrs/ws/rest/v1/obs?concept=5090AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA&patient=PATIENT_UUID&v=custom:(uuid,display,obsDatetime,value,concept:(uuid,display,name:(display),datatype:(uuid,display)))

http://YOUR_SERVER_URL/openmrs/ws/rest/v1/obs?concept=5089AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA&patient=PATIENT_UUID&v=custom:(uuid,display,obsDatetime,value,concept:(uuid,display,name:(display),datatype:(uuid,display)))

If the REST calls above return results, then just set the maxResults to 20 or higher number and remove the maxAge parameter.

Thank you @ball for tagging @cioan

@cioan, I tried your suggestion and received the following:

http://YOUR_SERVER_URL/openmrs/ws/rest/v1/obs?concept=5090AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA&patient=PATIENT_UUID&v=custom:(uuid,display,obsDatetime,value,concept:(uuid,display,name:(display),datatype:(uuid,display)))

I received the following results:

http://YOUR_SERVER_URL/openmrs/ws/rest/v1/obs?concept=5089AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA&patient=PATIENT_UUID&v=custom:(uuid,display,obsDatetime,value,concept:(uuid,display,name:(display),datatype:(uuid,display)))

I changed the maxResults to 20 but unfortunately it didnā€™t work. I also changed it to 100 and it also didnā€™t work. I removed the maxAge parameter. See below: image

I am running OpenMRS 2.1.3 and Refapp 2.9.0-snapshot

Thank you,

John

@jesplana: Can you please use Postman or some other tool that formats the json response? It looks like you have no weight and height obs for this patient?

@cioan Hereā€™s the json I used for the widget: Hastebin: Send and Save Text or Code Snippets for Free | ToptalĀ® And yes, the rest call looks like I have no weight and height obs but I have several obs captured in different date/time: image

and if I do just the weight, I get this:

image

And for the height, I get this:

image

And if I include both the weight and height, I get this: image

Thanks!

John

Hi @jesplana, do you have this code deployed to a test server I could access via the browser? I could use the browser debugger to try to understand why this widget does not work in your environment.
Are there any errors in the Javascript DevTools console?

Hi @cioan, I loaded the code in the QA server (the demo is not working at the moment).

I added the widget in the patient dashboard called (Height/Weight). https://qa-refapp.openmrs.org/openmrs/coreapps/clinicianfacing/patient.page?patientId=90f7f0b4-06a8-4a97-9678-e7a977f4b518

Hereā€™s the link to the app: https://qa-refapp.openmrs.org/openmrs/referenceapplication/userApp.page?appId=test.weightHeight&action=edit&

The QA server is also not rendering the widget:

As you can see, there is the weight and height data.

Thank you,

John

Mystery solved. The QA server does not have the latest coreapps SNAPSHOT that contains the changes I made to the obsgraph widget to support multiple concepts.

https://qa-refapp.openmrs.org/openmrs/admin/modules/module.list

@jesplana: You need to test your Height&Weight graph widget with the lastest coreapps SNAPSHOT.

@cioan ah perfect. Let me update to the latest coreapps module and re-test. I will restart this conversation in case I run into any more issues. Thanks a lot for all your help.

John