{
  "resourceType": "StructureDefinition",
  "id": "PatientMERT",
  "url": "https://intrahealth.com/fhir/mert/StructureDefinition/PatientMERT",
  "name": "PatientMERT",
  "title": "Patient (MERT)",
  "status": "draft",
  "description": "This profile describes the Patient for demographics and administrative information constraints for MERT.",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Patient",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Patient",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Patient",
        "path": "Patient"
      },
      {
        "id": "Patient.identifier",
        "path": "Patient.identifier",
        "mustSupport": true
      },
      {
        "id": "Patient.active",
        "path": "Patient.active",
        "definition": "Whether this patient record is in active use.",
        "min": 1,
        "mustSupport": true,
        "isModifierReason": "Status element that may indicate a record should not be treated as valid."
      },
      {
        "id": "Patient.name",
        "path": "Patient.name",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Patient.telecom",
        "path": "Patient.telecom",
        "mustSupport": true
      },
      {
        "id": "Patient.gender",
        "path": "Patient.gender",
        "comment": "gender is optional (0..1). If populated, values SHALL conform to AdministrativeGender. Free-text values are not permitted.",
        "mustSupport": true,
        "binding": {
          "strength": "required",
          "valueSet": "http://hl7.org/fhir/ValueSet/administrative-gender"
        }
      },
      {
        "id": "Patient.birthDate",
        "path": "Patient.birthDate",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Patient.deceased[x]",
        "path": "Patient.deceased[x]",
        "mustSupport": true
      },
      {
        "id": "Patient.address",
        "path": "Patient.address",
        "mustSupport": true
      },
      {
        "id": "Patient.communication",
        "path": "Patient.communication",
        "mustSupport": true
      },
      {
        "id": "Patient.communication.language",
        "path": "Patient.communication.language",
        "definition": "The language used to communicate with the patient. Senders SHOULD populate communication.language.coding with a BCP-47 language tag (coding.system = 'urn:ietf:bcp:47') where available.",
        "comment": "If no coding is available, the sender SHALL populate communication.language.text. Receivers MUST accept and persist coded or text-only language values.",
        "constraint": [
          {
            "key": "PatientCommunicationLanguageHasCodingOrText",
            "severity": "error",
            "human": "Each communication.language SHALL have either a coding entry or a text value.",
            "expression": "coding.exists() or text.exists()",
            "source": "https://intrahealth.com/fhir/mert/StructureDefinition/PatientMERT"
          }
        ],
        "binding": {
          "strength": "preferred",
          "valueSet": "http://hl7.org/fhir/ValueSet/common-languages",
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet",
              "valueCanonical": "http://hl7.org/fhir/ValueSet/all-languages"
            }
          ]
        }
      },
      {
        "id": "Patient.generalPractitioner",
        "path": "Patient.generalPractitioner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://intrahealth.com/fhir/mert/StructureDefinition/PractitionerMERT"
            ]
          }
        ],
        "mustSupport": true
      }
    ]
  }
}