Skip to content
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

Add suggestion chips instead of autofilling diagnosis #8369

Merged
merged 8 commits into from
Sep 3, 2024

Conversation

shivankacker
Copy link
Member

@shivankacker shivankacker commented Aug 20, 2024

Fixes #8342

  • Clicking on a chip should autofill the diagnosis dropdown. The user will have to then select the type.
  • Also removes support for prescriptions as discussed on Weekly review (20th August)

image

@coronasafe/care-fe-code-reviewers @coronasafe/code-reviewers

Merge Checklist

  • Add specs that demonstrate bug / test a new feature.
  • Update product documentation.
  • Ensure that UI text is kept in I18n files.
  • Prep screenshot or demo video for changelog entry, and attach it to issue.
  • Request for Peer Reviews
  • Completion of QA

@shivankacker shivankacker requested a review from a team as a code owner August 20, 2024 16:41
Copy link

vercel bot commented Aug 20, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
care-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 23, 2024 7:22am

Copy link

netlify bot commented Aug 20, 2024

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit 61691b3
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/66c83865eff9ab000837ccba
😎 Deploy Preview https://deploy-preview-8369--care-egov-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

cypress bot commented Aug 20, 2024

CARE    Run #3173

Run Properties:  status check passed Passed #3173  •  git commit 61691b3b33: Add suggestion chips instead of autofilling diagnosis
Project CARE
Branch Review suggestion-chips
Run status status check passed Passed #3173
Run duration 03m 01s
Commit git commit 61691b3b33: Add suggestion chips instead of autofilling diagnosis
Committer Shivank Kacker
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 126
View all changes introduced in this branch ↗︎

@github-actions github-actions bot added the merge conflict pull requests with merge conflict label Aug 21, 2024
Copy link

👋 Hi, @shivankacker,
Conflicts have been detected against the base branch. Please rebase your branch against the base branch.


This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there.

@nihal467
Copy link
Member

nihal467 commented Aug 22, 2024

@shivankacker

  • can you clear the merge conflict
  • can you attach a screenshot or video about the feature
  • is it ready for testing ?

@github-actions github-actions bot removed the merge conflict pull requests with merge conflict label Aug 23, 2024
@shivankacker
Copy link
Member Author

@nihal467 attached screenshots to the PR. It is ready to be tested.

@nihal467
Copy link
Member

nihal467 commented Sep 2, 2024

image
image

@shivankacker

  • when we click on the suggestion chip of scribe, it entirely refresh the page, and all the scribe related data is vanished
  • modify the PR and issue description, mentioning is the chip clickable or not and what all other functionality are added / removed in the PR to have a better understanding on the context.

CC: @gigincg

Copy link

netlify bot commented Sep 2, 2024

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit 9a8c481
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/66d73b644ca50500089ab596
😎 Deploy Preview https://deploy-preview-8369--care-egov-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@shivankacker
Copy link
Member Author

@nihal467 updated, the buttons should be clickable and autofill the diagnosis dropdown

@nihal467
Copy link
Member

nihal467 commented Sep 3, 2024

image

  • The badge is not accepting multiple clicks. For example, let's assume we have the badge 1A00 as shown in the screenshot. When we click on the badge, it auto-fills the diagnosis input field. However, if we remove it from the field and try to click on the badge again, the auto-fill for the diagnosis field will not work a second time.

image

  • When we add a particular diagnosis using the badge, the badge should be removed from the suggestions.

@shivankacker are these expected behaviors?

cc: @gigincg

@shivankacker
Copy link
Member Author

@nihal467 The bug with chip click has been fixed.

I did not hide already entered diagnoses as the Diagnosis dropdown also does not hide it, and it will throw the "Diagnosis already entered error" as well. Anyways I have hid it with the latest commit. But this might be a little confusing for a user who previously marked the diagnosis as entered in error and wishes to add it again. (Just an edge case)

@nihal467
Copy link
Member

nihal467 commented Sep 3, 2024

@shivankacker the edge case seems valid, we shouldn't be hiding already-added badges for now, if user request for the same, we can do that

@shivankacker
Copy link
Member Author

@nihal467 understood, reverted the change

@nihal467
Copy link
Member

nihal467 commented Sep 3, 2024

LGTM

@@ -36,6 +38,10 @@ export default function AddICD11Diagnosis(props: AddICD11DiagnosisProps) {
}
}, [res?.status]);

useEffect(() => props.prefill && setSelected(props.prefill), [props.prefill]);

useEffect(() => props.setPrefill?.(undefined), [selected]);
Copy link
Member

@khavinshankar khavinshankar Sep 3, 2024

Choose a reason for hiding this comment

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

@shivankacker can we remove the second use effect and use a util function like handleSelection which updates both selected and prefill state

Copy link
Member Author

Choose a reason for hiding this comment

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

Made some changes, is that what you meant?

@khavinshankar khavinshankar added the question Further information is requested label Sep 3, 2024
@shivankacker shivankacker removed question Further information is requested changes required labels Sep 3, 2024
@khavinshankar khavinshankar merged commit 5e95d60 into develop Sep 3, 2024
30 checks passed
@khavinshankar khavinshankar deleted the suggestion-chips branch September 3, 2024 18:46
Copy link

github-actions bot commented Sep 3, 2024

@shivankacker Your efforts have helped advance digital healthcare and TeleICU systems. 🚀 Thank you for taking the time out to make CARE better. We hope you continue to innovate and contribute; your impact is immense! 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Instead of autofilling on scribe, show the top search results for dropdown selections as chips
4 participants