source: FOIAVistA/trunk/r/CMOP-PSX/PSXMISC.m@ 1288

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

initial load of FOIAVistA 6/30/08 version

File size: 4.0 KB
Line 
1PSXMISC ;BIR/BAB,WPB-Miscellaneous Transmission Utilities ;02 Aug 2001 11:02AM
2 ;;2.0;CMOP;**23,27,30,38**;11 Apr 97
3 ;Reference to ^DIC(4.2 supported by DBIA #1966
4 ;Reference to ^VA(200 supported by DBIA #10060
5 ;Reference to File #59 supported by DBIA #1976
6TIMER ;
7 D NOW^%DTC S XX=$$FMADD^XLFDT(%,0,24,0,0),ZTDESC="CMOP Return Message Timer",ZTDTH=XX,ZTIO="PSX",ZTRTN="TIME^PSXMISC",ZTSAVE("XX")="",ZTSAVE("PSXBAT")="" D ^%ZTLOAD
8 K ZTDESC,ZTDTH,ZTRTN,%,X
9 Q
10 ;Called by Taskman to build Acknowledgment not Received Mail message
11TIME F XDUZ=0:0 S XDUZ=$O(^XUSEC("PSXCMOPMGR",XDUZ)) Q:XDUZ'>0 S XMY(XDUZ)=""
12 S ACKTM=$P($G(^PSX(550.2,PSXBAT,1)),U,1) I ACKTM="" D
13 .S PSXDUZ=$P($G(^PSX(550.2,PSXBAT,0)),U,5)
14 .S XMDUZ=.5,XMSUB=("CMOP Acknowledgement not Received"),LCNT=3
15 .N PSXMMDIV
16 .S PSXMMDIV=$$GET1^DIQ(550.2,PSXBAT,2,"I"),PSXMMDIV=$$GET1^DIQ(59,PSXMMDIV,.06)
17 .S XMSUB=PSXMMDIV_" "_XMSUB
18 .D XMZ^XMA2
19 .G:XMZ<1 TIME
20 .S ^XMB(3.9,XMZ,2,1,0)="An acknowledgment message for transmission # "_PSXBAT_" has not been"
21 .S ^XMB(3.9,XMZ,2,2,0)="received within the specified time. Please contact the CMOP facility"
22 .S ^XMB(3.9,XMZ,2,3,0)="to see if there is a problem."
23 .S ^XMB(3.9,XMZ,2,0)="^3.92A^"_LCNT_U_LCNT_U_DT,XMDUN="CMOP Manager"
24 .S XMDUZ=.5 D ENT1^XMD
25 S ZTREQ="@"
26 K XMZ,ZMSUB,ACKTM,PSXDUZ,Y,%,LCNT,XMDUN,XMDUZ,XMY
27 Q
28SERV S XX=$P($G(^PSX(550,+PSXSYS,0)),U,4),DOMAIN=$$GET1^DIQ(4.2,XX,.01)
29 D NOW^%DTC S DATE=% S SITE=$P(PSXSYS,U,2),NAME=$$GET1^DIQ(200,DUZ,.01),SITENM=$P(PSXSYS,U,3)
30 S ZMSG1="Schedule "_$S($G(PSXCS)=1:"CS ",1:"")_"Auto Transmission"
31 S ZMSG2="Unschedule "_$S($G(PSXCS)=1:"CS ",1:"")_"Auto Transmission"
32 S XMDUZ=.5,XMSUB=$S(PSXAUTO=1:ZMSG1,PSXAUTO=0:ZMSG2,1:""),LCNT=2
33 K ZMSG1,ZMSG2
34 D XMZ^XMA2 G:XMZ<1 SERV
35 S ^XMB(3.9,XMZ,2,1,0)="$$AUTO^"_PSXAUTO_"^"_PSXDATE_"^"_PSXHOUR_"^"_SITE_"^"_NAME_"^"_SITENM_"^"_THRU
36 S ^XMB(3.9,XMZ,2,2,0)="$$ENDAUTO"
37 S ^XMB(3.9,XMZ,2,0)="^3.92A^"_LCNT_"^"_LCNT_"^"_DT,XMDUN="CMOP Manager"
38 K XMY S XMDUZ=.5,XMY("S.PSXX CMOP SERVER@"_DOMAIN)="" D ENT1^XMD
39 K XX,DOMAIN,Y,%,SITE,XMSUB,LCNT,XMZ,XMDUN,XMDUZ,XMY,NAME,SITENM,DATE
40 Q
41AUTO ;Called by taskman to set/file automatic CMOP transmissions
42 S STAT=$P(XMRG,U,2),DATE=$P(XMRG,U,3),HOUR=$P($G(XMRG),U,4),SITE=$P(XMRG,U,5),XMSER="S."_XQSOP,TXMZ=XMZ,ROFF=$P(XMRG,U,6),SITENM=$P(XMRG,U,7),ZTREQ="@"
43 ;S X=SITE,DIC="4",DIC(0)="MOZX" S:$D(^PSX(552,"D",X)) X=$E(X,2,99) D ^DIC S SITN=+Y,THRU=$P(XMRG,U,8) K DIC,X,Y ;****DOD L1
44 S X=SITE,AGNCY="VASTANUM" S:$D(^PSX(552,"D",X)) X=$E(X,2,99),AGNCY="DMIS" S SITN=$$IEN^XUMF(4,AGNCY,X),THRU=$P(XMRG,U,8) K X,Y,AGNCY ;****DOD L1
45 S XX=$O(^PSX(552,"B",SITN,""))
46DOD ; entry for DOD and other agency interface to file auto scheduling information
47 S STDATE=$$FMTE^XLFDT(DATE,"1")
48 K DD,DO
49F S:'$D(^PSX(552,XX,1,0)) ^PSX(552,XX,1,0)="^552.01DA^^"
50 D NOW^%DTC
51 S DA(1)=XX,(DA,X)=%,DIC(0)="Z",DIC="^PSX(552,"_XX_",1,",DIC("DR")="1////"_$S(STAT=1:"3",STAT=0:"4",1:"")_";2////"_ROFF_";3////"_DATE_";5////"_HOUR D FILE^DICN G:$P(Y,U,3)'=1 F K DIC,DA,DA(1),DIC("DR"),X
52 I $G(TXMZ) S XMZ=TXMZ D REMSBMSG^XMA1C
53MSG S XMDUZ=.5,XMSUB="CMOP "_$S($G(PSXCS)=1:"CS ",1:"")_"Auto-Transmission Schedule, "_SITENM,LCNT=$S(STAT=0:"5",STAT=1:"7",1:"")
54 D XMZ^XMA2 G:XMZ<1 MSG
55 S ZMSG1="Cancel "_$S($G(PSXCS)=1:"CS ",1:"")_"Auto Transmission Schedule."
56 S ZMSG2=$S($G(PSXCS)=1:"CS ",1:"")_"Auto Transmission Schedule."
57 S ^XMB(3.9,XMZ,2,1,0)=$S(STAT=0:ZMSG1,STAT=1:ZMSG2,1:"")
58 S ^XMB(3.9,XMZ,2,2,0)=""
59 S ^XMB(3.9,XMZ,2,3,0)="Facility : "_SITENM
60 S ^XMB(3.9,XMZ,2,4,0)="Initiating Official : "_ROFF
61 S ^XMB(3.9,XMZ,2,5,0)=$S(STAT=0:"Cancellation Date : ",STAT=1:"Begin Automatic Transmissions : ",1:"")_$P(STDATE,":",1,2)
62 K ZMSG1,ZMSG2
63 I STAT=1 S ^XMB(3.9,XMZ,2,6,0)="Scheduling Frequency (hours) : "_HOUR
64 I STAT=1 S ^XMB(3.9,XMZ,2,7,0)="Number of days to transmit thru: "_$S($G(THRU)'>0:"Current date",1:$G(THRU))
65 S ^XMB(3.9,XMZ,2,0)="^3.92A^"_LCNT_U_LCNT_U_DT,XMDUN="CMOP Manager"
66 K XMY
67 S XMY(DUZ)="" ;****TESTING
68 S XMDUZ=.5 D GRP^PSXNOTE,ENT1^XMD Q
69 K STAT,DATE,HOUR,SITE,SITN,XMSER,TXMZ,XMZ,XQSOP,XQMSG,%,XX,SS,ROFF,STDATE,LCNT,SITENM
70 Q
Note: See TracBrowser for help on using the repository browser.