BloodGroup field to backend models and schemas
Name: Feature Request
About: Suggest a new feature or enhancement for the Corpus Collector Backend.
Title: "[Feature]: feat(patient): add bloodGroup field to backend models and schemas"
Labels: "feature"
assignees: '@Sathwikareddy_Damanagari '
🚀 Feature Request
Is your feature request related to a problem? Please describe.
Currently, the backend does not store or expose the patient's blood group. While frontend changes are being implemented, the backend lacks support in the Patient model and Pydantic schemas, causing inconsistency between frontend and backend data.
This leads to:
- Missing blood group information in API responses
- Inability to persist blood group data
- Incomplete patient medical records
Describe the solution you'd like
Add support for bloodGroup in the backend:
Model (app/models/patient.py)
-
Add a new column:
-
bloodGroup(String, nullable)
-
Schemas (app/schemas/patient.py)
-
Add
bloodGroupfield to:PatientBasePatientCreatePatientUpdate-
Patient(response schema)
Validation
-
Restrict values to:
- A+, A-, B+, B-, AB+, AB-, O+, O-
API
- Ensure create/update endpoints accept
bloodGroup - Ensure responses include
bloodGroup
Describe alternatives you've considered
- Using free text input → rejected due to inconsistent values
- Ignoring backend support → not viable as data persistence is required
Additional context
- Frontend already plans to send
bloodGroupfield - Ensure backward compatibility (existing records should not break)
- Default value should be
null - No impact on existing endpoints or functionality
Edited by Damanagari Sathwika