Type: New Feature
Affects Version/s: None
Fix Version/s: 2.12
We currently working to create forms using angular formly to be used in an angular application which rely entirely on OpenMRS rest web service. This involves creation of form schemas which are basically json files. We want to be able to create these files and post them and of course retrieve them when needed. Ideally these will be stored in OpenMRS as form_resource or clob_datatype_storage.
Being able to post and retrieve form resources as per example URLs below
1. Getting a list of resources associated with a form
2. Getting a specific form resource. This will return among other things the reference to the actual resource data stored in clob_datatype_storage table.
3. Getting the actual data. This will return file data in body (Json won't be appropriate in this case)
Note uuid will be fetched from the results of the call made in 1 or 2 above.
Notice that getting form resource will involve two stages due to the way things are setup in OpenMRS. However may be we could think of a way to reduce it to one call
4. Posting a form resouce
This will involve two stages.
step 1: Posting resource first as file (multipart/form-data content type in http header). This will return the uuid of a newly created clob datatype.
step 2: Posting metadata associated with the data posted in step 1 above using the uuid returned as a reference.
5. Purging & updating existing form resource.