The following use case will allow a partner to query for a list of ServiceRequests that where assigned to them by the CIE Hub. Currently the use case is that if a Michigan 211 operator can create and assign a ServiceRequest to a partner. In this situation the Hub will create a ServiceRequest with the performer field set to the partner Organization.
Performer Attribute
The following is a example of a performer attribute that is filled in
"performer": [ { "display": "United Way", "reference": "Organization/39", // This will be the ID that is given during Setup "type": "Organization" } ],
Example of search
The following search will get a list of the current active ServiceRequests that are assigned to the partner organization and also return the list of Patients that correspond to those ServiceRequests and any resources that the service request was based on.
GET https://fhir.mi-cie.org/ServiceRequest ?performer=Organization/{PARTNERID} &status=active &_include=ServiceRequest:based-on &_include=ServiceRequest:subject
The result of this query would be a bundle of resources. Here is a link for a example on the FHIR site of a bundle search response.
https://build.fhir.org/bundle-example.json.html
Updating the status of the ServiceRequest once it has been completed
To make sure that the status of your service requests are up to data you will need to update the status of the service request through a PATCH method.
The following is the example of a PATCH url and body for this operation
PATCH https://fhir.mi-cie.org/fhirR4/ServiceRequest/{SERVICEREQUEST_ID} BODY will be [{op: 'replace', path: '/status', value: 'completed'}]
Add Comment