This page is part of the FHIR Specification (v4.3.0: R4B - STU). 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
Modeling and Methodology Work Group | Maturity Level: N/A | Standards Status: Informative |
Raw Turtle (+ also see Turtle/RDF Format Specification)
StructureDefinition for Reference
@prefix fhir: <http://hl7.org/fhir/> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . # - resource ------------------------------------------------------------------- [] a fhir:StructureDefinition; fhir:Resource.id [ fhir:value "Reference"]; fhir:DomainResource.text [ fhir:Narrative.status [ fhir:value "generated" ] ]; fhir:DomainResource.extension [ fhir:index 0; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status" ]; fhir:Extension.value [ fhir:value "normative" ] ], [ fhir:index 1; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version" ]; fhir:Extension.value [ fhir:value "4.0.0" ] ]; fhir:StructureDefinition.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/Reference"]; fhir:StructureDefinition.version [ fhir:value "4.3.0"]; fhir:StructureDefinition.name [ fhir:value "Reference"]; fhir:StructureDefinition.status [ fhir:value "active"]; fhir:StructureDefinition.experimental [ fhir:value "false"]; fhir:StructureDefinition.date [ fhir:value "2022-05-28T12:47:40+10:00"]; fhir:StructureDefinition.publisher [ fhir:value "HL7 FHIR Standard"]; fhir:StructureDefinition.contact [ fhir:index 0; fhir:ContactDetail.telecom [ fhir:index 0; fhir:ContactPoint.system [ fhir:value "url" ]; fhir:ContactPoint.value [ fhir:value "http://hl7.org/fhir" ] ] ]; fhir:StructureDefinition.description [ fhir:value "Base StructureDefinition for Reference Type: A reference from one resource to another."]; fhir:StructureDefinition.fhirVersion [ fhir:value "4.3.0"]; fhir:StructureDefinition.mapping [ fhir:index 0; fhir:StructureDefinition.identity [ fhir:value "rim" ]; fhir:StructureDefinition.uri [ fhir:value "http://hl7.org/v3" ]; fhir:StructureDefinition.name [ fhir:value "RIM Mapping" ] ]; fhir:StructureDefinition.kind [ fhir:value "complex-type"]; fhir:StructureDefinition.abstract [ fhir:value "false"]; fhir:StructureDefinition.type [ fhir:value "Reference"]; fhir:StructureDefinition.baseDefinition [ fhir:value "http://hl7.org/fhir/StructureDefinition/Element"]; fhir:StructureDefinition.derivation [ fhir:value "specialization"]; fhir:StructureDefinition.snapshot [ fhir:StructureDefinition.element [ fhir:index 0; fhir:Element.id [ fhir:value "Reference" ]; fhir:Element.extension [ fhir:index 0; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status" ]; fhir:Extension.value [ fhir:value "normative" ] ], [ fhir:index 1; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version" ]; fhir:Extension.value [ fhir:value "4.0.0" ] ]; fhir:ElementDefinition.path [ fhir:value "Reference" ]; fhir:ElementDefinition.short [ fhir:value "A reference from one resource to another" ]; fhir:ElementDefinition.definition [ fhir:value "A reference from one resource to another." ]; fhir:ElementDefinition.comment [ fhir:value "References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository." ]; fhir:ElementDefinition.min [ fhir:value "0" ]; fhir:ElementDefinition.max [ fhir:value "*" ]; fhir:ElementDefinition.base [ fhir:ElementDefinition.path [ fhir:value "Reference" ]; fhir:ElementDefinition.min [ fhir:value "0" ]; fhir:ElementDefinition.max [ fhir:value "*" ] ]; fhir:ElementDefinition.condition [ fhir:value "ele-1"; fhir:index 0 ]; fhir:ElementDefinition.constraint [ fhir:index 0; fhir:ElementDefinition.key [ fhir:value "ele-1" ]; fhir:ElementDefinition.severity [ fhir:value "error" ]; fhir:ElementDefinition.human [ fhir:value "All FHIR elements must have a @value or children unless an empty Parameters resource" ]; fhir:ElementDefinition.expression [ fhir:value "hasValue() or (children().count() > id.count()) or $this is Parameters" ]; fhir:ElementDefinition.xpath [ fhir:value "@value|f:*|h:div|self::f:Parameters" ]; fhir:ElementDefinition.source [ fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ] ], [ fhir:index 1; fhir:ElementDefinition.key [ fhir:value "ref-1" ]; fhir:ElementDefinition.severity [ fhir:value "error" ]; fhir:ElementDefinition.human [ fhir:value "SHALL have a contained resource if a local reference is provided" ]; fhir:ElementDefinition.expression [ fhir:value "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids')) or (reference='#' and %rootResource!=%resource)" ]; fhir:ElementDefinition.xpath [ fhir:value "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, '#')])" ]; fhir:ElementDefinition.source [ fhir:value "http://hl7.org/fhir/StructureDefinition/Reference" ] ]; fhir:ElementDefinition.isModifier [ fhir:value "false" ]; fhir:ElementDefinition.mapping [ fhir:index 0; fhir:ElementDefinition.identity [ fhir:value "rim" ]; fhir:ElementDefinition.map [ fhir:value "n/a" ] ], [ fhir:index 1; fhir:ElementDefinition.identity [ fhir:value "rim" ]; fhir:ElementDefinition.map [ fhir:value "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" ] ] ], [ fhir:index 1; fhir:Element.id [ fhir:value "Reference.id" ]; fhir:ElementDefinition.path [ fhir:value "Reference.id" ]; fhir:ElementDefinition.representation [ fhir:value "xmlAttr"; fhir:index 0 ]; fhir:ElementDefinition.short [ fhir:value "Unique id for inter-element referencing" ]; fhir:ElementDefinition.definition [ fhir:value "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." ]; fhir:ElementDefinition.min [ fhir:value "0" ]; fhir:ElementDefinition.max [ fhir:value "1" ]; fhir:ElementDefinition.base [ fhir:ElementDefinition.path [ fhir:value "Element.id" ]; fhir:ElementDefinition.min [ fhir:value "0" ]; fhir:ElementDefinition.max [ fhir:value "1" ] ]; fhir:ElementDefinition.type [ fhir:index 0; fhir:Element.extension [ fhir:index 0; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type" ]; fhir:Extension.value [ fhir:value "id" ] ]; fhir:ElementDefinition.code [ fhir:value "http://hl7.org/fhirpath/System.String" ] ]; fhir:ElementDefinition.isModifier [ fhir:value "false" ]; fhir:ElementDefinition.isSummary [ fhir:value "false" ]; fhir:ElementDefinition.mapping [ fhir:index 0; fhir:ElementDefinition.identity [ fhir:value "rim" ]; fhir:ElementDefinition.map [ fhir:value "n/a" ] ] ], [ fhir:index 2; fhir:Element.id [ fhir:value "Reference.extension" ]; fhir:ElementDefinition.path [ fhir:value "Reference.extension" ]; fhir:ElementDefinition.slicing [ fhir:ElementDefinition.discriminator [ fhir:index 0; fhir:ElementDefinition.type [ fhir:value "value" ]; fhir:ElementDefinition.path [ fhir:value "url" ] ]; fhir:ElementDefinition.description [ fhir:value "Extensions are always sliced by (at least) url" ]; fhir:ElementDefinition.rules [ fhir:value "open" ] ]; fhir:ElementDefinition.short [ fhir:value "Additional content defined by implementations" ]; fhir:ElementDefinition.definition [ fhir:value "May be used to represent additional information that is not part of the basic definition of the element. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension." ]; fhir:ElementDefinition.comment [ fhir:value "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." ]; fhir:ElementDefinition.alias [ fhir:value "extensions"; fhir:index 0 ], [ fhir:value "user content"; fhir:index 1 ]; fhir:ElementDefinition.min [ fhir:value "0" ]; fhir:ElementDefinition.max [ fhir:value "*" ]; fhir:ElementDefinition.base [ fhir:ElementDefinition.path [ fhir:value "Element.extension" ]; fhir:ElementDefinition.min [ fhir:value "0" ]; fhir:ElementDefinition.max [ fhir:value "*" ] ]; fhir:ElementDefinition.type [ fhir:index 0; fhir:ElementDefinition.code [ fhir:value "Extension" ] ]; fhir:ElementDefinition.constraint [ fhir:index 0; fhir:ElementDefinition.key [ fhir:value "ele-1" ]; fhir:ElementDefinition.severity [ fhir:value "error" ]; fhir:ElementDefinition.human [ fhir:value "All FHIR elements must have a @value or children" ]; fhir:ElementDefinition.expression [ fhir:value "hasValue() or (children().count() > id.count())" ]; fhir:ElementDefinition.xpath [ fhir:value "@value|f:*|h:div" ]; fhir:ElementDefinition.source [ fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ] ], [ fhir:index 1; fhir:ElementDefinition.key [ fhir:value "ext-1" ]; fhir:ElementDefinition.severity [ fhir:value "error" ]; fhir:ElementDefinition.human [ fhir:value "Must have either extensions or value[x], not both" ]; fhir:ElementDefinition.expression [ fhir:value "extension.exists() != value.exists()" ]; fhir:ElementDefinition.xpath [ fhir:value "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])" ]; fhir:ElementDefinition.source [ fhir:value "http://hl7.org/fhir/StructureDefinition/Extension" ] ]; fhir:ElementDefinition.isModifier [ fhir:value "false" ]; fhir:ElementDefinition.isSummary [ fhir:value "false" ]; fhir:ElementDefinition.mapping [ fhir:index 0; fhir:ElementDefinition.identity [ fhir:value "rim" ]; fhir:ElementDefinition.map [ fhir:value "n/a" ] ] ], [ fhir:index 3; fhir:Element.id [ fhir:value "Reference.reference" ]; fhir:ElementDefinition.path [ fhir:value "Reference.reference" ]; fhir:ElementDefinition.short [ fhir:value "Literal reference, Relative, internal or absolute URL" ]; fhir:ElementDefinition.definition [ fhir:value "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." ]; fhir:ElementDefinition.comment [ fhir:value "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." ]; fhir:ElementDefinition.min [ fhir:value "0" ]; fhir:ElementDefinition.max [ fhir:value "1" ]; fhir:ElementDefinition.base [ fhir:ElementDefinition.path [ fhir:value "Reference.reference" ]; fhir:ElementDefinition.min [ fhir:value "0" ]; fhir:ElementDefinition.max [ fhir:value "1" ] ]; fhir:ElementDefinition.type [ fhir:index 0; fhir:ElementDefinition.code [ fhir:value "string" ] ]; fhir:ElementDefinition.condition [ fhir:value "ref-1"; fhir:index 0 ]; fhir:ElementDefinition.constraint [ fhir:index 0; fhir:ElementDefinition.key [ fhir:value "ele-1" ]; fhir:ElementDefinition.severity [ fhir:value "error" ]; fhir:ElementDefinition.human [ fhir:value "All FHIR elements must have a @value or children" ]; fhir:ElementDefinition.expression [ fhir:value "hasValue() or (children().count() > id.count())" ]; fhir:ElementDefinition.xpath [ fhir:value "@value|f:*|h:div" ]; fhir:ElementDefinition.source [ fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ] ]; fhir:ElementDefinition.isModifier [ fhir:value "false" ]; fhir:ElementDefinition.isSummary [ fhir:value "true" ]; fhir:ElementDefinition.mapping [ fhir:index 0; fhir:ElementDefinition.identity [ fhir:value "rim" ]; fhir:ElementDefinition.map [ fhir:value "N/A" ] ] ], [ fhir:index 4; fhir:Element.id [ fhir:value "Reference.type" ]; fhir:ElementDefinition.path [ fhir:value "Reference.type" ]; fhir:ElementDefinition.short [ fhir:value "Type the reference refers to (e.g. \"Patient\")" ]; fhir:ElementDefinition.definition [ fhir:value "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)." ]; fhir:ElementDefinition.comment [ fhir:value "This element is used to indicate the type of the target of the reference. This may be used which ever of the other elements are populated (or not). In some cases, the type of the target may be determined by inspection of the reference (e.g. a RESTful URL) or by resolving the target of the reference; if both the type and a reference is provided, the reference SHALL resolve to a resource of the same type as that specified." ]; fhir:ElementDefinition.min [ fhir:value "0" ]; fhir:ElementDefinition.max [ fhir:value "1" ]; fhir:ElementDefinition.base [ fhir:ElementDefinition.path [ fhir:value "Reference.type" ]; fhir:ElementDefinition.min [ fhir:value "0" ]; fhir:ElementDefinition.max [ fhir:value "1" ] ]; fhir:ElementDefinition.type [ fhir:index 0; fhir:ElementDefinition.code [ fhir:value "uri" ] ]; fhir:ElementDefinition.constraint [ fhir:index 0; fhir:ElementDefinition.key [ fhir:value "ele-1" ]; fhir:ElementDefinition.severity [ fhir:value "error" ]; fhir:ElementDefinition.human [ fhir:value "All FHIR elements must have a @value or children" ]; fhir:ElementDefinition.expression [ fhir:value "hasValue() or (children().count() > id.count())" ]; fhir:ElementDefinition.xpath [ fhir:value "@value|f:*|h:div" ]; fhir:ElementDefinition.source [ fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ] ]; fhir:ElementDefinition.isModifier [ fhir:value "false" ]; fhir:ElementDefinition.isSummary [ fhir:value "true" ]; fhir:ElementDefinition.binding [ fhir:Element.extension [ fhir:index 0; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/build/StructureDefinition/binding-definition" ]; fhir:Extension.value [ fhir:value "Aa resource (or, for logical models, the URI of the logical model)." ] ], [ fhir:index 1; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ]; fhir:Extension.value [ fhir:value "FHIRResourceTypeExt" ] ], [ fhir:index 2; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding" ]; fhir:Extension.value [ fhir:value "true" ] ]; fhir:ElementDefinition.strength [ fhir:value "extensible" ]; fhir:ElementDefinition.valueSet [ fhir:value "http://hl7.org/fhir/ValueSet/resource-types" ] ]; fhir:ElementDefinition.mapping [ fhir:index 0; fhir:ElementDefinition.identity [ fhir:value "rim" ]; fhir:ElementDefinition.map [ fhir:value "N/A" ] ] ], [ fhir:index 5; fhir:Element.id [ fhir:value "Reference.identifier" ]; fhir:ElementDefinition.path [ fhir:value "Reference.identifier" ]; fhir:ElementDefinition.short [ fhir:value "Logical reference, when literal reference is not known" ]; fhir:ElementDefinition.definition [ fhir:value "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference." ]; fhir:ElementDefinition.comment [ fhir:value "When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy. \n\nWhen both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference\n\nApplications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it.\n\nReference is intended to point to a structure that can potentially be expressed as a FHIR resource, though there is no need for it to exist as an actual FHIR resource instance - except in as much as an application wishes to actual find the target of the reference. The content referred to be the identifier must meet the logical constraints implied by any limitations on what resource types are permitted for the reference. For example, it would not be legitimate to send the identifier for a drug prescription if the type were Reference(Observation|DiagnosticReport). One of the use-cases for Reference.identifier is the situation where no FHIR representation exists (where the type is Reference (Any)." ]; fhir:ElementDefinition.min [ fhir:value "0" ]; fhir:ElementDefinition.max [ fhir:value "1" ]; fhir:ElementDefinition.base [ fhir:ElementDefinition.path [ fhir:value "Reference.identifier" ]; fhir:ElementDefinition.min [ fhir:value "0" ]; fhir:ElementDefinition.max [ fhir:value "1" ] ]; fhir:ElementDefinition.type [ fhir:index 0; fhir:ElementDefinition.code [ fhir:value "Identifier" ] ]; fhir:ElementDefinition.constraint [ fhir:index 0; fhir:ElementDefinition.key [ fhir:value "ele-1" ]; fhir:ElementDefinition.severity [ fhir:value "error" ]; fhir:ElementDefinition.human [ fhir:value "All FHIR elements must have a @value or children" ]; fhir:ElementDefinition.expression [ fhir:value "hasValue() or (children().count() > id.count())" ]; fhir:ElementDefinition.xpath [ fhir:value "@value|f:*|h:div" ]; fhir:ElementDefinition.source [ fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ] ]; fhir:ElementDefinition.isModifier [ fhir:value "false" ]; fhir:ElementDefinition.isSummary [ fhir:value "true" ]; fhir:ElementDefinition.mapping [ fhir:index 0; fhir:ElementDefinition.identity [ fhir:value "rim" ]; fhir:ElementDefinition.map [ fhir:value ".identifier" ] ] ], [ fhir:index 6; fhir:Element.id [ fhir:value "Reference.display" ]; fhir:Element.extension [ fhir:index 0; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable" ]; fhir:Extension.value [ fhir:value "true" ] ], [ fhir:index 1; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable" ]; fhir:Extension.value [ fhir:value "true" ] ]; fhir:ElementDefinition.path [ fhir:value "Reference.display" ]; fhir:ElementDefinition.short [ fhir:value "Text alternative for the resource" ]; fhir:ElementDefinition.definition [ fhir:value "Plain text narrative that identifies the resource in addition to the resource reference." ]; fhir:ElementDefinition.comment [ fhir:value "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." ]; fhir:ElementDefinition.min [ fhir:value "0" ]; fhir:ElementDefinition.max [ fhir:value "1" ]; fhir:ElementDefinition.base [ fhir:ElementDefinition.path [ fhir:value "Reference.display" ]; fhir:ElementDefinition.min [ fhir:value "0" ]; fhir:ElementDefinition.max [ fhir:value "1" ] ]; fhir:ElementDefinition.type [ fhir:index 0; fhir:ElementDefinition.code [ fhir:value "string" ] ]; fhir:ElementDefinition.constraint [ fhir:index 0; fhir:ElementDefinition.key [ fhir:value "ele-1" ]; fhir:ElementDefinition.severity [ fhir:value "error" ]; fhir:ElementDefinition.human [ fhir:value "All FHIR elements must have a @value or children" ]; fhir:ElementDefinition.expression [ fhir:value "hasValue() or (children().count() > id.count())" ]; fhir:ElementDefinition.xpath [ fhir:value "@value|f:*|h:div" ]; fhir:ElementDefinition.source [ fhir:value "http://hl7.org/fhir/StructureDefinition/Element" ] ]; fhir:ElementDefinition.isModifier [ fhir:value "false" ]; fhir:ElementDefinition.isSummary [ fhir:value "true" ]; fhir:ElementDefinition.mapping [ fhir:index 0; fhir:ElementDefinition.identity [ fhir:value "rim" ]; fhir:ElementDefinition.map [ fhir:value "N/A" ] ] ] ]; fhir:StructureDefinition.differential [ fhir:StructureDefinition.element [ fhir:index 0; fhir:Element.id [ fhir:value "Reference" ]; fhir:Element.extension [ fhir:index 0; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status" ]; fhir:Extension.value [ fhir:value "normative" ] ], [ fhir:index 1; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version" ]; fhir:Extension.value [ fhir:value "4.0.0" ] ]; fhir:ElementDefinition.path [ fhir:value "Reference" ]; fhir:ElementDefinition.short [ fhir:value "A reference from one resource to another" ]; fhir:ElementDefinition.definition [ fhir:value "A reference from one resource to another." ]; fhir:ElementDefinition.comment [ fhir:value "References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository." ]; fhir:ElementDefinition.min [ fhir:value "0" ]; fhir:ElementDefinition.max [ fhir:value "*" ]; fhir:ElementDefinition.constraint [ fhir:index 0; fhir:ElementDefinition.key [ fhir:value "ref-1" ]; fhir:ElementDefinition.severity [ fhir:value "error" ]; fhir:ElementDefinition.human [ fhir:value "SHALL have a contained resource if a local reference is provided" ]; fhir:ElementDefinition.expression [ fhir:value "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids')) or (reference='#' and %rootResource!=%resource)" ]; fhir:ElementDefinition.xpath [ fhir:value "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, '#')])" ]; fhir:ElementDefinition.source [ fhir:value "http://hl7.org/fhir/StructureDefinition/Reference" ] ]; fhir:ElementDefinition.mapping [ fhir:index 0; fhir:ElementDefinition.identity [ fhir:value "rim" ]; fhir:ElementDefinition.map [ fhir:value "The target of a resource reference is a RIM entry point (Act, Role, or Entity)" ] ] ], [ fhir:index 1; fhir:Element.id [ fhir:value "Reference.reference" ]; fhir:ElementDefinition.path [ fhir:value "Reference.reference" ]; fhir:ElementDefinition.short [ fhir:value "Literal reference, Relative, internal or absolute URL" ]; fhir:ElementDefinition.definition [ fhir:value "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." ]; fhir:ElementDefinition.comment [ fhir:value "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." ]; fhir:ElementDefinition.min [ fhir:value "0" ]; fhir:ElementDefinition.max [ fhir:value "1" ]; fhir:ElementDefinition.type [ fhir:index 0; fhir:ElementDefinition.code [ fhir:value "string" ] ]; fhir:ElementDefinition.condition [ fhir:value "ref-1"; fhir:index 0 ]; fhir:ElementDefinition.isSummary [ fhir:value "true" ]; fhir:ElementDefinition.mapping [ fhir:index 0; fhir:ElementDefinition.identity [ fhir:value "rim" ]; fhir:ElementDefinition.map [ fhir:value "N/A" ] ] ], [ fhir:index 2; fhir:Element.id [ fhir:value "Reference.type" ]; fhir:ElementDefinition.path [ fhir:value "Reference.type" ]; fhir:ElementDefinition.short [ fhir:value "Type the reference refers to (e.g. \"Patient\")" ]; fhir:ElementDefinition.definition [ fhir:value "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources)." ]; fhir:ElementDefinition.comment [ fhir:value "This element is used to indicate the type of the target of the reference. This may be used which ever of the other elements are populated (or not). In some cases, the type of the target may be determined by inspection of the reference (e.g. a RESTful URL) or by resolving the target of the reference; if both the type and a reference is provided, the reference SHALL resolve to a resource of the same type as that specified." ]; fhir:ElementDefinition.min [ fhir:value "0" ]; fhir:ElementDefinition.max [ fhir:value "1" ]; fhir:ElementDefinition.type [ fhir:index 0; fhir:ElementDefinition.code [ fhir:value "uri" ] ]; fhir:ElementDefinition.isSummary [ fhir:value "true" ]; fhir:ElementDefinition.binding [ fhir:Element.extension [ fhir:index 0; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/build/StructureDefinition/binding-definition" ]; fhir:Extension.value [ fhir:value "Aa resource (or, for logical models, the URI of the logical model)." ] ], [ fhir:index 1; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName" ]; fhir:Extension.value [ fhir:value "FHIRResourceTypeExt" ] ], [ fhir:index 2; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding" ]; fhir:Extension.value [ fhir:value "true" ] ]; fhir:ElementDefinition.strength [ fhir:value "extensible" ]; fhir:ElementDefinition.valueSet [ fhir:value "http://hl7.org/fhir/ValueSet/resource-types" ] ]; fhir:ElementDefinition.mapping [ fhir:index 0; fhir:ElementDefinition.identity [ fhir:value "rim" ]; fhir:ElementDefinition.map [ fhir:value "N/A" ] ] ], [ fhir:index 3; fhir:Element.id [ fhir:value "Reference.identifier" ]; fhir:ElementDefinition.path [ fhir:value "Reference.identifier" ]; fhir:ElementDefinition.short [ fhir:value "Logical reference, when literal reference is not known" ]; fhir:ElementDefinition.definition [ fhir:value "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference." ]; fhir:ElementDefinition.comment [ fhir:value "When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy. \n\nWhen both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference\n\nApplications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it.\n\nReference is intended to point to a structure that can potentially be expressed as a FHIR resource, though there is no need for it to exist as an actual FHIR resource instance - except in as much as an application wishes to actual find the target of the reference. The content referred to be the identifier must meet the logical constraints implied by any limitations on what resource types are permitted for the reference. For example, it would not be legitimate to send the identifier for a drug prescription if the type were Reference(Observation|DiagnosticReport). One of the use-cases for Reference.identifier is the situation where no FHIR representation exists (where the type is Reference (Any)." ]; fhir:ElementDefinition.min [ fhir:value "0" ]; fhir:ElementDefinition.max [ fhir:value "1" ]; fhir:ElementDefinition.type [ fhir:index 0; fhir:ElementDefinition.code [ fhir:value "Identifier" ] ]; fhir:ElementDefinition.isSummary [ fhir:value "true" ]; fhir:ElementDefinition.mapping [ fhir:index 0; fhir:ElementDefinition.identity [ fhir:value "rim" ]; fhir:ElementDefinition.map [ fhir:value ".identifier" ] ] ], [ fhir:index 4; fhir:Element.id [ fhir:value "Reference.display" ]; fhir:Element.extension [ fhir:index 0; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable" ]; fhir:Extension.value [ fhir:value "true" ] ], [ fhir:index 1; fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable" ]; fhir:Extension.value [ fhir:value "true" ] ]; fhir:ElementDefinition.path [ fhir:value "Reference.display" ]; fhir:ElementDefinition.short [ fhir:value "Text alternative for the resource" ]; fhir:ElementDefinition.definition [ fhir:value "Plain text narrative that identifies the resource in addition to the resource reference." ]; fhir:ElementDefinition.comment [ fhir:value "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." ]; fhir:ElementDefinition.min [ fhir:value "0" ]; fhir:ElementDefinition.max [ fhir:value "1" ]; fhir:ElementDefinition.type [ fhir:index 0; fhir:ElementDefinition.code [ fhir:value "string" ] ]; fhir:ElementDefinition.isSummary [ fhir:value "true" ]; fhir:ElementDefinition.mapping [ fhir:index 0; fhir:ElementDefinition.identity [ fhir:value "rim" ]; fhir:ElementDefinition.map [ fhir:value "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.