source: FOIAVistA/trunk/r/MENTAL_HEALTH-YS-RUCL-YI-YT/YTEXT1.m@ 1397

Last change on this file since 1397 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 1.4 KB
Line 
1YTEXT1 ;SLC/TGA-PRINT COMMENTS ; 7/10/89 11:28 ;
2 ;;5.01;MENTAL HEALTH;;Dec 30, 1994
3 ;
4 S %ZIS="Q",YSN=$P(A1(YSTEST),U),YSD=$P(A1(YSTEST),U,2)
5 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
6 D ^%ZIS I POP S YSLFT=1 Q
7 I $D(IO("Q")) K IO("Q") S ZTRTN="ENP^YTEXT1",ZTSAVE("YS*")="",ZTDESC="YS COMMENT PRINT" D ^%ZTLOAD Q
8ENP ;
9 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
10 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
11 D ENFT^YSFORM:YSP0,WAIT^YSUTL:'YSP0&'YSLFT D KILL^%ZTLOAD,^%ZISC Q
12P1 ;
13 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
14 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"
15 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
16CK ;
17 S:YSP0 YSCON=1 D ENFT^YSFORM:YSP0,WAIT^YSUTL:'YSP0 Q:YSLFT D:YSP0 ENHD^YSFORM Q
Note: See TracBrowser for help on using the repository browser.