home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Planet Source Code Jumbo …e CD Visual Basic 1 to 7
/
5_2007-2008.ISO
/
data
/
Zips
/
Intensive_2121177202008.psc
/
Form
/
Adjust1.frm
< prev
next >
Wrap
Text File
|
2008-07-03
|
17KB
|
513 lines
VERSION 5.00
Begin VB.Form Adjust1
BackColor = &H00FF0000&
BorderStyle = 0 'None
ClientHeight = 5085
ClientLeft = 0
ClientTop = 0
ClientWidth = 6465
LinkTopic = "Form1"
ScaleHeight = 5085
ScaleWidth = 6465
ShowInTaskbar = 0 'False
StartUpPosition = 3 'Windows Default
Begin VB.TextBox VDtxt
Alignment = 2 'Center
BackColor = &H00000000&
BorderStyle = 0 'None
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 285
Left = 4440
TabIndex = 18
Top = 1680
Width = 1335
End
Begin VB.TextBox Halftxt
Alignment = 2 'Center
BackColor = &H00000000&
BorderStyle = 0 'None
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 285
Left = 4440
TabIndex = 17
Top = 2040
Width = 1335
End
Begin VB.TextBox EstTroughtxt
Alignment = 2 'Center
BackColor = &H00000000&
BorderStyle = 0 'None
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 285
Left = 4440
TabIndex = 10
Top = 3480
Width = 1335
End
Begin VB.TextBox EstPeaktxt
Alignment = 2 'Center
BackColor = &H00000000&
BorderStyle = 0 'None
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 285
Left = 4440
TabIndex = 9
Top = 3120
Width = 1335
End
Begin VB.TextBox DI4txt
Alignment = 2 'Center
BackColor = &H00000000&
BorderStyle = 0 'None
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 285
Left = 4440
TabIndex = 8
Top = 2760
Width = 1335
End
Begin VB.TextBox MD4txt
Alignment = 2 'Center
BackColor = &H00000000&
BorderStyle = 0 'None
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 285
Left = 4440
TabIndex = 7
Top = 2400
Width = 1335
End
Begin VB.TextBox Text1
Alignment = 2 'Center
Appearance = 0 'Flat
BackColor = &H00FF0000&
BorderStyle = 0 'None
DragMode = 1 'Automatic
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 285
Left = 4440
TabIndex = 6
Top = 1680
Width = 1335
End
Begin VB.TextBox AminoRxtxt
Alignment = 2 'Center
BackColor = &H00000000&
BorderStyle = 0 'None
BeginProperty Font
Name = "MS Sans Serif"
Size = 13.5
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000080FF&
Height = 495
Left = 1440
TabIndex = 5
Top = 720
Width = 3735
End
Begin VB.CommandButton FlatButton5
Caption = "Back"
Height = 375
Left = 2520
TabIndex = 4
Top = 4440
Width = 1575
End
Begin GoffsICU.ocxFormShape ocxFormShape1
Left = 360
Top = 4560
_ExtentX = 794
_ExtentY = 873
Shape = 4
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "o"
BeginProperty Font
Name = "Marlett"
Size = 21.75
Charset = 2
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H8000000E&
Height = 495
Index = 6
Left = 5880
TabIndex = 19
Top = 4440
Width = 495
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "Estimated Peak Level ="
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FFFF&
Height = 375
Index = 5
Left = 840
TabIndex = 16
Top = 3120
Width = 3255
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "Maintenance Dosage (mg) ="
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FFFF&
Height = 375
Index = 4
Left = 840
TabIndex = 15
Top = 2400
Width = 3615
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "Estimated Trough Level ="
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FFFF&
Height = 375
Index = 2
Left = 840
TabIndex = 14
Top = 3480
Width = 3495
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "Dosing Interval (hrs) ="
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FFFF&
Height = 375
Index = 3
Left = 840
TabIndex = 13
Top = 2760
Width = 3495
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "Half Life of Drug (hr) ="
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FFFF&
Height = 375
Index = 1
Left = 840
TabIndex = 12
Top = 2040
Width = 3255
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "Volume of Distribution (L) ="
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FFFF&
Height = 375
Index = 0
Left = 840
TabIndex = 11
Top = 1680
Width = 3495
End
Begin VB.Label Label11
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "Estimated Initial Dosage"
BeginProperty Font
Name = "Verdana"
Size = 14.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 375
Index = 0
Left = 840
TabIndex = 3
Top = 120
Width = 4455
End
Begin VB.Label Label11
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "Estimated Initial Dosage"
BeginProperty Font
Name = "Verdana"
Size = 14.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 375
Index = 1
Left = 810
TabIndex = 2
Top = 90
Width = 4455
End
Begin VB.Label Label107
BackStyle = 0 'Transparent
Caption = "Q"
BeginProperty Font
Name = "Wingdings 2"
Size = 15.75
Charset = 2
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000C000&
Height = 375
Index = 0
Left = 6000
TabIndex = 0
Top = 180
Width = 345
End
Begin VB.Label Label107
BackStyle = 0 'Transparent
Caption = "Q"
BeginProperty Font
Name = "Wingdings 2"
Size = 15.75
Charset = 2
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FFFF&
Height = 360
Index = 1
Left = 5970
TabIndex = 1
Top = 180
Visible = 0 'False
Width = 345
End
End
Attribute VB_Name = "Adjust1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub CandyButton1_Click()
End Sub
Private Sub Command1_Click()
'NextScreen "Adjustmentrx1"
End Sub
Private Sub FlatButton5_Click()
Unload Me
End Sub
Private Sub Form_Load()
Me.Left = Hemodynamics.Left + 100
Me.Top = Hemodynamics.Top + 900
SetTopMostWindow Me.hwnd, True
Adjjust
End Sub
Sub Adjjust()
Dim IMD As Single
Dim vw As Single
Dim vw1 As Single
Dim vw2 As Single
AminoRxtxt.Text = AminoRx
'PK = val(ActPeaktxt.text)
'TR = val(ActTroughtxt.text)
'MDAminog = val(MD3txt.text)
'DIAminog = val(DI3txt.text)
'TA = val(PKtxt.text)
'TB = val(TRtxt.text)
'KDAminog = (LOG(PK / TR)) / (DIAminog - t)
'AminoVolDistribution = (MDAminog * (1 - EXP(-1 * KDAminog * t))) / (KDAminog * t * (PK - (TR * EXP(-1 * KDAminog * t))))
'MDAminog = x * AminoVolDistribution * KDAminog * (1 - EXP(-1 * KDAminog * DIAminog)) / (1 - EXP(-1 * KDAminog * t))
'DIAminog = (-1 / KDAminog) * LOG(y / x) + t
'PE = MDAminog / AminoVolDistribution * (1 - EXP(-1 * KDAminog * t)) / (KDAminog * (1 - EXP(-1 * KDAminog * DIAminog)))
'TR = MDAminog * (EXP(KDAminog * t) - 1) / (KDAminog * AminoVolDistribution * (EXP(KDAminog * DIAminog) - 1))
kel = (Log(Pk / TR) / Log(10#)) / (TB - TA)
TH = Int(10 * 0.693 / kel) / 10
vd = ((MDAminog / t) / kel) * (1 - Exp(-1 * kel * t)) / (Pk - (TR * Exp(-1 * kel * (TB - t))))
tau = t + (-1 / kel) * (Log(Y / X) / Log(10#))
vw = kel * vd * X
vw1 = 1 - Exp(-1 * kel * tau)
vw2 = 1 - Exp(-1 * kel * t)
IMD = vw * (vw1 / vw2)
K:
VDtxt.Text = Format(vd / Dw, "#.000")
Halftxt.Text = Format(TH, "####.0")
MD4txt.Text = Format(IMD, "#####.0")
DI4txt.Text = Format(tau, "####.0")
EstPeaktxt.Text = Format(X, "####.0")
EstTroughtxt.Text = Format(Y, "####.0")
End Sub
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbLeftButton Then
ReleaseCapture
SendMessage Me.hwnd, WM_NCLBUTTONDOWN, HTCAPTION, 0&
End If
End Sub
Private Sub Label1_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbLeftButton Then
ReleaseCapture
SendMessage Me.hwnd, WM_NCLBUTTONDOWN, HTCAPTION, 0&
End If
End Sub
Private Sub Label107_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
Label107(0).Visible = False
Label107(1).Visible = True
End Sub
Private Sub Label107_MouseUp(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
Label107(1).Visible = False
Label107(0).Visible = True
Unload Me
End Sub
Private Sub Label11_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbLeftButton Then
ReleaseCapture
SendMessage Me.hwnd, WM_NCLBUTTONDOWN, HTCAPTION, 0&
End If
End Sub