<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="ServiceRequest.patientInstruction" />
  <url value="http://hl7.org/fhir/4.0/StructureDefinition/extension-ServiceRequest.patientInstruction" />
  <name value="patientInstruction" />
  <status value="draft" />
  <description value="Instructions in terms that are understood by the patient or consumer." />
  <fhirVersion value="3.0.1" />
  <kind value="complex-type" />
  <abstract value="false" />
  <contextType value="resource" />
  <context value="ProcedureRequest" />
  <type value="Extension" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension" />
  <derivation value="constraint" />
  <differential>
    <element id="Extension">
      <path value="Extension" />
      <short value="Patient or consumer-oriented instructions" />
      <definition value="Instructions in terms that are understood by the patient or consumer." />
      <max value="1" />
      <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')])" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="N/A" />
      </mapping>
    </element>
    <element id="Extension.url">
      <path value="Extension.url" />
      <fixedUri value="http://hl7.org/fhir/4.0/StructureDefinition/extension-ServiceRequest.patientInstruction" />
    </element>
    <element id="Extension.value[x]:valueString">
      <path value="Extension.valueString" />
      <sliceName value="valueString" />
      <min value="1" />
      <type>
        <code value="string" />
      </type>
    </element>
  </differential>
</StructureDefinition>