Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: APSKAMN4

APSKAMN4.m

Go to the documentation of this file.
  1. APSKAMN4 ;IHS/ANMC/SFB/MRS - CALC MIN & MAX SERUM CONC.,DOSING INTERVALS & RATE; [ 09/28/94 10:51 AM ]
  1. ;;1.0;Aminoglycoside Kinetics;;OCT 31,1994
  1. ;
  1. DOSING ;EP - USER ENTER'S MINIMUM AND MAXIMUM SERUM CONCENTRATIONS
  1. W @IOF
  1. MIN ;EP
  1. K DIR S DIR(0)="N^.1:2:1"
  1. S DIR("A")="desired MINIMUM serum concentration in MCG/ML"
  1. S DIR("?")="To enter 0.1 -0.9, do not enter the 0. Ex. .1, .2, etc"
  1. D ^DIR G END:$D(DTOUT),END:$D(DUOUT),MIN:Y=-1 K DIR
  1. S APSKC2=Y
  1. I ($L(APSKC2))=2&(APSKC2[".") S APSKC2=APSKC2=0_APSKC2
  1. MAX ;EP - User enter's Max serum concentration
  1. K DIR S DIR(0)="N^1:10:1" W !!
  1. S DIR("A")="desired MAXIMUM serum concentration in MCG/ML"
  1. S DIR("?")="Required response. Enter '^' to exit"
  1. D ^DIR G END:$D(DTOUT),END:$D(DUOUT),MAX:Y=-1 K DIR
  1. S APSKC3=Y
  1. I APSKC3<APSKC2 D ERROR1 G MAX
  1. ;
  1. INFUSTM ;===>ENTER INFUSION TIME IN HOURS
  1. ;===>CALCULATES 'EXACT' DOSING INTERVAL AND 'EXACT' INFUSION RATE
  1. K DIR S DIR(0)="N^.1:24:2" W !!
  1. S DIR("A")="recommended infusion time in HOURS (T')"
  1. S DIR("?")="Required response. Enter '^' to exit"
  1. D ^DIR G END:$D(DTOUT),END:$D(DUOUT),INFUSTM:Y=-1 K DIR S APSKT0=Y
  1. S APSKXX=(APSKC2/APSKC3) D LN^APSKAMN6
  1. S APSKT2=((-APSKLNN)/APSKK1)+APSKT0
  1. S APSKT2=$P(100*APSKT2+.5,".",1)/100
  1. W !!!,"To maintain the ratio of MAX to MIN serum conc. that you"
  1. W !,"have specified, the EXACT dosing interval would be ",APSKT2," hours"
  1. DI W !!! K DIR S DIR(0)="N"
  1. S DIR("A")="Please enter a clinically acceptable dosing interval (in hrs)"
  1. S DIR("?")="Required response. Enter '^' to exit"
  1. D ^DIR G END:$D(DTOUT),END:$D(DUOUT),DI:Y=-1 K DIR S APSKT3=Y
  1. S APSKXX=(-APSKK1*APSKT3) D EXP^APSKAMN6 S APSKEE1=1-APSKEE
  1. S APSKXX=(-APSKK1*APSKT0) D EXP^APSKAMN6 S APSKEE2=1-APSKEE
  1. S APSKK2A=APSKK1*APSKV1*APSKC3*(APSKEE1/APSKEE2)
  1. S APSKK2=$P(100*APSKK2A+.5,".",1)/100
  1. W !!,"Assuming ",APSKT3," hour dosing, the EXACT infusion rate to produce"
  1. W !,"peak serum levels of ",APSKC3," mcg/ml is ",APSKK2," mg/hour given"
  1. W !,"over a ",APSKT0," hour period."
  1. IR K DIR W !!! S DIR(0)="N"
  1. S DIR("A")="Please enter a clinically acceptable infusion rate (in mg/hr)"
  1. S DIR("?")="Required response. Enter '^' to exit"
  1. D ^DIR G END:$D(DTOUT),END:$D(DUOUT),IR:Y=-1 K DIR S APSKK3=Y
  1. G LOOP^APSKAMN5
  1. ERROR1 W !!
  1. W !,"The Maximum serum concentration you entered is less"
  1. W !,"than the Minimum serum concentration. Please enter"
  1. W !,"a new Maximum serum concentration",!!
  1. Q
  1. ;
  1. END Q