To be able to make the link between these HealthFacilities and then assess whether the referral is "normal" or should be subject to a Malus, it is first necessary to make the link between different Health Facilities.
The Health Facilities modification form must therefore be modified to add a list of Health Facilities linked to a Health Facility.
It is not possible to select the same Health Facility linked to a Health Facility several times (the list of selectable Health Facilities must therefore be modified each time a health facility is added, modified or deleted).
In order to keep track of these referrals and the premium calculation in the future, a history of these values (based on the ValidityTo / ValidityFrom mechanics) on the link between two healthFacilities will have to be set up.
On backend you will have to add new elements in the healthFacilities object to do a recursive link to Health Facilities.
You have to manage it as a configuration in the core module to be sure you activate this functionnality only if configuration is true in the Module Configuration.
You will also need to manage GQL Mutations to manage adding multiple HF to a HF.
Please implement rules on backend to check if HF are present just one time in the list of hierarchical.
Please also implement update of those fields correctly in order to be sure
To be able to make the link between these HealthFacilities and then assess whether the referral is "normal" or should be subject to a Malus, it is first necessary to make the link between different Health Facilities.
The Health Facilities modification form must therefore be modified to add a list of Health Facilities linked to a Health Facility.
It is not possible to select the same Health Facility linked to a Health Facility several times (the list of selectable Health Facilities must therefore be modified each time a health facility is added, modified or deleted).
In order to keep track of these referrals and the premium calculation in the future, a history of these values (based on the ValidityTo / ValidityFrom mechanics) on the link between two healthFacilities will have to be set up.
On backend you will have to add new elements in the healthFacilities object to do a recursive link to Health Facilities.
You have to manage it as a configuration in the core module to be sure you activate this functionnality only if configuration is true in the Module Configuration.
You will also need to manage GQL Mutations to manage adding multiple HF to a HF. Please implement rules on backend to check if HF are present just one time in the list of hierarchical. Please also implement update of those fields correctly in order to be sure