source: WorldVistAEHR/trunk/r/MENTAL_HEALTH-YS-RUCL-YI-YT/YSDX3R.m@ 1313

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

initial load of WorldVistAEHR

File size: 2.6 KB
Line 
1YSDX3R ;SLC/DJP-Print of Diagnosis for the Mental Health Medical Record ;12/13/93 16:02
2 ;;5.01;MENTAL HEALTH;;Dec 30, 1994
3 ;
4 ; Called from the top by MENU option YSDIAGP-DX
5 ;D RECORD^YSDX0001("YSDX3R^YSDX3R") ;Used for testing. Inactivated in YSDX0001...
6 ;
7ENTRY ;
8 ;D RECORD^YSDX0001("ENTRY^YSDX3R") ;Used for testing. Inactivated in YSDX0001...
9 W @IOF W !!?IOM-$L("PRINT OF DIAGNOSIS")\2,"PRINT OF DIAGNOSIS",!!
10 D ^YSLRP I YSTOUT!YSUOUT!(YSDFN'>0) G END
11 I '$D(^YSD(627.8,"AC",YSDFN)) W !!?10,"No diagnosis on file for ",YSNM G END
12QUES1 ;
13 W !!,"SORT BY (D)IAGNOSIS or (C)HRONOLOGICALLY? D// " R A:DTIME S YSTOUT='$T,YSUOUT=A["^" I YSTOUT!YSUOUT G END
14 S A=$E(A) S:A="" A="D" I A["?" W !!,"You may list diagnoses sequentially or by date.",!! G QUES1
15 I "DdCc"'[A W " ?",! G QUES1
16QUES2 ;
17 ;D RECORD^YSDX0001("QUES2^YSDX3R") ;Used for testing. Inactivated in YSDX0001...
18 S %=0 F Q:$G(%) W !,"LIST ONLY ACTIVE DIAGNOSIS" S %=1 D
19 .D YN^DICN I '% W !!,"You may list only active diagnoses or both active and inactive diagnoses.",!
20 S:%=2 YSTY="ALL" I %=-1 G END
21 S:'$D(YSTY) YSTY="ACT"
22DEVICE ;
23 ;D RECORD^YSDX0001("DEVICE^YSDX3R") ;Used for testing. Inactivated in YSDX0001...
24 K IOP S %ZIS="Q" D ^%ZIS I POP G END
25 I $D(IO("Q")) S ZTRTN="ENPR^YSDX3R",(ZTSAVE("A"),ZTSAVE("YS*"))="",ZTDESC="YS DX PT" D ^%ZTLOAD G END
26ENPR ;Entry to core of print program.
27 ;D RECORD^YSDX0001("ENPR^YSDX3R") ;Used for testing. Inactivated in YSDX0001...
28 S YSFHDR="DIAGNOSIS LIST",YSFHDR(1)="W !!,""DSM/ICD9 TITLE"" X YSFHDR(2),YSFHDR(3)",YSFHDR(2)="I YSTY=""ACT"" W ?25,""**** Only Active Diagnosis ****""",YSFHDR(3)="W !,""STATUS"",?10,""DATE""" S YSPP=0
29PR ; Called from YSDX3RU
30 ;D RECORD^YSDX0001("PR^YSDX3R") ;Used for testing. Inactivated in YSDX0001...
31 U IO D:'$D(YSNOFORM) ENHD^YSFORM S Y1=0,YST=$S(IOST?1"P".E:1,1:0),YSSL=$S(YST:8,1:3),YSLFT=0
32 D DXLS^YSDX3RUA G:YSTOUT!YSUOUT END D DX^YSDX3RU:"Dd"[A,CHR^YSDX3RU:"Cc"[A I YSTOUT!YSUOUT G END
33 D AX4^YSDX3RUA G:YSTOUT!YSUOUT END D AX5^YSDX3RUA
34 S YSCON=0 D:'$D(YSFFS) FINISH^YSDX3RU
35END ;
36 ;D RECORD^YSDX0001("END^YSDX3R") ;Used for testing. Inactivated in YSDX0001...
37 I $G(ZTSK) S ZTREQ="@"
38 D KVAR^VADPT,^%ZISC
39 K A,A1,A2,A3,A4,A5,A6,A7,A8,A9,G,G1,G2,G3,G4,G5,G6,G7,G8,G9
40 K G10,G11,J,K,L,L1,L2,L3,L4,L5,L6,L7,L8,L9,L10,L11,M,W,X,Y,Y1
41 K YSAX4,YSD3FLG,YSDIFLG,YSDXNN,YSDXN,YSML,YSMOD,YSDXDT
42 K TOTSET,SUBSET,YSDFN,YSAUTH,YSCD,YSCOND,YSDOB,YSDTM,YSDXS
43 K YSFHDR,YSFTR,YSGAF,YSLC,YSLFT,YSNM,YSPP,YSPS,YSSL,YSSSN
44 K YSSTOP,YST,YSTM,YSTOP1,YSTOP2,YSTY,YSAGE,YSDUZ,YSSEX,YSQT
45 K Z,Z1,YSLCN,YSCON,DIWR,DIWL,DIWF,YSFFS
46 QUIT
47 ;
48EOR ;YSDX3R - Print Diagnosis for Medical Record ;12/6/90 11:19
Note: See TracBrowser for help on using the repository browser.