post https://fhir-api.zapehr.com/r4b/EventDefinition
EventDefinition on the FHIR specification website.
The EventDefinition resource provides a reusable description of when a particular event can occur.
The body should be a valid FHIR object for EventDefinition.
Here is an example:
{
"resourceType": "EventDefinition",
"id": "example",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n </div>"
},
"status": "draft",
"purpose": "Monitor all admissions to Emergency",
"trigger": [
{
"type": "named-event",
"name": "monitor-emergency-admissions",
"data": [
{
"type": "Encounter"
}
],
"condition": {
"description": "Encounter Location = emergency (active/completed encounters, current or previous)",
"language": "text/fhirpath",
"expression": "(this | %previous).location.where(location = 'Location/emergency' and status in {'active', 'completed'}).exists()"
}
}
]
}
You can reference the FHIR documentation to determine the format for EventDefinition
.