{
  "resourceType": "StructureDefinition",
  "url": "https://IrisPatient.org/fhir/StructureDefinition/IrisPatient",
  "name": "IrisPatient",
  "status": "draft",
  "description": "This is a test patient for the Furore FHIR modelling training",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Patient",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Patient",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Patient.extension",
        "path": "Patient.extension",
        "min": 1
      },
      {
        "id": "Patient.extension:birthPlace",
        "path": "Patient.extension",
        "sliceName": "birthPlace",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/patient-birthPlace"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Patient.extension:irisExtension",
        "path": "Patient.extension",
        "sliceName": "irisExtension",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://IrisExtension.org/fhir/StructureDefinition/IrisExtension"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Patient.extension:occupation",
        "path": "Patient.extension",
        "sliceName": "occupation",
        "short": "Occupation of the patient",
        "definition": "Occupation of the patient.",
        "alias": [
          "Work"
        ],
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://occupation.org/fhir/StructureDefinition/Occupation"
            ]
          }
        ],
        "mustSupport": false,
        "isModifier": false,
        "binding": {
          "strength": "example",
          "description": "Occupations",
          "valueSet": "http://example/org/ValueSet/IrisOccupations"
        }
      },
      {
        "id": "Patient.identifier",
        "path": "Patient.identifier",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "description": "Omschrijving",
          "rules": "open"
        },
        "definition": "Identifier(s) for this patient."
      },
      {
        "id": "Patient.identifier:HospitalIdentifier",
        "path": "Patient.identifier",
        "sliceName": "HospitalIdentifier",
        "short": "This internal hospital identifier for this patient",
        "max": "1"
      },
      {
        "id": "Patient.identifier:HospitalIdentifier.system",
        "path": "Patient.identifier.system",
        "min": 1,
        "fixedUri": "http://national.registry.org/ids"
      },
      {
        "id": "Patient.identifier:HospitalIdentifier.value",
        "path": "Patient.identifier.value",
        "min": 1
      },
      {
        "id": "Patient.identifier:BSN",
        "path": "Patient.identifier",
        "sliceName": "BSN",
        "short": "Official identifier",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Patient.name",
        "path": "Patient.name",
        "min": 1,
        "type": [
          {
            "code": "HumanName",
            "profile": [
              "https://example.org/fhir/StructureDefinition/MyHumanName"
            ]
          }
        ]
      },
      {
        "id": "Patient.telecom",
        "path": "Patient.telecom",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "use"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Patient.telecom:homeCategory",
        "path": "Patient.telecom",
        "sliceName": "homeCategory",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Patient.telecom:homeCategory.value",
        "path": "Patient.telecom.value",
        "min": 1
      },
      {
        "id": "Patient.telecom:homeCategory.use",
        "path": "Patient.telecom.use",
        "min": 1,
        "fixedCode": "home"
      },
      {
        "id": "Patient.telecom:workCategory",
        "path": "Patient.telecom",
        "sliceName": "workCategory",
        "max": "1"
      },
      {
        "id": "Patient.telecom:workCategory.value",
        "path": "Patient.telecom.value",
        "min": 1
      },
      {
        "id": "Patient.telecom:workCategory.use",
        "path": "Patient.telecom.use",
        "min": 1,
        "fixedCode": "work"
      },
      {
        "id": "Patient.birthDate",
        "path": "Patient.birthDate",
        "min": 1
      },
      {
        "id": "Patient.address",
        "path": "Patient.address",
        "constraint": [
          {
            "key": "Temp.Adress",
            "severity": "error",
            "human": "If the patient has a temporary address, the period this address is in use should be",
            "expression": "(use = 'temp') implies period.exists()"
          }
        ]
      },
      {
        "id": "Patient.address.use",
        "path": "Patient.address.use",
        "condition": [
          "Temp.Adress"
        ]
      },
      {
        "id": "Patient.address.period",
        "path": "Patient.address.period",
        "condition": [
          "Temp.Adress"
        ]
      }
    ]
  }
}