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

YTEXT1.m

Go to the documentation of this file.
YTEXT1 ;SLC/TGA-PRINT COMMENTS ; 7/10/89  11:28 ;
 ;;5.01;MENTAL HEALTH;;Dec 30, 1994
 ;
 S %ZIS="Q",YSN=$P(A1(YSTEST),U),YSD=$P(A1(YSTEST),U,2)
 I $D(^YTT(601,"ATN","T",YSN)),'$D(^XUSEC("YSP",DUZ)) W !," You must hold the proper security key for this option." R I#1:DTIME Q
 D ^%ZIS I POP S YSLFT=1 Q
 I $D(IO("Q")) K IO("Q") S ZTRTN="ENP^YTEXT1",ZTSAVE("YS*")="",ZTDESC="YS COMMENT PRINT" D ^%ZTLOAD Q
ENP ;
 S Y=YSD,YSP0=$S(IOST?1"P".E:1,1:0),YSPF=$S(YSP0:8,1:3),YSLFT=0 D DD^%DT S YSFHDR="Staff Comments on "_YSN_" of "_Y U IO D ENHD^YSFORM
 S YSI=0 F  S YSI=$O(^YTD(601.2,YSDFN,1,YSET,1,YSED,"R","AD",YSI)) Q:'YSI  Q:YSLFT  S YSJ=0 F  S YSJ=$O(^YTD(601.2,YSDFN,1,YSET,1,YSED,"R","AD",YSI,YSJ)) Q:'YSJ  D P1 Q:YSLFT
 D ENFT^YSFORM:YSP0,WAIT^YSUTL:'YSP0&'YSLFT D KILL^%ZTLOAD,^%ZISC Q
P1 ;
 Q:'$D(^YTD(601.2,YSDFN,1,YSET,1,YSED,"R",YSJ,0))  S X=^(0),YSU=$P(X,U,4),YSU(1)=$P(X,U,3),YSES=$P(X,U,5) S Y=YSI ;Q:'YSU!(YSES=""&(DUZ'=YSU))  ;ENABLE PRINT OF ALL COMMENTS
 D DD^%DT D:$Y+YSPF+1>IOSL CK Q:YSLFT  W !!,Y S DIC="^YTD(601.2,YSDFN,1,YSET,1,YSED,""R"",YSJ,1,",DIWL=1,DIWR=80,DIWF="W",DWI="F D=1:1:DW2 S X="_DIC_"D,0) D:$Y+YSPF>IOSL CK Q:YSLFT  D ^DIWP"
 S Z=DIC_"0)",DW2=$P(@(Z),U,4) D:$Y+YSPF+1>IOSL CK Q:YSLFT  W !! X DWI Q:YSLFT  D ^DIWW D:YSPF+$Y>IOSL CK Q:YSLFT  W !,$P($G(^VA(200,+YSU,0)),U) I YSU'=YSU(1) W !,"  transcribed by: ",$P($G(^VA(200,+YSU(1),0)),U) Q
CK ;
 S:YSP0 YSCON=1 D ENFT^YSFORM:YSP0,WAIT^YSUTL:'YSP0 Q:YSLFT  D:YSP0 ENHD^YSFORM Q