Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

(feat) O3-3244 & O3-3250: Add hook for fetching EMR Configuration #1259

Merged
merged 3 commits into from
Jul 30, 2024

Conversation

vasharma05
Copy link
Member

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

This PR adds a new hook useEmrConfiguration to fetch the EMR Configuration.

Screenshots

None

Related Issue

https://issues.openmrs.org/browse/O3-3244
https://issues.openmrs.org/browse/O3-3250

Other

Copy link
Contributor

github-actions bot commented Jul 30, 2024

Size Change: +33 B (0%)

Total Size: 3.91 MB

ℹ️ View Unchanged
Filename Size Change
packages/esm-active-visits-app/dist/130.js 180 kB 0 B
packages/esm-active-visits-app/dist/255.js 2.5 kB 0 B
packages/esm-active-visits-app/dist/271.js 813 B 0 B
packages/esm-active-visits-app/dist/316.js 42.9 kB 0 B
packages/esm-active-visits-app/dist/319.js 709 B 0 B
packages/esm-active-visits-app/dist/382.js 1.22 kB 0 B
packages/esm-active-visits-app/dist/443.js 6.98 kB 0 B
packages/esm-active-visits-app/dist/460.js 824 B 0 B
packages/esm-active-visits-app/dist/574.js 615 B 0 B
packages/esm-active-visits-app/dist/635.js 1.22 kB 0 B
packages/esm-active-visits-app/dist/644.js 812 B 0 B
packages/esm-active-visits-app/dist/725.js 1.69 kB 0 B
packages/esm-active-visits-app/dist/729.js 3.08 kB 0 B
packages/esm-active-visits-app/dist/757.js 719 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/833.js 765 B 0 B
packages/esm-active-visits-app/dist/835.js 14.3 kB 0 B
packages/esm-active-visits-app/dist/875.js 50.5 kB 0 B
packages/esm-active-visits-app/dist/879.js 3.02 kB 0 B
packages/esm-active-visits-app/dist/967.js 1.65 kB 0 B
packages/esm-active-visits-app/dist/main.js 69.6 kB 0 B
packages/esm-active-visits-app/dist/openmrs-esm-active-visits-app.js 3.33 kB 0 B
packages/esm-appointments-app/dist/130.js 180 kB 0 B
packages/esm-appointments-app/dist/152.js 259 B 0 B
packages/esm-appointments-app/dist/224.js 41.7 kB 0 B
packages/esm-appointments-app/dist/255.js 2.51 kB 0 B
packages/esm-appointments-app/dist/265.js 1.79 kB 0 B
packages/esm-appointments-app/dist/271.js 2.31 kB 0 B
packages/esm-appointments-app/dist/285.js 1.61 kB 0 B
packages/esm-appointments-app/dist/303.js 259 B 0 B
packages/esm-appointments-app/dist/319.js 2.15 kB 0 B
packages/esm-appointments-app/dist/445.js 249 kB 0 B
packages/esm-appointments-app/dist/460.js 2.37 kB 0 B
packages/esm-appointments-app/dist/501.js 7.02 kB 0 B
packages/esm-appointments-app/dist/574.js 1.94 kB 0 B
packages/esm-appointments-app/dist/591.js 16.8 kB 0 B
packages/esm-appointments-app/dist/644.js 2.31 kB 0 B
packages/esm-appointments-app/dist/729.js 3.08 kB 0 B
packages/esm-appointments-app/dist/757.js 2.19 kB 0 B
packages/esm-appointments-app/dist/784.js 2.62 kB 0 B
packages/esm-appointments-app/dist/788.js 1.94 kB 0 B
packages/esm-appointments-app/dist/807.js 2.56 kB 0 B
packages/esm-appointments-app/dist/833.js 2.29 kB 0 B
packages/esm-appointments-app/dist/857.js 14.2 kB 0 B
packages/esm-appointments-app/dist/903.js 878 B 0 B
packages/esm-appointments-app/dist/904.js 20.7 kB 0 B
packages/esm-appointments-app/dist/main.js 307 kB 0 B
packages/esm-appointments-app/dist/openmrs-esm-appointments-app.js 3.39 kB 0 B
packages/esm-bed-management-app/dist/130.js 180 kB 0 B
packages/esm-bed-management-app/dist/169.js 6.98 kB 0 B
packages/esm-bed-management-app/dist/271.js 680 B 0 B
packages/esm-bed-management-app/dist/319.js 680 B 0 B
packages/esm-bed-management-app/dist/391.js 26.2 kB 0 B
packages/esm-bed-management-app/dist/460.js 680 B 0 B
packages/esm-bed-management-app/dist/501.js 7.03 kB 0 B
packages/esm-bed-management-app/dist/542.js 396 B 0 B
packages/esm-bed-management-app/dist/574.js 681 B 0 B
packages/esm-bed-management-app/dist/591.js 16.8 kB 0 B
packages/esm-bed-management-app/dist/596.js 15.8 kB 0 B
packages/esm-bed-management-app/dist/642.js 1.18 kB 0 B
packages/esm-bed-management-app/dist/644.js 680 B 0 B
packages/esm-bed-management-app/dist/729.js 3.08 kB 0 B
packages/esm-bed-management-app/dist/757.js 726 B 0 B
packages/esm-bed-management-app/dist/784.js 2.63 kB 0 B
packages/esm-bed-management-app/dist/788.js 680 B 0 B
packages/esm-bed-management-app/dist/807.js 680 B 0 B
packages/esm-bed-management-app/dist/833.js 680 B 0 B
packages/esm-bed-management-app/dist/878.js 112 kB 0 B
packages/esm-bed-management-app/dist/main.js 3.84 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 180 kB 0 B
packages/esm-patient-list-management-app/dist/139.js 22.4 kB 0 B
packages/esm-patient-list-management-app/dist/255.js 2.51 kB 0 B
packages/esm-patient-list-management-app/dist/271.js 1.58 kB 0 B
packages/esm-patient-list-management-app/dist/319.js 1.51 kB 0 B
packages/esm-patient-list-management-app/dist/382.js 1.23 kB 0 B
packages/esm-patient-list-management-app/dist/443.js 6.98 kB 0 B
packages/esm-patient-list-management-app/dist/460.js 1.72 kB 0 B
packages/esm-patient-list-management-app/dist/548.js 4.79 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/635.js 1.23 kB 0 B
packages/esm-patient-list-management-app/dist/644.js 1.58 kB 0 B
packages/esm-patient-list-management-app/dist/729.js 3.08 kB 0 B
packages/esm-patient-list-management-app/dist/757.js 1.51 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.85 kB 0 B
packages/esm-patient-list-management-app/dist/833.js 1.59 kB 0 B
packages/esm-patient-list-management-app/dist/930.js 98.3 kB 0 B
packages/esm-patient-list-management-app/dist/main.js 125 kB 0 B
packages/esm-patient-list-management-app/dist/openmrs-esm-patient-list-management-app.js 3.31 kB 0 B
packages/esm-patient-registration-app/dist/130.js 180 kB 0 B
packages/esm-patient-registration-app/dist/152.js 264 B 0 B
packages/esm-patient-registration-app/dist/169.js 6.71 kB 0 B
packages/esm-patient-registration-app/dist/255.js 2.5 kB 0 B
packages/esm-patient-registration-app/dist/271.js 2.13 kB 0 B
packages/esm-patient-registration-app/dist/303.js 264 B 0 B
packages/esm-patient-registration-app/dist/319.js 2.05 kB 0 B
packages/esm-patient-registration-app/dist/371.js 547 B 0 B
packages/esm-patient-registration-app/dist/460.js 2.22 kB 0 B
packages/esm-patient-registration-app/dist/501.js 7.03 kB 0 B
packages/esm-patient-registration-app/dist/574.js 1.78 kB 0 B
packages/esm-patient-registration-app/dist/591.js 16.8 kB 0 B
packages/esm-patient-registration-app/dist/60.js 61.3 kB 0 B
packages/esm-patient-registration-app/dist/644.js 2.13 kB 0 B
packages/esm-patient-registration-app/dist/677.js 37.2 kB 0 B
packages/esm-patient-registration-app/dist/729.js 3.08 kB 0 B
packages/esm-patient-registration-app/dist/735.js 465 B 0 B
packages/esm-patient-registration-app/dist/757.js 2.15 kB 0 B
packages/esm-patient-registration-app/dist/784.js 2.63 kB 0 B
packages/esm-patient-registration-app/dist/788.js 1.78 kB 0 B
packages/esm-patient-registration-app/dist/807.js 2.52 kB 0 B
packages/esm-patient-registration-app/dist/833.js 2.06 kB 0 B
packages/esm-patient-registration-app/dist/879.js 3.03 kB 0 B
packages/esm-patient-registration-app/dist/975.js 2.5 kB 0 B
packages/esm-patient-registration-app/dist/main.js 101 kB 0 B
packages/esm-patient-registration-app/dist/openmrs-esm-patient-registration-app.js 3.35 kB 0 B
packages/esm-patient-search-app/dist/130.js 180 kB 0 B
packages/esm-patient-search-app/dist/255.js 2.5 kB 0 B
packages/esm-patient-search-app/dist/271.js 920 B 0 B
packages/esm-patient-search-app/dist/299.js 23.1 kB 0 B
packages/esm-patient-search-app/dist/319.js 861 B 0 B
packages/esm-patient-search-app/dist/354.js 22 kB 0 B
packages/esm-patient-search-app/dist/382.js 1.23 kB 0 B
packages/esm-patient-search-app/dist/443.js 6.98 kB 0 B
packages/esm-patient-search-app/dist/460.js 939 B 0 B
packages/esm-patient-search-app/dist/574.js 742 B 0 B
packages/esm-patient-search-app/dist/591.js 16.8 kB 0 B
packages/esm-patient-search-app/dist/635.js 1.23 kB 0 B
packages/esm-patient-search-app/dist/644.js 920 B 0 B
packages/esm-patient-search-app/dist/729.js 3.08 kB 0 B
packages/esm-patient-search-app/dist/757.js 871 B 0 B
packages/esm-patient-search-app/dist/784.js 2.63 kB 0 B
packages/esm-patient-search-app/dist/788.js 736 B 0 B
packages/esm-patient-search-app/dist/807.js 1.04 kB 0 B
packages/esm-patient-search-app/dist/833.js 877 B 0 B
packages/esm-patient-search-app/dist/main.js 48.6 kB 0 B
packages/esm-patient-search-app/dist/openmrs-esm-patient-search-app.js 3.3 kB 0 B
packages/esm-service-queues-app/dist/130.js 180 kB 0 B
packages/esm-service-queues-app/dist/152.js 261 B 0 B
packages/esm-service-queues-app/dist/169.js 6.98 kB 0 B
packages/esm-service-queues-app/dist/199.js 1.35 kB 0 B
packages/esm-service-queues-app/dist/255.js 2.51 kB 0 B
packages/esm-service-queues-app/dist/271.js 4.52 kB 0 B
packages/esm-service-queues-app/dist/276.js 1.85 kB 0 B
packages/esm-service-queues-app/dist/303.js 261 B 0 B
packages/esm-service-queues-app/dist/319.js 3.82 kB 0 B
packages/esm-service-queues-app/dist/384.js 156 kB 0 B
packages/esm-service-queues-app/dist/401.js 3.06 kB 0 B
packages/esm-service-queues-app/dist/430.js 3.17 kB 0 B
packages/esm-service-queues-app/dist/460.js 4.74 kB 0 B
packages/esm-service-queues-app/dist/501.js 7.03 kB 0 B
packages/esm-service-queues-app/dist/574.js 3.85 kB +33 B (+0.87%)
packages/esm-service-queues-app/dist/591.js 16.8 kB 0 B
packages/esm-service-queues-app/dist/6.js 1.75 kB 0 B
packages/esm-service-queues-app/dist/60.js 4.29 kB 0 B
packages/esm-service-queues-app/dist/600.js 50.6 kB 0 B
packages/esm-service-queues-app/dist/644.js 4.53 kB 0 B
packages/esm-service-queues-app/dist/647.js 1.83 kB 0 B
packages/esm-service-queues-app/dist/650.js 3.29 kB 0 B
packages/esm-service-queues-app/dist/669.js 3.25 kB 0 B
packages/esm-service-queues-app/dist/729.js 3.08 kB 0 B
packages/esm-service-queues-app/dist/752.js 1.62 kB 0 B
packages/esm-service-queues-app/dist/757.js 3.89 kB 0 B
packages/esm-service-queues-app/dist/764.js 2.61 kB 0 B
packages/esm-service-queues-app/dist/784.js 2.63 kB 0 B
packages/esm-service-queues-app/dist/788.js 3.82 kB 0 B
packages/esm-service-queues-app/dist/800.js 1.68 kB 0 B
packages/esm-service-queues-app/dist/807.js 5.1 kB 0 B
packages/esm-service-queues-app/dist/828.js 1.39 kB 0 B
packages/esm-service-queues-app/dist/833.js 4.43 kB 0 B
packages/esm-service-queues-app/dist/877.js 2.98 kB 0 B
packages/esm-service-queues-app/dist/917.js 2.78 kB 0 B
packages/esm-service-queues-app/dist/940.js 21.4 kB 0 B
packages/esm-service-queues-app/dist/main.js 209 kB 0 B
packages/esm-service-queues-app/dist/openmrs-esm-service-queues-app.js 3.31 kB 0 B
packages/esm-ward-app/dist/130.js 180 kB 0 B
packages/esm-ward-app/dist/152.js 255 B 0 B
packages/esm-ward-app/dist/255.js 2.5 kB 0 B
packages/esm-ward-app/dist/303.js 255 B 0 B
packages/esm-ward-app/dist/430.js 1.2 kB 0 B
packages/esm-ward-app/dist/443.js 6.97 kB 0 B
packages/esm-ward-app/dist/574.js 414 B 0 B
packages/esm-ward-app/dist/591.js 16.8 kB 0 B
packages/esm-ward-app/dist/693.js 1.72 kB 0 B
packages/esm-ward-app/dist/729.js 3.07 kB 0 B
packages/esm-ward-app/dist/784.js 2.62 kB 0 B
packages/esm-ward-app/dist/785.js 10.8 kB 0 B
packages/esm-ward-app/dist/836.js 14.1 kB 0 B
packages/esm-ward-app/dist/main.js 28.2 kB 0 B
packages/esm-ward-app/dist/openmrs-esm-ward-app.js 3.29 kB 0 B

compressed-size-action

Copy link
Member

@usamaidrsk usamaidrsk left a comment

Choose a reason for hiding this comment

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

Thanks @vasharma05 , Looks good!


export default function useEmrConfiguration() {
const swrData = useSWRImmutable<FetchResponse<EmrApiConfigurationResponse>>(
`${restBaseUrl}/emrapi/onfiguration`,
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
`${restBaseUrl}/emrapi/onfiguration`,
`${restBaseUrl}/emrapi/configuration`,

typo?

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually, I was testing failure case and forgot to fix it, I have fixed it now.
Thanks for the catch!

@@ -275,6 +275,7 @@
"ticketNumber": "Ticket Number",
"time": "Time",
"timeCannotBeInFuture": "Time cannot be in the future",
"timeCannotBePriorToPreviousQueueEntry": "Time cannot be before start of previous queue entry: {{time}}",
"timeOfTransition": "Time of transition",
"tirageNotYetCompleted": "Triage has not yet been completed",
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
"tirageNotYetCompleted": "Triage has not yet been completed",
"triageNotYetCompleted": "Triage has not yet been completed",

Copy link
Member Author

Choose a reason for hiding this comment

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

Hi @denniskigen!
This change in translation is not related to this PR, the change came up from the extract-translations command. Let me get another PR to improve the key name.
Thanks!

@vasharma05 vasharma05 merged commit e0a71ec into main Jul 30, 2024
6 checks passed
@vasharma05 vasharma05 deleted the feat/add-emr-config-hook branch July 30, 2024 08:02
Copy link
Member

@mogoodrich mogoodrich left a comment

Choose a reason for hiding this comment

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

Belated LGTM, thanks @vasharma05 !

@denniskigen denniskigen mentioned this pull request Aug 29, 2024
3 tasks
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants