{
  "resourceType": "StructureDefinition",
  "id": "ServidGetPat-71a8e849-109d-4038-910f-a49c5c13058b",
  "url": "https://www.esante.lu/fhir-spec/StructureDefinition/ServidGetPat",
  "version": "0.1.0",
  "name": "ServidGetPat",
  "status": "draft",
  "fhirVersion": "5.0.0",
  "kind": "resource",
  "abstract": false,
  "type": "Patient",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Patient",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Patient",
        "path": "Patient",
        "short": "The patient"
      },
      {
        "id": "Patient.id",
        "path": "Patient.id",
        "max": "0"
      },
      {
        "id": "Patient.meta",
        "path": "Patient.meta",
        "min": 1
      },
      {
        "id": "Patient.meta.id",
        "path": "Patient.meta.id",
        "max": "0"
      },
      {
        "id": "Patient.meta.extension",
        "path": "Patient.meta.extension",
        "max": "0"
      },
      {
        "id": "Patient.meta.versionId",
        "path": "Patient.meta.versionId",
        "max": "0"
      },
      {
        "id": "Patient.meta.lastUpdated",
        "path": "Patient.meta.lastUpdated",
        "max": "0"
      },
      {
        "id": "Patient.meta.source",
        "path": "Patient.meta.source",
        "max": "0"
      },
      {
        "id": "Patient.meta.profile",
        "path": "Patient.meta.profile",
        "min": 1,
        "max": "1",
        "fixedCanonical": "https://www.esante.lu/fhir-spec/StructureDefinition/ServidGetPat"
      },
      {
        "id": "Patient.meta.security",
        "path": "Patient.meta.security",
        "short": "Only present if it's a test patient. Indicates that it is a test patient",
        "max": "1",
        "patternCoding": {
          "code": "HTEST",
          "system": "http://hl7.org/fhir/v3/ActReason"
        }
      },
      {
        "id": "Patient.meta.security.system",
        "path": "Patient.meta.security.system",
        "min": 1
      },
      {
        "id": "Patient.meta.security.version",
        "path": "Patient.meta.security.version",
        "max": "0"
      },
      {
        "id": "Patient.meta.security.code",
        "path": "Patient.meta.security.code",
        "min": 1
      },
      {
        "id": "Patient.meta.security.display",
        "path": "Patient.meta.security.display",
        "max": "0"
      },
      {
        "id": "Patient.meta.security.userSelected",
        "path": "Patient.meta.security.userSelected",
        "max": "0"
      },
      {
        "id": "Patient.meta.tag",
        "path": "Patient.meta.tag",
        "max": "0"
      },
      {
        "id": "Patient.implicitRules",
        "path": "Patient.implicitRules",
        "max": "0"
      },
      {
        "id": "Patient.language",
        "path": "Patient.language",
        "max": "0"
      },
      {
        "id": "Patient.text",
        "path": "Patient.text",
        "max": "0"
      },
      {
        "id": "Patient.contained",
        "path": "Patient.contained",
        "max": "0"
      },
      {
        "id": "Patient.extension",
        "path": "Patient.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "closed"
        },
        "max": "1"
      },
      {
        "id": "Patient.extension:simpleBirthLocation",
        "path": "Patient.extension",
        "sliceName": "simpleBirthLocation",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://www.esante.lu/fhir-spec/StructureDefinition/SimpleBirthLocation"
            ]
          }
        ]
      },
      {
        "id": "Patient.identifier",
        "path": "Patient.identifier",
        "short": "Different identifiers for this patient",
        "min": 1
      },
      {
        "id": "Patient.identifier.id",
        "path": "Patient.identifier.id",
        "max": "0"
      },
      {
        "id": "Patient.identifier.extension",
        "path": "Patient.identifier.extension",
        "max": "0"
      },
      {
        "id": "Patient.identifier.use",
        "path": "Patient.identifier.use",
        "short": "Only official or secondary are used",
        "min": 1,
        "condition": [
          "identifierUse"
        ],
        "constraint": [
          {
            "key": "identifierUse",
            "severity": "error",
            "human": "use is only official  or secondary",
            "expression": "$this = 'official' or $this='secondary'",
            "source": "https://www.esante.lu/fhir-spec/StructureDefinition/ServidGetPat"
          }
        ]
      },
      {
        "id": "Patient.identifier.type",
        "path": "Patient.identifier.type",
        "max": "0"
      },
      {
        "id": "Patient.identifier.system",
        "path": "Patient.identifier.system",
        "min": 1
      },
      {
        "id": "Patient.identifier.value",
        "path": "Patient.identifier.value",
        "min": 1
      },
      {
        "id": "Patient.identifier.period",
        "path": "Patient.identifier.period",
        "max": "0"
      },
      {
        "id": "Patient.identifier.assigner",
        "path": "Patient.identifier.assigner",
        "max": "0"
      },
      {
        "id": "Patient.active",
        "path": "Patient.active",
        "short": "True if it's an usable identity, false otherwise, meaning the identity could be deactivated or duplicated. Careful, a test patient may be active or not.",
        "min": 1
      },
      {
        "id": "Patient.name",
        "path": "Patient.name",
        "min": 1,
        "max": "2"
      },
      {
        "id": "Patient.name.id",
        "path": "Patient.name.id",
        "max": "0"
      },
      {
        "id": "Patient.name.extension",
        "path": "Patient.name.extension",
        "max": "0"
      },
      {
        "id": "Patient.name.use",
        "path": "Patient.name.use",
        "short": "Only official or usual are used",
        "min": 1,
        "condition": [
          "nameUseType"
        ],
        "constraint": [
          {
            "key": "nameUseType",
            "severity": "error",
            "human": "use is only official or usual",
            "expression": "$this = 'official' or $this='usual'",
            "source": "https://www.esante.lu/fhir-spec/StructureDefinition/ServidGetPat"
          }
        ]
      },
      {
        "id": "Patient.name.text",
        "path": "Patient.name.text",
        "max": "0"
      },
      {
        "id": "Patient.name.family",
        "path": "Patient.name.family",
        "definition": "Family name (often called 'Surname')"
      },
      {
        "id": "Patient.name.prefix",
        "path": "Patient.name.prefix",
        "max": "0"
      },
      {
        "id": "Patient.name.suffix",
        "path": "Patient.name.suffix",
        "max": "0"
      },
      {
        "id": "Patient.name.period",
        "path": "Patient.name.period",
        "max": "0"
      },
      {
        "id": "Patient.telecom",
        "path": "Patient.telecom",
        "max": "0"
      },
      {
        "id": "Patient.gender",
        "path": "Patient.gender",
        "short": "Only male, female or unknown are used",
        "min": 1,
        "condition": [
          "genderType"
        ],
        "constraint": [
          {
            "key": "genderType",
            "severity": "error",
            "human": "gender is only male, female or unknown",
            "expression": "$this = 'male' or $this='female' or $this='unknown'",
            "source": "https://www.esante.lu/fhir-spec/StructureDefinition/ServidGetPat"
          }
        ]
      },
      {
        "id": "Patient.birthDate",
        "path": "Patient.birthDate",
        "example": [
          {
            "label": "Example",
            "valueDate": "1929-11-30"
          }
        ]
      },
      {
        "id": "Patient.deceased[x]",
        "path": "Patient.deceased[x]",
        "short": "The death indicator or death time if known",
        "definition": "If the death time is known, the value will be of type deceasedDateTime. If not, the type will be deceasedBoolean",
        "min": 1
      },
      {
        "id": "Patient.address",
        "path": "Patient.address",
        "max": "2"
      },
      {
        "id": "Patient.address.use",
        "path": "Patient.address.use",
        "short": "Only home or temp are used",
        "min": 1,
        "condition": [
          "addressUse"
        ],
        "constraint": [
          {
            "key": "addressUse",
            "severity": "error",
            "human": "use is only home or temp",
            "expression": "$this = 'home' or $this='temp'",
            "source": "https://www.esante.lu/fhir-spec/StructureDefinition/ServidGetPat"
          }
        ]
      },
      {
        "id": "Patient.address.type",
        "path": "Patient.address.type",
        "max": "0"
      },
      {
        "id": "Patient.address.text",
        "path": "Patient.address.text",
        "max": "0"
      },
      {
        "id": "Patient.address.district",
        "path": "Patient.address.district",
        "max": "0"
      },
      {
        "id": "Patient.address.state",
        "path": "Patient.address.state",
        "max": "0"
      },
      {
        "id": "Patient.address.period",
        "path": "Patient.address.period",
        "max": "0"
      },
      {
        "id": "Patient.maritalStatus",
        "path": "Patient.maritalStatus",
        "max": "0"
      },
      {
        "id": "Patient.multipleBirth[x]",
        "path": "Patient.multipleBirth[x]",
        "max": "0"
      },
      {
        "id": "Patient.photo",
        "path": "Patient.photo",
        "max": "0"
      },
      {
        "id": "Patient.contact",
        "path": "Patient.contact",
        "max": "0"
      },
      {
        "id": "Patient.communication",
        "path": "Patient.communication",
        "max": "0"
      },
      {
        "id": "Patient.generalPractitioner",
        "path": "Patient.generalPractitioner",
        "max": "0"
      },
      {
        "id": "Patient.managingOrganization",
        "path": "Patient.managingOrganization",
        "short": "If present, indicates that this identity is confirmed, meaning provided by the RNPP. In this case, it has a field display with constant value RNPP"
      },
      {
        "id": "Patient.managingOrganization.reference",
        "path": "Patient.managingOrganization.reference",
        "max": "0"
      },
      {
        "id": "Patient.managingOrganization.type",
        "path": "Patient.managingOrganization.type",
        "max": "0"
      },
      {
        "id": "Patient.managingOrganization.identifier",
        "path": "Patient.managingOrganization.identifier",
        "max": "0"
      },
      {
        "id": "Patient.managingOrganization.display",
        "path": "Patient.managingOrganization.display",
        "min": 1,
        "fixedString": "RNPP"
      },
      {
        "id": "Patient.link",
        "path": "Patient.link",
        "short": "A link is present only if the patient is not active and is replaced by another one (duplicates)",
        "max": "1"
      },
      {
        "id": "Patient.link.other.reference",
        "path": "Patient.link.other.reference",
        "max": "0"
      },
      {
        "id": "Patient.link.other.type",
        "path": "Patient.link.other.type",
        "max": "0"
      },
      {
        "id": "Patient.link.other.identifier",
        "path": "Patient.link.other.identifier",
        "max": "0"
      },
      {
        "id": "Patient.link.other.display",
        "path": "Patient.link.other.display",
        "short": "The MPI identifier of the patient",
        "min": 1,
        "example": [
          {
            "label": "Example",
            "valueString": "urn:oid:1.3.182.2.2.2.0|2400123123"
          }
        ]
      },
      {
        "id": "Patient.link.type",
        "path": "Patient.link.type",
        "patternCode": "replaced-by"
      }
    ]
  }
}