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

Enhanced deceased patient banner tag implementation #524

Merged
merged 1 commit into from
Jan 25, 2022

Conversation

denniskigen
Copy link
Member

@denniskigen denniskigen commented Jan 25, 2022

Requirements

  • This PR has a title that briefly describes the work done, including the ticket number if there is a ticket.
  • My work conforms to the OpenMRS 3.0 Styleguide.
  • I checked for feature overlap with existing widgets.

Summary

Relates to #511.

This commit makes the following improvements:

  • Add a check for the deceasedBoolean property in the patient object. If truthy, proceed to render the component. Otherwise, return null. Presently, an error gets rendered in production because not all patient objects have this property.
  • Simplify the type annotation for the patient prop by picking only the deceasedBoolean property.
  • Rename the component from DeceasedBannerTag to the more informative DeceasedPatientBannerTag.
  • Rename the extension from deceased-tag to deceased-patient-tag.
  • Add a missing translation string.

Screenshots

Notice the error next to the Active Visit tag.

Screenshot 2022-01-25 at 15 36 46

Makes the following improvements:

- Add a check for the `deceasedBoolean` property in the patient object. If truthy, proceed to render the component. Otherwise, return `null`. Presently, an error gets rendered in production because some patient objects do not have this property.
- Simplify the type annotation for the `patient` prop by picking only the `deceasedBoolean` property.
- Rename the component from `DeceasedBannerTag` to the more informative `DeceasedPatientBannerTag`.
- Rename the extension from `deceased-tag` to `deceased-patient-tag`.
- Add a missing translation string.
@github-actions
Copy link
Contributor

File size impact

Merging enhancements into master impact files as follow:

@openmrs/esm-form-entry-app (no impact)
Files new size
Unmodified (4) 1.13 MB (0 B / +0%) 👻
Total (4) 1.13 MB (0 B / +0%) 👻
@openmrs/esm-generic-patient-widgets-app (no impact)
Files new size
Unmodified (17) 2.91 MB (0 B / +0%) 👻
Total (17) 2.91 MB (0 B / +0%) 👻
@openmrs/esm-patient-allergies-app (no impact)
Files new size
Unmodified (33) 2.59 MB (0 B / +0%) 👻
Total (33) 2.59 MB (0 B / +0%) 👻
@openmrs/esm-patient-appointments-app (no impact)
Files new size
Unmodified (25) 2.03 MB (0 B / +0%) 👻
Total (25) 2.03 MB (0 B / +0%) 👻
@openmrs/esm-patient-attachments-app (no impact)
Files new size
Unmodified (23) 1.6 MB (0 B / +0%) 👻
Total (23) 1.6 MB (0 B / +0%) 👻
@openmrs/esm-patient-banner-app (-0%)
Files new size
packages/esm-patient-banner-app/dist/1.js 2.04 kB 👶
packages/esm-patient-banner-app/dist/832.js 1.81 kB 👶
packages/esm-patient-banner-app/dist/574.js 406 B (+22 B / +5.73%) ↗️
packages/esm-patient-banner-app/dist/607.js 1.5 kB (-2 B / -0.13%) ↘️
packages/esm-patient-banner-app/dist/268.js deleted (-1.8 kB)
packages/esm-patient-banner-app/dist/911.js deleted (-2.09 kB)
Unmodified (13) 1 MB (0 B / +0%) 👻
Total (19) 1.01 MB (-24 B / -0%) ↘️
@openmrs/esm-patient-biometrics-app (no impact)
Files new size
Unmodified (23) 2.53 MB (0 B / +0%) 👻
Total (23) 2.53 MB (0 B / +0%) 👻
@openmrs/esm-patient-chart-app (no impact)
Files new size
Unmodified (40) 3.39 MB (0 B / +0%) 👻
Total (40) 3.39 MB (0 B / +0%) 👻
@openmrs/esm-patient-clinical-view-app (no impact)
Files new size
Unmodified (21) 1.4 MB (0 B / +0%) 👻
Total (21) 1.4 MB (0 B / +0%) 👻
@openmrs/esm-patient-common-lib (no impact)

No file in @openmrs/esm-patient-common-lib group (see config below).

{
  "./packages/esm-patient-common-lib/dist/*.js": true,
  "./packages/esm-patient-common-lib/dist/*.css": true,
  "./packages/esm-patient-common-lib/dist/*.map": false,
  "./packages/esm-patient-common-lib/dist/*.txt": false,
  "./packages/esm-patient-common-lib/dist/*.json": false
}
@openmrs/esm-patient-conditions-app (no impact)
Files new size
Unmodified (24) 1.89 MB (0 B / +0%) 👻
Total (24) 1.89 MB (0 B / +0%) 👻
@openmrs/esm-patient-forms-app (no impact)
Files new size
Unmodified (28) 2.01 MB (0 B / +0%) 👻
Total (28) 2.01 MB (0 B / +0%) 👻
@openmrs/esm-patient-immunizations-app (no impact)
Files new size
Unmodified (25) 1.86 MB (0 B / +0%) 👻
Total (25) 1.86 MB (0 B / +0%) 👻
@openmrs/esm-patient-medications-app (no impact)
Files new size
Unmodified (21) 2.77 MB (0 B / +0%) 👻
Total (21) 2.77 MB (0 B / +0%) 👻
@openmrs/esm-patient-notes-app (no impact)
Files new size
Unmodified (25) 1.85 MB (0 B / +0%) 👻
Total (25) 1.85 MB (0 B / +0%) 👻
@openmrs/esm-patient-programs-app (no impact)
Files new size
Unmodified (24) 1.86 MB (0 B / +0%) 👻
Total (24) 1.86 MB (0 B / +0%) 👻
@openmrs/esm-patient-test-results-app (no impact)
Files new size
Unmodified (21) 3.74 MB (0 B / +0%) 👻
Total (21) 3.74 MB (0 B / +0%) 👻
@openmrs/esm-patient-vitals-app (no impact)
Files new size
Unmodified (27) 3.47 MB (0 B / +0%) 👻
Total (27) 3.47 MB (0 B / +0%) 👻
Generated by @jsenv/file-size-impact during Report bundle size#1745548862 on 16ac5c6

@jonathandick jonathandick merged commit 016e0de into master Jan 25, 2022
@brandones
Copy link
Contributor

Thanks @denniskigen ! Sorry I didn't catch all that in my review.

@brandones brandones deleted the enhancements branch January 25, 2022 17:42
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.

3 participants