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

YSDX3R.m

Go to the documentation of this file.
  1. YSDX3R ;SLC/DJP - Print of Diagnosis for the Mental Health Medical Record ;12/13/93 16:02
  1. ;;5.01;MENTAL HEALTH;**107**;Dec 30, 1994;Build 23
  1. ;
  1. ; Called from the top by MENU option YSDIAGP-DX
  1. ;D RECORD^YSDX0001("YSDX3R^YSDX3R") ;Used for testing. Inactivated in YSDX0001...
  1. ;
  1. ENTRY ;
  1. ;D RECORD^YSDX0001("ENTRY^YSDX3R") ;Used for testing. Inactivated in YSDX0001...
  1. W @IOF W !!?IOM-$L("PRINT OF DIAGNOSIS")\2,"PRINT OF DIAGNOSIS",!!
  1. D ^YSLRP I YSTOUT!YSUOUT!(YSDFN'>0) G END
  1. I '$D(^YSD(627.8,"AC",YSDFN)) W !!?10,"No diagnosis on file for ",YSNM G END
  1. QUES1 ;
  1. W !!,"SORT BY (D)IAGNOSIS or (C)HRONOLOGICALLY? D// " R A:DTIME S YSTOUT='$T,YSUOUT=A["^" I YSTOUT!YSUOUT G END
  1. S A=$E(A) S:A="" A="D" I A["?" W !!,"You may list diagnoses sequentially or by date.",!! G QUES1
  1. I "DdCc"'[A W " ?",! G QUES1
  1. QUES2 ;
  1. ;D RECORD^YSDX0001("QUES2^YSDX3R") ;Used for testing. Inactivated in YSDX0001...
  1. S %=0 F Q:$G(%) W !,"LIST ONLY ACTIVE DIAGNOSIS" S %=1 D
  1. .D YN^DICN I '% W !!,"You may list only active diagnoses or both active and inactive diagnoses.",!
  1. S:%=2 YSTY="ALL" I %=-1 G END
  1. S:'$D(YSTY) YSTY="ACT"
  1. DEVICE ;
  1. ;D RECORD^YSDX0001("DEVICE^YSDX3R") ;Used for testing. Inactivated in YSDX0001...
  1. K IOP S %ZIS="Q" D ^%ZIS I POP G END
  1. I $D(IO("Q")) S ZTRTN="ENPR^YSDX3R",(ZTSAVE("A"),ZTSAVE("YS*"))="",ZTDESC="YS DX PT" D ^%ZTLOAD G END
  1. ENPR ;Entry to core of print program.
  1. ;D RECORD^YSDX0001("ENPR^YSDX3R") ;Used for testing. Inactivated in YSDX0001...
  1. S YSFHDR="DIAGNOSIS LIST",YSFHDR(1)="W !!,""DSM/ICD 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
  1. PR ; Called from YSDX3RU
  1. ;D RECORD^YSDX0001("PR^YSDX3R") ;Used for testing. Inactivated in YSDX0001...
  1. 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
  1. D DXLS^YSDX3RUA G:YSTOUT!YSUOUT END D DX^YSDX3RU:"Dd"[A,CHR^YSDX3RU:"Cc"[A I YSTOUT!YSUOUT G END
  1. D AX4^YSDX3RUA G:YSTOUT!YSUOUT END D AX5^YSDX3RUA
  1. S YSCON=0 D:'$D(YSFFS) FINISH^YSDX3RU
  1. END ;
  1. ;D RECORD^YSDX0001("END^YSDX3R") ;Used for testing. Inactivated in YSDX0001...
  1. I $G(ZTSK) S ZTREQ="@"
  1. D KVAR^VADPT,^%ZISC
  1. K A,A1,A2,A3,A4,A5,A6,A7,A8,A9,G,G1,G2,G3,G4,G5,G6,G7,G8,G9
  1. K G10,G11,J,K,L,L1,L2,L3,L4,L5,L6,L7,L8,L9,L10,L11,M,W,X,Y,Y1
  1. K YSAX4,YSD3FLG,YSDIFLG,YSDXNN,YSDXN,YSML,YSMOD,YSDXDT
  1. K TOTSET,SUBSET,YSDFN,YSAUTH,YSCD,YSCOND,YSDOB,YSDTM,YSDXS
  1. K YSFHDR,YSFTR,YSGAF,YSLC,YSLFT,YSNM,YSPP,YSPS,YSSL,YSSSN
  1. K YSSTOP,YST,YSTM,YSTOP1,YSTOP2,YSTY,YSAGE,YSDUZ,YSSEX,YSQT
  1. K Z,Z1,YSLCN,YSCON,DIWR,DIWL,DIWF,YSFFS
  1. QUIT
  1. ;
  1. EOR ;YSDX3R - Print Diagnosis for Medical Record ;12/6/90 11:19