Interaction: Search Provenance
The Search Provenance interaction allows an Electronic Medical Record (EMR) system to retrieve collection of Provenence resources.
Usage
Search Provenance Request
The Search Provenance interaction shall retrieve all Provenance resources from the repository that match search criteria.
GET [base]/Provenance?search_parameter=[PARAMETER_ID]
Search Parameter
A subset of standard Provenance search parameters defined at the bottom of
- agent
- agent-type
- entity
- patient
- recorded
- target
- include=Provenance:target" for Provenance
- revinclude=Provenance:target" for all other resources
Search Provenance Response
The server returns a 200 OK HTTP status code.
The response bodfy contains FHIR Resource Type:
Bundle(type =searchset)Each
entry.resourceis aProvenencethat matches the provided search parameter.
Interaction Sequence Diagram
Example Search Provenence Interaction
Search Provenance Request:
Below is an example of Search Provenance request to retrieve all Provenance resources where agent matches Practitioner with `identifier=123`
GET [base]/Provenance?agent=Practitioner/123
POST method can be used when search parameters are too complex or long for a URL (e.g., long queries or special characters). Parameters are passed in the body as application/x-www-form-urlencoded.
POST [base]/Provenence/_search
Content-Type: application/x-www-form-urlencoded
Search Provenence Response:
Sample of the Search Provenance response is provided in the Examples section.
Security & Authorization
- Access to this interaction is restricted to authorized EMRs.
- OAuth2 authentication is required.
- Only subscriptions tagged with the authenticated EMR's
emr_idwill be returned.
Error Handling
| HTTP Status | Reason | Description |
|---|---|---|
| 400 | Missing or invalid search parameter | The required search parameter is not valid. |
| 401 | Unauthorized | Request is missing a valid access token. |
| 500 | Internal Server Error | A server-side error occurred. |