{
  "resourceType": "StructureDefinition",
  "url": "http://medico-emr.net/stu3/sd/DiagnosticReport-LabReport-1",
  "name": "DiagnosticReport-LabReport-1",
  "status": "active",
  "description": "represents a diagnostic report containing ward lab results or central lab results",
  "fhirVersion": "3.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "DiagnosticReport",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/DiagnosticReport",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "DiagnosticReport.id",
        "path": "DiagnosticReport.id",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "id"
            }
          ],
          "rules": "open"
        },
        "min": 1
      },
      {
        "id": "DiagnosticReport.id:CentralLabReport",
        "path": "DiagnosticReport.id",
        "sliceName": "CentralLabReport"
      },
      {
        "id": "DiagnosticReport.id:CentralLabReport.id",
        "path": "DiagnosticReport.id.id",
        "definition": "DiagnosticReport.CL-######",
        "min": 1
      },
      {
        "id": "DiagnosticReport.id:WardLabReport",
        "path": "DiagnosticReport.id",
        "sliceName": "WardLabReport"
      },
      {
        "id": "DiagnosticReport.id:WardLabReport.id",
        "path": "DiagnosticReport.id.id",
        "definition": "DiagnosticReport.WL-#####",
        "min": 1
      },
      {
        "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",
        "min": 1
      },
      {
        "id": "DiagnosticReport.meta.profile",
        "path": "DiagnosticReport.meta.profile",
        "min": 1,
        "max": "1",
        "fixedUri": "http://medico-emr.net/stu3/sd/DiagnosticReport-LabReport-1"
      },
      {
        "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.contained",
        "path": "DiagnosticReport.contained",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.identifier",
        "path": "DiagnosticReport.identifier",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "type.coding.code"
            }
          ],
          "rules": "open"
        },
        "min": 1,
        "max": "1"
      },
      {
        "id": "DiagnosticReport.identifier:medicoResourceId",
        "path": "DiagnosticReport.identifier",
        "sliceName": "medicoResourceId",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Identifier",
            "profile": "http://medico-emr.net/stu3/sd/Identifier-medicoResourceId-1"
          }
        ]
      },
      {
        "id": "DiagnosticReport.identifier:medicoResourceId.system",
        "path": "DiagnosticReport.identifier.system",
        "definition": "Must be a constant underneath http://medico-emr.net/%KUNDE%/sid1/\r\nwith one of the following identifiers\r\nDiagnosticReport.CL - if from central lab\r\nDiagnosticReport.WL - if from ward lab"
      },
      {
        "id": "DiagnosticReport.basedOn",
        "path": "DiagnosticReport.basedOn",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.status",
        "path": "DiagnosticReport.status",
        "short": "partial",
        "definition": "There is no status available in medico, so we'll send always partial.",
        "fixedCode": "partial"
      },
      {
        "id": "DiagnosticReport.category",
        "path": "DiagnosticReport.category",
        "min": 1
      },
      {
        "id": "DiagnosticReport.category.id",
        "path": "DiagnosticReport.category.id",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.category.coding",
        "path": "DiagnosticReport.category.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "DiagnosticReport.category.coding.id",
        "path": "DiagnosticReport.category.coding.id",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.category.coding.system",
        "path": "DiagnosticReport.category.coding.system",
        "min": 1,
        "fixedUri": "http://medico-emr.net/cs1"
      },
      {
        "id": "DiagnosticReport.category.coding.version",
        "path": "DiagnosticReport.category.coding.version",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.category.coding.code",
        "path": "DiagnosticReport.category.coding.code",
        "min": 1,
        "fixedCode": "Cat_LabResults-1"
      },
      {
        "id": "DiagnosticReport.category.coding.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "DiagnosticReport.category.coding.display",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.category.coding.userSelected",
        "path": "DiagnosticReport.category.coding.userSelected",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.category.text",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "DiagnosticReport.category.text",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.code",
        "path": "DiagnosticReport.code",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "coding.code"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "DiagnosticReport.code:WardLabReport",
        "path": "DiagnosticReport.code",
        "sliceName": "WardLabReport"
      },
      {
        "id": "DiagnosticReport.code:WardLabReport.id",
        "path": "DiagnosticReport.code.id",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.code:WardLabReport.coding",
        "path": "DiagnosticReport.code.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "DiagnosticReport.code:WardLabReport.coding.id",
        "path": "DiagnosticReport.code.coding.id",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.code:WardLabReport.coding.system",
        "path": "DiagnosticReport.code.coding.system",
        "min": 1,
        "fixedUri": "http://medico-emr.net/cs1"
      },
      {
        "id": "DiagnosticReport.code:WardLabReport.coding.version",
        "path": "DiagnosticReport.code.coding.version",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.code:WardLabReport.coding.code",
        "path": "DiagnosticReport.code.coding.code",
        "min": 1,
        "fixedCode": "WardLabReport-1"
      },
      {
        "id": "DiagnosticReport.code:WardLabReport.coding.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "DiagnosticReport.code.coding.display",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.code:WardLabReport.coding.userSelected",
        "path": "DiagnosticReport.code.coding.userSelected",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.code:WardLabReport.text",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "DiagnosticReport.code.text",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.code:CentralLabReport",
        "path": "DiagnosticReport.code",
        "sliceName": "CentralLabReport"
      },
      {
        "id": "DiagnosticReport.code:CentralLabReport.id",
        "path": "DiagnosticReport.code.id",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.code:CentralLabReport.coding",
        "path": "DiagnosticReport.code.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "DiagnosticReport.code:CentralLabReport.coding.id",
        "path": "DiagnosticReport.code.coding.id",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.code:CentralLabReport.coding.system",
        "path": "DiagnosticReport.code.coding.system",
        "min": 1,
        "fixedUri": "http://medico-emr.net/cs1"
      },
      {
        "id": "DiagnosticReport.code:CentralLabReport.coding.version",
        "path": "DiagnosticReport.code.coding.version",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.code:CentralLabReport.coding.code",
        "path": "DiagnosticReport.code.coding.code",
        "min": 1,
        "fixedCode": "CentralLabReport-1"
      },
      {
        "id": "DiagnosticReport.code:CentralLabReport.coding.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "DiagnosticReport.code.coding.display",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.code:CentralLabReport.coding.userSelected",
        "path": "DiagnosticReport.code.coding.userSelected",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.code:CentralLabReport.text",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "DiagnosticReport.code.text",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.subject",
        "path": "DiagnosticReport.subject",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "profile": "http://medico-emr.net/stu3/sd/Reference-SubjectPatient-1",
            "targetProfile": "http://medico-emr.net/stu3/sd/Patient-Patient-1"
          }
        ]
      },
      {
        "id": "DiagnosticReport.subject.reference",
        "path": "DiagnosticReport.subject.reference",
        "min": 1
      },
      {
        "id": "DiagnosticReport.context",
        "path": "DiagnosticReport.context",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "profile": "http://medico-emr.net/stu3/sd/Reference-ContextEncounter-1",
            "targetProfile": "http://medico-emr.net/stu3/sd/Encounter-Case-1"
          }
        ]
      },
      {
        "id": "DiagnosticReport.effective[x]",
        "path": "DiagnosticReport.effective[x]",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.issued",
        "path": "DiagnosticReport.issued",
        "definition": "The date and time that this version of the report was released from the source diagnostic service. chd/crd from medico source table is used.",
        "min": 1
      },
      {
        "id": "DiagnosticReport.performer",
        "path": "DiagnosticReport.performer",
        "min": 1,
        "max": "1"
      },
      {
        "id": "DiagnosticReport.performer.id",
        "path": "DiagnosticReport.performer.id",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.performer.role",
        "path": "DiagnosticReport.performer.role",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.performer.actor",
        "path": "DiagnosticReport.performer.actor",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://medico-emr.net/stu3/sd/Practitioner-User-1"
          }
        ]
      },
      {
        "id": "DiagnosticReport.performer.actor.id",
        "path": "DiagnosticReport.performer.actor.id",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.performer.actor.reference",
        "path": "DiagnosticReport.performer.actor.reference",
        "min": 1
      },
      {
        "id": "DiagnosticReport.performer.actor.identifier",
        "path": "DiagnosticReport.performer.actor.identifier",
        "min": 1
      },
      {
        "id": "DiagnosticReport.performer.actor.identifier.id",
        "path": "DiagnosticReport.performer.actor.identifier.id",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.performer.actor.identifier.use",
        "path": "DiagnosticReport.performer.actor.identifier.use",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.performer.actor.identifier.type",
        "path": "DiagnosticReport.performer.actor.identifier.type",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.performer.actor.identifier.system",
        "path": "DiagnosticReport.performer.actor.identifier.system",
        "definition": "Establishes the namespace for the value - that is, a URL that describes a set values that are unique.\r\nhttp://medico-emr.net/%KUNDE%/cs/User",
        "comment": "see http://en.wikipedia.org/wiki/Uniform_resource_identifier\r\nDynamically resolved for validation\r\n--FixedValue=http://medico-emr.net/%KUNDE%/cs/User",
        "min": 1
      },
      {
        "id": "DiagnosticReport.performer.actor.identifier.value",
        "path": "DiagnosticReport.performer.actor.identifier.value",
        "min": 1
      },
      {
        "id": "DiagnosticReport.performer.actor.identifier.period",
        "path": "DiagnosticReport.performer.actor.identifier.period",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.performer.actor.identifier.assigner",
        "path": "DiagnosticReport.performer.actor.identifier.assigner",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.performer.actor.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "DiagnosticReport.performer.actor.display",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.specimen",
        "path": "DiagnosticReport.specimen",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.result",
        "path": "DiagnosticReport.result",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://medico-emr.net/stu3/sd/Observation-CentralLab-1"
          },
          {
            "code": "Reference",
            "targetProfile": "http://medico-emr.net/stu3/sd/Observation-WardLab-1"
          }
        ]
      },
      {
        "id": "DiagnosticReport.result.id",
        "path": "DiagnosticReport.result.id",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.result.reference",
        "path": "DiagnosticReport.result.reference",
        "min": 1
      },
      {
        "id": "DiagnosticReport.result.identifier",
        "path": "DiagnosticReport.result.identifier",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.result.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "DiagnosticReport.result.display",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.imagingStudy",
        "path": "DiagnosticReport.imagingStudy",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.image",
        "path": "DiagnosticReport.image",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.conclusion",
        "path": "DiagnosticReport.conclusion",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.codedDiagnosis",
        "path": "DiagnosticReport.codedDiagnosis",
        "max": "0"
      },
      {
        "id": "DiagnosticReport.presentedForm",
        "path": "DiagnosticReport.presentedForm",
        "max": "0"
      }
    ]
  }
}