fix(workflow): invalid status transition from medicine_pickedup to counselling
🐛 Bug Report
Describe the bug
When verifying medicines, the system throws an invalid status transition error while trying to move the patient from medicine_pickedup to counselling.
To Reproduce
Steps to reproduce the behavior:
- Go to Medicines section
- Add or pick up medicines
- Click on Verify Medicines
- See error
Expected behavior
Patient should follow the correct workflow and move to the next step without errors (eventually to counselling).
Actual behavior
Error message is shown:
Invalid status transition: medicine_pickedup → counselling. Allowed transitions: ['medicine_verification']
Screenshots
Environment
- OS: Linux (Ubuntu)
- Browser: Firefox
- Version: Latest
Additional context
The issue occurs because the frontend is attempting to directly transition from medicine_pickedup to counselling, while the backend only allows transition to medicine_verification. The correct flow should be:
medicine_pickedup → medicine_verification → counselling
📌 Follow semantic issue titling convention:<type>(<scope>): <description>
