source: FOIAVistA/tag/r/INPATIENT_MEDICATIONS-PSJ-PSIV-PSG--PSGW/PSJDDUT3.m@ 636

Last change on this file since 636 was 628, checked in by George Lilly, 14 years ago

initial load of FOIAVistA 6/30/08 version

File size: 1.7 KB
Line 
1PSJDDUT3 ;BIR/LDT-INPATIENT MEDICATIONS DD UTILITY ;26 JUN 97 / 9:35 AM
2 ;;5.0; INPATIENT MEDICATIONS ;;16 DEC 97
3 ;
4 ;(The following call replaces EN^PSIVHLP3)
5EN(HELP) F PSIVHLP=1:1 Q:$P($T(@HELP+PSIVHLP),";",3)="" S PSJHLP(PSIVHLP)=$P($T(@HELP+PSIVHLP),";",3) D WRITE
6 K HELP,PSIVHLP Q
7 ;
8ENI ;(Replaces ENI^PSIVSP)
9 K:$L(X)<1!($L(X)>30)!(X["""")!($A(X)=45) X I '$D(X)!'$D(P(4)) Q
10 I P(4)="P"!(P(5))!(P(23)="P") Q:'X S X="INFUSE OVER "_X_" MIN." D EN^DDIOL(" "_X,"","?0") Q
11 I X'=+X,($P(X,"@",2,999)'=+$P(X,"@",2,999)!(+$P(X,"@",2,999)<0)) K X Q
12 S SPSOL=$O(DRG("SOL",0)) I 'SPSOL K SPSOL,X D EN^DDIOL(" You must define at least one solution !!") Q
13 I X=+X S X=X_" ml/hr" D EN^DDIOL(" ml/hr","","?0") D SPSOL S P(15)=$S('X:0,1:SPSOL\X*60+(SPSOL#X/X*60+.5)\1) K SPSOL Q
14 S SPSOL=$P(X,"@",2) S:$P(X,"@")=+X $P(X,"@")=$P(X,"@")_" ml/hr" D EN^DDIOL(" "_+SPSOL_" Label"_$S(SPSOL'=1:"s",1:"")_" per day"),EN^DDIOL("at an infusion rate of: "_$P(X,"@"),"","!?15") S P(15)=$S('SPSOL:0,1:1440/SPSOL\1) K SPSOL
15 Q
16SPSOL S SPSOL=0 F XXX=0:0 S XXX=$O(DRG("SOL",XXX)) Q:'XXX S SPSOL=SPSOL+$P(DRG("SOL",XXX),U,3)
17 K XXX Q
18 ;
19 ;(The following call replaces 59^PSIVUTL)
2059 ; Validate the Infusion rate entered using IV Quick order code.
21 N I F I=2,3,5,7,8,9,11,15,23 S P(I)=""
22 S P(4)="A",P(8)=$P($G(^PS(57.1,PSJQO,1)),U,5)
23 I $G(^PS(57.1,PSJQO,4,1,0)) S DRG("SOL",1)=^(0),DRG("SOL",0)=1
24 I X["?" S F1=53.1,F2=59 D ENHLP^PSIVORC1 G 59
25 I X]"" D ENI S:$D(X) P(8)=X
26 Q
27 ;
28STPDTHLP ;
29 ;;A number of doses (dose limit) may be entered and the stop date will
30 ;;be automatically calculated. To specify a dose limit enter a number
31 ;;corresponding to the number of doses the to be administered.
32 ;;(Example: 4 for 4 doses).
33 ;
34WRITE ;Calls EN^DDIOL to write text
35 D EN^DDIOL(.PSJHLP) K PSJHLP Q
Note: See TracBrowser for help on using the repository browser.