{
  "resourceType": "StructureDefinition",
  "id": "MaiaRuleBasedEvaluationServiceRequestHint",
  "url": "https://tiplu.de/fhir/maia/StructureDefinition/MaiaRuleBasedEvaluationServiceRequestHint",
  "version": "1.0.0",
  "name": "MaiaRuleBasedEvaluationServiceRequestHint",
  "title": "Maia rule-based evaluation ServiceRequest",
  "status": "draft",
  "experimental": false,
  "date": "2025-04-30",
  "publisher": "Tiplu GmbH",
  "description": "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.\n\n*German:*\nMAIA 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": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "ServiceRequest",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/ServiceRequest",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "ServiceRequest.status",
        "path": "ServiceRequest.status",
        "patternCode": "draft",
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.intent",
        "path": "ServiceRequest.intent",
        "patternCode": "proposal",
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.category",
        "path": "ServiceRequest.category",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.category.coding",
        "path": "ServiceRequest.category.coding",
        "slicing": {
          "discriminator": [
            {
              "type": "pattern",
              "path": "$this"
            }
          ],
          "rules": "open"
        },
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.category.coding:MaiaIntent",
        "path": "ServiceRequest.category.coding",
        "sliceName": "MaiaIntent",
        "short": "Code of the MAIA intent",
        "min": 1,
        "max": "1",
        "patternCoding": {
          "system": "http://snomed.info/sct"
        },
        "mustSupport": true,
        "binding": {
          "strength": "required",
          "valueSet": "https://tiplu.de/fhir/maia/ValueSet/MaiaServiceRequestIntent"
        }
      },
      {
        "id": "ServiceRequest.category.coding:MaiaIntent.system",
        "path": "ServiceRequest.category.coding.system",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.category.coding:MaiaIntent.code",
        "path": "ServiceRequest.category.coding.code",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.category.coding:MaiaIntent.display",
        "path": "ServiceRequest.category.coding.display",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.code",
        "path": "ServiceRequest.code",
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.code.text",
        "path": "ServiceRequest.code.text",
        "short": "Text of the requested diagnostics or therapy",
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.subject",
        "path": "ServiceRequest.subject",
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.subject.identifier",
        "path": "ServiceRequest.subject.identifier",
        "short": "Patient ID of the referenced patient",
        "comment": "The MAIA FHIR endpoints don't have the possibility to get the patient resource. For this, the resource identifier is mandatory.",
        "min": 1,
        "type": [
          {
            "code": "Identifier",
            "profile": [
              "http://fhir.de/StructureDefinition/identifier-pid"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.subject.identifier.type",
        "path": "ServiceRequest.subject.identifier.type",
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.subject.identifier.system",
        "path": "ServiceRequest.subject.identifier.system",
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.subject.identifier.value",
        "path": "ServiceRequest.subject.identifier.value",
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.encounter",
        "path": "ServiceRequest.encounter",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://tiplu.de/fhir/maia/StructureDefinition/MaiaKontaktGesundheitseinrichtung"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.encounter.extension",
        "path": "ServiceRequest.encounter.extension",
        "min": 1
      },
      {
        "id": "ServiceRequest.encounter.extension:AccountIdentifier",
        "path": "ServiceRequest.encounter.extension",
        "sliceName": "AccountIdentifier",
        "short": "Account Identifier (German: Fallnummer/Abrechnungsnummer) of the referenced account",
        "comment": "The MAIA FHIR endpoints don't have the possibility to get the account or encounter resource. For this, the resource identifier is mandatory.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://tiplu.de/fhir/maia/StructureDefinition/MaiaAccountIdentifier"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.encounter.extension:AccountIdentifier.value[x]",
        "path": "ServiceRequest.encounter.extension.value[x]",
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.encounter.extension:AccountIdentifier.value[x].type",
        "path": "ServiceRequest.encounter.extension.value[x].type",
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.encounter.extension:AccountIdentifier.value[x].system",
        "path": "ServiceRequest.encounter.extension.value[x].system",
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.encounter.extension:AccountIdentifier.value[x].value",
        "path": "ServiceRequest.encounter.extension.value[x].value",
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.reasonReference",
        "path": "ServiceRequest.reasonReference",
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.reasonReference.extension",
        "path": "ServiceRequest.reasonReference.extension",
        "min": 1
      },
      {
        "id": "ServiceRequest.reasonReference.extension:ReasonRefRiskAssessment",
        "path": "ServiceRequest.reasonReference.extension",
        "sliceName": "ReasonRefRiskAssessment",
        "short": "The RiskAssessment, that the ServiceRequest is based on",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://tiplu.de/fhir/maia/StructureDefinition/MaiaReasonReferenceRiskAssessment"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "ServiceRequest.reasonReference.extension:ReasonRefRiskAssessment.value[x]",
        "path": "ServiceRequest.reasonReference.extension.value[x]",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://tiplu.de/fhir/maia/StructureDefinition/MaiaRuleBasedEvaluation"
            ]
          }
        ],
        "mustSupport": true
      }
    ]
  }
}