Add Checkpoint: Make Doctor Assignment Mandatory before Vitals Entry
✨ Feature Request / Enhancement
Summary: Implement a checkpoint to ensure that a doctor is assigned before vitals entry can take place, aligning with the new workflow:
Registration → Doctor Assignment → Vitals Entry
Problem Statement: Currently:
- Volunteers can enter vitals without assigning a doctor first.
- This leads to records without a responsible doctor mapped to the patient.
- It creates confusion during further consultation and affects tracking.
Proposed Solution:
-
Validation Rule
- Before opening or submitting the Vitals Entry form, check if a doctor is already assigned to the patient.
- If not assigned, block the entry and show:
“Please assign a doctor before entering vitals.”
-
Frontend/UI Changes
- Disable the Vitals Entry button until a doctor is assigned.
- Display a tooltip or alert explaining why the action is restricted.
- Optionally include a shortcut to the Doctor Assignment section.
-
Backend/API Enforcement
- Add validation on the vitals submission API.
- If the patient does not have an assigned doctor, return an error response with a clear message.
- Prevent bypass through direct API calls.
-
Testing Scenarios
- Try entering vitals without doctor assignment → should be blocked.
- Assign a doctor → vitals entry should now work.
- Ensure it handles cases like unassigned or deleted doctors properly.
Alternatives Considered:
- Allow vitals entry before doctor assignment (rejected to maintain clarity and accountability).
- Use soft warnings instead of hard restrictions (rejected as it can be ignored).
Benefits:
- Keeps the workflow consistent and logical.
- Ensures accountability by linking each vitals record to a specific doctor.
- Reduces confusion and improves data tracking in patient flow.
Risks or Concerns:
- Volunteers must adapt to the updated sequence.
- Edge cases (like reassignment or delayed doctor mapping) should be handled carefully.
Additional Context:
- Applies to modules: Patient Registration → Doctor Assignment → Vitals Entry
- Related to overall workflow improvement and patient tracking consistency.
Edited by Abdul Muthalib Mohammed