General
License verification used for healthcare services linked with divisions that relates to legal entities with MSP or PHARMACY license type. The special register is used as source for the license verification - service_license table in DLS (DataLicenseStorage) database. Each update event triggers replication app which replicates this data to eHealth PRM database. After that Processor app starts and perform actions in eHealth described below.
Key points:
- DLS.service_license register is managed by NHS: before inserting new data, the previous should be cleared
- 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 perform online replicatiaon of service_license table from DLS to PRM database.
- PRM.licensed_healthcare_services table has never been cleared and serves as history too.
PRM Replica structure
Replicted data stores in prm.service_license table:
Field name | Type | M/O | Description |
---|---|---|---|
id | uuid | M | Unique identifier of the table entry. Sets automatically |
healthcare_service_id | uuid | M | Identifier of the healthcare service in eHealth. 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 |
Processor
Each entry in PRM.service_license should be processed with next logic:
- Search healthcare service in PRM.licensed_healthcare_services table by healthcare_service_id:
- If not found - insert new record
- if found - update PRM.licensed_healthcare_service.status = PRM.service_license.status
Influence
TBD