source: WorldVistAEHR/trunk/r/GEN_MED_REC_IO-GMRY/GMRYUT6.m@ 949

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

initial load of WorldVistAEHR

File size: 3.6 KB
Line 
1GMRYUT6 ;HIRMFO/YH-IV SOLUTION SELECT FROM PHARMACY/NURS FILES ;5/13/96
2 ;;4.0;Intake/Output;;Apr 25, 1997
3PSSOL ;LIST PATIENT IV SOLUTION FROM PHARMACY ORDER
4 K GMRY S (GMRZ,GMRZ(1),GMRZ(2),GMRZ(3))="",(GMRX,GMRY)=0 D GETIV^GMRYPSIV(DFN,GMRVTYP,.GMRY) I GMRY'>0 W !,"No pharmacy active IV order for this patient",! G NURSOL
5SEL ;Select from the following pharmacy active IV order(s)
6 W !,"pharmacy active IV order for the patient:",! F GMRX=1:1:GMRY W !,GMRX_"."_$P(GMRY(GMRX),"^")_" "_$P(GMRY(GMRX),"^",2)_" "_$P(GMRY(+GMRX),"^",4),!
7 W !,"Select a number between 1 and "_GMRY_": " S GMRX=0 R GMRX:DTIME I '$T!(GMRX["^") S GMROUT=1 G Q
8 G:GMRX="" NURSOL G:GMRX<1!(GMRX>GMRY) SEL
9 S GMRZ=$P(GMRY(+GMRX),"^"),GMRZ(2)=+$P(GMRY(+GMRX),"^",2),GMRZ(1)=$P(GMRY(+GMRX),"^",3),GMRZ(3)=+$P(GMRY(+GMRX),"^",4) D ASK1 G:GMRX=""!("Yy"[GMRX) Q G SEL
10NURSOL ;SELECT FROM NUR SOLUTION FILE
11 D NURSOL^GMRYUT7 G:GMROUT Q
12 S GMRZ=$P(Y(0),"^"),GMRZ(1)=$P(Y(0),"^",2),GMRZ(2)=+$P(Y(0),"^",3),GMRZ(3)="" D ASK1 G:GMRX=""!("Yy"[GMRX)!GMROUT Q S (GMRZ,GMRZ(1),GMRZ(2),GMRZ(3))="" G NURSOL
13Q K X,Y,GMRX,GMRY,GMRDA,GMRD S:GMRZ=""!(GMRZ(1)="")!(GMRZ(2)="") GMROUT=1 Q
14ASK1 S X="" W !,"Amount of solution in mls in the container: "_$S(GMRZ(2)="":"",1:GMRZ(2)_"// ") R X:DTIME S:'$T!(X["^") GMROUT=1 Q:GMROUT
15 I (X'=""&(X'>0))!(X["?") W !!,"Enter total amount of solution in mls in the container.",! S X="" G ASK1
16 I '(X?1.4N!(X?1.4N1"."1N))&(X'="") W !,"ERROR ENTRY",! G ASK1
17 I GOPT'="RESTART"&((X>9999!(X<.1))&(X'="")) W !!,"Amount of solution has to be a number between .1 and 9999.",!! G ASK1
18 I GOPT="RESTART"&(X>$G(GSAVE)) W !!,"The number must be equal to or less than the remaining amount.",!! G ASK1
19 I X[".",$L($P(X,".",2))>1 W !!,"Only 1 decimal digit allowed",! G ASK1
20 S:X>0 GMRZ(2)=+X I GMRZ(2)=0 G ASK1
21ASK3 W !,"Enter a number for infusion rate (Example: 125 = 125 ml/hr): "_$S(GMRZ(3)>0:GMRZ(3)_"// ",1:" ") S X="" R X:DTIME S:'$T!(X["^") GMROUT=1 Q:GMROUT
22 G:X="" ASK4 I X'=""&(X'?1.3N!(X<0)!(X>999)) W !,"Enter a number between 1 and 999 or enter <RET> to bypass this entry",! G ASK3
23 I X>0 S GMRZ(3)=X G ASK4
24 I X["?" W !,"Enter the rate at which the infusion is to take place.",!,"For example: a number 125 entered means the infusion rate is 125 mls/hr",! S X="" G ASK3
25ASK4 W !,GMRZ_" "_$S(GMRZ(1)="A":"admixture",GMRZ(1)="P":"piggyback",GMRZ(1)="B":"blood/blood product",GMRZ(1)="H":"hyperal",GMRZ(1)="I":"intralipids",1:"")_" "_GMRZ(2)_" mls "_$S(GMRZ(3)'="":GMRZ(3),1:"UNKNOWN")_" ml/hr"
26 W " Is it correct " S %=1 D YN^DICN S GMRX=$S(%=1:"Y",%=2:"N",1:"") S:%<0 GMROUT=1 Q:GMRX="Y"!(GMRX="N")!GMROUT
27 W !!,"If data is correct, please enter 'Y', else enter 'N' if incorrect.",! G ASK4
28 Q
29ADDHNG S DR="S:GMRVTYP[""P"" Y=""@1"";1///^S X=GMRZ;@1;2//^S X=""N"";S:GMRVTYP[""P"" Y=""@2"";3//^S X=""N"";@2;4///^S X=""`""_DUZ;I GADD=""Y"" S Y=""@3"";5//^S X=""D"";@3;" Q
30SITEDES ;SELECT IV SITE DESCRIPTION, CALLED BY DATA ENTRY ROUTINES
31 K GMRY,GSEL S GMRZ="",GMRTRNS=2 K GMRX D DISPLAY^GMRYUT5 R GMRX:DTIME I '$T!(GMRX["^") S GMROUT=1,GMRZ="" G QL
32 I GMRX="" S GMRZ=$P(^GMRD(126.72,1,0),"^") G ASK2
33 S I=$L(GMRX,",") F X=1:1:I S Y=$P(GMRX,",",X) I ((Y'?.N1"-".N)&(Y'?.N))!((Y["-")&($P(Y,"-",2)<$P(Y,"-",1))!($P(Y,"-",1)=0)!($P(Y,"-",2)=0)) S GMRX="?"
34 I GMRX["?" W !!,"Select an item or a combination of items such as ",!,"1,3-5 to describe the IV site you observe",! G SITEDES
35 D VALIDAT^GMRYUT9 G:'$D(GSEL) SITEDES S GMRX=0 F S GMRX=$O(GSEL(GMRX)) Q:GMRX'>0!('$D(GMRY(+GMRX))) S GMRZ=GMRZ_$S($L(GMRZ)>0:", ",1:"")_$P(GMRY(GMRX),"^",2)
36 I $L(GMRZ)>50 W !,"The string length is longer than 50 characters!" G SITEDES
37ASK2 G:$L(GMRZ)'>0 SITEDES S X=""
38QL K %,GMRX,GMRY,GMRN,GMRTRNS,GSEL Q
Note: See TracBrowser for help on using the repository browser.