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

(fix) O3-2654: Process visit attributes separately from the visit payload #1616

Merged

Conversation

usamaidrsk
Copy link
Member

@usamaidrsk usamaidrsk commented Jan 24, 2024

Requirements

  • This PR has a title that briefly describes the work done including the ticket number. If there is a ticket, make sure your PR title includes a conventional commit label. See existing PR titles for inspiration.
  • My work conforms to the OpenMRS 3.0 Styleguide and design documentation.
  • My work includes tests or is validated by existing tests.

Summary

This PR decouples the handling of visit attributes from the visit payload. Creating and updating visit attributes is handled by separate endpoints and SWR hooks specific to that purpose.

Screenshots

handle-visit-attributes.mp4

Related Issue

O3-2654

Other

Copy link
Contributor

@njiddasalifu njiddasalifu left a comment

Choose a reason for hiding this comment

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

functioning well.

Copy link
Member

@jayasanka-sack jayasanka-sack left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @usamaidrsk ! Could you please add some test cases to validate your implementation?

@denniskigen denniskigen requested a review from ibacher January 29, 2024 19:14
Copy link
Member

@ibacher ibacher left a comment

Choose a reason for hiding this comment

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

Thanks @usamaidrsk! A few notes on some improvements that could be made here.

@usamaidrsk
Copy link
Member Author

I have pushed updates, whenever possible please review them @ibacher
Thanks
cc @vasharma05

Copy link
Member

@ibacher ibacher left a comment

Choose a reason for hiding this comment

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

I think this meets most of my asks. A couple of small things. Also, as @jayasanka-sack mentioned, it would be good to have some kind of tests in place for this.

@vasharma05 vasharma05 changed the title (fix) O3-2654: Improvement handle visit attributes separate from visit endpoints (fix) O3-2654: Visit attributes should be added/modified separately than the visit payload Feb 5, 2024
Copy link
Member

@vasharma05 vasharma05 left a comment

Choose a reason for hiding this comment

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

Thanks @usamaidrsk for the work and adding the unit test cases as well 💪

@vasharma05
Copy link
Member

Hi @usamaidrsk, please resolve the conflicts.

Requesting @ibacher and @jayasanka-sack for re-review.
Thanks!

@usamaidrsk
Copy link
Member Author

@ibacher, @jayasanka-sack this PR is pending for long, please help review it.
Thanks

@jayasanka-sack
Copy link
Member

Hello @usamaidrsk, it seems that there are some discrepancies in the commit history of your branch. Could you please take a moment to rectify this?

@usamaidrsk usamaidrsk closed this Mar 11, 2024
@usamaidrsk usamaidrsk deleted the fix-error-on-update-visit-attributes branch March 11, 2024 11:21
@usamaidrsk usamaidrsk restored the fix-error-on-update-visit-attributes branch March 11, 2024 11:21
@usamaidrsk usamaidrsk reopened this Mar 11, 2024
@ibacher ibacher changed the title (fix) O3-2654: Visit attributes should be added/modified separately than the visit payload (fix) O3-2654: Visit attributes should be added/modified separately from the visit payload May 23, 2024
@usamaidrsk usamaidrsk requested a review from ibacher May 23, 2024 14:49
@ibacher ibacher dismissed their stale review May 23, 2024 19:46

Needs re-review

denniskigen
denniskigen previously approved these changes May 23, 2024
Copy link
Member

@denniskigen denniskigen left a comment

Choose a reason for hiding this comment

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

A few suggestions

@denniskigen denniskigen dismissed their stale review May 23, 2024 23:09

Meant to request changes instead

@usamaidrsk usamaidrsk requested a review from denniskigen May 27, 2024 13:18
@denniskigen denniskigen force-pushed the fix-error-on-update-visit-attributes branch from 8729fbe to 7c5bc2c Compare May 27, 2024 18:29
Copy link
Member

@denniskigen denniskigen left a comment

Choose a reason for hiding this comment

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

Thanks, @usamaidrsk. @ibacher, are you satisfied with the changes?

@denniskigen denniskigen changed the title (fix) O3-2654: Visit attributes should be added/modified separately from the visit payload (fix) O3-2654: Process visit attributes separately from the visit payload May 27, 2024
@denniskigen denniskigen force-pushed the fix-error-on-update-visit-attributes branch 2 times, most recently from e398cad to 32ce375 Compare May 28, 2024 09:35
@denniskigen denniskigen force-pushed the fix-error-on-update-visit-attributes branch from 32ce375 to cff7153 Compare May 28, 2024 09:58
Copy link
Member

@denniskigen denniskigen left a comment

Choose a reason for hiding this comment

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

I've tested this out and it appears to work as intended. Thanks, @usamaidrsk!

editing-visit-attributes.mp4

@denniskigen denniskigen force-pushed the fix-error-on-update-visit-attributes branch from cff7153 to 56af777 Compare May 28, 2024 11:14
@denniskigen denniskigen merged commit 1951999 into openmrs:main May 28, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants