{
  "resourceType": "StructureDefinition",
  "id": "mirjams-course-patient-3",
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-category",
      "valueString": "Base.Individuals"
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-security-category",
      "valueCode": "patient"
    }
  ],
  "url": "http://mirjams.examples.org/StructureDefinition/mirjams-course-patient-3",
  "version": "0.1.0",
  "name": "MirjamsCoursePatient3",
  "title": "Mirjam's Course Patient Profile",
  "status": "active",
  "description": "Patient profile for the \"Complex constraints\" exercise from Mirjam's Data Modeling course, where slices are added and profiles are connected",
  "fhirVersion": "4.0.1",
  "mapping": [
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    },
    {
      "identity": "cda",
      "uri": "http://hl7.org/v3/cda",
      "name": "CDA (R2)"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/fivews",
      "name": "FiveWs Pattern Mapping"
    },
    {
      "identity": "v2",
      "uri": "http://hl7.org/v2",
      "name": "HL7 v2 Mapping"
    },
    {
      "identity": "loinc",
      "uri": "http://loinc.org",
      "name": "LOINC code for the element"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "Patient",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Patient",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Patient",
        "path": "Patient",
        "definition": "Patient profile for exercise 4 in Mirjam's Profiling course, where more complex constrains are added"
      },
      {
        "id": "Patient.extension",
        "path": "Patient.extension",
        "slicing": {
          "ordered": false,
          "rules": "open"
        }
      },
      {
        "id": "Patient.extension:birthplace",
        "path": "Patient.extension",
        "sliceName": "birthplace",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/patient-birthPlace"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.extension:birthplace.value[x]",
        "path": "Patient.extension.value[x]",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "$this"
            }
          ],
          "ordered": false,
          "rules": "open"
        }
      },
      {
        "id": "Patient.extension:birthplace.value[x]:valueAddress",
        "path": "Patient.extension.value[x]",
        "sliceName": "valueAddress",
        "min": 1
      },
      {
        "id": "Patient.extension:birthplace.value[x]:valueAddress.city",
        "path": "Patient.extension.value[x].city",
        "min": 1
      },
      {
        "id": "Patient.extension:occupation",
        "path": "Patient.extension",
        "sliceName": "occupation",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://mirjams.examples.org/StructureDefinition/patient-occupation"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.identifier",
        "path": "Patient.identifier",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "description": "Slice based on the system value",
          "rules": "open"
        },
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.identifier:nationalId",
        "path": "Patient.identifier",
        "sliceName": "nationalId",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Patient.identifier:nationalId.system",
        "path": "Patient.identifier.system",
        "min": 1,
        "patternUri": "http://national.registry.org/ids"
      },
      {
        "id": "Patient.identifier:nationalId.value",
        "path": "Patient.identifier.value",
        "min": 1
      },
      {
        "id": "Patient.identifier:hospitalId",
        "path": "Patient.identifier",
        "sliceName": "hospitalId",
        "max": "1"
      },
      {
        "id": "Patient.identifier:hospitalId.system",
        "path": "Patient.identifier.system",
        "min": 1,
        "patternUri": "http://www.alpha-hospital.alp/patient-ids"
      },
      {
        "id": "Patient.identifier:hospitalId.value",
        "path": "Patient.identifier.value",
        "min": 1
      },
      {
        "id": "Patient.name",
        "path": "Patient.name",
        "min": 1,
        "type": [
          {
            "code": "HumanName",
            "profile": [
              "http://mirjams.examples.org/StructureDefinition/mirjams-course-humanname"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.gender",
        "path": "Patient.gender",
        "mustSupport": true
      },
      {
        "id": "Patient.birthDate",
        "path": "Patient.birthDate",
        "min": 1,
        "mustSupport": true
      }
    ]
  }
}