source: WorldVistAEHR/trunk/r/INPATIENT_MEDICATIONS-PSJ-PSIV-PSG--PSGW/PSGDS.m@ 731

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

initial load of WorldVistAEHR

File size: 1.9 KB
Line 
1PSGDS ;BIR/CML3-DISCHARGE ORDERS ;21 JUL 94 / 3:12 PM
2 ;;5.0; INPATIENT MEDICATIONS ;;16 DEC 97
3 N PSJNEW,PSGPTMP,PPAGE S PSJNEW=1
4 ;
5 D ENCV^PSGSETU I $D(XQUIT) Q
6 W ! S DIR(0)="Y",DIR("A")="Print BLANK Authorized Absence/Discharge Summary forms",DIR("B")="NO"
7 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""."
8 D ^DIR K DIR Q:Y["^" S PSGBLANK=Y K ^TMP("PSGDS",$J)
9 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
10 ;
11DONE ;
12 D ENKV^PSGSETU K CA,CML,CNTR,DIAG,ELIG,I1,I2,I3,PSGAP,PSGAPWD,PSGAPWDN,PSGAPWG,PSGAPWGN,PSGBLANK,PSGDICA,PSGPAT,PSJSEL,PSGSSH,T,N
13 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
14 ;
15G ; get ward group
16 S PSGAPWG=+PSJSEL("WG"),PSGAPWGN=$P(PSJSEL("WG"),"^",2) Q
17 ;
18W ; get ward
19 S PSGAPWD=+PSJSEL("W"),PSGAPWDN=$P(PSJSEL("W"),"^",2) Q
20 ;
21P ; get patient
22 N PAT S PAT="" F S PAT=$O(PSJSEL("P",PAT)) Q:PAT="" S PSGPAT(PAT)=$O(PSJSEL("P",PAT,PSGP))
23 K PSGDICA Q
24 ;
25ENOR ;
26 D ENCV^PSGSETU I '$D(XQUIT) S PSGPAT(PSGP)=+ORVP,PSJSEL("SELECT")="P",(PSGAPWD,PSGAPWDN,PSGAPWG,PSGAPWGN)="" D EN^PSGDS0
27 G DONE
28 ;
29DTM ;
30 S Y=%DT(0) D D^DIQ S T=$P(Y,"@",2),Y=$P(Y,",")
31 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."
32 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."
33 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
Note: See TracBrowser for help on using the repository browser.