AGGPTSSN ;VNGT/HS/ALA-Pseudo SSN ; 11 Jun 2010 3:04 PM
;;1.0;PATIENT REGISTRATION GUI;;Nov 15, 2010
;
;
GTMP(DATA,DFN,DOB) ; EP -- AGG GET PSEUDO SSN
;
NEW UID,II,L,AUPX,AUPIDS
S UID=$S($G(ZTSK):"Z"_ZTSK,1:$J)
S DATA=$NA(^TMP("AGGPTHRN",UID))
K @DATA
S II=0
NEW $ESTACK,$ETRAP S $ETRAP="D ERR^AGGWDISP D UNWIND^%ZTER" ; SAC 2006 2.2.3.3.2
;
I $G(DOB)="" S DOB=$P(^DPT(DFN,0),U,3)
I DOB="" D Q
. S @DATA@(II)="I00010RESULT^T00080MESSAGE"_$C(30)
. S II=II+1,@DATA@(II)="-1^Pseudo SSN needs patient DOB to calculate"_$C(30)
. S II=II+1,@DATA@(II)=$C(31)
;
S @DATA@(II)="T00010AGGPTSSN"_$C(30)
;
S AUPX=$P(^DPT(DFN,0),U,1),AUPIDS(.03)=$$DATE^AGGUL1(DOB)
D PSEU^DGRPDD1
S II=II+1,@DATA@(II)=$G(L)_$C(30)
S II=II+1,@DATA@(II)=$C(31)
Q
AGGPTSSN ;VNGT/HS/ALA-Pseudo SSN ; 11 Jun 2010 3:04 PM
+1 ;;1.0;PATIENT REGISTRATION GUI;;Nov 15, 2010
+2 ;
+3 ;
GTMP(DATA,DFN,DOB) ; EP -- AGG GET PSEUDO SSN
+1 ;
+2 NEW UID,II,L,AUPX,AUPIDS
+3 SET UID=$SELECT($GET(ZTSK):"Z"_ZTSK,1:$JOB)
+4 SET DATA=$NAME(^TMP("AGGPTHRN",UID))
+5 KILL @DATA
+6 SET II=0
+7 ; SAC 2006 2.2.3.3.2
NEW $ESTACK,$ETRAP
SET $ETRAP="D ERR^AGGWDISP D UNWIND^%ZTER"
+8 ;
+9 IF $GET(DOB)=""
SET DOB=$PIECE(^DPT(DFN,0),U,3)
+10 IF DOB=""
Begin DoDot:1
+11 SET @DATA@(II)="I00010RESULT^T00080MESSAGE"_$CHAR(30)
+12 SET II=II+1
SET @DATA@(II)="-1^Pseudo SSN needs patient DOB to calculate"_$CHAR(30)
+13 SET II=II+1
SET @DATA@(II)=$CHAR(31)
End DoDot:1
QUIT
+14 ;
+15 SET @DATA@(II)="T00010AGGPTSSN"_$CHAR(30)
+16 ;
+17 SET AUPX=$PIECE(^DPT(DFN,0),U,1)
SET AUPIDS(.03)=$$DATE^AGGUL1(DOB)
+18 DO PSEU^DGRPDD1
+19 SET II=II+1
SET @DATA@(II)=$GET(L)_$CHAR(30)
+20 SET II=II+1
SET @DATA@(II)=$CHAR(31)
+21 QUIT