DG696PST ;BAY/JAT;cleanup of combat vet field on file 46.1
;;5.3;Registration;**69,1015**;Aug 13,1993;Build 21
;
; This is a post-init routine for DG*5.3*696
; The purpose is to rewrite each entry that has a value in
; field .08 of file #46.1 by replacing "Y" with "1" and "N" with 0.
;
EN ;
D BMES^XPDUTL("Updating file #46.1")
N DGIEN,DGSET,FDATA,DIERR
S DGIEN=0
F S DGIEN=$O(^DGICD9(46.1,DGIEN)) Q:'DGIEN D
.Q:$P($G(^DGICD9(46.1,DGIEN,0)),U,8)=""
.S DGSET=""
.I $P(^DGICD9(46.1,DGIEN,0),U,8)="Y" S DGSET=1
.I $P(^DGICD9(46.1,DGIEN,0),U,8)="N" S DGSET=0
.S FDATA(46.1,DGIEN_",",.08)=DGSET
.D FILE^DIE("","FDATA","DIERR")
K FDATA,DIERR
Q
DG696PST ;BAY/JAT;cleanup of combat vet field on file 46.1
+1 ;;5.3;Registration;**69,1015**;Aug 13,1993;Build 21
+2 ;
+3 ; This is a post-init routine for DG*5.3*696
+4 ; The purpose is to rewrite each entry that has a value in
+5 ; field .08 of file #46.1 by replacing "Y" with "1" and "N" with 0.
+6 ;
EN ;
+1 DO BMES^XPDUTL("Updating file #46.1")
+2 NEW DGIEN,DGSET,FDATA,DIERR
+3 SET DGIEN=0
+4 FOR
SET DGIEN=$ORDER(^DGICD9(46.1,DGIEN))
IF 'DGIEN
QUIT
Begin DoDot:1
+5 IF $PIECE($GET(^DGICD9(46.1,DGIEN,0)),U,8)=""
QUIT
+6 SET DGSET=""
+7 IF $PIECE(^DGICD9(46.1,DGIEN,0),U,8)="Y"
SET DGSET=1
+8 IF $PIECE(^DGICD9(46.1,DGIEN,0),U,8)="N"
SET DGSET=0
+9 SET FDATA(46.1,DGIEN_",",.08)=DGSET
+10 DO FILE^DIE("","FDATA","DIERR")
End DoDot:1
+11 KILL FDATA,DIERR
+12 QUIT