Connectathon 11 Snapshot

This page is part of the FHIR Specification (v1.2.0: STU 3 Draft). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions . Page versions: R5 R4B R4 R3 R2

Reference.profile.json

Raw JSON (canonical form)

StructureDefinition for Reference

{
  "resourceType": "StructureDefinition",
  "id": "Reference",
  "meta": {
    "lastUpdated": "2015-12-11T17:38:40.294+11:00"
  },
  "text": {
    "status": "generated",
    "div": "<div>!-- Snipped for Brevity --></div>"
  },
  "url": "http://hl7.org/fhir/StructureDefinition/Reference",
  "name": "Reference",
  "status": "draft",
  "publisher": "HL7 FHIR Standard",
  "contact": [
    {
      "telecom": [
        {
          "system": "other",
          "value": "http://hl7.org/fhir"
        }
      ]
    }
  ],
  "date": "2015-12-11T17:38:40+11:00",
  "description": "Base StructureDefinition for Reference Type",
  "fhirVersion": "1.2.0",
  "mapping": [
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM"
    }
  ],
  "kind": "datatype",
  "abstract": false,
  "base": "http://hl7.org/fhir/StructureDefinition/Element",
  "snapshot": {
    "element": [
      {
        "path": "Reference",
        "short": "A reference from one resource to another",
        "definition": "A reference from one resource to another.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Element"
          }
        ],
        "constraint": [
          {
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-expression",
                "valueString": "reference.startsWith(\"#\").not() or ($context.reference.substring(1).log(\"url\") in $resource.contained.id.log(\"ids\"))"
              }
            ],
            "key": "ref-1",
            "severity": "error",
            "human": "SHALL have a local reference if the resource is provided inline",
            "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)"
          }
        ]
      },
      {
        "path": "Reference.id",
        "representation": [
          "xmlAttr"
        ],
        "short": "xml:id (or equivalent in JSON)",
        "definition": "unique id for the element within a resource (for internal references).",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "id"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "path": "Reference.extension",
        "short": "Additional Content defined by implementations",
        "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
        "comments": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
        "alias": [
          "extensions",
          "user content"
        ],
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Extension"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "path": "Reference.reference",
        "short": "Relative, internal or absolute URL reference",
        "definition": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.",
        "comments": "Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries.   Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure \"/[type]/[id]\" then it should be assumed that the reference is to a FHIR RESTful server.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "condition": [
          "ref-1"
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "path": "Reference.display",
        "short": "Text alternative for the resource",
        "definition": "Plain text narrative that identifies the resource in addition to the resource reference.",
        "comments": "This is generally not the same as the Resource.text of the referenced resource.  The purpose is to identify what's being referenced, not to fully describe it.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      }
    ]
  },
  "differential": {
    "element": [
      {
        "path": "Reference",
        "short": "A reference from one resource to another",
        "definition": "A reference from one resource to another.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Element"
          }
        ],
        "constraint": [
          {
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-expression",
                "valueString": "reference.startsWith(\"#\").not() or ($context.reference.substring(1).log(\"url\") in $resource.contained.id.log(\"ids\"))"
              }
            ],
            "key": "ref-1",
            "severity": "error",
            "human": "SHALL have a local reference if the resource is provided inline",
            "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)"
          }
        ]
      },
      {
        "path": "Reference.reference",
        "short": "Relative, internal or absolute URL reference",
        "definition": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.",
        "comments": "Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries.   Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure \"/[type]/[id]\" then it should be assumed that the reference is to a FHIR RESTful server.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "condition": [
          "ref-1"
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "path": "Reference.display",
        "short": "Text alternative for the resource",
        "definition": "Plain text narrative that identifies the resource in addition to the resource reference.",
        "comments": "This is generally not the same as the Resource.text of the referenced resource.  The purpose is to identify what's being referenced, not to fully describe it.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      }
    ]
  }
}

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.