{
  "resourceType": "StructureDefinition",
  "id": "path-Report",
  "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-Report",
  "name": "PathReport",
  "title": "path Report",
  "status": "draft",
  "publisher": "MedMij",
  "contact": [
    {
      "name": "MedMij",
      "telecom": [
        {
          "system": "email",
          "value": "info@medmij.nl",
          "use": "work"
        }
      ]
    }
  ],
  "description": "Pathology report which contains the findings and interpretation of a pathology study.",
  "purpose": "This DiagnosticReport resource represents the Report building block for patient use cases in the context of the information standard Pathology (Pathologie).",
  "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"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "DiagnosticReport",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/DiagnosticReport",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "DiagnosticReport",
        "path": "DiagnosticReport",
        "short": "Report",
        "definition": "Pathology report which contains the findings and interpretation of a pathology study.",
        "alias": [
          "Verslag",
          "Test",
          "Result",
          "Results",
          "Labs",
          "Laboratory"
        ],
        "constraint": [
          {
            "key": "path-Report-1",
            "severity": "error",
            "human": "The identifier system of a report is of the form 'urn:oid:2.16.840.1.113883.2.4.3.23.3.N.1' where N is the lab number.",
            "expression": "identifier.system.startsWith('urn:oid:2.16.840.1.113883.2.4.3.23.3.').endsWith('.1')",
            "source": "http://medmij.nl/fhir/StructureDefinition/path-Report"
          },
          {
            "key": "path-Report-2",
            "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-Report"
          }
        ]
      },
      {
        "id": "DiagnosticReport.identifier",
        "path": "DiagnosticReport.identifier",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "$this"
            }
          ],
          "rules": "open"
        },
        "min": 1
      },
      {
        "id": "DiagnosticReport.identifier:reportIdentifier",
        "path": "DiagnosticReport.identifier",
        "sliceName": "reportIdentifier",
        "short": "ReportIdentifier",
        "definition": "Identifier of the pathology report assigned by the laboratory doing the analysis.",
        "comment": "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": [
          "VerslagIdentificatienummer",
          "Filler ID",
          "Placer ID"
        ],
        "min": 1,
        "max": "1",
        "condition": [
          "path-Report-1"
        ],
        "mapping": [
          {
            "identity": "mercurius-core-dataset-2-0",
            "map": "mercurius-core-rubriek-3",
            "comment": "rapnaam"
          }
        ]
      },
      {
        "id": "DiagnosticReport.identifier:reportIdentifier.system",
        "path": "DiagnosticReport.identifier.system",
        "min": 1,
        "condition": [
          "path-Report-1"
        ]
      },
      {
        "id": "DiagnosticReport.identifier:reportIdentifier.value",
        "path": "DiagnosticReport.identifier.value",
        "min": 1
      },
      {
        "id": "DiagnosticReport.basedOn",
        "path": "DiagnosticReport.basedOn",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/ServiceRequest",
              "http://medmij.nl/fhir/StructureDefinition/path-Request"
            ]
          }
        ]
      },
      {
        "id": "DiagnosticReport.status",
        "path": "DiagnosticReport.status",
        "patternCode": "final"
      },
      {
        "id": "DiagnosticReport.category",
        "path": "DiagnosticReport.category",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "$this"
            }
          ],
          "rules": "open"
        },
        "min": 1
      },
      {
        "id": "DiagnosticReport.category:pathology",
        "path": "DiagnosticReport.category",
        "sliceName": "pathology",
        "min": 1,
        "max": "1",
        "patternCodeableConcept": {
          "coding": [
            {
              "code": "108257001",
              "system": "http://snomed.info/sct"
            }
          ]
        }
      },
      {
        "id": "DiagnosticReport.code",
        "path": "DiagnosticReport.code",
        "comment": "If the 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 code _1348332002_ SHALL be used as `.code`. Likewise, if the study is of type histology (in which case the ReportIdentifier starts with _T_), SNOMED code _252416005_ SHALL be used instead. Studies for which the ReportIdentifier starts with _S_ (i.e. autopsies) are out of scope."
      },
      {
        "id": "DiagnosticReport.code.coding",
        "path": "DiagnosticReport.code.coding",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "$this"
            }
          ],
          "rules": "open"
        },
        "min": 1
      },
      {
        "id": "DiagnosticReport.code.coding:cytology",
        "path": "DiagnosticReport.code.coding",
        "sliceName": "cytology",
        "min": 0,
        "max": "1",
        "patternCoding": {
          "code": "1348332002",
          "system": "http://snomed.info/sct"
        },
        "condition": [
          "path-Report-2"
        ]
      },
      {
        "id": "DiagnosticReport.code.coding:histology",
        "path": "DiagnosticReport.code.coding",
        "sliceName": "histology",
        "min": 0,
        "max": "1",
        "patternCoding": {
          "code": "252416005",
          "system": "http://snomed.info/sct"
        },
        "condition": [
          "path-Report-2"
        ]
      },
      {
        "id": "DiagnosticReport.subject",
        "path": "DiagnosticReport.subject",
        "short": "Patient",
        "alias": [
          "Patiënt"
        ],
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Patient",
              "http://medmij.nl/fhir/StructureDefinition/path-Patient"
            ]
          }
        ]
      },
      {
        "id": "DiagnosticReport.effective[x]",
        "path": "DiagnosticReport.effective[x]",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "$this"
            }
          ],
          "ordered": false,
          "rules": "open"
        },
        "min": 1
      },
      {
        "id": "DiagnosticReport.effective[x]:effectivePeriod",
        "path": "DiagnosticReport.effective[x]",
        "sliceName": "effectivePeriod",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Period"
          }
        ]
      },
      {
        "id": "DiagnosticReport.effective[x]:effectivePeriod.start",
        "path": "DiagnosticReport.effective[x].start",
        "short": "ReceivedDate",
        "definition": "Date when specimen is received at the laboratory.",
        "alias": [
          "DatumOntvangst"
        ],
        "min": 1,
        "mapping": [
          {
            "identity": "mercurius-core-dataset-2-0",
            "map": "mercurius-core-rubriek-80",
            "comment": "datumontvangst"
          }
        ]
      },
      {
        "id": "DiagnosticReport.effective[x]:effectivePeriod.end",
        "path": "DiagnosticReport.effective[x].end",
        "short": "AuthorizationDate",
        "definition": "Date of authorization.",
        "alias": [
          "DatumAutorisatie"
        ],
        "min": 1,
        "mapping": [
          {
            "identity": "mercurius-core-dataset-2-0",
            "map": "mercurius-core-rubriek-44",
            "comment": "datumautorisatie"
          }
        ]
      },
      {
        "id": "DiagnosticReport.resultsInterpreter",
        "path": "DiagnosticReport.resultsInterpreter",
        "short": "Authorizer",
        "definition": "Name of the pathologist who has authorized the report.",
        "comment": "The actual mapping of the Authorizer concept is on `Practitioner.name[nameInformation].text`.",
        "alias": [
          "Autorisator",
          "Reported by"
        ],
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Practitioner",
              "http://hl7.org/fhir/StructureDefinition/PractitionerRole",
              "http://nictiz.nl/fhir/StructureDefinition/nl-core-HealthProfessional-Practitioner",
              "http://nictiz.nl/fhir/StructureDefinition/nl-core-HealthProfessional-PractitionerRole"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "mercurius-core-dataset-2-0",
            "map": "mercurius-core-rubriek-41",
            "comment": "autorisator (implicit, actual mapping is on Practitioner.name[nameInformation].text)"
          }
        ]
      },
      {
        "id": "DiagnosticReport.specimen",
        "path": "DiagnosticReport.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 (i.e. the NumberOfSamples concept is equal to _1_), precisely one Specimen is referenced here, as the primary specimen and sample coincide in that case. If multiple samples have been taken from the primary specimen, the `.specimen` element contains _NumberOfSamples + 1_ references, one for the primary specimen and one for each sample.",
        "alias": [
          "Monster"
        ],
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Specimen",
              "http://medmij.nl/fhir/StructureDefinition/path-Request.Specimen"
            ]
          }
        ]
      },
      {
        "id": "DiagnosticReport.result",
        "path": "DiagnosticReport.result",
        "slicing": {
          "discriminator": [
            {
              "type": "profile",
              "path": "resolve()"
            }
          ],
          "rules": "open"
        },
        "min": 1
      },
      {
        "id": "DiagnosticReport.result:clinicalInformation",
        "path": "DiagnosticReport.result",
        "sliceName": "clinicalInformation",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://medmij.nl/fhir/StructureDefinition/path-Report.ClinicalInformation"
            ]
          }
        ]
      },
      {
        "id": "DiagnosticReport.result:macroscopy",
        "path": "DiagnosticReport.result",
        "sliceName": "macroscopy",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://medmij.nl/fhir/StructureDefinition/path-Report.Macroscopy"
            ]
          }
        ]
      },
      {
        "id": "DiagnosticReport.result:microscopy",
        "path": "DiagnosticReport.result",
        "sliceName": "microscopy",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://medmij.nl/fhir/StructureDefinition/path-Report.Microscopy"
            ]
          }
        ]
      },
      {
        "id": "DiagnosticReport.result:protocolData",
        "path": "DiagnosticReport.result",
        "sliceName": "protocolData",
        "short": "ProtocolData",
        "definition": "Data from National Palga Protocols, created in the Palga Protocol Module.",
        "alias": [
          "Protocoldata",
          "Atomic Value",
          "Result",
          "Atomic result",
          "Data",
          "Test",
          "Analyte",
          "Battery",
          "Organizer"
        ],
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://medmij.nl/fhir/StructureDefinition/path-Report.ProtocolDataItem"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "mercurius-core-dataset-2-0",
            "map": "mercurius-core-rubriek-308",
            "comment": "protocoldata"
          }
        ]
      },
      {
        "id": "DiagnosticReport.conclusion",
        "path": "DiagnosticReport.conclusion",
        "short": "Conclusion",
        "definition": "Conclusion of the report.",
        "alias": [
          "Conclusie"
        ],
        "min": 1,
        "mapping": [
          {
            "identity": "mercurius-core-dataset-2-0",
            "map": "mercurius-core-rubriek-224",
            "comment": "conclusie"
          }
        ]
      }
    ]
  }
}