WorldHealthOrganization / smart-emcare

Emergency Care - a digital platform/reference mobile application that is able to rapidly share WHO guidelines.
12 stars 2 forks source link

Adding color coding (pink, orange, green)for classifications #96

Open kaledip opened 1 year ago

kaledip commented 1 year ago
delcroip commented 1 year ago

h1. Solution proposed:

http://hl7.org/fhir/R4/extension-rendering-style.html on the item level

content will be either:

delcroip commented 1 year ago

Example:

"extension": [
{
    "url": "http://hl7.org/fhir/StructureDefinition/rendering-style",
    "valueString": "background-color: pink;"
}]
ppanchal-argus commented 1 year ago

@delcroip Can we also have the extension with background-color: white. When the classification has white background, for example in skin related ones.

delcroip commented 1 year ago

Of course

delcroip commented 1 year ago

This extension add style so any style code should work, is it supported by the sdc library?

delcroip commented 1 year ago

change answer to yes/no : L4 issue

ppanchal-argus commented 1 year ago

@delcroip I think it's not directly supported, however it can be implemented using custom widget, which is what we're currently working on!

delcroip commented 1 year ago

1.0.3.build.3 for child only

kaledip commented 1 year ago

@delcroip The colors look ok. I had shared a screenshot with clinical team too. But I cannot see them in current build app1.2.0dev build 28 Can you pls add those back

Tested on build 29 but cannot see yellow color as expected for "Some dehydration". Also "Acute ear infection" shows green which should be yellow

kaledip commented 1 year ago

Image

delcroip commented 1 year ago

issues:

I will remove the L3 tag because it is now L4 only

khyativyasargus commented 1 year ago

pink does not always work (if 2 spaces like : pink;) --> Hi @delcroip , currently at L4, we are comparing value of "valueString" using switch case, so there should be a common format of the values you will be passing, so let me know the final one - either with space or without space, currently I am following this format given by you - "background-color: pink;", "background-color: yellow;"

Orange does not work --> Currently as we are not getting color codes in extension but color names, so pink, green, yellow & white only these colors are supported as per our discussion. Either we can add color codes instead of names L3 side or you can provide me a list of all possible colors so I can handle the L4 side that way.

qualifier not working answer option not working --> For this we are waiting on SDC https://github.com/google/android-fhir/issues/2023

cc @kaledip

delcroip commented 1 year ago

Thank you, is not it possible to inject the value of the extension as style ?

khyativyasargus commented 1 year ago

Thank you, is not it possible to inject the value of the extension as style ?

No @delcroip , injecting value of extension as style is not supported in L4.

khyativyasargus commented 1 year ago

@kaledip @delcroip qualifier not working answer option not working

This is resolved now in latest Dev build 1.2.3