For those too busy/lazy to click on the wiki page, here's what a series of REST calls might look like to create a patient:
(you need to know about PatientIdentifierTypes and Locations) GET /openmrs/ws/rest/v1/patientidentifiertype RESPONSE: a list of available identifier types, e.g. with UUIDs: "8d79403a-c2cc-11de-8d13-0010c6dffd0f", "f1b2e10e-035e-11e1-943f-ea16aa1464b8" GET /openmrs/ws/rest/v1/location RESPONSE: a list of locations, e.g. with UUIDs: "8d6c993e-c2cc-11de-8d13-0010c6dffd0f" (then you can get to creating...) POST /openmrs/ws/rest/v1/person HEADER: Content-Type: application/json BODY: {"gender": "M", "names": [{"givenName":"Joe", "familyName":"Smith"}]} RESPONSE: a newly created person, e.g. with a generated UUID: "11f40a1b-0337-4652-86fa-18d4461e38a0" POST /openmrs/ws/rest/v1/patient HEADER: Content-Type: application/json BODY: {"person": "11f40a1b-0337-4652-86fa-18d4461e38a0", "identifiers": [{"identifier":"1234", "identifierType":"8d79403a-c2cc-11de-8d13-0010c6dffd0f", "location":"8d6c993e-c2cc-11de-8d13-0010c6dffd0f", "preferred":true}]} RESPONSE: a newly created patient -Darius On Thu, Apr 26, 2012 at 6:40 AM, Rafal Korytkowski <ra...@openmrs.org>wrote: > Hi, > > I've updated the wiki describing the new way of creating a patient via > REST. > > https://wiki.openmrs.org/display/docs/Create+Patient > > The related ticket is: > > https://tickets.openmrs.org/browse/RESTWS-199 > > Likes and dislikes welcome. Please comment. It's the last chance to change > the behavior. > > -RafaĆ > > ------------------------------ > Click here to > unsubscribe<lists...@listserv.iupui.edu?body=SIGNOFF%20openmrs-devel-l>from > OpenMRS Developers' mailing list _________________________________________ To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to lists...@listserv.iupui.edu with "SIGNOFF openmrs-devel-l" in the body (not the subject) of your e-mail. [mailto:lists...@listserv.iupui.edu?body=SIGNOFF%20openmrs-devel-l]