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

03 1168: Add ability to cancel (void) active visit #608

Merged
merged 4 commits into from
Mar 16, 2022
Merged

Conversation

donaldkibet
Copy link
Member

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.
  • My work includes tests or is validated by existing tests.

Summary

  1. Add the ability to cancel the current active visit i.e the visit is voided. The reasoning behind this is feedback from clinical testing.
  2. Fix bug on start-visit-form where if the time is 12 noon, it converts the time to the next day date. e.g 15-march-2022 12:03 PM converted to `16-march-2022 00:03 AM'

Screenshots

Kapture 2022-03-15 at 15 34 42

Related Issue

https://issues.openmrs.org/projects/O3/issues/O3-1168?filter=myopenissues

Other

@github-actions
Copy link
Contributor

github-actions bot commented Mar 15, 2022

File size impact

Merging 03-1168 into master impact files as follow:

@openmrs/esm-form-entry-app (+8.03%)
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.1 kB (+5.19 kB / +12.69%) ↗️
Unmodified (1) 155 B (0 B / +0%) 👻
Total (4) 1.62 MB (+120 kB / +8.03%) ↗️
@openmrs/esm-generic-patient-widgets-app (+0%)
Files new size
packages/esm-generic-patient-widgets-app/dist/231.js 466 kB (+11 B / +0%) ↗️
Unmodified (13) 2.53 MB (0 B / +0%) 👻
Total (14) 2.99 MB (+11 B / +0%) ↗️
@openmrs/esm-patient-allergies-app (+0%)
Files new size
packages/esm-patient-allergies-app/dist/231.js 466 kB (+11 B / +0%) ↗️
Unmodified (30) 2.21 MB (0 B / +0%) 👻
Total (31) 2.68 MB (+11 B / +0%) ↗️
@openmrs/esm-patient-appointments-app (+0%)
Files new size
packages/esm-patient-appointments-app/dist/231.js 466 kB (+11 B / +0%) ↗️
Unmodified (23) 1.68 MB (0 B / +0%) 👻
Total (24) 2.15 MB (+11 B / +0%) ↗️
@openmrs/esm-patient-attachments-app (+0%)
Files new size
packages/esm-patient-attachments-app/dist/231.js 466 kB (+11 B / +0%) ↗️
Unmodified (18) 1.23 MB (0 B / +0%) 👻
Total (19) 1.7 MB (+11 B / +0%) ↗️
@openmrs/esm-patient-banner-app (no impact)
Files new size
Unmodified (15) 1.07 MB (0 B / +0%) 👻
Total (15) 1.07 MB (0 B / +0%) 👻
@openmrs/esm-patient-biometrics-app (+0%)
Files new size
packages/esm-patient-biometrics-app/dist/231.js 466 kB (+11 B / +0%) ↗️
Unmodified (20) 2.16 MB (0 B / +0%) 👻
Total (21) 2.62 MB (+11 B / +0%) ↗️
@openmrs/esm-patient-chart-app (+3.68%)
Files new size
packages/esm-patient-chart-app/dist/519.js 1.16 MB 👶
packages/esm-patient-chart-app/dist/374.js 859 B 👶
packages/esm-patient-chart-app/dist/574.js 2.96 kB (+394 B / +15.33%) ↗️
packages/esm-patient-chart-app/dist/openmrs-esm-patient-chart-app.js 18.5 kB (+207 B / +1.13%) ↗️
packages/esm-patient-chart-app/dist/920.js 9.7 kB (+200 B / +2.11%) ↗️
packages/esm-patient-chart-app/dist/231.js 466 kB (+11 B / +0%) ↗️
packages/esm-patient-chart-app/dist/148.js deleted (-1.02 MB)
Unmodified (34) 2.14 MB (0 B / +0%) 👻
Total (41) 3.79 MB (+135 kB / +3.68%) ↗️
@openmrs/esm-patient-clinical-view-app (+0%)
Files new size
packages/esm-patient-clinical-view-app/dist/231.js 466 kB (+11 B / +0%) ↗️
Unmodified (17) 1.03 MB (0 B / +0%) 👻
Total (18) 1.5 MB (+11 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 (+0%)
Files new size
packages/esm-patient-conditions-app/dist/231.js 466 kB (+11 B / +0%) ↗️
Unmodified (24) 1.54 MB (0 B / +0%) 👻
Total (25) 2.01 MB (+11 B / +0%) ↗️
@openmrs/esm-patient-forms-app (+0%)
Files new size
packages/esm-patient-forms-app/dist/231.js 466 kB (+11 B / +0%) ↗️
Unmodified (25) 1.75 MB (0 B / +0%) 👻
Total (26) 2.21 MB (+11 B / +0%) ↗️
@openmrs/esm-patient-immunizations-app (+0%)
Files new size
packages/esm-patient-immunizations-app/dist/231.js 466 kB (+11 B / +0%) ↗️
Unmodified (20) 1.43 MB (0 B / +0%) 👻
Total (21) 1.9 MB (+11 B / +0%) ↗️
@openmrs/esm-patient-medications-app (+0%)
Files new size
packages/esm-patient-medications-app/dist/146.js 470 kB (+11 B / +0%) ↗️
Unmodified (20) 2.44 MB (0 B / +0%) 👻
Total (21) 2.91 MB (+11 B / +0%) ↗️
@openmrs/esm-patient-notes-app (+0%)
Files new size
packages/esm-patient-notes-app/dist/231.js 466 kB (+11 B / +0%) ↗️
Unmodified (25) 1.71 MB (0 B / +0%) 👻
Total (26) 2.17 MB (+11 B / +0%) ↗️
@openmrs/esm-patient-programs-app (+0%)
Files new size
packages/esm-patient-programs-app/dist/231.js 466 kB (+11 B / +0%) ↗️
Unmodified (19) 1.53 MB (0 B / +0%) 👻
Total (20) 1.99 MB (+11 B / +0%) ↗️
@openmrs/esm-patient-test-results-app (+0%)
Files new size
packages/esm-patient-test-results-app/dist/231.js 466 kB (+11 B / +0%) ↗️
Unmodified (29) 3.61 MB (0 B / +0%) 👻
Total (30) 4.08 MB (+11 B / +0%) ↗️
@openmrs/esm-patient-vitals-app (+0%)
Files new size
packages/esm-patient-vitals-app/dist/231.js 466 kB (+11 B / +0%) ↗️
Unmodified (24) 3.07 MB (0 B / +0%) 👻
Total (25) 3.53 MB (+11 B / +0%) ↗️
Generated by @jsenv/file-size-impact during Report bundle size#1995014361 on aef6a3e

@nanfuka
Copy link
Contributor

nanfuka commented Mar 16, 2022

@donaldkibet won't you need to write tests for the added code?

@donaldkibet donaldkibet requested a review from brandones March 16, 2022 15:54
Comment on lines 27 to 29
showToast: jest.fn(),
showNotification: jest.fn(),
updateVisit: jest.fn(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's add mocks for these to core if they don't already exist

Copy link
Contributor

@brandones brandones 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 nits, but generally looks good!

@donaldkibet donaldkibet merged commit c956e27 into master Mar 16, 2022
@donaldkibet donaldkibet deleted the 03-1168 branch March 16, 2022 21:08
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