{
  "resourceType": "StructureDefinition",
  "url": "https://example.org/fhir/StructureDefinition/MyPatient",
  "name": "SianPatient",
  "status": "draft",
  "description": "Sian's patient example for FHIR training",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Patient",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Patient",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Patient",
        "path": "Patient",
        "definition": "Sian's patient example for FHIR training"
      },
      {
        "id": "Patient.extension",
        "path": "Patient.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        },
        "min": 0
      },
      {
        "id": "Patient.extension:SianOccExtension",
        "path": "Patient.extension",
        "sliceName": "SianOccExtension",
        "short": "SianOccExtension",
        "definition": "occ extension for Patient example in FHIR training",
        "min": 0,
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://sianoccextexample.org/fhir/StructureDefinition/MyExtension"
            ]
          }
        ],
        "mustSupport": true,
        "isModifier": false
      },
      {
        "id": "Patient.extension:SianOccExtension.value[x]",
        "path": "Patient.extension.value[x]",
        "binding": {
          "strength": "extensible",
          "description": "Value set for occupation extension",
          "valueSet": "http://www.alpha-hospital.alp/occupations"
        }
      },
      {
        "id": "Patient.extension:BirthPlace",
        "path": "Patient.extension",
        "sliceName": "BirthPlace",
        "short": "BirthPlace",
        "min": 0,
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/patient-birthPlace"
            ]
          }
        ],
        "mustSupport": true,
        "isModifier": false
      },
      {
        "id": "Patient.identifier",
        "path": "Patient.identifier",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "rules": "open"
        },
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.identifier:NationalID",
        "path": "Patient.identifier",
        "sliceName": "NationalID",
        "max": "1",
        "fixedIdentifier": {
          "system": "https://fhir.nhs.uk/Id/nhs-number"
        }
      },
      {
        "id": "Patient.identifier:NationalID.system",
        "path": "Patient.identifier.system",
        "min": 1
      },
      {
        "id": "Patient.identifier:NationalID.value",
        "path": "Patient.identifier.value",
        "min": 1
      },
      {
        "id": "Patient.identifier:LocalID",
        "path": "Patient.identifier",
        "sliceName": "LocalID",
        "max": "1",
        "fixedIdentifier": {
          "system": "https://fhir.abuhb.nhs.wales/Id/pas-identifier"
        }
      },
      {
        "id": "Patient.identifier:LocalID.system",
        "path": "Patient.identifier.system",
        "min": 1
      },
      {
        "id": "Patient.identifier:LocalID.value",
        "path": "Patient.identifier.value",
        "min": 1
      },
      {
        "id": "Patient.name",
        "path": "Patient.name",
        "min": 1,
        "type": [
          {
            "code": "HumanName",
            "profile": [
              "https://sian.example.org/fhir/StructureDefinition/SianHumanName"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.gender",
        "path": "Patient.gender",
        "mustSupport": true
      },
      {
        "id": "Patient.birthDate",
        "path": "Patient.birthDate",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.address",
        "path": "Patient.address",
        "constraint": [
          {
            "key": "sian-address-1",
            "severity": "error",
            "human": "If temp address period must be completed",
            "expression": "(use = 'temp') implies period.exists()"
          }
        ]
      },
      {
        "id": "Patient.address.use",
        "path": "Patient.address.use",
        "condition": [
          "sian-address-1"
        ]
      },
      {
        "id": "Patient.address.period",
        "path": "Patient.address.period",
        "condition": [
          "sian-address-1"
        ]
      }
    ]
  }
}