Skip to content

Commit

Permalink
Occupation dropdown backend (#2055)
Browse files Browse the repository at this point in the history
* 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 <vichuhari100@gmail.com>
  • Loading branch information
hrit2773 and vigneshhari authored Apr 22, 2024
1 parent b85b74b commit 8b7baf5
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 0 deletions.
54 changes: 54 additions & 0 deletions care/facility/migrations/0428_alter_patientmetainfo_occupation.py
Original file line number Diff line number Diff line change
@@ -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,
),
),
]
26 changes: 26 additions & 0 deletions care/facility/models/patient.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down

0 comments on commit 8b7baf5

Please sign in to comment.