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

APSKAMN1.m

Go to the documentation of this file.
  1. APSKAMN1 ;IHS/ANMC/SFB/MRS - REGRESSION ANALYSIS CALC[ 09/28/94 11:16 AM ]
  1. ;;1.0;Aminoglycoside Kinetics;;OCT 31,1994
  1. S IOP=ION S %ZIS("B")=""
  1. D ^%ZIS
  1. ;
  1. CHOICE2 ;EP - CHOOSE REGRESSION OR DOSING USING ASSUMED PARAMETERS
  1. W !!
  1. K DIR S DIR(0)="S^1:REGRESSION ANALYSIS;2:DOSING USING ASSUMED PARAMETERS"
  1. S DIR("A")="ENTER '1' or '2' "
  1. D ^DIR G END:$D(DIRUT) K DIR S APSKM=Y
  1. ;===>CONTROL PASSED TO THE NOREG SECTION OF APSKAMN5
  1. ;===>IF NO REGRESSION ANALYSIS IS PERFORMED
  1. I APSKM="2" G NOREG^APSKAMN9
  1. W @IOF
  1. W !," SERUM SAMPLES MUST BE OBTAINED WITHIN A 24 HR PERIOD ! "
  1. W !!," The following are examples of valid time inputs: "
  1. W !!,"07:00 07AM 7AM 715AM 19:00 07PM 7PM 715PM"
  1. W !,"For additional information, enter '?' at any prompt that request"
  1. W !,"the time."
  1. W !!
  1. ;
  1. START1 ;EP-INFUSION START TIME
  1. W !! K %DT S %DT="AER",%DT("A")="Time at START of infusion: "
  1. D ^%DT G END:$D(DTOUT),END:X="^"
  1. I (Y=-1)!(X="") D RR^APSKAMN0 G START1
  1. X ^DD("DD")
  1. S APSKZ1T=Y
  1. S APSKZ(1)=$P(Y,"@",2)
  1. ;
  1. END1 ;===>INFUSION END TIME
  1. W !! K %DT S %DT="AER",%DT("A")="Time at END of infusion: "
  1. D ^%DT G END:$D(DTOUT),END:X="^"
  1. I (Y=-1)!(X="") D RR^APSKAMN0 G END1
  1. X ^DD("DD")
  1. S APSKZ2T=Y
  1. S APSKZ(2)=$P(Y,"@",2)
  1. I APSKZ1T=APSKZ2T W !,"End time and Start time are the same. Please enter a new End time or enter '^' to quit. " G END1
  1. I APSKZ2T<APSKZ1T W !,"End time is before Start time. Please enter a new End time or enter '^' to quit. " G END1
  1. W !!
  1. ;===>AMOUNT INFUSED
  1. TD K DIR S DIR(0)="N"
  1. S DIR("A")="Total DOSE infused (in mg.)"
  1. D ^DIR G END:$D(DTOUT),END:X="^"
  1. I Y="" D RR^APSKAMN0 G TD
  1. S APSKD=Y
  1. W @IOF
  1. PL K DIR S DIR(0)="Y"
  1. S DIR("A")="Do you have a measurable PRE LEVEL <Y/N>"
  1. D ^DIR G END:$D(DIRUT)
  1. I Y="" D RR^APSKAMN0 G PL
  1. S APSKPL=Y
  1. I APSKPL="0" G POST^APSKAMN7
  1. ;
  1. PRELEVEL W !! K %DT S %DT="AER" S %DT("A")="Time of PRE LEVEL: "
  1. D ^%DT G END:$D(DTOUT),END:X="^" X ^DD("DD")
  1. I (Y=-1)!(X="") D RR^APSKAMN0 G PRELEVEL
  1. S APSKZ13T=Y
  1. S APSKZ(13)=$P(Y,"@",2)
  1. I APSKZ1T=APSKZ13T W !,"PreLevel time and Start time are the same. Please enter a new PreLevel time or enter '^' to quit. " G PRELEVEL
  1. I APSKZ2T=APSKZ13T W !,"PreLevel time and End time are the same. Please enter a new PreLevel time or enter '^' to quit. " G PRELEVEL
  1. CPL K DIR S DIR(0)="N^.1:10:1" W !
  1. S DIR("A")="Concentration of PRE LEVEL (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(DIRUT)
  1. I Y="" D RR^APSKAMN0 G CPL
  1. S APSKC(13)=Y
  1. I ($L(APSKC(13))=2)&(APSKC(13)[".") S APSKC(13)=0_APSKC(13)
  1. K DIR S DIR(0)="Y",DIR("B")="YES"
  1. S DIR("A")="Is this data from a peak/trough check <Y/N>"
  1. D ^DIR G END:$D(DIRUT) K DIR S APSKSE=Y
  1. I APSKSE="0" G POST^APSKAMN7
  1. ;
  1. POSTLEVL W !! K %DT
  1. S %DT="AER",%DT("A")="Time of POST LEVEL: "
  1. D ^%DT G END:$D(DTOUT),END:$D(DUOUT) X ^DD("DD")
  1. I (Y=-1)!(X="") D RR^APSKAMN0 G POSTLEVL
  1. S APSKZ3T=Y
  1. S APSKZ(3)=$P(Y,"@",2)
  1. ;
  1. I APSKZ1T=APSKZ3T W !,"POST LEVEL time and Start time are the same. Please enter a new POST LEVEL time or enter '^' to quit. " G POSTLEVL
  1. I APSKZ2T=APSKZ3T W !,"POST LEVEL time and End time are the same. Please enter a new POST LEVEL time or enter '^' to quit. " G POSTLEVL
  1. ;
  1. COMPL K DIR S DIR(0)="N^.1:10:1"
  1. S DIR("A")="Concentration of POST LEVEL (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(DIRUT),COMPL:Y="" K DIR S APSKC(3)=Y
  1. ;
  1. INFUSION W !! K %DT S %DT="AER",%DT("A")="Time at end of previous infusion: "
  1. D ^%DT G END:$D(DTOUT),END:X="^" X ^DD("DD")
  1. I (Y=-1)!(X="") D RR^APSKAMN0 G INFUSION
  1. S APSKZ14T=Y
  1. S APSKZ(14)=$P(Y,"@",2)
  1. I APSKZ1T=APSKZ14T W !,"Previous infusion time and Start time are the same. Please enter a new infusion time or enter '^' to quit. " G INFUSION
  1. I APSKZ2T=APSKZ14T W !,"Previous infusion time and End time are the same. Please enter a new infusion time or enter '^' to quit. " G INFUSION
  1. I APSKZ3T=APSKZ14T W !,"Previous infusion time and POST LEVEL time are the same. Please enter a new infusion time or enter '^' to quit. " G INFUSION
  1. G CVTIME^APSKAMN2
  1. ;
  1. END Q