GSoD 2020 - OpenMRS REST API Documentation

yes @dkayiwa ,so the conceptattributetype I created has a datatypeClassname of org.openmrs.customdatatype.datatype.LongFreeTextDatatype,

so any free text (does it mean any string is valid here? ) should be accepted as a value or It needs some specific valid value wrt to this customdatatype?

Did you intend to use FreeTextDatatype?

@dkayiwa I was trying to run a previous snippet from the static github API docs, and it was identical to this, but it didn’t work out !!

I even tried creating an conceptattributetype with boolean class type and passing in true as a value but still it gave this error

What do you get when you use FreeTextDatatype?

@dkayiwa I get this error.

From the stack trace, you are still using LongFreeTextDatatype

@dkayiwa what will be the preferredhandlerclassname and handlerconfig for FreeTextDatatype? I will create a new conceptattributetype for this and paste the results here !!

@dkayiwa I tried without those attributes and created a conceptattributetype(with FreeTextDatatype ) and tried to add it to a concept resource got this error.

sorry I forgot the paste!

Edit: here is the error

Which error?

1 Like

sorry @dkayiwa, I forgot the paste here is the error

'Sim' is a duplicate name in locale 'pt'. You could take a look at this to fix it or try a different concept. Failed Export Concepts - MetaSharing module

1 Like

Sure, I will try this after the documentation call and update you @dkayiwa :+1:

@gcliff @dkayiwa It works fine for the concept 48AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA thank you :slight_smile:.

I will try and read that whole thread and add a small caution in the docs regarding this error !!

1 Like

@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