Message-ID: <625291987.8504.1711704005162.JavaMail.confluence@ip-172-30-4-17.ec2.internal> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_8503_1323515734.1711704005159" ------=_Part_8503_1323515734.1711704005159 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
(<pid> not found, generate [=
max+1])
If the <patient_id> so=
urce / value pair has not been added to the mapping table, a new PATIENT_NU=
M with value max(patient_num)+1 should be generated and all the PATIENT_NUM=
s for this patient will receive this value. The new patient number must als=
o be added to the PATIENT_DIMENSION table.
Example:<=
/em>
New <patient_id> source / value pair =3D 'EMPI' / 1=
000000
Select max(patient_num) from patient_mapping =3D 527
New pat=
ient_num =3D max(patient_num) + 1 =3D 528
=
<span style=3D"color: #0000ff"><</span><span style=3D"co=
lor: #a31515">pid</span><span style=3D"color: #0000ff">>&=
lt;/span>
<span style=3D"color: #0000ff"><</span><=
span style=3D"color: #a31515">patient_id</span> <span style=3D"=
color: #ff0000">source</span>=3D"<span style=3D"color: #0000ff"=
>EMPI</span>"<span style=3D"color: #0000ff">></span>=
;1000000<span style=3D"color: #0000ff"></</span><span sty=
le=3D"color: #a31515">patient_id</span><span style=3D"color: #0=
000ff">></span>
<span style=3D"color: #0000ff"><&l=
t;/span><span style=3D"color: #a31515">patient_map_id</span>=
<span style=3D"color: #ff0000">source</span>=3D"<span style=
=3D"color: #0000ff">MGH</span>"<span style=3D"color: #0000ff"&g=
t;></span>123<span style=3D"color: #0000ff"></</span&g=
t;<span style=3D"color: #a31515">patient_map_id</span><span =
style=3D"color: #0000ff">></span>
<span style=3D"color: =
#0000ff"><</span><span style=3D"color: #a31515">patient_m=
ap_id</span> <span style=3D"color: #ff0000">source</span>=
=3D"<span style=3D"color: #0000ff">BWH</span>"<span style=3D=
"color: #0000ff">></span>777<span style=3D"color: #0000ff"&g=
t;</</span><span style=3D"color: #a31515">patient_map_id<=
/span><span style=3D"color: #0000ff">></span>
<spa=
n style=3D"color: #0000ff"></</span><span style=3D"color: #a=
31515">pid</span><span style=3D"color: #0000ff">></spa=
n>
T=
he rows in the PATIENT_MAPPING table will appear as follows:
PATIENT_IDE | =20
PATIENT_IDE_SOURCE | =
=20
PATIENT_NUM | =20
PATIENT_IDE_STATUS | =
=20
1000000 | =20
EMPI | =20
528 | =20
A | =20
123 | =20
MGH | =20
528 | =20
A | =20
777 | =20
BWH | =20
528 | =20
A | =20
528 | =20
HIVE | =20
528 | =20
A | =20