{
  "resourceType": "StructureDefinition",
  "id": "Linkage",
  "meta": {
    "lastUpdated": "2021-01-01T21:58:31.578+00:00"
  },
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-category",
      "valueString": "Foundation.Other"
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
      "valueCode": "trial-use"
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
      "valueInteger": 0
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-security-category",
      "valueCode": "patient"
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
      "valueCode": "pc"
    },
    {
      "url": "http://hl7.org/fhir/build/StructureDefinition/entered-in-error-status",
      "valueCode": ".active = false"
    }
  ],
  "url": "http://hl7.org/fhir/StructureDefinition/Linkage",
  "version": "4.6.0",
  "name": "Linkage",
  "status": "draft",
  "date": "2021-01-01T21:58:31+00:00",
  "publisher": "Health Level Seven International (Patient Care)",
  "contact": [
    {
      "telecom": [
        {
          "system": "url",
          "value": "http://hl7.org/fhir"
        }
      ]
    },
    {
      "telecom": [
        {
          "system": "url",
          "value": "http://www.hl7.org/Special/committees/patientcare/index.cfm"
        }
      ]
    }
  ],
  "description": "Identifies two or more records (resource instances) that refer to the same real-world \"occurrence\".",
  "fhirVersion": "4.6.0",
  "mapping": [
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/fivews",
      "name": "FiveWs Pattern Mapping"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "Linkage",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/DomainResource",
  "derivation": "specialization",
  "differential": {
    "element": [
      {
        "id": "Linkage",
        "path": "Linkage",
        "short": "Links records for 'same' item",
        "definition": "Identifies two or more records (resource instances) that refer to the same real-world \"occurrence\".",
        "min": 0,
        "max": "*",
        "constraint": [
          {
            "key": "lnk-1",
            "severity": "error",
            "human": "Must have at least two items",
            "expression": "item.count()>1",
            "xpath": "count(f:item)>1",
            "source": "http://hl7.org/fhir/StructureDefinition/Linkage"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A - RIM doesn't know how to do this"
          },
          {
            "identity": "w5",
            "map": "infrastructure.structure"
          }
        ]
      },
      {
        "id": "Linkage.active",
        "path": "Linkage.active",
        "short": "Whether this linkage assertion is active or not",
        "definition": "Indicates whether the asserted set of linkages are considered to be \"in effect\".",
        "comment": "If false, any asserted linkages should not be considered current/relevant/applicable.",
        "requirements": "Need to be able to mark a linkage record as not to be used because it was created in error.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "boolean"
          }
        ],
        "meaningWhenMissing": "This resource is generally assumed to be active if no value is provided for the active element",
        "isSummary": true,
        "mapping": [
          {
            "identity": "w5",
            "map": "FiveWs.status"
          }
        ]
      },
      {
        "id": "Linkage.author",
        "path": "Linkage.author",
        "short": "Who is responsible for linkages",
        "definition": "Identifies the user or organization responsible for asserting the linkages as well as the user or organization who establishes the context in which the nature of each linkage is evaluated.",
        "requirements": "\"Primary\" for the same set of linked resources may be different from different user's/organization's perspectives.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Practitioner",
              "http://hl7.org/fhir/StructureDefinition/PractitionerRole",
              "http://hl7.org/fhir/StructureDefinition/Organization"
            ]
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "w5",
            "map": "FiveWs.author"
          }
        ]
      },
      {
        "id": "Linkage.item",
        "path": "Linkage.item",
        "short": "Item to be linked",
        "definition": "Identifies which record considered as the reference to the same real-world occurrence as well as how the items should be evaluated within the collection of linked items.",
        "min": 1,
        "max": "*",
        "type": [
          {
            "code": "BackboneElement"
          }
        ],
        "condition": [
          "lnk-1"
        ],
        "isSummary": true
      },
      {
        "id": "Linkage.item.type",
        "path": "Linkage.item.type",
        "short": "source | alternate | historical",
        "definition": "Distinguishes which item is \"source of truth\" (if any) and which items are no longer considered to be current representations.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "LinkageType"
            }
          ],
          "strength": "required",
          "description": "Used to distinguish different roles a resource can play within a set of linked resources.",
          "valueSet": "http://hl7.org/fhir/ValueSet/linkage-type"
        }
      },
      {
        "id": "Linkage.item.resource",
        "path": "Linkage.item.resource",
        "short": "Resource being linked",
        "definition": "The resource instance being linked as part of the group.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Resource"
            ]
          }
        ],
        "isSummary": true
      }
    ]
  }
}