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

O3-1114: Adapt encounters widget to match designs #572

Merged
merged 3 commits into from
Feb 22, 2022
Merged

Conversation

denniskigen
Copy link
Member

@denniskigen denniskigen commented Feb 22, 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

Presently, the encounters widget doesn't quite match the available spec. This PR rectifies this by providing a whole bunch of design fixes, such as:

  • Switching to a tab panel instead of a content switcher for toggling between the Visit summaries view and the All encounters view.
  • Addition of an Encounters tab to all visit summaries in the Visit summaries view. This tab displays a tabular overview of the encounters associated with a visit when present. It's a slightly pared-down version of what you'd see in the All encounters tab.
  • Redoing the All encounters view to display a tabular overview of all the encounters linked to a patient.
  • Applying visual tweaks to get the UI as close as possible to matching the spec.

Additional changes following a design review from Ciaran:

  • Rename the encounters dashboard to visits.
  • Show the encounter Time in the encounters tab summary of the Visit Summaries view. The All Encounters view should show both the encounter Date and Time.
  • Simplify the empty state view in the Encounters tab.
  • Add options for editing an encounter, launching an encounter in the encounters dashboard and deleting an encounter to the overflow actions menu.

Screenshots

image

image

Screenshot 2022-02-22 at 12 04 45

image

image

Screenshot 2022-02-22 at 14 10 52

image

@github-actions
Copy link
Contributor

github-actions bot commented Feb 22, 2022

File size impact

Merging O3-1114 into master impact files as follow:

@openmrs/esm-form-entry-app (+8.02%)
Files new size
packages/esm-form-entry-app/dist/1.openmrs-esm-form-entry-app.js 1.48 MB (+109 kB / +7.92%) ↗️
packages/esm-form-entry-app/dist/openmrs-esm-form-entry-app.js 84.5 kB (+5.83 kB / +7.41%) ↗️
packages/esm-form-entry-app/dist/2.openmrs-esm-form-entry-app.js 46.5 kB (+5.21 kB / +12.59%) ↗️
Unmodified (1) 155 B (0 B / +0%) 👻
Total (4) 1.62 MB (+120 kB / +8.02%) ↗️
@openmrs/esm-generic-patient-widgets-app (no impact)
Files new size
Unmodified (14) 2.9 MB (0 B / +0%) 👻
Total (14) 2.9 MB (0 B / +0%) 👻
@openmrs/esm-patient-allergies-app (no impact)
Files new size
Unmodified (32) 2.57 MB (0 B / +0%) 👻
Total (32) 2.57 MB (0 B / +0%) 👻
@openmrs/esm-patient-appointments-app (no impact)
Files new size
Unmodified (24) 2.05 MB (0 B / +0%) 👻
Total (24) 2.05 MB (0 B / +0%) 👻
@openmrs/esm-patient-attachments-app (no impact)
Files new size
Unmodified (19) 1.6 MB (0 B / +0%) 👻
Total (19) 1.6 MB (0 B / +0%) 👻
@openmrs/esm-patient-banner-app (no impact)
Files new size
Unmodified (15) 992 kB (0 B / +0%) 👻
Total (15) 992 kB (0 B / +0%) 👻
@openmrs/esm-patient-biometrics-app (no impact)
Files new size
Unmodified (21) 2.53 MB (0 B / +0%) 👻
Total (21) 2.53 MB (0 B / +0%) 👻
@openmrs/esm-patient-chart-app (+0.21%)
Files new size
packages/esm-patient-chart-app/dist/202.js 166 kB 👶
packages/esm-patient-chart-app/dist/140.js 159 kB 👶
packages/esm-patient-chart-app/dist/325.js 40 kB 👶
packages/esm-patient-chart-app/dist/696.js 31.9 kB 👶
packages/esm-patient-chart-app/dist/618.js 1.22 kB 👶
packages/esm-patient-chart-app/dist/574.js 2.56 kB (+79 B / +3.18%) ↗️
packages/esm-patient-chart-app/dist/442.js 48.3 kB (+4 B / +0.01%) ↗️
packages/esm-patient-chart-app/dist/424.js 10.5 kB (+1 B / +0.01%) ↗️
packages/esm-patient-chart-app/dist/openmrs-esm-patient-chart-app.js 19.2 kB (+1 B / +0.01%) ↗️
packages/esm-patient-chart-app/dist/973.js deleted (-3.67 kB)
packages/esm-patient-chart-app/dist/691.js deleted (-31.9 kB)
packages/esm-patient-chart-app/dist/580.js deleted (-37.5 kB)
packages/esm-patient-chart-app/dist/191.js deleted (-157 kB)
packages/esm-patient-chart-app/dist/703.js deleted (-161 kB)
Unmodified (31) 3.1 MB (0 B / +0%) 👻
Total (45) 3.58 MB (+7.47 kB / +0.21%) ↗️
@openmrs/esm-patient-clinical-view-app (no impact)
Files new size
Unmodified (18) 1.41 MB (0 B / +0%) 👻
Total (18) 1.41 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 (25) 1.91 MB (0 B / +0%) 👻
Total (25) 1.91 MB (0 B / +0%) 👻
@openmrs/esm-patient-forms-app (no impact)
Files new size
Unmodified (24) 1.97 MB (0 B / +0%) 👻
Total (24) 1.97 MB (0 B / +0%) 👻
@openmrs/esm-patient-immunizations-app (no impact)
Files new size
Unmodified (21) 1.81 MB (0 B / +0%) 👻
Total (21) 1.81 MB (0 B / +0%) 👻
@openmrs/esm-patient-medications-app (no impact)
Files new size
Unmodified (19) 2.77 MB (0 B / +0%) 👻
Total (19) 2.77 MB (0 B / +0%) 👻
@openmrs/esm-patient-notes-app (no impact)
Files new size
Unmodified (24) 1.94 MB (0 B / +0%) 👻
Total (24) 1.94 MB (0 B / +0%) 👻
@openmrs/esm-patient-programs-app (no impact)
Files new size
Unmodified (21) 1.91 MB (0 B / +0%) 👻
Total (21) 1.91 MB (0 B / +0%) 👻
@openmrs/esm-patient-test-results-app (no impact)
Files new size
Unmodified (26) 3.77 MB (0 B / +0%) 👻
Total (26) 3.77 MB (0 B / +0%) 👻
@openmrs/esm-patient-vitals-app (no impact)
Files new size
Unmodified (25) 3.58 MB (0 B / +0%) 👻
Total (25) 3.58 MB (0 B / +0%) 👻
Generated by @jsenv/file-size-impact during Report bundle size#1881485757 on 308948a

Presently, the encounters widget doesn't quite match the available spec. This PR fixes a whole bunch of design mismatches such as:

- Use of a content switcher for toggling between the `Visit summaries` view and the `All encounters` view. Tabs ought to be used instead.
- Addition of a missing tab for `Encounters` in Visit summary overview.
- Completely redoing the `All encounters` view so that it displays a tabular summary of _all_ the encounters.
- Applying visual tweaks to the UI to get it as close as possible to matching the spec.
- Rename the `encounters` dashboard to `visits`.
- Show just the encounter `Time` in the Encounters tab summary. The `All Encounters` summary should show both the date and time of an encounter.
- Show a simpler empty state for the Encounters tab when no encounter data is available.
- Add options for editing an encounter, launching an encounter in the encounters dashboard and deleting an encounter to the overflow actions menu.
@denniskigen
Copy link
Member Author

A summary of the remaining work:

  • Adding handlers for the Go to this encounter and Delete this encounter options of the overflow menu.
  • Center-aligning the visits dashboard and constraining its width to 768px desktop viewports https://app.zeplin.io/project/60d59321e8100b0324762e05/screen/620676ddb695b00451588e64. This behaviour should be standardised across all dashboards per Ciaran.
  • Adding counts to the notes, tests, medications and encounters tabs.
  • Adding search filters and a search box to the encounters list datatable.
  • Cleaning up the medications summary UI - figuring out what to show when incomplete data is available.
  • Horizontally-scrollable UIs on the tablet viewport.

I expect to tackle these in subsequent pull requests. Their absence here doesn't affect the readiness of this body of work.

Copy link
Member

@jonathandick jonathandick left a comment

Choose a reason for hiding this comment

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

LGTM

@jonathandick jonathandick merged commit 9cd53ef into master Feb 22, 2022
@ibacher ibacher deleted the O3-1114 branch January 16, 2024 18:52
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