Skip to content

Create wireframe for Organism Antibiotic Sensitivity #19011#21650

Merged
buddhika75 merged 4 commits into
developmentfrom
19011-create-wireframe-for-organism-antibiotic-sensitivity
Jun 28, 2026
Merged

Create wireframe for Organism Antibiotic Sensitivity #19011#21650
buddhika75 merged 4 commits into
developmentfrom
19011-create-wireframe-for-organism-antibiotic-sensitivity

Conversation

@RashmikaHarshamal

@RashmikaHarshamal RashmikaHarshamal commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

#19490

Summary by CodeRabbit

  • New Features
    • Added separate Institution and Site selectors, plus an updated Department selector, to the Organism Antibiotic Sensitivity report.
    • Added Excel and PDF export options and improved table pagination with row count selection.
  • Bug Fixes
    • Updated the Process button to correctly run the Organism Antibiotic Sensitivity report.
  • UI/UX Improvements
    • Redesigned filters with date-time pickers, updated Doctor label, and clearer Visiting Type (OP/IP/CC) and Sensitivity (I/R/S) options.
    • Improved Print output by hiding the on-screen paginator during printing and restoring it afterward.

 #19490

Signed-off-by: RashmikaHarshamal <rashmikaharshamal169@gmail.com>
@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d27613da-0069-4f4e-b980-a125d694248e

📥 Commits

Reviewing files that changed from the base of the PR and between de693bd and 8e8fa04.

📒 Files selected for processing (1)
  • src/main/webapp/reports/lab/organism_antibiotic_sensitivity.xhtml
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/main/webapp/reports/lab/organism_antibiotic_sensitivity.xhtml

Walkthrough

The organism_antibiotic_sensitivity.xhtml report page is reworked across its filter form, action buttons, and results table. Filter controls are updated with new datetime picker options, Institution/Site selectors replacing Age/Branch, an expanded Department source, renamed doctor label, and additional Visiting Type and Sensitivity options. The Process button is now wired to a backing bean action, Print adds paginator-hiding JavaScript, and Excel/PDF export buttons are added. The results data table gains paginator configuration, facet-based column headers, and updated footer date formatting.

Changes

Organism Antibiotic Sensitivity Report UI Overhaul

Layer / File(s) Summary
Filter controls: dates, institution/site, department, doctor, visiting type, antibiotics
src/main/webapp/reports/lab/organism_antibiotic_sensitivity.xhtml
From/To date pickers enable time selection and navigator options, with both using #{sessionController.applicationPreference.longDateFormat} for pattern. Age/Branch controls are replaced by Institution and Site selectors backed by institutionController.companies and institutionController.sites. Department source changes to getDepartmentsOfInstitutionAndSite() with updated "Select the Department" prompt. Doctor label changes from "Referring Doctor Name" to "Doctor Name". Visiting Type expands from a single "All visits" item to explicit OP/IP/CC options. Investigation, Antibiotics, and Sensitivity row markup is adjusted.
Sensitivity options, action buttons, and results panel header
src/main/webapp/reports/lab/organism_antibiotic_sensitivity.xhtml
Sensitivity selector gains explicit I/R/S options. Process button is wired to #{reportsController.organismAntibioticSensitivityReport}. Print button adds JavaScript using hidePaginatorBeforePrint() to hide PrimeFaces paginators before printing and restore them after window.onafterprint. Excel and PDF export commands are added with exporter snippets commented. Results panel header is rewritten with Institution/Site/Department labels and empty value outputs.
Results data table: summary labels, paginator, facet headers, footer
src/main/webapp/reports/lab/organism_antibiotic_sensitivity.xhtml
Summary labels switch from From/To/Branch to MRN/Organism/Antibiotic/Sensitivity placeholders. p:dataTable gains paginator with rows and rowsPerPageTemplate configuration. Column headers are converted to f:facet name="header" blocks. Footer date conversion uses #{sessionController.applicationPreference.longDateFormat}.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: creating a wireframe/redesigning the UI for the Organism Antibiotic Sensitivity report, which is the core focus of the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 19011-create-wireframe-for-organism-antibiotic-sensitivity

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@RashmikaHarshamal RashmikaHarshamal changed the title In settle IOU remove icon isn't working Create wireframe for Organism Antibiotic Sensitivity #19011 Jun 22, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/webapp/reports/lab/organism_antibiotic_sensitivity.xhtml (1)

178-186: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Multiple filter selectOneMenus have value=""—none of these filters will capture selections.

The Organism (line 180), Antibiotics (line 198), and Sensitivity (line 212) selectOneMenus all have empty string values instead of binding to controller properties. Additionally, line 221 has <f:selectItems value=""> which is broken/vestigial code.

🐛 Proposed fix

Bind each to appropriate controller properties and remove the broken selectItems:

                                    <p:selectOneMenu
                                        id="cmdOrganism"
-                                       value=""
+                                       value="#{reportController.organism}"
                                        style="width:100%"
                                    <p:selectOneMenu
                                        id="cmdAntibiotics"
-                                       value=""
+                                       value="#{reportController.antibiotic}"
                                        style="width:100%"
                                    <p:selectOneMenu
                                        id="cmdSensitivity"
-                                       value=""
+                                       value="#{reportController.sensitivity}"
                                        style="width:100%"
                                        title="Filter by sensitivity result"
                                        filter="true">
                                        <f:selectItem itemLabel="Select Sensitivity"/>
                                        <f:selectItem itemValue="I" itemLabel="I"/>
                                        <f:selectItem itemValue="R" itemLabel="R"/>
                                        <f:selectItem itemValue="S" itemLabel="S"/>

-                                       <f:selectItems value="" var="myItem" itemValue="#{myItem}" itemLabel="#{myItem.name}"></f:selectItems>
                                    </p:selectOneMenu>

Also applies to: 196-203, 210-222

🤖 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 `@src/main/webapp/reports/lab/organism_antibiotic_sensitivity.xhtml` around
lines 178 - 186, The selectOneMenu elements with id attributes cmdOrganism (line
180), cmdAntibiotics (line 198), and cmdSensitivity (line 212) all have empty
string values instead of binding to controller properties, preventing filter
selections from being captured. Replace the empty value="" attributes in each of
these three selectOneMenu components with appropriate bindings to corresponding
controller properties (for example,
value="#{investigationController.selectedOrganism}" for the organism filter, and
similar bindings for antibiotics and sensitivity). Additionally, locate and
remove the broken vestigial code containing the empty selectItems element with
value="" at line 221, as it serves no purpose.
🧹 Nitpick comments (1)
src/main/webapp/reports/lab/organism_antibiotic_sensitivity.xhtml (1)

294-329: 🧹 Nitpick | 🔵 Trivial | ⚡ Quick win

Use h:outputText for displaying values; h:outputLabel is for form labels.

Lines 295, 298, 301 use h:outputLabel to display controller values—this is semantically incorrect. Per coding guidelines, use h:outputText for displaying values in ERP pages. Also, lines 323-324 and 328-329 have f:convertDateTime converters on empty h:outputLabel elements, which is vestigial code.

♻️ Proposed fix
                            <h:outputLabel value="Institution"/>
-                           <h:outputLabel value="#{reportController.institution}"></h:outputLabel>
+                           <h:outputText value="#{reportController.institution.name}"/>

                            <h:outputLabel value="Site"/>
-                           <h:outputLabel value="#{reportController.site}"></h:outputLabel>
+                           <h:outputText value="#{reportController.site.name}"/>

                            <h:outputLabel value="Department"/>
-                           <h:outputLabel value="#{reportController.department}"></h:outputLabel>
+                           <h:outputText value="#{reportController.department.name}"/>

Remove or properly wire the MRN/Organism/Antibiotic/Sensitivity summary labels (lines 313-329) once actual values are available.

🤖 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 `@src/main/webapp/reports/lab/organism_antibiotic_sensitivity.xhtml` around
lines 294 - 329, Replace the h:outputLabel elements that display controller
values (reportController.institution, reportController.site,
reportController.department, reportController.fromDate, reportController.toDate)
with h:outputText instead, as h:outputLabel is semantically meant for form
labels only. Additionally, remove the vestigial f:convertDateTime converters
from the empty h:outputLabel elements for Antibiotic and Sensitivity (the ones
with no value attribute), and properly wire the MRN, Organism, Antibiotic, and
Sensitivity output labels with their corresponding controller values once those
values are available.

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 `@src/main/webapp/reports/lab/organism_antibiotic_sensitivity.xhtml`:
- Around line 60-72: The p:selectOneMenu opening tag for cmdInstitution is
malformed—the closing `>` appears prematurely at the end of the title attribute
line, leaving filter="true" as orphaned text. Move the `>` to after the filter
attribute on the next line so all attributes (id, value, style, title, filter)
are properly contained within a single opening tag. Additionally, correct the
title attribute text from "Filter by patient age" to an appropriate label for
institution filtering, such as "Filter by Institution".
- Around line 25-50: The p:datePicker components with ids dpFrom and dpTo are
missing value bindings. Add a value attribute to each datePicker component that
binds to corresponding controller properties (e.g., #{reportController.fromDate}
for dpFrom and #{reportController.toDate} for dpTo) to ensure the selected dates
are properly captured in the backing bean when the form is submitted.
- Around line 334-343: The p:dataTable element in the
organism_antibiotic_sensitivity.xhtml file has value="null" as a string literal
instead of a proper EL binding, which prevents any data from being displayed.
Replace the value attribute with a proper EL expression that binds to the actual
report data from the controller (e.g., the reportsController's data property).
Additionally, add an id attribute with value "tblExport1" to the p:dataTable
element so that the Excel/PDF exporters can properly target this table for
export functionality.
- Line 77: The p:outputLabel with value="Site" has a for attribute that points
to the wrong component id. Update the for attribute from for="cmdInstitution" to
for="cmdInstitution1" to match the actual id of the Site selectOneMenu
component. This ensures the label is properly associated with the correct input
for accessibility. Additionally, consider renaming the selectOneMenu id from
cmdInstitution1 to cmdSite for better code clarity and maintainability.
- Around line 161-171: The p:selectOneMenu component with id="cmdVisitingType"
has an empty value attribute (value="") which prevents the selected visiting
type from being captured. Replace the empty value attribute with a binding to a
controller property, such as value="#{reportController.visitingType}", to enable
the filter functionality and allow the selected value to be properly stored and
used for filtering the organism antibiotic sensitivity report.
- Around line 229-282: Add unique `id` attributes to all four p:commandButton
elements (Process, Print, Excel, and PDF buttons) to comply with coding
guidelines. For the Excel and PDF buttons, uncomment the corresponding
p:dataExporter elements that are currently commented out, ensuring the target
attributes correctly reference the data tables (tblExport1 or tblExport2) to
make the export functionality operational.

---

Outside diff comments:
In `@src/main/webapp/reports/lab/organism_antibiotic_sensitivity.xhtml`:
- Around line 178-186: The selectOneMenu elements with id attributes cmdOrganism
(line 180), cmdAntibiotics (line 198), and cmdSensitivity (line 212) all have
empty string values instead of binding to controller properties, preventing
filter selections from being captured. Replace the empty value="" attributes in
each of these three selectOneMenu components with appropriate bindings to
corresponding controller properties (for example,
value="#{investigationController.selectedOrganism}" for the organism filter, and
similar bindings for antibiotics and sensitivity). Additionally, locate and
remove the broken vestigial code containing the empty selectItems element with
value="" at line 221, as it serves no purpose.

---

Nitpick comments:
In `@src/main/webapp/reports/lab/organism_antibiotic_sensitivity.xhtml`:
- Around line 294-329: Replace the h:outputLabel elements that display
controller values (reportController.institution, reportController.site,
reportController.department, reportController.fromDate, reportController.toDate)
with h:outputText instead, as h:outputLabel is semantically meant for form
labels only. Additionally, remove the vestigial f:convertDateTime converters
from the empty h:outputLabel elements for Antibiotic and Sensitivity (the ones
with no value attribute), and properly wire the MRN, Organism, Antibiotic, and
Sensitivity output labels with their corresponding controller values once those
values are available.
🪄 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: 83414a30-19d1-4d52-a78c-fc287d2824d7

📥 Commits

Reviewing files that changed from the base of the PR and between 7228831 and ea3b5ee.

📒 Files selected for processing (1)
  • src/main/webapp/reports/lab/organism_antibiotic_sensitivity.xhtml

Comment thread src/main/webapp/reports/lab/organism_antibiotic_sensitivity.xhtml Outdated
Comment thread src/main/webapp/reports/lab/organism_antibiotic_sensitivity.xhtml
Comment thread src/main/webapp/reports/lab/organism_antibiotic_sensitivity.xhtml Outdated
Comment thread src/main/webapp/reports/lab/organism_antibiotic_sensitivity.xhtml
Comment thread src/main/webapp/reports/lab/organism_antibiotic_sensitivity.xhtml
Comment thread src/main/webapp/reports/lab/organism_antibiotic_sensitivity.xhtml Outdated
Comment thread src/main/webapp/reports/lab/organism_antibiotic_sensitivity.xhtml Outdated
Comment thread src/main/webapp/reports/lab/organism_antibiotic_sensitivity.xhtml
@RashmikaHarshamal RashmikaHarshamal requested review from damithdeshan98 and removed request for damithdeshan98 June 23, 2026 09:22
@buddhika75 buddhika75 merged commit 15a3813 into development Jun 28, 2026
3 checks passed
@buddhika75 buddhika75 deleted the 19011-create-wireframe-for-organism-antibiotic-sensitivity branch June 28, 2026 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants