Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: IBOUTL

IBOUTL.m

Go to the documentation of this file.
  1. IBOUTL ;ALB/AAS - INTEGRATED BILLING OUTPUT UTILITY ROUTINE ; 8-MAR-91
  1. ;;Version 2.0 ; INTEGRATED BILLING ;; 21-MAR-94
  1. ;
  1. DATE ;
  1. ; -get beginning and ending dates
  1. ; -output in ibbdt - beginning date
  1. ; ibedt - ending date
  1. ;
  1. BDT ; -get beginning date
  1. S (IBBDT,IBEDT)=""
  1. S %DT="AEX",%DT("A")="Start with DATE: " D ^%DT K %DT G DATEQ:Y<0 S IBBDT=Y
  1. ;
  1. EDT ; -get ending date
  1. S %DT="EX" R !,"Go to DATE: ",X:DTIME S:X=" " X=IBBDT G DATEQ:(X="")!(X["^") D ^%DT G EDT:Y<0 S IBEDT=Y I Y<IBBDT W *7," ??",!,"ENDING DATE must follow BEGINNING DATE." G BDT
  1. ;
  1. DATEQ K %DT
  1. Q
  1. ;
  1. PAUSE Q:$E(IOST,1,2)'["C-"
  1. F IBJ=$Y:1:(IOSL-4) W !
  1. S DIR(0)="E" D ^DIR K DIR I $D(DIRUT)!($D(DUOUT)) S IBQUIT=1 K DIRUT,DTOUT,DUOUT
  1. Q
  1. ;
  1. DAT1(X,Y) ; Convert FM date to displayable (mm/dd/yy) format.
  1. ; -- optional output of time, if $g(y)
  1. N DATE,T
  1. S DATE=$S(X:$E(X,4,5)_"/"_$E(X,6,7)_"/"_$E(X,2,3),1:"")
  1. I $G(Y) S T="."_$E($P(X,".",2)_"000000",1,7) I T>0 S DATE=DATE_" "_$S($E(T,2,3)>12:$E(T,2,3)-12,$E(T,2,3)="00":"00",1:+$E(T,2,3))_":"_$E(T,4,5)_$S($E(T,2,5)>1200:" pm",1:" am")
  1. Q DATE
  1. ;
  1. DAT2(Y) ; Convert FM date to displayable (mmm dd yyyy) format
  1. N %
  1. Q:'$D(Y) "" D D^DIQ
  1. Q Y
  1. ;
  1. ACTNM(X) ; -input pointer to action type file (350.1)
  1. ; output printable name of action type
  1. S Y=$P($G(^IBE(350.1,+X,0)),"^",9) ;new action type
  1. Q $S($P($G(^IBE(350.1,+Y,0)),"^",8)]"":$P(^(0),"^",8),$P($G(^IBE(350.1,+X,0)),"^",8)]"":$P(^(0),"^",8),1:$P($G(^IBE(350.1,+X,0)),"^"))
  1. ;
  1. STOP(JOBDESC) ; Has a tasked job been requested to stop by the user?
  1. ; Input: JOBDESC -- Description of job to be printed
  1. ; Output: 0 -- Job has not been stopped
  1. ; 1 -- Job has been stopped
  1. ;
  1. ; If the job HAS been requested to stop, the Taskman flag ZTSTOP is
  1. ; set to 1. The check 'I $G(ZTSTOP)' can also be used in application
  1. ; code after calling this function, in the event that the function
  1. ; call is deeply nested.
  1. ;
  1. I $D(ZTQUEUED),$$S^%ZTLOAD S ZTSTOP=1 W !!?5,"'"_$S($D(JOBDESC):JOBDESC,1:"Unknown Task")_"' stopped at user's request..."
  1. Q $G(ZTSTOP)