-
Notifications
You must be signed in to change notification settings - Fork 247
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
(fix) O3-4302: Hide voided diagnoses in patient chart visits widget #2167
Conversation
Size Change: +41 B (0%) Total Size: 16.1 MB ℹ️ View Unchanged
|
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.
LGTM. Left a suggestion for how we could restructure the code a touch. I haven't tested it out though.
.filter((diagnosis) => !diagnosis.voided) | ||
.forEach((diagnosis: Diagnosis) => { | ||
// Putting all the diagnoses in a single array. | ||
diagnoses.push({ | ||
diagnosis: diagnosis.display, | ||
type: diagnosis.rank === 1 ? 'red' : 'blue', | ||
rank: diagnosis.rank, | ||
voided: diagnosis.voided, | ||
}); |
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.
.filter((diagnosis) => !diagnosis.voided) | |
.forEach((diagnosis: Diagnosis) => { | |
// Putting all the diagnoses in a single array. | |
diagnoses.push({ | |
diagnosis: diagnosis.display, | |
type: diagnosis.rank === 1 ? 'red' : 'blue', | |
rank: diagnosis.rank, | |
voided: diagnosis.voided, | |
}); | |
const validDiagnoses = enc.diagnoses | |
.filter((diagnosis: Diagnosis) => !diagnosis.voided) | |
.map((diagnosis: Diagnosis) => ({ | |
diagnosis: diagnosis.display, | |
type: diagnosis.rank === 1 ? 'red' : 'blue', | |
rank: diagnosis.rank, | |
voided: diagnosis.voided, | |
})); | |
diagnoses.push(...validDiagnoses); |
Does this work just as well?
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.
yes it does, updated it
Unrelated, but can we also replace |
CC: @jayasanka-sack Worth thinking about in the re-working of this widget that we remove any voided DXes from the request altogether. |
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.
LGTM. Thanks, @CynthiaKamau!
…penmrs#2167) * (fix) O3-4302 Hide voided diagnosis in visits widget on patient chart * code review * Fixup --------- Co-authored-by: Dennis Kigen <kigen.work@gmail.com>
Requirements
Summary
Hide voided diagnosis in visits widget on patient chart
Screenshots
Related Issue
Other