This project will allow patient alerts to be automatically created, when a product is charged.
The sale of certain products implies that the patient has some condition – for example there are various special diet foods for patients with kidney, liver, etc problems.
One also may want to indicate that a patient has had some procedure performed.
We run a manual system in which certain products are given a category/product group that indicates that it this product is invoiced then the patient should be given a corresponding alert.
We have a report that looks for sales of certain products and checks that the patient has the associated alert set - if not the staff need to manually set this alert.
This project will automate this process. That is, one will be able to specify that if a given product is sold then the associated alert is set for the patient.
The existing Patient Alert Type lookup lookup.patientAlertType will be replaced with an entity.patientAlertType, and extended to add the following fields:
Duration - if specified, this sets the duration for the alert. If not set, then the alert is open ended
Interactive - check this box if you want confirmation when this type of alert is generated as a result of selling a product to which the alert is attached
Reason - you can provide a default reason for the alert (such as 'Product Sale')
Hence when a product that has associated patient alert(s) is sold, the process is just like that for reminders. If the Interactive flag is set for the alert, then the alert details are presented and can be modified.
End Date is set from the Duration (blank if no duration has been set, or the current date plus the duration),
Reason is set to that (if any) on the Patient Alert Type
Status is set to In Progress
Priority is set from the Patient Alert Type,
Start Date is set to the current date
The existing product.medication, product.merchandise and product.service archetypes will have a Patient Alerts node added to allow multiple patient alerts to be specified.
The existing act.patientAlert archetype will be extended to add a Product node.
The existing act.customerAccountInvoiceItem will be extended to link to any alerts created when a product was invoiced. This will allow the alerts to be removed if the product is changed, or the item removed.
If an alert sets an existing alert Completed, but is then subsequently deleted (either via manual deletion, changing the product on the invoice item, or removing the invoice item), the existing alert is not set In Progress.
If invoicing a product extends an existing alert, the alert will be deleted if the invoice item is deleted or the product is changed
A Patient Alert Check report will be provided as a standard report to allow sales to be checked to see if the patient has the appropriate alert(s) set.
Migration will be required to:
convert lookup.patientAlertType to entity.patientAlertType
replace the existing alertType node of act.patientAlert with a participation relationship