DG53292 ;ALB/RKS-DG*5.3*292 Post-Install to clean ANNUAL MEANS TEST ;05/22/00
;;5.3;Registration;**292**;Aug 13, 1993
;
; This routine is the post installation for patch DG*5.3*292
;
; The clean up is required as there are a number of null entries
; in the DATE/TIME COMPLETED (#.07) field in the Annual Means Test
; file (408.31). When appropriate, this field will be populated with
; the DATE OF TEST (#.01) field and a time of .0001 concatenated.
;
; ^XTMP("DG-DTC") track number of records processed:
; ^XTMP("DG-DTCERR") contains error messages returned from FM DBS calls:
; ^XTMP("DG-DTCERR",file#,record#)=error message
;
POST ;
; post-install set up checkpoints and tracking global...
N %,I,X,X1,X2
I $D(XPDNM) D
. ; checkpoints
. I $$VERCP^XPDUTL("DGPAT")'>0 D
. . S %=$$NEWCP^XPDUTL("DGPAT","",0)
. ;
;
; initialize tracking global (see text above for description)...
F I="DTC","DTCERR" D
. I $D(^XTMP(I)) Q
. S X1=DT
. S X2=30
. D C^%DTC
. S ^XTMP("DG-"_I,0)=X_"^"_$$DT^XLFDT_"^DG*5.3*292 POST-INSTALL "_$S(I="DTC":"record count",1:"filing errors")
;
EN ; begin processing...
N %
; check status and if root checkpoint has not completed start clean up
I $D(XPDNM) S %=$$VERCP^XPDUTL("DGPAT")
I $G(%)="" S %=0
I %=0 D EN1
Q
;
EN1 ; begin purge...
; write message to installation device and to INSTALL file (#9.7)
D BMES^XPDUTL("POST INSTALLATION PROCESSING")
D MES^XPDUTL("Once the post-install is completed, a mail message will")
D MES^XPDUTL("be sent that will report the count of records which")
D MES^XPDUTL("had to have a DATE/TIME COMPLETED entry added.")
D MES^XPDUTL("Additionally, the report will contain notes about")
D MES^XPDUTL("any errors encountered during the post-installation")
D BMES^XPDUTL("Beginning update process "_$$FMTE^XLFDT($$NOW^XLFDT))
;
; process control body
N DGPAT,DOT,DGX,DGENDA,DATA,ERR
;
I '$D(XPDNM) S DGPAT=0
I $D(XPDNM) S DGPAT=$$PARCP^XPDUTL("DGPAT")
;
F S DGPAT=$O(^DGMT(408.31,DGPAT)) Q:'DGPAT I $G(^(DGPAT,0)) D
. I $P(^DGMT(408.31,DGPAT,0),U,7)'="" Q
. I (($P(^DGMT(408.31,DGPAT,0),U,4)="")&('$P(^(0),U,14))) Q
. S DGX=^DGMT(408.31,DGPAT,0),DOT=+DGX_".0001"
. S DGENDA=DGPAT,DATA(.07)=DOT
. I '$$UPD^DGENDBS(408.31,.DGENDA,.DATA,.ERR) S:$D(ERR) ^XTMP("DG-DTCERR",408.31,DGENDA)=ERR
. S ^XTMP("DG-DTC")=+$G(^XTMP("DG-DTC"))+1
. I $D(XPDNM) S %=$$UPCP^XPDUTL("DGPAT",DGPAT)
;Send mailman message to user/HEC with results
D MAIL^DG53292M
I $D(XPDNM) S %=$$COMCP^XPDUTL("DGPAT")
D MES^XPDUTL(" >>update process completed "_$$FMTE^XLFDT($$NOW^XLFDT))
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDG53292 2640 printed Dec 13, 2024@02:37:01 Page 2
DG53292 ;ALB/RKS-DG*5.3*292 Post-Install to clean ANNUAL MEANS TEST ;05/22/00
+1 ;;5.3;Registration;**292**;Aug 13, 1993
+2 ;
+3 ; This routine is the post installation for patch DG*5.3*292
+4 ;
+5 ; The clean up is required as there are a number of null entries
+6 ; in the DATE/TIME COMPLETED (#.07) field in the Annual Means Test
+7 ; file (408.31). When appropriate, this field will be populated with
+8 ; the DATE OF TEST (#.01) field and a time of .0001 concatenated.
+9 ;
+10 ; ^XTMP("DG-DTC") track number of records processed:
+11 ; ^XTMP("DG-DTCERR") contains error messages returned from FM DBS calls:
+12 ; ^XTMP("DG-DTCERR",file#,record#)=error message
+13 ;
POST ;
+1 ; post-install set up checkpoints and tracking global...
+2 NEW %,I,X,X1,X2
+3 IF $DATA(XPDNM)
Begin DoDot:1
+4 ; checkpoints
+5 IF $$VERCP^XPDUTL("DGPAT")'>0
Begin DoDot:2
+6 SET %=$$NEWCP^XPDUTL("DGPAT","",0)
End DoDot:2
+7 ;
End DoDot:1
+8 ;
+9 ; initialize tracking global (see text above for description)...
+10 FOR I="DTC","DTCERR"
Begin DoDot:1
+11 IF $DATA(^XTMP(I))
QUIT
+12 SET X1=DT
+13 SET X2=30
+14 DO C^%DTC
+15 SET ^XTMP("DG-"_I,0)=X_"^"_$$DT^XLFDT_"^DG*5.3*292 POST-INSTALL "_$S(I="DTC":"record count",1:"filing errors")
End DoDot:1
+16 ;
EN ; begin processing...
+1 NEW %
+2 ; check status and if root checkpoint has not completed start clean up
+3 IF $DATA(XPDNM)
SET %=$$VERCP^XPDUTL("DGPAT")
+4 IF $GET(%)=""
SET %=0
+5 IF %=0
DO EN1
+6 QUIT
+7 ;
EN1 ; begin purge...
+1 ; write message to installation device and to INSTALL file (#9.7)
+2 DO BMES^XPDUTL("POST INSTALLATION PROCESSING")
+3 DO MES^XPDUTL("Once the post-install is completed, a mail message will")
+4 DO MES^XPDUTL("be sent that will report the count of records which")
+5 DO MES^XPDUTL("had to have a DATE/TIME COMPLETED entry added.")
+6 DO MES^XPDUTL("Additionally, the report will contain notes about")
+7 DO MES^XPDUTL("any errors encountered during the post-installation")
+8 DO BMES^XPDUTL("Beginning update process "_$$FMTE^XLFDT($$NOW^XLFDT))
+9 ;
+10 ; process control body
+11 NEW DGPAT,DOT,DGX,DGENDA,DATA,ERR
+12 ;
+13 IF '$DATA(XPDNM)
SET DGPAT=0
+14 IF $DATA(XPDNM)
SET DGPAT=$$PARCP^XPDUTL("DGPAT")
+15 ;
+16 FOR
SET DGPAT=$ORDER(^DGMT(408.31,DGPAT))
if 'DGPAT
QUIT
IF $GET(^(DGPAT,0))
Begin DoDot:1
+17 IF $PIECE(^DGMT(408.31,DGPAT,0),U,7)'=""
QUIT
+18 IF (($PIECE(^DGMT(408.31,DGPAT,0),U,4)="")&('$PIECE(^(0),U,14)))
QUIT
+19 SET DGX=^DGMT(408.31,DGPAT,0)
SET DOT=+DGX_".0001"
+20 SET DGENDA=DGPAT
SET DATA(.07)=DOT
+21 IF '$$UPD^DGENDBS(408.31,.DGENDA,.DATA,.ERR)
if $DATA(ERR)
SET ^XTMP("DG-DTCERR",408.31,DGENDA)=ERR
+22 SET ^XTMP("DG-DTC")=+$GET(^XTMP("DG-DTC"))+1
+23 IF $DATA(XPDNM)
SET %=$$UPCP^XPDUTL("DGPAT",DGPAT)
End DoDot:1
+24 ;Send mailman message to user/HEC with results
+25 DO MAIL^DG53292M
+26 IF $DATA(XPDNM)
SET %=$$COMCP^XPDUTL("DGPAT")
+27 DO MES^XPDUTL(" >>update process completed "_$$FMTE^XLFDT($$NOW^XLFDT))
+28 QUIT
+29 ;