Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Concepts/Facility: Difference between revisions

From OHC Network Wiki
More languages
Content deleted Content added
OHC identity seed
 
Sync from docs repo (facility concept rewrite, 3.1) (via update-page on MediaWiki MCP Server)
 
(One intermediate revision by the same user not shown)
Line 3: Line 3:
|domain=facility
|domain=facility
|title=Facility
|title=Facility
|summary=A hospital, clinic, health center, or other place that provides care to patients — the top-level unit that holds departments, users, patients, and encounters.
|order=1
|order=1
|introduced=3.0
|introduced=3.0
Line 9: Line 10:
}}
}}


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.
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.


== What it represents ==
== Key Attributes ==


{| class="wikitable"
In Care's FHIR-aligned model, a facility maps to the '''Organization''' resource, specialized as a physical or virtual care site. It captures:
|-

! Components !! What 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
| Facility Name || The name of the facility. This is required.
* '''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
| Description || A description of the facility. This is optional, and it supports formatted text.
* '''Billing''' — its own discount codes, tax components, and invoice-number format
|-

| Facility Type || The kind of facility. This is required.
A facility is not a department or a ward — those are [[References/Location|locations]] and [[Concepts/Facility Organization|facility organizations]] ''within'' it. The facility is the outer container; the same [[Concepts/Patient|patient]] can be seen across many facilities while remaining one person, but staff roles, inventory, and invoices never cross the facility line.
|-

| Features || The services or capabilities available at the facility. This is optional, and you can choose any number of them.
== Lifecycle ==
|-

| Phone Number || The contact number of the facility. This is required.
A facility comes with its administrative scaffolding pre-built — you never assemble the hierarchy by hand.
|-

| Address || The street address of the facility. This is required.
<syntaxhighlight lang="text">Create → Administration org provisioned → Active → (soft) Deleted</syntaxhighlight>
|-
* '''Create''' — the record is created with its name, type, address, and the geographic region it belongs under
| PIN Code || The 6-digit postal code of the facility. This is required.
* '''Administration org provisioned''' — Care automatically creates a root <code>Administration</code> 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
| Geo Organization || The government administrative area that the facility belongs to. This is required.
* '''Deleted''' — removal is a soft delete; the facility and its child organizations are kept for history and audit, never erased
|-

| Latitude || The map coordinate of the facility from north to south. This is optional.
== How it connects ==
|-

| Longitude || The map coordinate of the facility from west to east. This is optional.
The facility is the hub most other primitives hang off of:
|-

| Make this facility public || Whether the facility appears in the public facility directory. This is optional.
* '''People''' — staff gain access through the facility's organizations; every role and permission is scoped to a facility
|-
* '''Places &amp; equipment''' — [[References/Location|locations]] (wards, beds, rooms), [[References/Healthcare Service|healthcare services]], and [[References/Device|devices]] are registered under it
| Cover Photo || An image that Care shows on the page of the facility. This is optional.
* '''Care delivery''' — [[Concepts/Encounter|encounters]] take place at a facility, anchoring where care was given
|}
* '''Geography''' — each facility sits under a geographic [[Concepts/Organization|organization]], the bridge that connects it to the wider administrative map
* '''Billing''' — discounts, taxes, and invoice numbering are set per facility (see [[References/Facility Config|Facility config]])


== Permissions ==
== Permissions ==

Access to a facility is governed by a small set of permissions, granted to staff through their facility organization roles.


{| class="wikitable"
{| class="wikitable"
|-
|-
! Permission
! Permission !! What it allows
! Description
! System Roles
|-
|-
| Can Create on Facility || Create a new facility.
| <code>can_create_facility</code>
| Create a new facility
| Administrator, Admin, Facility Admin
|-
|-
| Can Update on Facility || Edit the details of a facility.
| <code>can_update_facility</code>
|-
| Edit a facility's details and configuration, including its cover image, monetary config, and invoice expression
| Can Create Facility Organizations || Create departments or teams in a facility.
| Facility Admin, Administrator, Admin, Staff
|-
| 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.
|}
|}


{{Note|1=Only a system administrator can delete a facility. Deletion does not use one of the permissions above.}}
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|1=When you create a facility, Care creates a default Administration department for it. Care also adds you to that department as its Facility Admin.}}


{{Navbox facility}}
Permissions cascade down the organization tree: a role held at a parent organization applies to the facilities and sub-organizations beneath it.


{{Related}}
{{Related}}