AGGPRE1 ;VNGT/HS/ALA-Pre Install program ; 19 Apr 2010 4:09 PM
;;1.0;PATIENT REGISTRATION GUI;;Nov 15, 2010
;
;
EN ;
NEW DA,DIK
S DIK="^AGG(9009068.3,",DA=0
F S DA=$O(^AGG(9009068.3,DA)) Q:'DA D ^DIK
;
S DIK="^AGG(9009068.6,",DA=0
F S DA=$O(^AGG(9009068.6,DA)) Q:'DA D ^DIK
;
S DIK="^AGG(9009068.5,",DA=0
F S DA=$O(^AGG(9009068.5,DA)) Q:'DA D ^DIK
;
; Check for bad records
NEW DA,AGGUPD
S DA=0
F S DA=$O(^AUPNNPP(DA)) Q:'DA D
. I $P($G(^AUPNNPP(DA,0)),"^",1)'=DA S AGGUPD(9000038,DA_",",.01)=DA
I $D(AGGUPD) D FILE^DIE("","AGGUPD","ERROR")
Q
AGGPRE1 ;VNGT/HS/ALA-Pre Install program ; 19 Apr 2010 4:09 PM
+1 ;;1.0;PATIENT REGISTRATION GUI;;Nov 15, 2010
+2 ;
+3 ;
EN ;
+1 NEW DA,DIK
+2 SET DIK="^AGG(9009068.3,"
SET DA=0
+3 FOR
SET DA=$ORDER(^AGG(9009068.3,DA))
IF 'DA
QUIT
DO ^DIK
+4 ;
+5 SET DIK="^AGG(9009068.6,"
SET DA=0
+6 FOR
SET DA=$ORDER(^AGG(9009068.6,DA))
IF 'DA
QUIT
DO ^DIK
+7 ;
+8 SET DIK="^AGG(9009068.5,"
SET DA=0
+9 FOR
SET DA=$ORDER(^AGG(9009068.5,DA))
IF 'DA
QUIT
DO ^DIK
+10 ;
+11 ; Check for bad records
+12 NEW DA,AGGUPD
+13 SET DA=0
+14 FOR
SET DA=$ORDER(^AUPNNPP(DA))
IF 'DA
QUIT
Begin DoDot:1
+15 IF $PIECE($GET(^AUPNNPP(DA,0)),"^",1)'=DA
SET AGGUPD(9000038,DA_",",.01)=DA
End DoDot:1
+16 IF $DATA(AGGUPD)
DO FILE^DIE("","AGGUPD","ERROR")
+17 QUIT