VistA-WorldVistAEHR/r/MAILMAN-XM/XMJMBULL.m

52 lines
1.6 KiB
Mathematica

XMJMBULL ;ISC-SF/GMB-Manual Bulletin ;08/08/2000 14:11
;;8.0;MailMan;;Jun 28, 2002
; Replaces BULL^XMB (ISC-WASH/THM/RWF/CAP)
; Entry points used by MailMan options (not covered by DBIA):
; BULLETIN XMPOST
BULLETIN ; Manually post a bulletin
N XMBIEN,XMBNAME,XMPARM,XMINSTR,XMABORT
S XMABORT=0
D WHICH(.XMBIEN,.XMBNAME,.XMABORT) Q:XMABORT
D GETPARMS(XMBIEN,.XMPARM,.XMINSTR,.XMABORT) Q:XMABORT
D BULLETIN^XMKPO($G(XMDUZ,DUZ),XMBNAME,XMBIEN,.XMPARM,"","",.XMINSTR)
Q
WHICH(XMBIEN,XMBNAME,XMABORT) ;
N DIC
S DIC(0)="AEQM",DIC="^XMB(3.6,"
D ^DIC I Y=-1 S XMABORT=1 Q
S XMBIEN=+Y
S XMBNAME=$P(Y,U,2)
Q
GETPARMS(XMBIEN,XMPARM,XMINSTR,XMABORT) ;
N I,XMREC,XMI,DIR,Y,X,DIRUT,XMNOW
S I=0
F S I=$O(^XMB(3.6,XMBIEN,1,I)) Q:'I D Q:XMABORT
. S XMREC=^XMB(3.6,XMBIEN,1,I,0)
. W !,XMREC
. F Q:XMREC'?.E1"|".N1"|".E D Q:XMABORT
. . S XMI=+$P(XMREC,"|",2)
. . S XMREC=$P(XMREC,"|",1)_$P(XMREC,"|",3,999)
. . I XMI<0!(XMI>100) D Q
. . . S XMABORT=1
. . . W !,$$EZBLD^DIALOG(34661,XMI) ; '|1|' is not a valid parameter. Aborting!
. . Q:$D(XMPARM(XMI))
. . S DIR("A")=$$EZBLD^DIALOG(34660,XMI) ; Enter parameter |1|
. . S DIR(0)="F^1:30"
. . S DIR("??")="^D HELP^XMJMBULL"
. . D ^DIR I $D(DIRUT) S XMABORT=1 Q
. . S XMPARM(XMI)=Y
Q:XMABORT
S DIR("A")=$$EZBLD^DIALOG(34662) ; When do you want to send the bulletin?"
S XMNOW=$$EZBLD^DIALOG(37007) ; NOW
S DIR("B")=XMNOW
S DIR(0)="DA^NOW::EFTX"
D ^DIR I $D(DIRUT) S XMABORT=1 Q
S:X'=XMNOW XMINSTR("LATER")=Y
Q
HELP ;
I '$D(^XMB(3.6,XMBIEN,4,XMI,1,1,0)) Q
N I
S I=0
F S I=$O(^XMB(3.6,XMBIEN,4,XMI,1,I)) Q:'I W !,^(I,0)
Q