DG696PST ;BAY/JAT;cleanup of combat vet field on file 46.1
 ;;5.3;Registration;**696*;Aug 13,1993
 ;
 ; 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
 
--- Routine Detail   --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDG696PST   666     printed  Sep 23, 2025@20:16:28                                                                                                                                                                                                     Page 2
DG696PST  ;BAY/JAT;cleanup of combat vet field on file 46.1
 +1       ;;5.3;Registration;**696*;Aug 13,1993
 +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