DG681PST ;BAY/ALS;populate new PIVOT FILE DAYS TO RETAIN field ; 10/05/05
 ;;5.3;Registration;**681**;Aug 13,1993
 ;
 ; This is a post-install routine for DG*5.3*681
 ; The purpose is to check the 4th piece of the HL7 node in the
 ; MAS PARAMETERS (#43) file and put the data in the 6th piece
 ; of the HL7 node, the new location for the PIVOT FILE DAYS TO
 ; RETAIN (#391.702) field as follows.
 ;
 ; If it equals 1- leave it as is, it was placed there by the
 ; CREATE MFU FOR RAI MDS (#391.7014) field
 ;
 ; If it is greater than 29, move it to the 6th piece, the 
 ; PIVOT FILE DAYS TO RETAIN (#391.702) field is meant to be
 ; at least 30.
 ;
 ; If it is null leave it as is.
EN ;
 S RAI=""
 S DIC=43,DA=1,DR="391.7014"
 D EN^DIQ1 K DIC,DA,DR
 S RAI=^UTILITY("DIQ1",$J,43,1,391.7014)
 I RAI>29 D
 . S DIE=43,DA=1,DR="391.702///^S X=RAI;391.7014///@"
 . D ^DIE K DIE,DA,DR
 K RAI
 Q
 
--- Routine Detail   --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDG681PST   914     printed  Sep 23, 2025@20:16:23                                                                                                                                                                                                     Page 2
DG681PST  ;BAY/ALS;populate new PIVOT FILE DAYS TO RETAIN field ; 10/05/05
 +1       ;;5.3;Registration;**681**;Aug 13,1993
 +2       ;
 +3       ; This is a post-install routine for DG*5.3*681
 +4       ; The purpose is to check the 4th piece of the HL7 node in the
 +5       ; MAS PARAMETERS (#43) file and put the data in the 6th piece
 +6       ; of the HL7 node, the new location for the PIVOT FILE DAYS TO
 +7       ; RETAIN (#391.702) field as follows.
 +8       ;
 +9       ; If it equals 1- leave it as is, it was placed there by the
 +10      ; CREATE MFU FOR RAI MDS (#391.7014) field
 +11      ;
 +12      ; If it is greater than 29, move it to the 6th piece, the 
 +13      ; PIVOT FILE DAYS TO RETAIN (#391.702) field is meant to be
 +14      ; at least 30.
 +15      ;
 +16      ; If it is null leave it as is.
EN        ;
 +1        SET RAI=""
 +2        SET DIC=43
           SET DA=1
           SET DR="391.7014"
 +3        DO EN^DIQ1
           KILL DIC,DA,DR
 +4        SET RAI=^UTILITY("DIQ1",$JOB,43,1,391.7014)
 +5        IF RAI>29
               Begin DoDot:1
 +6                SET DIE=43
                   SET DA=1
                   SET DR="391.702///^S X=RAI;391.7014///@"
 +7                DO ^DIE
                   KILL DIE,DA,DR
               End DoDot:1
 +8        KILL RAI
 +9        QUIT