This page is part of the FHIR Specification v6.0.0-ballot1: Release 6 Ballot (1st Draft) (see Ballot Notes). The current version is 5.0.0. For a full list of available versions, see the Directory of published versions
Patient Administration Work Group | Maturity Level: 5 | Trial Use | Compartments: N/A |
This operation is used to request the removal of all current and historical versions for all resources in a patient compartment or from a Group of patient compartments. The return is an OperationOutcome with results and/or details about execution.
Following are some common issue-type
values:
success
the request has been completed to the server's satisfaction - the patient and associated resources are no longer accessibleincomplete
the request is partially complete, but additional processing will continue (e.g., the server is continuing to clean out resources)When supported, it is recommended (though not required) to support an Asynchronous Request Pattern.
Note that the deletion of resources typically involves many policy decisions. Implementers are expected to use this operation in conjunction with their policies for such a request - e.g., soft vs. hard delete, audibility/traceability, evaluation of referential integrity, etc..
The canonical URL for this operation definition is
http://hl7.org/fhir/OperationDefinition/Patient-purge
Formal Definition (as a OperationDefinition).
URL: [base]/Patient/[id]/$purge
This is an idempotent operation
Out Parameters: | ||||||
Name | Scope | Cardinality | Type | Binding | Profile | Documentation |
return | 1..1 | OperationOutcome | Status and/or results of the purge request Note: as this is the only out parameter, it is a resource, and it has the name 'return', the result of this operation is returned directly as a resource |
Request: Remove all resources linked to a single patient
GET /open/Patient/f001/$purge [some headers]
Response: Remove everything linked to the nominated patient (in this case, built automatically by the publication tooling)
HTTP/1.1 200 OK [other headers] <OperationOutcome xmlns="http://hl7.org/fhir"> <text> <status value="generated"/> <div xmlns="http://www.w3.org/1999/xhtml"> <p>All OK</p> </div> </text> <issue> <severity value="success"/> <code value="success"/> <details> <text value="The operation completed successfully."/> </details> </issue> </OperationOutcome>
For more information about operations, including how they are invoked, see Operations.