From 8b7baf5dde8daded949773c5b1aa21a2f5e6713b Mon Sep 17 00:00:00 2001 From: hrit2773 <128292557+hrit2773@users.noreply.github.com> Date: Tue, 23 Apr 2024 00:20:31 +0530 Subject: [PATCH] Occupation dropdown backend (#2055) * Occupation dropdown backend * added migrations * fixed * capitalized the names * changed back * changed to other professional occupations * changed other professional occupations * updated migrations * changed finally * changed others * migration issue fix * changed --------- Co-authored-by: Vignesh Hari --- .../0428_alter_patientmetainfo_occupation.py | 54 +++++++++++++++++++ care/facility/models/patient.py | 26 +++++++++ 2 files changed, 80 insertions(+) create mode 100644 care/facility/migrations/0428_alter_patientmetainfo_occupation.py diff --git a/care/facility/migrations/0428_alter_patientmetainfo_occupation.py b/care/facility/migrations/0428_alter_patientmetainfo_occupation.py new file mode 100644 index 0000000000..e6a5e069cb --- /dev/null +++ b/care/facility/migrations/0428_alter_patientmetainfo_occupation.py @@ -0,0 +1,54 @@ +# Generated by Django 4.2.10 on 2024-04-17 04:32 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("facility", "0427_dailyround_is_parsed_by_ocr"), + ] + + operations = [ + migrations.AlterField( + model_name="patientmetainfo", + name="occupation", + field=models.IntegerField( + blank=True, + choices=[ + (1, "STUDENT"), + (2, "BUSINESSMAN"), + (3, "HEALTH_CARE_WORKER"), + (4, "HEALTH_CARE_LAB_WORKER"), + (5, "ANIMAL_HANDLER"), + (6, "OTHERS"), + (7, "HEALTHCARE_PRACTITIONER"), + (8, "PARADEMICS"), + (9, "BUSINESS_RELATED"), + (10, "ENGINEER"), + (11, "TEACHER"), + (12, "OTHER_PROFESSIONAL_OCCUPATIONS"), + (13, "OFFICE_ADMINISTRATIVE"), + (14, "CHEF"), + (15, "PROTECTIVE_SERVICE"), + (16, "HOSPITALITY"), + (17, "CUSTODIAL"), + (18, "CUSTOMER_SERVICE"), + (19, "SALES_SUPERVISOR"), + (20, "RETAIL_SALES_WORKER"), + (21, "INSURANCE_SALES_AGENT"), + (22, "SALES_REPRESENTATIVE"), + (23, "REAL_ESTATE"), + (24, "CONSTRUCTION_EXTRACTION"), + (25, "AGRI_NATURAL"), + (26, "PRODUCTION_OCCUPATION"), + (27, "PILOT_FLIGHT"), + (28, "VEHICLE_DRIVER"), + (29, "MILITARY"), + (30, "HOMEMAKER"), + (31, "UNKNOWN"), + (32, "NOT_APPLICABLE"), + ], + null=True, + ), + ), + ] diff --git a/care/facility/models/patient.py b/care/facility/models/patient.py index d40733515e..bfefeb4b75 100644 --- a/care/facility/models/patient.py +++ b/care/facility/models/patient.py @@ -571,6 +571,32 @@ class OccupationEnum(enum.Enum): HEALTH_CARE_LAB_WORKER = 4 ANIMAL_HANDLER = 5 OTHERS = 6 + HEALTHCARE_PRACTITIONER = 7 + PARADEMICS = 8 + BUSINESS_RELATED = 9 + ENGINEER = 10 + TEACHER = 11 + OTHER_PROFESSIONAL_OCCUPATIONS = 12 + OFFICE_ADMINISTRATIVE = 13 + CHEF = 14 + PROTECTIVE_SERVICE = 15 + HOSPITALITY = 16 + CUSTODIAL = 17 + CUSTOMER_SERVICE = 18 + SALES_SUPERVISOR = 19 + RETAIL_SALES_WORKER = 20 + INSURANCE_SALES_AGENT = 21 + SALES_REPRESENTATIVE = 22 + REAL_ESTATE = 23 + CONSTRUCTION_EXTRACTION = 24 + AGRI_NATURAL = 25 + PRODUCTION_OCCUPATION = 26 + PILOT_FLIGHT = 27 + VEHICLE_DRIVER = 28 + MILITARY = 29 + HOMEMAKER = 30 + UNKNOWN = 31 + NOT_APPLICABLE = 32 OccupationChoices = [(item.value, item.name) for item in OccupationEnum]