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 no longer outputs an infinite loop of appt times #1567

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

maggienegm
Copy link
Contributor

Fixes #1566

Now, both "Patient" and "Provider" tabs no longer show an infinite loop of times. Instead, the correct available times are shown or a message is displayed letting the user know no there are no available times.
no-infinite-loop

@muarachmann
Copy link
Member

I still need to test this.

@muarachmann
Copy link
Member

Boom... I tried with the Nhanes data and yes I had this infinite loop. Now I am not sure if the data is corrupt or not consistent. I am applying your patch now ....

@muarachmann
Copy link
Member

As you see here is a query

string(330) "SELECT pc_eventDate, pc_endDate, 
pc_startTime, pc_duration, pc_recurrtype,
pc_recurrspec, pc_alldayevent, pc_catid, 
pc_prefcatid, pc_apptstatus FROM 
libreehr_postcalendar_events WHERE pc_aid = ? AND pc_eid != ? 
AND ((pc_endDate >= ? AND pc_eventDate < ? ) 
OR (pc_endDate = '0000-00-00' AND pc_eventDate >= ? AND pc_eventDate < ?))"

Looking at the imported db I had a bunch of pc_endDate with 0000-00-00
Screen Shot 2020-03-25 at 8 31 26 AM

So I am tempted to say a better solution will be to validate the date before storing in future. This works though since it restricts those

'?providerid=' + s +
'&catid=' + c.options[c.selectedIndex].value +
'&facility=' + f +
'&startdate=' + formDate.value +
Copy link
Member

Choose a reason for hiding this comment

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

I should guess this is the breaker :0

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.

'Find Available' button outputs an infinite loop of appt times
2 participants