Implement three-tier discharge system: clinical, room, and hospital discharge#19658
Implement three-tier discharge system: clinical, room, and hospital discharge#19658buddhika75 merged 3 commits intodevelopmentfrom
Conversation
…ischarge - Add PatientEncounterType.ClinicalDischarge and SymanticType.Discharge_Condition - Add InpatientClinicalDischarge privilege - Add clinical discharge fields to PatientEncounter (clinicallyDischarged, clinicalDischargeDateTime, clinicalDischargedBy, roomDischargeDateTime, roomDischargedBy, dischargeCondition, followUpPlan, activityInstructions, dietInstructions) - Add DischargeConditionController and discharge_conditions.xhtml admin page for configurable discharge condition values (Stable, DAMA, Referred, etc.) - Add inward_clinical_discharge.xhtml page with condition, diagnoses, summary, follow-up, activity/diet sections and confirm/cancel actions - Add navigateToClinicalDischargeFromAdmission, saveClinicalDischarge, confirmClinicalDischarge, cancelClinicalDischarge to InpatientClinicalDataController - Sync roomDischargeDateTime to PatientEncounter when last room is discharged - Warn on hospital discharge if clinical discharge not yet confirmed - Add Clinical Discharge button to admission_profile.xhtml (green/orange status) Closes #19657 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
WalkthroughIntroduces clinical discharge as a new discharge tier: data model additions to PatientEncounter, enums and privilege, a DischargeCondition management controller and admin page, inpatient clinical discharge UI and controller flows, and synchronization of room/hospital discharge operations with clinical discharge state. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Admission
participant InpatientController
participant PatientEncounter
participant RoomChange
participant Hospital
User->>Admission: Open admission profile
Admission-->>User: Show "Clinical Discharge" button
rect rgba(100,150,200,0.5)
Note over User,InpatientController: Clinical Discharge Workflow
User->>InpatientController: navigateToClinicalDischargeFromAdmission(admission)
InpatientController->>PatientEncounter: findOrCreate ClinicalDischarge record
InpatientController-->>User: Navigate to clinical discharge form
User->>InpatientController: saveClinicalDischarge()
InpatientController->>PatientEncounter: Persist clinical discharge (draft)
User->>InpatientController: confirmClinicalDischarge()
InpatientController->>Admission: Set clinicallyDischarged=true, timestamp, user
InpatientController->>PatientEncounter: Persist parent admission
InpatientController-->>User: Show confirmation banner / disable form
end
rect rgba(150,100,150,0.5)
Note over User,RoomChange: Room Discharge Sync
User->>RoomChange: discharge patient from room
RoomChange->>PatientEncounter: Set roomDischargeDateTime, roomDischargedBy
RoomChange->>PatientEncounter: Persist sync
RoomChange-->>User: Room discharged
end
rect rgba(200,100,100,0.5)
Note over User,Hospital: Hospital Discharge
User->>Hospital: Complete billing → invoke hospital discharge
Hospital->>Admission: Check isClinicallyDischarged()
alt Not clinically discharged
Hospital-->>User: Warning message (non-blocking)
end
Hospital->>Admission: Set discharged=true, dateOfDischarge
Hospital-->>User: Discharge complete
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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: 6
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/main/java/com/divudi/bean/inward/RoomChangeController.java (1)
296-306:⚠️ Potential issue | 🟠 MajorAdd room discharge sync logic to
discharge()or usedischargeWithCurrentTime()instead.The
discharge(PatientRoom pR)method lacks the room discharge synchronization thatdischargeWithCurrentTime()provides. Whendischarge()is called on the last room (as it is in BhtSummeryController line 1634), thePatientEncounteris not updated withroomDischargeDateTimeandroomDischargedBy, leaving inconsistent state. Either add the sync logic (lines 28–32 fromdischargeWithCurrentTime()) todischarge(), or replace the call in BhtSummeryController withdischargeWithCurrentTime().🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/main/java/com/divudi/bean/inward/RoomChangeController.java` around lines 296 - 306, The discharge(PatientRoom pR) method currently sets discharged flags and persists the PatientRoom but omits the room-discharge synchronization present in dischargeWithCurrentTime(); update discharge(PatientRoom) to also set the PatientEncounter.roomDischargeDateTime and PatientEncounter.roomDischargedBy (the same logic found in dischargeWithCurrentTime(), lines that update encounter's roomDischargeDateTime and roomDischargedBy and persist via getPatientEncounterFacade().edit(encounter)), or alternatively replace the call site in BhtSummeryController to invoke dischargeWithCurrentTime(pR) instead so the encounter is updated; ensure you reference and persist the PatientEncounter via getPatientEncounterFacade() and maintain notificationController.createNotification(pR, "Discharge").
🧹 Nitpick comments (3)
src/main/webapp/inward/admission_profile.xhtml (1)
425-432: LGTM!The Clinical Discharge button is well-implemented:
- Privilege check via
webUserController.hasPrivilege('InpatientClinicalDischarge')follows coding guidelines.- PrimeFaces button classes (
ui-button-success,ui-button-warning) are correctly used per guidelines.- Conditional styling based on
clinicallyDischargedprovides clear visual status indication.Consider adding a
titleattribute for accessibility (e.g.,title="Navigate to Clinical Discharge") to align with the accessibility guideline for tooltips and labeling. As per coding guidelines: "Implement accessibility with proper tooltips and labeling."🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/main/webapp/inward/admission_profile.xhtml` around lines 425 - 432, Add an accessible tooltip/title to the Clinical Discharge button by adding a title attribute on the p:commandButton that describes its action (e.g., title="Navigate to Clinical Discharge"); update the element where action="#{inpatientClinicalDataController.navigateToClinicalDischargeFromAdmission(admissionController.current)}" and rendered="#{webUserController.hasPrivilege('InpatientClinicalDischarge')}" so the title is present regardless of the conditional style that uses admissionController.current.clinicallyDischarged.src/main/java/com/divudi/bean/clinical/DischargeConditionController.java (2)
198-206: Handle invalid numeric input gracefully.
Long.valueOf(value)throwsNumberFormatExceptionif the value is not a valid number. While JSF will catch this, explicit handling provides a clearer error.🛡️ Proposed improvement
`@Override` public Object getAsObject(FacesContext facesContext, UIComponent component, String value) { if (value == null || value.length() == 0) { return null; } + try { DischargeConditionController controller = (DischargeConditionController) facesContext.getApplication() .getELResolver().getValue(facesContext.getELContext(), null, "dischargeConditionController"); return controller.getEjbFacade().find(Long.valueOf(value)); + } catch (NumberFormatException e) { + return null; + } }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/main/java/com/divudi/bean/clinical/DischargeConditionController.java` around lines 198 - 206, In getAsObject of DischargeConditionController, currently Long.valueOf(value) can throw NumberFormatException for non-numeric input; update getAsObject to validate/parse the incoming String safely (e.g., try/catch NumberFormatException or use a numeric check) and handle invalid input by returning null and optionally adding a FacesMessage or logging the invalid value before returning, then only call controller.getEjbFacade().find(parsedLong) when parsing succeeds; ensure you reference the getAsObject method and controller.getEjbFacade().find(...) when implementing the fix.
147-149: Silently swallowing exception provides no feedback to user.If the download fails, the user sees nothing. Add an error message and consider using try-with-resources for the workbook.
♻️ Proposed improvement
- try { - Workbook workbook = new XSSFWorkbook(); + try (Workbook workbook = new XSSFWorkbook()) { Sheet sheet = workbook.createSheet("Discharge Conditions"); // ... rest of method ... context.responseComplete(); } catch (Exception e) { - e.printStackTrace(); + JsfUtil.addErrorMessage("Error generating Excel file: " + e.getMessage()); }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/main/java/com/divudi/bean/clinical/DischargeConditionController.java` around lines 147 - 149, The catch block in DischargeConditionController currently swallows exceptions (catch(Exception e) { e.printStackTrace(); }) so users get no feedback and resources may leak; replace this with try-with-resources for the Workbook/stream creation and handle the exception by logging the error (use your logger) and adding a user-facing error message (e.g., FacesContext/PrimeFaces/UILayer message) so the UI informs the user of the download failure; update the catch to log e and add the message, and ensure any OutputStream/Workbook objects are opened in a try-with-resources block within the method that performs the export/download.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/main/java/com/divudi/bean/clinical/DischargeConditionController.java`:
- Around line 64-77: In saveSelected(), the success messages are reversed: when
getCurrent().getId() != null the code edits the entity via
getFacade().edit(current) but calls JsfUtil.addSuccessMessage("Saved"), and the
else branch that creates the entity calls JsfUtil.addSuccessMessage("Updated");
swap these two messages so the edit branch calls
JsfUtil.addSuccessMessage("Updated") and the create branch calls
JsfUtil.addSuccessMessage("Saved") (references: saveSelected(), current,
getFacade(), JsfUtil.addSuccessMessage).
- Around line 105-116: The method completeDischargeConditions currently calls
qry.toUpperCase() which throws NPE when qry is null or may produce useless SQL
for empty strings; update completeDischargeConditions(String qry) to first check
if qry is null or blank and if so return an empty List (or set qry = "" and
search all names), otherwise proceed with m.put("n", "%" + qry.toUpperCase() +
"%"); ensure the null/blank check occurs before creating the parameter map and
building the JPQL query so getFacade().findByJpql is never called with a null
parameter.
- Around line 130-137: The row-numbering bug is caused by using post-increment
rowNum++ when creating the row and then writing rowNum into the cell (so the
first written value becomes 2); change the loop to createRow using the current
index (e.g., use sheet.createRow(rowNum) or increment after writing) and write
the display index as (rowNum) or (rowNum - 1) appropriately so the first row
shows 1; update the loop that iterates over ClinicalEntity items (the rowNum
variable and calls to sheet.createRow(...) and setCellValue(...)) to ensure
consistent indexing, and also open the Workbook (and any streams) with
try-with-resources to guarantee closure on exceptions (adjust code around
Workbook creation and any OutputStream usage accordingly).
In `@src/main/webapp/emr/admin/discharge_conditions.xhtml`:
- Around line 60-80: Replace the raw HTML <label> elements for txtName, txtCode
and txtDes with JSF/PrimeFaces label components (e.g., p:outputLabel or
h:outputLabel) so the labels bind to the JSF client IDs and improve
accessibility; locate the label currently paired with the input components
having ids txtName, txtCode and txtDes and swap each raw label for a
p:outputLabel (or h:outputLabel) using the same
for="txtName"/for="txtCode"/for="txtDes" and include an accessible tooltip/title
if required, leaving the input components and their value bindings
(#{dischargeConditionController.current.name}, .code, .descreption) unchanged.
- Around line 10-97: The page renders admin actions without view-level privilege
checks; wrap the form and destructive controls with
webUserController.hasPrivilege() checks so only authorized users see them. Add a
rendered attribute on the main h:form (or surrounding p:panel) using EL
webUserController.hasPrivilege('<appropriate-privilege>') and also add rendered
or disabled attributes to command buttons btnAdd, btnDelete, btnSave (and the
Excel download) to call webUserController.hasPrivilege(...) so the
p:commandButton elements (ids btnAdd, btnDelete, btnSave and the download
button) and the detail/select panels (gpDetail, gpSelect) are hidden/disabled
when the user lacks the privilege. Ensure you use the canonical privilege string
used elsewhere in the app when calling webUserController.hasPrivilege().
In `@src/main/webapp/inward/inward_clinical_discharge.xhtml`:
- Around line 99-105: The outputLabel and input/textarea lack explicit label-for
associations which harms accessibility; add matching id attributes to the input
components and reference them from the labels using for (e.g., set an id on the
p:inputText bound to
inpatientClinicalDataController.clinicalDischargeRecord.encounterDateTime and
change the p:outputLabel to for="<that-id>"), and do the same for the textarea
referenced in lines ~208-215 (identify the textarea bound to
inpatientClinicalDataController.clinicalDischargeRecord.<fieldName> and add id,
then update its p:outputLabel for attribute); also include an appropriate
tooltip/title on the labels if required by the coding guidelines.
---
Outside diff comments:
In `@src/main/java/com/divudi/bean/inward/RoomChangeController.java`:
- Around line 296-306: The discharge(PatientRoom pR) method currently sets
discharged flags and persists the PatientRoom but omits the room-discharge
synchronization present in dischargeWithCurrentTime(); update
discharge(PatientRoom) to also set the PatientEncounter.roomDischargeDateTime
and PatientEncounter.roomDischargedBy (the same logic found in
dischargeWithCurrentTime(), lines that update encounter's roomDischargeDateTime
and roomDischargedBy and persist via
getPatientEncounterFacade().edit(encounter)), or alternatively replace the call
site in BhtSummeryController to invoke dischargeWithCurrentTime(pR) instead so
the encounter is updated; ensure you reference and persist the PatientEncounter
via getPatientEncounterFacade() and maintain
notificationController.createNotification(pR, "Discharge").
---
Nitpick comments:
In `@src/main/java/com/divudi/bean/clinical/DischargeConditionController.java`:
- Around line 198-206: In getAsObject of DischargeConditionController, currently
Long.valueOf(value) can throw NumberFormatException for non-numeric input;
update getAsObject to validate/parse the incoming String safely (e.g., try/catch
NumberFormatException or use a numeric check) and handle invalid input by
returning null and optionally adding a FacesMessage or logging the invalid value
before returning, then only call controller.getEjbFacade().find(parsedLong) when
parsing succeeds; ensure you reference the getAsObject method and
controller.getEjbFacade().find(...) when implementing the fix.
- Around line 147-149: The catch block in DischargeConditionController currently
swallows exceptions (catch(Exception e) { e.printStackTrace(); }) so users get
no feedback and resources may leak; replace this with try-with-resources for the
Workbook/stream creation and handle the exception by logging the error (use your
logger) and adding a user-facing error message (e.g.,
FacesContext/PrimeFaces/UILayer message) so the UI informs the user of the
download failure; update the catch to log e and add the message, and ensure any
OutputStream/Workbook objects are opened in a try-with-resources block within
the method that performs the export/download.
In `@src/main/webapp/inward/admission_profile.xhtml`:
- Around line 425-432: Add an accessible tooltip/title to the Clinical Discharge
button by adding a title attribute on the p:commandButton that describes its
action (e.g., title="Navigate to Clinical Discharge"); update the element where
action="#{inpatientClinicalDataController.navigateToClinicalDischargeFromAdmission(admissionController.current)}"
and rendered="#{webUserController.hasPrivilege('InpatientClinicalDischarge')}"
so the title is present regardless of the conditional style that uses
admissionController.current.clinicallyDischarged.
🪄 Autofix (Beta)
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: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: c3152b11-37fc-41e4-98dc-915972ced80c
📒 Files selected for processing (11)
src/main/java/com/divudi/bean/clinical/DischargeConditionController.javasrc/main/java/com/divudi/bean/inward/BhtSummeryController.javasrc/main/java/com/divudi/bean/inward/InpatientClinicalDataController.javasrc/main/java/com/divudi/bean/inward/RoomChangeController.javasrc/main/java/com/divudi/core/data/Privileges.javasrc/main/java/com/divudi/core/data/SymanticType.javasrc/main/java/com/divudi/core/data/inward/PatientEncounterType.javasrc/main/java/com/divudi/core/entity/PatientEncounter.javasrc/main/webapp/emr/admin/discharge_conditions.xhtmlsrc/main/webapp/inward/admission_profile.xhtmlsrc/main/webapp/inward/inward_clinical_discharge.xhtml
src/main/java/com/divudi/bean/clinical/DischargeConditionController.java
Show resolved
Hide resolved
src/main/java/com/divudi/bean/clinical/DischargeConditionController.java
Show resolved
Hide resolved
src/main/java/com/divudi/bean/clinical/DischargeConditionController.java
Show resolved
Hide resolved
…e in RoomChangeController AdmissionFacade cannot accept PatientEncounter directly; inject and use PatientEncounterFacade for the roomDischargeDateTime sync. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Fix swapped success messages in DischargeConditionController.saveSelected() - Add null/empty guard in completeDischargeConditions() to prevent NPE - Fix row numbering bug in downloadAsExcel() (first row showed 2 instead of 1) - Use try-with-resources for Workbook and show user-facing error on failure - Wrap NumberFormatException in converter getAsObject() - Add privilege guard (InpatientClinicalDischarge) to discharge_conditions.xhtml form - Replace raw HTML labels with p:outputLabel in discharge_conditions.xhtml - Add for/id associations on labels in inward_clinical_discharge.xhtml - Add title tooltip to Clinical Discharge button in admission_profile.xhtml - Add room discharge sync logic to discharge() in RoomChangeController (was only in dischargeWithCurrentTime(), leaving inconsistent state when discharge() is called from BhtSummeryController) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
♻️ Duplicate comments (1)
src/main/webapp/inward/inward_clinical_discharge.xhtml (1)
207-217:⚠️ Potential issue | 🟡 MinorAdd accessible label for Follow-up Plan textarea.
The
txtFollowUptextarea is missing an associatedp:outputLabel. While the panel header provides visual context, screen readers need an explicit label association for accessibility.♿ Proposed fix
<div class="col-12"> + <p:outputLabel for="txtFollowUp" value="Follow-up Plan:" styleClass="font-weight-bold" /> <p:inputTextarea id="txtFollowUp" value="#{inpatientClinicalDataController.clinicalDischargeRecord.followUpPlan}"As per coding guidelines:
**/*.{xhtml,java}: Implement accessibility with proper tooltips and labeling.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/main/webapp/inward/inward_clinical_discharge.xhtml` around lines 207 - 217, The txtFollowUp textarea lacks an accessible label; add a p:outputLabel associated with id="txtFollowUp" (for="txtFollowUp") with visible text like "Follow-up Plan" (and optional tooltip/title) immediately before the p:inputTextarea so screen readers can associate the label with inpatientClinicalDataController.clinicalDischargeRecord.followUpPlan; ensure the label respects disabled state and matches styling/translation conventions used elsewhere.
🧹 Nitpick comments (1)
src/main/java/com/divudi/bean/clinical/DischargeConditionController.java (1)
121-152: Consider buffering Excel output for atomic downloads.The current implementation writes directly to
response.getOutputStream(). If an error occurs mid-write, the client may receive a partial/corrupted file. For robustness, consider writing to aByteArrayOutputStreamfirst, then settingContent-Lengthand writing the complete bytes.♻️ Suggested improvement
public void downloadAsExcel() { getItems(); FacesContext context = FacesContext.getCurrentInstance(); try (Workbook workbook = new XSSFWorkbook()) { Sheet sheet = workbook.createSheet("Discharge Conditions"); // ... populate sheet ... + // Buffer to byte array first for atomic download + java.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream(); + workbook.write(baos); + byte[] bytes = baos.toByteArray(); + HttpServletResponse response = (HttpServletResponse) context.getExternalContext().getResponse(); response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); response.setHeader("Content-Disposition", "attachment; filename=\"discharge_conditions.xlsx\""); - workbook.write(response.getOutputStream()); + response.setContentLength(bytes.length); + response.getOutputStream().write(bytes); context.responseComplete(); } catch (Exception e) { JsfUtil.addErrorMessage("Error generating Excel file: " + e.getMessage()); } }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/main/java/com/divudi/bean/clinical/DischargeConditionController.java` around lines 121 - 152, The downloadAsExcel method currently streams the Workbook directly to response.getOutputStream(), risking partial/corrupt files on errors; change it to write the workbook to a ByteArrayOutputStream first (call workbook.write(baos)), then set response.setContentLength(baos.size()) and response.getOutputStream().write(baos.toByteArray()), flush and close the output, and then call context.responseComplete(); keep the existing try-with-resources for Workbook and preserve the exception handling in the catch block to report failures; update references in this method (downloadAsExcel, workbook, response, context) only.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@src/main/webapp/inward/inward_clinical_discharge.xhtml`:
- Around line 207-217: The txtFollowUp textarea lacks an accessible label; add a
p:outputLabel associated with id="txtFollowUp" (for="txtFollowUp") with visible
text like "Follow-up Plan" (and optional tooltip/title) immediately before the
p:inputTextarea so screen readers can associate the label with
inpatientClinicalDataController.clinicalDischargeRecord.followUpPlan; ensure the
label respects disabled state and matches styling/translation conventions used
elsewhere.
---
Nitpick comments:
In `@src/main/java/com/divudi/bean/clinical/DischargeConditionController.java`:
- Around line 121-152: The downloadAsExcel method currently streams the Workbook
directly to response.getOutputStream(), risking partial/corrupt files on errors;
change it to write the workbook to a ByteArrayOutputStream first (call
workbook.write(baos)), then set response.setContentLength(baos.size()) and
response.getOutputStream().write(baos.toByteArray()), flush and close the
output, and then call context.responseComplete(); keep the existing
try-with-resources for Workbook and preserve the exception handling in the catch
block to report failures; update references in this method (downloadAsExcel,
workbook, response, context) only.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 7d694104-6710-406b-9b60-55b26e96aff9
📒 Files selected for processing (5)
src/main/java/com/divudi/bean/clinical/DischargeConditionController.javasrc/main/java/com/divudi/bean/inward/RoomChangeController.javasrc/main/webapp/emr/admin/discharge_conditions.xhtmlsrc/main/webapp/inward/admission_profile.xhtmlsrc/main/webapp/inward/inward_clinical_discharge.xhtml
🚧 Files skipped from review as they are similar to previous changes (1)
- src/main/webapp/inward/admission_profile.xhtml
|
Re: Fixed in fd9a04d — added the same |
…process The InpatientClinicalDischarge privilege was added to Privileges.java in PR #19658 but was not registered in UserPrivilageController.java, making it invisible in the admin privilege management UI. Administrators had no way to grant this privilege through the UI. Changes: - Register InpatientClinicalDischarge as a DefaultTreeNode under the "Clinical" branch of the Inward section in UserPrivilageController.java - Update developer_docs/security/privilege-system.md with an explicit 3-step checklist and warning that enum-only addition is not sufficient - Update CLAUDE.md with a "When Adding a New Privilege" section linking to the privilege system guide Closes #19677 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary
inward_clinical_discharge.xhtmlpage, linked from the inpatient dashboardPatientEncounterwhen the last room is vacatedemr/admin/discharge_conditions.xhtml) using the existingClinicalEntity/SymanticTypepattern (mirrorsplans.xhtml)Changes
PatientEncounterfor clinical/room discharge tracking and clinical discharge contentPatientEncounterType.ClinicalDischarge,SymanticType.Discharge_ConditionInpatientClinicalDischargeDischargeConditionController.java,discharge_conditions.xhtml,inward_clinical_discharge.xhtmlInpatientClinicalDataControllerRoomChangeController; warning inBhtSummeryControlleradmission_profile.xhtml(green = confirmed, orange = pending)Test plan
PatientEncountercolumnsmissing_database_fields.xhtmlInpatientClinicalDischargeprivilege to doctor rolesdischarge_conditions.xhtmlin the EMR admin navigation menuroomDischargeDateTimeset on the encounterCloses #19657
🤖 Generated with Claude Code
Summary by CodeRabbit