DRAFT
Schema
Examples
Services - Service Groups relations example
Composite Service example - TBC
Data Model
Service
Name | Type | M/O | Description |
---|---|---|---|
id | UUID | M | |
code | string | M | |
name | string | M | |
is_active | boolean | M | |
category | string | M | enum |
is_composition | boolean | M | for future use |
request_allowed | boolean | M | |
inserted_at | datetime | M | |
inserted_by | datetime | M | |
updated_at | datetime | M | |
updated_by | datetime | M |
Service group
Name | Type | M/O | Description |
---|---|---|---|
id | UUID | M | |
code | string | M | |
name | string | M | |
is_active | boolean | M | |
parent_id | UUID | O | |
request_allowed | boolean | M | |
inserted_at | datetime | M | |
inserted_by | datetime | M | |
updated_at | datetime | M | |
updated_by | datetime | M |
Service in group
Name | Type | M/O | Description |
---|---|---|---|
id | UUID | M | |
service_id | UUID | M | |
group_id | UUID | M | |
alias | string | O | |
is_active | boolean | M | |
inserted_at | datetime | M | |
inserted_by | datetime | M | |
updated_at | datetime | M | |
updated_by | datetime | M |
Programs (existing reimbursement medical_programs table is used)
This entity defines medical programs information structure.
Name | Type | M/O | Description and constraints | Status |
---|---|---|---|---|
id | uuid | M | ||
is_active | boolean | M | ||
name | varchar | M | ||
inserted_at | timestamp | M | ||
inserted_by | uuid | M | ||
updated_at | timestamp | M | ||
updated_by | uuid | M | ||
same_mnn_in_treatment_period | boolean | M | Not used for service programs | |
type | varchar | M | medication, service | NEW |
legal_entity_types | jsonb | M | Used for service programs, array of legal_entity_types dictionary values. Program can be set on service request if it were created by an employee from legal entity with one of types listed in array | NEW |
Program_services (new table)
Name | Type | M/O | Description and constraints | Status |
---|---|---|---|---|
id | uuid | M | ||
service_id | uuid | O | service_id OR service_group_id is mandatory | |
program_id | uuid | M | ||
service_group_id | uuid | O | service_id OR service_group_id is mandatory | |
request_allowed | boolean | M | ||
consumer_price | double | M | ||
description | text | O | used for text description of un-automated conditions which should be checked for program member vs patient qualification (e.g. sex or age of patient) | |
is_active | boolean | M | ||
inserted_at | timestamp | M | ||
inserted_by | uuid | M | ||
updated_at | timestamp | M | ||
updated_by | uuid | M |
contract_program_members (new table)
Name | Type | M/O | Description and constraints | Status |
---|---|---|---|---|
id | uuid | M | ||
contract_id | uuid | M | FK(contract_id) | |
program_member_id | uuid | M | FK(program_members) | |
is_active | boolean | M | ||
inserted_at | timestamp | M | ||
inserted_by | uuid | M | ||
updated_at | timestamp | M | ||
updated_by | uuid | M |