1 | SCCVLOG2 ;ALB/RMO,TMP - Scheduling Conversion Log Utilities - Bulletin; [ 05/12/95 13:59 PM ]
|
---|
2 | ;;5.3;Scheduling;**211**;Aug 13, 1993
|
---|
3 | ;
|
---|
4 | SEND(SCLOG,SCACT) ;Send conversion bulletin
|
---|
5 | ; Input -- SCLOG CST ien
|
---|
6 | ; SCACT Action
|
---|
7 | ; Output -- None
|
---|
8 | N C,SCACTD,SCLNE,SCLOG0,SCLOG1,SCLOG2,SCTXT,X,Y
|
---|
9 | S SCLOG0=$G(^SD(404.98,SCLOG,0)),SCLOG1=$G(^(1)),SCLOG2=$G(^(2))
|
---|
10 | S Y=$$EXPAND^SCCVDSP2(404.9875,.02,SCACT)
|
---|
11 | S SCACTD=$E(Y,1)_$$LOW^XLFSTR($E(Y,2,$L(Y)))
|
---|
12 | S XMSUB="Scheduling Conversion Template #"_SCLOG_" - Event "_SCACTD
|
---|
13 | S XMDUZ=.5,XMY(DUZ)=""
|
---|
14 | S XMTEXT="SCTXT(",SCLNE=0
|
---|
15 | S X="The conversion event has been '"_SCACTD_"'." D SET
|
---|
16 | S X=" " D SET
|
---|
17 | S Y=$$EXPAND^SCCVDSP2(404.98,.05,$P(SCLOG0,U,5))
|
---|
18 | S X=" Conversion Event: "_$E(Y,1)_$$LOW^XLFSTR($E(Y,2,$L(Y))) D SET
|
---|
19 | S X=" " D SET
|
---|
20 | S Y=$P(SCLOG0,U,3) D D^DIQ
|
---|
21 | S X=" Start Date: "_Y D SET
|
---|
22 | S Y=$P(SCLOG0,U,4) D D^DIQ
|
---|
23 | S X=" End Date: "_Y D SET
|
---|
24 | S X=" " D SET
|
---|
25 | S X=" # encounters - converted: "_+$P(SCLOG1,U,2) D SET
|
---|
26 | S X=" - not converted: "_+$P(SCLOG2,U,6) D SET
|
---|
27 | S X=" Total # of errors logged : "_+$P(SCLOG1,U,5) D SET
|
---|
28 | ;
|
---|
29 | I $O(^SD(404.98,SCLOG,"ERROR",0)) D
|
---|
30 | . S Y=+$P($G(^SD(404.98,SCLOG,"R",+$$LSTREQ^SCCVLOG(SCLOG),0)),U,7)
|
---|
31 | . Q:'Y
|
---|
32 | . S X=" " D SET
|
---|
33 | . S X=Y_" error"_$S(Y>1:"s were",1:" was")_" encountered during this conversion run." D SET
|
---|
34 | . S X="For details, review the 'Error Log' in the 'View Template' action." D SET
|
---|
35 | ;
|
---|
36 | D ^XMD
|
---|
37 | K XMSUB,XMDUZ,XMTEXT,XMY
|
---|
38 | Q
|
---|
39 | ;
|
---|
40 | SET ;Set message text
|
---|
41 | S SCLNE=SCLNE+1,SCTXT(SCLNE,0)=X
|
---|
42 | Q
|
---|