-
Notifications
You must be signed in to change notification settings - Fork 4
Add Facility flow docs for 3.1 #48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,58 +4,106 @@ sidebar_position: 1 | |
|
|
||
| # Facility | ||
|
|
||
| A **facility** in Care is a single care site — a hospital, clinic, lab, or telemedicine endpoint — and the boundary that everything inside a deployment is scoped to. Patients are registered, staff are organized, locations and devices are added, and billing is configured all within one facility. | ||
|
|
||
| ## What it represents | ||
|
|
||
| In Care's FHIR-aligned model, a facility maps to the **Organization** resource, specialized as a physical or virtual care site. It captures: | ||
|
|
||
| - **Identity** — a name, description, and a facility type (Private Hospital, Primary Health Centres, Govt Labs, TeleMedicine, and many more) | ||
| - **Place** — address, pincode, latitude/longitude, and a contact number | ||
| - **Capabilities** — what the site can offer, such as CT Scan, Maternity Care, X-Ray, Neonatal Care, Operation Theater, or Blood Bank | ||
| - **Geographic placement** — the government/administrative region it sits under, which is how deployments roll facilities up into districts and states | ||
| - **Billing** — its own discount codes, tax components, and invoice-number format | ||
|
|
||
| A facility is not a department or a ward — those are [locations](../../references/facility/location.mdx) and [facility organizations](../access-governance/facility-organization.mdx) *within* it. The facility is the outer container; the same [patient](../clinical/patient) can be seen across many facilities while remaining one person, but staff roles, inventory, and invoices never cross the facility line. | ||
|
|
||
| ## Lifecycle | ||
|
|
||
| A facility comes with its administrative scaffolding pre-built — you never assemble the hierarchy by hand. | ||
|
|
||
| ```text | ||
| Create → Administration org provisioned → Active → (soft) Deleted | ||
| ``` | ||
|
|
||
| - **Create** — the record is created with its name, type, address, and the geographic region it belongs under | ||
| - **Administration org provisioned** — Care automatically creates a root `Administration` organization inside the facility and grants the creator the Facility Admin role over it, so the site has a working tree from day one | ||
| - **Active** — patients are registered, staff are assigned, locations and devices are added, and encounters happen | ||
| - **Deleted** — removal is a soft delete; the facility and its child organizations are kept for history and audit, never erased | ||
|
|
||
| ## How it connects | ||
|
|
||
| The facility is the hub most other primitives hang off of: | ||
|
|
||
| - **People** — staff gain access through the facility's organizations; every role and permission is scoped to a facility | ||
| - **Places & equipment** — [locations](../../references/facility/location.mdx) (wards, beds, rooms), [healthcare services](../../references/facility/healthcare-service.mdx), and [devices](../../references/facility/device.mdx) are registered under it | ||
| - **Care delivery** — [encounters](../clinical/encounter.mdx) take place at a facility, anchoring where care was given | ||
| - **Geography** — each facility sits under a geographic [organization](../access-governance/organization.mdx), the bridge that connects it to the wider administrative map | ||
| - **Billing** — discounts, taxes, and invoice numbering are set per facility (see [Facility config](../../references/facility/facility-config.mdx)) | ||
| ## Definition | ||
|
|
||
| A **facility** in Care is a hospital, clinic, health center, or other place that provides care to patients. . The facility is the top-level unit that holds departments, users, patients, and encounters. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Two problems on this line. There is a stray double period: |
||
|
|
||
| ## Key Attributes | ||
|
|
||
| | Components | What it captures | | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A |
||
| | --- | --- | | ||
| | Facility Name | The name of the facility. This is required. | | ||
| | Description | A description of the facility. This is optional, and it supports formatted text. | | ||
| | Facility Type | The kind of facility. This is required. | | ||
| | Features | The services or capabilities available at the facility. This is optional, and you can choose any number of them. | | ||
| | Phone Number | The contact number of the facility. This is required. | | ||
| | Address | The street address of the facility. This is required. | | ||
| | PIN Code | The 6-digit postal code of the facility. This is required. | | ||
| | Geo Organization | The government administrative area that the facility belongs to. This is required. | | ||
| | Latitude | The map coordinate of the facility from north to south. This is optional. | | ||
| | Longitude | The map coordinate of the facility from west to east. This is optional. | | ||
| | Make this facility public | Whether the facility appears in the public facility directory. This is optional. | | ||
| | Cover Photo | An image that Care shows on the page of the facility. This is optional. | | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
|
||
| {/* | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This large |
||
|
|
||
| ### Facility Type | ||
|
|
||
| Facility Type records the kind of facility. Select one of these values: | ||
|
|
||
| - Educational Inst | ||
| - Private Hospital | ||
| - Other | ||
| - Hostel | ||
| - Hotel | ||
| - Lodge | ||
| - TeleMedicine | ||
| - Govt Labs | ||
| - Private Labs | ||
| - Primary Health Centres | ||
| - Family Health Centres | ||
| - Community Health Centres | ||
| - Taluk Hospitals | ||
| - Women and Child Health Centres | ||
| - District Hospitals | ||
| - Govt Medical College Hospitals | ||
| - Co-operative hospitals | ||
| - Autonomous healthcare facility | ||
| - COVID-19 Domiciliary Care Center | ||
| - First Line Treatment Centre | ||
| - Second Line Treatment Center | ||
| - Shifting Centre | ||
| - Covid Management Center | ||
| - Request Approving Center | ||
| - Request Fulfilment Center | ||
| - District War Room | ||
| - Clinical Non Governmental Organization | ||
| - Non Clinical Non Governmental Organization | ||
| - Community Based Organization | ||
|
|
||
| ### Features | ||
|
|
||
| Features record the services and capabilities that the facility gives to patients. Select any number of these values: | ||
|
|
||
| - CT Scan Facility | ||
| - Maternity Care | ||
| - X-Ray Facility | ||
| - Neonatal Care | ||
| - Operation Theater | ||
| - Blood Bank | ||
|
|
||
| ### Geo Organization | ||
|
|
||
| Geo Organization records the government administrative area that the facility belongs to. Select a specific area. If the area you select still has sub-areas under it, select one of those sub-areas. | ||
|
|
||
| ### Latitude and Longitude | ||
|
|
||
| Latitude and Longitude record the position of the facility on a map. You can type the coordinates. You can also select **Get Current Location**, and Care fills in the coordinates for you. | ||
|
|
||
| ### Make this facility public | ||
|
|
||
| Select **Make this facility public** to show the facility in the public facility directory. Anyone can browse the public facility directory without a sign-in. | ||
| */} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This whole block is commented out with |
||
|
|
||
| ## Permissions | ||
|
|
||
| Access to a facility is governed by a small set of permissions, granted to staff through their facility organization roles. | ||
|
|
||
| | Permission | Description | System Roles | | ||
| | --- | --- | --- | | ||
| | `can_create_facility` | Create a new facility | Administrator, Admin, Facility Admin | | ||
| | `can_update_facility` | Edit a facility's details and configuration, including its cover image, monetary config, and invoice expression | Facility Admin, Administrator, Admin, Staff | | ||
| | Permission | What it allows | | ||
| | --- | --- | | ||
| | Can Create on Facility | Create a new facility. | | ||
| | Can Update on Facility | Edit the details of a facility. | | ||
| | Can Create Facility Organizations | Create departments or teams in a facility. | | ||
| | Can Manage Facility Organizations | Rename or edit the departments or teams of a facility. | | ||
| | Can Delete Facility Organizations | Delete the departments or teams of a facility. | | ||
| | Can List Users in a Facility Organizations | See the users in a department of a facility. | | ||
| | Can Manage Users in a Facility Organization | Add a user to a department of a facility, remove a user from it, or change the role of a user in it. | | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Five of these seven rows are facility-organization permissions, not facility permissions.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This table lists five facility-organization permissions that |
||
|
|
||
| Reading a facility is not gated by a dedicated permission — the list and retrieve endpoints return only the facilities a user can reach through their organization memberships. Deleting a facility is restricted to super admins. | ||
| Note: Only a system administrator can delete a facility. Deletion does not use one of the permissions above. | ||
|
|
||
| Permissions cascade down the organization tree: a role held at a parent organization applies to the facilities and sub-organizations beneath it. | ||
| Note: When you create a facility, Care creates a default Administration department for it. Care also adds you to that department as its Facility Admin. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
|
|
||
| ## Related | ||
|
|
||
| - Reference: [Facility (technical)](../../references/facility/facility.mdx) | ||
| - Reference: [Facility config](../../references/facility/facility-config.mdx) | ||
| - Concept: [Organization](../access-governance/organization.mdx) | ||
| - Flow: [Create a facility](../../flows/facility/create-facility.mdx) | ||
| - Flow: [View a facility](../../flows/facility/view-facility.mdx) | ||
| - Flow: [Update facility details](../../flows/facility/update-facility-details.mdx) | ||
| - Flow: [Delete a facility](../../flows/facility/delete-facility.mdx) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Related block lost every link the previous version carried: the technical reference (
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "label": "Facility", | ||
| "position": 2, | ||
| "key": "facility-flows" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| --- | ||
| sidebar_position: 1 | ||
| --- | ||
|
|
||
| # Create a facility | ||
|
|
||
| ## Overview | ||
|
|
||
| This flow describes how to create a new [facility](../../concepts/facility/facility.mdx) in Care. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Mirroring gap (applies to this whole PR). The shared conventions keep |
||
|
|
||
| ## Pre-requisites | ||
|
|
||
| - You are signed in to Care. | ||
| - You can access the organization that the facility belongs to. | ||
| - You have the permission listed below. | ||
|
|
||
| ## Permissions | ||
|
|
||
| | Permission | Access | | ||
| | --- | --- | | ||
| | Can Create on Facility | Lets you create a facility for an organization. | | ||
|
|
||
| ## Steps | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Flow section headings do not match the flow skill, which specifies |
||
|
|
||
| ### 1. Open the organization | ||
|
|
||
| Open the organization that the facility belongs to. Go to its **Facilities** section. | ||
|
|
||
| ### 2. Start a new facility | ||
|
|
||
| Select **Add Facility**. Care shows this option only if you have the permission listed above. | ||
|
|
||
| Care opens the **Add New Facility** form. | ||
|
|
||
| ### 3. Fill in the Facility Information | ||
|
|
||
| | Components | What it captures | | ||
| | --- | --- | | ||
| | Facility Type (required) | The type of the facility. Choose one type from the list. | | ||
| | Facility Name (required) | The name of the facility. | | ||
| | Description (optional) | More details about the facility. This field supports formatted text. | | ||
| | Features (optional) | The capabilities of the facility. Choose any number of features. | | ||
| | Phone Number (required) | The contact number of the facility. | | ||
| | PIN Code (required) | The 6-digit PIN code of the facility. | | ||
| | Geo Organization (required) | The government administrative area of the facility. | | ||
| | Address (required) | The address of the facility. | | ||
| | Latitude (optional) | The latitude of the facility. | | ||
| | Longitude (optional) | The longitude of the facility. | | ||
|
|
||
| To fill latitude and longitude from your browser, select **Get Current Location**. | ||
|
|
||
| To show the facility in the public facility directory, select **Make this facility public**. Anyone can browse this directory without a sign-in. | ||
|
|
||
| ### 4. Save the facility | ||
|
|
||
| Select **Create Facility**. | ||
|
|
||
| ## Expected Outcome | ||
|
|
||
| - Care creates the facility for the organization. | ||
| - Care creates a default **Administration** department for the facility. | ||
| - Care adds you to the **Administration** department as its Facility Admin. | ||
|
|
||
| ## Related | ||
|
|
||
| Concepts: | ||
|
|
||
| - [Facility](../../concepts/facility/facility.mdx) | ||
|
|
||
| Flows: | ||
|
|
||
| - [View a facility](./view-facility.mdx) | ||
| - [Update facility details](./update-facility-details.mdx) | ||
| - [Delete a facility](./delete-facility.mdx) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| --- | ||
| sidebar_position: 4 | ||
| --- | ||
|
|
||
| # Delete a facility | ||
|
|
||
| ## Overview | ||
|
|
||
| This flow describes how a system administrator deletes a [facility](../../concepts/facility/facility.mdx) in Care. | ||
|
|
||
| ## Pre-requisites | ||
|
|
||
| - The facility is registered in Care. | ||
| - You are a system administrator in Care. | ||
|
|
||
| ## Permissions | ||
|
|
||
| | Permission | Access | | ||
| | --- | --- | | ||
| | Super Admin | Super admin access to the instance. | | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "Super Admin" is not a permission — |
||
|
|
||
| ## Steps | ||
|
|
||
| ### 1. Open the facility settings | ||
|
|
||
| Open the facility. Select **Settings**. Select **General**. | ||
|
|
||
| ### 2. Start the deletion | ||
|
|
||
| Go to the **Danger Zone** section. Select **Delete Facility**. | ||
|
|
||
| ### 3. Confirm the facility name | ||
|
|
||
| Care asks you to type the facility name to confirm. Type the word Delete, then a space, then the facility name. Type the text exactly. Confirm the action. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Describe the confirmation with the real string rather than in the abstract. |
||
|
|
||
| ## Expected Outcome | ||
|
|
||
| - Care removes the facility. | ||
| - The action is permanent. Care no longer shows the records of the facility. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is factually wrong. |
||
|
|
||
| ## Related | ||
|
|
||
| Concepts: | ||
|
|
||
| - [Facility](../../concepts/facility/facility.mdx) | ||
|
|
||
| Flows: | ||
|
|
||
| - [Create a facility](./create-facility.mdx) | ||
| - [View a facility](./view-facility.mdx) | ||
| - [Update facility details](./update-facility-details.mdx) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| --- | ||
| sidebar_position: 3 | ||
| --- | ||
|
|
||
| # Update facility details | ||
|
|
||
| ## Overview | ||
|
|
||
| This flow describes how to change the details and the cover photo of a [facility](../../concepts/facility/facility.mdx) in Care. | ||
|
|
||
| ## Pre-requisites | ||
|
|
||
| - The facility is registered in Care, and you have access to it. | ||
| - You have the permissions listed below. | ||
|
|
||
| ## Permissions | ||
|
|
||
| | Permission | Access | | ||
| | --- | --- | | ||
| | Can Update on Facility | Lets you change the details and the cover photo of the facility. | | ||
|
|
||
| ## Steps | ||
|
|
||
| ### 1. Open the facility settings | ||
|
|
||
| Open the facility. Select **Settings**. Select **General**. | ||
|
|
||
| ### 2. Edit facility details | ||
|
|
||
| Select **Edit Facility Details**. | ||
|
|
||
| Care opens a form with the title **Edit Facility**. The form shows the current details of the facility. | ||
|
|
||
| ### 3. Change the details | ||
|
|
||
| Change any of these fields: | ||
|
|
||
| | Components | What it captures | | ||
| | --- | --- | | ||
| | Facility Type | The type of the facility. | | ||
| | Facility Name | The name of the facility. | | ||
| | Description | A short description of the facility. | | ||
| | Features | The services that the facility gives. | | ||
| | Phone Number | The contact number of the facility. | | ||
| | PIN Code | The postal code of the facility. | | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Step 5 sends the reader back to a page they are already on and the wording is vague. Suggested, as a single instruction per sentence: "Go to Settings, then General. Select Edit Cover Photo. Upload the new image." Also, the flow skill uses |
||
| | Geo Organization | The government administrative area of the facility. | | ||
| | Address | The address of the facility. | | ||
| | Latitude | The latitude of the facility location. | | ||
| | Longitude | The longitude of the facility location. | | ||
| | Make this facility public | Whether the facility appears in the public facility directory. | | ||
|
|
||
| ### 4. Save the changes | ||
|
|
||
| Select **Update Facility**. | ||
|
|
||
| Note: Care keeps this button disabled until you change a field. | ||
|
|
||
| ### 5. Change the cover photo | ||
|
|
||
| Go back to **Settings**, then **General**. Select **Edit Cover Photo**. Change the cover image of the facility. | ||
|
|
||
| ## Expected Outcome | ||
|
|
||
| - Care saves the new details of the facility. | ||
| - Care shows the new details and the new cover photo on the facility page. | ||
|
|
||
| ## Related | ||
|
|
||
| Concepts: | ||
|
|
||
| - [Facility](../../concepts/facility/facility.mdx) | ||
|
|
||
| Flows: | ||
|
|
||
| - [Create a facility](./create-facility.mdx) | ||
| - [View a facility](./view-facility.mdx) | ||
| - [Delete a facility](./delete-facility.mdx) | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two issues on this line. There is a stray double period:
to patients. . The facility. Also, per the concept skill the page opens with the H1 followed directly by a 1–2 sentence definition and then## What it represents— a## Definitionheading is not part of the structure. Suggested: delete the## Definitionheading and fix to...that provides care to patients. The facility is the top-level unit....