source: FOIAVistA/tag/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/DG53P597.m@ 1208

Last change on this file since 1208 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 3.4 KB
Line 
1DG53P597 ; BAY/JAP- Patch DG*5.3*597 Post-Installation ; 04/19/2004
2 ;;5.3;Registration;**597**;AUG 13, 1993
3 ;
4 ;be sure that all existing 1010EZ applications in 1010EZ HOLDING file (#712)
5 ;are linked to file #2 thru the new field MOST RECENT 1010EZ (#1010.156);
6 ;also update APPOINTMENT REQUEST ON 1010EZ field (#1010.159) using data from field #4.4/file #712
7 ;and EMAIL ADDRESS field (#.133) using data from field #4.3/file #712
8 ;in the applicant's file #2 record.
9 ;
10POST ;
11 ;queue the task to background for 5:00 AM following date of install
12 ;ZTRTN="QUE^DG53P597"
13 N QUETIME,X1,X2
14 S X1=DT,X2=1 D C^%DTC
15 S QUETIME=X_".05"
16 S ZTDTH=QUETIME
17 S ZTIO="",ZTDESC="DG*5.3*597 POST-INSTALLATION TASK"
18 S ZTRTN="QUE^DG53P597"
19 D ^%ZTLOAD
20 I '$G(ZTSK) W !!,"POST-INSTALL BACKGROUND TASK NOT QUEUED",! D NOTASK
21 Q
22 ;
23QUE ;entry point from TaskManager
24 ;
25 ;only update file #2 with data from file #712 record if date filed exists
26 ;(#3.4) LINK TO FILE #2 [10P:2]
27 ;(#4.3) APPLICANT E-MAIL [4F]
28 ;(#4.4) APPOINTMENT REQUESTED [5S]
29 ;(#7.1) FILING DATE [5D]
30 S START=$$NOW^XLFDT()
31 S REC712=0,TOTAL=0,UPDATES=0
32 F S REC712=$O(^EAS(712,REC712)) Q:'REC712 D
33 .S TOTAL=TOTAL+1,NEW=0
34 .S DFN=+$P(^EAS(712,REC712,0),U,10),FILED=+$P($G(^EAS(712,REC712,2)),U,5)
35 .Q:'DFN
36 .Q:'$D(^DPT(DFN,0))
37 .Q:'FILED
38 .S EMAIL=$P($G(^EAS(712,REC712,1)),U,4),APPTREQ=$P($G(^EAS(712,REC712,1)),U,5)
39 .I $P($G(^DPT(DFN,1010.15)),U,6)="" S NEW=1
40 .S IENS=DFN_","
41 .K DATA S DATA(2,IENS,.133)=EMAIL,DATA(2,IENS,1010.156)=REC712,DATA(2,IENS,1010.159)=APPTREQ
42 .K ERRMSG D FILE^DIE("","DATA","ERRMSG")
43 .I '$D(ERRMSG),NEW S UPDATES=UPDATES+1
44 ;when process of file #712 is complete
45 D MESS(TOTAL,UPDATES,$G(ZTSK),START)
46 Q
47 ;
48MESS(TOTAL,UPDATES,ZTSK,START) ;
49 ;send MailMan message to members of G.VA1010EZ as well installer of patch
50 ;to inform that job has completed and number of file #2 records updated.
51 ;
52 S Y=START D DD^%DT S START=Y
53 I $G(ZTSK) S MSG(1)="The post-installation background task (#"_ZTSK_") for DG*5.3*597,"
54 I '$G(ZTSK) S MSG(1)="A post-installation update process for DG*5.3*597,"
55 S MSG(2)="which started on "_START_", has completed."
56 S MSG(3)=" "
57 S MSG(4)="A total of "_TOTAL_" records in the 1010EZ HOLDING file (#712)"
58 S MSG(5)="were processed."
59 S MSG(6)=" "
60 S MSG(7)=UPDATES_" records in the PATIENT file (#2) were updated as follows:"
61 S MSG(8)=" Field #.133 from #712/#4.3"
62 S MSG(9)=" Field #1010.156 from #712 IEN"
63 S MSG(10)=" Field #1010.159 from #712/#4.4"
64 S MSG(11)=" "
65 K XMY
66 S XMDUZ=.5,XMTEXT="MSG(",XMY(DUZ)="",WHERE=^XMB("NETNAME"),XMY("G.VA1010EZ@"_WHERE)=""
67 S XMSUB="DG*5.3*597 Post-Installation Task Complete"
68 D ^XMD
69 K DFN,MSG,NEW,REC712,TOTAL,UPDATES,WHERE,XMZ,XMY,XMDUZ
70 Q
71 ;
72NOTASK ;
73 ;send MailMan message to members of G.VA1010EZ as well installer of patch
74 ;to inform that post-install job was not successfully tasked.
75 ;
76 S MSG(1)="The post-installation background job for DG*5.3*597"
77 S MSG(2)="was not successfully queued."
78 S MSG(3)=" "
79 S MSG(4)="Please have a member of IRM Service at your facility"
80 S MSG(5)="run the post-installation update directly from"
81 S MSG(6)="programmer mode by entering the following command:"
82 S MSG(7)=" "
83 S MSG(8)="D QUE^DG53P597"
84 S MSG(9)=" "
85 S MSG(10)="The process should take less than 30 minutes to complete."
86 K XMY
87 S XMDUZ=.5,XMTEXT="MSG(",XMY(DUZ)="",WHERE=^XMB("NETNAME"),XMY("G.VA1010EZ@"_WHERE)=""
88 S XMSUB="DG*5.3*597 Post-Installation Failure"
89 D ^XMD
90 K MSG,WHERE,XMZ,XMY,XMDUZ
91 Q
Note: See TracBrowser for help on using the repository browser.