{
  "resourceType": "StructureDefinition",
  "id": "EPLabCondition-68752b01-7e95-462a-8ec2-78fdff7a6291",
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-category",
      "valueString": "Clinical.Summary"
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-security-category",
      "valueCode": "patient"
    }
  ],
  "url": "https://www.esante.lu/fhir-spec/StructureDefinition/EPLabCondition",
  "version": "0.1.0",
  "name": "EPLabCondition",
  "status": "draft",
  "fhirVersion": "4.0.1",
  "mapping": [
    {
      "identity": "workflow",
      "uri": "http://hl7.org/fhir/workflow",
      "name": "Workflow Pattern"
    },
    {
      "identity": "sct-concept",
      "uri": "http://snomed.info/conceptdomain",
      "name": "SNOMED CT Concept Domain Binding"
    },
    {
      "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"
    },
    {
      "identity": "sct-attr",
      "uri": "http://snomed.org/attributebinding",
      "name": "SNOMED CT Attribute Binding"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "Condition",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Condition",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Condition",
        "path": "Condition",
        "short": "A condition on the patient",
        "definition": "Can come from the Conditions in the referential, or be any textual condition of interest"
      },
      {
        "id": "Condition.id",
        "path": "Condition.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": "Condition.meta",
        "path": "Condition.meta",
        "min": 1
      },
      {
        "id": "Condition.meta.id",
        "path": "Condition.meta.id",
        "max": "0"
      },
      {
        "id": "Condition.meta.versionId",
        "path": "Condition.meta.versionId",
        "max": "0"
      },
      {
        "id": "Condition.meta.lastUpdated",
        "path": "Condition.meta.lastUpdated",
        "max": "0"
      },
      {
        "id": "Condition.meta.source",
        "path": "Condition.meta.source",
        "max": "0"
      },
      {
        "id": "Condition.meta.profile",
        "path": "Condition.meta.profile",
        "min": 1,
        "max": "1",
        "fixedCanonical": "https://www.esante.lu/fhir-spec/StructureDefinition/EPLabCondition"
      },
      {
        "id": "Condition.meta.security",
        "path": "Condition.meta.security",
        "max": "0"
      },
      {
        "id": "Condition.meta.tag",
        "path": "Condition.meta.tag",
        "max": "0"
      },
      {
        "id": "Condition.implicitRules",
        "path": "Condition.implicitRules",
        "max": "0"
      },
      {
        "id": "Condition.language",
        "path": "Condition.language",
        "max": "0"
      },
      {
        "id": "Condition.text",
        "path": "Condition.text",
        "max": "0"
      },
      {
        "id": "Condition.contained",
        "path": "Condition.contained",
        "max": "0"
      },
      {
        "id": "Condition.identifier",
        "path": "Condition.identifier",
        "max": "0"
      },
      {
        "id": "Condition.clinicalStatus",
        "path": "Condition.clinicalStatus",
        "max": "0"
      },
      {
        "id": "Condition.verificationStatus",
        "path": "Condition.verificationStatus",
        "max": "0"
      },
      {
        "id": "Condition.category",
        "path": "Condition.category",
        "max": "0"
      },
      {
        "id": "Condition.severity",
        "path": "Condition.severity",
        "max": "0"
      },
      {
        "id": "Condition.code",
        "path": "Condition.code",
        "short": "The condition",
        "min": 1,
        "type": [
          {
            "code": "CodeableConcept",
            "profile": [
              "https://www.esante.lu/fhir-spec/StructureDefinition/EPCodeableConcept"
            ]
          }
        ]
      },
      {
        "id": "Condition.code.coding",
        "path": "Condition.code.coding",
        "example": [
          {
            "label": "Example of a condition",
            "valueCoding": {
              "code": "11",
              "system": "urn:oid:1.3.182.5.54"
            }
          }
        ],
        "binding": {
          "strength": "required",
          "valueSet": "https://www.esante.lu/fhir-spec/ValueSet/BioPrescQualifiers"
        }
      },
      {
        "id": "Condition.bodySite",
        "path": "Condition.bodySite",
        "max": "0"
      },
      {
        "id": "Condition.subject",
        "path": "Condition.subject",
        "short": "The patient",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Patient"
            ],
            "aggregation": [
              "referenced"
            ]
          }
        ]
      },
      {
        "id": "Condition.subject.id",
        "path": "Condition.subject.id",
        "max": "0"
      },
      {
        "id": "Condition.subject.reference",
        "path": "Condition.subject.reference",
        "short": "Patient referenced via its matricule",
        "min": 1,
        "example": [
          {
            "label": "Example",
            "valueString": "Patient?identifier=urn:oid:1.3.182.4.4|1904112000166"
          }
        ],
        "condition": [
          "val-patByMatricule"
        ],
        "constraint": [
          {
            "key": "val-patByMatricule",
            "severity": "error",
            "human": "The Patient SHALL be referenced by its matricule",
            "expression": "startsWith('Patient?identifier=urn:oid:1.3.182.4.4|') and length()=52",
            "source": "https://www.esante.lu/fhir-spec/StructureDefinition/EPLabCondition"
          }
        ]
      },
      {
        "id": "Condition.subject.type",
        "path": "Condition.subject.type",
        "max": "0"
      },
      {
        "id": "Condition.subject.identifier",
        "path": "Condition.subject.identifier",
        "max": "0"
      },
      {
        "id": "Condition.subject.display",
        "path": "Condition.subject.display",
        "max": "0"
      },
      {
        "id": "Condition.encounter",
        "path": "Condition.encounter",
        "max": "0"
      },
      {
        "id": "Condition.onset[x]",
        "path": "Condition.onset[x]",
        "max": "0"
      },
      {
        "id": "Condition.abatement[x]",
        "path": "Condition.abatement[x]",
        "max": "0"
      },
      {
        "id": "Condition.recordedDate",
        "path": "Condition.recordedDate",
        "max": "0"
      },
      {
        "id": "Condition.recorder",
        "path": "Condition.recorder",
        "short": "The health professional",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Practitioner"
            ],
            "aggregation": [
              "referenced"
            ]
          }
        ]
      },
      {
        "id": "Condition.recorder.id",
        "path": "Condition.recorder.id",
        "max": "0"
      },
      {
        "id": "Condition.recorder.reference",
        "path": "Condition.recorder.reference",
        "short": "A reference to the health professional",
        "min": 1,
        "example": [
          {
            "label": "Example",
            "valueString": "Practitioner?identifier=urn:oid:1.3.182.4.1|2777777717"
          }
        ],
        "condition": [
          "val-1"
        ],
        "constraint": [
          {
            "key": "val-1",
            "severity": "error",
            "human": "A Practitioner SHALL be referenced by its eHealthID",
            "expression": "startsWith('Practitioner?identifier=urn:oid:1.3.182.4.1|2') and length()=54",
            "source": "https://www.esante.lu/fhir-spec/StructureDefinition/EPLabCondition"
          }
        ]
      },
      {
        "id": "Condition.recorder.type",
        "path": "Condition.recorder.type",
        "max": "0"
      },
      {
        "id": "Condition.recorder.identifier",
        "path": "Condition.recorder.identifier",
        "max": "0"
      },
      {
        "id": "Condition.recorder.display",
        "path": "Condition.recorder.display",
        "max": "0"
      },
      {
        "id": "Condition.asserter",
        "path": "Condition.asserter",
        "max": "0"
      },
      {
        "id": "Condition.stage",
        "path": "Condition.stage",
        "max": "0"
      },
      {
        "id": "Condition.evidence",
        "path": "Condition.evidence",
        "max": "0"
      },
      {
        "id": "Condition.note",
        "path": "Condition.note",
        "max": "0"
      }
    ]
  }
}