- DG53351M ;ALB/JAN - DG*5.3*351 POST-INSTALL MAINMAN MSG; 6/26/01
- ;;5.3;Registration;**351,1015**;JUNE 26, 2001;Build 21
- ;
- ; This routine will be run as part of the post-install for patch DG*5.3*351
- ;
- ; A mail message will be sent to the user when the post-install is completed.
- ;
- MAIL ;
- ; Send a mailman message to user with results
- N DIFROM,%
- N XMDUZ,XMSUB,XMTEXT,XMY,Y
- K ^TMP("DG53351")
- S XMDUZ="REGISTRATION PACKAGE",XMY(DUZ)="",XMY(.5)=""
- S XMSUB="DG*5.3*351 POST-INSTALL - Update CURRENT ENROLLMENT STATUS"
- S XMTEXT="^TMP(""DG53351"",$J,"
- D NOW^%DTC S Y=% D DD^%DT
- ;
- I $G(^XTMP("DG-DTC",1))=0 D
- .S ^TMP("DG53351",$J,1)="No records were updated between the ENROLLMENT STATUS field (#.04)"
- .S ^TMP("DG53351",$J,2)="of the PATIENT ENROLLMENT file (#27.11) and the cross reference"
- .S ^TMP("DG53351",$J,3)="""AENRC"" of the PATIENT file (#2)."
- I $G(^XTMP("DG-DTC",1))>0 D
- .S ^TMP("DG53351",$J,1)="The following patients had the cross reference ""AENRC"" of the"
- .S ^TMP("DG53351",$J,2)="PATIENT file (#2) updated."
- .S ^TMP("DG53351",$J,3)=""
- .S ^TMP("DG53351",$J,4)=$$BLDSTR("PATIENT NAME","SSN","OLD ENROLLMENT STATUS")
- .S ^TMP("DG53351",$J,5)=$$BLDSTR("------------","---","---------------------")
- .S ^TMP("DG53351",$J,6)=""
- .; add patients from temp global to the mail message
- .N ST,PAT,TMPNODE,PATNAME,PATSSN,ENRST,I,LINE,TEXT
- .S (ST,PAT)=""
- .F I=7:1 S PAT=$O(^XTMP("DG-AENRC",PAT)) Q:PAT="" F S ST=$O(^XTMP("DG-AENRC",PAT,ST)) Q:ST="" D
- ..S TMPNODE=$G(^XTMP("DG-AENRC",PAT,ST)),LINE=I
- ..S PATNAME=$P(TMPNODE,U,1),PATSSN=$P(TMPNODE,U,2),ENRST=$P(TMPNODE,U,3)
- ..S ^TMP("DG53351",$J,LINE)=$$BLDSTR(PATNAME,PATSSN,ENRST)
- ..Q
- .S LINE=$G(LINE)+1,^TMP("DG53351",$J,LINE)=""
- .S TEXT="Number of records updated"
- .S LINE=$G(LINE)+1,^TMP("DG53351",$J,LINE)=TEXT
- .S LINE=$G(LINE)+1,^TMP("DG53351",$J,LINE)=$$REPEAT^XLFSTR("=",$L(TEXT))
- .S LINE=$G(LINE)+1,^TMP("DG53351",$J,LINE)=+$G(^XTMP("DG-DTC",1))
- ;
- MAIL1 ; send mail message to user
- D ^XMD
- D BMES^XPDUTL(" MAIL MESSAGE < #"_XMZ_" > sent.")
- K ^TMP("DG53351",$J)
- Q
- BLDSTR(P1,P2,P3) ; build a string from input
- N S1,S2,S3
- S S1=$E(P1,1,25) I $L(S1)'>24 D
- .S S1=S1_$J("",(24-$L(S1)))
- S S2=P2
- S S3=$E(P3,1,25) I $L(S3)'>24 D
- .S S3=S3_$J("",(24-$L(S3)))
- Q S1_$J("",5)_S2_$J("",5)_S3
- DG53351M ;ALB/JAN - DG*5.3*351 POST-INSTALL MAINMAN MSG; 6/26/01
- +1 ;;5.3;Registration;**351,1015**;JUNE 26, 2001;Build 21
- +2 ;
- +3 ; This routine will be run as part of the post-install for patch DG*5.3*351
- +4 ;
- +5 ; A mail message will be sent to the user when the post-install is completed.
- +6 ;
- MAIL ;
- +1 ; Send a mailman message to user with results
- +2 NEW DIFROM,%
- +3 NEW XMDUZ,XMSUB,XMTEXT,XMY,Y
- +4 KILL ^TMP("DG53351")
- +5 SET XMDUZ="REGISTRATION PACKAGE"
- SET XMY(DUZ)=""
- SET XMY(.5)=""
- +6 SET XMSUB="DG*5.3*351 POST-INSTALL - Update CURRENT ENROLLMENT STATUS"
- +7 SET XMTEXT="^TMP(""DG53351"",$J,"
- +8 DO NOW^%DTC
- SET Y=%
- DO DD^%DT
- +9 ;
- +10 IF $GET(^XTMP("DG-DTC",1))=0
- Begin DoDot:1
- +11 SET ^TMP("DG53351",$JOB,1)="No records were updated between the ENROLLMENT STATUS field (#.04)"
- +12 SET ^TMP("DG53351",$JOB,2)="of the PATIENT ENROLLMENT file (#27.11) and the cross reference"
- +13 SET ^TMP("DG53351",$JOB,3)="""AENRC"" of the PATIENT file (#2)."
- End DoDot:1
- +14 IF $GET(^XTMP("DG-DTC",1))>0
- Begin DoDot:1
- +15 SET ^TMP("DG53351",$JOB,1)="The following patients had the cross reference ""AENRC"" of the"
- +16 SET ^TMP("DG53351",$JOB,2)="PATIENT file (#2) updated."
- +17 SET ^TMP("DG53351",$JOB,3)=""
- +18 SET ^TMP("DG53351",$JOB,4)=$$BLDSTR("PATIENT NAME","SSN","OLD ENROLLMENT STATUS")
- +19 SET ^TMP("DG53351",$JOB,5)=$$BLDSTR("------------","---","---------------------")
- +20 SET ^TMP("DG53351",$JOB,6)=""
- +21 ; add patients from temp global to the mail message
- +22 NEW ST,PAT,TMPNODE,PATNAME,PATSSN,ENRST,I,LINE,TEXT
- +23 SET (ST,PAT)=""
- +24 FOR I=7:1
- SET PAT=$ORDER(^XTMP("DG-AENRC",PAT))
- IF PAT=""
- QUIT
- FOR
- SET ST=$ORDER(^XTMP("DG-AENRC",PAT,ST))
- IF ST=""
- QUIT
- Begin DoDot:2
- +25 SET TMPNODE=$GET(^XTMP("DG-AENRC",PAT,ST))
- SET LINE=I
- +26 SET PATNAME=$PIECE(TMPNODE,U,1)
- SET PATSSN=$PIECE(TMPNODE,U,2)
- SET ENRST=$PIECE(TMPNODE,U,3)
- +27 SET ^TMP("DG53351",$JOB,LINE)=$$BLDSTR(PATNAME,PATSSN,ENRST)
- +28 QUIT
- End DoDot:2
- +29 SET LINE=$GET(LINE)+1
- SET ^TMP("DG53351",$JOB,LINE)=""
- +30 SET TEXT="Number of records updated"
- +31 SET LINE=$GET(LINE)+1
- SET ^TMP("DG53351",$JOB,LINE)=TEXT
- +32 SET LINE=$GET(LINE)+1
- SET ^TMP("DG53351",$JOB,LINE)=$$REPEAT^XLFSTR("=",$LENGTH(TEXT))
- +33 SET LINE=$GET(LINE)+1
- SET ^TMP("DG53351",$JOB,LINE)=+$GET(^XTMP("DG-DTC",1))
- End DoDot:1
- +34 ;
- MAIL1 ; send mail message to user
- +1 DO ^XMD
- +2 DO BMES^XPDUTL(" MAIL MESSAGE < #"_XMZ_" > sent.")
- +3 KILL ^TMP("DG53351",$JOB)
- +4 QUIT
- BLDSTR(P1,P2,P3) ; build a string from input
- +1 NEW S1,S2,S3
- +2 SET S1=$EXTRACT(P1,1,25)
- IF $LENGTH(S1)'>24
- Begin DoDot:1
- +3 SET S1=S1_$JUSTIFY("",(24-$LENGTH(S1)))
- End DoDot:1
- +4 SET S2=P2
- +5 SET S3=$EXTRACT(P3,1,25)
- IF $LENGTH(S3)'>24
- Begin DoDot:1
- +6 SET S3=S3_$JUSTIFY("",(24-$LENGTH(S3)))
- End DoDot:1
- +7 QUIT S1_$JUSTIFY("",5)_S2_$JUSTIFY("",5)_S3