Method for determining transposition when comparing two numeric v
alues (more information)
George_DeWolf@midhosp.org
George_DeWolf@midhosp.org
Mon, 20 Nov 2000 09:46:46 -0500
Thanks for the responses thus far. Here is some more information on my
problem. I am writing a Quick screen which reads an indexed file (KSAM).
The key I am reading by contains the SOUNDEX of the patient's last name (the
screen is for a hospital). I wish to select those records that have the
same SOUNDEX of the last name and have similar (but not necessarily equal)
social security numbers (9 digit number for those of you outside USA). I
am assuming with my "lookup" screen that the social security number (SSN)
may have originally been entered incorrectly or has been entered incorrectly
on my lookup screen, so I want to select those records that have SSNs
similar to the ones entered on the lookup screen. I am selecting those
records that have five or more of the nine digits matching in the same
position; that is when the entered value is "072351232", I would select
"074341244". I am sorting the records found by how closely they match the
entered value and presenting to the user those that match the closest first.
I have been able to successfully do this by passing the selection value to a
QUIZ process from the Quick screen, comparing each digit in the entered SSN
to the ones on file and sorting them by the number of SSN digits which
match. I need a way though to determine if transposition has occurred. If
it has and the entered value is "072351232", I would like to report
"072531232" (4th and 5th digits transposed) before "072661232" (4th and 5th
digits different).
As some of you have pointed out when one value is subtracted from another
and the result is evenly divisible by 9 (no remainder) this may indicate
transposition. But not all differences evenly divisible by 9 indicate
transposition. I've thought if there is a way of counting the number of
ones, twos, threes etc. in the two values I am trying to compare and
determining if each value has the same number of ones, twos, threes etc.,
and then using this along with the evenly-divisible-by-nine technique, that
this would be a reliable indicator of transposition. Just don't know of a
way to get Quiz to count the number of ones, two, threes in each value. Any
one have any ideas on how to deal with this?
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
This list is closed, thus to post to the list, you must be a subscriber.