-
Notifications
You must be signed in to change notification settings - Fork 249
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
(feat) Add ability to filter observations in the generic patient widget app by encounter type #854
Conversation
Requesting review by @vasharma05. FYI Vineet, @ibacher was reviewing #827 and believes this should be good to go, but great if you can review this one. FYI ICRC is blocked by this. |
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.
Generally looks good. I've left a few comments to address then this should be good to go.
const { data } = useConfig(); | ||
const { encounterTypes, data } = useConfig(); | ||
|
||
const UrlEncounterTypes: string = encounterTypes.length ? `&encounter.type=${encounterTypes.toString()}` : ''; |
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.
const UrlEncounterTypes: string = encounterTypes.length ? `&encounter.type=${encounterTypes.toString()}` : ''; | |
const urlEncounterTypes: string = encounterTypes.length ? `&encounter.type=${encounterTypes.toString()}` : ''; |
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.
Seems better to name this variable encounterTypes
.
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.
I used the suggested change 'urlEncounterTypes'
packages/esm-generic-patient-widgets-app/src/resources/useObs.ts
Outdated
Show resolved
Hide resolved
_description: 'Displayed graph by default', | ||
_default: true, | ||
}, | ||
encounterTypes: { |
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.
We should have a _description
for this property 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.
Parameter added
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.
Looks Good, thanks @icrc-agomes 👍 , except for the merge conflicts, otherwise, we can merge it.
@hadijahkyampeire conflicts fixed :) Thanks. |
…et app by encounter type (openmrs#854) * Filter by encounter types implemented in observation endpoint on esm-generic-patient-widgets-app 2# * esm-generic-patient-widgets-app mock data for testing changed * Changes made in variables, tests and data structure Co-authored-by: Andre Gomes <[email protected]>
Requirements
Summary
In
esm-generic-patient-widgets-app
, it was needed to implement the filter of observations endpoint by encounter type. Some changes were also made in the mock data for testing.Related Issue
This branch is a continuation of this pull request #827