The asGetSlots stored procedure is missing after upgrading from 12.0.7 to 12.0.13. We were using this stored procedure in conjunction with the cusasAppointmentSearchSingle stored procedure to develop a Third Next Available Appointment report. The cusasAppointmentSearchSingle stored procedure still calls asGetSlots, but gives the error:
[SQLSTATE 42000] (Error 313) An insufficient number of arguments were supplied for the procedure or function asGetSlots.
Has anyone else run into this issue?
asGetSlots is a function. That error is telling you that you are calling asGetSlots with the incorrect number of arguments. I would look in your custom stored procedure to make sure you use 5 parameters. asAppointmentSearchSingle calls it like this:
SELECT s.*
FROM asGetSlots(@DateCounterStart, @DateCounterEnd, @GUID, @ListOrder, @IncludeUnallocated) as s
Thanks for your reply! The code you provided is how our cusasAppointmentSearchSingle is calling asGetSlots, but it seems that asAppointmentSearchSingle is calling the following:
SELECT s.*
FROM asGetSlots(@DateCounterStart, @DateCounterEnd, @GUID, @ListOrder, @IncludeUnallocated, @SearchFilterDailyLimit, @SearchFilterFinLimit, @PatientId, @CaseId ) as s
Is it possible that after the update to 12.0.13 asGetSlots is requiring 9 parameters?
Yes. We are on 12.0.11, and it is still using 5 parameters. I looked on my demo database for 12.2 and here are the notes for the 4 newly added parameters:
@FilterDailyLimit CHAR(1) = 'N' -- default to "No", DO include Daily Limit"
@FilterFinLimit CHAR(1) = 'N' -- default to "No", DO include Daily Finance Limit"
@PatientId INT -- In the case of Patient Appointment pass the value for Patient Profile ID
@CaseId INT -- In the case of Patient Appointment a case has attached while searching appt slot. a non zeo value is passed if case attached
Thanks a lot! Everything is fixed.