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

'Find Available' button outputs an infinite loop of appt times #1566

Open
maggienegm opened this issue Mar 14, 2020 · 6 comments · May be fixed by #1567
Open

'Find Available' button outputs an infinite loop of appt times #1566

maggienegm opened this issue Mar 14, 2020 · 6 comments · May be fixed by #1567

Comments

@maggienegm
Copy link
Contributor

A) Outreachy Username: maggie.negm
B) Issue Title: Find Available Calendar Bug
C) Report Date: 03/14/2020
D) Sites Affected: Docs Site, NHANES
E) OS/Browser Used: Chrome browser in Linux OS
F) EHR Workflow Module: Calendar
G) Steps to Reproduce the Issue:

  1. Open the Calendar module if it isn't already opened.
  2. Click in a column under a provider's name.
  3. Select the "Provider" tab.
  4. Select the "Find Available" button in the bottom left corner.

H) Expected Behavior: Available provider times should be displayed.
I) What Actually Happened: An infinite loop of the time "12:00" appears and the app eventually crashes.
J) Screenshots with Explanation:
Below, the image shows the infinite loop of times that is displayed when the "Find Available" is selected in the "Provider" tab.
infinite-times

K) Estimation of Severity: Blocker - module's function ceases at this point or crashes/disables the EHR itself
M) Solution: The root cause of this infinite loop is when a negative or zero value of "evdur" is included in the dialog URL that displays the available times in either the "Patient" or "Provider" tab. Thus, to fix this, the "evdur" value will only be included in the URL if it's positive.

@muarachmann
Copy link
Member

Hmmmm @mhn94 weird. Surely a db error, cause locally I have it output a correct stuff and also when was this tested

Screen Shot 2020-03-14 at 10 24 32 PM

@muarachmann
Copy link
Member

This could be but massively depends on how the time was inputed by the user maybe we should just avoid errors but good catch

M) Solution: The root cause of this infinite loop is when a negative or zero value of "evdur" is included in the dialog URL that displays the available times in either the "Patient" or "Provider" tab. Thus, to fix this, the "evdur" value will only be included in the URL if it's positive.

@maggienegm
Copy link
Contributor Author

maggienegm commented Mar 14, 2020

@muarachmann it could be a DB error! Although, the error exists on both the Docs and NHANES servers and locally for me. I tested my solution today.

@muarachmann
Copy link
Member

muarachmann commented Mar 14, 2020 via email

@maggienegm
Copy link
Contributor Author

This could be but massively depends on how the time was inputed by the user maybe we should just avoid errors but good catch

M) Solution: The root cause of this infinite loop is when a negative or zero value of "evdur" is included in the dialog URL that displays the available times in either the "Patient" or "Provider" tab. Thus, to fix this, the "evdur" value will only be included in the URL if it's positive.

Oh, I see what you're saying, so a better solution would be to validate the input before sending it to the back-end via URL?

@maggienegm
Copy link
Contributor Author

I mean when did you simulate the issue?

It depended on which server I was using. On my local server, I tested two instances:

  • When the provider is in the office, appropriate times should show that also depend on the input. For example, if provider X is in the office from 9am-5pm and the user is being scheduled for a 15 min appt, the results should show available times in 15 min intervals that provider X will be in the office.

  • If the provider is not in the office, it should show the message: "No openings were found for this period."

Do you want more specific instances through screenshots?

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 a pull request may close this issue.

2 participants