source: WorldVistAEHR/trunk/r/INPATIENT_MEDICATIONS-PSJ-PSIV-PSG--PSGW/PSJHIS.m@ 1141

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

initial load of WorldVistAEHR

File size: 2.0 KB
Line 
1PSJHIS ;BIR/MLM-PRINT HISTORY LOG ;23 SEP 97 / 1:10 PM
2 ;;5.0; INPATIENT MEDICATIONS ;**64**;16 DEC 97
3 ;
4 ; Reference to ^PS(55 is supported by DBIA 2191.
5 ; Reference to ^%ZTLOAD is supported by DBIA 10063.
6 ; Reference to ^%DTC is supported by DBIA 10000.
7 ; Reference to ^%ZIS is supported by DBIA 10086.
8 ; Reference to ^%ZISC is supported by DBIA 10089.
9 ; Reference to ^DIR is supported by DBIA 10026.
10 ;
11ENHIS(DFN,PSJHON,PSJHT) ; History log from beginning.
12 W ! K IO("Q"),%ZIS,IOP S %ZIS="QM" D ^%ZIS I POP W !,"NO DEVICE SELECTED OR REPORT PRINTED" G K
13 G:'$D(IO("Q")) DEQ K IO("Q"),ZTDTH,ZTSAVE,ZTSK S ZTIO=ION,ZTRTN="DEQ^PSJHIS" F X="DFN","PSJHON","PSJHT","PSJORD","PSJSYSU","PSJSYSP" S ZTSAVE(X)="",ZTDESC="INPATIENT HISTORY LOG"
14 D ^%ZTLOAD W:$D(ZTSK) !,"Queued."
15 D HOME^%ZIS
16 Q
17 ;
18DEQ ; Entry from queue.
19 N DIR,DONE,DTOUT,DUOUT,HDT,ON,ON55,P,PG,PPAGE,PSGORD,PSIVAC,PSJACNWP,PSJNEW,PSJPTR,UL80
20 S PSGP=DFN,PSJACNWP=1 D ENBOTH^PSJAC,NOW^%DTC S UL80="",$P(UL80,"-",80)="",HDT=$$ENDTC^PSGMI(%),PSJPTR=$E(IOST)'="C",PG=0,ON=PSJHON,PSIVAC="PH" U IO
21 D RELATE,ENHEAD:PSJPTR W:'PSJPTR&($Y) @IOF I '$L(PSJOLD_PSJNEW) W !!,?27,"No History Log to Report." G K
22 S:'PSJOLD PSJOLD=PSJHON F S ON=PSJOLD D RELATE Q:PSJOLD=""
23 F D DISPLAY,PAUSE:'PSJPTR,RELATE S ON=PSJNEW Q:PSJNEW=""!$D(DONE)
24 ;
25K ; Kill and exit.
26 K DFN,PSJHON,PSJHT
27 W:$G(PSJPTR)&($Y) @IOF S:$D(ZTQUEUED) ZTREQ="@" D ^%ZISC
28 Q
29 ;
30DISPLAY ; Display order.
31 I ON["V" S (ON55,PSJORD)=ON D GT55^PSIVORFB,ENNH^PSIVORV2(ON) Q
32 I ON["P",($P($G(^PS(53.1,+ON,0)),U,4)="F"!(PSJHT="V")) D GT531^PSIVORFA(DFN,ON),ENNH^PSIVORV2(ON) Q
33 S PSGORD=ON N PSJLM D EN2^PSGVW
34 Q
35 ;
36PAUSE ; Hold screen.
37 K DIR S DIR(0)="E" D ^DIR S:$D(DTOUT)!($D(DUOUT)) DONE=1
38 Q
39RELATE ; Get related order.
40 I ON["U"!(ON["A")!(ON["O") S PSJOLD=$P($G(^PS(55,DFN,5,+ON,0)),U,25),PSJNEW=$P($G(^(0)),U,26) Q
41 I ON["V" S PSJOLD=$P($G(^PS(55,DFN,"IV",+ON,2)),U,5),PSJNEW=$P($G(^(2)),U,6) Q
42 S PSJOLD=$P($G(^PS(53.1,+ON,0)),U,25),PSJNEW=$P($G(^(0)),U,26)
43 Q
44 ;
45ENHEAD ; Header for Inpatient History log.
46 S PPAGE=0 NEW PSJNEW D ENTRY^PSJHEAD(PSGP,0,0,0,0)
47 Q
Note: See TracBrowser for help on using the repository browser.