@ayesh I am currently in the last section of concepts,
After I get concept and hopefully obs also merged I will float another survey,
but I think after we merge concepts we can start getting feedback and , I can hop on a call with @herbert24 where he can share his screen while trying to follow the documentation.
Where can I get some description about these missing attributes like hiNormal, hiAbsolute ?
Should I use all these attributes while writing an example for the static documentation creating a concept or elide some of them which are not so important?
Can I annotate the attributes for required/ not required using this data model here ? since the swagger dosent specify anything neither does our static docs for this section .
@ayesh@burke@gcliff what does this error mean while creating a new concept name for an existing concept this was my request payload.
I thought its due to duplicate concept-name but different name also dint work !!
I tried adding concept Attribute type to any concept through the refapp on demo server but couldnt find any option to do so, where should I navigate I went to the manage concept section but coudnt find anyway to do it?
Secondly a payload for a conceptattributetype should be something like this
POST /conceptattributetype
{
"name": "Time Span",
"description": "This attribute type will record the time span for the concept",
"datatypeClassname": "org.openmrs.customdatatype.datatype.LongFreeTextDatatype",
"minOccurs": 0,
"maxOccurs": 1,
"datatypeConfig": "default",
"preferredHandlerClassname": "org.openmrs.web.attribute.handler.LongFreeTextTextareaHandler",
"handlerConfig": null
}
No @gcliff the json I have used is for adding that attribute to the concept resource I have already created the conceptattributetype and 88e9873a-a520-4d3c-a91d-8ea3c303deff this was its UUID
@gcliff I cant even do it from the legacy UI, I think since it just creates a conceptattributetype and not associates it with any concept in the concept dictionary ?
"detail": "org.openmrs.module.webservices.rest.web.response.ConversionException: value on class org.openmrs.ConceptAttribute throwing a java.lang.NullPointerException
which i think is resulting from the failure to convert the value parameter of the json payload.
As you can see here in the concept attribute resource there is a property setter method for the attributeType parameter but am not seeing a respective property setter method for the value parameter hence spawning the above conversion exception
@gcliff thank you, yes there is no property setter for value parameter but I think we cannot send the payload without any value its required in the datamodel as well, is this a implementation issue should we raise a ticket for it ?
The fact that this test does not fail proves that a value should be saved successfully. From the stack trace, this is the underlying cause. The referenceString that is being passed in does not exist.
The value property setter can be found here. As you can see in that code, the structure of the value should be one that the custom datatype can reference from.