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

DIO2.m

Go to the documentation of this file.
DIO2 ;SFISC/GFT,TKW-PRINT ;15JAN2004
 ;;22.2;VA FileMan;;Jan 05, 2016;Build 42
 ;;Per VA Directive 6402, this routine should not be modified.
 ;;Submitted to OSEHRA 5 January 2015 by the VISTA Expertise Network.
 ;;Based on Medsphere Systems Corporation's MSC FileMan 1051.
 ;;Licensed under the terms of the Apache License, Version 2.0.
 ;
 S (DISTP,DILCT)=0
 I '$D(DICMX) S DICMX="D M^DIO2"
XDY I $D(DIBTPGM) D @("EN"_DIBTPGM),ENRLS^DIOZ(+$P(DIBTPGM,"^DISZ",2)) Q
 X DY(DN) G XDY:DN
 Q
 ;
SCR S DIO("SCR")=1,DE=0 I '$D(DIS(0)) G OR
 X DIS(0) Q:'$T  G PASS:'$D(DIS(1))
OR S DE=DE+1 I '$D(DIS(DE)) Q
 X DIS(DE) E  G OR
PASS S:'$D(DPQ) DIPASS=1
O F DLP=0:1:DX Q:'DN  X $S($D(DPQ):DX(DLP),1:^UTILITY($J,99,DLP))
TRAIL S:$D(DIOT) DIOT("D0")=$G(D0)
 Q
 ;
N W !
T I $X,IOT'="MT" W !
 I '$D(DIOT(2)),DN,$D(IOSL),$S('$D(DIWF):1,$P(DIWF,"B",2):$P(DIWF,"B",2),1:1)+$Y'<IOSL,$D(^UTILITY($J,1))#2,^(1)?1U1P1E.E X ^(1)
 S DISTP=DISTP+1,DILCT=DILCT+1 D:'(DISTP#100) CSTP
 Q
 ;
CSTP I $G(IOT)="SPL"!($G(IOT)="HFS") I '$D(DPQ),$$ROUEXIST^DILIBF("XUPARAM"),DILCT>$$KSP^XUPARAM("SPOOL LINES") D  Q
 . S DIFMSTOP=1,DN=0 S:$D(ZTQUEUED) ZTSTOP=1
 . W !,$$EZBLD^DIALOG(1519,$$KSP^XUPARAM("SPOOL LINES")),!! ;**CCO/NI SPOOL LINE MESSAGE ON OUTPUT
 I '$D(ZTQUEUED) K DISTOP Q
 Q:$G(DISTOP)=0  S:$G(DISTOP)="" DISTOP=1
 I DISTOP'=1 X DISTOP K:'$T DISTOP S DISTOP=$T Q:'$T
 Q:'$$S^%ZTLOAD
TASKSTOP W:$G(IO)]"" !,$$EZBLD^DIALOG($D(DPQ)>0+1528,ZTSK),!! S ZTSTOP=1,DN=0 Q  ;**CCO/NI  'TASK HAS BEEN STOPPED'
 ;
DT I $G(DDXPDATE) D DT^DDXP4 W DDXPY K DDXPY Q
 I $G(DUZ("LANG"))>1,Y W $$OUT^DIALOGU(Y,"DD") Q
 X ^DD("DD") ;**CCO/NI
 W Y Q
 ;
C S DQ(C)=Y
S S Q(C)=Y*Y+Q(C) S:L(C)>Y L(C)=Y S:H(C)<Y H(C)=Y
P S N(C)=N(C)+1
A S S(C)=S(C)+Y Q
 ;
DITTO(C,Y) D D Q Y
D I Y=$G(DITTO(C)) S Y="" Q
 S DITTO(C)=Y Q
 ;
CP S C="" F  S C=$O(CP(C)) Q:C=""  G DQ:'$D(DQ(C))
 S CP=CP+1 F  S C=$O(CP(C)),A="" Q:C=""  F  S A=$O(CP(A)) S CP(C,A)=DQ(C)*DQ(A)+CP(C,A) Q:A=C
DQ K DQ Q
 ;
H F DI=DI:1:DN I $D(^UTILITY($J,"H",DI)) X ^UTILITY($J,"H",DI) W:$X&($G(DIAR)'=4)&($G(DIAR)'=6) !
 Q
 ;
M X $S($D(DPQ):DX(DIXX),1:^UTILITY($J,99,DIXX))