Banner Alert

Introduction #

The BannerAlert model represents alerts associated with Patient records. This page deals with data retrieval. To create or remove BannerAlert records, see Banner Alert Effects.

Usage #

The BannerAlert model can be used to find all of the banner alert records linked to a patient. For example, to find all of the banner alerts for a patient, the Patient.banner_alerts method can be used:

>>> from canvas_sdk.v1.data.patient import Patient
>>> patient_1 = Patient.objects.get(id="aebe4d3f5d18410388dc69c4b5169fc3")
>>> patient_banner_alerts = patient_1.banner_alerts.all()
>>> print([item.narrative for item in patient_banner_alerts])
['Patient spits when angry', 'Confirm contact info']

Filtering #

The filter method can be used to filter by desired attributes. The following examples show commonly used operations to filter banner alert data:

Show a Patient’s active BannerAlert records from the ‘foo’ plugin in order of descending creation date

>>> from canvas_sdk.v1.data.patient import Patient
>>> patient_1 = Patient.objects.get(id="aebe4d3f5d18410388dc69c4b5169fc3")
>>> banner_alerts = patient_1.banner_alerts.filter(status='active', plugin_name='foo').order_by("created")
>>> print([item.narrative for item in banner_alerts])
['foo', 'bar']

Attributes #

BannerAlert #

Field NameType
dbidInteger
createdDateTime
modifiedDateTime
patientPatient
plugin_nameString
keyString
narrativeString
placementBannerAlertPlacement[]
intentBannerAlertIntent
hrefString
statusBannerAlertStatus

Enumeration types #

BannerAlertStatus #

ValueLabel
activeActive
inactiveInactive

BannerAlertIntent #

ValueLabel
infoInfo
warningWarning
alertAlert

BannerAlertPlacement #

ValueLabel
chartChart
timelineTimeline
appointment_cardAppointment Card
scheduling_cardScheduling Card
profileProfile