{
  "resourceType": "StructureDefinition",
  "url": "https://onko-i.si/demi/fhir/StructureDefinition/PatientSI_OI",
  "name": "PatientSI_OI",
  "status": "draft",
  "fhirVersion": "4.1.0",
  "kind": "resource",
  "abstract": false,
  "type": "Patient",
  "baseDefinition": "https://nijz.si/rdsp/fhir/StructureDefinition/patientSI",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Patient.identifier:esei",
        "path": "Patient.identifier",
        "sliceName": "esei",
        "max": "0"
      },
      {
        "id": "Patient.identifier:archiveid",
        "path": "Patient.identifier",
        "sliceName": "archiveid"
      },
      {
        "id": "Patient.identifier:archiveid.type.coding",
        "path": "Patient.identifier.type.coding",
        "patternCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/v2-0203",
          "code": "PN",
          "display": "številka arhiva"
        }
      },
      {
        "id": "Patient.identifier:archiveid.system",
        "path": "Patient.identifier.system",
        "patternUri": "urn:*:archiveid",
        "example": [
          {
            "label": "onko",
            "valueUri": "urn:10481:archiveid"
          }
        ]
      },
      {
        "id": "Patient.identifier:popisnaid",
        "path": "Patient.identifier",
        "sliceName": "popisnaid"
      },
      {
        "id": "Patient.identifier:popisnaid.type.coding",
        "path": "Patient.identifier.type.coding",
        "patternCoding": {
          "system": "http://terminology.hl7.org/CodeSystem/v2-0203",
          "code": "MRT",
          "display": "popisna številka"
        }
      },
      {
        "id": "Patient.identifier:popisnaid.system",
        "path": "Patient.identifier.system",
        "patternUri": "urn:*:popisnaid"
      },
      {
        "id": "Patient.name",
        "path": "Patient.name",
        "max": "1"
      },
      {
        "id": "Patient.address.extension",
        "path": "Patient.address.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        },
        "min": 0
      },
      {
        "id": "Patient.address.extension:AddressUseFlag",
        "path": "Patient.address.extension",
        "sliceName": "AddressUseFlag",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://onko-i.si/demi/fhir/StructureDefinition/address-use-flag"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Patient.address.use",
        "path": "Patient.address.use",
        "code": [
          {
            "system": "http://hl7.org/fhir/address-use",
            "code": "home",
            "display": "Home"
          },
          {
            "system": "http://hl7.org/fhir/address-use",
            "code": "work",
            "display": "Work"
          },
          {
            "system": "http://hl7.org/fhir/address-use",
            "code": "temp",
            "display": "Temporary"
          },
          {
            "system": "http://hl7.org/fhir/address-use",
            "code": "billing",
            "display": "Billing"
          },
          {
            "system": "http://hl7.org/fhir/v3/AddressUse",
            "code": "pst",
            "display": "Postal address"
          },
          {
            "system": "http://hl7.org/fhir/v3/AddressUse",
            "code": "hv",
            "display": "Vacation home"
          },
          {
            "system": "urn:10681:addressUse",
            "code": "oth",
            "display": "Other"
          }
        ]
      }
    ]
  }
}