source: WorldVistAEHR/trunk/r/OUTPATIENT_PHARMACY-PSO-APSP-HUIP/PSOLMUTL.m@ 1073

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

revised back to 6/30/08 version

File size: 3.3 KB
RevLine 
[623]1PSOLMUTL ;BIR/SAB - listman utilities ;03/07/95
2 ;;7.0;OUTPATIENT PHARMACY;**19,46,84,99,131,132,148,268**;DEC 1997;Build 9
3 ;External reference FULL^VALM1 supported by dbia 10116
4 ;External reference $$SETSTR^VALM1 supported by dbia 10116
5 ;External reference EN2^GMRAPEMO supported by dbia 190
6 ;External reference to ^ORD(101 supported by DBIA 872
7 ;
8EN W @IOF S VALMCNT=0
9 D:'$D(PSOPAR) ^PSOLSET I '$D(PSOPAR) W $C(7),!!?5,"Site parameter must be defined!",! G INITQ
10 D EN^PSOLMPI
11INITQ Q
12HDR ;patient med profile display
13 K VALMHDR S HDR=^TMP("PSOHDR",$J,1,0)
14 S:^TMP("PSOHDR",$J,8,0) X=IORVON_"<A>"_IORVOFF,HDR=$$SETSTR^VALM1(X,HDR,80-$L(X),80) S VALMHDR(1)=HDR
15 I '(^TMP("PSOHDR",$J,8,0)) S PSONOAL="" D ALLERGY^PSOORUT2 I PSONOAL'="" D K PSONOAL
16 .S X=IORVON_"<NO ALLERGY ASSESSMENT>"_IORVOFF,HDR=$$SETSTR^VALM1(X,HDR,80-$L(X),80) S VALMHDR(1)=HDR
17 S HDR=" PID: "_^TMP("PSOHDR",$J,2,0)
18 S VALMHDR(2)=$$SETSTR^VALM1("Ht(cm): "_^TMP("PSOHDR",$J,7,0),HDR,52,27)
19 S HDR=" DOB: "_^TMP("PSOHDR",$J,3,0)_" ("_^TMP("PSOHDR",$J,4,0)_")"
20 S VALMHDR(3)=$$SETSTR^VALM1(" Wt(kg): "_^TMP("PSOHDR",$J,6,0),HDR,51,28)
21 S HDR=" SEX: "_$E(^TMP("PSOHDR",$J,5,0),1,44)
22 S VALMHDR(4)=HDR
23 S $P(VALMHDR(4)," ",30)=" "_$E(^TMP("PSOHDR",$J,5,0),48,80)
24 Q:$G(PS)="VIEW"!($G(PS)="DELETE")
25 S VALMHDR(5)=$G(^TMP("PSOHDR",$J,9,0))
26 S VALMHDR(6)=$G(^TMP("PSOHDR",$J,10,0))
27 Q
28 ;
29NEWALL(DFN) ; Enter Allergy info.
30 N PSOID D FULL^VALM1,EN2^GMRAPEM0,^PSOORUT2 S VALMBCK="R"
31 Q
32NEWSEL ;allows order selection by number instead of action
33 S Y=$P(XQORNOD(0),"=",2) N VALMCNT D NEWSEL^PSOORNE2
34 Q
35EDTSEL ;allows edit selection by number instead of action - active orders
36 N VALMCNT S Y=$P(XQORNOD(0),"=",2) D EDTSEL^PSOOREDT
37 Q
38SELAL ;selection of allergy by number instead of action - select allergy
39 N VALMCNT S Y=$P(XQORNOD(0),"=",2) D SELAL^PSOORDA
40 Q
41EDTNEW ;allows edit selection by number instead of action - new orders
42 N VALMCNT S Y=$P(XQORNOD(0),"=",2) D EDTSEL^PSOORNE1
43 Q
44EDTRNEW ;allows edit selection by number instead of action - renew orders
45 N VALMCNT S Y=$P(XQORNOD(0),"=",2) D EDTSEL^PSOORNE4
46 Q
47EDTPEN ;allows edit selection by number instead of action - pending orders
48 N VALMCNT S Y=$P(XQORNOD(0),"=",2),SEDT=1 G EDTSEL^PSOORNEW
49 Q
50HLDHDR ;keeps patient's header info
51 S IOTM=VALM("TM"),IOBM=IOSL W IOSC W @IOSTBM W IORC
52 Q
53 ;
54BYPASS S:$G(PSOFDR) SIGOK=1 S Y=-1,VALMBCK="Q"
55 Q
56ACTIONS() ;screen actions on active orders
57 Q:$G(PKI1)=2 0
58 N DIC,X,Y K DIC,Y S DIC="^ORD(101,"_DA(1)_",10,",X=DA,DIC(0)="ZN" D ^DIC Q:Y<0 0
59 S Y=Y(0,0)
60 I Y="PSO REFILL" Q $S(PSOACT["R":1,1:0)
61 I Y="PSO RENEW" Q $S(PSOACT["N":1,1:0)
62 I Y="PSO REPRINT" Q $S(PSOACT["P":1,1:0)
63 I Y="PSO EDIT ORDERS" Q $S(PSOACT["E":1,1:0)
64 I Y="PSO RELEASE" Q $S(PSOACT["L":1,1:0)
65 I Y="PSO PARTIAL" Q $S(PSOACT["T":1,1:0)
66 I Y="PSO CANCEL" Q $S(PSOACT["D":1,1:0)
67 I Y="PSO HOLD" Q $S(PSOACT["H":1,1:0)
68 I Y="PSO UNHOLD" Q $S(PSOACT["U":1,1:0)
69 I Y="PSO LM BACKDOOR COPY" Q $S(PSOACT["C":1,1:0)
70 I Y="PSO VERIFY" Q $S(PSOACT["V":1,1:0)
71 I Y="PSO ACTIVITY LOGS" Q 1
72 Q 1
73ACTIONS1() ;screen actions on pending orders
74 Q:$G(PKI1)=2 0
75 N DIC,X,Y K DIC,Y S DIC="^ORD(101,"_DA(1)_",10,",X=DA,DIC(0)="ZN" D ^DIC Q:Y<0 0
76 S Y=Y(0,0)
77 I Y="PSO LM DISCONTINUE" Q $S(PSOACT["D":1,1:0)
78 I Y="PSO LM EDIT" Q $S(PSOACT["E":1,1:0)
79 I Y="PSO LM FINISH" Q $S(PSOACT["F":1,1:0)
80 Q 1
81PKIACT() ;screen actions on pending orders DEA/PKI proj.
82 Q:$G(PKI1)=2 0
83 Q 1
Note: See TracBrowser for help on using the repository browser.