source: FOIAVistA/trunk/r/MENTAL_HEALTH-YS-RUCL-YI-YT/YSMTI0.m@ 1801

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

initial load of FOIAVistA 6/30/08 version

File size: 2.0 KB
Line 
1YSMTI0 ;ALB.ASF-MUTLIPLE PSYCH TESTS FULL PROFILES ;7/23/99 10:36
2 ;;5.01;MENTAL HEALTH;**53**;Dec 30, 1994
3 K IOP S %ZIS="Q" D ^%ZIS Q:POP
4 I $D(IO("Q")) K IO("Q") S ZTRTN="ENTASK^YSMTI0",ZTDESC="YSMTI0" S ZTSAVE("YS*")="" D ^%ZTLOAD W !,$S($D(ZTSK):"QUEUED",1:"Not queued"),$C(7)
5 U IO D DATES,TOP,LP,HOME^%ZIS D ^%ZISC U IO
6 Q
7ENTASK ;taskman entry
8 S:$D(ZTQUEUED) ZTREQ="@"
9 D ENFRNT^YSMTI,TOP,LP Q
10TOP ;
11 S YSLN="",$P(YSLN,"_",79)=""
12 W @IOF,!?10,"**** M U L T I P L E T E S T A D M I N I S T R A T I O N S ***"
13 W !,VADM(1),?40,"SSN: ",$P(VADM(2),U,2)," ",$P(VADM(5),U,2),?60," DOB: ",$P(VADM(3),U,2)
14 S X=$P(^YTT(601,YSTEST,"P"),U) W !?(72-$L(X)/2),X
15 W !,YSLN
16 W !,"Scales",?15,"Administrations",!,YSLN,!?4
17 ;S Y=0 F I=1:1:8 S Y=$O(YSDATES(Y)) Q:Y'>0 W $J($$FMTE^XLFDT(9999999-Y,"2D"),9)
18 S Y=0 F I=1:1:8 S Y=$O(YSDATES(Y)) Q:Y'>0 W $J($$FMTE^XLFDT(9999999-Y,"5D"),10)
19 ;W !
20 Q
21DATES ;
22 S YSSNUMB=$P(^YTT(601,YSTEST,0),U),YSSNUMB=$S(YSSNUMB?1"MC".E:25,1:13)
23 K YSDATES S YSDATES=0 F S YSDATES=$O(^TMP("YSMTI",$J,YSDFN,YSTEST,1,YSDATES)) Q:YSDATES'>0 S YSDATES(9999999-YSDATES)=""
24 Q
25LP ;loop thru TMP
26 F YSCALEN=1:1:YSSNUMB W !,$J($P($P(^YTT(601,YSTEST,"S",YSCALEN,0),U,2)," "),5)," " D LP1
27 Q
28LP1 S YSDATES=0 F S YSDATES=$O(YSDATES(YSDATES)) Q:YSDATES'>0 S YSED=9999999-YSDATES D LP2
29 Q
30LP2 S Y=^TMP("YSMTI",$J,YSDFN,YSTEST,YSCALEN,YSED)
31 S S=$P(Y,U,2) W $J(S,6),?$X+3
32 Q
33FRONT ; front end output
34 S YSDFN=P3,(YSET,YSTEST)=P4 K ^TMP("YSMTI",$J)
35 S YSSNUMB=$P(^YTT(601,YSTEST,0),U),YSSNUMB=$S(YSSNUMB?1"MC".E:25,1:13)
36 D ENFRNT^YSMTI
37 W "11111<BOT>",$C(13)
38FOUT1 ;
39 F YSNSCALE=1:1:YSSNUMB D FOUT2
40 W "<EOT>",$C(13) Q
41FOUT2 S YSED=0 F S YSED=$O(^TMP("YSMTI",$J,YSDFN,YSET,YSNSCALE,YSED)) Q:YSED'>0 D FRONT1
42 Q
43FRONT1 S Y=^TMP("YSMTI",$J,YSDFN,YSET,YSNSCALE,YSED)
44 ;S Y1=$P(^YTT(601,YSET,0),U,1)_U_$E(YSED,4,5)_"/"_$E(YSED,6,7)_"/"_$E(YSED,2,3)_U_YSNSCALE_U_$P(Y,U,1)_U_$P(Y,U,2)
45 S Y1=$P(^YTT(601,YSET,0),U,1)_U_$$FMTE^XLFDT(YSED,"5ZD")_U_YSNSCALE_U_$P(Y,U,1)_U_$P(Y,U,2)
46 W Y1,$C(13)
47 Q
Note: See TracBrowser for help on using the repository browser.