[613] | 1 | PSIVVW1 ;BIR/PR-PRINT ACTIVITY LOG ;06 APR 97 / 5:47 PM
|
---|
| 2 | ;;5.0; INPATIENT MEDICATIONS ;**58,81**;16 DEC 97
|
---|
| 3 | ;
|
---|
| 4 | ; Reference to ^PS(55 is supported by DBIA# 2191
|
---|
| 5 | ;
|
---|
| 6 | ;Called at top from Patient Profile option
|
---|
| 7 | BEG ;Ask to view activity log
|
---|
| 8 | K PSIVLOG,PSIVLAB F Q=0:0 W !,"View activity log" S %=1 D YN^DICN Q:% S HELP="ACTLOG" D ^PSIVHLP
|
---|
| 9 | G:%<1 Q S:%=1 PSIVLOG=1
|
---|
| 10 | ;
|
---|
| 11 | BEG1 ;Ask to view label log
|
---|
| 12 | F Q=0:0 W !!,"View label log" S %=1 D YN^DICN Q:% S HELP="LABLOG" D ^PSIVHLP2
|
---|
| 13 | G:%<1 Q S:%=1 PSIVLAB=1 G ENPR
|
---|
| 14 | ;
|
---|
| 15 | EN ; Show activity, label, or history log.
|
---|
| 16 | D FULL^VALM1
|
---|
| 17 | S:'$D(ON55) ON55=ON
|
---|
| 18 | K DIR S DIR(0)="SOA^A:Activity Log;L:Label Log;H:History Log",DIR("A")="(A)ctivity (L)abel (H)istory: " D ^DIR K DIR G:$D(DIRUT) Q I Y="H" D ENHIS^PSJHIS(DFN,ON55,"V") G EN
|
---|
| 19 | K PSJHIS
|
---|
| 20 | D @$S(Y="A":"EN1",1:"DATA^PSIVLTR1(DFN,+ON55)") I $D(PSIVSCR),'$G(PSJDNE) D PAUSE
|
---|
| 21 | G EN
|
---|
| 22 | ;
|
---|
| 23 | ENPR ;Entry from profile.
|
---|
| 24 | D HOLDHDR^PSJOE
|
---|
| 25 | K PSJDNE I $D(PSIVLOG) D EN1 I $D(PSIVSCR),'$D(PSJDNE) D PAUSE
|
---|
| 26 | I '$D(PSJDNE),$D(PSIVLAB) D DATA^PSIVLTR1(DFN,+ON55) I $D(PSIVSCR),'$G(PSJDNE) D PAUSE
|
---|
| 27 | I $D(PSIVSCR) K DIR S DIR(0)="E" D ^DIR K DIR
|
---|
| 28 | ;
|
---|
| 29 | Q K %,COU,I,L,N,OG,P1,P17,PSIVX,USER
|
---|
| 30 | Q
|
---|
| 31 | ;
|
---|
| 32 | EN1 ;Entry for Inmed functionality and viewing the log from IV order entry
|
---|
| 33 | K PSJDNE S PSIVSCR=$E(IOST)="C"
|
---|
| 34 | I ON["P" D Q
|
---|
| 35 | . NEW AT,PN,PX,UD,OD
|
---|
| 36 | . S AT="S",PN=1,PX="" F Q=0:0 S Q=$O(^PS(53.1,+ON,"A",Q)) Q:'Q I $D(^(Q,0)) S AND=^(0) D:'(PN#6) NPAGE^PSGVW0 Q:PX["^" D AL1^PSGVW0
|
---|
| 37 | . W !
|
---|
| 38 | I '$O(^PS(55,DFN,"IV",+ON55,"A",0)) W !!,"No activity LOG to report." G Q
|
---|
| 39 | D HDR F JJ=0:0 S JJ=$O(^PS(55,DFN,"IV",+ON55,"A",JJ)) Q:'JJ!$G(PSJDNE) S P1=$G(^(JJ,0)),Y=+$P(P1,"^",5) D ACT
|
---|
| 40 | Q
|
---|
| 41 | ;
|
---|
| 42 | ACT ;This module is used for the screen profile
|
---|
| 43 | X ^DD("DD") W !,JJ,?3,$P(Y,"@")," ",$P(Y,"@",2),?24 S X=$$CODES^PSIVUTL($P(P1,"^",2),55.04,.02) W X
|
---|
| 44 | ;W ?50,$P(P1,"^",3),!?3,"Comment: ",$P(P1,"^",4) D PAUSE Q:$D(PSJDNE)
|
---|
| 45 | D NAME^PSJBCMA1($P(P1,U,6),.X) W ?50,X
|
---|
| 46 | W !?3,"Comment: ",$P(P1,"^",4) D PAUSE Q:$D(PSJDNE)
|
---|
| 47 | F A1=0:0 S A1=$O(^PS(55,DFN,"IV",+ON55,"A",JJ,1,A1)) Q:'A1!$D(PSJDNE) S P1=^(A1,0) D ACTW
|
---|
| 48 | W !
|
---|
| 49 | Q
|
---|
| 50 | ;
|
---|
| 51 | ACTW ;
|
---|
| 52 | W ! D PAUSE W !?10,"Field: '",$P(P1,"^"),"'" D PAUSE W !?3,"Changed from: '",$P(P1,"^",2),"'" D PAUSE W !?13,"To: '",$P(P1,"^",3),"'" D PAUSE
|
---|
| 53 | Q
|
---|
| 54 | PAUSE ;
|
---|
| 55 | I ($Y#IOSL)>18,PSIVSCR K DIR S DIR(0)="E" D ^DIR K DIR W !!! I $D(DUOUT)!$D(DTOUT) S (PSJS1,PSJS2,PSJS3,PSJS4)="~",(PSJDNE,PSJPR)=1
|
---|
| 56 | Q
|
---|
| 57 | ;
|
---|
| 58 | HDR W !!,"ACTIVITY LOG:",!,"#",?3,"DATE",?14,"TIME",?24,"REASON",?50,"USER",! F I=1:1:79 W "="
|
---|
| 59 | Q
|
---|
| 60 | ;
|
---|
| 61 | LOG1 ;This module is used for profile report. (hard printer copy usually)
|
---|
| 62 | Q
|
---|
| 63 | X ^DD("DD") W !,JJ,?3,$P(Y,"@")," ",$P(Y,"@",2),?24 S X=$$CODES^PSIVUTL($P(P1,"^",2),55.04,.02) W X
|
---|
| 64 | W ?50,$P(P1,"^",3),!?3,"Comment: ",$P(P1,"^",4) I ($Y#IOSL)>22,PSIVSCR D PAUSE
|
---|
| 65 | F PSIVX=0:0 S PSIVX=$O(^PS(55,DFN,"IV",+ON,"A",JJ,1,PSIVX)) Q:'PSIVX S P1=^(PSIVX,0) W !!?10,"Field: '",$P(P1,"^"),"'",!?3,"Changed from: '",$P(P1,"^",2),"'",!?13,"To: '",$P(P1,"^",3),"'" I ($Y#IOSL)>18,PSIVSCR D PAUSE
|
---|
| 66 | Q
|
---|
| 67 | ENLOG ;Entry for patient profile report OR patient purge report
|
---|
| 68 | ;Called from routine PSIVPR
|
---|
| 69 | S (ON,ON55)=PSJORD D HDR W:'$O(^PS(55,DFN,"IV",+ON,"A",0)) !!,"No activity LOG to report."
|
---|
| 70 | ;
|
---|
| 71 | K PSJDNE S PSIVSCR=$E(IOST)="C" F JJ=0:0 S JJ=$O(^PS(55,DFN,"IV",+ON,"A",JJ)) Q:'JJ!$D(PSJDNE) S P1=$S($D(^(JJ,0)):^(0),1:""),Y=+$P(P1,"^",5) D ACT
|
---|
| 72 | G Q
|
---|