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

AGGPTSSN.m

Go to the documentation of this file.
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