Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: ABPAPATL

ABPAPATL.m

Go to the documentation of this file.
ABPAPATL ;PRIV-INS PATIENT LOOK-UP UTILITY; [ 07/14/91  8:51 AM ]
 ;;1.4;AO PVT-INS TRACKING;*0*;IHS-OKC/KJR;JULY 25, 1991
INIT K ABPAT,ABPAHRN,ABPAPSSN,ABPATDFN,ABPAPAT D XIT,DT^DICRW
 ;
PROMPT W "Select PATIENT NAME: " D
 .K DFOUT,DTOUT,DUOUT,DQOUT,DLOUT
 .R Y:DTIME I '$T W *7 R Y:5 G PROMPT:Y="." I '$T S (DTOUT,Y)="" Q
 .I Y="/.," S (DFOUT,Y)="" Q
 .I Y="" S DLOUT="" Q
 .I Y="^" S (DUOUT,Y)="" Q
 .I Y?1"?".E!(Y["^") S (DQOUT,Y)="" Q
 .Q
 I $D(DTOUT)!$D(DUOUT)!$D(DFOUT)!$D(DLOUT) G XIT
 I $D(DQOUT) S XQH="ABPAPATIENT" D EN^XQH G INIT
 K DIC S DIC="^ABPVAO(",DIC(0)="EZ",X=Y
 I $D(ABPASITE)=1 D
 .S DIC("S")="I $P(^ABPVAO(Y,0),""^"",2)=ABPASITE"
DIC S D="B" D IX^DIC ;NAME LOOK-UP
 I +Y<1 S D="D" D IX^DIC ;HRN LOOK-UP
 I +Y<1 S D="F" D IX^DIC ;SSN LOOK-UP
 I +Y<1 S D="I" D IX^DIC ;BILL ID LOOK-UP
 I +Y<1 S D="C" D IX^DIC ;DOS LOOK-UP
 I +Y<1 S D="E" D IX^DIC ;OTHER NAME LOOK-UP
 I +Y<1 I $D(ABPAPTN)=1 D
 .K D,ABPAPTN S DIC(0)="ELZ" D ^DIC
 I +Y>0 S (ABPATDFN,DA)=+Y,ABPAPAT=Y(0,0) I +$P(Y,"^",3)=1 D
 .K DIE S DIE="^ABPVAO(",DR=.04 D ^DIE
 I $D(ABPATDFN)'=1 W *7,"  ??" S ABPATDFN=""
 E  S ABPAHRN=$P(^ABPVAO(ABPATDFN,0),"^",3),ABPAPSSN=$P(^(0),"^",4)
 I $D(ABPAPSSN)=1 I $L(ABPAPSSN)=9 D
 .S ABPASSN=$E(ABPAPSSN,1,3)_"-"_$E(ABPAPSSN,4,5)_"-"_$E(ABPAPSSN,6,9)
 .S ABPAPSSN=ABPASSN K ABPASSN
XIT K DIC,X,Y,DTOUT,DUOUT,DFOUT,DLOUT,DQOUT,XQH,D
 Q