-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OP-749 | To extend laboratory filter panel with search by patient #2104
base: develop
Are you sure you want to change the base?
OP-749 | To extend laboratory filter panel with search by patient #2104
Conversation
…atory-filter-panel-with-search-by-patient-id
} else { | ||
try { | ||
pat = patManager.getPatientById(Integer.parseInt(patid)); | ||
exists = pat == null ? false : true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exists = pat == null ? false : true; | |
exists = pat != null; |
This is much simpler and does the same thing. The variable exists
appears to be used only one in line 532. Why not just test the variable pat
there? And if there is an exception (catch block at line 527) the variable exists
will not be reset and will use the assigned value from line 518 which is true
. So, if there is an exception then line 533 will be executed which given that pat
is null
will most likely cause other errors. It looks like some rethinking of this logic is in order.
…atory-filter-panel-with-search-by-patient-id
…arch-by-patient-id' of https://github.com/ra247362/openhospital-gui into OP-749-oh-gui-to-extend-laboratory-filter-panel-with-search-by-patient-id
See OH-749
We added a text field in the laboratory section to allow for search by code, as described in the issue. We added error messages when invalid codes were added. The implemented behavior follows the one described in the issue, with the ENTER key being used to search only by code and the SEARCH button used to search by code and date.
Changes were made only in "LabBrowser.java" and the bundled language file "language_en.properties".