Repository navigation
Feature/stop 710 - #383
Feature/stop 710#383sehjotsinghunthinkable wants to merge 35 commits into
Conversation
…ing-stop-579 Adding locking for multiple order creation
…tock Same endpoint stoptb/nurse/generalOpd/save. When the app sends the new fields (submissionId, chiefComplaints[], prescription.drugs[] with drugID and qtyPrescribed) the save writes t_benchiefcomplaint, t_prescription, t_prescribeddrug, t_patientissue and t_itemstockexit and reduces t_itemstockentry from the van's store, like TM and Inventory-API. One transaction: insufficient stock rejects the whole submit. submissionId makes retries safe. Old payload behaves as before. The configured stoptb.van.id is the source of truth; a different vanID from the app is rejected. Parking place and store are read from m_van. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Always use stoptb.van.id; a vanID sent by the app is ignored (logged). - Reduced batch gets Processed='N' so the new quantity uploads to central; removed chief complaints are re-sent the same way. - Batches with no expiry date are usable, as in v_drugforprescription. - Drug must be mapped to the store on its own service line, same join as the drug list, so the save accepts exactly what the list shows. - Patient name, age and gender filled on t_patientissue for the Inventory dispense screen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- New payload (chiefComplaints[] / prescription.drugs[]) no longer writes tb_stoptb_general_opd; complaints, prescription and dispensing live only in t_benchiefcomplaint, t_prescription, t_prescribeddrug, t_patientissue, t_itemstockexit. - generalOpd/getAll reads the standard tables first and falls back to tb_stoptb_general_opd only for older visits that exist only there. Response fields and formats are unchanged for the app. - Old app payload keeps its current behaviour. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
qtyPrescribed from the app is used as is. When it is missing, for tablets and capsules (MMU's prescription screen asks quantity only for other forms) it is doses per day x days from frequency and duration; Single/Stat dose = 1, Once in a Week = 1 per 7 days. SOS or other forms without a quantity are rejected. The calculated value is saved in t_prescribeddrug.QtyPrescribed and dispensed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- chiefComplaintID is required for each chief complaint (getAll and reports identify standard-table records by it). - prescription.instruction is saved in t_prescription even when no drug is given, as MMU does for the visit instruction. - providerServiceMapID and createdBy give a clear error when missing instead of a database error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…p sends none Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- generalOpd/getAll returns a "drugs" list per record (drugID, drugName, itemFormID, drugForm, dose, frequency, duration, durationUnit, qtyPrescribed, instructions) from t_prescribeddrug, so a saved prescription can be shown with form and quantity. Existing fields are unchanged; old free-text records return an empty list. - SOS tablets/capsules without a quantity: 1 per day of duration (1 when no duration) instead of rejecting the save. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This reverts commit 50dc8ba.
TB suspected / confirmed / diagnostic saves create the visit with ProviderServiceMapID null. When one of them syncs before TB screening or OPD, the visit keeps null and getAll (filters by psm) skips it. A later save that has a service line now fills it in. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Quantity for tablets uses the dose like MMU (Half Tab 0.5, One Tab 1, One & Half Tab 1.5, Two Tabs 2 per intake), rounded up. No dose sent = one tablet, so today's results are unchanged. - Dispense no longer marks the stock batch Processed='N'. Central gets the stock-out rows (standard MMU); re-sending a batch could insert a duplicate batch on central. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The dispensed batch is marked Processed='N' again so the next upload updates central's copy (matched by VanSerialNo + store, now kept by central MMU-API). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…TOP-710 # Conflicts: # src/main/java/com/iemr/flw/service/impl/DiagnosticOrderServiceImpl.java # src/main/java/com/iemr/flw/service/impl/DiagnosticPollSchedulerService.java
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai code review |
|
Tip For best results, initiate chat on the files or code changes. @sehjotsinghunthinkable I couldn't produce a complete response to this request. Please try again. You are interacting with an AI system. |
|
https://github.com/coderabbitai code review |
|
@coderabbitai please review |
|
Tip For best results, initiate chat on the files or code changes. @sehjotsinghunthinkable I couldn't produce a complete response to this request. Please try again. You are interacting with an AI system. |
|
@coderabbitai code review |
|
Tip For best results, initiate chat on the files or code changes. @sehjotsinghunthinkable I couldn't produce a complete response to this request. Please try again. You are interacting with an AI system. |
|
@CodeRabbit |
|
Tip For best results, initiate chat on the files or code changes. @vishwab1 I couldn't produce a complete response to this request. Please try again. You are interacting with an AI system. |
📋 Description
JIRA ID: STOP-710