patient-link
type: OperationDefinition
node role: treeRoot
id:
  v: patient-link
text:
  status:
    v: generated
  div: Generated Narrative: OperationDefinition patient-link URL: [base]/Patient/$link Parameters Use Name Scope Cardinality Type Binding Documentation IN source-patient 0..1 Reference (EE MPI Patient) A direct resource reference to the source patient resource IN source-patient-identifier 0..* Identifier An identifier of the source patient IN target-patient 0..1 Reference (EE MPI Patient) A direct resource reference to the target patient resource. This is the surviving patient resource, the target for the link. IN target-patient-identifier 0..* Identifier An identifier of the target patient OUT return 1..1 Patient In case of successful link operation it returns the target patient resource with newly created link. In case of error returns OperationOutcome with detailed error message.
url:
  v: https://fhir.ee/mpi/OperationDefinition/patient-link
version:
  v: 1.4.0
name:
  v: EEMPIPatientLink
title:
  v: Patient Link
status:
  v: active
kind:
  v: operation
experimental:
  v: false
date:
  v: 2025-10-14T07:41:16+00:00
publisher:
  v: TEHIK
contact:
  name:
    v: TEHIK
  telecom:
    system:
      v: url
    value:
      v: https://tehik.ee
description:
  v: The link operation is used to link two patient resources. One of the two patients is identified as the source and one as the target. The link with type 'replaces' is created in target patient resource and points to source patient, the another link with type 'replaced-by' is created in source patient resource and points to target patient.
jurisdiction:
  coding:
    system:
      v: urn:iso:std:iso:3166
    code:
      v: EE
    display:
      v: Estonia
affects state:
  v: true
code:
  v: link
resource:
  v: Patient
system:
  v: false
type:
  v: true
instance:
  v: false
parameter:
  name:
    v: source-patient
  use:
    v: in
  min:
    v: 0
  max:
    v: 1
  documentation:
    v: A direct resource reference to the **source** patient resource
  type:
    v: Reference
  target profile:
    v: https://fhir.ee/mpi/StructureDefinition/ee-mpi-patient
    link: https://fhir.ee/mpi/StructureDefinition/ee-mpi-patient
parameter:
  name:
    v: source-patient-identifier
  use:
    v: in
  min:
    v: 0
  max:
    v: *
  documentation:
    v: An identifier of the source patient
  type:
    v: Identifier
parameter:
  name:
    v: target-patient
  use:
    v: in
  min:
    v: 0
  max:
    v: 1
  documentation:
    v: A direct resource reference to the **target** patient resource. This is the surviving patient resource, the target for the link.
  type:
    v: Reference
  target profile:
    v: https://fhir.ee/mpi/StructureDefinition/ee-mpi-patient
    link: https://fhir.ee/mpi/StructureDefinition/ee-mpi-patient
parameter:
  name:
    v: target-patient-identifier
  use:
    v: in
  min:
    v: 0
  max:
    v: *
  documentation:
    v: An identifier of the target patient
  type:
    v: Identifier
parameter:
  name:
    v: return
  use:
    v: out
  min:
    v: 1
  max:
    v: 1
  documentation:
    v: In case of successful link operation it returns the target patient resource with newly created link. In case of error returns OperationOutcome with detailed error message.
  type:
    v: Patient