{
  "resourceType": "StructureDefinition",
  "id": "sgrdv-base-find-patient",
  "url": "http://sante.quebec/fhir/StructureDefinition/sgrdv-base-find-patient",
  "name": "SGRDVBaseFindPatient",
  "title": "Patient pour la recherche de disponibilités (Base)",
  "status": "active",
  "experimental": true,
  "description": "Profil patient neutre utilisé dans les demandes de disponibilités. Inclut le sexe à la naissance (via extension dédiée) et la relation patient-médecin.",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Patient",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Patient",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Patient.contained",
        "path": "Patient.contained",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "$this"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Patient.contained:gpPractitionerRole",
        "path": "Patient.contained",
        "sliceName": "gpPractitionerRole",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "PractitionerRole",
            "profile": [
              "http://sante.quebec/fhir/StructureDefinition/sgrdv-base-find-practitioner-role"
            ]
          }
        ]
      },
      {
        "id": "Patient.contained:gpPractitioner",
        "path": "Patient.contained",
        "sliceName": "gpPractitioner",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Practitioner",
            "profile": [
              "http://sante.quebec/fhir/StructureDefinition/sgrdv-base-find-practitioner"
            ]
          }
        ]
      },
      {
        "id": "Patient.contained:gpOrganization",
        "path": "Patient.contained",
        "sliceName": "gpOrganization",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Organization",
            "profile": [
              "http://sante.quebec/fhir/StructureDefinition/sgrdv-base-find-organization"
            ]
          }
        ]
      },
      {
        "id": "Patient.extension",
        "path": "Patient.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "ordered": false,
          "rules": "open"
        },
        "min": 2
      },
      {
        "id": "Patient.extension:birthGender",
        "path": "Patient.extension",
        "sliceName": "birthGender",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://sante.quebec/fhir/StructureDefinition/sgrdv-patient-birth-gender"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.extension:birthGender.value[x]",
        "path": "Patient.extension.value[x]",
        "mustSupport": true
      },
      {
        "id": "Patient.extension:admisGap",
        "path": "Patient.extension",
        "sliceName": "admisGap",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://sante.quebec/fhir/StructureDefinition/sgrdv-patient-admis-gap"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Patient.extension:admisGap.value[x]",
        "path": "Patient.extension.value[x]",
        "mustSupport": true
      },
      {
        "id": "Patient.identifier",
        "path": "Patient.identifier",
        "mustSupport": true
      },
      {
        "id": "Patient.identifier.type",
        "path": "Patient.identifier.type",
        "mustSupport": true,
        "binding": {
          "strength": "extensible",
          "valueSet": "http://sante.quebec/fhir/ValueSet/sgrdv-identifier-type-vs"
        }
      },
      {
        "id": "Patient.identifier.system",
        "path": "Patient.identifier.system",
        "mustSupport": true
      },
      {
        "id": "Patient.identifier.value",
        "path": "Patient.identifier.value",
        "mustSupport": true
      },
      {
        "id": "Patient.name",
        "path": "Patient.name",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.name.family",
        "path": "Patient.name.family",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.name.given",
        "path": "Patient.name.given",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.telecom",
        "path": "Patient.telecom",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "rules": "open"
        },
        "mustSupport": true
      },
      {
        "id": "Patient.telecom:phone",
        "path": "Patient.telecom",
        "sliceName": "phone",
        "min": 0,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Patient.telecom:phone.system",
        "path": "Patient.telecom.system",
        "min": 1,
        "fixedCode": "phone"
      },
      {
        "id": "Patient.telecom:phone.value",
        "path": "Patient.telecom.value",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.telecom:email",
        "path": "Patient.telecom",
        "sliceName": "email",
        "min": 0,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Patient.telecom:email.system",
        "path": "Patient.telecom.system",
        "min": 1,
        "fixedCode": "email"
      },
      {
        "id": "Patient.telecom:email.value",
        "path": "Patient.telecom.value",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.birthDate",
        "path": "Patient.birthDate",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.contact",
        "path": "Patient.contact",
        "slicing": {
          "discriminator": [
            {
              "type": "pattern",
              "path": "relationship"
            }
          ],
          "rules": "open"
        },
        "max": "2",
        "mustSupport": true
      },
      {
        "id": "Patient.contact:father",
        "path": "Patient.contact",
        "sliceName": "father",
        "min": 0,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Patient.contact:father.relationship",
        "path": "Patient.contact.relationship",
        "min": 1,
        "patternCodeableConcept": {
          "coding": [
            {
              "code": "FTH",
              "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode"
            }
          ]
        }
      },
      {
        "id": "Patient.contact:father.name",
        "path": "Patient.contact.name",
        "mustSupport": true
      },
      {
        "id": "Patient.contact:father.name.family",
        "path": "Patient.contact.name.family",
        "mustSupport": true
      },
      {
        "id": "Patient.contact:father.name.given",
        "path": "Patient.contact.name.given",
        "mustSupport": true
      },
      {
        "id": "Patient.contact:mother",
        "path": "Patient.contact",
        "sliceName": "mother",
        "min": 0,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Patient.contact:mother.relationship",
        "path": "Patient.contact.relationship",
        "min": 1,
        "patternCodeableConcept": {
          "coding": [
            {
              "code": "MTH",
              "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode"
            }
          ]
        }
      },
      {
        "id": "Patient.contact:mother.name",
        "path": "Patient.contact.name",
        "mustSupport": true
      },
      {
        "id": "Patient.contact:mother.name.family",
        "path": "Patient.contact.name.family",
        "mustSupport": true
      },
      {
        "id": "Patient.contact:mother.name.given",
        "path": "Patient.contact.name.given",
        "mustSupport": true
      },
      {
        "id": "Patient.generalPractitioner",
        "path": "Patient.generalPractitioner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://sante.quebec/fhir/StructureDefinition/sgrdv-base-find-organization",
              "http://sante.quebec/fhir/StructureDefinition/sgrdv-base-find-practitioner-role"
            ]
          }
        ],
        "mustSupport": true
      }
    ]
  }
}