<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="Reference" />
  <meta>
    <versionId value="1" />
    <lastUpdated value="2020-05-28T08:51:22.7366509+00:00" />
  </meta>
  <url value="http://StructureDefinition.hl7fhir.cn/Reference" />
  <name value="Reference" />
  <title value="引用信息" />
  <status value="draft" />
  <fhirVersion value="4.0.0" />
  <mapping>
    <identity value="rim" />
    <uri value="http://hl7.org/v3" />
    <name value="RIM Mapping" />
  </mapping>
  <kind value="complex-type" />
  <abstract value="false" />
  <type value="Reference" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Reference" />
  <derivation value="constraint" />
  <differential>
    <element id="Reference">
      <path value="Reference" />
      <short value="引用类型" />
      <definition value="从一个资源到另一个资源的引用" />
      <comment value="引用应该是对实际FHIR资源的引用，并且应该是可解析的(允许访问控制、临时不可用等)。解析可以通过从URL检索来实现，也可以在适用的情况下通过资源类型来实现，将绝对引用作为标准URL处理并在本地注册表/存储库中查找它。" />
    </element>
    <element id="Reference.reference">
      <path value="Reference.reference" />
      <short value="文字引用，相对，内部或绝对URL" />
      <definition 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.&#xD;&#xA;对另一个资源所在位置的引用。它是相对于服务基URL的，或者是解析到资源所在位置的绝对URL。&#xD;&#xA;如果引用不是指向FHIR RESTful服务器，该引用为特定的引用。内部片段引用(以“#”开头)引用包含的资源。" />
      <comment 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 &quot;/[type]/[id]&quot; then it should be assumed that the reference is to a FHIR RESTful server.&#xD;&#xA;&#xD;&#xA;使用绝对url提供了一种适合于cloud/web 上下文的稳定的可访问方式，而使用相对/逻辑引用提供了一种灵活的方法，适用于跨封闭生态系统边界进行交易。绝对url不需要指向FHIR RESTful服务器，尽管这是首选方法。如果URL符合结构“/[type]/[id]”，那么应该假定引用是指向FHIR RESTful服务器。" />
    </element>
    <element id="Reference.type">
      <path value="Reference.type" />
      <short value="目标类型" />
      <definition 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.&#xA;&#xA;The 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. &quot;Patient&quot; 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).&#xD;&#xA;&#xD;&#xA;引用的预期目标类型。提供两种方式：类型和链接。链接是一个FHIR URL，类型表示该数据类型编码。绝对url只允许用于逻辑模型(并且只能用于逻辑模型中的引用，而不能用于资源)。" />
      <comment 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.&#xD;&#xA;&#xD;&#xA;此元素用于指示引用的目标的类型。这可以用于填充(或不填充)其他任何元素。在某些情况下，目标的类型可以通过检查引用(例如一个RESTful URL)或解析引用的目标来确定;如果同时提供了类型和引用，则引用应解析为指定的同一类型的资源。" />
    </element>
    <element id="Reference.identifier">
      <path value="Reference.identifier" />
      <short value="逻辑引用 Logical reference, when literal reference is not known" />
      <definition value="描述目标资源的标识符。当无法直接引用其他资源时，就会使用这种方法。可能存在的原有如下几点：&#xD;&#xA;1.当它所表示的实体无法通过FHIR服务器访问时。&#xD;&#xA;2.资源的作者无法将已知标识符转换为实际位置。没有要求引用。&#xD;&#xA;该标识符指向一个FHIR实例，并且该实例需要是引用所允许的FHIR资源类型。" />
      <comment 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.&#xD;&#xD;When 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&#xD;&#xD;Applications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it.&#xD;&#xD;Reference 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)." />
      <type>
        <code value="Identifier" />
        <profile value="http://StructureDefinition.hl7fhir.cn/Identifier" />
      </type>
    </element>
    <element id="Reference.display">
      <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true" />
      </extension>
      <path value="Reference.display" />
      <short value="资源的文本显示" />
      <definition value="Plain text narrative that identifies the resource in addition to the resource reference.&#xD;&#xA;除资源引用外，标识资源的纯文本叙事。" />
    </element>
  </differential>
</StructureDefinition>