GSoD 2020 - OpenMRS REST API Documentation

@ayesh @burke @gcliff

  1. I read through these desciptions in the parameter list of creating a concept section and it specifies description as Array of strings shouldnt it be array of concept-description ?

and similarly for mapping as well

  1. for creating new concept with an array of mappings do we have to pass in new json payload for each mapping initially ? like
[    
{
  "conceptReferenceTerm": "21fb14d7-5cd9-3621-ac30-c9e57320e233",
  "conceptMapType": "35543629-7d8c-11e1-909d-c80aa9edcf4e"
}
{
  "conceptReferenceTerm": "21fb14d7-5cd9-3621-ac30-c9e57320e234",
  "conceptMapType": "35543629-7d8c-11e1-909d-c80aa9edcf4f"
}
]

or is there some other way around as well?

@saurabh exactly we have to pass like as you mentioned

[    
{
  "conceptReferenceTerm": "21fb14d7-5cd9-3621-ac30-c9e57320e233",
  "conceptMapType": "35543629-7d8c-11e1-909d-c80aa9edcf4e"
}
{
  "conceptReferenceTerm": "21fb14d7-5cd9-3621-ac30-c9e57320e234",
  "conceptMapType": "35543629-7d8c-11e1-909d-c80aa9edcf4f"
}
]

You can update the document.

1 Like

Sure @ayesh , and also is the description wrong as well?

@ayesh @burke @gcliff what does this valueCodedName parameter expects while creating an observation, is its type concept name ? this parameters description is missing from the static docs and there is little help on the swagger as well.

Capture

I am not sure since you have tagged burke let’s ask from daniel and Ian as well

cc:- @dkayiwa @ibacher

1 Like

Is this what you are looking for? https://github.com/openmrs/openmrs-core/blob/2.3.0/api/src/main/java/org/openmrs/Obs.java#L706

Just in case you find this useful: I18n support for all classes extending BaseOpenmrsMetadata

1 Like

really helpful thank you @dkayiwa !!

1 Like

@ayesh @burke @herbert24 I have this short survey to be put up for the resources I have been working on uptill now, could I get some review on this form before I put it up for the community thanks !!

1 Like

@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