L
Leaphealth - OSDocs

Departments & Resources

How to organise your centre into departments and manage physical resources.

Departments & Resources

Departments organize a centre into clinical or administrative units (Cardiology, Radiology, Admin). Resources represent physical assets like rooms and equipment that can be tracked and assigned.

Creating Departments

Each department belongs to a specific centre and requires:

  • Department Name: display name (e.g., 'Cardiology', 'Emergency', 'Administration')
  • Department Code: unique identifier within the centre (e.g., 'CARDIO-001'). Must be unique per centre, not globally
  • Description: optional text describing the department's role
  • Parent Department: optional — link to another department to create a hierarchy

Hierarchical Departments

Departments support parent-child relationships for creating sub-departments:

  • A department can have a parent department, creating a tree structure
  • Example: 'Internal Medicine' can have sub-departments 'Gastroenterology' and 'Endocrinology'
  • Multi-level hierarchies are supported (sub-departments can have their own sub-departments)
  • The parent department must belong to the same centre

Department Status

Departments can be toggled active or inactive. Deactivating a department hides it from new assignments but does not affect existing staff linkages.


Staff-Department Assignments

Staff members are linked to departments through a many-to-many relationship:

  • A staff member can belong to multiple departments
  • One department is marked as the primary department for each staff member
  • Assignments track who made the assignment and when
  • Removing an assignment is a soft delete — the record is retained with a removal timestamp, allowing re-assignment later

If a staff member is already assigned to a department (and not removed), attempting to assign again will return an error.


Managing Resources

Resources represent physical assets within a centre such as consultation rooms, diagnostic equipment, or beds.

Resource Fields

Field

Required

Description

Resource Name

Yes

Display name (e.g., 'Consultation Room 1')

Resource Code

Yes

Unique per centre (e.g., 'CR-001')

Resource Type

Yes

Category — validated against tenant-configured types

Quantity

No

Number of units (defaults to 1)

Status

No

ACTIVE, MAINTENANCE, or RETIRED (defaults to ACTIVE)

Location Description

No

Physical location (e.g., 'Ground Floor, Wing A')

Notes

No

Additional operational notes

Resource Types

Resource types are tenant-configurable. Each tenant defines its allowed resource types in the tenant configuration (e.g., ROOM, EQUIPMENT, BED, VEHICLE). When creating a resource, the type must match one of the tenant's configured types.

If you try to create a resource with a type not defined in your tenant configuration, the request will be rejected.

Resource Status Lifecycle

Resources have three statuses:

Status

Meaning

ACTIVE

Available for use and assignments

MAINTENANCE

Temporarily unavailable (e.g., under repair)

RETIRED

Permanently decommissioned — no longer in use

You can transition between any statuses. A retired resource can be reactivated if needed.

Filtering Resources

When listing resources, you can filter by:

  • Centre: required — all resources belong to a specific centre
  • Status: optional — filter by ACTIVE, MAINTENANCE, or RETIRED
  • Resource Type: optional — filter by category (e.g., only rooms)
departmentsresourcesroomsequipmentorganisation

Last updated on

On this page