Skip to content

Commit

Permalink
Added Ward for patient
Browse files Browse the repository at this point in the history
  • Loading branch information
vigneshhari committed Aug 30, 2020
1 parent 539409b commit b59c570
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
23 changes: 23 additions & 0 deletions care/facility/migrations/0167_auto_20200830_1121.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 2.2.11 on 2020-08-30 05:51

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('facility', '0166_auto_20200815_1930'),
]

operations = [
migrations.AddField(
model_name='historicalpatientregistration',
name='ward',
field=models.CharField(default='', max_length=255, verbose_name='Ward of Patient'),
),
migrations.AddField(
model_name='patientregistration',
name='ward',
field=models.CharField(default='', max_length=255, verbose_name='Ward of Patient'),
),
]
2 changes: 2 additions & 0 deletions care/facility/models/patient.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ class ActionEnum(enum.Enum):

is_antenatal = models.BooleanField(default=False, verbose_name="Does the patient require Prenatal Care ?")

ward = models.CharField(max_length=255, default="", verbose_name="Ward of Patient", blank=False)
local_body = models.ForeignKey(LocalBody, on_delete=models.SET_NULL, null=True, blank=True)
district = models.ForeignKey(District, on_delete=models.SET_NULL, null=True, blank=True)
state = models.ForeignKey(State, on_delete=models.SET_NULL, null=True, blank=True)
Expand Down Expand Up @@ -254,6 +255,7 @@ def save(self, *args, **kwargs) -> None:
# "nearest_facility__name": "Nearest Facility",
"age": "Age",
"gender": "Gender",
"ward": "Ward",
"local_body__name": "Local Body",
"district__name": "District",
"state__name": "State",
Expand Down

0 comments on commit b59c570

Please sign in to comment.