IB20P363 ;ALB/SS - POST INIT ACTION ;22-FEB-2007
;;2.0;INTEGRATED BILLING;**363**;21-MAR-94;Build 35
;;Per VHA Directive 2004-038, this routine should not be modified.
;
Q
;
EN ;
I $$PATCH^XPDUTL("IB*2.0*363") D Q
. D MESSAGE("The post-install process has been skipped since")
. D MESSAGE("the patch was previously installed.")
. D SNDMAIL("IB*2.0*363 installation has been completed","The post-install process has been skipped since","the patch was previously installed.","")
D MESSAGE("Queuing IB*2.0*363 POST-INSTALL process")
N X,Y,%DT,ZTDESC,ZTSAVE,ZTIO,ZTDTH,ZTRTN
S X="N",%DT="ST"
D ^%DT
S ZTDTH=Y
S ZTIO=""
S ZTDESC="IB*2.0*363 POST INSTALL PROCESS"
S ZTSAVE("*")=""
S ZTRTN="EN1^IB20P363"
D ^%ZTLOAD
Q
;
EN1 ; post-install process itself
;D MESSAGE(">>> Populating the field #.09 E-PHARMACY DIVISION in the file #366.14")
;D MESSAGE(" Please wait...")
N IBIEN,IBEVIEN,IBZ,IBEPHARM,IBCNT,IBRXIEN,IBCNTOT,IBMSG0,IBMSG1,IBMSG2
S IBIEN=0,IBCNT=0,IBCNTOT=0
F S IBIEN=$O(^IBCNR(366.14,IBIEN)) Q:+IBIEN=0 D
. S IBEVIEN=0
. F S IBEVIEN=$O(^IBCNR(366.14,IBIEN,1,IBEVIEN)) Q:+IBEVIEN=0 D
. . S IBCNTOT=IBCNTOT+1
. . I $P($G(^IBCNR(366.14,IBIEN,1,IBEVIEN,0)),U,9)>0 Q
. . S IBZ=$G(^IBCNR(366.14,IBIEN,1,IBEVIEN,2))
. . S IBRXIEN=+IBZ
. . I 'IBRXIEN S IBRXIEN=+$P(IBZ,U,12)
. . S IBEPHARM=$$GETEPHRM^BPS01P5C($G(^IBCNR(366.14,IBIEN,0)),IBRXIEN,+$P(IBZ,U,3))
. . I IBEPHARM S $P(^IBCNR(366.14,IBIEN,1,IBEVIEN,0),U,9)=IBEPHARM,IBCNT=IBCNT+1
S IBMSG0=">>> Populating the field #.09 E-PHARMACY DIVISION in the file #366.14"
S IBMSG1=$S(IBCNT=1:">>> 1 record has been populated",1:">>> "_IBCNT_" records have been populated.")
S IBMSG2=$S(IBCNTOT=1:">>> 1 record has been examined",1:">>> "_IBCNTOT_" records have been examined.")
;D MESSAGE(IBMSG1)
;D MESSAGE(IBMSG2)
D SNDMAIL("IB*2.0*363 installation has been completed",IBMSG0,IBMSG1,IBMSG2)
Q
;display message
;IBMSG - message text
MESSAGE(IBMSG) ;
D BMES^XPDUTL(IBMSG)
Q
;send mail to the user
SNDMAIL(IBSUBJ,IBMESS1,IBMESS2,IBMESS3) ;
N DIFROM ;IMPORTANT - if you send e-mail from post-install process (queued or not) !!!
N IBTMPARR,XMDUZ,XMSUB,XMTEXT,XMY
S IBTMPARR(1)=""
S IBTMPARR(2)=IBMESS1
S IBTMPARR(3)=IBMESS2
S IBTMPARR(4)=IBMESS3
S IBTMPARR(5)=""
S XMSUB=IBSUBJ
S XMDUZ="INTEGRATED BILLING PACKAGE"
S XMTEXT="IBTMPARR("
S XMY(DUZ)=""
D ^XMD
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HIB20P363 2439 printed Nov 22, 2024@17:12:30 Page 2
IB20P363 ;ALB/SS - POST INIT ACTION ;22-FEB-2007
+1 ;;2.0;INTEGRATED BILLING;**363**;21-MAR-94;Build 35
+2 ;;Per VHA Directive 2004-038, this routine should not be modified.
+3 ;
+4 QUIT
+5 ;
EN ;
+1 IF $$PATCH^XPDUTL("IB*2.0*363")
Begin DoDot:1
+2 DO MESSAGE("The post-install process has been skipped since")
+3 DO MESSAGE("the patch was previously installed.")
+4 DO SNDMAIL("IB*2.0*363 installation has been completed","The post-install process has been skipped since","the patch was previously installed.","")
End DoDot:1
QUIT
+5 DO MESSAGE("Queuing IB*2.0*363 POST-INSTALL process")
+6 NEW X,Y,%DT,ZTDESC,ZTSAVE,ZTIO,ZTDTH,ZTRTN
+7 SET X="N"
SET %DT="ST"
+8 DO ^%DT
+9 SET ZTDTH=Y
+10 SET ZTIO=""
+11 SET ZTDESC="IB*2.0*363 POST INSTALL PROCESS"
+12 SET ZTSAVE("*")=""
+13 SET ZTRTN="EN1^IB20P363"
+14 DO ^%ZTLOAD
+15 QUIT
+16 ;
EN1 ; post-install process itself
+1 ;D MESSAGE(">>> Populating the field #.09 E-PHARMACY DIVISION in the file #366.14")
+2 ;D MESSAGE(" Please wait...")
+3 NEW IBIEN,IBEVIEN,IBZ,IBEPHARM,IBCNT,IBRXIEN,IBCNTOT,IBMSG0,IBMSG1,IBMSG2
+4 SET IBIEN=0
SET IBCNT=0
SET IBCNTOT=0
+5 FOR
SET IBIEN=$ORDER(^IBCNR(366.14,IBIEN))
if +IBIEN=0
QUIT
Begin DoDot:1
+6 SET IBEVIEN=0
+7 FOR
SET IBEVIEN=$ORDER(^IBCNR(366.14,IBIEN,1,IBEVIEN))
if +IBEVIEN=0
QUIT
Begin DoDot:2
+8 SET IBCNTOT=IBCNTOT+1
+9 IF $PIECE($GET(^IBCNR(366.14,IBIEN,1,IBEVIEN,0)),U,9)>0
QUIT
+10 SET IBZ=$GET(^IBCNR(366.14,IBIEN,1,IBEVIEN,2))
+11 SET IBRXIEN=+IBZ
+12 IF 'IBRXIEN
SET IBRXIEN=+$PIECE(IBZ,U,12)
+13 SET IBEPHARM=$$GETEPHRM^BPS01P5C($GET(^IBCNR(366.14,IBIEN,0)),IBRXIEN,+$PIECE(IBZ,U,3))
+14 IF IBEPHARM
SET $PIECE(^IBCNR(366.14,IBIEN,1,IBEVIEN,0),U,9)=IBEPHARM
SET IBCNT=IBCNT+1
End DoDot:2
End DoDot:1
+15 SET IBMSG0=">>> Populating the field #.09 E-PHARMACY DIVISION in the file #366.14"
+16 SET IBMSG1=$SELECT(IBCNT=1:">>> 1 record has been populated",1:">>> "_IBCNT_" records have been populated.")
+17 SET IBMSG2=$SELECT(IBCNTOT=1:">>> 1 record has been examined",1:">>> "_IBCNTOT_" records have been examined.")
+18 ;D MESSAGE(IBMSG1)
+19 ;D MESSAGE(IBMSG2)
+20 DO SNDMAIL("IB*2.0*363 installation has been completed",IBMSG0,IBMSG1,IBMSG2)
+21 QUIT
+22 ;display message
+23 ;IBMSG - message text
MESSAGE(IBMSG) ;
+1 DO BMES^XPDUTL(IBMSG)
+2 QUIT
+3 ;send mail to the user
SNDMAIL(IBSUBJ,IBMESS1,IBMESS2,IBMESS3) ;
+1 ;IMPORTANT - if you send e-mail from post-install process (queued or not) !!!
NEW DIFROM
+2 NEW IBTMPARR,XMDUZ,XMSUB,XMTEXT,XMY
+3 SET IBTMPARR(1)=""
+4 SET IBTMPARR(2)=IBMESS1
+5 SET IBTMPARR(3)=IBMESS2
+6 SET IBTMPARR(4)=IBMESS3
+7 SET IBTMPARR(5)=""
+8 SET XMSUB=IBSUBJ
+9 SET XMDUZ="INTEGRATED BILLING PACKAGE"
+10 SET XMTEXT="IBTMPARR("
+11 SET XMY(DUZ)=""
+12 DO ^XMD
+13 QUIT
+14 ;