AZXZEMP ;CHECK FOR EMPLOYER # BEING THE SAME [ 07/09/92 8:12 AM ]
;04/08/92 JOHN H. LYNCH
; INITIALIZE VARIABLES
S PAT=0,EMP=0,EMPRNO=0
S VIEW="N",FIXIT="N"
MAIN F I=1:1:26 W ! ; CLEAR SCREEN
W !,"THIS PROGRAM WILL CHECK TO SEE IF AN"
W !,"EMPLOYER IS BEING REPEATED IN MANY"
W !,"DIFFERENT PATIENT FILES (AUPNPAT)."
R !,!,"DO YOU WANT TO CONTINUE (Y/N)? ",YN
I YN'="Y" Q
R !,!,"PLEASE ENTER IN EMPLOYER NUMBER TO USE IN FIX: ",EMPRNO
R !,!,"DO YOU WANT TO VIEW THE PATIENT AND EMPLOYER? ",VIEW
R !,!,"DO YOU WANT TO GO AHEAD AND FIX (SET EACH TO NULL)? ",FIXIT
D PATIENT
Q
PATIENT F S PAT=$O(^AUPNPAT("AF",EMPRNO,PAT)) Q:'PAT S EMP=0 D CHECK
Q
CHECK S EMP=$P(^AUPNPAT(PAT,0),"^",19)
I VIEW="Y",EMP=EMPRNO W !,!,"PATIENT: ",PAT," EMPLOYER: ",EMP
I FIXIT="Y",EMP=EMPRNO D FIX
Q
FIX S $P(^AUPNPAT(PAT,0),"^",19)="" ;SET 19 PIECE (EMPLOYER)=""
K ^AUPNPAT("AF",EMPRNO,PAT) ;KILL OFF "AF" CROSS-REF.
Q
AZXZEMP ;CHECK FOR EMPLOYER # BEING THE SAME [ 07/09/92 8:12 AM ]
+1 ;04/08/92 JOHN H. LYNCH
+2 ; INITIALIZE VARIABLES
+3 SET PAT=0
SET EMP=0
SET EMPRNO=0
+4 SET VIEW="N"
SET FIXIT="N"
+5 MAIN ; CLEAR SCREEN
FOR I=1:1:26
WRITE !
+1 WRITE !,"THIS PROGRAM WILL CHECK TO SEE IF AN"
+2 WRITE !,"EMPLOYER IS BEING REPEATED IN MANY"
+3 WRITE !,"DIFFERENT PATIENT FILES (AUPNPAT)."
+4 READ !,!,"DO YOU WANT TO CONTINUE (Y/N)? ",YN
+5 IF YN'="Y"
QUIT
+6 +7 READ !,!,"PLEASE ENTER IN EMPLOYER NUMBER TO USE IN FIX: ",EMPRNO
+8 READ !,!,"DO YOU WANT TO VIEW THE PATIENT AND EMPLOYER? ",VIEW
+9 READ !,!,"DO YOU WANT TO GO AHEAD AND FIX (SET EACH TO NULL)? ",FIXIT
+10 +11 DO PATIENT
+12 QUIT
+13 PATIENT FOR
SET PAT=$ORDER(^AUPNPAT("AF",EMPRNO,PAT))
IF 'PAT
QUIT
SET EMP=0
DO CHECK
+1 QUIT
+2 CHECK SET EMP=$PIECE(^AUPNPAT(PAT,0),"^",19)
+1 IF VIEW="Y"
IF EMP=EMPRNO
WRITE !,!,"PATIENT: ",PAT," EMPLOYER: ",EMP
+2 IF FIXIT="Y"
IF EMP=EMPRNO
DO FIX
+3 QUIT
FIX ;SET 19 PIECE (EMPLOYER)=""
SET $PIECE(^AUPNPAT(PAT,0),"^",19)=""
+1 ;KILL OFF "AF" CROSS-REF.
KILL ^AUPNPAT("AF",EMPRNO,PAT)
+2 QUIT