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 | |
parent_id | UUID | O | for future use (composition_id) |
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 | |
program_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_members (should we use existing reimbursement program_medications table )
Name | Type | M/O | Description and constraints | Program_medications table comparison | Status |
---|---|---|---|---|---|
id | uuid | M | ok | ||
service_id | uuid | O | service_id OR service_group_id is mandatory | medication_id (M) | |
program_id | uuid | M | medical_program_id | ||
service_group_id | uuid | O | service_id OR service_group_id is mandatory | - | |
request_allowed | boolean | M | medication_request_allowed | ||
? | jsonb | M | Reimbursement : jsonb | reimbursement | |
? | double | M | wholesale_price | ||
consumer_price | double | M | ok | ||
? | double | M | reimbursement_daily_dosage | ||
? | double | M | estimated_payment_amount | ||
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 | ok | ||
inserted_at | timestamp | M | ok | ||
inserted_by | uuid | M | ok | ||
updated_at | timestamp | M | ok | ||
updated_by | uuid | M | ok |
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 |