Creating a patient without creating a person, using REST API

Hello guys! i am trying to figuring out a way to create a patient directly without going through a series of steps mentioned here which uses two POSTs and multiple GET APIs.

Create Patient - Documentation - OpenMRS Wiki

The page itself says that

This page is out of date. E.g. with modern versions of the OpenMRS REST API it is not necessary to create a person and then a patient in two separate POSTs.

So I am trying to figure out that modern POST API

1 Like

@meullah i believe you can not create a patient with out a person because in the openmrs system a patient is an extension of a person. Every user authenticated in the system is a person and they can be a patient,provider or a system admin

your POST payload will look like this

{ “person”: “uuid”, “identifiers”: [ { “identifier”: “string”, “identifierType”: “uuid”, “location”: “uuid”, “preferred”: true } ] }

1 Like

@gcliff thanks, agreed to your point.

but i thought there might be another way as mentioned in the link above.

@meullah are you looking for something like this? https://github.com/openmrs/openmrs-module-webservices.rest/blob/master/omod-1.9/src/test/java/org/openmrs/module/webservices/rest/web/v1_0/controller/openmrs1_9/PatientController1_9Test.java#L103-L117

Thank you!