Create patient,visit , encounter and obs with uuid

OpenMRS application version 2.2.0 Hi, I installed the latest version of OpenMRS 2.2.0 . My requirement is to add patient,visit,encounter and obs with uuid passed from the client.I have seen mentioned in OpenMRS that this feature is now provided.However when I go to the swagger documentation , I don’t see the model containing the uuid from the device for eg post visit model is as below.

{ “patient”: “uuid”, “visitType”: “uuid”, “startDatetime”: “2019-04-03”, “location”: “uuid”, “indication”: “string”, “stopDatetime”: “2019-04-03”, “encounters”: [ “uuid” ], “attributes”: [ { “attributeType”: “uuid”, “value”: “string” } ] }.

I can’t see an option to create visit with the uuid from the client.This would help me a lot in taking care of offline data.

Are you creating a visit from an existing or new patient?

I wish to create from an existing patient.

Rather than letting openmrs create the visit uuid in the backend.I would like to pass the uuid from the device with which the visit should get created

It looks like that should be possible, basing on this:

Is there anyway that I can get the updated swagger documentation for this so that I will be able to proceed with using this feature ?.

You do not need swagger to make REST calls. Did you take a look at this?

Tried it, passed uuid value also.It seems to be working .Thanks

Please find a better-formatted JSON body for an Encounter including a visit.


“encounterDatetime”: “currentdatetime”, “patient”: “patient_uuid”, “encounterType”: “encounterType_uuid”, “location”: “location_uus”, “visit”: { “patient”: “patient_uuid”, “visitType”: “visittype_uuid”, “startDatetime”: “currentdatetime” }, “encounterProviders”: [ { “provider”: “provider_uuid”, “encounterRole”: “240b26f9-dd88-4172-823d-4a8bfeb7841f” } ], “obs”: [ { “person”: “patient_uuid”, “concept”: “concept_uuid”, “obsDatetime”: “currentdatetime”, “value”: 30 }, { “person”: “patient_uuid”, “concept”: “concept_uuid”, “obsDatetime”: “currentdatetime”, “value”: 30 }, { “person”: “patient_uuid”, “concept”: “concent_uuid”, “obsDatetime”: “currentdatetime”, “valueCodedName”: “Current Regimen”, “value”: “coded_concept_uuid” } ] }