GSoD 2020 - OpenMRS REST API Documentation

@ayesh @burke @gcliff

I was trying to create a user with this payload but it gave me some conversion exception here

{
   "username":"demoUser",
   "password":"Password123",
   "person":{
      "names":[
         {
            "givenName":"Demo",
            "familyName":"User"
         }
      ],
      "gender":"M",
      "birthdate":"1997-09-02",
      "addresses":[
         {
            "address1":"30, Vivekananda Layout, Munnekolal,Marathahalli",
            "cityVillage":"Bengaluru",
            "country":"India",
            "postalCode":"560037"
         }
      ]
   },
   "systemId":"systemId"
}
  1. also while creating users can we somehow use the UUIDs of previously created persons ?? is it possible to pass in UUID of previously created person for creating a new user.

Is this of help? https://github.com/openmrs/openmrs-module-webservices.rest/blob/master/omod-1.8/src/test/java/org/openmrs/module/webservices/rest/web/v1_0/controller/openmrs1_8/UserController1_8Test.java#L153-L173

1 Like

@dkayiwa get it we can pass in the UUID instead of actual object, but what would be the preferred way to accomplish it, or both are equally useful?

Both are useful.

1 Like

@dkayiwa thank you :slight_smile: I will add both payloads as options in example.

@saurabh the survey looks good I think we can move forward with it.

cc :- @burke

1 Like

sure @ayesh with a few tweaks I will post it today :slight_smile:

sure @ayesh with a few tweaks I will post it today :slight_smile: and take some feedback with @herbert24 also today after the documentation call !

1 Like

Thanks alot @saurabh for the survey, lets fix a few things we have talked about and we have it out to the community

1 Like

The survey is up :smiley:

1 Like

Capture

cc @ayesh @burke @gcliff
@dkayiwa

  1. shouldnt the format be a required field, in the patientIdentifier type? but as mentioned in the dataModel it doesnt looks like.
  2. thought when I try to make a patientIdentifierType using this payload present in the static docs.
{
    "name": "Amani Identifier",
    "description": "Medical record number for Amani Health System",
    "format": "\\d{1,10}-\\d",
    "formatDescription": "Up to ten digts followed by a hyphen and another digit",
    "required": false,
    "validator": "org.openmrs.patient.impl.LuhnIdentifierValidator",
    "locationBehavior": "NOT_USED",
    "uniquenessBehavior": "UNIQUE"
}

It results in 500 internal server error status and I couldnt figure out why !!

1 Like

Hi @herbert24 I will be making improvements in the Obs and Concept sections as I have received feedbacks, could we hop on a call and discuss those changes and improvements, maybe before next documentation call. please let me know.

1 Like

@saurabh no problem,whcih other person would you like to join us?

1 Like

@herbert24 I think I would like 1 to 1 reviews with anybody and see what problems they face with the updated sections of the REST API docs :slight_smile:.

1 Like

when could that be?

1 Like

whatever time suits you @herbert24, I would prefer around the next documentation call !!

during or after the documentation call?

I would prefer before maybe if that works for you .even after would be fine since documentation call is a bit short for us to try out various sections of the documentation and give feedback for the same

1 Like

lets make it after

1 Like

it works for me @herbert24 :+1:

1 Like