LibreHealthIO / lh-ehr

LibreHealth EHR - Free Open Source Electronic Health Records
Other
235 stars 261 forks source link

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

Open maggienegm opened 4 years ago

maggienegm commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

@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 commented 4 years ago

I mean when did you simulate the issue?

On Sat, Mar 14, 2020 at 10:54 PM Maggie Negm notifications@github.com wrote:

@muarachmann https://github.com/muarachmann it could be a DB error! The error exists on both the Docs and NHANES servers and locally for me. I tested my solution today.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/LibreHealthIO/lh-ehr/issues/1566#issuecomment-599139686, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD4X4XSORULXNTEWLI6LL4LRHP4H3ANCNFSM4LJYCFHA .

--

MUA N. LAURENT: Lead Software Engineer Akivas Inc. https://akivas.com/ Akwa, Douala,CM 00237 | 174 Royal Rd, Cape Town, WC 7405, SA Phone: (237) 670-518-086

maggienegm commented 4 years ago

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 commented 4 years ago

I mean when did you simulate the issue?

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

Do you want more specific instances through screenshots?