{
  "resourceType": "StructureDefinition",
  "id": "ServidSearchPat-e3a83cac-0b85-42d9-9e28-9690b88328e0",
  "url": "https://www.esante.lu/fhir-spec/StructureDefinition/ServidSearchPat",
  "version": "0.1.0",
  "name": "ServidSearchPat",
  "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/ServidSearchPat"
      },
      {
        "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": "The patient identifier either in the MPI domain or in the caller domain, if it has one and it exists",
        "definition": "If the caller has a domain in the MPI, AND the patient has an identifier on this domain, then this identifier is returned. Otherwise, the identifier on the MPI domain is returned.",
        "min": 1,
        "max": "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",
        "max": "0"
      },
      {
        "id": "Patient.identifier.type",
        "path": "Patient.identifier.type",
        "max": "0"
      },
      {
        "id": "Patient.identifier.system",
        "path": "Patient.identifier.system",
        "short": "MPI identifier domain or caller's identifier domain",
        "min": 1
      },
      {
        "id": "Patient.identifier.value",
        "path": "Patient.identifier.value",
        "short": "MPI identifier or caller's identifier",
        "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",
        "max": "0"
      },
      {
        "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/ServidSearchPat"
          }
        ]
      },
      {
        "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/ServidSearchPat"
          }
        ]
      },
      {
        "id": "Patient.birthDate",
        "path": "Patient.birthDate",
        "example": [
          {
            "label": "Example",
            "valueDate": "1929-11-30"
          }
        ]
      },
      {
        "id": "Patient.deceased[x]",
        "path": "Patient.deceased[x]",
        "min": 1,
        "type": [
          {
            "code": "boolean"
          }
        ]
      },
      {
        "id": "Patient.address",
        "path": "Patient.address",
        "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",
        "max": "0"
      }
    ]
  }
}