Getnext question

Don Coleman dcoleman at dgcreact.com
Tue Apr 4 12:22:41 PDT 2006


> -----Original Message-----
> From: filepro-list-bounces at lists.celestial.com [mailto:filepro-list-
> bounces at lists.celestial.com] On Behalf Of Walter Vaughan
> Sent: Tuesday, April 04, 2006 9:15 AM
> To: filePro
> Subject: Re: Getnext question
> 
> Don Coleman wrote:
> 
> > I have the following input processing which uses @KEY to generate
> > prescription labels using getnext.  This app. was running fine until
> March
> > 24.  There is nothing that was changed with regard to this @KEY routine
> that
> > I can think of (or see).  However, there were several additional @KEY
> > routines added since March 24.  The @KEY routine in question does find
> the
> > first prescription correctly but fails all subsequent lookups & tests
> for
> > variables CC & CD.  Yet If I enter the same exact search data via *clerk
> it
> > finds each and every match.
> 
> [...]
>   ready    If: AC eq ""
>          Then: INPUT POPUP AC(9,.0,g) "\r Scan Rx label queue ID#: \r "
>     12 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
> -
>            If: AC eq ""
>          Then: end
>     13 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
> -
>            If:
>          Then: INPUT POPUP AD(13,*,g) "\r Scan Medication NDC: \r "
>     14 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
> -
>            If: AD eq ""
>          Then: end
>     15 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
> -
>            If:
>          Then: ZE(3,.0,g)="1";CC(8,*,g)=""{AC{"";CD(11,*,g)=""{AD{""
>     16 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
> -
>            If:
>          Then: lookup ndc = crossndc  k=AD   i=A -nx
>     17 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
> -
>            If: not ndc
>          Then: goto nocross
>     18 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
> -
>            If:
>          Then: AD=ndc(1);AE=CC&CD;goto gotcros
>     19 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
> -
>   nocross  If:
>          Then: AE(19,*,g)=CC&CD
> [...]
> 
> What you state as your problem isn't even a filePro problem. CC and CD are
> just
> the values you scanned into AC and AD with whitespace removed from both
> ends.
> What about poping a message box between line 15 and 16 and display your
> results.
> I dont understand why you strip off the whitespace in AD to create CD and
> then
> use AD in line 16 as a lookup.

Walter:

Thanks for the reply.  The variables w/ white space removed are due to two
reasons.  First, my client purchased special bar-code scanners that
automatically convert a "non-normal" bar-code based on NDC (National Drug
Code) to the proper DEA-assigned number.  Why pharmaceutical vendors
generate a bar-code that may be different than their DEA-assigned NDC is
beyond me.  It has created a niche market for the vendor of their special
scanners who can charge 3X market price for a normal scanner.  Ultimately,
the scanner sends me the correct data which a standard scanner will not
always do.  Sometimes there are leading or trailing characters, sometimes it
doesn't match at all.  The white space characters are being removed because
the picklist # (AC) needs to be 9 characters in length because this special
scanner includes a CR with each scan.  If I only allowed for 8 characters
the fP variable would have all characters used, the special scanner would be
include its CR and fP would also add a CR.  Removing the white space
characters was suggested by Nancy P. to ensure may variable matched my index
exactly.
> 
> You don't sell this software into any drugstores that any of my family
> might
> use, do you? You don't seem to be handling all conditions... or at least
> it's
> confusing (to me). 

This table had handled all conditions we had run into at least until it quit
working.  I realize this sounds oxymoronic.  BTW, this institutional
pharmacy fills 30,000 prescriptions per day.  A normal retail operation
fills 200-400 per day.  It may be confusing to you because this is one small
portion of large application which interfaces with 5 other applications.  I
may not have described the situation with sufficient detail because if I did
no one would have read the post due to its length.

Why are line 22 and 23 the same?
>

Lines 22 & 23 are a duplicate while I was "rearranging" things yesterday.
They were not there previously and are not the cause of my problem.
 
> I'm never comfortable using "lookup -" within a processing table unless
> I'm
> replacing the normal IUA entry into records. You're just using it to move
> to a
> different record to stand on. Is that the problem, you are not moving to
> the
> record you expect?
 
No, the problem is (was) if there were more than one label to print the
getnext process would fail all subsequent lookup tests.  Nancy P. suggested
changing my loop to redo the lookup and only getnext if that label was
already printed.  Seems to be working with only limited testing.

Thanks again.

> You have got "getnext"'s all over the place. Perhaps you should be goto-
> ing a
> single place that handles all the conditions and does the getnext in a
> more
> orderly fashion. Heck, what's the structure of Index "C". Does getnext
> inside
> index "C" even move in the direction you expect?
> 
> There is one convention that I "really like" in the
> comp.databases.sql.mssql &
> mysql groups that if you *really* want an answer you have to "post the
> code"
> "post your file layout" "post some sample data" and "post the results you
> are
> wanting". In those environments someone can cut and paste in a matter of
> seconds
> and help with your problem. I have seen the most g*dawful selects cleaned
> up and
> explained in this manner, once the original poster documented the problem
> favorable to those helping.
> 
> It would be helpful here.
> 
> --
> Walter
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> http://mailman.celestial.com/mailman/listinfo/filepro-list

Don Coleman




More information about the Filepro-list mailing list