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

(feat) HIE-9: Add MPI workflows to OpenMRS frontend #1313

Merged
merged 11 commits into from
Nov 14, 2024
Merged

(feat) HIE-9: Add MPI workflows to OpenMRS frontend #1313

merged 11 commits into from
Nov 14, 2024

Conversation

reagan-meant
Copy link
Contributor

@reagan-meant reagan-meant commented Sep 9, 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

Screenshots

mpi.mov

Related Issue

https://openmrs.atlassian.net/browse/HIE-9

Other

@reagan-meant reagan-meant requested a review from ibacher September 9, 2024 13:42
Copy link
Contributor

github-actions bot commented Sep 9, 2024

Size Change: -68.3 kB (-1.01%)

Total Size: 6.68 MB

Filename Size Change
packages/esm-patient-registration-app/dist/745.js 0 B -71.4 kB (removed) 🏆
ℹ️ View Unchanged
Filename Size Change
packages/esm-active-visits-app/dist/106.js 8.63 kB 0 B
packages/esm-active-visits-app/dist/130.js 393 kB 0 B
packages/esm-active-visits-app/dist/233.js 3.37 kB 0 B
packages/esm-active-visits-app/dist/236.js 614 B 0 B
packages/esm-active-visits-app/dist/240.js 615 B 0 B
packages/esm-active-visits-app/dist/261.js 615 B 0 B
packages/esm-active-visits-app/dist/271.js 800 B 0 B
packages/esm-active-visits-app/dist/272.js 615 B 0 B
packages/esm-active-visits-app/dist/316.js 42.9 kB 0 B
packages/esm-active-visits-app/dist/319.js 712 B 0 B
packages/esm-active-visits-app/dist/325.js 3.09 kB 0 B
packages/esm-active-visits-app/dist/336.js 614 B 0 B
packages/esm-active-visits-app/dist/378.js 730 B 0 B
packages/esm-active-visits-app/dist/443.js 6.98 kB 0 B
packages/esm-active-visits-app/dist/460.js 817 B 0 B
packages/esm-active-visits-app/dist/539.js 613 B 0 B
packages/esm-active-visits-app/dist/574.js 615 B 0 B
packages/esm-active-visits-app/dist/586.js 53.5 kB 0 B
packages/esm-active-visits-app/dist/6.js 26.4 kB 0 B
packages/esm-active-visits-app/dist/644.js 800 B 0 B
packages/esm-active-visits-app/dist/673.js 615 B 0 B
packages/esm-active-visits-app/dist/705.js 615 B 0 B
packages/esm-active-visits-app/dist/711.js 615 B 0 B
packages/esm-active-visits-app/dist/725.js 643 B 0 B
packages/esm-active-visits-app/dist/727.js 615 B 0 B
packages/esm-active-visits-app/dist/737.js 615 B 0 B
packages/esm-active-visits-app/dist/744.js 843 B 0 B
packages/esm-active-visits-app/dist/757.js 731 B 0 B
packages/esm-active-visits-app/dist/784.js 2.63 kB 0 B
packages/esm-active-visits-app/dist/788.js 628 B 0 B
packages/esm-active-visits-app/dist/807.js 959 B 0 B
packages/esm-active-visits-app/dist/814.js 3.04 kB 0 B
packages/esm-active-visits-app/dist/833.js 765 B 0 B
packages/esm-active-visits-app/dist/879.js 3.02 kB 0 B
packages/esm-active-visits-app/dist/899.js 611 B 0 B
packages/esm-active-visits-app/dist/967.js 611 B 0 B
packages/esm-active-visits-app/dist/main.js 82.1 kB 0 B
packages/esm-active-visits-app/dist/openmrs-esm-active-visits-app.js 3.32 kB 0 B
packages/esm-appointments-app/dist/130.js 393 kB 0 B
packages/esm-appointments-app/dist/171.js 223 B 0 B
packages/esm-appointments-app/dist/198.js 250 kB 0 B
packages/esm-appointments-app/dist/2.js 2.23 kB 0 B
packages/esm-appointments-app/dist/228.js 2.02 kB 0 B
packages/esm-appointments-app/dist/236.js 2.02 kB 0 B
packages/esm-appointments-app/dist/240.js 2.02 kB 0 B
packages/esm-appointments-app/dist/261.js 2.02 kB 0 B
packages/esm-appointments-app/dist/265.js 1.79 kB 0 B
packages/esm-appointments-app/dist/269.js 7.38 kB 0 B
packages/esm-appointments-app/dist/271.js 2.41 kB 0 B
packages/esm-appointments-app/dist/272.js 2.02 kB 0 B
packages/esm-appointments-app/dist/319.js 2.27 kB 0 B
packages/esm-appointments-app/dist/325.js 3.08 kB 0 B
packages/esm-appointments-app/dist/336.js 2.02 kB 0 B
packages/esm-appointments-app/dist/372.js 2.57 kB 0 B
packages/esm-appointments-app/dist/378.js 2.26 kB 0 B
packages/esm-appointments-app/dist/440.js 16.6 kB 0 B
packages/esm-appointments-app/dist/460.js 2.44 kB 0 B
packages/esm-appointments-app/dist/501.js 7.02 kB 0 B
packages/esm-appointments-app/dist/539.js 2.02 kB 0 B
packages/esm-appointments-app/dist/574.js 2.02 kB 0 B
packages/esm-appointments-app/dist/581.js 9.03 kB 0 B
packages/esm-appointments-app/dist/591.js 16.8 kB 0 B
packages/esm-appointments-app/dist/644.js 2.41 kB 0 B
packages/esm-appointments-app/dist/673.js 2.02 kB 0 B
packages/esm-appointments-app/dist/705.js 2.02 kB 0 B
packages/esm-appointments-app/dist/711.js 130 kB 0 B
packages/esm-appointments-app/dist/727.js 2.02 kB 0 B
packages/esm-appointments-app/dist/737.js 2.02 kB 0 B
packages/esm-appointments-app/dist/744.js 2.54 kB 0 B
packages/esm-appointments-app/dist/757.js 2.4 kB 0 B
packages/esm-appointments-app/dist/784.js 2.62 kB 0 B
packages/esm-appointments-app/dist/787.js 31.4 kB 0 B
packages/esm-appointments-app/dist/788.js 2.02 kB 0 B
packages/esm-appointments-app/dist/807.js 2.65 kB 0 B
packages/esm-appointments-app/dist/833.js 2.37 kB 0 B
packages/esm-appointments-app/dist/899.js 2.02 kB 0 B
packages/esm-appointments-app/dist/903.js 865 B 0 B
packages/esm-appointments-app/dist/main.js 396 kB 0 B
packages/esm-appointments-app/dist/openmrs-esm-appointments-app.js 3.56 kB 0 B
packages/esm-bed-management-app/dist/130.js 393 kB 0 B
packages/esm-bed-management-app/dist/148.js 1.35 kB 0 B
packages/esm-bed-management-app/dist/169.js 6.98 kB 0 B
packages/esm-bed-management-app/dist/236.js 670 B 0 B
packages/esm-bed-management-app/dist/240.js 671 B 0 B
packages/esm-bed-management-app/dist/261.js 671 B 0 B
packages/esm-bed-management-app/dist/271.js 671 B 0 B
packages/esm-bed-management-app/dist/272.js 671 B 0 B
packages/esm-bed-management-app/dist/319.js 786 B 0 B
packages/esm-bed-management-app/dist/325.js 3.09 kB 0 B
packages/esm-bed-management-app/dist/336.js 672 B 0 B
packages/esm-bed-management-app/dist/339.js 50.9 kB 0 B
packages/esm-bed-management-app/dist/378.js 776 B 0 B
packages/esm-bed-management-app/dist/455.js 26.5 kB 0 B
packages/esm-bed-management-app/dist/460.js 671 B 0 B
packages/esm-bed-management-app/dist/501.js 7.03 kB 0 B
packages/esm-bed-management-app/dist/539.js 671 B 0 B
packages/esm-bed-management-app/dist/542.js 395 B 0 B
packages/esm-bed-management-app/dist/574.js 781 B 0 B
packages/esm-bed-management-app/dist/591.js 16.8 kB 0 B
packages/esm-bed-management-app/dist/644.js 671 B 0 B
packages/esm-bed-management-app/dist/673.js 672 B 0 B
packages/esm-bed-management-app/dist/705.js 671 B 0 B
packages/esm-bed-management-app/dist/711.js 671 B 0 B
packages/esm-bed-management-app/dist/727.js 671 B 0 B
packages/esm-bed-management-app/dist/737.js 671 B 0 B
packages/esm-bed-management-app/dist/744.js 863 B 0 B
packages/esm-bed-management-app/dist/757.js 814 B 0 B
packages/esm-bed-management-app/dist/766.js 113 kB 0 B
packages/esm-bed-management-app/dist/784.js 2.63 kB 0 B
packages/esm-bed-management-app/dist/788.js 671 B 0 B
packages/esm-bed-management-app/dist/807.js 671 B 0 B
packages/esm-bed-management-app/dist/833.js 671 B 0 B
packages/esm-bed-management-app/dist/899.js 670 B 0 B
packages/esm-bed-management-app/dist/main.js 4.01 kB 0 B
packages/esm-bed-management-app/dist/openmrs-esm-bed-management-app.js 3.25 kB 0 B
packages/esm-patient-list-management-app/dist/130.js 393 kB 0 B
packages/esm-patient-list-management-app/dist/233.js 3.38 kB 0 B
packages/esm-patient-list-management-app/dist/236.js 1.34 kB 0 B
packages/esm-patient-list-management-app/dist/240.js 1.34 kB 0 B
packages/esm-patient-list-management-app/dist/261.js 1.34 kB 0 B
packages/esm-patient-list-management-app/dist/271.js 1.6 kB 0 B
packages/esm-patient-list-management-app/dist/272.js 1.34 kB 0 B
packages/esm-patient-list-management-app/dist/319.js 1.52 kB 0 B
packages/esm-patient-list-management-app/dist/325.js 3.09 kB 0 B
packages/esm-patient-list-management-app/dist/336.js 1.34 kB 0 B
packages/esm-patient-list-management-app/dist/37.js 12.5 kB 0 B
packages/esm-patient-list-management-app/dist/378.js 1.55 kB 0 B
packages/esm-patient-list-management-app/dist/443.js 6.98 kB 0 B
packages/esm-patient-list-management-app/dist/455.js 58.3 kB 0 B
packages/esm-patient-list-management-app/dist/460.js 1.71 kB 0 B
packages/esm-patient-list-management-app/dist/539.js 1.34 kB 0 B
packages/esm-patient-list-management-app/dist/574.js 1.34 kB 0 B
packages/esm-patient-list-management-app/dist/591.js 16.9 kB 0 B
packages/esm-patient-list-management-app/dist/644.js 1.6 kB 0 B
packages/esm-patient-list-management-app/dist/658.js 102 kB 0 B
packages/esm-patient-list-management-app/dist/673.js 1.34 kB 0 B
packages/esm-patient-list-management-app/dist/705.js 1.34 kB 0 B
packages/esm-patient-list-management-app/dist/711.js 1.34 kB 0 B
packages/esm-patient-list-management-app/dist/727.js 1.34 kB 0 B
packages/esm-patient-list-management-app/dist/737.js 1.34 kB 0 B
packages/esm-patient-list-management-app/dist/744.js 1.72 kB 0 B
packages/esm-patient-list-management-app/dist/757.js 1.64 kB 0 B
packages/esm-patient-list-management-app/dist/784.js 2.63 kB 0 B
packages/esm-patient-list-management-app/dist/788.js 1.34 kB 0 B
packages/esm-patient-list-management-app/dist/807.js 1.83 kB 0 B
packages/esm-patient-list-management-app/dist/814.js 3.05 kB 0 B
packages/esm-patient-list-management-app/dist/833.js 1.6 kB 0 B
packages/esm-patient-list-management-app/dist/899.js 1.34 kB 0 B
packages/esm-patient-list-management-app/dist/main.js 162 kB 0 B
packages/esm-patient-list-management-app/dist/openmrs-esm-patient-list-management-app.js 3.3 kB 0 B
packages/esm-patient-registration-app/dist/130.js 393 kB 0 B
packages/esm-patient-registration-app/dist/169.js 6.71 kB 0 B
packages/esm-patient-registration-app/dist/2.js 2.24 kB 0 B
packages/esm-patient-registration-app/dist/236.js 2.12 kB 0 B
packages/esm-patient-registration-app/dist/240.js 2.12 kB 0 B
packages/esm-patient-registration-app/dist/250.js 526 B 0 B
packages/esm-patient-registration-app/dist/261.js 2.12 kB 0 B
packages/esm-patient-registration-app/dist/271.js 2.51 kB 0 B
packages/esm-patient-registration-app/dist/272.js 2.12 kB 0 B
packages/esm-patient-registration-app/dist/319.js 2.42 kB 0 B
packages/esm-patient-registration-app/dist/323.js 72.2 kB 0 B
packages/esm-patient-registration-app/dist/325.js 3.09 kB 0 B
packages/esm-patient-registration-app/dist/336.js 2.12 kB 0 B
packages/esm-patient-registration-app/dist/372.js 2.57 kB 0 B
packages/esm-patient-registration-app/dist/378.js 2.37 kB 0 B
packages/esm-patient-registration-app/dist/460.js 2.49 kB 0 B
packages/esm-patient-registration-app/dist/501.js 7.03 kB 0 B
packages/esm-patient-registration-app/dist/539.js 2.12 kB 0 B
packages/esm-patient-registration-app/dist/574.js 2.12 kB 0 B
packages/esm-patient-registration-app/dist/591.js 16.8 kB 0 B
packages/esm-patient-registration-app/dist/644.js 2.51 kB 0 B
packages/esm-patient-registration-app/dist/662.js 453 B 0 B
packages/esm-patient-registration-app/dist/673.js 2.12 kB 0 B
packages/esm-patient-registration-app/dist/705.js 2.12 kB 0 B
packages/esm-patient-registration-app/dist/711.js 2.12 kB 0 B
packages/esm-patient-registration-app/dist/727.js 2.12 kB 0 B
packages/esm-patient-registration-app/dist/737.js 2.12 kB 0 B
packages/esm-patient-registration-app/dist/744.js 2.44 kB 0 B
packages/esm-patient-registration-app/dist/750.js 77.5 kB 0 B
packages/esm-patient-registration-app/dist/753.js 652 B 0 B
packages/esm-patient-registration-app/dist/757.js 2.54 kB 0 B
packages/esm-patient-registration-app/dist/784.js 2.63 kB 0 B
packages/esm-patient-registration-app/dist/788.js 2.12 kB 0 B
packages/esm-patient-registration-app/dist/807.js 2.74 kB 0 B
packages/esm-patient-registration-app/dist/833.js 2.39 kB 0 B
packages/esm-patient-registration-app/dist/879.js 3.03 kB 0 B
packages/esm-patient-registration-app/dist/899.js 2.12 kB 0 B
packages/esm-patient-registration-app/dist/main.js 150 kB +779 B (+0.52%)
packages/esm-patient-registration-app/dist/openmrs-esm-patient-registration-app.js 3.34 kB 0 B
packages/esm-patient-search-app/dist/130.js 393 kB 0 B
packages/esm-patient-search-app/dist/173.js 26 kB 0 B
packages/esm-patient-search-app/dist/233.js 3.37 kB 0 B
packages/esm-patient-search-app/dist/236.js 799 B 0 B
packages/esm-patient-search-app/dist/240.js 801 B 0 B
packages/esm-patient-search-app/dist/261.js 801 B 0 B
packages/esm-patient-search-app/dist/271.js 1 kB 0 B
packages/esm-patient-search-app/dist/272.js 801 B 0 B
packages/esm-patient-search-app/dist/319.js 926 B 0 B
packages/esm-patient-search-app/dist/325.js 3.09 kB 0 B
packages/esm-patient-search-app/dist/336.js 800 B 0 B
packages/esm-patient-search-app/dist/378.js 952 B 0 B
packages/esm-patient-search-app/dist/443.js 6.98 kB 0 B
packages/esm-patient-search-app/dist/460.js 1.01 kB 0 B
packages/esm-patient-search-app/dist/539.js 799 B 0 B
packages/esm-patient-search-app/dist/574.js 855 B +54 B (+6.74%) 🔍
packages/esm-patient-search-app/dist/591.js 16.8 kB 0 B
packages/esm-patient-search-app/dist/644.js 1 kB 0 B
packages/esm-patient-search-app/dist/673.js 801 B 0 B
packages/esm-patient-search-app/dist/705.js 801 B 0 B
packages/esm-patient-search-app/dist/711.js 801 B 0 B
packages/esm-patient-search-app/dist/727.js 801 B 0 B
packages/esm-patient-search-app/dist/737.js 800 B 0 B
packages/esm-patient-search-app/dist/744.js 1.04 kB 0 B
packages/esm-patient-search-app/dist/750.js 54.7 kB +1.13 kB (+2.12%)
packages/esm-patient-search-app/dist/757.js 953 B 0 B
packages/esm-patient-search-app/dist/784.js 2.63 kB 0 B
packages/esm-patient-search-app/dist/788.js 797 B 0 B
packages/esm-patient-search-app/dist/807.js 1.1 kB 0 B
packages/esm-patient-search-app/dist/814.js 3.05 kB 0 B
packages/esm-patient-search-app/dist/833.js 950 B 0 B
packages/esm-patient-search-app/dist/899.js 797 B 0 B
packages/esm-patient-search-app/dist/main.js 81.8 kB +1.06 kB (+1.31%)
packages/esm-patient-search-app/dist/openmrs-esm-patient-search-app.js 3.29 kB 0 B
packages/esm-service-queues-app/dist/1006.js 1.75 kB 0 B
packages/esm-service-queues-app/dist/1060.js 1.82 kB 0 B
packages/esm-service-queues-app/dist/1169.js 6.98 kB 0 B
packages/esm-service-queues-app/dist/130.js 393 kB 0 B
packages/esm-service-queues-app/dist/1325.js 3.09 kB 0 B
packages/esm-service-queues-app/dist/1644.js 4.6 kB 0 B
packages/esm-service-queues-app/dist/1727.js 8.1 kB 0 B
packages/esm-service-queues-app/dist/1800.js 1.67 kB 0 B
packages/esm-service-queues-app/dist/2.js 2.23 kB 0 B
packages/esm-service-queues-app/dist/236.js 3.88 kB 0 B
packages/esm-service-queues-app/dist/2757.js 4.74 kB 0 B
packages/esm-service-queues-app/dist/2760.js 7.2 kB 0 B
packages/esm-service-queues-app/dist/2784.js 2.62 kB 0 B
packages/esm-service-queues-app/dist/3199.js 1.36 kB 0 B
packages/esm-service-queues-app/dist/3372.js 2.57 kB 0 B
packages/esm-service-queues-app/dist/3574.js 3.88 kB 0 B
packages/esm-service-queues-app/dist/3604.js 6.96 kB 0 B
packages/esm-service-queues-app/dist/366.js 7.86 kB 0 B
packages/esm-service-queues-app/dist/3818.js 2.56 kB 0 B
packages/esm-service-queues-app/dist/3828.js 1.38 kB 0 B
packages/esm-service-queues-app/dist/4272.js 3.88 kB 0 B
packages/esm-service-queues-app/dist/4378.js 4.47 kB 0 B
packages/esm-service-queues-app/dist/4460.js 4.81 kB 0 B
packages/esm-service-queues-app/dist/4705.js 3.88 kB 0 B
packages/esm-service-queues-app/dist/4748.js 116 kB 0 B
packages/esm-service-queues-app/dist/4911.js 7.76 kB 0 B
packages/esm-service-queues-app/dist/5236.js 5.84 kB 0 B
packages/esm-service-queues-app/dist/5240.js 3.88 kB 0 B
packages/esm-service-queues-app/dist/5282.js 8.97 kB 0 B
packages/esm-service-queues-app/dist/5336.js 3.88 kB 0 B
packages/esm-service-queues-app/dist/539.js 3.88 kB 0 B
packages/esm-service-queues-app/dist/5501.js 7.03 kB 0 B
packages/esm-service-queues-app/dist/5673.js 3.88 kB 0 B
packages/esm-service-queues-app/dist/5711.js 3.88 kB 0 B
packages/esm-service-queues-app/dist/5737.js 3.88 kB 0 B
packages/esm-service-queues-app/dist/5833.js 4.5 kB 0 B
packages/esm-service-queues-app/dist/6591.js 16.8 kB 0 B
packages/esm-service-queues-app/dist/660.js 158 kB 0 B
packages/esm-service-queues-app/dist/6670.js 10.1 kB 0 B
packages/esm-service-queues-app/dist/6727.js 3.88 kB 0 B
packages/esm-service-queues-app/dist/744.js 4.71 kB 0 B
packages/esm-service-queues-app/dist/752.js 1.62 kB 0 B
packages/esm-service-queues-app/dist/7807.js 5.16 kB 0 B
packages/esm-service-queues-app/dist/8271.js 4.6 kB 0 B
packages/esm-service-queues-app/dist/8319.js 4.34 kB 0 B
packages/esm-service-queues-app/dist/8788.js 3.89 kB 0 B
packages/esm-service-queues-app/dist/899.js 3.88 kB 0 B
packages/esm-service-queues-app/dist/9261.js 3.88 kB 0 B
packages/esm-service-queues-app/dist/9392.js 7.85 kB 0 B
packages/esm-service-queues-app/dist/940.js 21.4 kB 0 B
packages/esm-service-queues-app/dist/main.js 274 kB 0 B
packages/esm-service-queues-app/dist/openmrs-esm-service-queues-app.js 3.3 kB 0 B
packages/esm-ward-app/dist/109.js 344 B 0 B
packages/esm-ward-app/dist/124.js 3.68 kB 0 B
packages/esm-ward-app/dist/125.js 5.87 kB 0 B
packages/esm-ward-app/dist/126.js 9.63 kB 0 B
packages/esm-ward-app/dist/130.js 393 kB 0 B
packages/esm-ward-app/dist/146.js 2.13 kB 0 B
packages/esm-ward-app/dist/15.js 482 B 0 B
packages/esm-ward-app/dist/169.js 6.97 kB 0 B
packages/esm-ward-app/dist/303.js 33.2 kB 0 B
packages/esm-ward-app/dist/325.js 3.08 kB 0 B
packages/esm-ward-app/dist/348.js 349 B 0 B
packages/esm-ward-app/dist/372.js 2.56 kB 0 B
packages/esm-ward-app/dist/471.js 7 kB 0 B
packages/esm-ward-app/dist/481.js 1.25 kB 0 B
packages/esm-ward-app/dist/501.js 7.02 kB 0 B
packages/esm-ward-app/dist/53.js 11.6 kB 0 B
packages/esm-ward-app/dist/559.js 342 B 0 B
packages/esm-ward-app/dist/574.js 1.56 kB 0 B
packages/esm-ward-app/dist/576.js 5.86 kB 0 B
packages/esm-ward-app/dist/577.js 17.6 kB 0 B
packages/esm-ward-app/dist/591.js 16.8 kB 0 B
packages/esm-ward-app/dist/598.js 35.7 kB 0 B
packages/esm-ward-app/dist/649.js 2.51 kB 0 B
packages/esm-ward-app/dist/662.js 11.1 kB 0 B
packages/esm-ward-app/dist/767.js 648 B 0 B
packages/esm-ward-app/dist/784.js 2.62 kB 0 B
packages/esm-ward-app/dist/920.js 629 B 0 B
packages/esm-ward-app/dist/921.js 6.09 kB 0 B
packages/esm-ward-app/dist/922.js 9.07 kB 0 B
packages/esm-ward-app/dist/940.js 21.4 kB 0 B
packages/esm-ward-app/dist/969.js 202 B 0 B
packages/esm-ward-app/dist/main.js 40.5 kB 0 B
packages/esm-ward-app/dist/openmrs-esm-ward-app.js 3.29 kB 0 B

compressed-size-action

Copy link
Member

@ibacher ibacher 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 more nit-picky comments. I can review more later.

_default: null,
_description: 'Identifier type uuid of OpenMRS to map the identifier system',
},
identifierTypeName: {
Copy link
Member

Choose a reason for hiding this comment

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

This should just be fetched from the backend, not part of the configuration.

const [patient, setPatient] = useState<fhir.Patient>(null);
const [isLoading, setIsLoading] = useState(false);

let url = `${fhirBaseUrl}/Patient/${patientId}/$cr`;
Copy link
Member

Choose a reason for hiding this comment

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

I'd just calculate this in the useEffect() hook where you use it. E.g.,

useEffect(() => {
    if (patientId) {
      const url = `${fhirBaseUrl}/Patient/${patientId}/$cr`;
      setIsLoading(true);
      openmrsFetch(url).then((response) => {
        if (response.data) {
          setPatient(response.data);
          setIsLoading(false);
        }
      });
    }
  }, [patientId, url]);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

if (patientId && url) {
setIsLoading(true);
openmrsFetch(url).then((response) => {
if (response.status == 200 && response.data) {
Copy link
Member

Choose a reason for hiding this comment

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

You don't need to check the response status. openmrsFetch does this for you.

useEffect(() => {
if (patientId && url) {
setIsLoading(true);
openmrsFetch(url).then((response) => {
Copy link
Member

Choose a reason for hiding this comment

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

It's not necessary, but you might consider using using SWR instead of doing all of this. That handles most of the isLoading and can cache results.

if (response.status == 200 && response.data) {
setPatient(response.data);
setIsLoading(false);
}
Copy link
Member

Choose a reason for hiding this comment

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

I think setIsLoading() needs to be unconditionally set to false once the request is done; otherwise you'll display a loading spinner endlessly if the request isn't successful.

Comment on lines 195 to 198
export function getIdentifierFieldValuesFromFhirPatient(
patient: fhir.Patient,
identifierConfig,
): { [key: string]: any } {
Copy link
Member

Choose a reason for hiding this comment

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

This could be better typed than it is like this.

patient: fhir.Patient,
identifierConfig,
): { [key: string]: any } {
const identifiers: { [key: string]: any } = {};
Copy link
Member

Choose a reason for hiding this comment

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

This should also be an explicit type. Don't. use any if you can avoid it.

@@ -0,0 +1,45 @@
import capitalize from 'lodash-es/capitalize';
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
import capitalize from 'lodash-es/capitalize';
import { capitalize } from 'lodash-es';

import capitalize from 'lodash-es/capitalize';

export function inferModeFromSearchParams(searchParams: URLSearchParams) {
return searchParams?.get('mode')?.toLowerCase() == 'external' ? 'external' : 'internal';
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
return searchParams?.get('mode')?.toLowerCase() == 'external' ? 'external' : 'internal';
return searchParams.get('mode')?.toLowerCase() === 'external' ? 'external' : 'internal';

return searchParams?.get('mode')?.toLowerCase() == 'external' ? 'external' : 'internal';
}

export function mapToOpenMRSPatient(fhirPatients: any): any {
Copy link
Member

Choose a reason for hiding this comment

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

This could also benefit from explicit types on both sides. Presumable fhirPatients is a fhir.Bundle and each entry is a fhir.Patient or similar.

Copy link
Member

Choose a reason for hiding this comment

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

I think there's also an OpenMRS patient type in core that can be the return type.

@denniskigen denniskigen requested a review from ibacher September 26, 2024 19:54
@reagan-meant reagan-meant force-pushed the HIE-9 branch 2 times, most recently from b14aa33 to 31fc392 Compare October 2, 2024 18:53
Copy link
Member

@ibacher ibacher 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 small things, but basically LGTM

packages/esm-patient-search-app/src/mpi/utils.ts Outdated Show resolved Hide resolved
age: null,
birthdate: fhirPatient.birthDate,
gender: capitalize(fhirPatient.gender),
dead: !fhirPatient.active,
Copy link
Member

Choose a reason for hiding this comment

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

This seems wrong or, at the very least, very specific. dead corresponds to FHIR's deceasedBoolean (and deathDate with deceasedDateTime). active === false just means "this patient record is no longer actively used in this system".

dead: !fhirPatient.active,
deathDate: '',
personName: {
display: `${fhirPatient.name[0].family} ${fhirPatient.name[0].given[0]}`,
Copy link
Member

Choose a reason for hiding this comment

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

I always dislike inferring what the display should be for a name, since this is very location-sensitive, e.g., how its written, how it's formatted etc. I'd prefer that we either pull from the name[0].text first.

render(<PatientSearchButton />);

render(
<BrowserRouter>
Copy link
Member

Choose a reason for hiding this comment

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

It's probably better to use a MemoryBrowser in tests.

@@ -5,6 +5,8 @@ import AdvancedPatientSearchComponent from '../patient-search-page/advanced-pati
import Overlay from '../ui-components/overlay';
import PatientSearchBar from '../patient-search-bar/patient-search-bar.component';
import { type PatientSearchConfig } from '../config-schema';
import { inferModeFromSearchParams } from '../mpi/utils';
import { useSearchParams } from 'react-router-dom';
Copy link
Member

Choose a reason for hiding this comment

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

Very minor, but this import should come before all relative imports.

kind="ghost"
renderIcon={'Search'}
onClick={(e) => {
e.preventDefault();
Copy link
Member

Choose a reason for hiding this comment

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

Do we need the preventDefault() call here?

@bmamlin
Copy link
Member

bmamlin commented Oct 3, 2024

Do we expect users to know what "MPI" means? I would think "Check for national chart" or "Search health exchange" would be easier for providers/users to understand.

@reagan-meant
Copy link
Contributor Author

@bmamlin How about 'Search External Registry'

Copy link
Member

@ibacher ibacher left a comment

Choose a reason for hiding this comment

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

So high-level we should probably have a configuration option to enable / disable the CR feature (actually ideally, this would be a feature flag for now).

Otherwise, I think it's fine.

@@ -35,6 +36,8 @@ export const patientSearchBar = getSyncLifecycle(patientSearchBarComponent, opti
export function startupApp() {
defineConfigSchema(moduleName, configSchema);

registerFeatureFlag('mpiFlag', 'MPI Service', 'Enables the Master Patient Index workflows');
Copy link
Member

Choose a reason for hiding this comment

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

Probably should've said this: our preferred means of registering feature flags is via routes.json. Basically add the same properties, but to a featureFlag definition there.

@denniskigen
Copy link
Member

Could you move this along, @reagan-meant?

@reagan-meant
Copy link
Contributor Author

@denniskigen are you available to review?

@denniskigen denniskigen self-requested a review October 24, 2024 13:27
@brandones
Copy link
Contributor

@reagan-meant , could you fix the conflicts? Looks like @ibacher has approved. Once you fix the conflicts I'll give it a once over and merge.

@denniskigen
Copy link
Member

denniskigen commented Nov 14, 2024

Thanks for your efforts on this, @reagan-meant. I’ll merge it in soon. There are a few areas that need tweaking, but that can happen once this gets checked in. How prepared is the backend to support this work? Can we get that support set up reasonably soon? I’m excited to see how this evolves!

@denniskigen denniskigen merged commit e009969 into main Nov 14, 2024
6 checks passed
@denniskigen denniskigen deleted the HIE-9 branch November 14, 2024 11:09
@reagan-meant
Copy link
Contributor Author

@denniskigen here is the relevant backend module

@denniskigen
Copy link
Member

denniskigen commented Nov 16, 2024

@reagan-meant @ibacher I have some questions and suggestions about the module dependencies:

  1. What's the timeline for including the module in the distro?

  2. Since this functionality depends on the clientregistry module, we need to update the dependency declarations:

    • Add clientregistry to the optionalBackendDependencies list in the routes.json files for the Search and Registration frontend modules.
    • Once we remove the feature flag, we should consider moving clientregistry from optionalBackendDependencies to the backendDependencies key if we want to make it a required dependency

I can take care of adding clientregistry to optionalBackendDependencies in #1374.

@ibacher
Copy link
Member

ibacher commented Nov 16, 2024

We'd like to get it in reasonably soon, but I'm not sure it's going to be enabled for, e.g., the dev3 / test3 / o3 stack. This is maybe something we should discuss on the engineering call. Basically, I'm thinking about spinning up an integrated MPI demo that has, e.g., a demo CR linked to it and I think that's a separate stack in the sense that it wouldn't make sense in the RefApp. However, I am concerned that having functionality not activated in dev3 would make it very easy for that functionality to break. That's probably something we can solve with e2e tests, but we'd need a strategy to include some kind of dummy CR in the e2e tests.

@denniskigen
Copy link
Member

+1 for discussing it on the eng leads call. Thanks.

denniskigen added a commit that referenced this pull request Nov 18, 2024
@denniskigen
Copy link
Member

denniskigen commented Nov 18, 2024

I've wound up reverting this PR because of this regression in the Service queues app search experience:

queues-regression.mp4

From my initial debugging, the issue stems from this line. It seems as though the React Router context is not available when trying to access searchParams on that line when rendering the search extension in the Queues app. I've verified that by seeing this message get logged in the console:

  let searchParams = new URLSearchParams();
  try {
    [searchParams] = useSearchParams();
  } catch (error) {
    console.debug('Router context not available, using default search params');
  }

I think we need to test this some more before resolving to merge it just to ensure it doesn't subtly break in cases where the expected context is required, or where certain logic that's meant to be optional is marked as so.

@reagan-meant
Copy link
Contributor Author

Thanks for looking into this, @denniskigen!

I have a follow-up question regarding the issue you raised: Do we want to allow other apps that use the search feature to query the MPI as well? My initial thought is that we probably shouldn't, which would mean restricting the external search to only the main search page.

@ibacher, do you think we could add an attribute or tag to the patient resource to enable conditional UI rendering, instead of relying on route parameters?

@donaldkibet donaldkibet restored the HIE-9 branch December 2, 2024 12:52
@donaldkibet
Copy link
Member

@reagan-meant @denniskigen @ibacher would like to use this work on cross border integration, is there an agreement on how we can have this move this forward.

@ibacher
Copy link
Member

ibacher commented Dec 2, 2024

My initial thought is that we probably shouldn't, which would mean restricting the external search to only the main search page.

In general, querying an MPI is a registration task and should probably be limited to that if that's feasible.

@ibacher
Copy link
Member

ibacher commented Dec 2, 2024

@ibacher, do you think we could add an attribute or tag to the patient resource to enable conditional UI rendering, instead of relying on route parameters?

Say more...

@ibacher
Copy link
Member

ibacher commented Dec 2, 2024

@donaldkibet It's basically what Dennis said. We just need to ensure that we're not breaking search in other contexts. We may need to separate the "MPI search" out into it's own modal or something?

@reagan-meant
Copy link
Contributor Author

@ibacher @denniskigen here are my suggestions

  1. Make this path configurable and use it to determine if we are on the main search page
  2. Check if router is accessible and determine if external query or not.
    These changes fix the issue.

@ibacher
Copy link
Member

ibacher commented Dec 5, 2024

For:

  1. A better solution is just window.location.pathname === ${getOpenmrsSpaBase()}search`
  2. try... catch around hooks is not a pattern I'd want to encourage using. I think the better solution here is to write a useSearchParams() hook that doesn't depend on React-Router and add it to react-utils in the framework.

@ibacher
Copy link
Member

ibacher commented Dec 5, 2024

Re: 2 something like:

export const useSearchParams() {
    const [searchParams, setSearchParams] = useState(new URLSearchParams(window.location.search));

    useEffect(() => {
       const updateSearchParams = () => setSearchParams(new URLSearchParams(window.location.search));
       window.addEventListener('popstate', updateSearchParams);
       return () => window.removeEventListener('popstate', updateSearchParams);
    }, []);

    return searchParams;
}

@ojwanganto
Copy link
Contributor

Ping @donaldkibet. I know you have been looking into this as well.

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.

7 participants