care.facility.models.resources module¶
- class ResourceRequest(id, external_id, created_date, modified_date, deleted, origin_facility, approving_facility, assigned_facility, emergency, title, reason, refering_facility_contact_name, refering_facility_contact_number, status, category, priority, is_assigned_to_user, assigned_to, created_by, last_edited_by, related_patient)¶
Bases:
FacilityBaseModel
- origin_facility¶
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.
- approving_facility¶
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.
- assigned_facility¶
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.
- emergency¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- title¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- reason¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- refering_facility_contact_name¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- refering_facility_contact_number¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- status¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- category¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- priority¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- is_assigned_to_user¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- assigned_to¶
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.
- created_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.
- last_edited_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.
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.
- CSV_MAPPING = {'approving_facility__name': 'Approving Facility', 'assigned_facility__name': 'Assigned Facility', 'assigned_to__username': 'Assigned User Username', 'category': 'Category', 'created_date': 'Created Date', 'emergency': 'Emergency Shift', 'modified_date': 'Modified Date', 'origin_facility__name': 'From Facility', 'priority': 'Priority', 'reason': 'Reason for Shifting', 'status': 'Current Status', 'title': 'Title'}¶
- CSV_MAKE_PRETTY = {'category': <function ResourceRequest.<lambda>>, 'emergency': <function pretty_boolean>, 'sub_category': <function ResourceRequest.<lambda>>}¶
- static has_write_permission(request)¶
- static has_read_permission(request)¶
- has_object_read_permission(request)¶
- has_object_write_permission(request)¶
- has_object_transfer_permission(request)¶
- has_object_update_permission(request)¶
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- approving_facility_id¶
- assigned_facility_id¶
- assigned_to_id¶
- created_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_category_display(*, field=<django.db.models.fields.IntegerField: category>)¶
- get_status_display(*, field=<django.db.models.fields.IntegerField: status>)¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- last_edited_by_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.
- origin_facility_id¶
- resourcerequestcomment_set¶
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- class ResourceRequestComment(id, external_id, created_date, modified_date, deleted, request, created_by, comment)¶
Bases:
FacilityBaseModel
- request¶
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.
- created_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.
- comment¶
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
- created_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.
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- modified_date¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- request_id¶