APSKAMN7 ;IHS/ANMC/SFB/MRS - RECIEVES POST INFUSIONS [ 09/28/94 10:52 AM ]
;;1.0;Aminoglycoside Kinetics;;OCT 31,1994
S IOP=ION S %ZIS("B")=""
D ^ZIS
POST ;EP - POST INFUSION SAMPLES
W @IOF
I APSKPTIN=0 D NOINFO^APSKAMN Q
K DIR S DIR(0)="N^2:5" W !
S DIR("A")="How many post infusion samples do you have"
D ^DIR G END:$D(DIRUT) S APSKS(1)=Y
;===>USER INPUTS THE TIME AND CONCENTRATION OF EACH
;===>ONE OF THE POST INFUSION SAMPLES.
POST1 W !! K %DT S %DT="AER",%DT("A")="Time of first sample: "
D ^%DT G END:$D(DTOUT),END:X="^" X ^DD("DD")
I (Y=-1)!(X="") D RR^APSKAMN0 G POST1
S APSKZ3T=Y
S APSKZ(3)=$P(Y,"@",2)
I APSKZ1T=APSKZ3T W !,"First and Start times are the same." D SAMETM G POST1
I APSKZ2T=APSKZ3T W !,"First and End times are the same." D SAMETM G POST1
I APSKZ13T=APSKZ3T W !,"First and PRE LEVEL times are the same." D SAMETM G POST1
K DIR S DIR(0)="N^.1:20:1" W !
S DIR("A")="Conc of first sample"
S DIR("?")="To enter 0.1 - 0.9, do not enter the '0'. Ex. .1, .2, etc."
D ^DIR G END:$D(DTOUT),END:$D(DUOUT) G POST1:Y=""
S APSKC(3)=Y
I ($L(APSKC(3))=2)&(APSKC(3)[".") S APSKC(3)=APSKC(3)
POST2 W !! K %DT S %DT="AER",%DT("A")="Time of second sample: "
D ^%DT G END:$D(DTOUT),END:X="^" X ^DD("DD")
I (Y=-1)!(X="") D RR^APSKAMN0 G POST2
S APSKZ4T=Y
S APSKZ(4)=$P(Y,"@",2)
I APSKZ1T=APSKZ4T W !,"Second and Start times are the same." D SAMETM G POST2
I APSKZ2T=APSKZ4T W !,"Second and End times are the same." D SAMETM G POST2
I APSKZ3T=APSKZ4T W !,"First and Second times are the same." D SAMETM G POST2
I APSKZ13T=APSKZ4T W !,"Second and PRE LEVEL times are the same." D SAMETM G POST2
K DIR S DIR(0)="N^.1:20:1" W !
S DIR("A")="Conc of second sample"
S DIR("?")="To enter 0.1 - 0.9, do not enter the '0'. Ex. .1, .2, etc."
D ^DIR G END:$D(DTOUT),END:$D(DUOUT) G POST2:Y=""
S APSKC(4)=Y
I ($L(APSKC(4))=2)&(APSKC(4)[".") S APSKC(4)=0_APSKC(4)
I APSKS(1)=2 G CALC^APSKAMN2
POST3 W !! K %DT S %DT="AER",%DT("A")="Time of third sample: "
D ^%DT G END:$D(DTOUT),END:X="^" X ^DD("DD")
I (Y=-1)!(X="") D RR^APSKAMN0 G POST3
S APSKZ5T=Y
S APSKZ(5)=$P(Y,"@",2)
I APSKZ1T=APSKZ5T W !,"Third and Start times are the same." D SAMETM G POST3
I APSKZ2T=APSKZ5T W !,"Third and End times are the same." D SAMETM G POST3
I APSKZ3T=APSKZ5T W !,"Third and First times are the same." D SAMETM G POST3
I APSKZ4T=APSKZ5T W !,"Third and Second times are the same." D SAMETM G POST3
I APSKZ13T=APSKZ5T W !,"Third and PRE LEVEL times are the same." D SAMETM G POST3
K DIR S DIR(0)="N^.1:20:1" W !
S DIR("A")="Conc of third sample"
S DIR("?")="To enter 0.1 - 0.9, do not enter the '0'. Ex. .1, .2, etc."
D ^DIR G END:$D(DTOUT),END:$D(DUOUT) G POST3:Y=""
S APSKC(5)=Y
I ($L(APSKC(5))=2)&(APSKC(5)[".") S APSKC(5)=APSKC(5)
I APSKS(1)=3 G CALC^APSKAMN2
POST4 W !! K %DT S %DT="AER",%DT("A")="Time of fourth sample: "
D ^%DT G END:$D(DTOUT),END:X="^" X ^DD("DD")
I (Y=-1)!(X="") D RR^APSKAMN0 G POST4
S APSKZ6T=Y
S APSKZ(6)=$P(Y,"@",2)
I APSKZ1T=APSKZ6T W !,"Fourth and Start times are the same." D SAMETM G POST4
I APSKZ2T=APSKZ6T W !,"Fourth and End times are the same." D SAMETM G POST4
I APSKZ3T=APSKZ6T W !,"Fourth and First times are the same." D SAMETM G POST4
I APSKZ4T=APSKZ6T W !,"Fourth and Second times are the same." D SAMETM G POST4
I APSKZ5T=APSKZ6T W !,"Fourth and Third times are the same." D SAMETM G POST4
I APSKZ13T=APSKZ6T W !,"Fourth and PRE LEVEL times are the same." D SAMETM G POST4
K DIR S DIR(0)="N^.1:20:1" W !
S DIR("A")="Conc of fourth sample"
S DIR("?")="To enter 0.1 - 0.9, do not enter the '0'. Ex. .1, .2, etc."
D ^DIR G END:$D(DTOUT),END:$D(DUOUT) G POST4:Y=""
S APSKC(6)=Y
I ($L(APSKC(6))=2)&(APSKC(6)[".") S APSKC(6)=0_APSKC(6)
I APSKS(1)=4 G CALC^APSKAMN2
POST5 W !! K %DT S %DT="AER",%DT("A")="Time of fifth sample: "
D ^%DT G END:$D(DTOUT),END:X="^" X ^DD("DD")
I (Y=-1)!(X="") D RR^APSKAMN0 G POST2
S APSKZ7T=Y
S APSKZ(7)=$P(Y,"@",2)
I APSKZ1T=APSKZ7T W !,"Fifth and Start times are the same." D SAMETM G POST5
I APSKZ2T=APSKZ7T W !,"Fifth and End times are the same." D SAMETM G POST5
I APSKZ3T=APSKZ7T W !,"Fifth and First times are the same." D SAMETM G POST5
I APSKZ4T=APSKZ7T W !,"Fifth and Second times are the same." D SAMETM G POST5
I APSKZ5T=APSKZ7T W !,"Fifth and Third times are the same." D SAMETM G POST5
I APSKZ6T=APSKZ7T W !,"Fifth and Fourth times are the same." D SAMETM G POST5
I APSKZ13T=APSKZ7T W !,"Fifth and PRE LEVEL times are the same." D SAMETM G POST5
K DIR S DIR(0)="N^.1:20:1" W !
S DIR("A")="Conc of fifth sample"
S DIR("?")="To enter 0.1 - 0.9, do not enter the '0'. Ex. .1, .2, etc."
D ^DIR G END:$D(DTOUT),END:$D(DUOUT) G POST5:Y=""
S APSKC(7)=Y
I ($L(APSKC(7))=2)&(APSKC(7)[".") S APSKC(7)=0_APSKC(7)
I APSKS(1)=5 G CALC^APSKAMN2
;
SAMETM ;EP
W !,"Please enter a different time or '^' to exit"
END Q
APSKAMN7 ;IHS/ANMC/SFB/MRS - RECIEVES POST INFUSIONS [ 09/28/94 10:52 AM ]
+1 ;;1.0;Aminoglycoside Kinetics;;OCT 31,1994
+2 SET IOP=ION
SET %ZIS("B")=""
+3 DO ^ZIS
POST ;EP - POST INFUSION SAMPLES
+1 WRITE @IOF
+2 IF APSKPTIN=0
DO NOINFO^APSKAMN
QUIT
+3 KILL DIR
SET DIR(0)="N^2:5"
WRITE !
+4 SET DIR("A")="How many post infusion samples do you have"
+5 DO ^DIR
IF $DATA(DIRUT)
GOTO END
SET APSKS(1)=Y
+6 ;===>USER INPUTS THE TIME AND CONCENTRATION OF EACH
+7 ;===>ONE OF THE POST INFUSION SAMPLES.
POST1 WRITE !!
KILL %DT
SET %DT="AER"
SET %DT("A")="Time of first sample: "
+1 DO ^%DT
IF $DATA(DTOUT)
GOTO END
IF X="^"
GOTO END
XECUTE ^DD("DD")
+2 IF (Y=-1)!(X="")
DO RR^APSKAMN0
GOTO POST1
+3 SET APSKZ3T=Y
+4 SET APSKZ(3)=$PIECE(Y,"@",2)
+5 IF APSKZ1T=APSKZ3T
WRITE !,"First and Start times are the same."
DO SAMETM
GOTO POST1
+6 IF APSKZ2T=APSKZ3T
WRITE !,"First and End times are the same."
DO SAMETM
GOTO POST1
+7 IF APSKZ13T=APSKZ3T
WRITE !,"First and PRE LEVEL times are the same."
DO SAMETM
GOTO POST1
+8 KILL DIR
SET DIR(0)="N^.1:20:1"
WRITE !
+9 SET DIR("A")="Conc of first sample"
+10 SET DIR("?")="To enter 0.1 - 0.9, do not enter the '0'. Ex. .1, .2, etc."
+11 DO ^DIR
IF $DATA(DTOUT)
GOTO END
IF $DATA(DUOUT)
GOTO END
IF Y=""
GOTO POST1
+12 SET APSKC(3)=Y
+13 IF ($LENGTH(APSKC(3))=2)&(APSKC(3)[".")
SET APSKC(3)=APSKC(3)
POST2 WRITE !!
KILL %DT
SET %DT="AER"
SET %DT("A")="Time of second sample: "
+1 DO ^%DT
IF $DATA(DTOUT)
GOTO END
IF X="^"
GOTO END
XECUTE ^DD("DD")
+2 IF (Y=-1)!(X="")
DO RR^APSKAMN0
GOTO POST2
+3 SET APSKZ4T=Y
+4 SET APSKZ(4)=$PIECE(Y,"@",2)
+5 IF APSKZ1T=APSKZ4T
WRITE !,"Second and Start times are the same."
DO SAMETM
GOTO POST2
+6 IF APSKZ2T=APSKZ4T
WRITE !,"Second and End times are the same."
DO SAMETM
GOTO POST2
+7 IF APSKZ3T=APSKZ4T
WRITE !,"First and Second times are the same."
DO SAMETM
GOTO POST2
+8 IF APSKZ13T=APSKZ4T
WRITE !,"Second and PRE LEVEL times are the same."
DO SAMETM
GOTO POST2
+9 KILL DIR
SET DIR(0)="N^.1:20:1"
WRITE !
+10 SET DIR("A")="Conc of second sample"
+11 SET DIR("?")="To enter 0.1 - 0.9, do not enter the '0'. Ex. .1, .2, etc."
+12 DO ^DIR
IF $DATA(DTOUT)
GOTO END
IF $DATA(DUOUT)
GOTO END
IF Y=""
GOTO POST2
+13 SET APSKC(4)=Y
+14 IF ($LENGTH(APSKC(4))=2)&(APSKC(4)[".")
SET APSKC(4)=0_APSKC(4)
+15 IF APSKS(1)=2
GOTO CALC^APSKAMN2
POST3 WRITE !!
KILL %DT
SET %DT="AER"
SET %DT("A")="Time of third sample: "
+1 DO ^%DT
IF $DATA(DTOUT)
GOTO END
IF X="^"
GOTO END
XECUTE ^DD("DD")
+2 IF (Y=-1)!(X="")
DO RR^APSKAMN0
GOTO POST3
+3 SET APSKZ5T=Y
+4 SET APSKZ(5)=$PIECE(Y,"@",2)
+5 IF APSKZ1T=APSKZ5T
WRITE !,"Third and Start times are the same."
DO SAMETM
GOTO POST3
+6 IF APSKZ2T=APSKZ5T
WRITE !,"Third and End times are the same."
DO SAMETM
GOTO POST3
+7 IF APSKZ3T=APSKZ5T
WRITE !,"Third and First times are the same."
DO SAMETM
GOTO POST3
+8 IF APSKZ4T=APSKZ5T
WRITE !,"Third and Second times are the same."
DO SAMETM
GOTO POST3
+9 IF APSKZ13T=APSKZ5T
WRITE !,"Third and PRE LEVEL times are the same."
DO SAMETM
GOTO POST3
+10 KILL DIR
SET DIR(0)="N^.1:20:1"
WRITE !
+11 SET DIR("A")="Conc of third sample"
+12 SET DIR("?")="To enter 0.1 - 0.9, do not enter the '0'. Ex. .1, .2, etc."
+13 DO ^DIR
IF $DATA(DTOUT)
GOTO END
IF $DATA(DUOUT)
GOTO END
IF Y=""
GOTO POST3
+14 SET APSKC(5)=Y
+15 IF ($LENGTH(APSKC(5))=2)&(APSKC(5)[".")
SET APSKC(5)=APSKC(5)
+16 IF APSKS(1)=3
GOTO CALC^APSKAMN2
POST4 WRITE !!
KILL %DT
SET %DT="AER"
SET %DT("A")="Time of fourth sample: "
+1 DO ^%DT
IF $DATA(DTOUT)
GOTO END
IF X="^"
GOTO END
XECUTE ^DD("DD")
+2 IF (Y=-1)!(X="")
DO RR^APSKAMN0
GOTO POST4
+3 SET APSKZ6T=Y
+4 SET APSKZ(6)=$PIECE(Y,"@",2)
+5 IF APSKZ1T=APSKZ6T
WRITE !,"Fourth and Start times are the same."
DO SAMETM
GOTO POST4
+6 IF APSKZ2T=APSKZ6T
WRITE !,"Fourth and End times are the same."
DO SAMETM
GOTO POST4
+7 IF APSKZ3T=APSKZ6T
WRITE !,"Fourth and First times are the same."
DO SAMETM
GOTO POST4
+8 IF APSKZ4T=APSKZ6T
WRITE !,"Fourth and Second times are the same."
DO SAMETM
GOTO POST4
+9 IF APSKZ5T=APSKZ6T
WRITE !,"Fourth and Third times are the same."
DO SAMETM
GOTO POST4
+10 IF APSKZ13T=APSKZ6T
WRITE !,"Fourth and PRE LEVEL times are the same."
DO SAMETM
GOTO POST4
+11 KILL DIR
SET DIR(0)="N^.1:20:1"
WRITE !
+12 SET DIR("A")="Conc of fourth sample"
+13 SET DIR("?")="To enter 0.1 - 0.9, do not enter the '0'. Ex. .1, .2, etc."
+14 DO ^DIR
IF $DATA(DTOUT)
GOTO END
IF $DATA(DUOUT)
GOTO END
IF Y=""
GOTO POST4
+15 SET APSKC(6)=Y
+16 IF ($LENGTH(APSKC(6))=2)&(APSKC(6)[".")
SET APSKC(6)=0_APSKC(6)
+17 IF APSKS(1)=4
GOTO CALC^APSKAMN2
POST5 WRITE !!
KILL %DT
SET %DT="AER"
SET %DT("A")="Time of fifth sample: "
+1 DO ^%DT
IF $DATA(DTOUT)
GOTO END
IF X="^"
GOTO END
XECUTE ^DD("DD")
+2 IF (Y=-1)!(X="")
DO RR^APSKAMN0
GOTO POST2
+3 SET APSKZ7T=Y
+4 SET APSKZ(7)=$PIECE(Y,"@",2)
+5 IF APSKZ1T=APSKZ7T
WRITE !,"Fifth and Start times are the same."
DO SAMETM
GOTO POST5
+6 IF APSKZ2T=APSKZ7T
WRITE !,"Fifth and End times are the same."
DO SAMETM
GOTO POST5
+7 IF APSKZ3T=APSKZ7T
WRITE !,"Fifth and First times are the same."
DO SAMETM
GOTO POST5
+8 IF APSKZ4T=APSKZ7T
WRITE !,"Fifth and Second times are the same."
DO SAMETM
GOTO POST5
+9 IF APSKZ5T=APSKZ7T
WRITE !,"Fifth and Third times are the same."
DO SAMETM
GOTO POST5
+10 IF APSKZ6T=APSKZ7T
WRITE !,"Fifth and Fourth times are the same."
DO SAMETM
GOTO POST5
+11 IF APSKZ13T=APSKZ7T
WRITE !,"Fifth and PRE LEVEL times are the same."
DO SAMETM
GOTO POST5
+12 KILL DIR
SET DIR(0)="N^.1:20:1"
WRITE !
+13 SET DIR("A")="Conc of fifth sample"
+14 SET DIR("?")="To enter 0.1 - 0.9, do not enter the '0'. Ex. .1, .2, etc."
+15 DO ^DIR
IF $DATA(DTOUT)
GOTO END
IF $DATA(DUOUT)
GOTO END
IF Y=""
GOTO POST5
+16 SET APSKC(7)=Y
+17 IF ($LENGTH(APSKC(7))=2)&(APSKC(7)[".")
SET APSKC(7)=0_APSKC(7)
+18 IF APSKS(1)=5
GOTO CALC^APSKAMN2
+19 ;
SAMETM ;EP
+1 WRITE !,"Please enter a different time or '^' to exit"
END QUIT