<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="UsageContext" />
  <url value="http://StructureDefinition.hl7fhir.cn/UsageContext" />
  <name value="UsageContext" />
  <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="UsageContext" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/UsageContext" />
  <derivation value="constraint" />
  <snapshot>
    <element id="UsageContext">
      <path value="UsageContext" />
      <short value="对标准符合性或知识资源的使用上下文的描述" />
      <definition value="临床或业务等的元数据，可用于对元数据的检索、索引或分类。它既可以用于指定适用人群（例如，年龄类别、DRG），也可以用于指定的照护理场景（例如，地点场所、护理级别、照护人员）。" />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="UsageContext" />
        <min value="0" />
        <max value="*" />
      </base>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() or (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Element" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="UsageContext.id">
      <path value="UsageContext.id" />
      <representation value="xmlAttr" />
      <short value="Unique id for inter-element referencing" />
      <definition value="Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces." />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="Element.id" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type">
          <valueUrl value="string" />
        </extension>
        <code value="http://hl7.org/fhirpath/System.String" />
      </type>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="UsageContext.extension">
      <path value="UsageContext.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <description value="Extensions are always sliced by (at least) url" />
        <rules value="open" />
      </slicing>
      <short value="Additional content defined by implementations" />
      <definition 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." />
      <comment 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." />
      <alias value="extensions" />
      <alias value="user content" />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="Element.extension" />
        <min value="0" />
        <max value="*" />
      </base>
      <type>
        <code value="Extension" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() or (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Element" />
      </constraint>
      <constraint>
        <key value="ext-1" />
        <severity value="error" />
        <human value="Must have either extensions or value[x], not both" />
        <expression value="extension.exists() != value.exists()" />
        <xpath value="exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])" />
        <source value="http://hl7.org/fhir/StructureDefinition/Extension" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="N/A" />
      </mapping>
    </element>
    <element id="UsageContext.code">
      <path value="UsageContext.code" />
      <label value="场景类型编码" />
      <short value="场景类型编码" />
      <definition value="术语系统定义的使用场景的编码。" />
      <comment value="编码可以使用枚举值或编码列表非常随意地定义。也可以非常正式的定义，如SNOMED CT。请参阅HL7 v3核心原则。" />
      <min value="1" />
      <max value="1" />
      <base>
        <path value="UsageContext.code" />
        <min value="1" />
        <max value="1" />
      </base>
      <type>
        <code value="Coding" />
        <profile value="http://StructureDefinition.hl7fhir.cn/Coding" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() or (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Element" />
      </constraint>
      <isSummary value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="UsageContextType" />
        </extension>
        <strength value="extensible" />
        <description value="使用场景类型的代码" />
        <valueSet value="http://hl7.org/fhir/ValueSet/usage-context-type。" />
      </binding>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="CE/CNE/CWE subset one of the sets of component 1-3 or 4-6" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="CV" />
      </mapping>
      <mapping>
        <identity value="orim" />
        <map value="fhir:Coding rdfs:subClassOf dt:CDCoding" />
      </mapping>
    </element>
    <element id="UsageContext.value[x]">
      <path value="UsageContext.value[x]" />
      <label value="场景" />
      <short value="定义场景的值" />
      <definition value="在此使用场景下，用于定义场景的值。该值的解释由代码定义。" />
      <min value="1" />
      <max value="1" />
      <base>
        <path value="UsageContext.value[x]" />
        <min value="1" />
        <max value="1" />
      </base>
      <type>
        <code value="CodeableConcept" />
      </type>
      <type>
        <code value="Quantity" />
      </type>
      <type>
        <code value="Range" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/PlanDefinition" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/ResearchStudy" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/InsurancePlan" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/HealthcareService" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Group" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Location" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" />
      </type>
      <condition value="ele-1" />
      <constraint>
        <key value="ele-1" />
        <severity value="error" />
        <human value="All FHIR elements must have a @value or children" />
        <expression value="hasValue() or (children().count() &gt; id.count())" />
        <xpath value="@value|f:*|h:div" />
        <source value="http://hl7.org/fhir/StructureDefinition/Element" />
      </constraint>
      <isSummary value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="UsageContextValue" />
        </extension>
        <strength value="example" />
        <description value="A code that defines the specific value for the context being specified." />
        <valueSet value="http://hl7.org/fhir/ValueSet/use-context" />
      </binding>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
  </snapshot>
  <differential>
    <element id="UsageContext">
      <path value="UsageContext" />
      <short value="对标准符合性或知识资源的使用上下文的描述" />
      <definition value="临床或业务等的元数据，可用于对元数据的检索、索引或分类。它既可以用于指定适用人群（例如，年龄类别、DRG），也可以用于指定的照护理场景（例如，地点场所、护理级别、照护人员）。" />
    </element>
    <element id="UsageContext.code">
      <path value="UsageContext.code" />
      <label value="场景类型编码" />
      <short value="场景类型编码" />
      <definition value="术语系统定义的使用场景的编码。" />
      <type>
        <code value="Coding" />
        <profile value="http://StructureDefinition.hl7fhir.cn/Coding" />
      </type>
      <binding>
        <strength value="extensible" />
        <description value="使用场景类型的代码" />
        <valueSet value="http://hl7.org/fhir/ValueSet/usage-context-type。" />
      </binding>
    </element>
    <element id="UsageContext.value[x]">
      <path value="UsageContext.value[x]" />
      <label value="场景" />
      <short value="定义场景的值" />
      <definition value="在此使用场景下，用于定义场景的值。该值的解释由代码定义。" />
    </element>
  </differential>
</StructureDefinition>