"feat(backend): auto create repeat medicine doctor for new medical camps"
title: "feat(backend): auto create repeat medicine doctor for new medical camps"
🚀 Feature Request
Is your feature request related to a problem? Please describe.
Currently, repeat medicine flow depends on a repeat medicine doctor entry to maintain compatibility with the existing consultation and prescription workflow.
However, when a new medical camp is created, the repeat medicine doctor is not automatically available. This causes issues in:
- repeat medicine consultation flow
- prescription handling
- consultation mapping
- queue progression
Manual creation of repeat medicine doctor entries increases operational overhead and can lead to missing repeat medicine functionality in newly created camps.
Describe the solution you'd like
Implement backend logic to automatically create a dedicated repeat medicine doctor whenever a new medical camp is created.
The repeat medicine doctor should:
- be automatically associated with the newly created camp
- support repeat medicine consultation flow
- work with existing consultation and prescription APIs
- maintain compatibility with queue and prescription workflows
This allows repeat medicine patients to reuse the existing consultation and prescription flow without requiring manual doctor setup.
Describe alternatives you've considered
Alternative approaches considered:
- manually creating repeat medicine doctors for every camp
- implementing a completely separate repeat medicine workflow
- bypassing consultation flow for repeat medicine patients
These approaches either increase maintenance overhead or duplicate existing system workflows.
The selected approach keeps the existing consultation and prescription flow reusable with minimal changes.
Additional context
Implemented logic:
- automatically creates repeat medicine doctor during medical camp creation
- enables repeat medicine consultation flow compatibility
- supports existing prescription and queue workflows
- avoids invalid consultation and doctor mapping issues for repeat medicine patients