BAH-4917 | Add. Nurse Acknowledgement of Physician Instructions — backend changes - #341
BAH-4917 | Add. Nurse Acknowledgement of Physician Instructions — backend changes#341vvkpd wants to merge 6 commits into
Conversation
* Vivek | added claude.md file * Vivek | HIVE-105551 | Add batch observations API endpoint
… for obs (#37) * Avni|Hive-114116| Updated bahmni observation to include previous uuid for obs * Avni|Hive-114116| Remove cross encounter conditions
…ions (#36) * HIVE-113267: Vivek: Create order and link tasks for surgery related instructions - Add SurgeryOrderPostSaveCommandImpl: creates Surgery or General Order per encounter form submission, links obs via HQL bulk update, updates surgical_appointment.order_id - Add SurgicalBlockObsHandler: handles Complex obs for Select Surgery concept - Seed Surgery Order and General Order types via Liquibase - Add operationtheater-api as provided dependency - Declare operationtheater as required module in config.xml Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> * HIVE-113267: Vivek: Fix order linkage correctness for multi-surgery and multi-form encounters - Surgery Order lookup now keyed on surgicalAppointmentUuid via OT service (not encounter): same surgical appointment reuses its Surgery Order across multiple operative reports; different surgical appointments in the same encounter each get their own Surgery Order - Category detection (Surgery vs General) reads from currentEncounter.getObs() with order IS NULL — avoids picking up Select Surgery obs from a previous form on the same encounter - linkAllObsToOrder and linkUnlinkedObsToOrder both use AND o.order IS NULL to prevent overwriting obs already linked to a different order on the same encounter - Remove dead code: findSurgicalAppointmentUuid(BahmniObservation) and isSelectSurgeryObs - Add findExistingOrderForSurgicalAppointment using OT service for appointment-level lookup - Tests updated and new scenario added: different surgical appointment on same encounter creates its own Surgery Order without reusing the existing one Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> * HIVE-113267: Vivek: Address review comments on order creation and obs linkage - Extract HQL obs-order linkage to SurgeryObsOrderLinkDao (bahmni-emr-api layer) - Merge duplicate linkAllObsToOrder/linkUnlinkedObsToOrder into single assignOrderToUnlinkedObs - Add null guard on concept and careSetting lookups in createOrder - Remove unused ProviderService dependency - Move operationtheater-api version to parent pom property - Fix Liquibase UUID portability: replace UUID() with fixed literals - Fix Liquibase changeset IDs to descriptive names - Rename SUPPORTED_VIEWS to supportedViews in SurgicalBlockObsHandler Open items pending tech lead discussion: - require_module operationtheater in config.xml (cross-module integration decision) - Wrong concept used for General Order (needs dedicated concept or config) Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> * HIVE-113267: Vivek: Make surgery selection concept configurable via global property - Add global property bahmnicore.order.surgerySelectionConcept (default: Select Surgery) seeded via Liquibase — deployments with a different concept name can override via admin UI - Replace hardcoded SELECT_SURGERY_CONCEPT_NAME with GP lookup in SurgeryOrderPostSaveCommandImpl - Inject AdministrationService via constructor Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> * HIVE-113267: Vivek: Use UUID GP for surgery selection concept with name fallback - GP bahmnicore.order.surgerySelectionConceptUuid (UUID-based, locale-safe) - Falls back to concept name lookup if GP not configured - Seeding of GP held — to be done via cure-bahmni-emr when concept UUID is known - Both Surgery and General Orders use same concept (Select Surgery) — acceptable since no concept class constraints on our order types (DB placeholder only) Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> * HIVE-113267: Vivek: Remove name fallback from getSurgerySelectionConcept GP not configured → return null → order creation skipped gracefully. Seeding of bahmnicore.order.surgerySelectionConceptUuid held — to be done via cure-bahmni-emr once concept UUID is confirmed. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> * HIVE-113267: Vivek: Setup GitHub Packages repository for openmrs-module-operationtheater in bahmni-core Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…ve OT dependency from bahmni-core (#43) * HIVE-113267: Vivek: Refactor surgery order to pre-save approach and remove OT dependency from bahmni-core - Replace SurgeryOrderPostSaveCommandImpl (post-save, creates orders) with SurgeryObsOrderLinkPreSaveCommandImpl (pre-save, sets orderUuid on obs DTOs) - Remove SurgeryObsOrderLinkDao and impl; no longer needed with pre-save approach - Remove operationtheater-api compile dependency from bahmni-emr-api pom.xml - Remove require_module for operationtheater from config.xml - Remove Surgery Order and General Order type liquibase changesets (moved to OT module) - Open point: filter only configured care instruction obs (pending tech lead discussion) Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> * HIVE-113267: Vivek: Stamp orderUuid per form using formFieldPath prefix grouping - Group obs by form using formFieldPath prefix (e.g. "ENT Operative Report.1" from "ENT Operative Report.1/1-0") — formNamespace is always "Bahmni" for all forms so cannot be used for grouping - Only obs in the same form as the Select Surgery obs get orderUuid stamped - Non-surgical forms (no Select Surgery obs) remain unlinked - Multiple operative forms in same encounter each get their own orderUuid Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> * HIVE-113267: Vivek: Fix corrupted constant names in SurgeryObsOrderLinkPreSaveCommandImplTest Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> * HIVE-113267: Vivek: Remove surgeryOrderPostSaveCommandImpl from Spring constructor-arg list Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. 📝 WalkthroughWalkthroughChangesObservation workflows
Repository guidance
Estimated code review effort: 4 (Complex) | ~45 minutes Merge Risk: ⚪ Minimal · up to The PR is merge-ready after normal checks and review; no actionable merge-blocking risk remains. Sequence Diagram(s)sequenceDiagram
participant Client
participant BahmniObservationsController
participant VisitService
participant ObservationService
Client->>BahmniObservationsController: POST /batch with visit UUIDs and scope
BahmniObservationsController->>VisitService: resolve each visit
BahmniObservationsController->>ObservationService: retrieve observations by scope
ObservationService-->>BahmniObservationsController: observations
BahmniObservationsController-->>Client: VisitObservationsResponse list
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Title checkExplanation The title clearly identifies the BAH-4917 workflow and states that the pull request adds backend changes. This matches the primary objective of supporting Nurse Acknowledgement of Physician Instructions. Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 35 functions across 6 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (3)
bahmnicore-omod/src/main/java/org/bahmni/module/bahmnicore/web/contract/BahmniObservationsBatchRequest.java (1)
7-8: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueAdd Javadoc for the new public APIs.
bahmnicore-omod/src/main/java/org/bahmni/module/bahmnicore/web/contract/BahmniObservationsBatchRequest.java#L7-L8: Document request fields, default order filtering, and supported scopes.bahmnicore-omod/src/main/java/org/bahmni/module/bahmnicore/web/contract/VisitObservationsResponse.java#L7-L8: Document response grouping and nullability expectations.bahmnicore-omod/src/main/java/org/bahmni/module/bahmnicore/web/v1_0/controller/display/controls/BahmniObservationsController.java#L88-L90: Document endpoint input, scope behavior, and response semantics.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@bahmnicore-omod/src/main/java/org/bahmni/module/bahmnicore/web/contract/BahmniObservationsBatchRequest.java` around lines 7 - 8, **Summary:** Add Javadoc to the new request, response, and controller APIs. In bahmnicore-omod/src/main/java/org/bahmni/module/bahmnicore/web/contract/BahmniObservationsBatchRequest.java:7-8, document the request fields, default order filtering, and supported scopes; in bahmnicore-omod/src/main/java/org/bahmni/module/bahmnicore/web/contract/VisitObservationsResponse.java:7-8, document response grouping and nullability; and in bahmnicore-omod/src/main/java/org/bahmni/module/bahmnicore/web/v1_0/controller/display/controls/BahmniObservationsController.java:88-90, document endpoint inputs, scope behavior, and response semantics.Source: Coding guidelines
bahmnicore-api/src/main/java/org/bahmni/module/bahmnicore/obs/handler/SurgicalBlockObsHandler.java (1)
12-13: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd Javadoc to the public handler API.
Add Javadoc to
SurgicalBlockObsHandler,saveObs,getObs, andgetSupportedViews. Document the surgical appointment UUID format, save behavior, and supported views.As per coding guidelines, public APIs in
**/src/main/java/**/*.javarequire Javadoc.Also applies to: 21-25, 28-39, 42-45
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@bahmnicore-api/src/main/java/org/bahmni/module/bahmnicore/obs/handler/SurgicalBlockObsHandler.java` around lines 12 - 13, Add Javadoc to the public class SurgicalBlockObsHandler and its methods saveObs, getObs, and getSupportedViews. Document the surgical appointment UUID format, save behavior, and the views supported by getSupportedViews, following the project’s JavaDoc conventions without changing implementation behavior.Source: Coding guidelines
bahmni-emr-api/src/main/java/org/openmrs/module/bahmniemrapi/encountertransaction/contract/BahmniObservation.java (1)
445-452: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueDocument the new response property.
Add Javadoc that defines the predecessor relationship and the null behavior. The getter and fluent setter are public contract APIs.
Proposed Javadoc
+ /** + * Gets the UUID of the direct previous observation version. + * + * `@return` the previous version UUID, or {`@code` null} when no previous version exists + */ public String getPreviousVersionUuid() { return previousVersionUuid; } + /** + * Sets the UUID of the direct previous observation version. + * + * `@param` previousVersionUuid the previous version UUID + * `@return` this observation + */ public BahmniObservation setPreviousVersionUuid(String previousVersionUuid) {As per coding guidelines, "Add Javadoc to public APIs."
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@bahmni-emr-api/src/main/java/org/openmrs/module/bahmniemrapi/encountertransaction/contract/BahmniObservation.java` around lines 445 - 452, Add Javadoc to the public getPreviousVersionUuid() getter and setPreviousVersionUuid(String) fluent setter, documenting that previousVersionUuid identifies the predecessor observation version and is null when no predecessor exists.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@bahmni-emr-api/src/main/java/org/openmrs/module/bahmniemrapi/encountertransaction/command/impl/SurgeryObsOrderLinkPreSaveCommandImpl.java`:
- Around line 49-53: Update groupObsByForm so observations whose extracted form
name is blank are not added to the grouped map, preventing unrelated unscoped
observations from sharing a list. Preserve grouping for nonblank form names, and
add a regression test covering a blank formFieldPath to verify orderUuid is not
propagated between unscoped observations.
In
`@bahmni-emr-api/src/main/java/org/openmrs/module/bahmniemrapi/encountertransaction/mapper/OMRSObsToBahmniObsMapper.java`:
- Around line 72-74: Move the previous-version UUID assignment out of
OMRSObsToBahmniObsMapper.map(...) and into ETObsToBahmniObsMapper so it runs for
every recursively mapped observation, including group members. Preserve the
existing UUID source from obs.getPreviousVersion().getUuid() and add coverage
for a nested observation with a previousVersion that verifies
previousVersionUuid is populated.
In `@CLAUDE.md`:
- Around line 193-195: Update the “Pull requests” guidance in CLAUDE.md to state
that pull requests are required for merging to CURE-Product-Master instead of
master, while preserving the existing branch naming guidance.
---
Nitpick comments:
In
`@bahmni-emr-api/src/main/java/org/openmrs/module/bahmniemrapi/encountertransaction/contract/BahmniObservation.java`:
- Around line 445-452: Add Javadoc to the public getPreviousVersionUuid() getter
and setPreviousVersionUuid(String) fluent setter, documenting that
previousVersionUuid identifies the predecessor observation version and is null
when no predecessor exists.
In
`@bahmnicore-api/src/main/java/org/bahmni/module/bahmnicore/obs/handler/SurgicalBlockObsHandler.java`:
- Around line 12-13: Add Javadoc to the public class SurgicalBlockObsHandler and
its methods saveObs, getObs, and getSupportedViews. Document the surgical
appointment UUID format, save behavior, and the views supported by
getSupportedViews, following the project’s JavaDoc conventions without changing
implementation behavior.
In
`@bahmnicore-omod/src/main/java/org/bahmni/module/bahmnicore/web/contract/BahmniObservationsBatchRequest.java`:
- Around line 7-8: **Summary:** Add Javadoc to the new request, response, and
controller APIs. In
bahmnicore-omod/src/main/java/org/bahmni/module/bahmnicore/web/contract/BahmniObservationsBatchRequest.java:7-8,
document the request fields, default order filtering, and supported scopes; in
bahmnicore-omod/src/main/java/org/bahmni/module/bahmnicore/web/contract/VisitObservationsResponse.java:7-8,
document response grouping and nullability; and in
bahmnicore-omod/src/main/java/org/bahmni/module/bahmnicore/web/v1_0/controller/display/controls/BahmniObservationsController.java:88-90,
document endpoint inputs, scope behavior, and response semantics.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 85fcd758-d274-4f0b-adfd-a38d86a24d9d
📒 Files selected for processing (13)
CLAUDE.mdbahmni-emr-api/src/main/java/org/openmrs/module/bahmniemrapi/encountertransaction/command/impl/SurgeryObsOrderLinkPreSaveCommandImpl.javabahmni-emr-api/src/main/java/org/openmrs/module/bahmniemrapi/encountertransaction/contract/BahmniObservation.javabahmni-emr-api/src/main/java/org/openmrs/module/bahmniemrapi/encountertransaction/mapper/OMRSObsToBahmniObsMapper.javabahmni-emr-api/src/test/java/org/openmrs/module/bahmniemrapi/encountertransaction/command/impl/SurgeryObsOrderLinkPreSaveCommandImplTest.javabahmni-emr-api/src/test/java/org/openmrs/module/bahmniemrapi/encountertransaction/mapper/OMRSObsToBahmniObsMapperTest.javabahmnicore-api/src/main/java/org/bahmni/module/bahmnicore/obs/handler/SurgicalBlockObsHandler.javabahmnicore-api/src/main/resources/moduleApplicationContext.xmlbahmnicore-omod/src/main/java/org/bahmni/module/bahmnicore/web/contract/BahmniObservationsBatchRequest.javabahmnicore-omod/src/main/java/org/bahmni/module/bahmnicore/web/contract/VisitObservationsResponse.javabahmnicore-omod/src/main/java/org/bahmni/module/bahmnicore/web/v1_0/controller/display/controls/BahmniObservationsController.javabahmnicore-omod/src/test/java/org/bahmni/module/bahmnicore/web/v1_0/controller/BahmniObservationsControllerTest.javapom.xml
| private Map<String, List<BahmniObservation>> groupObsByForm(Collection<BahmniObservation> observations) { | ||
| Map<String, List<BahmniObservation>> result = new LinkedHashMap<>(); | ||
| for (BahmniObservation obs : observations) { | ||
| result.computeIfAbsent(extractFormName(obs.getFormFieldPath()), k -> new ArrayList<>()).add(obs); | ||
| } |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Do not group observations with no form identity.
extractFormName returns "" for a blank formFieldPath. The map then combines every unscoped observation into one list. If one unscoped observation contains the surgery-selection value, the command stamps its orderUuid onto every other unscoped observation.
Skip blank form names, or use a key that cannot combine unrelated observations. Add a regression test with a blank formFieldPath.
Proposed fix
private Map<String, List<BahmniObservation>> groupObsByForm(Collection<BahmniObservation> observations) {
Map<String, List<BahmniObservation>> result = new LinkedHashMap<>();
for (BahmniObservation obs : observations) {
- result.computeIfAbsent(extractFormName(obs.getFormFieldPath()), k -> new ArrayList<>()).add(obs);
+ String formName = extractFormName(obs.getFormFieldPath());
+ if (StringUtils.isBlank(formName)) {
+ continue;
+ }
+ result.computeIfAbsent(formName, k -> new ArrayList<>()).add(obs);
}
return result;
}🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In
`@bahmni-emr-api/src/main/java/org/openmrs/module/bahmniemrapi/encountertransaction/command/impl/SurgeryObsOrderLinkPreSaveCommandImpl.java`
around lines 49 - 53, Update groupObsByForm so observations whose extracted form
name is blank are not added to the grouped map, preventing unrelated unscoped
observations from sharing a list. Preserve grouping for nonblank form names, and
add a regression test covering a blank formFieldPath to verify orderUuid is not
propagated between unscoped observations.
| if (obs.getPreviousVersion() != null) { | ||
| bahmniObservation.setPreviousVersionUuid(obs.getPreviousVersion().getUuid()); | ||
| } |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
et_mapper="$(fd -a '^ETObsToBahmniObsMapper\.java$' | head -n 1)"
test_file="bahmni-emr-api/src/test/java/org/openmrs/module/bahmniemrapi/encountertransaction/mapper/OMRSObsToBahmniObsMapperTest.java"
test -n "$et_mapper"
ast-grep outline "$et_mapper" --items all
rg -n -C 6 \
-e 'getGroupMembers' \
-e 'setGroupMembers' \
-e 'previousVersion' \
-e 'setPreviousVersionUuid' \
"$et_mapper" "$test_file"Repository: Bahmni/bahmni-core
Length of output: 12504
🏁 Script executed:
#!/bin/bash
set -euo pipefail
omrs_mapper="bahmni-emr-api/src/main/java/org/openmrs/module/bahmniemrapi/encountertransaction/mapper/OMRSObsToBahmniObsMapper.java"
et_mapper="bahmni-emr-api/src/main/java/org/openmrs/module/bahmniemrapi/encountertransaction/mapper/ETObsToBahmniObsMapper.java"
contract="bahmni-emr-api/src/main/java/org/openmrs/module/bahmniemrapi/encountertransaction/contract/BahmniObservation.java"
test_file="bahmni-emr-api/src/test/java/org/openmrs/module/bahmniemrapi/encountertransaction/mapper/OMRSObsToBahmniObsMapperTest.java"
for f in "$omrs_mapper" "$et_mapper" "$contract" "$test_file"; do
echo "===== ${f#$(pwd)/} ====="
wc -l "$f"
done
echo "===== OMRS mapper relevant lines ====="
sed -n '1,120p' "$omrs_mapper" | cat -n
echo "===== ET mapper relevant lines ====="
sed -n '1,110p' "$et_mapper" | cat -n
echo "===== contract previous version / group members lines ====="
rg -n -C 4 'previousVersion|groupMembers|setPreviousVersionUuid' "$contract"
echo "===== tests relevant previous version group member lines ====="
rg -n -C 5 'previousVersion|getPreviousVersion|setPreviousVersionUuid|previousVersionUuid|parentObs|withGroupMembers' "$test_file"
echo "===== repository all references to previousVersionUuid in mapper source/contract/tests ====="
rg -n -C 3 'previousVersionUuid' bahmni-emr-api/src/main/java bahmni-emr-api/src/test/javaRepository: Bahmni/bahmni-core
Length of output: 24033
Propagate previous-version UUID for group-member observations.
OMRSObsToBahmniObsMapper.map(...) maps to ETObsToBahmniObsMapper recursively through group members, but previousVersionUuid is only set on the root BahmniObservation. A nested Obs with previousVersion therefore omits previousVersionUuid. Move this assignment into ETObsToBahmniObsMapper at each recursive mapping, and add a nested-observation coverage case.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In
`@bahmni-emr-api/src/main/java/org/openmrs/module/bahmniemrapi/encountertransaction/mapper/OMRSObsToBahmniObsMapper.java`
around lines 72 - 74, Move the previous-version UUID assignment out of
OMRSObsToBahmniObsMapper.map(...) and into ETObsToBahmniObsMapper so it runs for
every recursively mapped observation, including group members. Preserve the
existing UUID source from obs.getPreviousVersion().getUuid() and add coverage
for a nested observation with a previousVersion that verifies
previousVersionUuid is populated.
| - **Main development branch**: `CURE-Product-Master` | ||
| - **Feature branches**: Named after Hive/JIRA tickets (e.g., `draft-form`, `Hive-106849`) | ||
| - **Pull requests**: Required for merging to master |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Use the exact main development branch name.
Line 9 identifies CURE-Product-Master as the main development branch. Line 195 refers to master. Replace master with CURE-Product-Master to prevent contributors from using the wrong merge target.
Based on learnings, pull requests are required for merging to CURE-Product-Master.
Proposed documentation fix
-- **Pull requests**: Required for merging to master
+- **Pull requests**: Required for merging to `CURE-Product-Master`📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - **Main development branch**: `CURE-Product-Master` | |
| - **Feature branches**: Named after Hive/JIRA tickets (e.g., `draft-form`, `Hive-106849`) | |
| - **Pull requests**: Required for merging to master | |
| - **Main development branch**: `CURE-Product-Master` | |
| - **Feature branches**: Named after Hive/JIRA tickets (e.g., `draft-form`, `Hive-106849`) | |
| - **Pull requests**: Required for merging to `CURE-Product-Master` |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@CLAUDE.md` around lines 193 - 195, Update the “Pull requests” guidance in
CLAUDE.md to state that pull requests are required for merging to
CURE-Product-Master instead of master, while preserving the existing branch
naming guidance.
Source: Learnings
SurgeryObsOrderLinkPreSaveCommandImpl implements EncounterDataPreSaveCommand which does not extend BeanPostProcessor, so postProcessBeforeInitialization and postProcessAfterInitialization cannot be annotated with @OverRide. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…obal property Registers the GP key in config.xml so it appears in the admin UI and is documented alongside the module. The value (concept UUID) is left empty — implementers set it via the config repo by providing the UUID of their 'Select Surgery' concept. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Summary
Backend changes in bahmni-core required for the Nurse Acknowledgement of Physician Instructions workflow. This PR covers four stories:
Changes
HIVE-105551 — Batch Observations API
HIVE-114116 — Previous UUID for Observations
BahmniObservationcontract extended withpreviousObsUuidfieldHIVE-113267 — Create Order and Link Tasks for Surgery
SurgeryOrderPostSaveCommandImpl: creates a Surgery/General order on operative report savebahmnicore.order.surgerySelectionConceptUuidformFieldPathprefix to correctly scope order linkage per formHIVE-107135 — Refactor to Pre-save Approach
SurgeryOrderPostSaveCommandImpl(post-save) withSurgeryObsOrderLinkPreSaveCommandImpl(pre-save)SurgeryObsOrderLinkDao— no longer neededoperationtheater-apicompile dependency frombahmni-emr-apirequire_modulefor operationtheater fromconfig.xmlRelated PRs (CURE fork)
Testing
End-to-end linkage can be verified on DB:
Summary by CodeRabbit
New Features
Documentation