Hello, I am on OpenMRS_referenceapplication-standalone-2.11.0
Making POST to http://localhost:8081/openmrs-standalone/ws/fhir2/R4/Observation/
To create an Observation using:
{
"resourceType": "Observation",
"code": {
"coding": [
{
"system": "http://openmrs.org",
"code": "5087AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"display": "PULSE"
},
{
"system": "http://loinc.org",
"code": "8889-8",
"display": "Heart Rate"
}
]
},
"valueQuantity": {
"value": 87,
"system": "http://unitsofmeasure.org",
"code": "bpm"
},
"concept": "5087AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"obsDatetime": "2016-08-14T09:41:52",
"issued": "2016-08-14T09:41:52.000",
"status": "final",
"subject": {
"reference": "Patient/85511527-6223-11e6-a4f9-000d3a23bb00"
},
"referenceRange": [
{
"high": {
"value": 120,
"system": "http://unitsofmeasure.org",
"code": "bpm"
}
}
],
"encounter": {
"reference": "Encounter/11c1b0ab-d213-43b1-9ea2-6c0f58e2e459"
}
}
I am getting 422 Unprocessable Entity error:
ERROR ‘obs id is null’ failed to validate with reason: obsDatetime: Cannot be empty or null, concept: Cannot be empty or null
And in my server log: Failure during REST processing: ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException: ‘obs id is null’ failed to validate with reason: obsDatetime: Cannot be empty or null, concept: Cannot be empty or null
But I did specify obsDatetime so what am I doing wrong?
I only have documentation from here:
https://wiki.openmrs.org/display/projects/Observation+Resource https://wiki.openmrs.org/display/projects/OpenMRS+FHIR+Module
But where do I find documentation on which elements are mandatory and what format and data types they have to have?
Thank-you