<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="MaiaRuleBasedEvaluationServiceRequestHint" />
  <url value="https://tiplu.de/fhir/maia/StructureDefinition/MaiaRuleBasedEvaluationServiceRequestHint" />
  <version value="1.0.0" />
  <name value="MaiaRuleBasedEvaluationServiceRequestHint" />
  <title value="Maia rule-based evaluation ServiceRequest" />
  <status value="draft" />
  <experimental value="false" />
  <date value="2025-04-30" />
  <publisher value="Tiplu GmbH" />
  <description value="MAIA offers the possibility to additionally store structured and user-defined therapy and diagnostic information for presumed diagnoses. These contents are represented in a profiled ServiceRequest, which standardizes the documentation of recommended measures and clinical assessments.&#xA;&#xA;*German:*&#xA;MAIA bietet die Möglichkeit, bei Verdachtsdiagnosen zusätzlich strukturierte und benutzerdefinierte Therapie- und Diagnostikinformationen zu hinterlegen. Diese Inhalte werden in einem profilierten ServiceRequest abgebildet, der empfohlene Maßnahmen und klinische Bewertungen standardisiert dokumentiert." />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="ServiceRequest" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/ServiceRequest" />
  <derivation value="constraint" />
  <differential>
    <element id="ServiceRequest.status">
      <path value="ServiceRequest.status" />
      <patternCode value="draft" />
      <mustSupport value="true" />
    </element>
    <element id="ServiceRequest.intent">
      <path value="ServiceRequest.intent" />
      <patternCode value="proposal" />
      <mustSupport value="true" />
    </element>
    <element id="ServiceRequest.category">
      <path value="ServiceRequest.category" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ServiceRequest.category.coding">
      <path value="ServiceRequest.category.coding" />
      <slicing>
        <discriminator>
          <type value="pattern" />
          <path value="$this" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ServiceRequest.category.coding:MaiaIntent">
      <path value="ServiceRequest.category.coding" />
      <sliceName value="MaiaIntent" />
      <short value="Code of the MAIA intent" />
      <min value="1" />
      <max value="1" />
      <patternCoding>
        <system value="http://snomed.info/sct" />
      </patternCoding>
      <mustSupport value="true" />
      <binding>
        <strength value="required" />
        <valueSet value="https://tiplu.de/fhir/maia/ValueSet/MaiaServiceRequestIntent" />
      </binding>
    </element>
    <element id="ServiceRequest.category.coding:MaiaIntent.system">
      <path value="ServiceRequest.category.coding.system" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ServiceRequest.category.coding:MaiaIntent.code">
      <path value="ServiceRequest.category.coding.code" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ServiceRequest.category.coding:MaiaIntent.display">
      <path value="ServiceRequest.category.coding.display" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="ServiceRequest.code">
      <path value="ServiceRequest.code" />
      <mustSupport value="true" />
    </element>
    <element id="ServiceRequest.code.text">
      <path value="ServiceRequest.code.text" />
      <short value="Text of the requested diagnostics or therapy" />
      <mustSupport value="true" />
    </element>
    <element id="ServiceRequest.subject">
      <path value="ServiceRequest.subject" />
      <mustSupport value="true" />
    </element>
    <element id="ServiceRequest.subject.identifier">
      <path value="ServiceRequest.subject.identifier" />
      <short value="Patient ID of the referenced patient" />
      <comment value="The MAIA FHIR endpoints don't have the possibility to get the patient resource. For this, the resource identifier is mandatory." />
      <min value="1" />
      <type>
        <code value="Identifier" />
        <profile value="http://fhir.de/StructureDefinition/identifier-pid" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="ServiceRequest.subject.identifier.type">
      <path value="ServiceRequest.subject.identifier.type" />
      <mustSupport value="true" />
    </element>
    <element id="ServiceRequest.subject.identifier.system">
      <path value="ServiceRequest.subject.identifier.system" />
      <mustSupport value="true" />
    </element>
    <element id="ServiceRequest.subject.identifier.value">
      <path value="ServiceRequest.subject.identifier.value" />
      <mustSupport value="true" />
    </element>
    <element id="ServiceRequest.encounter">
      <path value="ServiceRequest.encounter" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://tiplu.de/fhir/maia/StructureDefinition/MaiaKontaktGesundheitseinrichtung" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="ServiceRequest.encounter.extension">
      <path value="ServiceRequest.encounter.extension" />
      <min value="1" />
    </element>
    <element id="ServiceRequest.encounter.extension:AccountIdentifier">
      <path value="ServiceRequest.encounter.extension" />
      <sliceName value="AccountIdentifier" />
      <short value="Account Identifier (German: Fallnummer/Abrechnungsnummer) of the referenced account" />
      <comment value="The MAIA FHIR endpoints don't have the possibility to get the account or encounter resource. For this, the resource identifier is mandatory." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://tiplu.de/fhir/maia/StructureDefinition/MaiaAccountIdentifier" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="ServiceRequest.encounter.extension:AccountIdentifier.value[x]">
      <path value="ServiceRequest.encounter.extension.value[x]" />
      <mustSupport value="true" />
    </element>
    <element id="ServiceRequest.encounter.extension:AccountIdentifier.value[x].type">
      <path value="ServiceRequest.encounter.extension.value[x].type" />
      <mustSupport value="true" />
    </element>
    <element id="ServiceRequest.encounter.extension:AccountIdentifier.value[x].system">
      <path value="ServiceRequest.encounter.extension.value[x].system" />
      <mustSupport value="true" />
    </element>
    <element id="ServiceRequest.encounter.extension:AccountIdentifier.value[x].value">
      <path value="ServiceRequest.encounter.extension.value[x].value" />
      <mustSupport value="true" />
    </element>
    <element id="ServiceRequest.reasonReference">
      <path value="ServiceRequest.reasonReference" />
      <mustSupport value="true" />
    </element>
    <element id="ServiceRequest.reasonReference.extension">
      <path value="ServiceRequest.reasonReference.extension" />
      <min value="1" />
    </element>
    <element id="ServiceRequest.reasonReference.extension:ReasonRefRiskAssessment">
      <path value="ServiceRequest.reasonReference.extension" />
      <sliceName value="ReasonRefRiskAssessment" />
      <short value="The RiskAssessment, that the ServiceRequest is based on" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://tiplu.de/fhir/maia/StructureDefinition/MaiaReasonReferenceRiskAssessment" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="ServiceRequest.reasonReference.extension:ReasonRefRiskAssessment.value[x]">
      <path value="ServiceRequest.reasonReference.extension.value[x]" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://tiplu.de/fhir/maia/StructureDefinition/MaiaRuleBasedEvaluation" />
      </type>
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>