This is the Continuous Integration Build of FHIR (will be incorrect/inconsistent at times).
See the Directory of published versions
Patient Administration Work Group | Maturity Level: N/A | Standards Status: Informative | Compartments: Encounter, Group, Patient, Practitioner, RelatedPerson |
This is the narrative for the resource. See also the XML, JSON or Turtle format.
Note that this is the formal definition for the merge operation as an OperationDefinition on Encounter. See the Operation documentation
Generated Narrative: OperationDefinition Encounter-merge
URL: [base]/Encounter/$merge
Use | Name | Scope | Cardinality | Type | Binding | Documentation |
IN | source-encounter | 0..1 | Reference (Encounter) | A direct resource reference to the source encounter resource (this may include an identifier). | ||
IN | source-encounter-identifier | 0..* | Identifier | When source-encounter-identifiers are provided, the server is expected to perform an internal lookup to identify the source encounter. The server SHALL reject the request if the provided identifiers do not resolve to a single encounter record. This resolution MAY occur asynchronously, for example, as part of a review by a user. | ||
IN | target-encounter | 0..1 | Reference (Encounter) | A direct resource reference to the target encounter resource. This is the surviving encounter resource, the target for the merge. | ||
IN | target-encounter-identifier | 0..* | Identifier | When target-encounter-identifiers are provided, the server is expected to perform an internal lookup to identify the target encounter record. The server SHALL reject the request if the provided identifiers do not resolve to a single encounter record. This resolution MAY occur asynchronously, for example, as part of a review by a user. | ||
IN | result-encounter | 0..1 | Encounter | The details of the Encounter resource that is expected to be updated to complete with and must have the same encounter.id and provided identifiers included. This resource MUST have the record-linkage extension with a link=replaces referencing the source encounter resource. It will be used to perform an update on the target encounter resource. In the absence of this parameter the servers should copy all identifiers from the source encounter into the target encounter, and include the record-linkage extension (as shown in the example below). This is often used when properties from the source encounter are desired to be included in the target resource. The receiving system may also apply other internal business rules onto the merge which may make the resource different from what is provided here. | ||
IN | preview | 0..1 | boolean | If this is set to true then the merge will not be actually performed; an OperationOutcome will be returned in the Parameters response that will indicate that no merge has occurred and may include other diagnostic info if desired, such as the scale of the merge. e.g. Issue.details.text "Preview only Encounter merge - no issues detected" e.g. Issue.diagnostics "Merge would update: 10 years of content or 120 resources" The resulting target encounter resource will also be returned in the result. | ||
OUT | return | 1..1 | Parameters | The status of the response will be one of:
The Parameters resource will include:
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 |
There must be exactly 1 source encounter, which may be identified by either the source-encounter or source-encounter-identifier parameters. Similarly, there must be exactly 1 target encounter, identified by either the target-encounter or target-encounter-identifier parameters. In both cases, either a reference to the encounter or a list of identifiers that can be used to identify the encounter may be provided, but not both.
The result-encounter.id must be the same as the target encounter reference (if the encounter reference is provided as an input parameter).
If a client needs the server to create a new encounter merged from the 2 encounter resources, the client should create a new encounter record and then call the merge operation to merge each source encounter resource into the newly created encounter resource.
A server may decide to delete the source record, but this is not defined by the standard merge operation, and if this occurs then the target encounter's link property will remain unchanged.
Usage note: every effort has been made to ensure that the examples are correct and useful, but they are not a normative part of the specification.