care.facility.models.notification module¶
- class Notification(id, external_id, created_date, modified_date, deleted, intended_for, medium_sent, caused_by, read_at, event_type, event, message, caused_objects)¶
Bases:
FacilityBaseModel
- EventTypeChoices = [(50, 'SYSTEM_GENERATED'), (100, 'CUSTOM_MESSAGE')]¶
- MediumChoices = [(0, 'SYSTEM'), (100, 'SMS'), (200, 'WHATSAPP')]¶
- class Event(*values)¶
Bases:
Enum
- MESSAGE = 0¶
- PATIENT_CREATED = 20¶
- PATIENT_UPDATED = 30¶
- PATIENT_DELETED = 40¶
- PATIENT_CONSULTATION_CREATED = 50¶
- PATIENT_CONSULTATION_UPDATED = 60¶
- PATIENT_CONSULTATION_DELETED = 70¶
- INVESTIGATION_SESSION_CREATED = 80¶
- INVESTIGATION_UPDATED = 90¶
- PATIENT_FILE_UPLOAD_CREATED = 100¶
- CONSULTATION_FILE_UPLOAD_CREATED = 110¶
- PATIENT_CONSULTATION_UPDATE_CREATED = 120¶
- PATIENT_CONSULTATION_UPDATE_UPDATED = 130¶
- PATIENT_CONSULTATION_ASSIGNMENT = 140¶
- SHIFTING_UPDATED = 200¶
- PATIENT_NOTE_ADDED = 210¶
- PUSH_MESSAGE = 220¶
- PATIENT_PRESCRIPTION_CREATED = 230¶
- PATIENT_PRESCRIPTION_UPDATED = 240¶
- EventChoices = [(0, 'MESSAGE'), (20, 'PATIENT_CREATED'), (30, 'PATIENT_UPDATED'), (40, 'PATIENT_DELETED'), (50, 'PATIENT_CONSULTATION_CREATED'), (60, 'PATIENT_CONSULTATION_UPDATED'), (70, 'PATIENT_CONSULTATION_DELETED'), (80, 'INVESTIGATION_SESSION_CREATED'), (90, 'INVESTIGATION_UPDATED'), (100, 'PATIENT_FILE_UPLOAD_CREATED'), (110, 'CONSULTATION_FILE_UPLOAD_CREATED'), (120, 'PATIENT_CONSULTATION_UPDATE_CREATED'), (130, 'PATIENT_CONSULTATION_UPDATE_UPDATED'), (140, 'PATIENT_CONSULTATION_ASSIGNMENT'), (200, 'SHIFTING_UPDATED'), (210, 'PATIENT_NOTE_ADDED'), (220, 'PUSH_MESSAGE'), (230, 'PATIENT_PRESCRIPTION_CREATED'), (240, 'PATIENT_PRESCRIPTION_UPDATED')]¶
- intended_for¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- medium_sent¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- caused_by¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- read_at¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- event_type¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- event¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- message¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- caused_objects¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- caused_by_id¶
- created_date¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- deleted¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- external_id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_event_display(*, field=<django.db.models.fields.IntegerField: event>)¶
- get_event_type_display(*, field=<django.db.models.fields.IntegerField: event_type>)¶
- get_medium_sent_display(*, field=<django.db.models.fields.IntegerField: medium_sent>)¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- intended_for_id¶
- modified_date¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.