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

PSGDS.m

Go to the documentation of this file.
  1. PSGDS ;BIR/CML3-DISCHARGE ORDERS ;21 JUL 94 / 3:12 PM
  1. ;;5.0; INPATIENT MEDICATIONS ;;16 DEC 97
  1. N PSJNEW,PSGPTMP,PPAGE S PSJNEW=1
  1. ;
  1. D ENCV^PSGSETU I $D(XQUIT) Q
  1. W ! S DIR(0)="Y",DIR("A")="Print BLANK Authorized Absence/Discharge Summary forms",DIR("B")="NO"
  1. S DIR("?",1)="Answer ""Yes"" if you want the report to print Authorized Absence/",DIR("?",2)="Discharge Summary forms for patients with no orders. Otherwise,",DIR("?")="enter ""No""."
  1. D ^DIR K DIR Q:Y["^" S PSGBLANK=Y K ^TMP("PSGDS",$J)
  1. S (PSGP,PSGAPWD,PSGAPWG)=0,(PSGAPWDN,PSGAPWGN)="",PSGSSH="GENERIC" S PSGPTMP=0,PPAGE=1 D GWP^PSJPDIR Q:'$D(PSJSEL) D @PSJSEL("SELECT"),EN^PSGDS0
  1. ;
  1. DONE ;
  1. D ENKV^PSGSETU K CA,CML,CNTR,DIAG,ELIG,I1,I2,I3,PSGAP,PSGAPWD,PSGAPWDN,PSGAPWG,PSGAPWGN,PSGBLANK,PSGDICA,PSGPAT,PSJSEL,PSGSSH,T,N
  1. K LQ,ST,STT,STP,DF,DO,DRG,FD,NC,ND,ND2,NF,NP,PSJJORD,PSJOPC,PN,RB,RTE,SD,SI,SM,ST,STRT,VAEL,PSJACNWP,DDRG,^TMP("PSGDS",$J) Q
  1. ;
  1. G ; get ward group
  1. S PSGAPWG=+PSJSEL("WG"),PSGAPWGN=$P(PSJSEL("WG"),"^",2) Q
  1. ;
  1. W ; get ward
  1. S PSGAPWD=+PSJSEL("W"),PSGAPWDN=$P(PSJSEL("W"),"^",2) Q
  1. ;
  1. P ; get patient
  1. N PAT S PAT="" F S PAT=$O(PSJSEL("P",PAT)) Q:PAT="" S PSGPAT(PAT)=$O(PSJSEL("P",PAT,PSGP))
  1. K PSGDICA Q
  1. ;
  1. ENOR ;
  1. D ENCV^PSGSETU I '$D(XQUIT) S PSGPAT(PSGP)=+ORVP,PSJSEL("SELECT")="P",(PSGAPWD,PSGAPWDN,PSGAPWG,PSGAPWGN)="" D EN^PSGDS0
  1. G DONE
  1. ;
  1. DTM ;
  1. S Y=%DT(0) D D^DIQ S T=$P(Y,"@",2),Y=$P(Y,",")
  1. W !!?2,"If a ",N," date is entered, a discharge summary will print for only those",!,"patients that have at least one active order with a ",$S(N["A":"STOP",1:"START")," DATE on or ",$S(N["A":"after",1:"before"),!,"the ",N," date entered."
  1. W !?2,"Entry is not required. If neither date is entered, all patients with active",!,"orders will print (for the ward(s) chosen). Enter an up-arrow (^) to exit."
  1. W !?2,"If you wish to enter a ",$S(N["A":"start",1:"stop")," date of ",Y,", you must enter a TIME of day",!,"of ",T," or greater. Any date after ",Y," does not need time entered.",! S Y=-1 Q