Skip to content

Conversation

@usamaidrsk
Copy link
Member

@usamaidrsk usamaidrsk commented Jul 8, 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

Fix undefined, undefined patient name on the patient card by adding the usePatient hook and getPatientName

Screenshots

Related Issue

O3-3567

Other

@usamaidrsk usamaidrsk marked this pull request as ready for review July 8, 2024 13:09
@usamaidrsk usamaidrsk requested a review from mseaton July 8, 2024 13:12
@brandones
Copy link
Contributor

@usamaidrsk Two things:

  1. I'm confused about what went wrong. What caused this bug?

  2. I think we want to avoid making a patient REST request for every card, if we can avoid it. Does the patient object from the ward endpoint really not have names?

@usamaidrsk
Copy link
Member Author

@usamaidrsk Two things:

  1. I'm confused about what went wrong. What caused this bug?
  2. I think we want to avoid making a patient REST request for every card, if we can avoid it. Does the patient object from the ward endpoint really not have names?

Yes @brandones , I agree that we do not need to make patient REST requests for every card. As mentioned here, some data is not present in the patient object from the ward endpoint and the EMR API.

We might as well go ahead and close this PR. Upon further inspection, I found that the undefined issue was resolved in this PR by @chibongho where he added this fix

@brandones brandones closed this Jul 9, 2024
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.

2 participants