[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: BC billing data source was Re: [Gnumed-devel] slave mode scripts
From: |
Jim Busser |
Subject: |
Re: BC billing data source was Re: [Gnumed-devel] slave mode scripts |
Date: |
Tue, 03 Aug 2010 10:55:05 -0700 |
On 2010-08-03, at 2:59 AM, Karsten Hilbert wrote:
> On Sun, Aug 01, 2010 at 03:12:20PM -0700, Jim Busser wrote:
>
>>> FIRSTNAME XXLASTNAME 912345677300BC
>>> 196012251234512345M6
>>> ADDRESS_LINE_1_XXXXXXXXXXADDRESS_LINE_2_XXXXXXXXXXCITY_XXXXXXXXXXXXXXXXXXXXBCA2A
>>> 2A2 604124456760489012340000000002009071307801
>>>
>>> - "PHN" + "Dependent #" + "Carrier ID" (in the above example "9123456773",
>>> "00", BC") work together as an identifier
>
> So, "PHN" can be non-unique across either of
>
> - different provinces ?
> - mother and child ?
I would ignore (not process) this "Dependent#" field.
I did some checking, and it seems in BC a corner case about the "00" being
instead "66". The provision to designate newborns (as dependent "66" and, in
the case of multiple births, "64" ... "63") seems now obsoleted by the ability
of the hospital to log into the provincial system and generate a new Personal
Health Number. Any such legacy values in Medical Manager would not be to drive
the slave.
The PHN can therefore be taken as unique *within* carrier ID. While the
following may be bar fetched, there is no agreement between Canada's provinces
to avoid collisions, so it could be possible to exist
BC.CA MOH | Personal Health Number | 90123456780
ON.CA MOH | Personal Health Number | 90123456780
Despite that it is exceedingly unlikely to encounter a duplicate numeric
belonging to different people, the search should be for a match on
"Carrier ID" concat \
right_trim("PHN") <--- note in the case of other provinces, could be <
10 characters, space-filled
=
LEFT_2_CHARS(dem.enum_ext_id_types.issuer) concat \
(dem.lnk_identity2ext_id.external_id)
... exceo