1 | IB20P363 ;ALB/SS - POST INIT ACTION ;22-FEB-2007
|
---|
2 | ;;2.0;INTEGRATED BILLING;**363**;21-MAR-94;Build 35
|
---|
3 | ;;Per VHA Directive 2004-038, this routine should not be modified.
|
---|
4 | ;
|
---|
5 | Q
|
---|
6 | ;
|
---|
7 | EN ;
|
---|
8 | I $$PATCH^XPDUTL("IB*2.0*363") D Q
|
---|
9 | . D MESSAGE("The post-install process has been skipped since")
|
---|
10 | . D MESSAGE("the patch was previously installed.")
|
---|
11 | . D SNDMAIL("IB*2.0*363 installation has been completed","The post-install process has been skipped since","the patch was previously installed.","")
|
---|
12 | D MESSAGE("Queuing IB*2.0*363 POST-INSTALL process")
|
---|
13 | N X,Y,%DT,ZTDESC,ZTSAVE,ZTIO,ZTDTH,ZTRTN
|
---|
14 | S X="N",%DT="ST"
|
---|
15 | D ^%DT
|
---|
16 | S ZTDTH=Y
|
---|
17 | S ZTIO=""
|
---|
18 | S ZTDESC="IB*2.0*363 POST INSTALL PROCESS"
|
---|
19 | S ZTSAVE("*")=""
|
---|
20 | S ZTRTN="EN1^IB20P363"
|
---|
21 | D ^%ZTLOAD
|
---|
22 | Q
|
---|
23 | ;
|
---|
24 | EN1 ; post-install process itself
|
---|
25 | ;D MESSAGE(">>> Populating the field #.09 E-PHARMACY DIVISION in the file #366.14")
|
---|
26 | ;D MESSAGE(" Please wait...")
|
---|
27 | N IBIEN,IBEVIEN,IBZ,IBEPHARM,IBCNT,IBRXIEN,IBCNTOT,IBMSG0,IBMSG1,IBMSG2
|
---|
28 | S IBIEN=0,IBCNT=0,IBCNTOT=0
|
---|
29 | F S IBIEN=$O(^IBCNR(366.14,IBIEN)) Q:+IBIEN=0 D
|
---|
30 | . S IBEVIEN=0
|
---|
31 | . F S IBEVIEN=$O(^IBCNR(366.14,IBIEN,1,IBEVIEN)) Q:+IBEVIEN=0 D
|
---|
32 | . . S IBCNTOT=IBCNTOT+1
|
---|
33 | . . I $P($G(^IBCNR(366.14,IBIEN,1,IBEVIEN,0)),U,9)>0 Q
|
---|
34 | . . S IBZ=$G(^IBCNR(366.14,IBIEN,1,IBEVIEN,2))
|
---|
35 | . . S IBRXIEN=+IBZ
|
---|
36 | . . I 'IBRXIEN S IBRXIEN=+$P(IBZ,U,12)
|
---|
37 | . . S IBEPHARM=$$GETEPHRM^BPS01P5C($G(^IBCNR(366.14,IBIEN,0)),IBRXIEN,+$P(IBZ,U,3))
|
---|
38 | . . I IBEPHARM S $P(^IBCNR(366.14,IBIEN,1,IBEVIEN,0),U,9)=IBEPHARM,IBCNT=IBCNT+1
|
---|
39 | S IBMSG0=">>> Populating the field #.09 E-PHARMACY DIVISION in the file #366.14"
|
---|
40 | S IBMSG1=$S(IBCNT=1:">>> 1 record has been populated",1:">>> "_IBCNT_" records have been populated.")
|
---|
41 | S IBMSG2=$S(IBCNTOT=1:">>> 1 record has been examined",1:">>> "_IBCNTOT_" records have been examined.")
|
---|
42 | ;D MESSAGE(IBMSG1)
|
---|
43 | ;D MESSAGE(IBMSG2)
|
---|
44 | D SNDMAIL("IB*2.0*363 installation has been completed",IBMSG0,IBMSG1,IBMSG2)
|
---|
45 | Q
|
---|
46 | ;display message
|
---|
47 | ;IBMSG - message text
|
---|
48 | MESSAGE(IBMSG) ;
|
---|
49 | D BMES^XPDUTL(IBMSG)
|
---|
50 | Q
|
---|
51 | ;send mail to the user
|
---|
52 | SNDMAIL(IBSUBJ,IBMESS1,IBMESS2,IBMESS3) ;
|
---|
53 | N DIFROM ;IMPORTANT - if you send e-mail from post-install process (queued or not) !!!
|
---|
54 | N IBTMPARR,XMDUZ,XMSUB,XMTEXT,XMY
|
---|
55 | S IBTMPARR(1)=""
|
---|
56 | S IBTMPARR(2)=IBMESS1
|
---|
57 | S IBTMPARR(3)=IBMESS2
|
---|
58 | S IBTMPARR(4)=IBMESS3
|
---|
59 | S IBTMPARR(5)=""
|
---|
60 | S XMSUB=IBSUBJ
|
---|
61 | S XMDUZ="INTEGRATED BILLING PACKAGE"
|
---|
62 | S XMTEXT="IBTMPARR("
|
---|
63 | S XMY(DUZ)=""
|
---|
64 | D ^XMD
|
---|
65 | Q
|
---|
66 | ;
|
---|