I wanted to add that I am trying to have the end user be able to choose from a large list of procedures (150+) to limit what they want to see. Basically, I created a {?proabbr}, imported all the procedure abbrs, and set the accept multiple values to true so they will be able to pull in a few surgical procedures and the data returned will be for just those procedures.
I am also trying to do this for surgical services as well (15+).
{res2.resunit_id} = {?ResUnitID} and
{appt.start_datetime} in {?StartDate} to {?StopDate} and
{res2.restype_id} = 2 and
{resbooking.start_datetime} in {?StartDate} to {?StopDate} and
{proname.abbr} like [{?ProcAbbr}, "*"]
I'm pretty sure i am way off from making this work.
Since you imported the procedure abbreviations, shouldn't they match the field exactly? If they don't match, then are they just the first few letters of the field?
If the entire proname.abbr field is the same as the parameter value, then you just need to change the line to:
{proname.abbr} = {?ProcAbbr}
Otherwise, try the following as your record selection formula:
whilereadingrecords;
numbervar i;
numbervar j := ubound({?ProcAbbr});
stringvar array k;
for i := 1 to j do(
if {proname.abbr} like "*"+{?ProcAbbr}+"*" and
not({proname.abbr} in k) then (
redim preserve k[j];
k := {proname.abbr}
));
{proname.abbr} in k and
{res2.resunit_id} = {?ResUnitID} and
{appt.start_datetime} in {?StartDate} to {?StopDate} and
{res2.restype_id} = 2 and
{resbooking.start_datetime} in {?StartDate} to {?StopDate}
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.