This issue was encountered when running a TestScript that tests if the Library resource returned from a $data-requirements call confirms to the LIbrary Structure Definition, but it can be replicated in Postman without the TestScript.
Get the data requirements for measure-mrp: GET http://measure.eval.kanvix.com/cqf-ruler/baseDstu3/Measure/measure-mrp/$data-requirements?periodStart=2018-01-01&periodEnd=2018-12-31
Validate the above JSON using the $validate operation for a Library resource: POST http://measure.eval.kanvix.com/cqf-ruler/baseDstu3/Library/$validate with the above JSON as the request body
The validation fails with HTTP 412 Precondition Failed
{
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[Library]</td><td><pre>Profile http://hl7.org/fhir/StructureDefinition/Library, Element 'Library.status': minimum required = 1, but only found 0</pre></td>\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Profile http://hl7.org/fhir/StructureDefinition/Library, Element 'Library.status': minimum required = 1, but only found 0",
"location": [
"Library"
]
}
]
}
The error message status that "Library.status" is missing, and we can see in the structure definition that "status" does have cardinality 1..1 so it is required. When a "status" property is added to the JSON body for the $validate call, it does return 200 OK.
This issue was encountered when running a TestScript that tests if the Library resource returned from a $data-requirements call confirms to the LIbrary Structure Definition, but it can be replicated in Postman without the TestScript.
measure-mrp
:GET http://measure.eval.kanvix.com/cqf-ruler/baseDstu3/Measure/measure-mrp/$data-requirements?periodStart=2018-01-01&periodEnd=2018-12-31
Should get the following JSON as the response:
POST http://measure.eval.kanvix.com/cqf-ruler/baseDstu3/Library/$validate
with the above JSON as the request bodyThe validation fails with HTTP 412 Precondition Failed
The error message status that "Library.status" is missing, and we can see in the structure definition that "status" does have cardinality 1..1 so it is required. When a "status" property is added to the JSON body for the $validate call, it does return 200 OK.