-
Notifications
You must be signed in to change notification settings - Fork 359
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 patient import from external result #5908
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
✅ Deploy Preview for care-egov-staging ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
👋 Hi, @Ashesh3, This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there. |
@Ashesh3 clear the merge conflict |
👋 Hi, @Ashesh3, This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there. |
LGTM |
@Ashesh3 We truly appreciate your efforts. Thank you for taking the time to contribute; this is a very valuable contribution to us 🥇. We always welcome your contribution 🙂, so feel free to contribute to anything anytime, and never lose that spirit of innovation 🙌. |
WHAT
🤖 Generated by Copilot at 297a584
This pull request enables importing external results data for patients based on their name. It refactors the
PatientRegister
component to use the form context API and improves the rendering logic.Proposed Changes
@coronasafe/care-fe-code-reviewers @coronasafe/code-reviewers
HOW
🤖 Generated by Copilot at 297a584
showImport
state variable to store the form context value of the name field, and update its usage accordingly (link, link, link, link, link)fetchExtResultData
function, and use thefield.onChange
method to update the form values with the data from external results (link, link, link)Form
component outside the conditional rendering of theshowImport
state variable, and hide it with adiv
element with ahidden
class name based on theshowImport.show
property (link, link)formField
state variable and asetFormField
call to store the form context value of the name field (link)?.
to theres.data
expression, to avoid potential errors ifres
is undefined or null (link)setIsLoading(false)
call from thesetShowImport
call (link)ButtonV2
component that triggers the import inside adiv
element with a border, to make it visually consistent with the rest of the form fields (link)FormContextValue
type from../Form/FormContext.js
to use it later in the code (link)