Skip to content

Commit

Permalink
Collect postpartum data (#1811)
Browse files Browse the repository at this point in the history
* Collect postpartum data

* Remove is_postpartum field

* bump migration number
  • Loading branch information
Omkar76 authored Feb 10, 2024
1 parent 07459cc commit 640ede4
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
4 changes: 4 additions & 0 deletions care/facility/api/viewsets/patient.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ def filter_by_category(self, queryset, name, value):
field_name="last_vaccinated_date"
)
is_antenatal = filters.BooleanFilter(field_name="is_antenatal")
last_menstruation_start_date = filters.DateFromToRangeFilter(
field_name="last_menstruation_start_date"
)
date_of_delivery = filters.DateFromToRangeFilter(field_name="date_of_delivery")
is_active = filters.BooleanFilter(field_name="is_active")
# Location Based Filtering
district = filters.NumberFilter(field_name="district__id")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Generated by Django 4.2.8 on 2024-01-31 17:47

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("facility", "0407_alter_dailyround_additional_symptoms_and_more"),
]

operations = [
migrations.AddField(
model_name="historicalpatientregistration",
name="date_of_delivery",
field=models.DateField(
default=None, null=True, verbose_name="Date of Delivery"
),
),
migrations.AddField(
model_name="historicalpatientregistration",
name="last_menstruation_start_date",
field=models.DateField(
default=None, null=True, verbose_name="Last Menstruation Start Date"
),
),
migrations.AddField(
model_name="patientregistration",
name="date_of_delivery",
field=models.DateField(
default=None, null=True, verbose_name="Date of Delivery"
),
),
migrations.AddField(
model_name="patientregistration",
name="last_menstruation_start_date",
field=models.DateField(
default=None, null=True, verbose_name="Last Menstruation Start Date"
),
),
]
6 changes: 6 additions & 0 deletions care/facility/models/patient.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,12 @@ class TestTypeEnum(enum.Enum):
is_antenatal = models.BooleanField(
default=None, verbose_name="Does the patient require Prenatal Care ?"
)
last_menstruation_start_date = models.DateField(
default=None, null=True, verbose_name="Last Menstruation Start Date"
)
date_of_delivery = models.DateField(
default=None, null=True, verbose_name="Date of Delivery"
)

ward_old = models.CharField(
max_length=255, default="", verbose_name="Ward of Patient", blank=False
Expand Down

0 comments on commit 640ede4

Please sign in to comment.