{
  "resourceType": "StructureDefinition",
  "url": "http://dips.no/fhir/structuredefintion/R4/DIPSPerson",
  "name": "DIPSPerson",
  "status": "draft",
  "fhirVersion": "4.0.0",
  "kind": "resource",
  "abstract": false,
  "type": "Person",
  "baseDefinition": "http://hl7.no/fhir/StructureDefinition/no-basis-Person",
  "derivation": "constraint",
  "snapshot": {},
  "differential": {
    "element": [
      {
        "id": "Person",
        "path": "Person",
        "comment": "The Person resource does justice to person registries that keep track of persons regardless of their role. The Person resource is also a primary resource to point to for people acting in a particular role such as SubjectofCare, Practitioner, and Agent. Very few attributes are specific to any role and so Person is kept lean. Most attributes are expected to be tied to the role the Person plays rather than the Person himself. Examples of that are Guardian (SubjectofCare), ContactParty (SubjectOfCare, Practitioner), and multipleBirthInd (SubjectofCare).\r\n\r\ndatabase column - - dipscoredb.dwperson.personid"
      },
      {
        "id": "Person.meta.lastUpdated",
        "path": "Person.meta.lastUpdated",
        "definition": "When the resource last changed - e.g. when the version changed.\r\ndatabase column - - dipscoredb.dwperson.SISTENDRETTID"
      },
      {
        "id": "Person.extension",
        "path": "Person.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Person.extension:language",
        "path": "Person.extension",
        "sliceName": "language",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://dips.no/fhir/StructureDefinition/R4/DIPSPersonLanguage"
            ]
          }
        ]
      },
      {
        "id": "Person.extension:language.value[x].system",
        "path": "Person.extension.value[x].system",
        "fixedUri": "urn: oid:2.16.578.1.12.4.1.1.3402"
      },
      {
        "id": "Person.extension:deathRegisteredTime",
        "path": "Person.extension",
        "sliceName": "deathRegisteredTime",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://dips.no/fhir/StructureDefinition/R4/DIPSPersonDeathRegisteredTime"
            ]
          }
        ]
      },
      {
        "id": "Person.extension:hospitalSectorName",
        "path": "Person.extension",
        "sliceName": "hospitalSectorName",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://dips.no/fhir/StructureDefinition/R4/DIPSPersonHospitalSectorName"
            ]
          }
        ]
      },
      {
        "id": "Person.extension:hospitalSectorId",
        "path": "Person.extension",
        "sliceName": "hospitalSectorId",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://dips.no/fhir/StructureDefinition/R4/DIPSPersonHospitalSectorId"
            ]
          }
        ]
      },
      {
        "id": "Person.extension:deathRegisteredBy",
        "path": "Person.extension",
        "sliceName": "deathRegisteredBy",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://dips.no/fhir/StructureDefinition/R4/DIPSPersonDeathRegisteredBy"
            ]
          }
        ]
      },
      {
        "id": "Person.extension:deathComment",
        "path": "Person.extension",
        "sliceName": "deathComment",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://dips.no/fhir/StructureDefinition/R4/DIPSPersonDeathComment"
            ]
          }
        ]
      },
      {
        "id": "Person.identifier.use",
        "path": "Person.identifier.use",
        "max": "0"
      },
      {
        "id": "Person.identifier.type",
        "path": "Person.identifier.type",
        "max": "0"
      },
      {
        "id": "Person.identifier.value",
        "path": "Person.identifier.value",
        "definition": "The Norwegian Fødselsnummer\r\n\r\ndatabase column - - dipscoredb.dwperson.Foedselsnr"
      },
      {
        "id": "Person.identifier.period",
        "path": "Person.identifier.period",
        "max": "0"
      },
      {
        "id": "Person.identifier.assigner",
        "path": "Person.identifier.assigner",
        "max": "0"
      },
      {
        "id": "Person.identifier.use",
        "path": "Person.identifier.use",
        "min": 0,
        "max": "0"
      },
      {
        "id": "Person.identifier.type",
        "path": "Person.identifier.type",
        "min": 0,
        "max": "0"
      },
      {
        "id": "Person.identifier.period",
        "path": "Person.identifier.period",
        "min": 0,
        "max": "0"
      },
      {
        "id": "Person.identifier:PersonID",
        "path": "Person.identifier",
        "sliceName": "PersonID",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Person.identifier:PersonID.use",
        "path": "Person.identifier.use",
        "max": "0"
      },
      {
        "id": "Person.identifier:PersonID.type",
        "path": "Person.identifier.type",
        "max": "0"
      },
      {
        "id": "Person.identifier:PersonID.system",
        "path": "Person.identifier.system",
        "min": 1,
        "fixedUri": "http://dips.no/fhir/namingsystem/dips-personid"
      },
      {
        "id": "Person.identifier:PersonID.value",
        "path": "Person.identifier.value",
        "definition": "The portion of the identifier typically relevant to the user and which is unique within the context of the system.\r\n\r\ndatabase column - - dipscoredb.dwperson.personid",
        "min": 1
      },
      {
        "id": "Person.identifier:PersonID.period",
        "path": "Person.identifier.period",
        "max": "0"
      },
      {
        "id": "Person.identifier:PersonID.assigner",
        "path": "Person.identifier.assigner",
        "max": "0"
      },
      {
        "id": "Person.name.id",
        "path": "Person.name.id",
        "max": "0"
      },
      {
        "id": "Person.name.use",
        "path": "Person.name.use",
        "max": "0"
      },
      {
        "id": "Person.name.family",
        "path": "Person.name.family",
        "definition": "Ref. \"lov om personnavn\" for further details about Norwegian HumanNames.\r\n\r\nThe part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father.\r\n\r\ndatabase column - - dipscoredb.dwperson.Etternavn"
      },
      {
        "id": "Person.name.given",
        "path": "Person.name.given",
        "definition": "Given name. In Norway Given name does not include middlenames according to the regulation for norwegian names. Multiple given names are however legal. Ref. \"Lov om personnavn\" for further details about Norwegian HumanNames.\r\n\r\n\r\ndatabase column - - dipscoredb.dwperson.fornavn"
      },
      {
        "id": "Person.name.prefix",
        "path": "Person.name.prefix",
        "max": "0"
      },
      {
        "id": "Person.name.suffix",
        "path": "Person.name.suffix",
        "max": "0"
      },
      {
        "id": "Person.name.period",
        "path": "Person.name.period",
        "max": "0"
      },
      {
        "id": "Person.gender",
        "path": "Person.gender",
        "definition": "Administrative Gender.\r\n\r\nderive from database column - - dipscoredb.dwperson.Foedselsnr"
      },
      {
        "id": "Person.birthDate",
        "path": "Person.birthDate",
        "definition": "The birth date for the person.\r\n\r\ndatabase column - - dipscoredb.dwperson.Foedselsdato"
      },
      {
        "id": "Person.address.id",
        "path": "Person.address.id",
        "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.\r\n\r\n\r\ndatabase column -- dipscoredb.dwadresse.adresseid"
      },
      {
        "id": "Person.address.extension",
        "path": "Person.address.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Person.address.extension:stateName",
        "path": "Person.address.extension",
        "sliceName": "stateName",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://dips.no/fhir/StructureDefinition/R4/DIPSPersonStateName"
            ]
          }
        ]
      },
      {
        "id": "Person.address.extension:stateName.value[x].system",
        "path": "Person.address.extension.value[x].system"
      },
      {
        "id": "Person.address.extension:stateName.value[x].version",
        "path": "Person.address.extension.value[x].version",
        "max": "0"
      },
      {
        "id": "Person.address.extension:stateName.value[x].userSelected",
        "path": "Person.address.extension.value[x].userSelected",
        "max": "0"
      },
      {
        "id": "Person.address.extension:urbanDistrict.value[x].system",
        "path": "Person.address.extension.value[x].system",
        "fixedUri": "http://dips.no/fhir/namingsystem/dips-urbandistrict"
      },
      {
        "id": "Person.address.extension:urbanDistrict.value[x].version",
        "path": "Person.address.extension.value[x].version",
        "max": "0"
      },
      {
        "id": "Person.address.extension:urbanDistrict.value[x].userSelected",
        "path": "Person.address.extension.value[x].userSelected",
        "max": "0"
      },
      {
        "id": "Person.address.use",
        "path": "Person.address.use",
        "definition": "The purpose of this address.\r\n\r\nMapping of values to other Norwegian CodeSystems is documented in the implementation guide. In general the address used for visiting the person should have use \"home\" and type \"physical\" or \"both\". The \"official\" flag can be either true or false.\r\n\r\nderive from database column -- dipscoredb.dwadresse.dipscadresse and dipscoredb.dwkodeverkverdier.Kode"
      },
      {
        "id": "Person.address.line",
        "path": "Person.address.line",
        "definition": "This component contains the house number, apartment number, street name, street direction,  P.O. Box number, delivery hints, and similar address information.\r\n\r\n\r\ndatabase column --  dipscoredb.dwadresse.dipscadresse"
      },
      {
        "id": "Person.address.city",
        "path": "Person.address.city",
        "definition": "When a postalcode is given the name of the city must be according to the official list of postalcodes used in Norway.\r\n\r\nThe name of the city, town, village or other community or delivery center.\r\n\r\n\r\ndatabase column -- dipscoredb.dwkodeverkverdier.langtnavn"
      },
      {
        "id": "Person.address.district",
        "path": "Person.address.district",
        "definition": "Name of the county (norwegian \"kommune\"). If kommune number is required \"eiendomsinformasjon\" should be used.\r\n\r\nThe name of the administrative area (county).\r\n\r\n\r\n\r\ndatabase column -- dipscoredb.dwkodeverkverdier.langtnavn"
      },
      {
        "id": "Person.address.district.extension",
        "path": "Person.address.district.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Person.address.district.extension:muniplaity",
        "path": "Person.address.district.extension",
        "sliceName": "muniplaity",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://dips.no/fhir/StructureDefinition/R4/DIPSPersonMunicipality"
            ]
          }
        ]
      },
      {
        "id": "Person.address.district.extension:muniplaity.value[x].system",
        "path": "Person.address.district.extension.value[x].system",
        "fixedUri": "urn:oid:2.16.578.1.12.4.1.1.3402"
      },
      {
        "id": "Person.address.district.extension:muniplaity.value[x].version",
        "path": "Person.address.district.extension.value[x].version",
        "max": "0"
      },
      {
        "id": "Person.address.district.extension:muniplaity.value[x].userSelected",
        "path": "Person.address.district.extension.value[x].userSelected",
        "max": "0"
      },
      {
        "id": "Person.address.state",
        "path": "Person.address.state",
        "definition": "Name of the norwegian \"fylke\"). If fylkes-number is required \"eiendomsinformasjon\" should be used with koded kommune-number.\r\n\r\nSub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes).\r\n\r\n\r\ndatabase column -- dipscoredb.dwkodeverkverdier.kode"
      },
      {
        "id": "Person.address.postalCode",
        "path": "Person.address.postalCode",
        "definition": "A postal code designating a region defined by the postal service.\r\n\r\nIn Norway this is af four digit number defined by the norwegian postal service.\r\n\r\ndatabase column -- dipscoredb.dwkodeverkverdier.Kode"
      },
      {
        "id": "Person.address.country",
        "path": "Person.address.country",
        "definition": "Country - a nation as commonly understood or generally accepted.\r\n\r\ndatabase column -- dipscoredb.dwkodeverkverdier.langtnavn"
      },
      {
        "id": "Person.address.period.start",
        "path": "Person.address.period.start",
        "definition": "The start of the period. The boundary is inclusive.\r\n\r\n\r\ndatabase column -- dipscoredb.dwadresse.Gyldigfradato"
      },
      {
        "id": "Person.photo",
        "path": "Person.photo",
        "max": "0"
      },
      {
        "id": "Person.managingOrganization",
        "path": "Person.managingOrganization",
        "max": "0"
      },
      {
        "id": "Person.link",
        "path": "Person.link",
        "min": 1,
        "max": "1"
      }
    ]
  }
}