{
  "resourceType": "StructureDefinition",
  "id": "FTDiagReport-0e43294c-0899-4ca2-b5c3-9db84f3f9c85",
  "url": "https://www.esante.lu/fhir-spec/StructureDefinition/FTDiagReport",
  "version": "0.0.1",
  "name": "FTDiagReport",
  "status": "draft",
  "fhirVersion": "4.0.1",
  "mapping": [
    {
      "identity": "workflow",
      "uri": "http://hl7.org/fhir/workflow",
      "name": "Workflow Pattern"
    },
    {
      "identity": "v2",
      "uri": "http://hl7.org/v2",
      "name": "HL7 v2 Mapping"
    },
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/fivews",
      "name": "FiveWs Pattern Mapping"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "DiagnosticReport",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/DiagnosticReport",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "DiagnosticReport",
        "path": "DiagnosticReport",
        "definition": "Result Envelope"
      },
      {
        "id": "DiagnosticReport.id",
        "path": "DiagnosticReport.id",
        "definition": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.\r\nIs assigned by the server, do not provide a value."
      },
      {
        "id": "DiagnosticReport.meta",
        "path": "DiagnosticReport.meta",
        "min": 1
      },
      {
        "id": "DiagnosticReport.meta.id",
        "path": "DiagnosticReport.meta.id",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.meta.versionId",
        "path": "DiagnosticReport.meta.versionId",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.meta.lastUpdated",
        "path": "DiagnosticReport.meta.lastUpdated",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.meta.source",
        "path": "DiagnosticReport.meta.source",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.meta.profile",
        "path": "DiagnosticReport.meta.profile",
        "min": 1,
        "max": "1",
        "fixedCanonical": "https://www.esante.lu/fhir-spec/StructureDefinition/FTDiagReport"
      },
      {
        "id": "DiagnosticReport.meta.security",
        "path": "DiagnosticReport.meta.security",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.meta.tag",
        "path": "DiagnosticReport.meta.tag",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.implicitRules",
        "path": "DiagnosticReport.implicitRules",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.language",
        "path": "DiagnosticReport.language",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.text",
        "path": "DiagnosticReport.text",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.identifier",
        "path": "DiagnosticReport.identifier",
        "short": "An identifier for the Diagnostic Report",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Identifier",
            "profile": [
              "https://www.esante.lu/fhir-spec/StructureDefinition/EPSimpleIdentifier"
            ]
          }
        ]
      },
      {
        "id": "DiagnosticReport.basedOn",
        "path": "DiagnosticReport.basedOn",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.status",
        "path": "DiagnosticReport.status",
        "short": "Status allowed:\tunknown | cancelled",
        "condition": [
          "val-status-DiagnosticReport"
        ],
        "constraint": [
          {
            "key": "val-status-DiagnosticReport",
            "severity": "error",
            "human": "unknown or cancelled",
            "expression": "$this = 'unknown' or $this='cancelled'",
            "source": "https://www.esante.lu/fhir-spec/StructureDefinition/FTDiagReport"
          }
        ]
      },
      {
        "id": "DiagnosticReport.category",
        "path": "DiagnosticReport.category",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.code",
        "path": "DiagnosticReport.code",
        "short": "Constant code for diagnostic report"
      },
      {
        "id": "DiagnosticReport.code.coding",
        "path": "DiagnosticReport.code.coding",
        "min": 1,
        "max": "1",
        "fixedCoding": {
          "code": "11502-2",
          "system": "http://loinc.org"
        }
      },
      {
        "id": "DiagnosticReport.code.coding.system",
        "path": "DiagnosticReport.code.coding.system",
        "min": 1
      },
      {
        "id": "DiagnosticReport.code.coding.version",
        "path": "DiagnosticReport.code.coding.version",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.code.coding.code",
        "path": "DiagnosticReport.code.coding.code",
        "min": 1
      },
      {
        "id": "DiagnosticReport.code.coding.display",
        "path": "DiagnosticReport.code.coding.display",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.code.coding.userSelected",
        "path": "DiagnosticReport.code.coding.userSelected",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.code.text",
        "path": "DiagnosticReport.code.text",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.subject",
        "path": "DiagnosticReport.subject",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.encounter",
        "path": "DiagnosticReport.encounter",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.issued",
        "path": "DiagnosticReport.issued",
        "short": "Date & Time this report has been produced"
      },
      {
        "id": "DiagnosticReport.performer",
        "path": "DiagnosticReport.performer",
        "short": "The labo",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://www.esante.lu/fhir-spec/StructureDefinition/EPOrganization"
            ],
            "aggregation": [
              "referenced"
            ]
          }
        ]
      },
      {
        "id": "DiagnosticReport.performer.reference",
        "path": "DiagnosticReport.performer.reference",
        "short": "The labo referenced by its eHealthID",
        "min": 1,
        "example": [
          {
            "label": "Example",
            "valueString": "Organization?identifier=urn:oid:1.3.182.4.1|1000180763"
          }
        ],
        "condition": [
          "val-orgByEhealthID"
        ],
        "constraint": [
          {
            "key": "val-orgByEhealthID",
            "severity": "error",
            "human": "SHALL reference an organization by its eHealthID",
            "expression": "startsWith('Organization?identifier=urn:oid:1.3.182.4.1|1') and length()=54",
            "source": "https://www.esante.lu/fhir-spec/StructureDefinition/FTDiagReport"
          }
        ]
      },
      {
        "id": "DiagnosticReport.performer.type",
        "path": "DiagnosticReport.performer.type",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.performer.identifier",
        "path": "DiagnosticReport.performer.identifier",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.performer.display",
        "path": "DiagnosticReport.performer.display",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.resultsInterpreter",
        "path": "DiagnosticReport.resultsInterpreter",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.specimen",
        "path": "DiagnosticReport.specimen",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.result",
        "path": "DiagnosticReport.result",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.imagingStudy",
        "path": "DiagnosticReport.imagingStudy",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.media",
        "path": "DiagnosticReport.media",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.conclusion",
        "path": "DiagnosticReport.conclusion",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.conclusionCode",
        "path": "DiagnosticReport.conclusionCode",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.presentedForm",
        "path": "DiagnosticReport.presentedForm",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "contentType"
            }
          ],
          "rules": "closed"
        },
        "min": 1,
        "max": "2"
      },
      {
        "id": "DiagnosticReport.presentedForm:xml",
        "path": "DiagnosticReport.presentedForm",
        "sliceName": "xml",
        "short": "XML Document as Attachment",
        "min": 1,
        "max": "1"
      },
      {
        "id": "DiagnosticReport.presentedForm:xml.id",
        "path": "DiagnosticReport.presentedForm.id",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.presentedForm:xml.contentType",
        "path": "DiagnosticReport.presentedForm.contentType",
        "short": "XML Mime type",
        "min": 1,
        "fixedCode": "text/xml"
      },
      {
        "id": "DiagnosticReport.presentedForm:xml.language",
        "path": "DiagnosticReport.presentedForm.language",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.presentedForm:xml.data",
        "path": "DiagnosticReport.presentedForm.data",
        "min": 1
      },
      {
        "id": "DiagnosticReport.presentedForm:xml.url",
        "path": "DiagnosticReport.presentedForm.url",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.presentedForm:xml.size",
        "path": "DiagnosticReport.presentedForm.size",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.presentedForm:xml.hash",
        "path": "DiagnosticReport.presentedForm.hash",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.presentedForm:xml.title",
        "path": "DiagnosticReport.presentedForm.title",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.presentedForm:xml.creation",
        "path": "DiagnosticReport.presentedForm.creation",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.presentedForm:pdf",
        "path": "DiagnosticReport.presentedForm",
        "sliceName": "pdf",
        "short": "PDF Document as Attachment",
        "min": 0,
        "max": "1"
      },
      {
        "id": "DiagnosticReport.presentedForm:pdf.id",
        "path": "DiagnosticReport.presentedForm.id",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.presentedForm:pdf.contentType",
        "path": "DiagnosticReport.presentedForm.contentType",
        "short": "PDF Mime type",
        "min": 1,
        "fixedCode": "application/pdf"
      },
      {
        "id": "DiagnosticReport.presentedForm:pdf.language",
        "path": "DiagnosticReport.presentedForm.language",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.presentedForm:pdf.data",
        "path": "DiagnosticReport.presentedForm.data",
        "min": 1
      },
      {
        "id": "DiagnosticReport.presentedForm:pdf.url",
        "path": "DiagnosticReport.presentedForm.url",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.presentedForm:pdf.size",
        "path": "DiagnosticReport.presentedForm.size",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.presentedForm:pdf.hash",
        "path": "DiagnosticReport.presentedForm.hash",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.presentedForm:pdf.title",
        "path": "DiagnosticReport.presentedForm.title",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.presentedForm:pdf.creation",
        "path": "DiagnosticReport.presentedForm.creation",
        "max": "0"
      }
    ]
  }
}