Skip to content

fix: average wait time card never fetches data#2320

Open
shubhangiisinghh wants to merge 2 commits intoopenmrs:mainfrom
shubhangiisinghh:fix/average-wait-time-status-uuid
Open

fix: average wait time card never fetches data#2320
shubhangiisinghh wants to merge 2 commits intoopenmrs:mainfrom
shubhangiisinghh:fix/average-wait-time-status-uuid

Conversation

@shubhangiisinghh
Copy link

PR Description:

The average wait time card was always showing '--' and never loading actual data.

Turns out useAverageWaitTime was being called with an empty string as the statusUuid. The hook skips the API call if either serviceUuid or statusUuid is falsy — so the request was never made.

The fix is just passing defaultStatusConceptUuid from config, which is what waiting-patients.extension.tsx already does right next door.

useAverageWaitTime was called with an empty string for statusUuid.
The hook skips the API call when statusUuid is falsy, so the card
always showed '--'. Passing defaultStatusConceptUuid from config
instead, same as waiting-patients.extension.tsx already does.
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.

1 participant