-
Notifications
You must be signed in to change notification settings - Fork 234
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-1491 Contact Details should be dynamically loaded for Patient Banner #972
Conversation
Size Change: -45.1 kB (-2%) Total Size: 2.89 MB
ℹ️ View Unchanged
|
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.
@brandones I'm not fully up on all this code so didn't give a deep review, but generally LGTM, I added a couple small comments, thanks!
} | ||
|
||
const Address: React.FC<{ address: AddressType }> = ({ address }) => { | ||
const PatientLists: React.FC<{ patientUuid: string }> = ({ patientUuid }) => { |
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.
When committing, would be worth noting that you added in the patient list functionality as part of this ticket 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.
Oh yeah that's right! Thanks
const { t } = useTranslation(); | ||
const getAddressKey = (url) => url.split('#')[1]; | ||
/* | ||
DO NOT REMOVE THIS COMMENT UNLESS YOU UNDERSTAND WHY IT IS HERE |
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.
Might be helpful instead to just explain why it is there so newbies can learn this best practice for translation keys that are dynamically generated.
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.
Ha yeah it's not a great comment, it's copy-pasted from the other Patient Banner implementation. But I will be refactoring them soon anyway: openmrs/openmrs-esm-patient-chart#1645
Requirements
Summary
This brings the patient-search contact section to parity with the patient chart patient banner, for better or worse. This is not exactly conformant with the designs, but I propose to bring both into conformance with the designs later.
It uses the address from the fhir Patient object, rather than a hard-coded set of address fields. It also adds patient lists support.
Screenshots
Related Issue
https://issues.openmrs.org/browse/O3-1491