diff --git a/static/media/clinical/patient/manage-patient-identifiers-1.png b/static/media/clinical/patient/manage-patient-identifiers-1.png
new file mode 100644
index 00000000..3ae04a3e
Binary files /dev/null and b/static/media/clinical/patient/manage-patient-identifiers-1.png differ
diff --git a/static/media/clinical/patient/manage-patient-identifiers-2.png b/static/media/clinical/patient/manage-patient-identifiers-2.png
new file mode 100644
index 00000000..a0447f3a
Binary files /dev/null and b/static/media/clinical/patient/manage-patient-identifiers-2.png differ
diff --git a/static/media/clinical/patient/manage-patient-identifiers-3.png b/static/media/clinical/patient/manage-patient-identifiers-3.png
new file mode 100644
index 00000000..02c44e8e
Binary files /dev/null and b/static/media/clinical/patient/manage-patient-identifiers-3.png differ
diff --git a/static/media/clinical/patient/manage-patient-tags-1.png b/static/media/clinical/patient/manage-patient-tags-1.png
new file mode 100644
index 00000000..3c6caa1b
Binary files /dev/null and b/static/media/clinical/patient/manage-patient-tags-1.png differ
diff --git a/static/media/clinical/patient/manage-patient-tags-2.png b/static/media/clinical/patient/manage-patient-tags-2.png
new file mode 100644
index 00000000..d88692e5
Binary files /dev/null and b/static/media/clinical/patient/manage-patient-tags-2.png differ
diff --git a/static/media/clinical/patient/manage-patient-tags-3.png b/static/media/clinical/patient/manage-patient-tags-3.png
new file mode 100644
index 00000000..4aeac0ee
Binary files /dev/null and b/static/media/clinical/patient/manage-patient-tags-3.png differ
diff --git a/static/media/clinical/patient/manage-patient-tags-4.png b/static/media/clinical/patient/manage-patient-tags-4.png
new file mode 100644
index 00000000..9f5e1544
Binary files /dev/null and b/static/media/clinical/patient/manage-patient-tags-4.png differ
diff --git a/static/media/clinical/patient/manage-patient-tags-5.png b/static/media/clinical/patient/manage-patient-tags-5.png
new file mode 100644
index 00000000..04553c0e
Binary files /dev/null and b/static/media/clinical/patient/manage-patient-tags-5.png differ
diff --git a/static/media/clinical/patient/manage-patient-tags-6.png b/static/media/clinical/patient/manage-patient-tags-6.png
new file mode 100644
index 00000000..59efb93d
Binary files /dev/null and b/static/media/clinical/patient/manage-patient-tags-6.png differ
diff --git a/static/media/clinical/patient/manage-patient-users-1.png b/static/media/clinical/patient/manage-patient-users-1.png
new file mode 100644
index 00000000..d70c017b
Binary files /dev/null and b/static/media/clinical/patient/manage-patient-users-1.png differ
diff --git a/static/media/clinical/patient/manage-patient-users-2.png b/static/media/clinical/patient/manage-patient-users-2.png
new file mode 100644
index 00000000..b157232d
Binary files /dev/null and b/static/media/clinical/patient/manage-patient-users-2.png differ
diff --git a/static/media/clinical/patient/manage-patient-users-3.png b/static/media/clinical/patient/manage-patient-users-3.png
new file mode 100644
index 00000000..af091d7f
Binary files /dev/null and b/static/media/clinical/patient/manage-patient-users-3.png differ
diff --git a/static/media/clinical/patient/manage-patient-users-4.png b/static/media/clinical/patient/manage-patient-users-4.png
new file mode 100644
index 00000000..3723e54e
Binary files /dev/null and b/static/media/clinical/patient/manage-patient-users-4.png differ
diff --git a/static/media/clinical/patient/manage-patient-users-5.png b/static/media/clinical/patient/manage-patient-users-5.png
new file mode 100644
index 00000000..39ca504c
Binary files /dev/null and b/static/media/clinical/patient/manage-patient-users-5.png differ
diff --git a/static/media/clinical/patient/manage-patient-users-6.png b/static/media/clinical/patient/manage-patient-users-6.png
new file mode 100644
index 00000000..50fa6255
Binary files /dev/null and b/static/media/clinical/patient/manage-patient-users-6.png differ
diff --git a/static/media/clinical/patient/mark-patient-deceased-1.png b/static/media/clinical/patient/mark-patient-deceased-1.png
new file mode 100644
index 00000000..ad95a3c3
Binary files /dev/null and b/static/media/clinical/patient/mark-patient-deceased-1.png differ
diff --git a/static/media/clinical/patient/mark-patient-deceased-2.png b/static/media/clinical/patient/mark-patient-deceased-2.png
new file mode 100644
index 00000000..87413343
Binary files /dev/null and b/static/media/clinical/patient/mark-patient-deceased-2.png differ
diff --git a/static/media/clinical/patient/mark-patient-deceased-3.png b/static/media/clinical/patient/mark-patient-deceased-3.png
new file mode 100644
index 00000000..65f3205e
Binary files /dev/null and b/static/media/clinical/patient/mark-patient-deceased-3.png differ
diff --git a/static/media/clinical/patient/mark-patient-deceased-4.png b/static/media/clinical/patient/mark-patient-deceased-4.png
new file mode 100644
index 00000000..a9f2f595
Binary files /dev/null and b/static/media/clinical/patient/mark-patient-deceased-4.png differ
diff --git a/static/media/clinical/patient/mark-patient-deceased-5.png b/static/media/clinical/patient/mark-patient-deceased-5.png
new file mode 100644
index 00000000..2683986b
Binary files /dev/null and b/static/media/clinical/patient/mark-patient-deceased-5.png differ
diff --git a/static/media/clinical/patient/mark-patient-deceased-6.png b/static/media/clinical/patient/mark-patient-deceased-6.png
new file mode 100644
index 00000000..1d86daeb
Binary files /dev/null and b/static/media/clinical/patient/mark-patient-deceased-6.png differ
diff --git a/static/media/clinical/patient/open-patient-home-1.png b/static/media/clinical/patient/open-patient-home-1.png
new file mode 100644
index 00000000..2aa10eb3
Binary files /dev/null and b/static/media/clinical/patient/open-patient-home-1.png differ
diff --git a/static/media/clinical/patient/open-patient-home-2.png b/static/media/clinical/patient/open-patient-home-2.png
new file mode 100644
index 00000000..c34dbbd5
Binary files /dev/null and b/static/media/clinical/patient/open-patient-home-2.png differ
diff --git a/static/media/clinical/patient/open-patient-home-3.png b/static/media/clinical/patient/open-patient-home-3.png
new file mode 100644
index 00000000..8358fbd0
Binary files /dev/null and b/static/media/clinical/patient/open-patient-home-3.png differ
diff --git a/static/media/clinical/patient/open-patient-home-4.png b/static/media/clinical/patient/open-patient-home-4.png
new file mode 100644
index 00000000..3701655d
Binary files /dev/null and b/static/media/clinical/patient/open-patient-home-4.png differ
diff --git a/static/media/clinical/patient/open-patient-home-5.png b/static/media/clinical/patient/open-patient-home-5.png
new file mode 100644
index 00000000..3af75b30
Binary files /dev/null and b/static/media/clinical/patient/open-patient-home-5.png differ
diff --git a/static/media/clinical/patient/open-patient-home-6.png b/static/media/clinical/patient/open-patient-home-6.png
new file mode 100644
index 00000000..4b31aca8
Binary files /dev/null and b/static/media/clinical/patient/open-patient-home-6.png differ
diff --git a/static/media/clinical/patient/open-patient-home-7.png b/static/media/clinical/patient/open-patient-home-7.png
new file mode 100644
index 00000000..f88c5f1a
Binary files /dev/null and b/static/media/clinical/patient/open-patient-home-7.png differ
diff --git a/static/media/clinical/patient/register-patient-1.png b/static/media/clinical/patient/register-patient-1.png
new file mode 100644
index 00000000..0beac726
Binary files /dev/null and b/static/media/clinical/patient/register-patient-1.png differ
diff --git a/static/media/clinical/patient/register-patient-2.png b/static/media/clinical/patient/register-patient-2.png
new file mode 100644
index 00000000..ac7d98ba
Binary files /dev/null and b/static/media/clinical/patient/register-patient-2.png differ
diff --git a/static/media/clinical/patient/register-patient-3.png b/static/media/clinical/patient/register-patient-3.png
new file mode 100644
index 00000000..830daa5f
Binary files /dev/null and b/static/media/clinical/patient/register-patient-3.png differ
diff --git a/static/media/clinical/patient/register-patient-4.png b/static/media/clinical/patient/register-patient-4.png
new file mode 100644
index 00000000..8b9d2ef9
Binary files /dev/null and b/static/media/clinical/patient/register-patient-4.png differ
diff --git a/static/media/clinical/patient/register-patient-5.png b/static/media/clinical/patient/register-patient-5.png
new file mode 100644
index 00000000..5f0e2930
Binary files /dev/null and b/static/media/clinical/patient/register-patient-5.png differ
diff --git a/static/media/clinical/patient/search-patient-1.png b/static/media/clinical/patient/search-patient-1.png
new file mode 100644
index 00000000..10878a00
Binary files /dev/null and b/static/media/clinical/patient/search-patient-1.png differ
diff --git a/static/media/clinical/patient/search-patient-2.png b/static/media/clinical/patient/search-patient-2.png
new file mode 100644
index 00000000..a0f9c7d9
Binary files /dev/null and b/static/media/clinical/patient/search-patient-2.png differ
diff --git a/static/media/clinical/patient/search-patient-3.png b/static/media/clinical/patient/search-patient-3.png
new file mode 100644
index 00000000..45f1393e
Binary files /dev/null and b/static/media/clinical/patient/search-patient-3.png differ
diff --git a/static/media/clinical/patient/search-patient-4.png b/static/media/clinical/patient/search-patient-4.png
new file mode 100644
index 00000000..289642cb
Binary files /dev/null and b/static/media/clinical/patient/search-patient-4.png differ
diff --git a/static/media/clinical/patient/search-patient-5.png b/static/media/clinical/patient/search-patient-5.png
new file mode 100644
index 00000000..f22e9922
Binary files /dev/null and b/static/media/clinical/patient/search-patient-5.png differ
diff --git a/static/media/clinical/patient/update-patient-details-1.png b/static/media/clinical/patient/update-patient-details-1.png
new file mode 100644
index 00000000..aa922604
Binary files /dev/null and b/static/media/clinical/patient/update-patient-details-1.png differ
diff --git a/static/media/clinical/patient/update-patient-details-2.png b/static/media/clinical/patient/update-patient-details-2.png
new file mode 100644
index 00000000..a862913b
Binary files /dev/null and b/static/media/clinical/patient/update-patient-details-2.png differ
diff --git a/static/media/clinical/patient/update-patient-details-3.png b/static/media/clinical/patient/update-patient-details-3.png
new file mode 100644
index 00000000..9141378d
Binary files /dev/null and b/static/media/clinical/patient/update-patient-details-3.png differ
diff --git a/static/media/clinical/patient/update-patient-details-4.png b/static/media/clinical/patient/update-patient-details-4.png
new file mode 100644
index 00000000..25de1198
Binary files /dev/null and b/static/media/clinical/patient/update-patient-details-4.png differ
diff --git a/static/media/clinical/patient/update-patient-details-5.png b/static/media/clinical/patient/update-patient-details-5.png
new file mode 100644
index 00000000..4d113669
Binary files /dev/null and b/static/media/clinical/patient/update-patient-details-5.png differ
diff --git a/static/media/clinical/patient/view-organization-patients-1.png b/static/media/clinical/patient/view-organization-patients-1.png
new file mode 100644
index 00000000..91f74830
Binary files /dev/null and b/static/media/clinical/patient/view-organization-patients-1.png differ
diff --git a/static/media/clinical/patient/view-organization-patients-2.png b/static/media/clinical/patient/view-organization-patients-2.png
new file mode 100644
index 00000000..d7e969cb
Binary files /dev/null and b/static/media/clinical/patient/view-organization-patients-2.png differ
diff --git a/static/media/clinical/patient/view-organization-patients-3.png b/static/media/clinical/patient/view-organization-patients-3.png
new file mode 100644
index 00000000..550f8dd2
Binary files /dev/null and b/static/media/clinical/patient/view-organization-patients-3.png differ
diff --git a/static/media/clinical/patient/view-organization-patients-4.png b/static/media/clinical/patient/view-organization-patients-4.png
new file mode 100644
index 00000000..cd462de2
Binary files /dev/null and b/static/media/clinical/patient/view-organization-patients-4.png differ
diff --git a/static/media/clinical/patient/view-patient-appointments-1.png b/static/media/clinical/patient/view-patient-appointments-1.png
new file mode 100644
index 00000000..5301326c
Binary files /dev/null and b/static/media/clinical/patient/view-patient-appointments-1.png differ
diff --git a/static/media/clinical/patient/view-patient-appointments-2.png b/static/media/clinical/patient/view-patient-appointments-2.png
new file mode 100644
index 00000000..b2655aa0
Binary files /dev/null and b/static/media/clinical/patient/view-patient-appointments-2.png differ
diff --git a/static/media/clinical/patient/view-patient-appointments-3.png b/static/media/clinical/patient/view-patient-appointments-3.png
new file mode 100644
index 00000000..980759fe
Binary files /dev/null and b/static/media/clinical/patient/view-patient-appointments-3.png differ
diff --git a/static/media/clinical/patient/view-patient-appointments-4.png b/static/media/clinical/patient/view-patient-appointments-4.png
new file mode 100644
index 00000000..ffc0815c
Binary files /dev/null and b/static/media/clinical/patient/view-patient-appointments-4.png differ
diff --git a/static/media/clinical/patient/view-patient-profile-1.png b/static/media/clinical/patient/view-patient-profile-1.png
new file mode 100644
index 00000000..104a65a4
Binary files /dev/null and b/static/media/clinical/patient/view-patient-profile-1.png differ
diff --git a/static/media/clinical/patient/view-patient-profile-10.png b/static/media/clinical/patient/view-patient-profile-10.png
new file mode 100644
index 00000000..7ae33695
Binary files /dev/null and b/static/media/clinical/patient/view-patient-profile-10.png differ
diff --git a/static/media/clinical/patient/view-patient-profile-11.png b/static/media/clinical/patient/view-patient-profile-11.png
new file mode 100644
index 00000000..0802f0d4
Binary files /dev/null and b/static/media/clinical/patient/view-patient-profile-11.png differ
diff --git a/static/media/clinical/patient/view-patient-profile-12.png b/static/media/clinical/patient/view-patient-profile-12.png
new file mode 100644
index 00000000..abd96aa6
Binary files /dev/null and b/static/media/clinical/patient/view-patient-profile-12.png differ
diff --git a/static/media/clinical/patient/view-patient-profile-13.png b/static/media/clinical/patient/view-patient-profile-13.png
new file mode 100644
index 00000000..dd079471
Binary files /dev/null and b/static/media/clinical/patient/view-patient-profile-13.png differ
diff --git a/static/media/clinical/patient/view-patient-profile-14.png b/static/media/clinical/patient/view-patient-profile-14.png
new file mode 100644
index 00000000..2ac2eab0
Binary files /dev/null and b/static/media/clinical/patient/view-patient-profile-14.png differ
diff --git a/static/media/clinical/patient/view-patient-profile-15.png b/static/media/clinical/patient/view-patient-profile-15.png
new file mode 100644
index 00000000..cf06cfa4
Binary files /dev/null and b/static/media/clinical/patient/view-patient-profile-15.png differ
diff --git a/static/media/clinical/patient/view-patient-profile-2.png b/static/media/clinical/patient/view-patient-profile-2.png
new file mode 100644
index 00000000..ea2f1331
Binary files /dev/null and b/static/media/clinical/patient/view-patient-profile-2.png differ
diff --git a/static/media/clinical/patient/view-patient-profile-3.png b/static/media/clinical/patient/view-patient-profile-3.png
new file mode 100644
index 00000000..e55d2de6
Binary files /dev/null and b/static/media/clinical/patient/view-patient-profile-3.png differ
diff --git a/static/media/clinical/patient/view-patient-profile-4.png b/static/media/clinical/patient/view-patient-profile-4.png
new file mode 100644
index 00000000..4c3dd6ab
Binary files /dev/null and b/static/media/clinical/patient/view-patient-profile-4.png differ
diff --git a/static/media/clinical/patient/view-patient-profile-5.png b/static/media/clinical/patient/view-patient-profile-5.png
new file mode 100644
index 00000000..3a3e2832
Binary files /dev/null and b/static/media/clinical/patient/view-patient-profile-5.png differ
diff --git a/static/media/clinical/patient/view-patient-profile-6.png b/static/media/clinical/patient/view-patient-profile-6.png
new file mode 100644
index 00000000..378ba0cb
Binary files /dev/null and b/static/media/clinical/patient/view-patient-profile-6.png differ
diff --git a/static/media/clinical/patient/view-patient-profile-7.png b/static/media/clinical/patient/view-patient-profile-7.png
new file mode 100644
index 00000000..1f84eddf
Binary files /dev/null and b/static/media/clinical/patient/view-patient-profile-7.png differ
diff --git a/static/media/clinical/patient/view-patient-profile-8.png b/static/media/clinical/patient/view-patient-profile-8.png
new file mode 100644
index 00000000..d3f0fc57
Binary files /dev/null and b/static/media/clinical/patient/view-patient-profile-8.png differ
diff --git a/static/media/clinical/patient/view-patient-profile-9.png b/static/media/clinical/patient/view-patient-profile-9.png
new file mode 100644
index 00000000..567d669a
Binary files /dev/null and b/static/media/clinical/patient/view-patient-profile-9.png differ
diff --git a/versioned_docs/version-3.1/concepts/clinical/patient.mdx b/versioned_docs/version-3.1/concepts/clinical/patient.mdx
index 9817d3b7..835a009e 100644
--- a/versioned_docs/version-3.1/concepts/clinical/patient.mdx
+++ b/versioned_docs/version-3.1/concepts/clinical/patient.mdx
@@ -6,107 +6,193 @@ sidebar_position: 1
## Definition
-A **[Patient](https://build.fhir.org/patient.html)** in Care is a person who receives care
-through your facility or program. The patient record holds the demographic and contact
-details of that person. Care ties every encounter, condition, note, appointment, and
-clinical record to a patient record.
+A **[patient](https://build.fhir.org/patient.html)** in Care is a person who is registered to receive care. Care keeps the person's details and contact information in one place, and links the person's encounters, appointments, notes, files and clinical history to them.
+
+A patient is not the same as an encounter. One patient can have many encounters and appointments, at different facilities, and they all belong to the same patient.
## Key Attributes
| Components | What it captures |
| --- | --- |
-| Name | The full name of the person. Care stores the name as a single free-text entry. |
-| Gender | The gender of the person: Male, Female, Non-binary, or Transgender. |
-| Phone Number | The primary contact number of the person. |
-| Emergency Phone Number | The number to call in an emergency. |
-| Date of Birth | The date the person was born. |
-| Age | The age of the person in years. Care converts the age to a year of birth. |
-| Address | The current address of the person, as free text. |
-| Permanent Address | The permanent address of the person. You can mark it the same as the current address. |
-| PIN Code | The postal code of the address. |
-| Blood Group | The blood group of the person. Staff collect this value at registration. |
-| Geo Organization | The government administrative area that the person belongs to. |
-| Patient Identifiers | The identifiers that your deployment configures, for example a national ID or a facility ID. |
-| Patient Tags | The labels that administrators attach to the patient record. |
-| Deceased Status | Whether the person is deceased, with the date and time of death. |
-| Volunteer Contact | The users that a facility assigns to the patient for field support. |
+| Name | The patient's full name, in one field. It is required. The profile shows it as **Full Name**. |
+| Phone Number | The patient's main phone number. It is required. Patient Home, the facility page for one patient, uses it to find the patient. You can search for a patient by it only if your deployment keeps the phone number as an identifier, which is off by default. If you register a phone number that another patient already has, Care shows **Patient Records Found** with the patients who have it. |
+| Emergency Phone Number | A number to call in an emergency. If you do not give a different number, Care saves the phone number as the emergency number. The profile shows it as **Emergency Contact**. |
+| Sex | **Male**, **Female**, **Transgender** or **Non-binary**. It is required. |
+| Date of birth or year of birth | The exact date of birth, or only a year of birth when you enter an age. See "Date of birth and year of birth" below. |
+| Blood Group | Optional. Unknown, A+, A-, B+, B-, AB+, AB-, O+ or O-. |
+| Address | The patient's current address, as free text. The profile shows it as **Current Address and Route to Home**. |
+| Permanent Address | The patient's permanent address. If you do not give a different one, Care saves the address as the permanent address. |
+| PIN Code | Optional. It has 6 digits. |
+| Geo organization | The government organization that the patient belongs to. It is required. See "Geo organization" below. |
+| Identifiers | IDs that your deployment sets up for patients. See "Identifiers" below. |
+| Tags | Tags applied to the patient. See "Tags" below. |
+| Assigned users | Users who have a role on this one patient. See "Assigned users" below. |
+| Deceased status | Whether the patient has died, with the date and time of death. See "Deceased" below. |
+| Additional fields | Extra fields that your deployment adds to patients. The profile shows them under **Additional Details**. |
+
+### Date of birth and year of birth
+
+On the registration form, **Date of Birth/Age** has two tabs: **Date** for the exact date of birth, and **Age** for an age in years.
+
+Care does not keep the age. When you enter an age, Care saves a year of birth, which is the current year minus the age, and clears any date of birth. When you enter a date of birth, Care sets the year of birth from that date.
+
+The profile shows **Date of Birth** with the age, or **Year of Birth** when the patient has no date of birth.
+
+The year of birth matters even when you know the date of birth. Patient Home opens a patient only when the phone number and the year of birth match that patient.
+
+### Geo organization
+
+Each patient belongs to one government organization, the patient's geo organization. On the registration form, you choose it one level at a time, from the top level down. By default, you must choose every level, down to the lowest one. The profile shows one row for each level.
+
+The patient also belongs to every government organization above the geo organization. A government organization covers a patient when it is the patient's geo organization or one above it. A role in a government organization that covers the patient is a role on the patient.
+
+Each government organization has a **Patients** tab that lists the patients it covers. You see this tab when you hold Can list patients in that government organization or one above it. See [View an organization's patients](../../flows/clinical/patient/view-organization-patients.mdx).
+
+### Identifiers
+
+An identifier is an ID that your deployment sets up for patients, with a name that your deployment chooses. The registration and update forms show each active deployment-wide identifier, except the ones that Care keeps by itself.
+
+An identifier can be required, can need a value that no other patient has, and can check the format of the value.
-Note: You enter either a date of birth or an age, not both.
+Some identifiers are auto-generated. The registration form shows "Auto-generated on Save" for them, and Care fills in the value when you register the patient.
-{/*
-### Blood Group
+Care does not fill in an auto-generated identifier when you update a patient. So a patient who was registered before the identifier was set up stays without a value for it.
-Care offers these blood group values: A Positive, A Negative, B Positive, B Negative,
-AB Positive, AB Negative, O Positive, O Negative, and Unknown.
+The profile lists the patient's identifiers in the **Identifiers** section of the **Demography** tab. To change them, you use **Edit** in **General Info**. See [Manage a patient's identifiers](../../flows/clinical/patient/manage-patient-identifiers.mdx).
-### Patient Identifiers
+A facility can also set up identifiers of its own. Search offers them, but the registration and update forms do not show them. Care fills in an auto-generated facility identifier when an encounter is created at that facility.
-Your deployment configures the identifier types that Care shows. A facility can define
-its own identifier types, or the instance can define identifier types for all facilities.
-Each identifier type is required or optional. An identifier type can also check the
-format of the value that you enter.
+Care can also keep some identifiers by itself. By default, it keeps the patient's name in each facility where the patient has an encounter. Two more are off by default, and your deployment can turn them on: a deployment-wide phone-number identifier and a deployment-wide name identifier. Search offers these identifiers, but the forms and the profile do not show them.
-### Patient Tags
+### Tags
-Administrators attach tags to a patient record. Tags are labels that help you group and
-find patient records.
+You apply tags to a patient from the tags that are set up for patients. See [Tag](../platform/tagging.mdx).
-### Volunteer Contact
+A tag is either a deployment-wide tag or a facility tag. Inside a facility, you can apply that facility's tags and the deployment-wide tags. At registration and outside a facility, you can apply only deployment-wide tags.
-A facility assigns specific users, for example volunteers, to a patient. These users
-give field support to the patient. Care shows these users in the Volunteer Contact
-section of the patient profile.
+A patient can have only one tag from each tag group. If you choose a second tag from the same group, it replaces the first one.
-### Profile Sections
+A tag can have an expiry. Care removes an expired tag from the patient later.
-The patient profile holds these sections:
+You apply and remove tags with **Edit** in **Patient Tags** on the profile, with **Add Tags** or **Manage Tags** on Patient Home, or on the registration form. On the profile and on Patient Home, each change is saved at once. On the registration form, the tags are saved with the new patient. See [Manage patient tags](../../flows/clinical/patient/manage-patient-tags.mdx).
-- General Info
-- Additional Details
-- Identifiers
-- Patient Tags
-- Insurance Details
-- Social Profile
-- Volunteer Contact
+### Assigned users
-The profile also holds tabs for Encounters, Clinical History, Appointments, and
-Questionnaire Updates. Your permissions control which of these tabs you see.
-*/}
+The **Users** tab of the profile lists the users assigned to the patient. With **Assign User**, you choose a user and a role, and Care gives that user the role on this patient only. The role picker offers the roles meant for facilities.
-## Patient Identifiers
-Your deployment configures the identifier types that Care shows. A facility can define its own identifier types, or the instance can define identifier types for all facilities. Each identifier type is required or optional. An identifier type can also check the format of the value that you enter.
+An assigned user can open the patient and has the permissions of their role on this patient. This does not need an encounter or a role in a government organization. You can assign any user in Care, not only the users of your facility.
+
+The **Users** tab shows each user's details, but not the role that the user has on the patient. See [Manage the users assigned to a patient](../../flows/clinical/patient/manage-patient-users.mdx).
+
+### Deceased
+
+To record that a patient has died, you use the **Additional Details** section of the registration or update form. Under **Deceased Status**, you select **Mark as deceased** and enter the **Date and Time of Death**. The time cannot be in the future, or before the patient's date of birth or year of birth.
+
+The text under **Mark as deceased** says "Use only if the patient has passed away before registration." The other way works if one of your forms has a **Time of Death** question. Such a form can be about the patient or about an encounter. When someone answers the question and saves the form, Care records the death. If the question is left empty, Care does not record it.
+
+The profile then shows a red banner with a **Deceased** badge and the date and time of death. See [Mark a patient as deceased](../../flows/clinical/patient/mark-patient-deceased.mdx).
+
+Unticking **Mark as deceased** later does not remove the deceased status.
## Permissions
-| Permission | What it allows |
-| --- | --- |
-| Can Create Patient | Register a new patient. |
-| Can Update a Patient's data | Edit the details of an existing patient. |
-| Can list patients | See patients in search results and lists. |
-| Can view clinical data about patients | View the clinical information of a patient. |
-| Can view questionnaire responses on patient | View the questionnaire responses of a patient. |
-| Can submit questionnaire about patients | Submit a questionnaire about a patient. |
+Care checks two things: the permission that your role holds, and where you hold that role. You can hold a role in a department of a facility, in a government organization, in a responsibility, or directly on one patient.
+
+By default, who can open a patient depends on the patient's open encounters, the patient's geo organization and the users assigned to the patient.
+
+The roles named on this page hold each permission by default. Your deployment can also have other roles.
+
+### Role on the patient
+
+Most patient permissions count only when you hold them through a role on the patient. You have a role on the patient when you hold a role in one of these places:
+
+- A department or team linked to an open encounter of the patient, or a department above it.
+- Administration, the department that Care creates with every facility, when the patient has an open encounter at that facility.
+- A department linked to the current location of an open encounter of the patient.
+- A government organization that covers the patient.
+- The patient's **Users** tab, when you are assigned to the patient. Your role is the role that you were given there.
-Note: Only a system administrator can permanently delete a patient record. Regular staff
-roles cannot delete a patient record.
+An open encounter is an encounter whose status is not **Completed**, **Cancelled**, **Discontinued** or **Entered in error**. A **Discharged** encounter is still open. An encounter with one of these four statuses gives no role on the patient.
-{/*
-## Configuration
+So a role in the facility's Administration department is a role on every patient who has an open encounter at that facility. Registering a patient does not by itself give you a role on the patient.
-Note: The fields that are mandatory at registration depend on your deployment's
-configuration. The number of geo-organization levels that you must select also depends
-on your deployment's configuration. Some deployments use a minimal registration form
-that asks only for the core fields.
-*/}
+### Opening a patient
+
+To open a patient's profile, one of these must be true:
+
+- You hold Can view clinical data about patients through a role on the patient.
+- You hold Can list patients in a government organization that covers the patient. A role in a department does not count for this.
+- You are assigned to the patient, with any role.
+
+If none of these is true, the profile shows **Patient Not Found**, and Care shows the message "Not Found".
+
+When you open the profile inside a facility, you also need Can Read Tag Config in the facility's Administration department or in one of its departments or teams. A role in a government organization does not count for this.
+
+Without Can Read Tag Config, the profile inside the facility shows **Patient Not Found**, with the message "Cannot view facility tags".
+
+So if your only role is in a government organization, you open the patient's profile from that organization's **Patients** tab, without a facility. That profile has no **Edit** in **General Info**, so you cannot change the patient's details from it.
+
+By default, the Administrator, Volunteer and Pharmacist roles do not hold Can view clinical data about patients. With only these roles, a role in a department of a facility does not let you open a patient.
+
+Your deployment can turn on a setting that widens access to patients. It is off by default. When it is on, any signed-in user can open any patient, and Can Update a Patient's data held in any department or organization is enough to change a patient. Inside a facility, you still need Can Read Tag Config in the facility's Administration department or in one of its departments or teams.
+
+Care's screens have a matching option, which is also off by default. When it is on, **Edit** in **General Info** shows to every user who opens the profile inside a facility.
+
+### Searching for a patient and Patient Home
+
+Searching by a deployment-wide identifier needs no permission: any signed-in user who can open the facility can do it. See [Search for a patient](../../flows/clinical/patient/search-patient.mdx).
+
+To search by an identifier that a facility set up, you need Can Read Patient Identifier Config in that facility's Administration department or in one of its departments or teams.
+
+When you select a patient in the results, Care opens Patient Home, the facility page for that patient. Patient Home needs no patient permission either. Care opens it only when the phone number, the year of birth and the first five characters of the patient's ID in Care match. You must also hold Can Read Tag Config in the facility's Administration department or in one of its departments or teams. See [Open Patient Home](../../flows/clinical/patient/open-patient-home.mdx).
+
+If your deployment keeps the phone number as an identifier, a search by it shows only the name, sex and phone number of each patient. **Verify Patient Identity** then asks for the patient's year of birth before Patient Home opens.
+
+The buttons on Patient Home, such as **Create Encounter** and **Schedule Appointment**, depend on your permissions in the facility, not on the patient.
+
+From Patient Home, you can open the patient's profile, titled **Patient Details**. The profile needs one of the ways to open a patient that are listed above. See [View a patient's profile](../../flows/clinical/patient/view-patient-profile.mdx).
+
+So a user who can open Patient Home cannot always open the profile. For example, a Doctor whose only role is in a department unrelated to the patient's open encounters sees **Patient Not Found** on the profile.
+
+### Who can do what
+
+| Permission | Description | System Roles |
+| --- | --- | --- |
+| Can Create Patient | Register a patient. You can hold it in a department of any facility, or in any organization. **Add New Patient** at the top of **Search patients** shows only when you hold it in that facility. See [Register a patient](../../flows/clinical/patient/register-patient.mdx). | Staff, Doctor, Nurse, Administrator, Facility Admin, and Admin in a responsibility |
+| Can list patients | Open a patient, when you hold it in a government organization that covers the patient. See the **Patients** tab of a government organization, when you hold it in that organization or one above it. A responsibility also has a **Patients** tab, which shows when you hold it in that responsibility. A role in a department does not count for these. Through a role on the patient, it is also needed to list the patient's encounters on the **Encounters** tab of the profile and on Patient Home. | Staff, Doctor, Nurse, Administrator, Facility Admin, Volunteer, Pharmacist, and Admin in a responsibility. Facility Admin and Pharmacist are roles for facilities: the screens do not offer them in a government organization. |
+| Can view clinical data about patients | Open a patient through a role on the patient. It also shows the **Files** and **Clinical History** tabs of the profile. | Staff, Doctor, Nurse, Facility Admin |
+| Can Read Tag Config | Open a patient inside a facility, on Patient Home and on the profile. Hold it in the facility's Administration department or in one of its departments or teams. A role in a government organization does not count for this. | Staff, Doctor, Nurse, Administrator, Facility Admin, Volunteer, Pharmacist |
+| Can Read Patient Identifier Config | Search for a patient by an identifier that a facility set up. Hold it in that facility's Administration department or in one of its departments or teams. | Staff, Doctor, Nurse, Administrator, Facility Admin, Volunteer, Pharmacist |
+| Can Update a Patient's data | Change the patient's details, identifiers and deceased status, apply and remove tags, and assign and remove users. Hold it through a role on the patient. You must also be able to open the patient. **Edit** in **General Info** shows only when you open the profile inside a facility. See [Update a patient's details](../../flows/clinical/patient/update-patient-details.mdx). | Staff, Doctor, Nurse, Administrator, Facility Admin |
+| Can Apply Tag Config to Resources | Apply or remove a tag, checked for each tag, also at registration. Hold it in the department or organization that manages the tag, or one above it. If no department or organization manages the tag: for a facility tag, hold it in a department of that facility; for a deployment-wide tag, in a department of any facility. On a registered patient, you also need Can Update a Patient's data. | Staff, Doctor, Nurse, Facility Admin, Pharmacist |
+| Can view questionnaire responses on patient | See the **Updates** tab: the questionnaire responses about the patient. Hold it through a role on the patient. | Staff, Doctor, Nurse, Administrator, Facility Admin, Volunteer, Pharmacist |
+| Can submit questionnaire about patients | Use **Add Patient Updates** to fill in a form about the patient outside an encounter. Hold it through a role on the patient. | Staff, Doctor, Nurse, Administrator, Facility Admin, Volunteer |
+| Can list bookings on Object | See the patient's appointments. Through a role on the patient, it shows the **Appointments** tab of the profile. On Patient Home, hold it in the facility's Administration department or in one of its departments or teams to see **Upcoming Appointment**. See [View a patient's appointments and tokens](../../flows/clinical/patient/view-patient-appointments.mdx). | Staff, Doctor, Nurse, Administrator, Facility Admin |
+| Can list token on Object | See the patient's tokens on Patient Home. Hold it in the facility's Administration department or in one of its departments or teams. | Staff, Doctor, Nurse, Administrator, Facility Admin |
+
+So by default, a Staff, Doctor, Nurse or Facility Admin role lets you open the patient inside the facility and change the patient's details. You can hold that role in the facility's Administration department while the patient has an open encounter at that facility. You can also hold it in a department linked to that encounter, or in one above it.
+
+The **Referrals** tab of the profile and the other buttons on Patient Home depend on permissions from other parts of Care. See [View a patient's appointments and tokens](../../flows/clinical/patient/view-patient-appointments.mdx).
+
+Care's screens have no way to delete a patient.
## Related
- Flow: [Search for a patient](../../flows/clinical/patient/search-patient.mdx)
- Flow: [Register a patient](../../flows/clinical/patient/register-patient.mdx)
+- Flow: [Open Patient Home](../../flows/clinical/patient/open-patient-home.mdx)
- Flow: [View a patient's profile](../../flows/clinical/patient/view-patient-profile.mdx)
-- Flow: [Update patient details](../../flows/clinical/patient/update-patient-details.mdx)
-- Flow: [Manage patient identifiers](../../flows/clinical/patient/manage-patient-identifiers.mdx)
-- Flow: [Manage patient tags](../../flows/clinical/patient/manage-patient-tags.mdx)
+- Flow: [Update a patient's details](../../flows/clinical/patient/update-patient-details.mdx)
- Flow: [Mark a patient as deceased](../../flows/clinical/patient/mark-patient-deceased.mdx)
-- Flow: [Manage patient users](../../flows/clinical/patient/manage-patient-users.mdx)
+- Flow: [Manage a patient's identifiers](../../flows/clinical/patient/manage-patient-identifiers.mdx)
+- Flow: [Manage patient tags](../../flows/clinical/patient/manage-patient-tags.mdx)
+- Flow: [Manage the users assigned to a patient](../../flows/clinical/patient/manage-patient-users.mdx)
- Flow: [View a patient's appointments and tokens](../../flows/clinical/patient/view-patient-appointments.mdx)
+- Flow: [View an organization's patients](../../flows/clinical/patient/view-organization-patients.mdx)
+- Concept: [Encounter](../clinical/encounter.mdx)
+- Concept: [Department](../facility/department.mdx)
+- Concept: [Facility](../facility/facility.mdx)
+- Concept: [Organisation](../access-governance/organization.mdx)
+- Concept: [Roles and Permission](../access-governance/access-control.mdx)
+- Concept: [Tag](../platform/tagging.mdx)
+- Reference: [Patient](../../references/clinical/patient)
diff --git a/versioned_docs/version-3.1/flows/clinical/patient/manage-patient-identifiers.mdx b/versioned_docs/version-3.1/flows/clinical/patient/manage-patient-identifiers.mdx
index 6e803831..d386f80e 100644
--- a/versioned_docs/version-3.1/flows/clinical/patient/manage-patient-identifiers.mdx
+++ b/versioned_docs/version-3.1/flows/clinical/patient/manage-patient-identifiers.mdx
@@ -2,63 +2,119 @@
sidebar_position: 5
---
-# Manage patient identifiers
+# Manage a patient's identifiers
## Overview
-This flow describes how to set, view, and change the identifiers of a [patient](../../../concepts/clinical/patient) in Care.
+This flow describes how to enter, change and see the identifiers of a [patient](../../../concepts/clinical/patient) in Care. The registration form and the update form show the deployment-wide identifiers: the identifiers that are set up for every facility of your deployment.
-Identifiers name a patient in a way that goes beyond the name and the phone number. A national ID and a facility-specific ID are two examples. An administrator configures each identifier type with these properties:
-
-- Required or optional for every patient.
-- Unique. No two patients share the same value.
-- Validated against a specific format.
-- Available at one facility only, or across the whole instance.
-- Auto-generated by Care. You cannot enter or edit an auto-generated value.
+
## Pre-requisites
-- An administrator of a facility.
+- A superuser has set up identifiers for your deployment, and they are active.
+- If you enter identifiers for a new patient, you can register patients. See [Register a patient](./register-patient.mdx).
+- If you change the identifiers of a registered patient, you can update that patient. See [Update a patient's details](./update-patient-details.mdx).
- You have the permissions listed below.
## Permissions
| Permission | Access |
| --- | --- |
-| Can Create Patient | Set the identifiers of a patient at registration. |
-| Can Update a Patient's data | Change the identifiers of a patient who is registered in Care. |
+| Can Create Patient | Enter identifiers when you register a patient. You can hold this permission in any department or team of a facility, in a government organization, or in a responsibility. By default, the Staff, Doctor, Nurse, Administrator and Facility Admin roles hold this permission, and so does the Admin role of a responsibility. |
+| Can Update a Patient's data | Change the identifiers of a registered patient. Care shows **Edit** in **General Info** only if you hold it. You need this permission through a role on the patient. By default, the Staff, Doctor, Nurse, Administrator and Facility Admin roles hold this permission. |
+| Can view clinical data about patients | Steps 2 and 4: open the patient's profile. You need it through a role on the patient. By default, the Staff, Doctor, Nurse and Facility Admin roles hold it. |
+| Can list patients | Steps 2 and 4: open the patient's profile, in place of Can view clinical data about patients. You need it in a government organization that covers the patient. If you are assigned to the patient on the **Users** tab, you need neither of these two permissions. By default, the Staff, Doctor, Nurse, Volunteer and Administrator roles hold it. The Pharmacist and Facility Admin roles hold it too, but Care does not offer them for a government organization. |
+| Can Read Tag Config | Steps 2 and 4: open the profile inside a facility. Hold it in the facility's Administration department or in one of its departments or teams. A role in a government organization does not count. By default, the Facility Admin, Administrator, Staff, Doctor, Nurse, Volunteer and Pharmacist roles hold it. |
+
+To see **Add New Patient** at the top of **Search patients**, you need Can Create Patient in this facility. [Register a patient](./register-patient.mdx) lists the other permissions on that path.
## Steps
-### 1. Set the identifiers at registration
+### 1. Enter identifiers when you register a patient
+
+Open the **Register New Patient** form. See [Register a patient](./register-patient.mdx).
+
+Each identifier field has the name of the identifier as its label. The description of the identifier shows under the label.
+
+The identifier fields are in these places:
+
+| Place | Identifiers |
+| --- | --- |
+| **Patient Basics** | The required identifiers. Care marks each one as required. |
+| **Additional Details** | The optional identifiers, with no required mark. |
+| End of **Additional Details** | The identifiers that Care generates. You cannot type in these fields. They show "Auto-generated on Save". |
+
+Enter a value for each required identifier. If you leave one empty, Care shows "This field is required".
+
+Enter a value for each optional identifier that you know.
+
+Select **Register Patient**.
+
+After Care registers the patient, it fills the values of the generated identifiers.
+
+Care does not fill a generated identifier when you update a patient. A patient who was registered before the identifier was set up stays without a value for it.
+
+Note: The forms show only deployment-wide identifiers. An identifier that one facility sets up does not show on these forms.
+
+Note: Care can also keep identifiers itself, from the patient's phone number and name. The forms and the profile do not show these identifiers.
+
+### 2. Change the identifiers of a registered patient
+
+Open the patient's profile inside the facility. In **General Info**, select **Edit**. See [Update a patient's details](./update-patient-details.mdx).
+
+The identifier fields show the patient's current values.
+
+Change a value, or enter a value for an identifier that is empty.
+
+To remove an optional identifier from the patient, clear its field.
+
+You cannot clear a required identifier. If you leave it empty, Care shows "This field is required".
+
+Select **Update**.
+
+
+
+
+
+### 3. Correct a value that Care refuses
+
+When you save either form, Care checks each identifier value:
+
+- If a required identifier is empty, the form shows "This field is required" and does not save.
+- A unique identifier cannot have the same value as another patient. Otherwise Care shows a message that ends with "is not unique".
+- A value must match the set format of its identifier. Otherwise Care shows a message that ends with "is not valid".
+
+Correct the value and save again.
-1. Register the patient. See [Register a patient](./register-patient.mdx).
-2. Enter a value for every required identifier.
-4. Skip the identifiers that Care generates. You cannot enter these values.
+### 4. See the patient's identifiers
-Note: Which identifiers are required, optional, or auto-generated depends on your deployment's configuration. The scope of an identifier also depends on this configuration.
+Open the patient's profile. See [View a patient's profile](./view-patient-profile.mdx).
-### 2. See the identifiers of a patient
+On the **Demography** tab, go to the **Identifiers** section. It shows the name and the value of each identifier.
-1. Open the profile of the patient. See [View a patient's profile](./view-patient-profile.mdx).
-2. Go to the "Identifiers" section. This section shows all the identifiers on file for the patient.
+The **Identifiers** section has no **Edit**. To change a value, use the update form, as in step 2.
-### 3. Change the identifiers of a patient
+Note: Registering a patient does not by itself let you open the patient's profile. You need a role on the patient, for example through an encounter.
-1. Open the profile of the patient.
-2. Edit the details of the patient. See [Update patient details](./update-patient-details.mdx).
-3. Add a value for an identifier that has no value.
-4. Change the value of an identifier that has a value.
-5. Save the changes.
+The header of the profile also shows each identifier, with its name and value.
-Note: You cannot enter or edit an identifier that Care generates.
+
## Expected Outcome
-- The "Identifiers" section of the patient profile shows the identifiers that you entered.
-- Care generates the values of the auto-generated identifiers.
-- Care rejects a value that does not match the format of the identifier.
-- Care rejects a value that another patient already uses, when the identifier is unique.
+- When you open the patient's profile, its **Identifiers** section shows the values that you entered.
+- After registration, the generated identifiers have values.
+- If you cleared an identifier field on the update form, the patient no longer has that identifier.
## Related
@@ -69,5 +125,6 @@ Concepts:
Flows:
- [Register a patient](./register-patient.mdx)
+- [Update a patient's details](./update-patient-details.mdx)
- [View a patient's profile](./view-patient-profile.mdx)
-- [Update patient details](./update-patient-details.mdx)
+- [Search for a patient](./search-patient.mdx)
diff --git a/versioned_docs/version-3.1/flows/clinical/patient/manage-patient-tags.mdx b/versioned_docs/version-3.1/flows/clinical/patient/manage-patient-tags.mdx
index 536e0ef8..f99b3dff 100644
--- a/versioned_docs/version-3.1/flows/clinical/patient/manage-patient-tags.mdx
+++ b/versioned_docs/version-3.1/flows/clinical/patient/manage-patient-tags.mdx
@@ -6,55 +6,146 @@ sidebar_position: 6
## Overview
-This flow describes how to add and remove tags on a [patient](../../../concepts/clinical/patient) in Care. Tags are labels that mark or categorize a patient, separate from clinical data.
+This flow describes how to apply [tags](../../../concepts/platform/tagging.mdx) to a [patient](../../../concepts/clinical/patient) and how to remove them. You can do this from the patient's profile or from Patient Home. Care saves each change at once, so there is no Save button. When you register a patient, you can also choose deployment-wide tags; see [Register a patient](./register-patient.mdx).
+
+
## Pre-requisites
- The patient is registered in Care.
-- You can access the patient's profile.
+- If you start from the profile, you can open the patient's profile. See [View a patient's profile](./view-patient-profile.mdx).
+- If you start from Patient Home, you opened Patient Home for the patient. See [Open Patient Home](./open-patient-home.mdx).
+- The tag that you want is set up for patients and is active. See [Create a tag](../../platform/tagging/create-a-tag.mdx).
- You have the permissions listed below.
## Permissions
| Permission | Access |
| --- | --- |
-| Can Update a Patient's data | Add and remove tags on an existing patient. |
+| Can Update a Patient's data | Apply and remove tags on this patient. You need it through a [role on the patient](../../../concepts/clinical/patient). On the profile, Care shows **Edit** in **Patient Tags** only if you hold it. By default, the Staff, Doctor, Nurse, Administrator and Facility Admin roles hold it. |
+| Can Apply Tag Config to Resources | Apply or remove each tag. Where you need it depends on the tag. If a department manages the tag, you need it in that department or in one above it. If an organization manages the tag, you need it in that organization or in one above it. If no one manages a facility tag, you need it in any department or team of that facility. Its Administration department counts too. If no one manages a deployment-wide tag, you need it in any department or team of any facility. By default, the Staff, Doctor, Nurse, Pharmacist and Facility Admin roles hold it. The Administrator and Volunteer roles do not. |
+| Can Read Tag Config | Inside a facility: open the profile or Patient Home, and see the facility's tags in the picker. Hold it in the facility's Administration department or in one of its departments or teams. A role in a government organization does not count. By default, the Staff, Doctor, Nurse, Pharmacist, Volunteer, Administrator and Facility Admin roles hold it. |
+| Can view clinical data about patients | Open the patient. Care opens the patient when it loads the profile, and again for each tag change. You need it through a role on the patient. By default, the Staff, Doctor, Nurse and Facility Admin roles hold it. |
+| Can list patients | Open the patient, in place of Can view clinical data about patients. You need it in a government organization that covers the patient. If you are assigned to the patient on the **Users** tab, you need neither of these two permissions to open the patient. By default, the Staff, Doctor, Nurse, Volunteer and Administrator roles hold it. The Pharmacist and Facility Admin roles hold it too, but Care does not offer them for a government organization. |
+
+By default, a Staff, Doctor, Nurse or Facility Admin role gives every permission above for a tag that no one manages.
+
+The role can be in a department of the patient's open encounter, or in one above it. A department of the encounter's current location also counts. So does the facility's Administration department, while the patient has an open encounter at the facility.
+
+By default, the Pharmacist role can apply tags, but it cannot update the patient. So it cannot change the patient's tags.
## Steps
-### 1. Open the patient's profile
+### 1. Open the tag picker
+
+Open the picker from one of these places:
+
+- On the profile, Care opens the **Demography** tab first. In the **Patient Tags** section, select **Edit**.
+- On Patient Home, select **Add Tags** on the patient card. If the patient has tags, the control reads **Manage Tags**.
+
+On a phone, the picker opens as a drawer titled **Manage Tags**. On a larger screen, it opens as a drop-down menu.
+
+Note: If **Patient Tags** has no **Edit**, you lack Can Update a Patient's data on this patient.
+
+Note: On Patient Home, Care shows **Add Tags** or **Manage Tags** to every user who opens Patient Home.
+
+
+
+### 2. Find the tag
+
+To find a tag by its name, type in the **Search tags...** box.
+
+The picker lists the tags under three headings.
+
+| Heading | What it lists |
+| --- | --- |
+| **Selected Tags** | The tags that the patient has now. |
+| **Tag Groups** | The tag groups. Each group has a **Group** badge. Select a group to see its tags, each with a checkbox. |
+| **Other Tags** | The tags that are not in a group. |
+
+A tag group is a parent tag with its child tags, as set up in tag configuration. See [Parent and child tags](../../../concepts/platform/tagging.mdx#parent-and-child-tags).
+
+Inside a facility, the picker offers the facility's tags and the deployment-wide tags.
+
+If you opened the profile from an organization's patient list, Care opened it without a facility. The picker then offers only deployment-wide tags. See [View an organization's patients](./view-organization-patients.mdx).
-Open the profile of the patient that you want to tag. See [View a patient's profile](./view-patient-profile.mdx).
+If Care has no tags to offer, the picker shows "No tags or groups found".
-### 2. Find the Patient Tags section
+
-Go to the **Patient Tags** section. This section shows the current tags of the patient.
+
-### 3. Open the tag picker
+### 3. Apply a tag
-Select **Edit** in the **Patient Tags** section. Care opens the tag picker.
+Select a tag that the patient does not have.
-### 4. Add or remove tags
+If Care asks for an expiry, go to step 4.
-Select a tag in the picker to add it to the patient. Remove a tag to take it off the patient.
+If Care does not ask, it saves the tag at once and shows "Tags updated successfully".
-### 5. Save the tags
+When Care does not ask for an expiry, the tag gets its default expiry, if it has one.
-Save your changes. Care updates the tags of the patient.
+If the patient already has a tag from the same group, the new tag replaces it. A patient can have only one tag from each group.
-Note: You can also add tags when you register a new patient. See [Register a patient](./register-patient.mdx).
+### 4. Set the expiry
+
+Do this step only if Care asks for an expiry.
+
+Care asks when the setup of the tag lets you change its expiry. The step is titled "Set expiry for", followed by the tag name.
+
+Enter the expiry in days, hours and minutes.
+
+Below the fields, Care shows the default expiry of the tag. If the tag has no default, Care shows "Leave empty to apply without an expiry."
+
+The expiry can be 3650 days at most. If it is longer, Care shows an error, and you cannot apply the tag.
+
+Select **Apply tag**. Care saves the tag and shows "Tags updated successfully".
+
+When the expiry passes, Care removes the tag from the patient later.
+
+
+
+### 5. Remove a tag
+
+Select a tag that the patient has. These tags are under **Selected Tags**.
+
+Care removes the tag at once and shows "Tags updated successfully".
+
+Note: If Care cannot save a change, it shows an error message. The picker then goes back to the tags that the patient had.
+
+
+
+
## Expected Outcome
-- The **Patient Tags** section shows the updated tags of the patient.
+- Care shows "Tags updated successfully" after each change.
+- The **Patient Tags** section shows one row for each tag. For a tag in a group, the row shows the group name and the tag name.
+- The header of the profile shows the tags next to **Patient Tags**.
+- On Patient Home, the patient card shows **Manage Tags**. If you removed every tag, it shows "No tags assigned" and **Add Tags**.
## Related
Concepts:
- [Patient](../../../concepts/clinical/patient)
+- [Tag](../../../concepts/platform/tagging.mdx)
Flows:
-- [Register a patient](./register-patient.mdx)
+- [Open Patient Home](./open-patient-home.mdx)
- [View a patient's profile](./view-patient-profile.mdx)
+- [Register a patient](./register-patient.mdx)
+- [View an organization's patients](./view-organization-patients.mdx)
+- [Create a tag](../../platform/tagging/create-a-tag.mdx)
+- [Create a child tag](../../platform/tagging/create-a-child-tag.mdx)
+- [View tags](../../platform/tagging/view-tags.mdx)
diff --git a/versioned_docs/version-3.1/flows/clinical/patient/manage-patient-users.mdx b/versioned_docs/version-3.1/flows/clinical/patient/manage-patient-users.mdx
index 17dcb564..3a350b66 100644
--- a/versioned_docs/version-3.1/flows/clinical/patient/manage-patient-users.mdx
+++ b/versioned_docs/version-3.1/flows/clinical/patient/manage-patient-users.mdx
@@ -2,15 +2,27 @@
sidebar_position: 8
---
-# Manage patient users
+# Manage the users assigned to a patient
## Overview
-This flow describes how to assign a user to a [patient](../../../concepts/clinical/patient) in Care. The assigned user supports the patient in the field, separate from the patient's clinical encounters.
+This flow describes how to assign a user to a [patient](../../../concepts/clinical/patient) on the patient's **Users** tab, and how to remove an assigned user. Assigning a user gives that user access to this patient, with the role that you choose.
+
+
## Pre-requisites
- The patient is registered in Care.
+- You can open the patient's profile. See [View a patient's profile](./view-patient-profile.mdx).
- The user that you want to assign has an account in Care.
- You have the permissions listed below.
@@ -18,45 +30,105 @@ This flow describes how to assign a user to a [patient](../../../concepts/clinic
| Permission | Access |
| --- | --- |
-| Can Update a Patient's data | Lets you assign a user to the patient and remove an assigned user. |
+| Can Update a Patient's data | Assign and remove users. Care shows **Assign User** and the trash button on each card only if you hold it. You need it through a [role on the patient](../../../concepts/clinical/patient). By default, the Staff, Doctor, Nurse, Administrator and Facility Admin roles hold it. |
+| Can view clinical data about patients | Open the patient's profile and its **Users** tab, and again when you assign or remove a user. You need it through a role on the patient. By default, the Staff, Doctor, Nurse and Facility Admin roles hold it. |
+| Can list patients | Open the patient, in place of Can view clinical data about patients. You need it in a government organization that covers the patient. If you are assigned to the patient yourself, you need neither of these two permissions to open the patient. By default, the Staff, Doctor, Nurse, Volunteer and Administrator roles hold it. The Pharmacist and Facility Admin roles hold it too, but Care does not offer them for a government organization. |
+| Can Read Tag Config | Open the profile inside a facility. Hold it in the facility's Administration department or in one of its departments or teams. A role in a government organization does not count. By default, the Staff, Doctor, Nurse, Pharmacist, Volunteer, Administrator and Facility Admin roles hold it. |
+
+Any signed-in user can search for a user and see the list of roles.
+
+By default, a Staff, Doctor, Nurse or Facility Admin role gives every permission above.
+
+The role can be in a department of the patient's open encounter, or in one above it. A department of the encounter's current location also counts. So does the facility's Administration department, while the patient has an open encounter at the facility.
## Steps
-### 1. Open the patient's profile
+### 1. Open the Users tab
+
+Open the patient's profile. See [View a patient's profile](./view-patient-profile.mdx).
+
+Select the **Users** tab.
+
+The tab lists the users assigned to the patient. Each card shows the user's name, username and **Phone Number**.
+
+The card does not show the role that the user has on this patient.
+
+If no user is assigned, the tab shows "No User Assigned to this patient".
+
+
+
+### 2. Open the Assign User panel
+
+Select **Assign User**.
+
+Care opens the **Assign User to Patient** panel. The panel says "Search for a user and assign a role to add them to the patient."
+
+
+
+### 3. Select the user
+
+In **Search User**, type the first name, the last name or the username of the user.
+
+The search covers all users in Care, not only the users of this facility.
+
+Select the user in the results. If no user matches, Care shows "No Users Found".
+
+The panel shows the name, **Username** and **Phone Number** of the user.
+
+You cannot assign a user who is already assigned to this patient.
+
+
+
+### 4. Select the role
+
+In **Select Role**, select the role that the user gets on this patient.
+
+The list offers the roles that are meant for facilities.
+
+The user gets the permissions of this role for this patient only.
+
+
+
+### 5. Assign the user
+
+Select **Assign to Patient**.
-Open the profile of the patient that you want to manage. For the full steps, see [View a patient's profile](./view-patient-profile.mdx).
+**Assign to Patient** stays disabled until you select a user and a role.
-### 2. Open the User section
+Care shows "User added to patient successfully" and closes the panel.
-On the patient's profile, go to the **Users** section. This section lists the users that are assigned to the patient.
+
-### 3. Search for the user that you want to assign
+### 6. Remove an assigned user
-Enter the name or the username of the user in the search box. Care shows the helper text "Search for a user and assign a role to add them to the patient."
+Do this step only when you want to remove a user from the patient.
-### 4. Select the user and assign a role
+On the card of the user, select the trash button.
-Select the user from the search results. Assign a role to the user. Care adds the user to the patient with that role.
+Care opens the **Remove User** dialog. The dialog names the user whose card you selected. Check the name before you continue.
-### 5. Remove an assigned user
+Select **Remove**.
-Note: Do this step only when you want to remove access.
+Care shows "User removed successfully".
-Select an assigned user in the **Users** section. Remove the access of that user from the patient.
+
## Expected Outcome
-- The **Users** section shows the assigned user together with the role that you gave.
-- The assigned user can support the patient in the field.
-- When you remove a user, the **Users** section no longer shows that user.
+- The **Users** tab lists the user that you assigned.
+- The assigned user has access to this patient. Their role on this patient is the role that you selected.
+- When you remove a user, the **Users** tab no longer lists that user.
+- A removed user can still have a role on the patient in other ways. One example is a role in a department of the patient's open encounter.
## Related
Concepts:
- [Patient](../../../concepts/clinical/patient)
+- [User](../../../concepts/access-governance/user.mdx)
+- [Roles and Permission](../../../concepts/access-governance/access-control.mdx)
Flows:
- [View a patient's profile](./view-patient-profile.mdx)
-- [Update patient details](./update-patient-details.mdx)
+- [Update a patient's details](./update-patient-details.mdx)
diff --git a/versioned_docs/version-3.1/flows/clinical/patient/mark-patient-deceased.mdx b/versioned_docs/version-3.1/flows/clinical/patient/mark-patient-deceased.mdx
index 4043421c..1e4866fa 100644
--- a/versioned_docs/version-3.1/flows/clinical/patient/mark-patient-deceased.mdx
+++ b/versioned_docs/version-3.1/flows/clinical/patient/mark-patient-deceased.mdx
@@ -6,57 +6,166 @@ sidebar_position: 7
## Overview
-This flow describes how to record that a [patient](../../../concepts/clinical/patient) is deceased. You record the status and the date and time of death from the patient's profile.
+This flow describes how to record in Care that a [patient](../../../concepts/clinical/patient) has died. You tick **Mark as deceased** on the **Update Patient Details** form, and enter the date and time of death. You can also record the death with a form that has a **Time of Death** question, about an encounter or about the patient.
+
+
## Pre-requisites
- The patient is registered in Care.
-- You can open the patient's profile.
-- You have the permission listed below.
+- You can update the patient's details. [Update a patient's details](./update-patient-details.mdx) describes how you get access to the patient.
+- You know the date and time of death.
+- If you use a form about an encounter, the patient has an open encounter. Its **Forms** list offers a form with a **Time of Death** question.
+- If you use a form about the patient, **Add Forms** offers a form with a **Time of Death** question.
+- You have the permissions listed below.
## Permissions
| Permission | Access |
| --- | --- |
-| Can Update a Patient's data | Lets you change the patient's details, and mark the patient as deceased. |
+| Can Update a Patient's data | Save the time of death and mark the patient as deceased, in every way. On the update form, Care shows **Edit** in **General Info** only if you hold it. You need it through a role on the patient. By default, the Staff, Doctor, Nurse, Administrator and Facility Admin roles hold it. |
+| Can submit questionnaire about patient encounters | Form about an encounter: save the form. You need it in a department of the encounter, or in one above it. A department of the encounter's current location and the facility's Administration department also count. The encounter must be open. By default, the Staff, Doctor, Nurse and Facility Admin roles hold it. |
+| Can submit questionnaire about patients | Form about the patient: Care shows **Add Patient Updates** only if you hold it, and you need it to save the form. You need it through a role on the patient. By default, the Staff, Doctor, Nurse, Administrator, Facility Admin and Volunteer roles hold it. |
+| Can view questionnaire responses on patient | Form about the patient: see the **Updates** tab. You need it through a role on the patient. By default, the Staff, Doctor, Nurse, Administrator, Facility Admin, Volunteer and Pharmacist roles hold it. |
+| Can Read Questionnaires | Either kind of form: see the form in the **Forms** or **Add Forms** list. For this, you need it in an organization or department that the form is shared with, or in one above it. For a form of your facility, its Administration department also counts. To open a form of your facility, you need it in that facility. The facility's Administration department counts, and so does a department that the form belongs to or is shared with, or one above it. A role in a government organization does not count for this. A form that belongs to no facility opens without this permission. By default, the Staff, Doctor, Nurse, Administrator, Facility Admin, Volunteer and Pharmacist roles hold it. The Admin, Manager and Member roles of a responsibility hold it too. |
+| Can view clinical data about patients | Open the patient's profile, in every way. You need it through a role on the patient. For a form about an encounter, Care also shows **Forms** only if you hold it, or Can Read encounter related clinical data. By default, the Staff, Doctor, Nurse and Facility Admin roles hold it. |
+| Can Read encounter related clinical data | Form about an encounter: Care shows **Forms**, in place of Can view clinical data about patients. You need it in a department of the encounter, or in one above it. A department of its current location and the facility's Administration department also count. By default, the Doctor, Nurse and Facility Admin roles hold it. |
+| Can list patients | Open the patient's profile, in place of Can view clinical data about patients. For this, a role in a facility does not count: you need it in a government organization that covers the patient. If you are assigned to the patient on the **Users** tab, you need neither of these two permissions. For a form about an encounter, you also need it through a role on the patient. Then you see the **Encounters** tab and can open the encounter. By default, the Staff, Doctor, Nurse, Volunteer and Administrator roles hold it. The Pharmacist and Facility Admin roles hold it too, but Care does not offer them for a government organization. |
+| Can Read Tag Config | Open the profile inside a facility. Hold it in the facility's Administration department or in one of its departments or teams. A role in a government organization does not count. By default, the Facility Admin, Administrator, Staff, Doctor, Nurse, Volunteer and Pharmacist roles hold it. |
## Steps
-### 1. Open the patient's profile
+### 1. Open the update form
-Open the profile of the patient. See [View a patient's profile](./view-patient-profile.mdx).
+Open the patient's profile inside the facility. See [View a patient's profile](./view-patient-profile.mdx).
-### 2. Edit the additional details
+On the **Demography** tab, go to the **General Info** section.
-Find the **Additional Details** section. Select **Edit**.
+Select **Edit**. Care opens the **Update Patient Details** form.
+
+
+
+### 2. Find the Deceased Status box
+
+Go to the **Additional Details** section of the form.
+
+If the section is closed, open it. On some deployments, the section is closed when the form opens.
+
+Find the **Deceased Status** box.
+
+
### 3. Mark the patient as deceased
-Select the **Patient is deceased** checkbox. Care shows a field for the date and time of death.
+Tick **Mark as deceased**.
+
+Below **Mark as deceased**, Care shows the text "Use only if the patient has passed away before registration."
+
+The **Register New Patient** form has the same **Deceased Status** box. See [Register a patient](./register-patient.mdx).
+
+Care shows the **Date and Time of Death** field.
+
+
### 4. Enter the date and time of death
-Enter the date and time of death.
+Enter the date and time of death in **Date and Time of Death**.
+
+Care marks the patient as deceased only when this field has a value.
+
+Keep these rules in mind:
-Note: The date and time of death must not be in the future.
+- The picker does not offer a time later than now.
+- The time of death must be after the date of birth.
+- If the form has an age instead of a date of birth, Care uses today minus the age.
+- If the time of death is too early, Care shows "Death date must be after date of birth".
-Note: The date and time of death must not be earlier than the patient's date of birth. If the patient has an age instead of a date of birth, Care compares the date of death with the birth year that it calculates from the age.
+:::warning
+Check the date and time of death before you select **Update**. If you later untick **Mark as deceased** and save, the patient stays deceased.
+:::
+
+
### 5. Save the change
-Save the **Additional Details** section. See [Update patient details](./update-patient-details.mdx).
+Select **Update**. You can also press Shift+Enter.
+
+When you save, Care checks the time of death again. Care does not save a time of death in the future.
+
+Care also does not save a time of death before the date of birth. If the patient has an age instead, the year of death cannot be before the year of birth.
+
+
+
+
+
+### Another way: record the death with a form
+
+Use this way instead of steps 1 to 5.
+
+Use this way if one of your forms has a **Time of Death** question. Care records the death when you answer that question and save the form.
+
+The form can be about an encounter or about the patient. Each kind opens from a different place.
+
+Note: In the form editor, the author sets the question's **Answer type** to **Structured**, and then selects **Time of Death**.
+
+For a form about an encounter:
+
+1. Open the patient's profile inside the facility. See [View a patient's profile](./view-patient-profile.mdx).
+2. Select the **Encounters** tab.
+3. On the card of the open encounter, select **View Encounter**. Care opens the **Overview** tab of the encounter.
+4. On the **Overview** tab, select **Forms**. Care shows **Forms** only for an open encounter.
+5. Select the form with the **Time of Death** question. Care opens the form.
+6. Find the question. Its text is the text that the author of the form wrote. A required question has a red asterisk.
+7. Enter the date and time of death. The picker does not offer a time later than now.
+8. Select **Save Changes**.
+
+The **Forms** list shows up to 15 active forms about an encounter, from your facility or from no facility. It shows only the forms for which you hold Can Read Questionnaires.
+
+For a form about the patient:
+
+1. Open the patient's profile. See [View a patient's profile](./view-patient-profile.mdx).
+2. Select the **Updates** tab.
+3. Select **Add Patient Updates**. Care opens a page for forms about the patient.
+4. Use **Add Forms** to select the form with the **Time of Death** question.
+5. Answer the question as in steps 6 and 7 above. Then select **Save Changes**.
+
+**Add Forms** offers only active forms about a patient. It shows only the forms for which you hold Can Read Questionnaires.
+
+If you leave a required question empty, Care shows "This field is required".
+
+If the question is not required and you leave it empty, Care does not record the death.
+
+When you save, Care saves the time of death and marks the patient as deceased.
+
+Care saves the time of death and the other answers together. If Care refuses the time of death, it saves none of the answers.
## Expected Outcome
-- The patient's profile shows the deceased status as "Passed away on `{date}`, at `{time}`".
+- If you used the update form, Care shows "Patient Updated Successfully", and returns you to the previous page.
+- The header of the patient's profile shows a red banner with the **Deceased** badge.
+- The banner shows "Passed away on", then the date and the time of death. The date shows the month, the day and the year. The time shows hours and minutes, with AM or PM.
+- When you open the update form again, **Mark as deceased** is ticked.
## Related
Concepts:
- [Patient](../../../concepts/clinical/patient)
+- [Encounter](../../../concepts/clinical/encounter.mdx)
+- [Questionnaire](../../../concepts/definitions/questionnaire.mdx)
Flows:
+- [Update a patient's details](./update-patient-details.mdx)
- [View a patient's profile](./view-patient-profile.mdx)
-- [Update patient details](./update-patient-details.mdx)
+- [Register a patient](./register-patient.mdx)
+- [Add and edit questions](../../definitions/questionnaire/add-and-edit-questions.mdx)
diff --git a/versioned_docs/version-3.1/flows/clinical/patient/open-patient-home.mdx b/versioned_docs/version-3.1/flows/clinical/patient/open-patient-home.mdx
new file mode 100644
index 00000000..786ea3ff
--- /dev/null
+++ b/versioned_docs/version-3.1/flows/clinical/patient/open-patient-home.mdx
@@ -0,0 +1,167 @@
+---
+sidebar_position: 10
+---
+
+# Open Patient Home
+
+## Overview
+
+This flow describes how to open Patient Home, the page for one [patient](../../../concepts/clinical/patient) inside a facility. Search and registration both end on Patient Home. From it, you start the next task for the patient, such as an encounter or an appointment.
+
+
+
+## Pre-requisites
+
+- The patient is registered in Care.
+- You have a role in the facility's Administration department or in one of its departments or teams.
+- You start from **Search patients**, the registration form, the patient's profile, an encounter or an appointment. Care takes the patient's phone number and the start of the patient's ID from that page.
+- If Care asks for the patient's year of birth, you know it. Patient Home shows the patient only if the year is correct.
+- You have the permissions listed below.
+
+## Permissions
+
+| Permission | Access |
+| --- | --- |
+| Can Read Tag Config | Open Patient Home, and the profile in step 6. You need it in the facility's Administration department or in one of its departments or teams. A role in a government organization does not count. Patient Home needs no patient permission. By default, the Facility Admin, Administrator, Staff, Doctor, Nurse, Volunteer and Pharmacist roles hold it. |
+| Can list encounters | See the encounter list on the **Encounters** tab. You need it at this facility. By default, the Doctor, Nurse and Facility Admin roles hold it. |
+| Can list patients | Load the encounter list. You need it through a role on the patient, for example a role in a department of one of the patient's open encounters. A role in the facility's Administration department also counts while the patient has an open encounter at the facility. Step 6: in place of Can view clinical data about patients, it opens the profile when you hold it in a government organization that covers the patient. A role in a facility does not count for this. If you are assigned to the patient on the **Users** tab, you need neither. By default, the Staff, Doctor, Nurse, Administrator, Facility Admin, Volunteer and Pharmacist roles hold it. Care does not offer the Pharmacist and Facility Admin roles for a government organization. |
+| Can view clinical data about patients | Step 6: open the patient's profile. You need it through a role on the patient. By default, the Staff, Doctor, Nurse and Facility Admin roles hold it. |
+| Can Create encounter | See **Create Encounter**. You need it at this facility. By default, the Doctor, Nurse and Facility Admin roles hold it. |
+| Can update bookings on Object | See **Schedule Appointment** and the **Appointments** tab. You need it at this facility. By default, the Staff, Facility Admin, Doctor and Nurse roles hold it. |
+| Can list bookings on Object | See the **Upcoming Appointment** card and load the patient's appointments at this facility. You need it at this facility. By default, the Staff, Facility Admin, Doctor, Nurse and Administrator roles hold it. |
+| Can list token on Object | See the patient's tokens at this facility. You need it at this facility. By default, the Staff, Facility Admin, Doctor, Nurse and Administrator roles hold it. |
+| Can Create on Token | See **Generate Token**, if your deployment turns it on. You need it at this facility. By default, the Staff, Facility Admin, Doctor, Nurse and Administrator roles hold it. |
+
+Note: "At this facility" means a role in the facility's Administration department or in one of its departments or teams.
+
+## Steps
+
+### 1. Open Patient Home
+
+Open Patient Home in one of these ways.
+
+- From **Search patients**: select the patient. If Care asks for the year of birth, enter it. Then select **Verify**. See [Search for a patient](./search-patient.mdx).
+- After you register a patient: Care opens Patient Home. See [Register a patient](./register-patient.mdx).
+- From the patient's profile: in the **Actions** panel, select **Patient Home**.
+- From an encounter or an appointment: select the patient's name. In the pop-up, select **Patient Home**.
+
+If no patient matches, Care shows **Verification Failed** and "Please enter the correct birth year to verify the patient details."
+
+Care also shows **Verification Failed** if you do not have Can Read Tag Config in this facility. Then Care also shows the message "Cannot view facility tags".
+
+Select **Go Back** to return to the previous page. If there is no previous page in Care, Care opens **Search patients**.
+
+
+
+### 2. Check the patient card
+
+The patient card shows the patient's name and tags.
+
+If the patient has no tags, the card shows "No tags assigned".
+
+To apply or remove tags, select **Add Tags** or **Manage Tags** on the card. See [Manage patient tags](./manage-patient-tags.mdx).
+
+Care shows **Add Tags** or **Manage Tags** to everyone who opens Patient Home. To save a change, you need the permissions in [Manage patient tags](./manage-patient-tags.mdx).
+
+
+
+### 3. Start a task with the action buttons
+
+Patient Home shows these buttons when your permissions at this facility allow them.
+
+| Button | What it does |
+| --- | --- |
+| **Create Encounter** | Opens the form to create an encounter for the patient. Keyboard shortcut: `e`. See [Create an encounter](../encounter/create-encounter.mdx). |
+| **Schedule Appointment** | Opens the **Book Appointment** panel for the patient. Keyboard shortcut: `s`. |
+| **Generate Token** | Shows only when your deployment turns it on. Keyboard shortcut: `t`. See [Create a token](../../scheduling/token/create-token.mdx). |
+| **View Accounts** | Opens the facility's active accounts for this patient. Care always shows this button. Keyboard shortcut: `a`. |
+
+Note: A keyboard shortcut works only when its button shows on the page.
+
+
+
+### 4. View the patient's encounters
+
+Patient Home opens on the **Encounters** tab.
+
+Select **Active** or **Completed**.
+
+- **Active**: encounters that are Planned, In Progress or On Hold.
+- **Completed**: encounters that are Discharged, Completed, Cancelled, Discontinued or Entered in error.
+
+The list shows the patient's encounters at every facility, not only at this facility.
+
+If there are no encounters, Care shows "No active encounters found" or "No completed encounters found".
+
+If you do not have Can list encounters at this facility, Care does not show the list.
+
+To load the list, you also need Can list patients through a role on the patient. See the Permissions section.
+
+
+
+### 5. View the patient's appointments and tokens
+
+The **Upcoming Appointment** card shows the patient's appointment today at this facility.
+
+If the patient has more than one appointment today, the card has a link to all of them. The link opens the **Appointments** tab.
+
+If you do not have Can update bookings on Object at this facility, Patient Home has no **Appointments** tab.
+
+The **Appointments** tab lists the patient's appointments at this facility.
+
+On a large screen, the patient's tokens at this facility show in a side panel. On a smaller screen, they show in the **Tokens** tab.
+
+The token list shows the tokens of one date, up to 50.
+
+For details, see [View a patient's appointments and tokens](./view-patient-appointments.mdx).
+
+
+
+### 6. Open the patient's profile
+
+Select the patient's name on the patient card.
+
+In the pop-up, select **View Profile**.
+
+Care opens the patient's profile, **Patient Details**. See [View a patient's profile](./view-patient-profile.mdx).
+
+If Care cannot open the patient for you, the profile shows **Patient Not Found**. Patient Home needs no patient permission, but the profile does.
+
+
+
+
+
+## Expected Outcome
+
+- Care shows Patient Home for the patient. Patient Home has the patient card, the **Encounters** tab and the action buttons that your permissions allow.
+- From Patient Home, you can create an encounter, schedule an appointment or open the patient's profile.
+
+## Related
+
+Concepts:
+
+- [Patient](../../../concepts/clinical/patient)
+- [Encounter](../../../concepts/clinical/encounter.mdx)
+- [Appointment Booking](../../../concepts/scheduling/booking.mdx)
+- [Token](../../../concepts/scheduling/token.mdx)
+- [Tag](../../../concepts/platform/tagging.mdx)
+- [Account](../../../concepts/billing/account.mdx)
+
+Flows:
+
+- [Search for a patient](./search-patient.mdx)
+- [Register a patient](./register-patient.mdx)
+- [View a patient's profile](./view-patient-profile.mdx)
+- [View a patient's appointments and tokens](./view-patient-appointments.mdx)
+- [Manage patient tags](./manage-patient-tags.mdx)
+- [Create an encounter](../encounter/create-encounter.mdx)
+- [Create a token](../../scheduling/token/create-token.mdx)
diff --git a/versioned_docs/version-3.1/flows/clinical/patient/register-patient.mdx b/versioned_docs/version-3.1/flows/clinical/patient/register-patient.mdx
index 6a9c843e..3fc8dbe3 100644
--- a/versioned_docs/version-3.1/flows/clinical/patient/register-patient.mdx
+++ b/versioned_docs/version-3.1/flows/clinical/patient/register-patient.mdx
@@ -6,85 +6,167 @@ sidebar_position: 2
## Overview
-This flow describes how to register a new [patient](../../../concepts/clinical/patient) in Care. Use it when a person comes to your facility and Care holds no record for that person.
+This flow describes how to register a new [patient](../../../concepts/clinical/patient) in Care, from inside a facility. When you save the form, Care opens Patient Home for the new patient.
+
+Search for the patient first, so that the same person is not registered twice. See [Search for a patient](./search-patient.mdx).
+
+
## Pre-requisites
-- You are signed in to Care.
-- You searched for the patient first, and Care found no existing record. See [Search for a patient](./search-patient.mdx).
-- You have the patient's personal details, contact number, and identity documents.
+- You sign in to Care with a staff account.
+- You have a role in the facility: in its Administration department, in one of its departments or teams, or in a government organization that contains the facility.
- You have the permissions listed below.
## Permissions
| Permission | Access |
| --- | --- |
-| Can Create Patient | Lets you register a new patient in Care. |
+| Can Create Patient | Register the patient. Care accepts this permission from a role in any facility, in a government organization or in a responsibility. To see **Add New Patient** at the top of **Search patients**, you need it in the facility's Administration department or in one of its departments or teams. By default, the Staff, Doctor, Nurse, Administrator and Facility Admin roles hold it, and so does the Admin role of a responsibility. |
+| Can Apply Tag Config to Resources | Apply tags in **Patient Tags**. You need it for each tag that you choose, or Care does not register the patient. For a tag that no department or organization manages, a role in any facility is enough. For a managed tag, you need it in the managing department or organization, or in one above it. By default, the Facility Admin, Staff, Doctor, Nurse and Pharmacist roles hold it. |
+| Can Read Tag Config | Open Patient Home after you save. You need it in the facility's Administration department or in one of its departments or teams. A role in a government organization does not count. By default, the Facility Admin, Administrator, Staff, Doctor, Nurse, Volunteer and Pharmacist roles hold it. |
+| Can update bookings on Object, Can list encounters or Can Create encounter | See **Search patients** in the facility sidebar, as described in [Search for a patient](./search-patient.mdx). By default, the Staff, Doctor, Nurse and Facility Admin roles hold at least one of them. |
## Steps
### 1. Open the registration form
-Open the Patient Registration page.
+On the **Search patients** page, select **Add New Patient**.
+
+If you have Can Create Patient in this facility, the button is at the top of the page. If your search finds no patient, the button also shows below the message.
+
+If you searched by phone number, Care fills that phone number in the form. **Search patients** offers a phone search only if your deployment keeps the phone number as an identifier.
+
+Care opens **Register New Patient** with the text "Please provide the required details to create a new patient record."
+
+The pharmacy dispense sheet can also open this form.
+
+Note: To leave the form, select **Back**. If you changed something, Care asks "You have unsaved changes. Are you sure you want to leave?"
+
+
+
+### 2. Enter the patient basics
+
+Complete the fields in **Patient Basics**.
+
+| Components | What it captures |
+| --- | --- |
+| **Name** | The patient's full name. This field is required. By default, use 75 characters or fewer. |
+| **Phone Number** | The patient's phone number. This field is required. If the number is not valid, Care shows "Entered phone number is not valid". |
+| **Use a different emergency contact number** | Tick this box if the patient has a different number for emergencies. Care shows **Emergency Phone Number**, which is required and starts with the phone number above. Replace it with the emergency number. The box is unticked when the form opens. |
+| **Sex** | Select **Male**, **Female**, **Transgender** or **Non-binary**. This field is required. |
+| **Date of Birth/Age** | Select the **Date** tab and enter the date of birth. Or select the **Age** tab and enter the age in years. This field is required. |
+| **Blood Group** | The patient's blood group: Unknown, A+, A-, B+, B-, AB+, AB-, O+ or O-. This field is optional. |
+| Required identifiers | One field for each required identifier that your deployment sets up for every facility. The field has the identifier's name and description. |
+| **Patient Tags** | Tags for the patient. This field is optional. It offers only deployment-wide tags. |
+
+If you leave **Use a different emergency contact number** unticked, Care saves the phone number as the emergency phone number.
+
+If you tick the box and leave **Emergency Phone Number** empty, Care shows an error when you save. The form stays open.
+
+If you enter a date of birth, do not use a future date. Otherwise, Care shows "Date cannot be in the future".
+
+If you enter an age, use a number from 1 to 120. Care shows the year of birth that it calculates.
+
+Care saves a year of birth from the age, not the age itself. It does not save a date of birth.
+
+If you leave a required identifier empty, Care shows "This field is required".
+
+
+
+### 3. Enter the additional details
+
+Complete the fields in **Additional Details**.
+
+| Components | What it captures |
+| --- | --- |
+| **Address** | The patient's current address. This field is required. |
+| **Permanent address is different from current address** | Tick this box if the patient's permanent address is different. Then enter it in **Permanent Address**. If you leave the box unticked, Care saves the address as the permanent address. |
+| **PIN Code** | The PIN code of the address. This field is optional. If you enter a PIN code, use 6 digits. Otherwise, Care shows "Pincode must be 6 digits". |
+| Area dropdowns, starting with **State** | The government area that the patient belongs to. Select one level at a time. |
+| Optional identifiers | One field for each optional identifier that your deployment sets up for every facility. |
+| **Deceased Status** | Tick **Mark as deceased** only if the patient died before registration. Then enter the **Date and Time of Death**. See [Mark a patient as deceased](./mark-patient-deceased.mdx). |
+| Auto-generated identifiers | Fields that show "Auto-generated on Save". You cannot type in them. Care fills them when you save. |
+| Deployment fields | If your deployment adds its own patient fields, they show at the end of this section. |
+
+Note: If your deployment allows a shorter registration, the section heading adds "(Optional)" and the section starts closed. Then **Address** is not required.
+
+The first area dropdown is **State** by default. Each next dropdown has the name of its level, such as **District** or **Ward**.
+
+When the area that you select has smaller areas, Care adds a dropdown for the next level.
+
+Select an area at the last level. Otherwise, Care shows an error message.
+
+Your deployment can require fewer levels. Then select at least the number of levels that the message shows.
+
+Your deployment can also fill in a default area when the form opens.
+
+
+
+### 4. Review a possible duplicate
-You can also open the form from the search results. If the search finds no record, Care offers to register a new patient.
+After you enter a valid phone number, Care looks for patients with the same phone number.
-### 2. Enter the personal details
+If Care finds any, it opens **Patient Records Found** with the text "It appears that there are patient records that contain the same phone number as the one you just entered."
-Complete the fields in the table below.
+The dialog lists the patients with that phone number. Select one option.
-| Component | What it captures |
+| Option | When to use it |
| --- | --- |
-| Name | The full name of the patient. This field is required. |
-| Phone Number | The primary contact number of the patient. This field is required. Care validates the format. |
-| Emergency Phone Number | The contact number for emergencies. This field is optional. |
-| Same as phone number | Copies the phone number into the emergency number. Care turns this toggle on by default. |
-| Gender | The gender of the patient. This field is required. Select Male, Female, Non-binary, or Transgender. |
-| Date of birth or Age | The age details of the patient. This field is required. |
-| Select Blood Group | The blood group of the patient. This field is optional. |
-| Patient Tags | Labels that group the patient. This field is optional. |
-| Address | The current address of the patient. |
-| Permanent Address | The permanent address of the patient. |
-| Same as address | Copies the current address into the permanent address. Care turns this toggle on by default. |
-| PIN Code | The postal code of the address. This field is optional. |
-| Geo Organization | The government administrative area of the patient. This field is required. |
+| **Admit the patient record to your facility by adding the year of birth** | The patient is on the list. Care opens the **Search patients** page with this phone number. Open the patient from there. |
+| **I confirm that the patient I want to create is not on the list.** | The patient is not on the list. Care closes the dialog, and you continue the registration. Care does not show the dialog again for this form. |
-Use the toggle to choose between Date of birth and Age.
+Select **Continue**. You can select it only after you select an option.
-If you enter the date of birth, do not enter a future date.
+The dialog does not close when you press Escape or select outside it.
-If you enter the age, Care calculates the year of birth.
+The dialog also has a note for when you are not sure of the year of birth. It asks you to contact your district care coordinator, the shifting facility or the patient.
-For Geo Organization, select each level in order.
+### 5. Register the patient
-Note: Deployment can configure fields which are mandatory and non mandatory. Deceased status should be marked only for patients who are brought dead.
+Select **Register Patient**, or press `Shift+Enter`.
-### 4. Enter the patient identifiers
+You can select **Register Patient** only after you change something on the form.
-Enter the identifiers that your facility configures, for example a national identity number.
+If you leave **Name**, **Sex**, **Date of Birth/Age** or **Address** empty, Care shows "This field is required".
-Identifiers that are configured as auto generated gets generated once patient registration is completed
+If you do not have Can Create Patient, Care shows "Cannot Create Patient" and does not register the patient.
-For more details, see [Manage patient identifiers](./manage-patient-identifiers.mdx).
+If you chose a tag that you may not apply, Care does not register the patient.
-### 5. Save the patient
+
-Save the form.
+
## Expected Outcome
-- Care creates the patient record with the details you entered.
-- Care opens the profile of the new patient. See [View a patient's profile](./view-patient-profile.mdx).
-- You can now search for the patient by name or phone number.
+- Care shows "Patient Registered Successfully".
+- Care opens Patient Home for the new patient, also when you start from the pharmacy dispense sheet. See [Open Patient Home](./open-patient-home.mdx).
+- If you do not have Can Read Tag Config in the facility, Patient Home shows **Verification Failed**. The patient is still registered.
+- If your deployment turns on scheduling after registration, Patient Home opens **Book Appointment** for the patient. This setting is off by default.
+- If you started from the dispense sheet, creating an encounter from Patient Home can open the dispense page. Care does this if you opened a pharmacy service's prescriptions at this facility before.
+- Care fills the values of the auto-generated identifiers.
## Related
Concepts:
- [Patient](../../../concepts/clinical/patient)
+- [Tag](../../../concepts/platform/tagging.mdx)
Flows:
- [Search for a patient](./search-patient.mdx)
-- [View a patient's profile](./view-patient-profile.mdx)
-- [Manage patient identifiers](./manage-patient-identifiers.mdx)
+- [Open Patient Home](./open-patient-home.mdx)
+- [Manage a patient's identifiers](./manage-patient-identifiers.mdx)
+- [Manage patient tags](./manage-patient-tags.mdx)
+- [Mark a patient as deceased](./mark-patient-deceased.mdx)
diff --git a/versioned_docs/version-3.1/flows/clinical/patient/search-patient.mdx b/versioned_docs/version-3.1/flows/clinical/patient/search-patient.mdx
index affe48a0..73006e3e 100644
--- a/versioned_docs/version-3.1/flows/clinical/patient/search-patient.mdx
+++ b/versioned_docs/version-3.1/flows/clinical/patient/search-patient.mdx
@@ -6,81 +6,171 @@ sidebar_position: 1
## Overview
-This flow describes how to search for an existing [patient](../../../concepts/clinical/patient) in Care. Search for the patient first, before you register a new patient. This prevents duplicate patient records.
+This flow describes how to find a [patient](../../../concepts/clinical/patient) who is already registered in Care, from inside a facility. You search by one of the patient's identifiers, or by the patient's encounters at the facility. When you select the patient, Care opens Patient Home.
+
+Search before you register a patient, so that the same person is not registered twice.
+
+
## Pre-requisites
-- You are a member of the facility where you search for the patient.
+- You sign in to Care with a staff account.
+- You have a role in the facility: in its Administration department, in one of its departments or teams, or in a government organization that contains the facility.
+- You know one of the patient's identifiers. Or, if the patient has an encounter at this facility, you know the patient's name or the encounter's external ID.
- You have the permissions listed below.
## Permissions
| Permission | Access |
| --- | --- |
-| Can list patients | Lets you search for patients and see the search results. |
+| Can Read Patient Identifier Config | Search by an identifier set up for your facility, such as **Patient Name**, which Care keeps by default. You need it in the facility's Administration department or in one of its departments or teams. By default, the Facility Admin, Administrator, Staff, Doctor, Nurse, Volunteer and Pharmacist roles hold it. |
+| Can list encounters | Search on the **Encounters** tab. Care finds only encounters of a department where you hold this permission, or of a department below it. A department of the encounter's current location also counts. A role in the facility's Administration department finds every encounter of the facility. By default, the Doctor, Nurse and Facility Admin roles hold it. |
+| Can Read Tag Config | Open Patient Home from a result. You need it in the facility's Administration department or in one of its departments or teams. A role in a government organization does not count. By default, the Facility Admin, Administrator, Staff, Doctor, Nurse, Volunteer and Pharmacist roles hold it. |
+| Can update bookings on Object, Can list encounters or Can Create encounter | See **Search patients** in the facility sidebar. You need one of the three in the facility's Administration department or in one of its departments or teams. By default, the Staff, Doctor, Nurse and Facility Admin roles hold at least one of them. The Administrator, Volunteer and Pharmacist roles do not. |
+| Can Create Patient | See **Add New Patient** at the top of the page. You need it in the facility's Administration department or in one of its departments or teams. By default, the Staff, Doctor, Nurse, Administrator and Facility Admin roles hold it. |
+
+Note: Care checks no permission for a search by a deployment-wide identifier. Any signed-in user with the role in the facility from the pre-requisites can run it.
+
+If your deployment keeps the phone number as an identifier, a search by phone number is such a search. This setting is off by default.
## Steps
-### 1. Open the search page
+### 1. Open Search patients
-1. Open the facility.
-2. Select **Patients**.
-3. Select **Search patients**.
+Open the facility.
-The page shows the helper text "Search for existing patients using their phone number or create a new patient record". If you can only search for patients, the page shows the helper text "Search for existing patients using their phone number".
+In the facility sidebar, under **Patient Management**, select **Search patients**.
-### 2. Enter the search details
+Note: Without one of the sidebar permissions listed above, **Search patients** is not in the sidebar.
-Search by one of these methods:
+Care shows the **Search patients** page with the text "Search for existing patients using their phone number or create a new patient record".
-| Search method | What it captures |
-| --- | --- |
-| Identifier | The patient's phone number, or another identifier type that your deployment configures. |
-| Encounter details | The patient name, or another identifier that belongs to an encounter. |
+If you do not have Can Create Patient in this facility, the text is "Search for existing patients using their phone number".
+
+
+
+### 2. Search by an identifier
+
+On the **Patient Identifiers** tab, select an identifier with the buttons below the search box. **Patient Identifiers** is the first tab.
+
+Each button shows the name of one identifier. Care offers the deployment-wide identifiers and the identifiers set up for your facility.
+
+If your deployment keeps the phone number as an identifier, **Patient Phone Number** is the first button.
+
+By default, Care fills the **Patient Name** identifier when an encounter for the patient is saved at your facility.
+
+If the name changes, a **Patient Name** search finds the new name only after the next encounter at your facility.
+
+Type the value in the search box. The box shows "Search by" and the name of the identifier you selected.
+
+If you search by phone number, Care searches when the number is a valid phone number.
+
+For other identifiers, Care searches as you type.
+
+If the identifier does not allow partial search, the value must match exactly.
+
+By default, **Patient Name** allows partial search. Each word you type must be in the value, and upper and lower case do not matter.
+
+Care shows up to 20 patients.
+
+
+
+### 3. Search by an encounter instead
+
+To find the patient through an encounter at this facility, select the **Encounters** tab.
-Note: Which identifier types you can search on depends on your deployment's configuration.
+Select **Patient Name** or **External ID**.
-### 3. Read the results
+Type the text. Care finds the encounters whose patient name or external ID contains the text. Upper and lower case do not matter.
-The results show in a table with these columns:
+Care finds only the encounters that you can list. See the Permissions section.
+
+If the encounter has an external ID, the result shows it in brackets after the patient's name.
+
+### 4. Read the results
+
+The results of an identifier search show in a table with these columns.
| Column | What it shows |
| --- | --- |
-| Name | The patient's name. |
-| Phone number | The patient's phone number. |
-| Gender | The patient's gender. |
-| Actions | The actions that you can do on the result. |
+| **Patient Name** | The patient's name. For a full result, Care also shows the patient's address below the name. |
+| **Phone Number** | The patient's phone number. |
+| **Gender** | The patient's sex. |
+| **Actions** | A **Schedule Appointment** button and a **More Actions** menu. The menu has **Schedule Appointment**, **Create Encounter** and **Patient Home**. |
+
+Some identifiers ask for the year of birth before Care opens the patient. A search by **Patient Phone Number** always does.
+
+For these identifiers, the results do not show the address.
+
+
+
+### 5. Open the patient
+
+Select the patient's row.
+
+If you searched on the **Encounters** tab, Care opens Patient Home for the encounter's patient.
+
+If the identifier does not ask for the year of birth, Care opens Patient Home for the patient.
+
+If the identifier asks for the year of birth, Care opens **Verify Patient Identity**.
+
+The dialog shows "Please enter the patient's year of birth to verify their identity".
+
+Enter the patient's year of birth in "Year of Birth (YYYY)". Use four digits.
+
+Select **Verify**, or press Enter.
+
+If the year does not have four digits, Care shows "Please enter a valid year of birth (YYYY)".
+
+If the year is correct, Care opens Patient Home for the patient.
+
+If the year is wrong, Patient Home shows **Verification Failed** and "Please enter the correct birth year to verify the patient details."
+
+Select **Go Back** to return to the previous page, **Search patients**.
+
+To close the dialog without opening the patient, select **Cancel**.
+
+
-Care shows limited information for a partial match. This protects the patient's privacy.
+
-### 4. Verify
+### 6. Continue when Care finds no patient
-If date of birth validation is added to verify patient's identity. The page shows the message "Please enter the patient's year of birth to verify their identity."
+If an identifier search finds nothing, Care shows **No Patient Records Found**. It asks if you want to register a new patient.
-1. Enter the patient's year of birth.
-2.Verify
+To register the patient, select **Add New Patient** below the message. See [Register a patient](./register-patient.mdx).
-If no additiona verification is configured, the select the patient to access Patients Home page
+Care shows this button to every user. If you do not have Can Create Patient, Care does not save the new patient, and shows "Cannot Create Patient".
-### 5. Continue when there is no result
+If you searched by phone number, Care fills that phone number in the registration form.
-If Care finds no patient, the page shows a "no patient found" message. If you have the permission to register patients, the page offers an option to register a new patient. See [Register a patient](./register-patient.mdx).
+On this page, `Shift+Enter` selects **Add New Patient**.
-Note: If you register a patient with a phone number that Care already holds, Care shows the message "Patient Records Found" with the text "It appears that there are patient records that contain the same phone number as the one you just entered." Read this warning before you create a duplicate record.
+If an encounter search finds nothing, Care shows "Try adjusting your filters or create a new encounter".
## Expected Outcome
-- Care shows the patients that match your search.
-- You open the patient's record from the results. See [View a patient's profile](./view-patient-profile.mdx).
-- If Care finds no patient, you can register a new patient.
+- Care opens Patient Home for the patient that you selected. See [Open Patient Home](./open-patient-home.mdx).
+- If Care finds no patient, you can register the patient from the search page.
## Related
Concepts:
- [Patient](../../../concepts/clinical/patient)
+- [Encounter](../../../concepts/clinical/encounter.mdx)
Flows:
- [Register a patient](./register-patient.mdx)
+- [Open Patient Home](./open-patient-home.mdx)
- [View a patient's profile](./view-patient-profile.mdx)
diff --git a/versioned_docs/version-3.1/flows/clinical/patient/update-patient-details.mdx b/versioned_docs/version-3.1/flows/clinical/patient/update-patient-details.mdx
index 08730c72..496ca14b 100644
--- a/versioned_docs/version-3.1/flows/clinical/patient/update-patient-details.mdx
+++ b/versioned_docs/version-3.1/flows/clinical/patient/update-patient-details.mdx
@@ -2,67 +2,124 @@
sidebar_position: 4
---
-# Update patient details
+# Update a patient's details
## Overview
-This flow describes how to update the details of a [patient](../../../concepts/clinical/patient) in Care. You edit the details from the patient's profile.
+This flow describes how to change the details of a [patient](../../../concepts/clinical/patient) who is registered in Care. You change the details on the **Update Patient Details** form, which you open from the patient's profile.
+
+
## Pre-requisites
- The patient is registered in Care.
-- You can open the patient's profile.
+- You have a role in the facility's Administration department or in one of its departments or teams.
+- You can open the patient's profile inside the facility. See [View a patient's profile](./view-patient-profile.mdx).
+- You have a role on the patient. For example, you hold a role in the department of the patient's open encounter. A role in the facility's Administration department also counts while the patient has an open encounter there. The [patient](../../../concepts/clinical/patient) concept lists every way to have a role on a patient.
- You have the permissions listed below.
## Permissions
| Permission | Access |
| --- | --- |
-| Can Update a Patient's data | Lets you edit the details of a patient. |
+| Can Update a Patient's data | Save your changes. Care shows **Edit** in **General Info** only if you hold it. You need it through a role on the patient. By default, the Staff, Doctor, Nurse, Administrator and Facility Admin roles hold it. |
+| Can view clinical data about patients | Open the patient's profile. You need it through a role on the patient. By default, the Staff, Doctor, Nurse and Facility Admin roles hold it. |
+| Can list patients | Open the patient's profile, in place of Can view clinical data about patients. A role in a facility does not count: you need it in a government organization that covers the patient. If you are assigned to the patient on the **Users** tab, you need neither of these two permissions. By default, the Staff, Doctor, Nurse, Volunteer and Administrator roles hold it. The Pharmacist and Facility Admin roles hold it too, but Care does not offer them for a government organization. |
+| Can Read Tag Config | Open Patient Home and then the profile inside the facility. Hold it in the facility's Administration department or in one of its departments or teams. A role in a government organization does not count. By default, the Facility Admin, Administrator, Staff, Doctor, Nurse, Volunteer and Pharmacist roles hold it. |
## Steps
### 1. Open the patient's profile
-Open the profile of the patient that you want to update. See [View a patient's profile](./view-patient-profile.mdx).
+Open the patient's profile from Patient Home. See [View a patient's profile](./view-patient-profile.mdx).
+
+Note: **Edit** in **General Info** shows only when you open the profile inside a facility. If you opened the profile from an organization's **Patients** tab, open it again from Patient Home.
+
+Note: To open the profile inside a facility, you need a role in that facility. If your only role is in a government organization, you can open the profile only without a facility. Then the profile has no **Edit** in **General Info**.
+
+Note: A role only in a department unrelated to the patient's open encounters is not a role on the patient. With only such a role, the profile shows **Patient Not Found**.
+
+
+
+### 2. Open the update form
+
+On the **Demography** tab, go to the **General Info** section.
+
+Select **Edit**. Care opens the **Update Patient Details** form.
+
+The form shows the patient's current details.
+
+If the profile shows an **Additional Details** section, its **Edit** opens the same form. The profile shows that section only when your deployment adds extra patient fields and the patient has values in them.
+
+
-### 2. Select Edit
+### 3. Change the details
-Go to the "General Info" section or the "Additional Details" section. Select the Edit action on that section. Care opens the registration form. The form shows the current details of the patient.
+The form has two sections, **Patient Basics** and **Additional Details**. Change the fields that you want to update.
-### 3. Update the details
+Note: On some deployments, the **Additional Details** section is closed when the form opens. Open the section to see its fields.
-Change the details that you want to update. You can update these fields:
+The **Patient Basics** section has these fields:
| Components | What it captures |
| --- | --- |
-| Name | The name of the patient. |
-| Gender | The gender of the patient. |
-| Phone Number | The primary contact number of the patient. |
-| Emergency Phone Number | The contact number for emergencies. |
-| Date of birth or Age | The date of birth of the patient, or the age. |
-| Blood Group | The blood group of the patient. |
-| Address | The current address of the patient. |
-| Permanent Address | The permanent address of the patient. |
-| PIN Code | The postal code of the address. |
-| Geo Organization | The administrative area of the patient. |
-| Is Deceased | The deceased status of the patient, with the date and time. |
+| **Name** | The patient's name. This field is required. |
+| **Phone Number** | The patient's phone number. This field is required. If the number is not valid, Care shows "Entered phone number is not valid". |
+| **Use a different emergency contact number** | Tick this box to enter an **Emergency Phone Number**. If the box is not ticked, Care saves the phone number as the emergency number. When the box is ticked, **Emergency Phone Number** is required. If you leave it empty, Care does not save the change. |
+| **Sex** | **Male**, **Female**, **Transgender** or **Non-binary**. This field is required. |
+| **Date of Birth/Age** | This field is required. On the **Date** tab, enter the date of birth. It cannot be in the future. On the **Age** tab, enter the age in years, from 1 to 120. |
+| **Blood Group** | The patient's blood group. This field is optional. |
+| Required identifiers | One field for each required identifier of your deployment. The label is the name of the identifier. |
-The form uses the same fields and the same validation rules as registration. For the details of each field, see [Register a patient](./register-patient.mdx).
+The **Additional Details** section has these fields:
-To record the death of a patient, see [Mark a patient as deceased](./mark-patient-deceased.mdx).
+| Components | What it captures |
+| --- | --- |
+| **Address** | The patient's current address. This field is required, unless your deployment makes it optional. |
+| **Permanent address is different from current address** | Tick this box to enter a **Permanent Address**. If the box is not ticked, Care saves the address as the permanent address. |
+| **PIN Code** | The PIN code of the address. This field is optional. It has 6 digits. |
+| Geo organization levels | One dropdown for each level of the patient's geo organization, such as **State**. Select the levels in order. Select down to the last level, unless your deployment needs fewer levels. |
+| Optional identifiers | One field for each optional identifier of your deployment. |
+| **Deceased Status** | **Mark as deceased** and the **Date and Time of Death**. See [Mark a patient as deceased](./mark-patient-deceased.mdx). |
+| Generated identifiers | The identifiers that Care generates. You cannot type in these fields. Care does not fill an empty one when you update the patient. |
+| Extra fields | The fields that your deployment adds, at the end of the section. |
+
+Keep these points in mind:
-Note: If you leave the form with unsaved changes, Care shows a warning first.
+- If you enter an age, Care replaces the stored date of birth with a year of birth.
+- If you clear the field of an optional identifier, Care removes that identifier from the patient. See [Manage a patient's identifiers](./manage-patient-identifiers.mdx).
+- You cannot clear a required identifier. If you leave it empty, Care shows "This field is required".
+- The form has no **Patient Tags** field. To change the tags, see [Manage patient tags](./manage-patient-tags.mdx).
+- This form does not show **Patient Records Found** when another patient has the same phone number.
+
+
### 4. Save the changes
-Save the form. Care shows a success message. Care returns you to the patient's profile.
+Select **Update**. You can also press Shift+Enter.
+
+**Update** is available only after you change something on the form.
+
+If you leave the form before you save, Care asks "You have unsaved changes. Are you sure you want to leave?"
+
+
+
+
## Expected Outcome
- Care saves the new details of the patient.
-- Care shows a success message.
-- Care shows the patient's profile with the new details.
+- Care shows "Patient Updated Successfully".
+- Care returns you to the previous page.
## Related
@@ -72,6 +129,8 @@ Concepts:
Flows:
-- [Register a patient](./register-patient.mdx)
- [View a patient's profile](./view-patient-profile.mdx)
+- [Register a patient](./register-patient.mdx)
- [Mark a patient as deceased](./mark-patient-deceased.mdx)
+- [Manage a patient's identifiers](./manage-patient-identifiers.mdx)
+- [Manage patient tags](./manage-patient-tags.mdx)
diff --git a/versioned_docs/version-3.1/flows/clinical/patient/view-organization-patients.mdx b/versioned_docs/version-3.1/flows/clinical/patient/view-organization-patients.mdx
new file mode 100644
index 00000000..5876edf5
--- /dev/null
+++ b/versioned_docs/version-3.1/flows/clinical/patient/view-organization-patients.mdx
@@ -0,0 +1,122 @@
+---
+sidebar_position: 11
+---
+
+# View an organization's patients
+
+## Overview
+
+This flow describes how to see the [patients](../../../concepts/clinical/patient) of a government [organization](../../../concepts/access-governance/organization.mdx) on its **Patients** tab, and how to open one of them. The list shows the patients that the organization covers. A [responsibility](../../../concepts/access-governance/responsibility.mdx) also has a **Patients** tab; step 1 says how to reach it.
+
+
+
+## Pre-requisites
+
+- You have a role in the government organization, or in an organization above it. A role in a facility or in a department does not count here.
+- If you want the **Patients** tab of a responsibility, you have a role in that responsibility.
+- You have the permissions listed below.
+
+## Permissions
+
+| Permission | Access |
+| --- | --- |
+| Can list patients | For a government organization: see the **Patients** tab, see the patients in the list, and open them. You need it through a role in this organization or in an organization above it. The list shows only the patients that you may list: patients covered by an organization where you hold it, and patients assigned to you. By default, the Staff, Doctor, Nurse, Volunteer and Administrator roles hold it. The Pharmacist and Facility Admin roles hold it too, but Care does not offer them for a government organization. For a responsibility: see the **Patients** tab. You need it through your role in that responsibility. By default, the Admin role of a responsibility holds it. |
+| Can View Organizations | Open a child organization from the **Organizations** tab of its parent. You need it in the parent organization or in an organization above it. By default, every default role holds it. |
+
+## Steps
+
+### 1. Open the organization
+
+On your dashboard, select the **Governance** tab. It lists the government organizations where you hold a role.
+
+Care shows the **Governance** tab only when it has organizations.
+
+Select the card of the organization.
+
+You can also use the sidebar of any organization page. The **Organizations** section of the sidebar lists the same organizations.
+
+For a responsibility, select the **Responsibilities** tab on your dashboard. Then select the card of the responsibility.
+
+
+
+### 2. Open a child organization
+
+Do this step only if you want the patients of an organization below this one.
+
+Select the **Organizations** tab.
+
+Select the child organization.
+
+Note: Only government organizations and team organizations have the **Organizations** tab. Care shows it only if you hold Can View Organizations there. A responsibility has no **Organizations** tab.
+
+### 3. Open the Patients tab
+
+Select the **Patients** tab.
+
+Care shows the **Patients** tab only if you hold Can list patients in this organization or one above it.
+
+The page heading is the name of the organization. The section has the heading **Patients** and the text "View patients associated with this organization."
+
+If Care cannot load the organization, the page shows only "No Organizations Found".
+
+
+
+### 4. Find a patient
+
+In the search field, select **Name** or **Phone Number**.
+
+For **Name**, type any part of the name of the patient. Capital letters do not matter.
+
+For **Phone Number**, type the complete phone number. Care searches only when the number has 13 characters or more. It finds only an exact match.
+
+The list shows these columns.
+
+| Column | What it shows |
+| --- | --- |
+| **Patient** | The name of the patient. |
+| **Phone** | The phone number of the patient. |
+| **Gender** | The sex of the patient: Male, Female, Transgender or Non-binary. |
+| **Last Modified** | When the details of the patient last changed, as a time relative to now. |
+
+The list shows 15 patients on each page.
+
+If no patient matches, the list shows "No Patients Found".
+
+
+
+### 5. Open a patient
+
+On the row of the patient, select **Open**. You can also select the row.
+
+Care opens the profile of the patient without a facility.
+
+
+
+## Expected Outcome
+
+- You see the patients that the government organization covers, limited to the patients that you may list.
+- When you select **Open**, Care opens the profile of the patient without a facility. On this profile, Care does not show **Schedule Appointment** or the **Edit** button of **General Info**.
+
+## Related
+
+Concepts:
+
+- [Patient](../../../concepts/clinical/patient)
+- [Organisation](../../../concepts/access-governance/organization.mdx)
+- [Responsibility](../../../concepts/access-governance/responsibility.mdx)
+
+Flows:
+
+- [View a patient's profile](./view-patient-profile.mdx)
+- [Search for a patient](./search-patient.mdx)
+- [View the organization hierarchy](../../access-governance/organization/view-organization-hierarchy.mdx)
+- [View your responsibilities](../../access-governance/responsibility/view-your-responsibilities.mdx)
diff --git a/versioned_docs/version-3.1/flows/clinical/patient/view-patient-appointments.mdx b/versioned_docs/version-3.1/flows/clinical/patient/view-patient-appointments.mdx
index 56e771d8..b62275b0 100644
--- a/versioned_docs/version-3.1/flows/clinical/patient/view-patient-appointments.mdx
+++ b/versioned_docs/version-3.1/flows/clinical/patient/view-patient-appointments.mdx
@@ -6,67 +6,130 @@ sidebar_position: 9
## Overview
-This flow describes how to open Patient Home and view the appointments and queue
-tokens of a [patient](../../../concepts/clinical/patient) in Care.
+This flow describes how to see the appointments and tokens of a [patient](../../../concepts/clinical/patient). The **Appointments** tab of the patient's profile shows appointments at every facility. Patient Home shows the appointments and tokens at the facility that you are in.
+
+
## Pre-requisites
- The patient is registered in Care.
-- You verified the patient's identity from search, or you opened the patient's profile.
+- If you use the profile, you can open the patient's profile. See [View a patient's profile](./view-patient-profile.mdx).
+- If you use Patient Home, you opened Patient Home for the patient. See [Open Patient Home](./open-patient-home.mdx).
- You have the permissions listed below.
## Permissions
| Permission | Access |
| --- | --- |
-| List appointments at the facility | Lets you view the patient's appointments. |
-| List tokens at the facility | Lets you view the patient's queue tokens. |
-| Write appointments | Lets you book an appointment for the patient. |
-| Create encounters | Lets you create an encounter for the patient. |
+| Can list bookings on Object | On the profile: see the **Appointments** tab. You need it through a [role on the patient](../../../concepts/clinical/patient). On Patient Home: see the **Upcoming Appointment** card, and load the appointments of this facility. Hold it in the facility's Administration department or in one of its departments or teams. To open an appointment from either list, you also need it at the appointment's facility. By default, the Staff, Doctor, Nurse, Administrator and Facility Admin roles hold it. |
+| Can update bookings on Object | On Patient Home: see the **Appointments** tab. Hold it in the facility's Administration department or in one of its departments or teams. By default, the Staff, Doctor, Nurse and Facility Admin roles hold it. The Administrator role does not. |
+| Can list token on Object | On Patient Home: see the tokens. Hold it in the facility's Administration department or in one of its departments or teams. By default, the Staff, Doctor, Nurse, Administrator and Facility Admin roles hold it. |
+| Can view clinical data about patients | Open the patient's profile. You need it through a role on the patient. By default, the Staff, Doctor, Nurse and Facility Admin roles hold it. |
+| Can list patients | Open the patient's profile, in place of Can view clinical data about patients. You need it in a government organization that covers the patient. If you are assigned to the patient on the **Users** tab, you need neither of these two permissions. By default, the Staff, Doctor, Nurse, Volunteer and Administrator roles hold it. The Pharmacist and Facility Admin roles hold it too, but Care does not offer them for a government organization. |
+| Can Read Tag Config | Open the profile inside a facility, and open Patient Home. Hold it in the facility's Administration department or in one of its departments or teams. A role in a government organization does not count. By default, the Staff, Doctor, Nurse, Pharmacist, Volunteer, Administrator and Facility Admin roles hold it. |
+
+By default, a Staff, Doctor, Nurse or Facility Admin role gives the permissions for the Patient Home steps of this flow. The role can be in the facility's Administration department or in one of its departments or teams.
+
+For the profile, the role must also be a role on the patient. A role in the facility's Administration department counts while the patient has an open encounter at the facility.
+
+Note: Your deployment can let every user open any patient's profile without Can view clinical data about patients or Can list patients. By default, it does not.
## Steps
-### 1. Open Patient Home
+### 1. View the appointments on the profile
+
+Open the patient's profile. See [View a patient's profile](./view-patient-profile.mdx).
+
+Select the **Appointments** tab.
+
+The tab lists the appointments of the patient at every facility. Each appointment shows the name of its facility.
+
+The list has three tabs.
+
+| Tab | What it shows |
+| --- | --- |
+| **Upcoming** | Appointments from today on with one of these statuses: Proposed, Pending, Booked, Arrived, Checked-In, Waitlist or In-Consultation. |
+| **Past** | Appointments before today with one of the **Upcoming** statuses, or with the status Fulfilled or No-show. |
+| **Cancelled** | Appointments on any date that are Cancelled, Entered in Error, Rescheduled or No-show. A No-show appointment shows in both **Past** and **Cancelled**. |
+
+On a wide screen, each tab is a table with **Date**, **Time**, **Resource** and **Status**. On a phone, each appointment is a card with **See Details**.
+
+To open an appointment, select it. Care opens the appointment on **Appointment Details**, at its own facility. You need Can list bookings on Object at that facility to open it.
+
+If a tab has no appointments, it shows "No appointments found".
+
+
+
+### 2. View today's appointment on Patient Home
-Verify the patient's identity from search, or open the patient's profile.
-Care shows Patient Home for that patient.
-Patient Home shows the patient's basic information and a set of tabs.
-The Encounters tab opens first.
+Open Patient Home for the patient. See [Open Patient Home](./open-patient-home.mdx).
-### 2. Use the quick actions
+The **Upcoming Appointment** card shows the patient's appointment today at this facility. It shows only an appointment with one of the **Upcoming** statuses.
-Patient Home offers quick actions for the patient. Your permissions control which
-quick actions appear.
+The card shows the resource, the time and date, the schedule name and the status.
-- Book an appointment for the patient.
-- Create an encounter for the patient.
-- Generate a queue token for the patient.
+To open the appointment, select the card.
-Note: Whether the "Generate Token" quick action appears on Patient Home can also
-depend on your deployment's configuration.
+If the patient has more than one appointment today, the card shows "View all appointments" with the number. Select it to open the **Appointments** tab of Patient Home.
-### 3. View the patient's appointments
+The number counts only today's appointments at this facility with one of the **Upcoming** statuses. The link works only if you can see the **Appointments** tab. See step 3.
-Open the appointments view on Patient Home.
-Care shows the patient's existing appointments.
+
-### 4. View the patient's tokens
+### 3. View the appointments at this facility
-Token view on Patient's Home displays all the existing tokens for the patients
+On Patient Home, select the **Appointments** tab.
+
+The tab lists the appointments of the patient at this facility only.
+
+It has the same **Upcoming**, **Past** and **Cancelled** tabs as the profile.
+
+Note: Care shows this tab only if you hold Can update bookings on Object at this facility. By default, the Administrator role does not hold it.
+
+Note: **Schedule Appointment** on Patient Home opens the **Book Appointment** sheet. Its **Bookings** tab also lists the patient's appointments at this facility, with the same three tabs.
+
+
+
+### 4. View the tokens
+
+On a large screen, the tokens show in a panel at the side of Patient Home. On a smaller screen, select the **Tokens** tab.
+
+The list has the heading **Tokens** and the number of tokens.
+
+The list shows up to 50 tokens of the patient at this facility, for one date. By default, the date is today.
+
+To see the details of a token, select it. The token expands to show its token card.
+
+If the patient has no tokens for that date, Care shows "No tokens available".
+
+
## Expected Outcome
-- You see the patient's basic information on Patient Home.
-- You see the patient's existing appointments, for all facilities or for one facility.
-- You see the patient's queue tokens, for all facilities or for one facility.
+- On the profile, you see the appointments of the patient at every facility.
+- On Patient Home, you see the appointments and tokens of the patient at this facility.
+- You can open a listed appointment on **Appointment Details**.
## Related
Concepts:
- [Patient](../../../concepts/clinical/patient)
+- [Appointment Booking](../../../concepts/scheduling/booking.mdx)
+- [Token](../../../concepts/scheduling/token.mdx)
Flows:
-- [Search for a patient](./search-patient.mdx)
+- [Open Patient Home](./open-patient-home.mdx)
- [View a patient's profile](./view-patient-profile.mdx)
+- [Search for a patient](./search-patient.mdx)
+- [Create a token](../../scheduling/token/create-token.mdx)
diff --git a/versioned_docs/version-3.1/flows/clinical/patient/view-patient-profile.mdx b/versioned_docs/version-3.1/flows/clinical/patient/view-patient-profile.mdx
index 9f2457cd..5c95af2b 100644
--- a/versioned_docs/version-3.1/flows/clinical/patient/view-patient-profile.mdx
+++ b/versioned_docs/version-3.1/flows/clinical/patient/view-patient-profile.mdx
@@ -6,77 +6,199 @@ sidebar_position: 3
## Overview
-This flow describes how to open the profile of a [patient](../../../concepts/clinical/patient) in Care. The profile shows the patient's demographic, contact, and clinical information in tabs.
+This flow describes how to open the profile of a [patient](../../../concepts/clinical/patient) in Care, and what each tab of the profile shows. The profile is the page titled **Patient Details**.
+
+
## Pre-requisites
- The patient is registered in Care.
-- You find the patient through a search, or you open the patient from an Encounter, an Appointment, or another clinical record of that patient.
+- Inside a facility, you have a role in the facility's Administration department or in one of its departments or teams.
+- Care can open the patient for you. This is true in any of these cases:
+ - You have a role on the patient, and that role holds Can view clinical data about patients.
+ - You hold Can list patients in a government organization that covers the patient.
+ - Someone assigned you to the patient on the **Users** tab.
- You have the permissions listed below.
## Permissions
| Permission | Access |
| --- | --- |
-| Can view clinical data about patients | Open the patient's profile and the Clinical History tab. |
-| Can list patients | See the Encounters tab. A permission to list encounters also gives this access. |
-| Can view questionnaire responses on patient | See the Questionnaire Updates tab. |
-| Permission to view appointments | See the Appointments tab. |
-
-Note: Some deployments relax the check for clinical data. Your access to the profile can depend on your deployment's configuration.
+| Can view clinical data about patients | Open the patient's profile, when you hold this permission through a role on the patient. It also shows the **Files** and **Clinical History** tabs. It lists the patient's notes on the **Notes** tab and the files on the **Files** tab. The **Notes** tab always shows, but without this permission Care does not list the notes. By default, the Staff, Doctor, Nurse and Facility Admin roles hold this permission. |
+| Can list patients | Open the patient's profile, when you hold this permission in a government organization that covers the patient. A role in a facility with this permission does not open the patient. Through a role on the patient, this permission also shows the **Encounters** tab. By default, the Staff, Doctor, Nurse, Administrator, Facility Admin, Volunteer and Pharmacist roles hold this permission. The Pharmacist and Facility Admin roles are for facilities only. |
+| Can Read Tag Config | Open Patient Home in step 1, and the profile inside a facility. You need it in the facility's Administration department or in one of its departments or teams. A role in a government organization does not count. By default, the Facility Admin, Administrator, Staff, Doctor, Nurse, Volunteer and Pharmacist roles hold this permission. |
+| Can list bookings on Object | Shows the **Appointments** tab. By default, the Staff, Facility Admin, Doctor, Nurse and Administrator roles hold this permission. |
+| Can view questionnaire responses on patient | Shows the **Updates** tab. By default, the Volunteer, Staff, Doctor, Nurse, Facility Admin, Administrator and Pharmacist roles hold this permission. |
+| Can submit questionnaire about patients | Shows **Add Patient Updates** on the **Updates** tab. By default, the Volunteer, Staff, Doctor, Nurse, Facility Admin and Administrator roles hold this permission. |
+| Can Read Referrals | Shows the **Referrals** tab with the patient's referrals. You need it through a role on the patient. By default, the Administrator, Doctor, Facility Admin, Nurse and Staff roles hold this permission. |
+| Can Create Referrals | Shows the **Referrals** tab with **New Referral**. By default, the same roles as Can Read Referrals hold this permission. |
+| Can update bookings on Object | Shows **Schedule Appointment** at the top of the profile, inside a facility. By default, the Staff, Facility Admin, Doctor and Nurse roles hold this permission. |
+| Can Update a Patient's data | Shows **Edit** in **General Info** and in **Patient Tags**. **Edit** in **General Info** shows only inside a facility. By default, the Staff, Doctor, Nurse, Administrator and Facility Admin roles hold this permission. |
+| Can Read Account | Inside a facility: see the patient's accounts on the **Accounts** tab. The tab always shows, but Care lists the accounts only if you hold this permission in the facility's Administration department or in one of its departments or teams. By default, the Facility Admin, Administrator, Staff, Doctor, Nurse, Volunteer and Pharmacist roles hold this permission. |
+
+Note: Care decides which tabs to show from the permissions of your roles on the patient.
+
+A role on the patient comes, for example, from a role in the department of the patient's open encounter. A role in the Administration department of that encounter's facility also counts. The [patient](../../../concepts/clinical/patient) concept lists every way to have a role on a patient.
## Steps
-### 1. Open the patient
+### 1. Open Patient Home
-Find the patient. Use the steps in [Search for a patient](./search-patient.mdx).
+Search for the patient. See [Search for a patient](./search-patient.mdx).
-Select the patient in the search results. Care opens the patient's profile.
+Select the patient in the results.
-You can also open the profile from a patient's Encounter, Appointment, or other clinical record.
+If Care shows **Verify Patient Identity**, enter the patient's year of birth. Select **Verify**.
-### 2. Read the patient's information
+Care opens Patient Home for the patient.
-The profile shows the patient's information in tabs. Select a tab to read that information.
+For more about Patient Home, see [Open Patient Home](./open-patient-home.mdx).
-| Tab | What it shows |
-| --- | --- |
-| General Info | The patient's core demographic and contact details. |
-| Additional Details | The address, geo-organization, blood group, deceased status, and similar information. |
-| Identifiers | The identifiers configured for the patient. |
-| Patient Tags | The labels attached to the patient record. |
-| Insurance Details | The patient's insurance information. |
-| Social Profile | The patient's social information. |
-| Volunteer Contact | The users assigned to support this patient in the field, for example volunteers. |
+
+
+### 2. Open the profile
+
+On the patient card, select the patient's name. Care opens a pop-up.
+
+In the pop-up, select **View Profile**.
+
+Care opens the patient's profile inside the facility. The page title is **Patient Details**.
+
+You can open the same pop-up from other pages:
+
+- On an encounter, select the patient's name in the header.
+- On an appointment, select the patient's name on the patient card.
+
+If you hold Can list patients in a government organization, you can also start from its **Patients** tab. Select the patient's row, or select **Open**. Care opens the profile without a facility. See [View an organization's patients](./view-organization-patients.mdx).
+
+If Care cannot open the patient for you, the page shows **Patient Not Found** and the message "Not Found". This happens, for example, to a Doctor whose only role is in a department unrelated to the patient's open encounters.
+
+Inside a facility, without Can Read Tag Config in that facility, the page also shows **Patient Not Found**. Care shows the message "Cannot view facility tags".
+
+
+
+### 3. Read the header
+
+The header shows the patient's name, age and sex.
+
+The header also shows each identifier of the patient, with its name and value.
+
+The patient's tags show next to **Patient Tags**.
+
+If the patient is deceased, a red banner shows the **Deceased** badge. The banner shows "Passed away on", then the date and the time of death.
+
+Inside a facility, users with Can update bookings on Object see **Schedule Appointment** at the top of the profile. It opens **Book Appointment**.
+
+
+
+### 4. Use the Actions panel
+
+The **Actions** panel shows next to every tab except **Notes**. It has these items:
+
+- **Patient Home**: inside a facility, this button opens Patient Home for the patient.
+- **Last updated by**: the user who last updated the patient, and when.
+- **Patient profile created by**: the user who created the patient's profile, and when.
-### 3. Open the other tabs
+Your deployment can add other buttons to this panel.
-Care shows more tabs when you have the necessary permissions.
+
-| Tab | What it shows |
+### 5. Read the Demography tab
+
+The profile opens on the **Demography** tab. The tab has these sections.
+
+| Section | What it shows |
| --- | --- |
-| Encounters | The patient's encounters. |
-| Clinical History | The patient's clinical history. |
-| Appointments | The patient's appointments. |
-| Questionnaire Updates | The questionnaire responses recorded for the patient. |
+| **General Info** | **Full Name**, **Phone Number** with **Chat on WhatsApp**, **Date of Birth** with the age, **Sex**, **Blood Group**, **Emergency Contact**, **Current Address and Route to Home** and **Permanent Address**. If only the age is known, the section shows **Year of Birth** instead of **Date of Birth**. The last rows show each level of the patient's geo organization. |
+| **Additional Details** | The extra patient fields that your deployment adds. Care shows this section only when the patient has values in these fields. |
+| **Identifiers** | Each identifier of the patient, with its name and value. This section has no **Edit**. |
+| **Patient Tags** | The tags on the patient. Users who can update the patient see **Edit**. |
+
+Inside a facility, **General Info** has **Edit** for users who can update the patient. To change the details, see [Update a patient's details](./update-patient-details.mdx).
+
+To change the tags, see [Manage patient tags](./manage-patient-tags.mdx).
+
+
+
+### 6. Open the other tabs
+
+Select a tab to open it. Some tabs show only when you hold a permission on the patient.
+
+| Tab | What it shows | When Care shows it |
+| --- | --- | --- |
+| **Appointments** | The patient's appointments at every facility, under **Upcoming**, **Past** and **Cancelled**. See [View a patient's appointments and tokens](./view-patient-appointments.mdx). | With Can list bookings on Object. |
+| **Encounters** | The patient's encounters, five on each page. **View Encounter** opens an encounter. | With Can list patients. |
+| **Updates** | The questionnaire responses about the patient. **Add Patient Updates** opens the patient's questionnaire page. See [View questionnaire responses](../questionnaire-response/view-questionnaire-responses.mdx). | With Can view questionnaire responses on patient. |
+| **Referrals** | The patient's referrals, and **New Referral**. | With Can Read Referrals or Can Create Referrals. |
+| **Requests** | The requests linked to the patient. Inside a facility, **Create Request** opens the **Create Request** form, where you request a resource for this patient. The form links the request to the patient and shows **Linked Patient** with the patient's name. The request comes from the facility that you are in. In **Facility for Care Support**, you can choose the facility that provides the resource. | Always. |
+| **Users** | The users assigned to the patient. See [Manage the users assigned to a patient](./manage-patient-users.mdx). | Always. |
+| **Notes** | The patient's discussions that belong to no encounter. See [Find discussions for a patient or an encounter](../notes/find-discussions.mdx). | Always. |
+| **Files** | The patient's files. See [View or preview a file](../files/view-or-preview-a-file.mdx) and [Upload a file](../files/upload-a-file.mdx). | With Can view clinical data about patients. |
+| **Accounts** | The facility's accounts for this patient. **Create Account** shows for users who can create accounts at the facility. See [View an account](../../billing/account/view-account.mdx) and [Create an account](../../billing/account/create-account.mdx). | Always. |
+| **Clinical History** | Opens the clinical history page of the patient. The page has the tabs **Responses**, **Diagnostic Reports**, **Past Symptoms**, **Past Diagnoses**, **Past Procedures**, **Allergies**, **Past Medications** and **Immunizations**. The workspace that you use for encounters can change these tabs. Select **Back to Patient** to return. For past symptoms and diagnoses, see [Review a patient's symptoms and diagnoses](../condition/view-clinical-history.mdx). | With Can view clinical data about patients. |
+
+The **Notes** tab always shows. Care lists the notes only with Can view clinical data about patients through a role on the patient.
+
+Inside a facility, the **Accounts** tab lists the accounts only if you have Can Read Account at the facility.
+
+Inside a facility, if the patient has no encounters, the **Encounters** tab says "No active encounters found". Users who can create encounters at the facility see **Create Encounter**. See [Create an encounter](../encounter/create-encounter.mdx).
+
+If you opened the profile without a facility, the profile has no **Schedule Appointment** and no **Edit** in **General Info**. **Edit** in **Patient Tags** still shows for users who can update the patient. The **Requests** tab has no **Create Request**.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-Note: Which of these tabs you see depends on your permissions.
+
## Expected Outcome
-- Care shows the patient's profile.
-- You read the patient's information in the tabs that your permissions allow.
+- Care shows the patient's profile, titled **Patient Details**, on the **Demography** tab.
+- Care shows the tabs that your roles on the patient allow.
+- If Care cannot open the patient for you, the page shows **Patient Not Found** and an error message.
## Related
Concepts:
- [Patient](../../../concepts/clinical/patient)
+- [Encounter](../../../concepts/clinical/encounter.mdx)
+- [Questionnaire Response](../../../concepts/clinical/questionnaire-response.mdx)
+- [Files](../../../concepts/clinical/files.mdx)
+- [Notes](../../../concepts/clinical/notes.mdx)
+- [Account](../../../concepts/billing/account.mdx)
Flows:
- [Search for a patient](./search-patient.mdx)
-- [Update patient details](./update-patient-details.mdx)
+- [Open Patient Home](./open-patient-home.mdx)
+- [View an organization's patients](./view-organization-patients.mdx)
+- [Update a patient's details](./update-patient-details.mdx)
+- [Mark a patient as deceased](./mark-patient-deceased.mdx)
+- [Manage a patient's identifiers](./manage-patient-identifiers.mdx)
- [Manage patient tags](./manage-patient-tags.mdx)
-- [Manage patient users](./manage-patient-users.mdx)
+- [Manage the users assigned to a patient](./manage-patient-users.mdx)
- [View a patient's appointments and tokens](./view-patient-appointments.mdx)
diff --git a/versioned_docs/version-3.1/references/clinical/patient.mdx b/versioned_docs/version-3.1/references/clinical/patient.mdx
index ba37e79d..d48f2ee0 100644
--- a/versioned_docs/version-3.1/references/clinical/patient.mdx
+++ b/versioned_docs/version-3.1/references/clinical/patient.mdx
@@ -4,21 +4,32 @@ sidebar_position: 1
# Patient
-Technical reference for the `Patient` module in Care EMR. For a product-oriented overview, see the [Patient concept](../../concepts/clinical/patient).
+Technical reference for the `Patient` module in Care EMR. For what a patient is and who can work with patients, see the [Patient concept](../../concepts/clinical/patient).
-**Source:** [`care/emr/models/patient.py`](https://github.com/ohcnetwork/care/blob/develop/care/emr/models/patient.py)
+The Django model is the storage layer. Several `Patient` columns are JSON fields, and several are caches that Care rebuilds. The model alone does not show what a request must contain.
+
+The Pydantic resource specs are the API layer. They define the enums, the validation, and the request and response shapes.
+
+Source files:
+
+- Model: [`care/emr/models/patient.py`](https://github.com/ohcnetwork/care/blob/develop/care/emr/models/patient.py)
+- Patient specs: [`care/emr/resources/patient/spec.py`](https://github.com/ohcnetwork/care/blob/develop/care/emr/resources/patient/spec.py)
+- Identifier config specs: [`care/emr/resources/patient_identifier/spec.py`](https://github.com/ohcnetwork/care/blob/develop/care/emr/resources/patient_identifier/spec.py)
+- API: [`care/emr/api/viewsets/patient.py`](https://github.com/ohcnetwork/care/blob/develop/care/emr/api/viewsets/patient.py) and [`care/emr/api/viewsets/patient_identifier.py`](https://github.com/ohcnetwork/care/blob/develop/care/emr/api/viewsets/patient_identifier.py)
+- Authorization: [`care/security/authorization/patient.py`](https://github.com/ohcnetwork/care/blob/develop/care/security/authorization/patient.py)
+- Permissions: [`care/security/permissions/patient.py`](https://github.com/ohcnetwork/care/blob/develop/care/security/permissions/patient.py)
## Models
| Model | Purpose |
| --- | --- |
-| `Patient` | Core patient record |
+| `Patient` | A person registered in Care: demographics, contact details, geo organization, and caches for access, identifiers and tags |
| `PatientOrganization` | Links a patient to an `Organization` |
-| `PatientUser` | Grants a `User` access to a patient with a `RoleModel` |
-| `PatientIdentifierConfig` | Defines identifier types (instance-wide or per-facility) |
-| `PatientIdentifier` | Stores an identifier value for a patient |
+| `PatientUser` | Assigns a user to one patient with a role |
+| `PatientIdentifierConfig` | Defines one identifier, deployment-wide (no facility) or for one facility |
+| `PatientIdentifier` | Stores a patient's value for one identifier config |
-All models extend `EMRBaseModel` (shared Care EMR base with `external_id`, audit fields, and soft-delete semantics).
+All five models extend [`EMRBaseModel`](../foundation/base-model.mdx), which gives `external_id`, audit fields, `history`, `meta` and soft delete.
## `Patient` fields
@@ -26,110 +37,485 @@ All models extend `EMRBaseModel` (shared Care EMR base with `external_id`, audit
| Field | Type | Notes |
| --- | --- | --- |
-| `name` | `CharField(200)` | Display name |
-| `gender` | `CharField(35)` | Administrative gender |
-| `date_of_birth` | `DateField` | Nullable; preferred when known |
-| `year_of_birth` | `IntegerField` | Min 1900; used when full DOB is unknown. Auto-set from `date_of_birth` on save |
-| `deceased_datetime` | `DateTimeField` | Set when patient is marked deceased; affects age calculation |
-| `blood_group` | `CharField(16)` | |
+| `name` | `CharField(200)`, default empty | The patient's full name. The API limits it to `PATIENT_NAME_MAX_LENGTH` characters (default 75) |
+| `gender` | `CharField(35)`, default empty | The patient's sex. API: one of the `GenderChoices` values below; required on create |
+| `date_of_birth` | `DateField`, nullable | Optional in the API. When a request gives `age`, Care clears the date of birth |
+| `year_of_birth` | `IntegerField`, nullable | Set from `age` (current year minus age) or from `date_of_birth`. On save, filled from `date_of_birth` when empty. The model declares a minimum of 1900, but API writes do not enforce it: a create with `age` 200 is accepted |
+| `deceased_datetime` | `DateTimeField`, nullable | The time of death. API: optional, timezone-aware and not in the future. Age calculations end at this time |
+| `blood_group` | `CharField(16)` | API: optional, one of the `BloodGroupChoices` values below |
-### Contact & address
+### Contact and address
| Field | Type | Notes |
| --- | --- | --- |
-| `phone_number` | `CharField(14)` | Validated with `mobile_or_landline_number_validator` |
-| `emergency_phone_number` | `CharField(14)` | Same validator |
-| `address` | `TextField` | Current address |
-| `permanent_address` | `TextField` | |
-| `pincode` | `IntegerField` | Nullable |
+| `phone_number` | `CharField(14)`, `validators=[mobile_or_landline_number_validator]`, default empty | The patient's phone number. API: required on create, at most 14 characters, validated as a phone number and stored in E.164 format, with no default region. A number without a country code is refused |
+| `emergency_phone_number` | `CharField(14)`, same validator, default empty | API: optional, with the same validation as `phone_number`. An empty string is refused |
+| `address` | `TextField`, default empty | The patient's current address. API: optional |
+| `permanent_address` | `TextField`, default empty | API: optional |
+| `pincode` | `IntegerField`, nullable, model default `0` | The PIN code. API: optional. Care stores an empty or 0 value as empty |
-### Organization & access caches
+### Geo organization and access caches
+
+| Field | Type | Notes |
+| --- | --- | --- |
+| `geo_organization` | `FK → Organization`, nullable, `SET_NULL` | The patient's geo organization. API: the id (UUID) of an organization of type `govt`; required on create, optional on update |
+| `organization_cache` | `ArrayField(IntegerField)`, default empty | Platform-maintained, rebuilt on every save from the geo organization and its parent organizations. Access checks compare it with the organizations where a user has a role. No API creates `PatientOrganization` links |
+| `users_cache` | `ArrayField(IntegerField)`, default empty | Platform-maintained, rebuilt on every save. The ids of the users assigned to the patient |
-These are **denormalized caches** rebuilt on every `Patient.save()` for fast filtering without deep joins.
+### Identifiers, tags and extensions
-| Field | Type | Rebuilt by |
+| Field | Type | Notes |
+| --- | --- | --- |
+| `instance_identifiers` | `JSONField`, list, nullable | Platform-maintained. One entry per value of a deployment-wide identifier config, with `config` (the config id) and `value` |
+| `facility_identifiers` | `JSONField`, object, nullable | Platform-maintained. Keyed by facility id. Each value is a list of entries with `config` and `value` for that facility's identifier configs |
+| `instance_tags` | `ArrayField(IntegerField)`, default empty | Ids of the deployment-wide tag configs applied to the patient |
+| `facility_tags` | `JSONField`, object, nullable | Keyed by facility id. Each value is that facility's list of tag config ids |
+| `tags_data` | `JSONField`, default empty | Tag expiry data |
+| `extensions` | `JSONField`, default empty | Extension data, checked per key on write (see API integration notes) |
+
+### Inherited from `EMRBaseModel`
+
+| Field | Type | Notes |
| --- | --- | --- |
-| `geo_organization` | `FK → Organization` | Geographic/administrative org assignment |
-| `organization_cache` | `ArrayField[int]` | `rebuild_organization_cache()` — includes `geo_organization` parent chain and all linked `PatientOrganization` orgs |
-| `users_cache` | `ArrayField[int]` | `rebuild_users_cache()` — user IDs from `PatientUser` rows |
+| `external_id` | `UUIDField`, unique | The patient id in the API |
+| `created_date` | `DateTimeField` | Set when the record is created |
+| `modified_date` | `DateTimeField` | Set on every save |
+| `created_by`, `updated_by` | `FK → User`, nullable, `SET_NULL` | The users who created and last updated the record |
+| `deleted` | `BooleanField`, default false | Soft delete. Deleting sets the flag and keeps the row; the default manager hides such rows |
+| `history`, `meta` | `JSONField`, default empty | `meta` also stores request fields that have no model column |
+
+## Enum values
+
+### `gender` values (`GenderChoices`)
+
+| Value |
+| --- |
+| `male` |
+| `female` |
+| `non_binary` |
+| `transgender` |
+
+### `blood_group` values (`BloodGroupChoices`)
+
+| Value |
+| --- |
+| `A_negative` |
+| `A_positive` |
+| `B_negative` |
+| `B_positive` |
+| `AB_negative` |
+| `AB_positive` |
+| `O_negative` |
+| `O_positive` |
+| `unknown` |
+
+### Identifier `use` values (`PatientIdentifierUse`)
+
+| Value |
+| --- |
+| `usual` |
+| `official` |
+| `temp` |
+| `secondary` |
+| `old` |
+
+### Identifier config `status` values (`PatientIdentifierStatus`)
+
+| Value |
+| --- |
+| `draft` |
+| `active` |
+| `inactive` |
+
+`get_instance_config()` and `get_facility_config()` return only `active` configs.
+
+## Nested JSON shapes
+
+### `IdentifierConfig` (`PatientIdentifierConfig.config`)
-### Identifiers & tags
+| Field | Type | Notes |
+| --- | --- | --- |
+| `use` | `PatientIdentifierUse` | Required |
+| `description` | `str` | Default empty |
+| `system` | `str` | Required. Error messages name the identifier by its system |
+| `required` | `bool` | Required in the request. A required identifier sent with an empty value is refused |
+| `unique` | `bool` | Required in the request. A value that another patient already has for the same config is refused |
+| `regex` | `str` | Required in the request. A value that does not match it is refused |
+| `display` | `str` | Required. The display name |
+| `retrieve_config` | `PatientIdentifierRetrieveConfig` | Search settings; see below |
+| `default_value` | `str`, optional | An expression that Care evaluates to fill a value; see below |
+| `auto_maintained` | `bool`, default false | Care maintains the value. Create and update ignore values sent for it, and `update_identifier` refuses it |
+
+### `PatientIdentifierRetrieveConfig` (`retrieve_config`)
| Field | Type | Notes |
| --- | --- | --- |
-| `instance_identifiers` | `JSONField` | List of `{config, value}` built from `PatientIdentifier` rows (instance-scoped configs) |
-| `facility_identifiers` | `JSONField` | Dict keyed by `facility_id` → list of `{config, value}` |
-| `instance_tags` | `ArrayField[int]` | Instance-level tag IDs |
-| `facility_tags` | `JSONField` | Dict keyed by facility → tag IDs |
-| `extensions` | `JSONField` | Open extension bag for deployment-specific metadata |
+| `retrieve_with_dob` | `bool`, default false | |
+| `retrieve_with_year_of_birth` | `bool`, default false | An identifier search with this config returns partial results |
+| `retrieve_with_otp` | `bool`, default false | |
+| `retrieve_partial_search` | `bool`, default false | Each word of the search value must appear in the stored value, case-insensitive. When false, the value must match exactly |
+
+### Default value expressions
+
+A `default_value` is an expression. It can use these variables:
+
+- `patient_count`: the number of identifiers already issued for that config.
+- `current_year_yyyy`: the current year, with four digits.
+- `current_year_yy`: the current year, with two digits.
+
+Care fills a default value only when the patient has no value for that config yet:
-Identifier values live in `PatientIdentifier` and are materialized into the JSON caches via `build_instance_identifiers()` and `build_facility_identifiers(facility_id)`.
+1. When a patient is created: for each active deployment-wide config that has a `default_value`.
+2. When an encounter is created: for each active config of the encounter's facility. Care then rebuilds `facility_identifiers` for that facility.
+
+An update does not fill default values.
+
+### Identifier entries (`instance_identifiers`, `facility_identifiers`)
+
+`instance_identifiers` is a list of entries. `facility_identifiers` is an object keyed by facility id, and each value is a list of entries for that facility's configs.
+
+| Field | Type | Notes |
+| --- | --- | --- |
+| `config` | `str` | The identifier config id (`external_id`) |
+| `value` | `str` | The patient's value |
+
+### `facility_tags`
+
+An object keyed by facility id. Each value is that facility's list of tag config ids.
+
+### `PatientIdentifierConfigRequest` (items of `identifiers`)
+
+| Field | Type | Notes |
+| --- | --- | --- |
+| `config` | `UUID4` | The identifier config id |
+| `value` | `str` | The patient's value |
+
+### `TagSetRequest` (items of `tags`)
+
+| Field | Type | Notes |
+| --- | --- | --- |
+| `tag` | `UUID4` | The tag config id |
+| `expiry_offset` | `ExpiryOffset`, optional | `days`, `hours`, `minutes` and `seconds`. Used when the tag config allows the expiry to be changed |
## Related models
### `PatientOrganization`
-```text
-patient → FK Patient
-organization → FK Organization
-```
+Links a patient to an organization.
-Saving a `PatientOrganization` triggers `patient.save()`, which rebuilds `organization_cache`.
+| Field | Type |
+| --- | --- |
+| `patient` | `FK → Patient`, `CASCADE` |
+| `organization` | `FK → Organization`, `CASCADE` |
+
+Saving a link saves the patient, which rebuilds `organization_cache`. No API endpoint creates or changes these links.
### `PatientUser`
-Grants a Care user access to a patient record.
+Assigns a user to one patient with a role. The role counts as a role on the patient, and the patient appears in the user's patient list.
+
+| Field | Type |
+| --- | --- |
+| `user` | `FK → User`, `CASCADE` |
+| `patient` | `FK → Patient`, `CASCADE` |
+| `role` | `FK → RoleModel`, `PROTECT` |
+
+Saving an assignment saves the patient, which rebuilds `users_cache`. Removing a user through the API also saves the patient.
-```text
-user → FK User
-patient → FK Patient
-role → FK RoleModel (PROTECT)
-```
+### `PatientIdentifierConfig`
-Saving a `PatientUser` triggers `patient.save()`, which rebuilds `users_cache`.
+| Field | Type | Notes |
+| --- | --- | --- |
+| `status` | `CharField(255)` | One of the `PatientIdentifierStatus` values |
+| `facility` | `FK → Facility`, nullable, `CASCADE` | Empty for a deployment-wide config |
+| `config` | `JSONField`, nullable | Shape: `IdentifierConfig` |
+
+The facility detail response carries the active deployment-wide and facility configs, as `patient_instance_identifier_configs` and `patient_facility_identifier_configs`.
-### `PatientIdentifier` / `PatientIdentifierConfig`
+### `PatientIdentifier`
-`PatientIdentifierConfig` defines what identifiers exist (status, optional facility scope, JSON config). `PatientIdentifier` stores the actual value:
+| Field | Type | Notes |
+| --- | --- | --- |
+| `patient` | `FK → Patient`, `CASCADE` | |
+| `config` | `FK → PatientIdentifierConfig`, `CASCADE` | |
+| `value` | `CharField(1024)`, indexed | The identifier value |
+| `facility` | optional | |
-```text
-patient → FK Patient
-config → FK PatientIdentifierConfig
-facility → FK Facility (nullable)
-value → CharField(1024), indexed
-```
+### `PatientIdentifierConfigCache`
-`PatientIdentifierConfigCache` provides in-process caching for configs (`get_instance_config()`, `get_facility_config(facility_id)`).
+A helper class in the model file that returns identifier configs:
+
+- `get_config()` keeps serialized configs in an in-process dictionary.
+- `get_instance_config()` queries the active deployment-wide configs on each call and reads each config from Django's shared cache.
+- `get_facility_config(facility_id)` does the same for the active configs of one facility.
+
+## Resource specs (API schema)
+
+`PatientBaseSpec` is an `EMRResource` with `__model__ = Patient` and the `patient` extension resource type.
+
+Its `__exclude__` list keeps `geo_organization`, `instance_identifiers`, `facility_identifiers`, `instance_tags` and `facility_tags` from being copied directly between a request and the model.
+
+| Spec | Role | Notes |
+| --- | --- | --- |
+| `PatientBaseSpec` | shared | `name` and `gender` required; `phone_number` required, at most 14 characters; `emergency_phone_number`, `address`, `permanent_address`, `pincode`, `deceased_datetime` and `blood_group` optional |
+| Create spec | write · create | `name` at most `PATIENT_NAME_MAX_LENGTH` characters; `geo_organization` (UUID) required; `date_of_birth` and `age` optional; `identifiers` and `tags` lists, default empty |
+| Update spec | write · update | Every field optional, including `name`, `gender` and `phone_number`; `geo_organization` optional; `identifiers` list; no `tags` field |
+| `PatientListSpec` | read · list | Base fields plus `date_of_birth`, `year_of_birth`, `created_date`, `modified_date` and `instance_tags`. Adds `facility_tags` when the request names a facility. No identifiers |
+| `PatientRetrieveSpec` | read · detail | Extends the list spec and `PatientPermissionsMixin`. Adds `geo_organization` (an organization object), `created_by`, `updated_by`, `instance_identifiers`, `facility_identifiers`, `extensions` and `permissions` |
+| `PatientPartialSpec` | read · search | `name`, `gender`, `phone_number` and `partial_id` only |
+| `PatientIdentifierConfigRequest` | nested · write | `config` (UUID) and `value` |
+| `PatientIdentifierResponse` | nested · read | `config` and `value` |
+| `TagSetRequest` | nested · write | `tag` (UUID) and an optional `expiry_offset` |
+
+In the detail response, `facility_identifiers` holds the entries of one facility, and only when the request names that facility.
+
+The detail response's `permissions` list holds the `PATIENT` and `FACILITY` context permissions of every role that the user has on the patient.
+
+### Server-maintained behaviour
+
+- Care saves only the request fields whose value differs from the spec default.
+- Request fields that have no model column go to the record's `meta`.
+- When a request gives `age`, Care clears `date_of_birth` and sets `year_of_birth` to the current year minus `age`. Otherwise `year_of_birth` comes from `date_of_birth`.
+- Care stores an empty or 0 `pincode` as empty.
+- On update, Care ignores `id`, `external_id`, `patient` and `encounter` in the request.
+- PATCH works exactly like PUT.
+- On create, Care validates the data before it checks the permission. On update, Care first opens the patient, then validates the data, then checks the permission.
+- Care takes one deployment-wide lock (`PatientCreateLock`) while it creates a patient.
+- Care creates the patient, its identifiers, its default identifier values and its tags in one transaction. If a tag is refused, no patient is created.
+- No backend rule blocks editing a deceased patient or creating an encounter for one.
+
+### Identifiers in create and update
+
+- A create request must use deployment-wide identifier configs. A facility config gives "not found".
+- Create and update ignore values sent for auto-maintained configs.
+- On update, an identifier sent with an empty value is removed. An identifier sent with a value replaces the stored value, or is created.
+- After an update, Care rebuilds `instance_identifiers`.
+
+### Validation messages
+
+| Rule | Message |
+| --- | --- |
+| `phone_number` or `emergency_phone_number` is not a valid phone number, for example a number without a country code, or an empty emergency number | `value is not a valid phone number` |
+| `deceased_datetime` is in the future | `Deceased datetime cannot be in the future` |
+| A date and time has no timezone | `Datetime must be timezone aware` |
+| `geo_organization` is not an organization of type `govt` | `Geo Organization does not exist` |
+| A required identifier is sent with an empty value | `Identifier config is required` |
+| Another patient already has the value for a unique config (on update, the patient being edited does not count) | `Identifier config is not unique` |
+| The value does not match the config's `regex` | `Identifier config is not valid` |
+| `date_of_birth` is after the date of death | `Date of birth cannot be after the date of death` |
+| The year of birth, from `age` or stored, is after the year of death | `Year of birth cannot be after the year of death` |
+| Another patient create holds the lock | `Patient creation failed, try again after a while` |
+| Extension data fails the check of its handler | `Invalid extensions` |
## Methods & save behaviour
### Age
-- `get_age() → str` — human-readable age (years, months, days) relative to `deceased_datetime` or now
-- `age → int` — whole years only
-
-Both use `date_of_birth` when present, otherwise `year_of_birth` (January 1).
+- `get_age() -> str` counts from `date_of_birth`, or from 1 January of `year_of_birth`. It counts up to `deceased_datetime`, or up to now.
+- It returns whole years when the age is one year or more, for example "34 years".
+- Under one year, it returns months, plus days when there are any. Under one month, it returns days.
+- When no full day has passed, it returns "0 days".
+- The `age` property returns whole years as an integer, with the same start and end.
### `save()` side effects
-On every save:
+1. If `date_of_birth` is set and `year_of_birth` is empty, Care sets `year_of_birth` from `date_of_birth`.
+2. `rebuild_organization_cache()` refills `organization_cache`.
+3. `rebuild_users_cache()` refills `users_cache`.
+4. A second `save(update_fields=["organization_cache", "users_cache"])` stores both caches.
+
+Expect two write passes for each save through the ORM. Saving a `PatientOrganization` or a `PatientUser` also saves the patient.
+
+### Identifier JSON fields
+
+- `build_instance_identifiers()` writes `instance_identifiers` from the patient's values for deployment-wide configs.
+- `build_facility_identifiers(facility_id)` writes the entry for one facility in `facility_identifiers`.
-1. If `date_of_birth` is set and `year_of_birth` is empty → `year_of_birth` is derived
-2. `rebuild_organization_cache()` runs
-3. `rebuild_users_cache()` runs
-4. A second `save(update_fields=["organization_cache", "users_cache"])` persists the caches
+Care calls `build_instance_identifiers()` after an update, and `build_facility_identifiers()` when an encounter is created. After `update_identifier`, it calls the method that matches the config.
-Integrators should expect **two write passes** when creating or updating patients through the ORM.
+### System-maintained identifiers
+
+Signal handlers keep three identifiers in step with patient data. The handlers load when the EMR app starts, and each one depends on a setting.
+
+| Setting (default) | Identifier | Updated when |
+| --- | --- | --- |
+| `MAINTAIN_PATIENT_NAME_IDENTIFIER` (off) | Deployment-wide. System `system.care.ohc.network/patient-name`, display "Patient Name", partial search | Every patient save |
+| `MAINTAIN_PATIENT_PHONE_NUMBER_IDENTIFIER` (off; on in the local development settings) | Deployment-wide. System `system.care.ohc.network/patient-phone-number`, display "Patient Phone Number", retrieve with year of birth | Every patient save |
+| `MAINTAIN_FACILITY_PATIENT_NAME_IDENTIFIER` (on) | A name identifier for each facility | An encounter is saved at that facility, or an appointment with a practitioner resource is saved. Renaming the patient does not update it |
+
+The configs that Care creates for these identifiers are active, `secondary` use, not required, not unique and auto-maintained.
## API integration notes
-- Patient records are exposed through Care's REST API and FHIR `Patient` resources; field names in API payloads may differ from Django model names.
-- Use `instance_identifiers` / `facility_identifiers` JSON for read-optimized identifier lookup; write through `PatientIdentifier` for consistency.
-- `extensions` is the supported place for custom key-value data without schema migrations.
-- `users_cache` and `organization_cache` are maintained by the platform — do not set them directly from clients.
+- All routes are under `/api/v1/`. The patient API is `/api/v1/patient/`.
+- A successful create answers 200, not 201.
+- Clinical resources, such as allergy, symptom, diagnosis and observation, are nested under `/api/v1/patient//`.
+- The patient `id` in the API is the model's `external_id`.
+- Every API view needs a signed-in user. The patient viewset adds no other global check.
+- Lists use limit and offset pagination: 14 items per page by default, and at most 200.
+- A validation error returns 400 with an `errors` list. Each item has `type` `validation_error` and a `msg`.
+- A patient that the user cannot open returns 404 with `type` `object_not_found`.
+- Do not set `organization_cache`, `users_cache`, `instance_identifiers` or `facility_identifiers` from a client. Care rebuilds them.
+- Write identifiers with `identifiers` in a create or update request, or with `update_identifier`.
+- Care checks `extensions` key by key. A key that has no registered extension handler is dropped without an error.
+- Care registers an extension handler named `core` for patients. It validates the data against the JSON schema in the environment variable `CORE_EXTENSIONS_PATIENT_WRITE`.
+- The patient portal uses `/api/v1/otp/patient/`, with patient OTP sign-in instead of a staff account.
+- The portal lists the patients with the verified phone number, and creates patients with that number.
+- A portal create needs `age` or `date_of_birth`, and `address`, `pincode` and `geo_organization`.
+
+### Access to a patient
+
+A role on the patient is a role that the user holds in one of these places:
+
+Here, a department is any `FacilityOrganization` of a facility: a department, a team, or the facility's Administration department.
+
+- A department linked to an open encounter of the patient, any department above it, or the Administration department of that encounter's facility.
+- A department of that open encounter's current location.
+- The patient's geo organization, or one of its parent organizations.
+- A direct assignment on the patient (`PatientUser`).
+
+An open encounter has a status other than `completed`, `cancelled`, `entered_in_error` and `discontinued`.
+
+A role counts only when it holds the permission that the check names.
+
+A user can open a patient when one of these is true:
+
+- `PATIENT_GLOBAL_EDIT_ACCESS_ENABLED` is on. Then any signed-in user can open any patient.
+- The user has "Can view clinical data about patients" through a role on the patient.
+- The user has "Can list patients" in an organization, not a department, that is in the patient's `organization_cache`.
+- The user is assigned to the patient.
+
+This rule applies to the detail request and to the actions that load the patient first, such as `get_users`, `add_user` and `update_identifier`.
+
+If no condition is true, the answer is 404, not 403. Care looks the patient up inside the set of patients that the user can open.
+
+The patient list holds the patients whose `organization_cache` overlaps the organizations where the user has "Can list patients". It also holds the patients assigned to the user.
+
+Roles in departments do not put a patient in the list.
+
+When a list, detail or `search_retrieve` request names a facility, Care also runs the facility tag check.
+
+The facility tag check needs "Can Read Tag Config" in the facility's Administration department or in one of its departments or teams. A role in a government organization does not count.
+
+If the facility tag check fails, the request fails with `Cannot view facility tags`.
+
+### Permissions
+
+The role lists below are the defaults. A deployment can add custom roles, and plugs can register more roles.
+
+Each permission sync resets the permissions of the system roles to these defaults.
+
+| Permission | Context | Checked for | Default roles |
+| --- | --- | --- | --- |
+| Can Create Patient | `PATIENT` | Creating a patient. Counts in a department of any facility, or in any organization | Staff, Doctor, Nurse, Administrator, Facility Admin; Admin in a responsibility |
+| Can Update a Patient's data | `PATIENT` | Updating a patient, `update_identifier`, the tag actions, `add_user` and `delete_user`. Counts through a role on the patient | Staff, Doctor, Nurse, Administrator, Facility Admin |
+| Can list patients | `PATIENT` | The patient list and opening a patient: counts in an organization in `organization_cache`. Opening the patient's encounters: counts through a role on the patient | Staff, Doctor, Nurse, Administrator, Facility Admin, Volunteer, Pharmacist |
+| Can view clinical data about patients | `PATIENT` | Opening a patient, and the questionnaire responses of an encounter. Counts through a role on the patient | Staff, Doctor, Nurse, Facility Admin |
+| Can view questionnaire responses on patient | `PATIENT` | Viewing the patient's questionnaire responses without an encounter. Counts through a role on the patient | Volunteer, Staff, Doctor, Nurse, Facility Admin, Administrator, Pharmacist |
+| Can submit questionnaire about patients | `PATIENT` | Submitting or updating a questionnaire response that has no encounter. Counts through a role on the patient | Volunteer, Staff, Doctor, Nurse, Facility Admin, Administrator |
+| Can Read Patient Identifier Config | `FACILITY` | Searching with a facility identifier config, and reading facility configs. Counts in a department of that facility | Facility Admin, Administrator, Staff, Doctor, Nurse, Volunteer, Pharmacist |
+| Can Read Tag Config | `FACILITY` | The facility tag check. Counts in the facility's Administration department or in one of its departments or teams | Facility Admin, Administrator, Staff, Doctor, Nurse, Volunteer, Pharmacist |
+| Can Apply Tag Config to Resources | `FACILITY` | Applying or removing each tag. Counts in the tag config's managing department or organization, or one above it. With no managing organization: a department of the tag's facility, or any department for a deployment-wide tag | Facility Admin, Staff, Doctor, Nurse, Pharmacist |
+| Can list bookings on Object | `FACILITY` | `get_appointments` with a facility. Counts in a department of that facility | Staff, Facility Admin, Doctor, Nurse, Administrator |
+| Can list token on Object | `FACILITY` | `get_tokens` with a facility. Counts in a department of that facility | Staff, Facility Admin, Doctor, Nurse, Administrator |
+
+### Endpoints
+
+| Endpoint | Permission | Notes |
+| --- | --- | --- |
+| `GET /api/v1/patient/` | "Can list patients" in an organization in the patient's `organization_cache`, or assigned to the patient | Filters: `name` (contains, case-insensitive), `phone_number` (exact, case-insensitive), `organization`. Ordering: `created_date`, `modified_date`. With `facility`: the facility tag check |
+| `GET /api/v1/patient//` | The opening rule | With `facility`: adds that facility's identifiers and tags, and runs the facility tag check |
+| `POST /api/v1/patient/` | "Can Create Patient" in a department of any facility, or in any organization. Each tag also needs "Can Apply Tag Config to Resources" | Create spec. Care validates the data before the permission check |
+| `PUT` or `PATCH /api/v1/patient//` | The opening rule, then "Can Update a Patient's data" through a role on the patient | With `PATIENT_GLOBAL_EDIT_ACCESS_ENABLED` on, the permission counts in any department or organization. Refused: `Cannot Update Patient` |
+| `POST /api/v1/patient/search/` | Sign-in only. A facility identifier config needs "Can Read Patient Identifier Config" in a department of that facility | See Patient search |
+| `POST /api/v1/patient/search_retrieve/` | Sign-in only. With `facility`: the facility tag check | See Patient search |
+| `GET /api/v1/patient//get_users/` | The opening rule | The assigned users' details, without their roles |
+| `POST /api/v1/patient//add_user/` | The opening rule, then "Can Update a Patient's data" | Body: `user` and `role` ids. Refused when the user is already assigned: `User already exists` |
+| `POST /api/v1/patient//delete_user/` | The opening rule, then "Can Update a Patient's data" | Body: `user`. Refused when the user is not assigned: `User does not exist` |
+| `GET /api/v1/patient//get_appointments/` | Without `facility`: the opening rule. With `facility`: "Can list bookings on Object" in a department of that facility | With `facility`, only that facility's appointments. Refused: `Cannot list bookings` |
+| `GET /api/v1/patient//get_tokens/` | Without `facility`: the opening rule. With `facility`: "Can list token on Object" in a department of that facility | With `facility`, only that facility's tokens. Refused: `Cannot list tokens` |
+| `POST /api/v1/patient//update_identifier/` | The opening rule, then "Can Update a Patient's data" | Body: `config` and `value`. See Identifier updates |
+| `POST /api/v1/patient//set_instance_tags/`, `POST /api/v1/patient//remove_instance_tags/` | The opening rule, "Can Update a Patient's data", and "Can Apply Tag Config to Resources" for each tag | Body: `tags`. Deployment-wide tag configs only |
+| `POST /api/v1/patient//set_facility_tags/`, `POST /api/v1/patient//remove_facility_tags/` | As the deployment-wide tag actions, plus the facility tag check | Body: `tags` and `facility`. Tag configs of that facility only |
+| `POST /api/v1/patient/upsert/` | "Can Create Patient" for each new patient; "Can Update a Patient's data" for each existing patient | Body: `datapoints`, at most `MAX_DATAPOINTS_PER_UPSERT` (default 100), else `Too many datapoints provided`. A datapoint with an `id` updates that patient |
+| `GET /api/v1/patient_identifier_config/`, `GET /api/v1/patient_identifier_config//` | Deployment-wide configs: sign-in only. Facility configs: "Can Read Patient Identifier Config" in a department of that facility | Filters: `facility`, `status`, `display` (contains). Without `facility`, the list holds only deployment-wide configs. Refused: `You do not have permission to read patient identifier configs` |
+
+### Patient search
+
+- `POST /api/v1/patient/search/` takes `phone_number`, or `config` and `value`. It also takes an optional `facility` and `page_size`.
+- It returns at most 100 patients, newest first.
+- The response has `partial` (true or false) and `results`.
+- A phone-number search matches the stored phone number exactly and returns partial results.
+- An identifier search returns full detail records. It returns partial results when the config has `retrieve_with_year_of_birth`.
+- An identifier search matches the value exactly, unless the config has `retrieve_partial_search`.
+- A partial result holds only `name`, `gender`, `phone_number` and `partial_id`, the first 5 characters of the patient id. Its `id` is a random UUID, not the patient id.
+- To get the full record from a partial result, call `POST /api/v1/patient/search_retrieve/` with `phone_number`, `year_of_birth` and `partial_id`.
+- `search_retrieve` returns the patient whose phone number and year of birth match, and whose id starts with `partial_id`.
+
+| Rule | Message |
+| --- | --- |
+| The search has neither a phone number nor a config | `Either phone number or config is required` |
+| The config does not exist | `Config not found` |
+| An identifier search has no value | `Value is required` |
+| A facility config search without "Can Read Patient Identifier Config" in that facility | `Cannot search for patient identifier configs in this facility` |
+| No patient matches a `search_retrieve` request (403) | `No valid patients found` |
+
+### Identifier updates
+
+`POST /api/v1/patient//update_identifier/` changes one identifier value:
+
+- It refuses auto-maintained configs: `Cannot update auto maintained identifier`.
+- It refuses an empty value for a required config: `Value is required`.
+- It runs the unique and regex checks on a value that is not empty.
+- An empty value removes the patient's identifier for that config.
+- It then rebuilds `facility_identifiers` for a facility config, or `instance_identifiers` for a deployment-wide config.
+- The response is the patient detail without facility identifiers.
+
+### Tags
+
+- Deployment-wide tags use tag configs that have no facility. Facility tags use tag configs of the facility in the request.
+- A create request applies its `tags` as deployment-wide tags. The update request has no `tags` field.
+- A tag id that matches no usable tag config is skipped without an error.
+- Only one tag from the same tag group (the same parent tag) can be on the patient.
+- A tag config with `autoset_expiry` and an `expiry_offset` in its expiry settings sets an expiry time when the tag is applied.
+- If the tag config allows it, `expiry_offset` in the request sets the expiry time.
+- An expired tag is shown with `expired` set to true, and a background task removes it.
+- The list response always renders deployment-wide tags. It renders facility tags only when the request names a facility.
+
+| Rule | Message |
+| --- | --- |
+| The tag is already on the patient | `Tag already set` |
+| The tag is not on the patient | `Tag not set` |
+| The tag config is for another resource type | `Tag resource does not match resource type` |
+| A tag from the same tag group is already on the patient | `Tag Parent is already set` |
+| The user lacks "Can Apply Tag Config to Resources" for the tag | `You do not have permission to apply tag ''` or `You do not have permission to remove tag ''` |
+
+### Settings
+
+| Setting | Default | Effect |
+| --- | --- | --- |
+| `PATIENT_NAME_MAX_LENGTH` | 75 | Maximum length of `name` on create and update |
+| `PATIENT_GLOBAL_EDIT_ACCESS_ENABLED` | off | When on, any signed-in user can open any patient, and "Can Update a Patient's data" counts in any department or organization |
+| `MAINTAIN_PATIENT_NAME_IDENTIFIER` | off | Maintains the deployment-wide "Patient Name" identifier |
+| `MAINTAIN_PATIENT_PHONE_NUMBER_IDENTIFIER` | off (on in the local development settings) | Maintains the deployment-wide "Patient Phone Number" identifier |
+| `MAINTAIN_FACILITY_PATIENT_NAME_IDENTIFIER` | on | Maintains a name identifier for each facility |
+| `MAX_APPOINTMENTS_PER_PATIENT` | 10 | More appointments are refused: `Patient already has maximum number of appointments ()` |
+| `MAX_ACTIVE_ENCOUNTERS_PER_PATIENT_IN_FACILITY` | 5 | More active encounters at one facility are refused: `Patient already has maximum number of active encounters () in the facility` |
+| `MAX_DATAPOINTS_PER_UPSERT` | 100 | Maximum datapoints in one `upsert` request |
+| `LOCK_TIMEOUT` | 32 seconds | Used by the patient-create lock |
## Related
- Concept: [Patient](../../concepts/clinical/patient)
-- Flow: [Register a patient](../../flows/clinical/patient/register-patient)
-- Source: [patient.py on GitHub](https://github.com/ohcnetwork/care/blob/develop/care/emr/models/patient.py)
+- Flow: [Register a patient](../../flows/clinical/patient/register-patient.mdx)
+- Flow: [Search for a patient](../../flows/clinical/patient/search-patient.mdx)
+- Flow: [Update a patient's details](../../flows/clinical/patient/update-patient-details.mdx)
+- Flow: [Manage a patient's identifiers](../../flows/clinical/patient/manage-patient-identifiers.mdx)
+- Flow: [Manage patient tags](../../flows/clinical/patient/manage-patient-tags.mdx)
+- Flow: [Manage the users assigned to a patient](../../flows/clinical/patient/manage-patient-users.mdx)
+- Flow: [View a patient's appointments and tokens](../../flows/clinical/patient/view-patient-appointments.mdx)
+- Reference: [Encounter](./encounter.mdx) · [Organization](../access-governance/organization.mdx) · [Role](../access-governance/role.mdx) · [Tagging](../platform/tag-config.mdx) · [Facility](../facility/facility.mdx)
+- Reference: [Base models & conventions](../foundation/base-model.mdx)
+- Source (model): [patient.py on GitHub](https://github.com/ohcnetwork/care/blob/develop/care/emr/models/patient.py)
+- Source (specs): [resources/patient on GitHub](https://github.com/ohcnetwork/care/tree/develop/care/emr/resources/patient) · [resources/patient_identifier on GitHub](https://github.com/ohcnetwork/care/tree/develop/care/emr/resources/patient_identifier)
+- Source (API): [viewsets/patient.py on GitHub](https://github.com/ohcnetwork/care/blob/develop/care/emr/api/viewsets/patient.py)
diff --git a/versioned_sidebars/version-3.1-sidebars.json b/versioned_sidebars/version-3.1-sidebars.json
index 3b2a2c43..b8c68a18 100644
--- a/versioned_sidebars/version-3.1-sidebars.json
+++ b/versioned_sidebars/version-3.1-sidebars.json
@@ -29,13 +29,15 @@
"items": [
"flows/clinical/patient/search-patient",
"flows/clinical/patient/register-patient",
+ "flows/clinical/patient/open-patient-home",
"flows/clinical/patient/view-patient-profile",
"flows/clinical/patient/update-patient-details",
+ "flows/clinical/patient/mark-patient-deceased",
"flows/clinical/patient/manage-patient-identifiers",
"flows/clinical/patient/manage-patient-tags",
- "flows/clinical/patient/mark-patient-deceased",
"flows/clinical/patient/manage-patient-users",
- "flows/clinical/patient/view-patient-appointments"
+ "flows/clinical/patient/view-patient-appointments",
+ "flows/clinical/patient/view-organization-patients"
]
},
{