source: WorldVistAEHR/trunk/r/INPATIENT_MEDICATIONS-PSJ-PSIV-PSG--PSGW/PSGVW0.m@ 1766

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

initial load of WorldVistAEHR

File size: 1.7 KB
Line 
1PSGVW0 ;BIR/CML3-SHOWS ACTIVITY LOG ;16 DEC 97 / 1:38 PM
2 ;;5.0; INPATIENT MEDICATIONS ;**49,54,85**;16 DEC 97
3 ;
4 ; Reference to ^PS(55 is supported by DBIA 2191
5 ;
6 F R !!,"Show LONG, SHORT, or NO activity log? N// ",AT:DTIME D ALC Q:Q
7 Q:"^N"[AT S PN=1,PX="" F Q=0:0 S Q=$O(@(F_"9,"_Q_")")) Q:'Q I $D(^(Q,0)) S AND=^(0) D:'(PN#6) NPAGE Q:PX["^" D AL1
8 Q
9AL1 S PN=PN+1,UD=$P(AND,"^",3) I AT="S",UD?4N,$E(UD)=6,UD#6000 Q
10 W !!?4,"Date: ",$$ENDTC^PSGMI(+AND) W:$S(UD'?4N:1,1:$E(UD,1,2)'=10) ?30,"User: ",$$ENNPN^PSGMI($P(AND,"^",2))
11 W !,"Activity: ORDER ",$S(UD="":"****",'$D(^PS(53.3,UD,0)):UD,$P(^(0),"^")]"":$P(^(0),"^"),1:UD)
12AL2 I UD?4N,$E(UD)=6 W !?3,"Field: ",$P(AND,"^",4) S OD=$P(AND,"^",5) I OD>2000000,$P(OD,".",2) S OD=$$ENDTC^PSGMI(OD)
13 I UD?4N,$E(UD)=6 W !,"Old Data: ",OD
14 I UD?4N,$E(UD)=7,$P(AND,"^",4)]"" W !?3,"Field: ",$P(AND,"^",4)
15 Q
16NPAGE I $E(IOST)="C" R !!,"Enter '^' to stop, or press RETURN to continue.",PX:DTIME
17 Q
18ALC ;
19 S Q=1 W:'$T $C(7) I AT["^"!'$T S AT="^" Q
20 I AT="" W " (NO)" S AT="N" Q
21 F PX="SHORT","LONG","NO" I $P(PX,AT)="" W $P(PX,AT,2) S AT=$E(AT) Q
22 Q:$T S Q=0 I AT'["?" W $C(7)," ??" Q
23 W !!,"Enter 'LONG' (or 'L') to see ALL of the entries of this activity log. Enter 'SHORT' (or 'S') to NOT see the fields edited because of the order being",!,"renewed, discontinued, etc. Simply press the RETURN key "
24 W "(or enter 'NO', 'N',",!,"or '^') to NOT see the activity log." Q
25 ;
26ENA ;
27 I PSGORD["U" S PN=1,PX="" F Q=0:0 S Q=$O(^PS(55,PSGP,5,+PSGORD,9,Q)) Q:'Q I $D(^(Q,0)) S AND=^(0) D:'(PN#6) NPAGE Q:PX["^" D AL1
28 I PSGORD["P" S PN=1,PX="" F Q=0:0 S Q=$O(^PS(53.1,+PSGORD,"A",Q)) Q:'Q I $D(^(Q,0)) S AND=^(0) D:'(PN#6) NPAGE Q:PX["^" D AL1
29 Q
Note: See TracBrowser for help on using the repository browser.