Table of Contents |
---|
...
- DLS.healthcare_service_license register is managed by NHS: when new data inserts - previous should be cleared. Register must contain only actual license statuses for healthcare services.
- NHS sets license statuses for healthcare services selected from healthcare_services table (see table specs)
- Data in register should be updated at least once in twenty-four hours
- eHealth performs replication of healthcare_service_license table from DLS to PRM database, saving statuses in PRM.licensed_healthcare_services table, log history on PRM.
- PRM.licensed_healthcare_services table isn't clears. The new records are inserts, existing - updates.
...
Field name | Type | M/O | Description |
---|---|---|---|
healthcare_service_id | uuid | M | Identifier of the healthcare service in eHealth as primary key. Corresponds to prm.healthcare_services.id (see table specs) |
license_status | varchar(50) | M | Status of the license for healthcare service in the division of the legal entity with MSP or PHARMACY license type. Allowed values: ACTIVE, INACTIVE |
inserted_at | timestamp | M | Date of data insert. Sets automatically |
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
create table healthcare_service_license ( healthcare_service_id uuid not null constraint healthcare_service_id_pkey primary key, license_status varchar(50) not null, inserted_at timestamp without time zone not nulltimestamp default CURRENT_TIMESTAMP not null ); comment on table healthcare_service_license is ’Stores'Stores license statuses for healthcare services of divisions in legal entities with MSP or PHARMACY licenses. Manages by NHS’NHS'; comment on column healthcare_service_license.healthcare_service_id is ‘Id'Id of the healthcare service of the division in eHealth’eHealth'; comment on column healthcare_service_license.license_status is ‘Status'Status of the license for healthcare_service_id of division in legal entity with MSP or PHARMACY license’license'; alter table healthcare_service_license owner to db; |
...
- Search healthcare service in PRM.licensed_healthcare_services table by healthcare_service_id:
- If not found - insert new record. Set all fields in PRM.licensed_healthcare_services.
- if found - update PRM.licensed_healthcare_service.status.
- Log status history to PRM.licensed_healthcare_services_status_history table
Influence
TBD