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 a ForwardManyToOneDescriptor 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 a ForwardManyToOneDescriptor 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 a ForwardManyToOneDescriptor 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 a ForwardManyToOneDescriptor 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 a ForwardManyToOneDescriptor 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 a ForwardManyToOneDescriptor instance.

related_patient

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 a ForwardManyToOneDescriptor 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
related_patient_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 a ReverseManyToOneDescriptor 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 a ForwardManyToOneDescriptor 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 a ForwardManyToOneDescriptor 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