<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="pt-lm-ServiceRequest" />
  <text>
    <status value="empty" />
    <div xmlns="http://www.w3.org/1999/xhtml">No narrative is provided for definitional resources. A human-readable rendering can be found in the implementation guide(s) where this resource is used.</div>
  </text>
  <url value="http://medmij.nl/fhir/StructureDefinition/pt-lm-ServiceRequest" />
  <name value="LmServiceRequest" />
  <title value="ServiceRequest" />
  <status value="active" />
  <publisher value="MedMij" />
  <contact>
    <name value="MedMij" />
    <telecom>
      <system value="email" />
      <value value="info@medmij.nl" />
      <use value="work" />
    </telecom>
  </contact>
  <description value="Patient-specific clinical order for a digital (eHealth) activity that a healthcare professional requests for a patient, such as completing a questionnaire, performing home measurements, viewing educational content, or launching a third-party module." />
  <purpose value="To represent the clinical order to start or perform a specific digital (eHealth) activity for a patient. This ServiceRequest provides the clinical intent, context, requested schedule, and patient-specific instructions, and can serve as the basis for one or more Task resources that manage execution and tracking of the activity." />
  <copyright value="Copyright and related rights waived via CC0, https://creativecommons.org/publicdomain/zero/1.0/. This does not apply to information from third parties, for example a medical terminology system. The implementer alone is responsible for identifying and obtaining any necessary licenses or authorizations to utilize third party IP in connection with the specification or otherwise." />
  <fhirVersion value="4.0.1" />
  <kind value="logical" />
  <abstract value="true" />
  <type value="http://medmij.nl/fhir/StructureDefinition/pt-lm-ServiceRequest" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Element" />
  <derivation value="specialization" />
  <snapshot>
    <element id="pt-lm-ServiceRequest">
      <path value="pt-lm-ServiceRequest" />
      <short value="ServiceRequest" />
      <definition value="Patient-specific clinical order for a digital (eHealth) activity that a healthcare professional requests for a patient, such as completing a questionnaire, performing home measurements, viewing educational content, or launching a third-party module." />
      <alias value="Zorgopdracht" />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="pt-lm-ServiceRequest" />
        <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="pt-lm-ServiceRequest.id">
      <path value="pt-lm-ServiceRequest.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="pt-lm-ServiceRequest.extension">
      <path value="pt-lm-ServiceRequest.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="pt-lm-ServiceRequest.Identifier">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="pt-lm-ServiceRequest.Identifier" />
      <short value="Business identifier that uniquely identifies this ServiceRequest within or across systems." />
      <definition value="Business identifier that uniquely identifies this ServiceRequest within or across systems." />
      <alias value="Identifier" />
      <min value="0" />
      <max value="*" />
      <base>
        <path value="pt-lm-ServiceRequest.Identifier" />
        <min value="0" />
        <max value="*" />
      </base>
      <type>
        <code value="Identifier" />
      </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>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="CX / EI (occasionally, more often EI maps to a resource id or a URL)" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="II - The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs.  Also maps to Role[classCode=IDENT]" />
      </mapping>
      <mapping>
        <identity value="servd" />
        <map value="Identifier" />
      </mapping>
    </element>
    <element id="pt-lm-ServiceRequest.Status">
      <path value="pt-lm-ServiceRequest.Status" />
      <short value="Current state of the service request (e.g. draft, active, completed, cancelled)." />
      <definition value="Current state of the service request (e.g. draft, active, completed, cancelled)." />
      <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" />
      <alias value="Status" />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="pt-lm-ServiceRequest.Status" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="code" />
      </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>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="pt-lm-ServiceRequest.Intent">
      <path value="pt-lm-ServiceRequest.Intent" />
      <short value="Indicates the level of authority or intention associated with the request (e.g., order or plan)." />
      <definition value="Indicates the level of authority or intention associated with the request (e.g., order or plan)." />
      <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" />
      <alias value="Bedoeling" />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="pt-lm-ServiceRequest.Intent" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="code" />
      </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>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="pt-lm-ServiceRequest.Subject">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="pt-lm-ServiceRequest.Subject" />
      <short value="Patient for whom the digital activity is requested." />
      <definition value="Patient for whom the digital activity is requested." />
      <comment 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." />
      <alias value="Patiënt" />
      <min value="1" />
      <max value="1" />
      <base>
        <path value="pt-lm-ServiceRequest.Subject" />
        <min value="1" />
        <max value="1" />
      </base>
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" />
      </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="ref-1" />
        <severity value="error" />
        <human value="SHALL have a contained resource if a local reference is provided" />
        <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" />
        <xpath 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, '#')])" />
        <source value="http://hl7.org/fhir/StructureDefinition/Reference" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" />
      </mapping>
    </element>
    <element id="pt-lm-ServiceRequest.patientInstruction">
      <path value="pt-lm-ServiceRequest.patientInstruction" />
      <short value="Patient or consumer-oriented instructions for how the requested activity should be performed. Use this element for patient-specific guidance that should be shown alongside the Task(s) executing this order (e.g., home blood pressure monitoring for 8 weeks, once daily in the morning)." />
      <definition value="Patient or consumer-oriented instructions for how the requested activity should be performed. Use this element for patient-specific guidance that should be shown alongside the Task(s) executing this order (e.g., home blood pressure monitoring for 8 weeks, once daily in the morning)." />
      <comment value="Note that FHIR strings SHALL NOT exceed 1MB in size" />
      <alias value="PatiëntenInstructie" />
      <min value="1" />
      <max value="1" />
      <base>
        <path value="pt-lm-ServiceRequest.patientInstruction" />
        <min value="1" />
        <max value="1" />
      </base>
      <type>
        <code value="string" />
      </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>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="pt-lm-ServiceRequest.Occurrence">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="pt-lm-ServiceRequest.Occurrence" />
      <short value="Requested schedule for performing the provider module, such as duration, frequency and time of day." />
      <definition value="Requested schedule for performing the provider module, such as duration, frequency and time of day." />
      <comment value="Describes the occurrence of an event that may occur multiple times. Timing schedules are used for specifying when events are expected or requested to occur, and may also be used to represent the summary of a past or ongoing event.  For simplicity, the definitions of Timing components are expressed as 'future' events, but such components can also be used to describe historic or ongoing events.&#xA;&#xA;A Timing schedule can be a list of events and/or criteria for when the event happens, which can be expressed in a structured form and/or as a code. When both event and a repeating specification are provided, the list of events should be understood as an interpretation of the information in the repeat structure." />
      <alias value="Tijdschema" />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="pt-lm-ServiceRequest.Occurrence" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="Timing" />
      </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>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="N/A" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="QSET&lt;TS&gt; (GTS)" />
      </mapping>
    </element>
    <element id="pt-lm-ServiceRequest.Requester">
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
        <valueCode value="normative" />
      </extension>
      <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version">
        <valueCode value="4.0.0" />
      </extension>
      <path value="pt-lm-ServiceRequest.Requester" />
      <short value="Healthcare professional role that requests this activity for the patient." />
      <definition value="Healthcare professional role that requests this activity for the patient." />
      <comment 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." />
      <alias value="Aanvrager" />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="pt-lm-ServiceRequest.Requester" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/PractitionerRole" />
      </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="ref-1" />
        <severity value="error" />
        <human value="SHALL have a contained resource if a local reference is provided" />
        <expression value="reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))" />
        <xpath 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, '#')])" />
        <source value="http://hl7.org/fhir/StructureDefinition/Reference" />
      </constraint>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="The target of a resource reference is a RIM entry point (Act, Role, or Entity)" />
      </mapping>
    </element>
    <element id="pt-lm-ServiceRequest.AuthoredOn">
      <path value="pt-lm-ServiceRequest.AuthoredOn" />
      <short value="Date and time when this service request was created." />
      <definition value="Date and time when this service request was created." />
      <alias value="AanmaakDatumTijd" />
      <min value="0" />
      <max value="1" />
      <base>
        <path value="pt-lm-ServiceRequest.AuthoredOn" />
        <min value="0" />
        <max value="1" />
      </base>
      <type>
        <code value="dateTime" />
      </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>
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
    </element>
  </snapshot>
  <differential>
    <element id="pt-lm-ServiceRequest">
      <path value="pt-lm-ServiceRequest" />
      <short value="ServiceRequest" />
      <definition value="Patient-specific clinical order for a digital (eHealth) activity that a healthcare professional requests for a patient, such as completing a questionnaire, performing home measurements, viewing educational content, or launching a third-party module." />
      <alias value="Zorgopdracht" />
    </element>
    <element id="pt-lm-ServiceRequest.Identifier">
      <path value="pt-lm-ServiceRequest.Identifier" />
      <short value="Business identifier that uniquely identifies this ServiceRequest within or across systems." />
      <definition value="Business identifier that uniquely identifies this ServiceRequest within or across systems." />
      <alias value="Identifier" />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="Identifier" />
      </type>
    </element>
    <element id="pt-lm-ServiceRequest.Status">
      <path value="pt-lm-ServiceRequest.Status" />
      <short value="Current state of the service request (e.g. draft, active, completed, cancelled)." />
      <definition value="Current state of the service request (e.g. draft, active, completed, cancelled)." />
      <alias value="Status" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="code" />
      </type>
    </element>
    <element id="pt-lm-ServiceRequest.Intent">
      <path value="pt-lm-ServiceRequest.Intent" />
      <short value="Indicates the level of authority or intention associated with the request (e.g., order or plan)." />
      <definition value="Indicates the level of authority or intention associated with the request (e.g., order or plan)." />
      <alias value="Bedoeling" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="code" />
      </type>
    </element>
    <element id="pt-lm-ServiceRequest.Subject">
      <path value="pt-lm-ServiceRequest.Subject" />
      <short value="Patient for whom the digital activity is requested." />
      <definition value="Patient for whom the digital activity is requested." />
      <alias value="Patiënt" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" />
      </type>
    </element>
    <element id="pt-lm-ServiceRequest.patientInstruction">
      <path value="pt-lm-ServiceRequest.patientInstruction" />
      <short value="Patient or consumer-oriented instructions for how the requested activity should be performed. Use this element for patient-specific guidance that should be shown alongside the Task(s) executing this order (e.g., home blood pressure monitoring for 8 weeks, once daily in the morning)." />
      <definition value="Patient or consumer-oriented instructions for how the requested activity should be performed. Use this element for patient-specific guidance that should be shown alongside the Task(s) executing this order (e.g., home blood pressure monitoring for 8 weeks, once daily in the morning)." />
      <alias value="PatiëntenInstructie" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
    </element>
    <element id="pt-lm-ServiceRequest.Occurrence">
      <path value="pt-lm-ServiceRequest.Occurrence" />
      <short value="Requested schedule for performing the provider module, such as duration, frequency and time of day." />
      <definition value="Requested schedule for performing the provider module, such as duration, frequency and time of day." />
      <alias value="Tijdschema" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Timing" />
      </type>
    </element>
    <element id="pt-lm-ServiceRequest.Requester">
      <path value="pt-lm-ServiceRequest.Requester" />
      <short value="Healthcare professional role that requests this activity for the patient." />
      <definition value="Healthcare professional role that requests this activity for the patient." />
      <alias value="Aanvrager" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/PractitionerRole" />
      </type>
    </element>
    <element id="pt-lm-ServiceRequest.AuthoredOn">
      <path value="pt-lm-ServiceRequest.AuthoredOn" />
      <short value="Date and time when this service request was created." />
      <definition value="Date and time when this service request was created." />
      <alias value="AanmaakDatumTijd" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="dateTime" />
      </type>
    </element>
  </differential>
</StructureDefinition>