GMRYUT13 ;HIRMFO/YH-INTRAVENOUS INFUSION PROTOCOL ;10/16/96
;;4.0;Intake/Output;;Apr 25, 1997
SEL S GSITE="" I GN=0 S GMROUT=1 K GN,GMRDATA Q
S (II(1),II(3))=0 F II=1:1:GN Q:GMROUT!II(3) D WRT S II(1)=II(1)+1 I II(1)>5 D
. S II(2)="" W !,"Return to continue or ^ to quit listing " R II(2):DTIME I '$T S GMROUT=1 Q
. I II(2)'="" S II(3)=1 Q
. S II(1)=0 Q
Q:GMROUT!$D(GFLAG) W !!,$S(GOPT="TITER":"Select the number of solution & rate to be adjusted: ",1:"Select a number to be discontinued: ") S X="" R X:DTIME I '$T!(X["^") S GMROUT=1 K GMRDATA,GN,II Q
I X="" S GMRZ(1)="" K GMRDATA,GN,II Q
I X>0&(X<(GN+1)) D K GN,GMRDATA,II Q
.S GSITE=$P(GMRDATA(+X),"^",4),DA(1)=DFN,DA=+$P(GMRDATA(+X),"^",2),GMRZ=$P(GMRDATA(+X),"^",6),GMRZ(1)=$P(GMRDATA(+X),"^",3),GMRZ(2)=+$P(GMRDATA(+X),"^",7),GMRZ(3)=+$P(GMRDATA(+X),"^",9)
. S GCATH=$P(GMRDATA(+X),"^",10),GCATH(1)=$P(GMRDATA(+X),"^",11)
I X=""!(X["?") W !!,"Enter the number of IV which you wish to "_$S(GOPT="ADDSOL"!(GOPT="HANG"):"add a new solution ",GOPT="DCIV":"discontinue",GOPT="TITER":"readjust the rate",1:""),! G SEL
W !,"Error entry!!!, Please enter a number between 1 and ",GN,! G SEL
;
WRT ;
W !,II_". "_$P(GMRDATA(II),"^",4)_" - "_$P(GMRDATA(II),"^",10)_" "_$P(GMRDATA(II),"^",11)
N X S X=$S($P(GMRDATA(II),"^",3)["L":"LOCK/PORT",1:$P(GMRDATA(II),"^",6))
S X=X_" "_$S($P(GMRDATA(II),"^",3)'["L":" ("_$P(GMRDATA(II),"^",3)_") "_$P(GMRDATA(II),"^",9),1:"")
S X=X_" "_$P(GMRDATA(II),"^",8)_" on " S Y=$P(GMRDATA(II),"^") S X=X_$E(Y,4,5)_"/"_$E(Y,6,7)_"/"_$E(Y,2,3)_"@" X ^DD("DD") S X=X_$P($P(Y,"@",2),":",1,2)
S DIWR=70,DIWF="",DIWL=0 K ^UTILITY($J) D ^DIWP
S I=0 F S I=$O(^UTILITY($J,"W",0,I)) Q:I'>0 W !,?4,^UTILITY($J,"W",0,I,0)
K ^UTILITY($J) W ! Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HGMRYUT13 1757 printed Oct 16, 2024@17:56:34 Page 2
GMRYUT13 ;HIRMFO/YH-INTRAVENOUS INFUSION PROTOCOL ;10/16/96
+1 ;;4.0;Intake/Output;;Apr 25, 1997
SEL SET GSITE=""
IF GN=0
SET GMROUT=1
KILL GN,GMRDATA
QUIT
+1 SET (II(1),II(3))=0
FOR II=1:1:GN
if GMROUT!II(3)
QUIT
DO WRT
SET II(1)=II(1)+1
IF II(1)>5
Begin DoDot:1
+2 SET II(2)=""
WRITE !,"Return to continue or ^ to quit listing "
READ II(2):DTIME
IF '$TEST
SET GMROUT=1
QUIT
+3 IF II(2)'=""
SET II(3)=1
QUIT
+4 SET II(1)=0
QUIT
End DoDot:1
+5 if GMROUT!$DATA(GFLAG)
QUIT
WRITE !!,$SELECT(GOPT="TITER":"Select the number of solution & rate to be adjusted: ",1:"Select a number to be discontinued: ")
SET X=""
READ X:DTIME
IF '$TEST!(X["^")
SET GMROUT=1
KILL GMRDATA,GN,II
QUIT
+6 IF X=""
SET GMRZ(1)=""
KILL GMRDATA,GN,II
QUIT
+7 IF X>0&(X<(GN+1))
Begin DoDot:1
+8 SET GSITE=$PIECE(GMRDATA(+X),"^",4)
SET DA(1)=DFN
SET DA=+$PIECE(GMRDATA(+X),"^",2)
SET GMRZ=$PIECE(GMRDATA(+X),"^",6)
SET GMRZ(1)=$PIECE(GMRDATA(+X),"^",3)
SET GMRZ(2)=+$PIECE(GMRDATA(+X),"^",7)
SET GMRZ(3)=+$PIECE(GMRDATA(+X),"^",9)
+9 SET GCATH=$PIECE(GMRDATA(+X),"^",10)
SET GCATH(1)=$PIECE(GMRDATA(+X),"^",11)
End DoDot:1
KILL GN,GMRDATA,II
QUIT
+10 IF X=""!(X["?")
WRITE !!,"Enter the number of IV which you wish to "_$SELECT(GOPT="ADDSOL"!(GOPT="HANG"):"add a new solution ",GOPT="DCIV":"discontinue",GOPT="TITER":"readjust the rate",1:""),!
GOTO SEL
+11 WRITE !,"Error entry!!!, Please enter a number between 1 and ",GN,!
GOTO SEL
+12 ;
WRT ;
+1 WRITE !,II_". "_$PIECE(GMRDATA(II),"^",4)_" - "_$PIECE(GMRDATA(II),"^",10)_" "_$PIECE(GMRDATA(II),"^",11)
+2 NEW X
SET X=$SELECT($PIECE(GMRDATA(II),"^",3)["L":"LOCK/PORT",1:$PIECE(GMRDATA(II),"^",6))
+3 SET X=X_" "_$SELECT($PIECE(GMRDATA(II),"^",3)'["L":" ("_$PIECE(GMRDATA(II),"^",3)_") "_$PIECE(GMRDATA(II),"^",9),1:"")
+4 SET X=X_" "_$PIECE(GMRDATA(II),"^",8)_" on "
SET Y=$PIECE(GMRDATA(II),"^")
SET X=X_$EXTRACT(Y,4,5)_"/"_$EXTRACT(Y,6,7)_"/"_$EXTRACT(Y,2,3)_"@"
XECUTE ^DD("DD")
SET X=X_$PIECE($PIECE(Y,"@",2),":",1,2)
+5 SET DIWR=70
SET DIWF=""
SET DIWL=0
KILL ^UTILITY($JOB)
DO ^DIWP
+6 SET I=0
FOR
SET I=$ORDER(^UTILITY($JOB,"W",0,I))
if I'>0
QUIT
WRITE !,?4,^UTILITY($JOB,"W",0,I,0)
+7 KILL ^UTILITY($JOB)
WRITE !
QUIT