Compare 2 string arrays

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi - I posted in Module Coding but not sure if it was the right place,

I'm using Access 2003. I have a request from one of my departments that is
stumping me. It is essentially a billing report request. Here’s the
scenario. Units come in for testing. Some units come in for “panel†testing
(a series of tests – there are 9 panels at this point) and some come in for
testing where individual test(s) are ordered – most belong to at least one
panel. After initial testing, reactive tests may automatically get scheduled
for additional test(s). The host system doesn’t store whether the unit was a
panel order or whether several individual tests were ordered. Nor does it
show whether tests were “reflex†tests – ordered due to a reactive result.
Panels share many of the same tests often with just 1 test being different.
I’m trying to figure out how to determine whether a panel (and which panel)
was ordered when there are often additional tests added (by the system or
client). I created tables that match tests with panels but I can’t figure
out how to evalutate the set of unit tests against the various panel sets.

It would seem that I need to compare one array against another array which
I’m not sure how to do. Here’s how I imagine it. First I need to
create/populate an array of tests ordered by unit. Then I need a panel
arrary (redimed after each evaluation?) that I can use to compare if all
tests of a panel starting with the largest panel are found in the unit test
array.

Once I identify what panel was ordered (if one was ordered), I need to
exclude those tests from the report (substituting the name of panel) but show
any extra tests that were ordered. Am I on the right track? If so, can
someone help me with the arrays? If there is another way, I’m open to that.

Thanks
LeAnn
 
I confess I don't have this crystal-clear in my head, but have you considered
creating two tables -- a PanelsOrdered table and a TestsOrdered table? When
a job comes in you first create appropriate records in PanelsOrdered, e.g.,
"job 27 ordered panels 2 and 7." From that information your database could
automatically add records to the TestsOrdered table, e.g., "job 27 ordered
tests a, c, f, j, k, r, and w." I would have TestsOrdered key fields set to
allow only one entry for job 27/test f, so if a test happens to be called for
in both panel 2 and panel 7, you won't get a duplicate record in
TestsOrdered. I would also have a flag field that indicates whether this
test was ordered because it's part of a panel, or was ordered separately.
And of course you would need a separate input process where you can add
individually ordered tests to TestsOrdered, bypassing the PanelsOrdered part
of the system.

It seems to me this would give you a way of keeping track of what tests were
ordered and why. You could of course embellish TestsOrdered with the date a
test was ordered and completed, the results, who ran the test, etc., etc.,
etc., depending on your needs.
 
Thanks so much for replying Larry. My users were hoping I could do magic and
data mine this from the host system but it seems there are just to many
possible combinations and exceptions. They want to do a little data entry as
possible so I have suggested that for units that need panel testing (only a
handful each day), the users must choose the panel. The tests ordered are
stored in the host system. This is turning out to be a nightmare - query
upon query upon query.

Thanks for trying!!
 
Hmmm ... I think I understand a bit better. So the host system just stores
tests, which may exist because a panel was requested, because an individual
test was requested, or because a reactive text was generated. And your
problem is to recognize when some or all the tests in the host system add up
to a panel, so the customer can be billed at the panel rate rather than the
individual test rate?
 
Back
Top