Пример #1
0
    (2, "Hostel"),
    (3, "Single Room with Attached Bathroom"),
    (10, "ICU"),
    (20, "Ventilator"),
    (30, "Covid Beds"),
    (40, "KASP Beds"),
    (50, "KASP ICU beds"),
    (60, "KASP Oxygen beds"),
    (70, "KASP Ventilator beds"),
    (100, "Covid Ventilators"),
    (110, "Covid ICU"),
    (120, "Covid Oxygen beds"),
    (150, "Oxygen beds"),
]

REVERSE_ROOM_TYPES = reverse_choices(ROOM_TYPES)

FACILITY_TYPES = [
    (1, "Educational Inst"),
    (2, "Private Hospital"),
    (3, "Other"),
    (4, "Hostel"),
    (5, "Hotel"),
    (6, "Lodge"),
    (7, "TeleMedicine"),
    (8, "Govt Hospital"),
    (9, "Labs"),
    # Use 8xx for Govt owned hospitals and health centres
    (800, "Primary Health Centres"),
    (801, "24x7 Public Health Centres"),
    (802, "Family Health Centres"),
Пример #2
0
    (820, "Urban Primary Health Center"),
    (830, "Taluk Hospitals"),
    (831, "Taluk Headquarters Hospitals"),
    (840, "Women and Child Health Centres"),
    (850, "General hospitals"),  # TODO: same as 8, need to merge
    (860, "District Hospitals"),
    (870, "Govt Medical College Hospitals"),
    # Use 9xx for Labs
    (950, "Corona Testing Labs"),
    # Use 10xx for Corona Care Center
    (1000, "Corona Care Centre"),
    # Use 11xx for First Line Treatment Centre
    (1100, "First Line Treatment Centre"),
]

REVERSE_FACILITY_TYPES = reverse_choices(FACILITY_TYPES)

DOCTOR_TYPES = [
    (1, "General Medicine"),
    (2, "Pulmonology"),
    (3, "Critical Care"),
    (4, "Paediatrics"),
    (5, "Other Speciality"),
]


class Facility(FacilityBaseModel, FacilityPermissionMixin):
    name = models.CharField(max_length=1000, blank=False, null=False)
    is_active = models.BooleanField(default=True)
    verified = models.BooleanField(default=False)
    facility_type = models.IntegerField(choices=FACILITY_TYPES)
Пример #3
0
    (10, "D Level Ambulance"),
    (20, "All double chambered Ambulance with EMT"),
    (30, "Ambulance without EMT"),
    (40, "Car"),
    (50, "Auto-rickshaw"),
]

BREATHLESSNESS_CHOICES = [
    (10, "NOT SPECIFIED"),
    (15, "NOT BREATHLESS"),
    (20, "MILD"),
    (30, "MODERATE"),
    (40, "SEVERE"),
]

REVERSE_SHIFTING_STATUS_CHOICES = reverse_choices(SHIFTING_STATUS_CHOICES)


class ShiftingRequest(FacilityBaseModel):

    orgin_facility = models.ForeignKey("Facility",
                                       on_delete=models.PROTECT,
                                       related_name="requesting_facility")
    shifting_approving_facility = models.ForeignKey(
        "Facility",
        on_delete=models.SET_NULL,
        null=True,
        related_name="shifting_approving_facility")
    assigned_facility_type = models.IntegerField(choices=FACILITY_TYPES,
                                                 default=None,
                                                 null=True)
Пример #4
0
)

RESOURCE_CATEGORY_CHOICES = (
    (100, "OXYGEN"),
    (200, "SUPPLIES"),
)

RESOURCE_SUB_CATEGORY_CHOICES = (
    (110, "LIQUID OXYGEN"),
    (120, "B TYPE OXYGEN CYLINDER"),
    (130, "C TYPE OXYGEN CYLINDER"),
    (140, "JUMBO D TYPE OXYGEN CYLINDER"),
    (1000, "UNSPECIFIED"),
)

REVERSE_CATEGORY = reverse_choices(RESOURCE_CATEGORY_CHOICES)
REVERSE_SUB_CATEGORY = reverse_choices(RESOURCE_SUB_CATEGORY_CHOICES)


class ResourceRequest(FacilityBaseModel):

    orgin_facility = models.ForeignKey(
        "Facility",
        on_delete=models.PROTECT,
        related_name="resource_requesting_facility")
    approving_facility = models.ForeignKey(
        "Facility",
        on_delete=models.SET_NULL,
        null=True,
        related_name="resource_approving_facility")
    assigned_facility = models.ForeignKey(