APIs

Show:

Separated file for bindable patient events. Add new sub resource events to the _events property. Use the plural form of the category (i.e. medications, vitals, etc) and then your events in the array following. The intializeEvents method will create an on, off, and trigger function for each event in each category. For example, vitals and add will create onVitalsAdd, offVitalsAdd and triggerVitalsAdd. Please use this instead of on('vitals-add', function). This makes it easier to track down where events are being fired and bound. This also allows for a seamless binding into the realtime channels and a centralized location of all possible events.

When binding to these events, for now, pull the global model from ehr.patients.getPatientModel. Patients kept in this collection will be the only patient models that have their extended events initialized.

To see a clear view of what events are created, debug in the PatientsView.js file in the render method inside of the ehr.patients.getPatientModel function and expand the patient model.

Item Index