google / android-fhir

The Android FHIR SDK is a set of Kotlin libraries for building offline-capable, mobile-first healthcare applications using the HL7® FHIR® standard on Android.
https://google.github.io/android-fhir/
Apache License 2.0
465 stars 246 forks source link

UI Support to display graph. #2247

Open AdityaKBhadragond14 opened 8 months ago

AdityaKBhadragond14 commented 8 months ago

Is your feature request related to a problem? Please describe. Currently there is no support to display the UI for graphs. We have devices like ECG, Spirometer, etc. which return some graph data. This data is in terms of an array of datapoints and currently the Android FHIR SDK does not has any support to show the graph data.

Describe the solution you'd like A design to display the graph data.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Reference UI design.

Zulip chat:

Would you like to work on the issue? Yes.

FikriMilano commented 7 months ago

Fyi @rowo

FikriMilano commented 7 months ago

@AdityaKBhadragond14 can you clarify, is the graph going to be shown in a questionnaire?

AdityaKBhadragond14 commented 7 months ago

Hi @FikriMilano . Yes it has to be part of questionnaire.

FikriMilano commented 7 months ago

@AdityaKBhadragond14 @joiskash @jingtang10 can we consider a use case where we can also retrieve and provide data from other fields and even other forms? displaying data from previous forms would be the use case I see happening most — like a growth monitoring chart while collecting weight, or pregnant woman weight, or stock average used while trying to figure out how much to order.

those data retrievals from other fields and forms are using FHIRPath and X-FHIR-Query, my only concern is on how we will declare an array with those data, so we can give that array to the graph. Note that FHIRPath doesn't have the capability to declare an array (only manipulate).

jingtang10 commented 6 months ago

@AdityaKBhadragond14 thanks for raising this. We do have support for displaying images in questionnaire at the moment. Does that suit your needs? What format is your graph? How is it integrated with the questionnaire? Is it part of a question (which doesn't seem to be the case in your screenshots above)? Do they need to have specific format options?

We need to answer these questions before implementation. Thanks!

jingtang10 commented 6 months ago

@joiskash thanks for taking this - can you share some of your thoughts?

AdityaKBhadragond14 commented 6 months ago

Hi @jingtang10 . We are using the custom widgets approach with the questionnaire. The custom widget is a edit text field and a button. In case of Electrocardiogram device there are twelve graphs in a single chart and in case of spirometry device there is a single graph. So, the graph format varies from device to device.