VistA-FOIAVistA/r/MENTAL_HEALTH-YS-RUCL-YI-YT/YSPP7.m

27 lines
1.3 KiB
Mathematica

YSPP7 ;ALB/ASF-PATIENT PROFILE PHY EXAM ;4/20/92 13:06 ;
;;5.01;MENTAL HEALTH;;Dec 30, 1994
1 ;
S (YSIDT,YSYDT)=0,YSPE="PE",P="," F S YSIDT=$O(^MR(YSDFN,"PE","B",YSIDT)) Q:'YSIDT S YSYDT=YSIDT
S YSFHDR="Last Physical Exam <<section 8>>" I YSYDT=0 D:'$D(YSNOFORM) ENHD^YSFORM W !!!!!?5,"NO PHYSICALS ON FILE" G E
S YSIDT=9999999-YSYDT,DA=YSIDT,YSX="^YTX(3,1,"
D EN1^YSPROSE G:YSLFT END S YSX="^MR(YSDFN,YSPE,YSIDT,20," I $D(@(YSX_"1,0)")) D:$Y+4>YSPPL H G:YSLFT END W !!,"Impressions:",! D EN1^YSPROSE G:YSLFT END
S YSX="^MR(YSDFN,YSPE,YSIDT,19," I $D(@(YSX_"1,0)")) D:$Y+4>YSPPL H G:YSLFT END W !!,"Comments:",! D EN1^YSPROSE G:YSLFT END
D:$Y+4>YSPPL H G:YSLFT END W !!!! S X=$P(^MR(YSDFN,"PE",YSIDT,0),U,10) D PSIG^YSUTL W Y
E ;
Q:$D(YSNOFORM) D WAIT1^YSUTL:'YST&'YSLFT,ENFT^YSFORM:YST
END ;
F I=1:1:18 S X="V"_I K @X
K I,L,P,X,Y,YSAC,YSBLN,YSCC,YSCD,YSDOT,YSIDT,YSPE,YSPI,YSPPL,YSPST,YSPSV,YSPY,YSPZ,YSX,YSYDT,YSYN,Z S DA=YSDFN Q
H ;
I $D(YSNOFORM) D:'YST WAIT Q:YSLFT W @IOF Q
S:YST YSCON=1 D ENFT^YSFORM:YST,WAIT:'YST Q:YSLFT D:YST ENHD^YSFORM Q
WAIT ;
F I0=1:1:IOSL-$Y-2 W !
W:$Y+1<IOSL !
N DTOUT,DUOUT,DIRUT
S DIR(0)="E" D ^DIR K DIR S YSTOUT=$D(DTOUT),YSUOUT=$D(DUOUT),YSLFT=$D(DIRUT) W @IOF Q
;
ENCE ; Called indirectly from YSCEN31
;
S YST=$S(IOST?1"P".E:1,1:0),YSPPL=$S(YST:6,1:3),YSLFT=0 D ENPT^YSUTL G 1