AGGPTDEL ;VNGT/HS/ALA-Delete Patient Record ; 02 Sep 2010 1:19 PM
;;1.0;PATIENT REGISTRATION GUI;;Nov 15, 2010
;
;
;Description
; This deletes a new patient who has been partially added to the system from Mini
; Registration or New Patient if the user selects to cancel the addition of the
; patient
;
EN(DATA,DFN) ;EP -- AGG PATIENT DELETE
NEW UID,II,DA,DIK
S UID=$S($G(ZTSK):"Z"_ZTSK,1:$J)
S DATA=$NA(^TMP("AGGPTDEL",UID))
K @DATA
S II=0
NEW $ESTACK,$ETRAP S $ETRAP="D ERR^AGGWDISP D UNWIND^%ZTER" ; SAC 2006 2.2.3.3.2
;
S @DATA@(II)="I00010RESULT^T00080MESSAGE"_$C(30)
S DA=DFN,DIK="^AUPNPAT(" D ^DIK
S DA=DFN,DIK="^DPT(" D ^DIK
S RESULT=1
S II=II+1,@DATA@(II)=RESULT_$C(30)
; Remove the export entry
D DEL^AGGEXPRT(DFN)
;
DONE ;
S II=II+1,@DATA@(II)=$C(31)
Q
AGGPTDEL ;VNGT/HS/ALA-Delete Patient Record ; 02 Sep 2010 1:19 PM
+1 ;;1.0;PATIENT REGISTRATION GUI;;Nov 15, 2010
+2 ;
+3 ;
+4 ;Description
+5 ; This deletes a new patient who has been partially added to the system from Mini
+6 ; Registration or New Patient if the user selects to cancel the addition of the
+7 ; patient
+8 ;
EN(DATA,DFN) ;EP -- AGG PATIENT DELETE
+1 NEW UID,II,DA,DIK
+2 SET UID=$SELECT($GET(ZTSK):"Z"_ZTSK,1:$JOB)
+3 SET DATA=$NAME(^TMP("AGGPTDEL",UID))
+4 KILL @DATA
+5 SET II=0
+6 ; SAC 2006 2.2.3.3.2
NEW $ESTACK,$ETRAP
SET $ETRAP="D ERR^AGGWDISP D UNWIND^%ZTER"
+7 ;
+8 SET @DATA@(II)="I00010RESULT^T00080MESSAGE"_$CHAR(30)
+9 SET DA=DFN
SET DIK="^AUPNPAT("
DO ^DIK
+10 SET DA=DFN
SET DIK="^DPT("
DO ^DIK
+11 SET RESULT=1
+12 SET II=II+1
SET @DATA@(II)=RESULT_$CHAR(30)
+13 ; Remove the export entry
+14 DO DEL^AGGEXPRT(DFN)
+15 ;
DONE ;
+1 SET II=II+1
SET @DATA@(II)=$CHAR(31)
+2 QUIT