Details
-
New Feature
-
Status: Closed
-
Must
-
Resolution: Fixed
-
None
-
None
-
Low
Description
Currently, it is a requirement to have the vitals json form created manually on the server through the UI. We need to make it easier and automatically create the form by the Android Client, if it is missing.
In order to achieve that, do a POST to a Vitals' form resource /openmrs/ws/rest/v1/form/c2f14428-df9c-46a1-8be2-43b3bb7cf39c/resource
with the following json:
{ "name": "json", "valueReference": "{ \"name\":\"Capture Vitals\", \"uuid\":\"60df0617-c18e-4609-8bdf-6f8de1b5b0cc\",\"processor\":\"EncounterFormProcessor\",\"pages\":[{\"label\":\"\",\"sections\":[{\"label\":\"Vitals\",\"questions\":[{\"label\":\"Pulse(Rate/Min):\",\"questionOptions\":{\"rendering\":\"number\",\"concept\":\"5085AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\",\"max\":\"230\",\"min\":\"0\"},\"type\":\"obs\",\"validators\":[]},{\"type\":\"obsGroup\",\"label\":\"Select\",\"questionOptions\":{\"rendering\":\"group\",\"concept\":\"a899e6d8-1350-11df-a1f1-0026b9318838\"},\"questions\":[{\"label\":\"Is the patient HIV positive?\",\"questionOptions\":{\"rendering\":\"radio\",\"concept\":\"a8af49d8-1350-11df-a1f1-6026b9348838\",\"answers\":[{\"concept\":\"a899b35c-1350-11df-a1f1-002649348838\",\"label\":\"Yes\"},{\"concept\":\"a899b42e-1350-11df-a1f1-002629348838\",\"label\":\"No\"},{\"concept\":\"a899b50a-1350-11df-a1f1-002619348838\",\"label\":\"Unknown\"}]},\"type\":\"obs\",\"validators\":[]}]}]}]}]}", "dataType": "org.openmrs.customdatatype.datatype.FreeTextDatatype" }
The referenced concepts and the Vitals form itself are part of the Reference Application distribution so they do not have to be created by the Android Client.