Hi all! I'm designing a data model for an alert to show up for various providers.
Alerts will show up in most modules, such as if pharmacy stock is low, or emergency patient is assigned to a doctor, or pharmacist needs a doctor to approve a prescription, etc.
The alert will have various data such as:
-patient
-sender (provider)
-recipient (provider)
-time
-type of alert (lab/screener/etc)
-concept
-obs
-encounter
-default task to appear (approve prescription, allow access to patient file, etc)
------
However, I am debating on how to divide logic between front and back end.
1. I could have new models for AlertType and AlertTask (more work in back end)
OR
2. I could have these fields as simple strings, and in the front end do logic such as (IF AlertTask==="approvePrescription") THEN do something
My inclination is to do more logical work in the front end, and just using OpenMRS back end as a conduit for the messages.
What do you think?
Any input on this is appreciated,
thanks,
-john