{
  "resourceType": "StructureDefinition",
  "id": "path-Request",
  "text": {
    "status": "empty",
    "div": "<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>"
  },
  "url": "http://medmij.nl/fhir/StructureDefinition/path-Request",
  "name": "PathRequest",
  "title": "path Request",
  "status": "draft",
  "publisher": "MedMij",
  "contact": [
    {
      "name": "MedMij",
      "telecom": [
        {
          "system": "email",
          "value": "info@medmij.nl",
          "use": "work"
        }
      ]
    }
  ],
  "description": "Request for a pathology study to be performed by a certain laboratory.",
  "purpose": "This ServiceRequest resource represents the Request Clinical Information Model (CIM) for patient use cases in the context of Pathology.",
  "copyright": "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": "4.0.1",
  "mapping": [
    {
      "identity": "mercurius-core-dataset-2-0",
      "name": "Mercurius Core Dataset 2.0"
    },
    {
      "identity": "medmij-core-dataset-120-20260923",
      "name": "Dataset MedMij R4 Core 1.2.0 20260923"
    },
    {
      "identity": "path-dataset-100-alpha3-20260923",
      "name": "Dataset Pathologie MedMij 1.0.0-alpha.3 20260923"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "ServiceRequest",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/ServiceRequest",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "ServiceRequest",
        "path": "ServiceRequest",
        "short": "Request",
        "definition": "Request for a pathology study to be performed by a certain laboratory.",
        "alias": [
          "Aanvraag",
          "referral",
          "referral request",
          "transfer of care request"
        ],
        "constraint": [
          {
            "key": "path-Request-1",
            "severity": "error",
            "human": "Either a code for cytology or histology is present.",
            "expression": "code.coding.where(system = 'http://snomed.info/sct' and code = '1348332002').exists() xor code.coding.where(system = 'http://snomed.info/sct' and code = '252416005').exists()",
            "source": "http://medmij.nl/fhir/StructureDefinition/path-Request"
          }
        ],
        "mapping": [
          {
            "identity": "path-dataset-100-alpha3-20260923",
            "map": "path-dataelement-6",
            "comment": "Request"
          }
        ]
      },
      {
        "id": "ServiceRequest.meta",
        "path": "ServiceRequest.meta",
        "min": 1
      },
      {
        "id": "ServiceRequest.meta.tag",
        "path": "ServiceRequest.meta.tag",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "$this"
            }
          ],
          "rules": "open"
        },
        "min": 1
      },
      {
        "id": "ServiceRequest.meta.tag:careType",
        "path": "ServiceRequest.meta.tag",
        "sliceName": "careType",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "$this"
            }
          ],
          "rules": "open"
        },
        "short": "CareType",
        "definition": "The type of the healthcare provider responsible for the delivered care, or more specifically, the specialty of the department and/or health professional that delivered care. It enables patients and systems to interpret the origin and context of medical data.",
        "comment": "Note that the `careType` slice is a slice on `.meta.tag`, which might not be immediately clear based on the rendering.",
        "alias": [
          "Zorgtype"
        ],
        "min": 1,
        "max": "*",
        "binding": {
          "strength": "required",
          "valueSet": "http://decor.nictiz.nl/fhir/ValueSet/2.16.840.1.113883.2.4.3.11.60.40.2.17.2.4--20200901000000"
        },
        "mapping": [
          {
            "identity": "medmij-core-dataset-120-20260923",
            "map": "medmij-core-dataelement-123",
            "comment": "CareType"
          }
        ]
      },
      {
        "id": "ServiceRequest.meta.tag:careType/pathology",
        "path": "ServiceRequest.meta.tag",
        "sliceName": "careType/pathology",
        "comment": "Note that the `pathology` slice is a reslice of the `careType` slice, which might not be immediately clear based on the rendering.",
        "min": 1,
        "max": "1",
        "patternCoding": {
          "code": "0388",
          "system": "urn:oid:2.16.840.1.113883.2.4.6.7"
        }
      },
      {
        "id": "ServiceRequest.identifier",
        "path": "ServiceRequest.identifier",
        "slicing": {
          "discriminator": [
            {
              "type": "profile",
              "path": "$this"
            }
          ],
          "rules": "open"
        },
        "min": 1
      },
      {
        "id": "ServiceRequest.identifier:requestIdentifier",
        "path": "ServiceRequest.identifier",
        "sliceName": "requestIdentifier",
        "short": "IdentificationNumber / RequestIdentifier",
        "definition": "Identifier of the request for a pathology study.",
        "comment": "Even though the ReportIdentifier (i.e. _rapnaam_, mercurius-core-rubriek-3) is assigned by the laboratory doing the analysis (and thus not by the requester), the RequestIdentifier is populated with its value as well, as the request and report are always directly linked to each other in Mercurius. In particular, this identifier attains a `.value` of the form _[TCSB]YY-nnnnn_ or _[TCSB]YY-nnnnnn_ (based on the laboratory the report originates from), e.g. T26-012345. The `.system` SHALL be of the form _urn:oid:2.16.840.1.113883.2.4.3.23.3.N.1_ where _N_ is the lab number (i.e. _labid_).",
        "alias": [
          "Identificatienummer",
          "AanvraagIdentificatienummer"
        ],
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Identifier",
            "profile": [
              "http://medmij.nl/fhir/StructureDefinition/path-Report.ReportIdentifier"
            ]
          }
        ]
      },
      {
        "id": "ServiceRequest.status",
        "path": "ServiceRequest.status",
        "patternCode": "completed"
      },
      {
        "id": "ServiceRequest.intent",
        "path": "ServiceRequest.intent",
        "patternCode": "order"
      },
      {
        "id": "ServiceRequest.category",
        "path": "ServiceRequest.category",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "$this"
            }
          ],
          "rules": "open"
        },
        "min": 3
      },
      {
        "id": "ServiceRequest.category:pathology",
        "path": "ServiceRequest.category",
        "sliceName": "pathology",
        "min": 1,
        "max": "1",
        "patternCodeableConcept": {
          "coding": [
            {
              "code": "108257001",
              "system": "http://snomed.info/sct"
            }
          ]
        }
      },
      {
        "id": "ServiceRequest.category:requestType",
        "path": "ServiceRequest.category",
        "sliceName": "requestType",
        "short": "RequestType",
        "definition": "This typing of the examination provides additional context for the request.",
        "comment": "When the RequestType concept has an empty value, _normaal_ SHALL be used as default value.",
        "alias": [
          "SoortAanvraag"
        ],
        "min": 1,
        "max": "1",
        "binding": {
          "strength": "required",
          "valueSet": "http://medmij.nl/fhir/ValueSet/MercuriusRequestType"
        },
        "mapping": [
          {
            "identity": "mercurius-core-dataset-2-0",
            "map": "mercurius-core-rubriek-89",
            "comment": "soortaanvraag"
          }
        ]
      },
      {
        "id": "ServiceRequest.category:healthScreeningType",
        "path": "ServiceRequest.category",
        "sliceName": "healthScreeningType",
        "short": "HealthScreeningType",
        "definition": "Type of national trial for this request.",
        "comment": "When the HealthScreeningType concept has an empty value, code _0_ from the MercuriusHealthScreeningType code system SHALL be used as default value.",
        "alias": [
          "BVOSoort"
        ],
        "min": 1,
        "max": "1",
        "binding": {
          "strength": "required",
          "valueSet": "http://medmij.nl/fhir/ValueSet/HealthScreeningType",
          "_valueSet": {
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/11179-permitted-value-conceptmap",
                "valueCanonical": "http://medmij.nl/fhir/ConceptMap/MercuriusHealthScreeningType-to-HealthScreeningType"
              }
            ]
          },
          "description": "Use ConceptMap MercuriusHealthScreeningType-to-HealthScreeningType to translate terminology from the functional model to profile terminology in ValueSet HealthScreeningType."
        },
        "mapping": [
          {
            "identity": "mercurius-core-dataset-2-0",
            "map": "mercurius-core-rubriek-97",
            "comment": "bvosoort"
          }
        ]
      },
      {
        "id": "ServiceRequest.code",
        "path": "ServiceRequest.code",
        "comment": "If the requested pathology study is of type cytology (which means that the ReportIdentifier (i.e. _rapnaam_, mercurius-core-rubriek-3) starts with either _B_ or _C_, corresponding to cervical cytology and other cytology, respectively), SNOMED CT code _1348332002_ SHALL be used as `.code`. Likewise, if the study is of type histology (in which case the ReportIdentifier starts with _T_), SNOMED CT code _252416005_ SHALL be used instead. Studies for which the ReportIdentifier starts with _S_ (i.e. autopsies) are out of scope.",
        "min": 1
      },
      {
        "id": "ServiceRequest.code.coding",
        "path": "ServiceRequest.code.coding",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "$this"
            }
          ],
          "rules": "open"
        },
        "min": 1
      },
      {
        "id": "ServiceRequest.code.coding:cytology",
        "path": "ServiceRequest.code.coding",
        "sliceName": "cytology",
        "min": 0,
        "max": "1",
        "patternCoding": {
          "code": "1348332002",
          "system": "http://snomed.info/sct"
        },
        "condition": [
          "path-Request-1"
        ]
      },
      {
        "id": "ServiceRequest.code.coding:histology",
        "path": "ServiceRequest.code.coding",
        "sliceName": "histology",
        "min": 0,
        "max": "1",
        "patternCoding": {
          "code": "252416005",
          "system": "http://snomed.info/sct"
        },
        "condition": [
          "path-Request-1"
        ]
      },
      {
        "id": "ServiceRequest.subject",
        "path": "ServiceRequest.subject",
        "short": "Patient",
        "definition": "The patient as subject of the information.",
        "alias": [
          "Patiënt"
        ],
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Patient",
              "http://medmij.nl/fhir/StructureDefinition/path-Patient"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "medmij-core-dataset-120-20260923",
            "map": "medmij-core-dataelement-116",
            "comment": "Patient"
          }
        ]
      },
      {
        "id": "ServiceRequest.requester",
        "path": "ServiceRequest.requester",
        "short": "Requester",
        "definition": "Requester of the pathology study.",
        "alias": [
          "Aanvrager",
          "orderer"
        ],
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/PractitionerRole",
              "http://medmij.nl/fhir/StructureDefinition/path-Request.Requester"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "path-dataset-100-alpha3-20260923",
            "map": "path-dataelement-7",
            "comment": "Requester"
          }
        ]
      },
      {
        "id": "ServiceRequest.reasonCode",
        "path": "ServiceRequest.reasonCode",
        "min": 1,
        "max": "1"
      },
      {
        "id": "ServiceRequest.reasonCode.text",
        "path": "ServiceRequest.reasonCode.text",
        "short": "ClinicalQuestion",
        "definition": "Clinical request information.",
        "alias": [
          "KlinischeVraag"
        ],
        "min": 1,
        "mapping": [
          {
            "identity": "mercurius-core-dataset-2-0",
            "map": "mercurius-core-rubriek-139",
            "comment": "klinischevraag"
          }
        ]
      },
      {
        "id": "ServiceRequest.specimen",
        "path": "ServiceRequest.specimen",
        "short": "Specimen",
        "definition": "Specimen that will be examined by a laboratory.",
        "comment": "Both the primary specimen as well as the individual samples taken from that specimen are referenced here. If only a single sample is taken, precisely one Specimen is referenced here, as the primary specimen and sample coincide in that case.",
        "alias": [
          "Monster"
        ],
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Specimen",
              "http://medmij.nl/fhir/StructureDefinition/path-Request.Specimen"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "path-dataset-100-alpha3-20260923",
            "map": "path-dataelement-8",
            "comment": "Specimen"
          },
          {
            "identity": "path-dataset-100-alpha3-20260923",
            "map": "path-dataelement-15",
            "comment": "Sample"
          }
        ]
      }
    ]
  }
}