L
Leaphealth - OSDocs

Package Configuration

Package types, validity rules, session limits, centre scope, family sharing, and redemption settings.

Package Configuration

Packages bundle multiple services or sessions at a discounted rate. They support count-based, date-range, and membership models with centre-scoping and family sharing options.

Packages vs Individual Bookings

Packages provide pre-paid service bundles. When a patient redeems a package session, no separate billing occurs — the payment was made at package purchase.

Package Type Definitions

Package types are tenant-configurable via the package_types column in tenant types:

[  {    "code": "COUNT_BASED",    "label": "Session Package",    "is_active": true,    "sort_order": 1  },  {    "code": "DATE_RANGE",    "label": "Validity Package",    "is_active": true,    "sort_order": 2  },  {    "code": "MEMBERSHIP",    "label": "Membership Plan",    "is_active": true,    "sort_order": 3  }]

Field

Type

What It Does

code

string

Package type identifier (COUNT_BASED, DATE_RANGE, MEMBERSHIP)

label

string

Display name shown to patients and staff

is_active

boolean

Whether this package type is available for creation

sort_order

number

Display ordering in the package type selector

Package Settings

Each package has these configurable properties:

{  "validity_days": 90,  "session_count": 10,  "centre_scope": "SINGLE_CENTRE",  "valid_centre_ids": [    1  ],  "is_shareable": false,  "max_family_members": null,  "is_active": true}

Field

Type

Default

What It Does

validity_days

number or null

null

How many days the package is valid after activation (null = no expiry)

session_count

number or null

null

Total number of sessions included (null = unlimited within validity)

centre_scope

enum

SINGLE_CENTRE

Where the package can be used

valid_centre_ids

array

[]

Specific centre IDs where this package is valid

is_shareable

boolean

false

Whether family members can use this package

max_family_members

number or null

null

Maximum family members who can share (null = unlimited if shareable)

is_active

boolean

-

Whether this package is currently available for purchase

Centre Scope Options

Scope

What It Means

SINGLE_CENTRE

Package can only be redeemed at one specific centre

MULTI_CENTRE

Package can be used at selected centres (listed in valid_centre_ids)

ALL_CENTRES

Package works at any centre in the hospital network

Package-Service Relationships

Each package contains one or more services. The package-service relationship defines which services are included and any limits:

Field

Type

What It Does

package_id

number

The package this service belongs to

service_id

number

The included service

session_limit

number or null

Max sessions for this specific service (null = uses package total)

custom_duration_minutes

number or null

Override slot duration for package bookings

Package Redemption Tracking

When a patient uses a package session, the system tracks:

  • Sessions used vs total session_count
  • Validity window from activation date + validity_days
  • Centre compliance — redemption must be at a valid centre
  • Family member tracking if the package is shareable
  • Config version at the time of redemption for audit trail

What's Next

  • Billing Settings — How package purchases are billed
  • Service Configuration — Services that can be included in packages
  • Settings Reference — All package-related fields in one place
packagesconfigurationsessionsmembership

Last updated on

On this page