Feat: add specialist name to the eChart Consultations box#160
Open
LiamStanziani wants to merge 4 commits into
Conversation
… the hover format to follow the new format in the echart box, guard for missing values to format correctly in potential use cases
…l and conditional path for hasService boolean, catch potential formatting issue with LinkTitle if referralLabel is empty (fall back to only service date in that case), and encode LinkTitle and Title
… edge case issues
Reviewer's GuideAdds specialist names to eChart Consultation box row labels and hover tooltips, refactors label construction to handle missing values and the "N/A" sentinel cleanly, and HTML-encodes titles/tooltips to safely render user-entered data. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The referral label construction logic in
EctDisplayConsult2Action(service/specialist combination, trimming, and NOT_APPLICABLE handling) is getting a bit dense; consider extracting it into a small helper method for readability and easier reuse/tests if other views need the same format. - Promoting
ConsultationListDTO.NOT_APPLICABLEtopublicmakes it accessible but ties other callers to this DTO; if this sentinel is shared domain-wide, consider moving it to a dedicated constants or utility class so the DTO doesn’t become a general-purpose constants holder.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The referral label construction logic in `EctDisplayConsult2Action` (service/specialist combination, trimming, and NOT_APPLICABLE handling) is getting a bit dense; consider extracting it into a small helper method for readability and easier reuse/tests if other views need the same format.
- Promoting `ConsultationListDTO.NOT_APPLICABLE` to `public` makes it accessible but ties other callers to this DTO; if this sentinel is shared domain-wide, consider moving it to a dedicated constants or utility class so the DTO doesn’t become a general-purpose constants holder.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the referred-to specialist's name into each row of the Consultations box in the eChart
left navbar, so referrals can be identified at a glance without opening them. Rows now read
Service - Specialistbefore the date (e.g.OBGYN - Smith, John ... 2023-09-15), and the hovertooltip is aligned to the same format.
Original PR: openo-beta#2487
Problem
In the eChart Consultations box, each referral row showed only the service type and the referral
date — with no indication of who the referral was to:
This made it slow to identify the right referral when processing appointment notifications or
locating a referral referenced in a tickler, and contributed to duplicate-referral errors (a new
referral created when one already existed).
Solution
Surface the specialist inline as
Service - Specialist, immediately before the existing date. Thespecialist name was already loaded by the same query that builds the list (and already shown in the
row's hover tooltip), so this surfaces existing data rather than adding any new query.
Changes:
EctDisplayConsult2Action.java— builds the row label asService - Specialist, omittingwhichever part is missing so there is never a stray separator or an
"N/A"placeholder(both →
Service - Specialist; specialist only →Specialist; service only →Service). Thevisible title and the hover tooltip now use the same format; the tooltip also appends the date,
replacing the legacy
Service(Specialist) Dateparenthesis format (which removes the oldService(N/A) Dateartifact on no-specialist rows).ConsultationListDTO.java—NOT_APPLICABLE("N/A") promoted topublicso theno-specialist sentinel has a single source of truth that the action references.
Behavior (visible row / hover tooltip):
OBGYN - Smith, JohnOBGYN - Smith, John 2023-09-15OBGYNOBGYN 2023-09-15Cardiology - Dr. JonesCardiology - Dr. Jones 2023-09-15Smith, JohnSmith, John 2023-09-15UI Before:
UI After
Summary by Sourcery
Improve eChart Consultations list to show clearer referral information inline and in tooltips.
New Features:
Enhancements:
Service - Specialist Date, omitting missing parts without placeholder artifacts.NOT_APPLICABLEsentinel inConsultationListDTOfor reuse when handling missing specialist values.