diff --git a/care/facility/api/serializers/patient.py b/care/facility/api/serializers/patient.py index b38cc60993..f526db1b73 100644 --- a/care/facility/api/serializers/patient.py +++ b/care/facility/api/serializers/patient.py @@ -218,9 +218,6 @@ class Meta: ) abha_number_object = AbhaNumberSerializer(source="abha_number", read_only=True) - date_of_birth = serializers.DateField(required=False, allow_null=True) - year_of_birth = serializers.IntegerField(default=0) - class Meta: model = PatientRegistration exclude = ( diff --git a/care/facility/models/tests/test_patient.py b/care/facility/models/tests/test_patient.py index 00f7e5e7df..ab403e61a3 100644 --- a/care/facility/models/tests/test_patient.py +++ b/care/facility/models/tests/test_patient.py @@ -35,6 +35,7 @@ def test_date_of_birth_validation(self): "blood_group": "AB+", "gender": 1, "date_of_birth": now().date() + timedelta(days=365), + "year_of_birth": None, "disease_status": "NEGATIVE", "emergency_phone_number": "+919000000666", "is_vaccinated": "false", @@ -52,6 +53,7 @@ def test_year_of_birth_validation(self): "facility": self.facility.external_id, "blood_group": "AB+", "gender": 1, + "date_of_birth": None, "year_of_birth": now().year + 1, "disease_status": "NEGATIVE", "emergency_phone_number": "+919000000666",