Dim group As Integer

Sub Form_Load ()
bedit1.charset = ALC_NUMERIC Or ALC_PUNC Or ALC_MATH Or ALC_GESTURE
bedit2.charset = ALC_NUMERIC Or ALC_PUNC Or ALC_MATH Or ALC_GESTURE
hedit1.charset = ALC_NUMERIC Or ALC_PUNC Or ALC_MATH Or ALC_GESTURE
hedit2.charset = ALC_NUMERIC Or ALC_PUNC Or ALC_MATH Or ALC_GESTURE
    For n = 0 To 2
        option3d1(n).forecolor = &HFF0000
        Next n
    For n = 0 To 5
        option3d4(n).forecolor = &HFF0000
        Next n
    For n = 0 To 4
        option3d10(n).forecolor = &HFF0000
        Next n
        label5.forecolor = &HFF0000
ASSESS1.Move -screen.width - 10, 0, screen.width, screen.height
bedit1.text = "  /  /"
bedit2.text = "  :  :"
frame3d1.caption = NextCompanyCaption$
frame3d1.Move ASSESS1.scaleleft, ASSESS1.scaletop, ASSESS1.scalewidth, ASSESS1.scaleheight
picture1.Move frame3d1.left, frame3d1.top + 2.5 * TextHeight(frame3d1.caption), frame3d1.width, frame3d1.height \ 2 - 2 * TextHeight(frame3d1.caption)
picture2.Move frame3d1.left, frame3d1.height \ 2 + TextHeight(check3d1.caption), frame3d1.width, frame3d1.height \ 2 - anibutton1(0).height
bedit1.Move .5, 0, picture1.scalewidth / 3.1, picture1.scaleheight / 6
hedit1.Move .5, 0, picture1.scalewidth / 3.1, picture1.scaleheight / 5.5
label1.fontname = "arial"
label1.fontsize = 12
label1.caption = "DATE"
label1.Move 0, 0, picture1.scalewidth / 12, picture1.scaleheight / 6
anibutton3(0).Move bedit1.width + bedit1.left + anibutton3(0).width, 0
bedit2.Move 3.5, 0, picture1.scalewidth / 3.1, picture1.scaleheight / 6
hedit2.Move 3.5, 0, picture1.scalewidth / 3.1, picture1.scaleheight / 5.5
label2.fontname = "arial"
label2.fontsize = 12
label2.caption = "TIME"
label2.Move 3, 0, picture1.scalewidth / 12, picture1.scaleheight / 6

picture3.Move 0, 1, picture1.scalewidth / 3, picture1.scaleheight * .66
picture4.Move 2, 1, picture1.scalewidth * .67, picture1.scaleheight * .66
check3d1.Move 1, 5
anibutton1(0).Move frame3d1.width - anibutton1(0).width * 1.1, frame3d1.height - anibutton1(0).height * 1.1
anibutton1(1).Move .1 * anibutton1(1).width, frame3d1.height - anibutton1(0).height * 1.1
anibutton2.Move (frame3d1.width - anibutton2.width) / 2, frame3d1.height - anibutton2.height * 1.3
picture3.Scale (1, 1)-(3, 4)
label3.Move 1, 1, picture3.scalewidth / 2, picture3.scaleheight / 2
label3.fontname = "arial"
label3.fontsize = 12
label3.caption = "                         MODE OF ADMISSION"
option3d1(0).Move 2, 1, picture3.scalewidth / 2, picture3.scaleheight / 3
option3d1(1).Move 2, 2, picture3.scalewidth / 2, picture3.scaleheight / 3
option3d1(2).Move 2, 3, picture3.scalewidth / 2, picture3.scaleheight / 3
picture4.Scale (1, 1)-(4, 4)
label4.Move 1, 1, picture4.scalewidth / 3, picture4.scaleheight / 2
label4.fontname = "arial"
label4.fontsize = 12
label4.caption = "                         ADMITTED        FROM:"
option3d4(0).Move 2, 1, picture4.scalewidth * .33, picture3.scaleheight / 3
option3d4(1).Move 2, 2, picture4.scalewidth * .33, picture3.scaleheight / 3
option3d4(2).Move 2, 3, picture4.scalewidth * .33, picture3.scaleheight / 3
option3d4(3).Move 3, 1, picture4.scalewidth * .33, picture3.scaleheight / 3
option3d4(4).Move 3, 2, picture4.scalewidth * .33, picture3.scaleheight / 3
option3d4(5).Move 3, 3, picture4.scalewidth * .33, picture3.scaleheight / 3
picture2.Scale (1, 1)-(5, 2)
picture5.Move 1, 1, picture2.scalewidth / 2, picture2.scaleheight
picture6.Move 3, 1, picture2.scalewidth / 2, picture2.scaleheight
picture5.Scale (1, 1)-(5, 10): picture6.Scale (1, 1)-(5, 12)
picture5.fontname = "arial": picture6.fontname = "arial"
picture5.fontsize = 12: picture6.fontsize = 12
picture5.currentx = 1: picture5.currenty = 1
picture6.currentx = 1: picture6.currenty = 1
picture5.autoredraw = -1: picture6.autoredraw = -1
picture5.Print "     INFORMATION GIVEN BY:"
picture6.Print "ORIENTATION TO ROOM "
option3d10(0).Move 1, 2, picture5.scalewidth, picture5.scaleheight / 8
option3d10(1).Move 1, 3, picture5.scalewidth, picture5.scaleheight / 8
option3d10(2).Move 1, 4, picture5.scalewidth, picture5.scaleheight / 8
option3d10(3).Move 1, 5, picture5.scalewidth, picture5.scaleheight / 8
option3d10(4).Move 1, 6, picture5.scalewidth, picture5.scaleheight / 8
label5.caption = "    PATIENT UNRESPONSIVE OR CONFUSED" + Chr$(13) + Chr$(10) + "     NOT ACCOMPANIED BY FAMILY OR FRIEND"
label5.Move 1, 7.1, picture5.scalewidth, picture5.scaleheight / 7
check3d2.Move 3.5, 1, picture6.scalewidth, picture6.scaleheight / 10
For n = 1 To 9
check3d3(n - 1).Move 1, n + 1, picture6.scalewidth, picture6.scaleheight / 10
Next n
ASSESS1.Move 0, 0
End Sub

Sub Check3D1_Click (value As Integer)

If check3d1.value = -1 Then
temprecord.chk1 = -1
check3d1.forecolor = &H0&
Else
check3d1.forecolor = &HFF0000
End If
End Sub

Sub Picture1_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
'label1.caption = Str$(x) + " " + Str$(y)
End Sub

Sub AniButton1_Click (index As Integer)
If smartform(2) Then

        If index = 0 Then
        assess2.Show
        ASSESS1.Hide
        Else
        idform.Show
        ASSESS1.Hide
        End If
Else
formcheck "Admission"
End If
End Sub

Sub AniButton2_Click ()
If smartform(2) Then
menumode ASSESS1
Else
formcheck "Admission"
End If

End Sub

Sub Check3D3_Click (index As Integer, value As Integer)
If check3d3(index).value = -1 Then
temprecord.chicks.chek1 = -1
check3d3(index).forecolor = &H0&
Else
check3d3(index).forecolor = &HFF0000
End If
check3d2.SetFocus
End Sub

Sub Check3D2_Click (value As Integer)
If check3d2.value = -1 Then
temprecord.chk2 = -1
check3d2.forecolor = &H0&
Else
check3d2.forecolor = &HFF0000
End If

End Sub

Sub Option3D4_Click (index As Integer, value As Integer)

option3d4(index).forecolor = &H0&

group = 6
'highlight assess1, group, index

If index = 5 Then
BEditform.label1.tag = " Enter Location Prior To Admission"
BEditform.command2.tag = " Re-Enter Location Prior To Admission"
BEditform.Show 1
End If

temprecord.theoption.opt4 = -1
If Not nofocuscalls Then check3d1.SetFocus

End Sub

Sub Option3D1_Click (index As Integer, value As Integer)

option3d1(index).forecolor = &H0&

group = 3

'highlight assess1, group, index

temprecord.theoption.opt1 = -1
If Not nofocuscalls Then check3d1.SetFocus
End Sub

Sub Option3D10_Click (index As Integer, value As Integer)

option3d10(index).forecolor = &H0&


If index = 4 Then label5.forecolor = &H0&
group = 5
'highlight assess1, group, index

temprecord.theoption.opt10 = -1

If Not nofocuscalls Then check3d1.SetFocus

End Sub

Sub AniButton3_Click (index As Integer)

Select Case anibutton3(index).value
    Case 2
    editswap bedit1, hedit1, 1
    hedit1.visible = -1
    bedit1.visible = 0
    editswap bedit2, hedit2, 1
    hedit2.visible = -1
    bedit2.visible = 0
    temprecord.tyme = bedit2.text
    temprecord.dayt = bedit1.text
    Case 1
    editswap bedit1, hedit1, 2
    hedit1.visible = 0
    bedit1.visible = -1
    editswap bedit2, hedit2, 2
    hedit2.visible = 0
    bedit2.visible = -1

End Select

End Sub

Sub BEdit1_Update ()
'bedit1.text = "  /  /"
If bedit1.selstart = 7 Then
If Mid$(bedit1.text, 3, 1) <> "/" Or Mid$(bedit1.text, 6, 1) <> "/" Then
    For n = 1 To Len(bedit1.text)
        If n = 3 Or n = 6 Then
            a$ = a$ + "/"
            'a$ = a$ + Mid$(bedit1.text, n, 1)
        Else
            a$ = a$ + Mid$(bedit1.text, n, 1)
        End If
    Next n
    bedit1.text = a$
End If
bedit1.selstart = 8
End If
End Sub

Sub BEdit2_Update ()
'bedit2.text = "  :  :  "
If bedit2.selstart = 7 Then
If Mid$(bedit2.text, 3, 1) <> ":" Or Mid$(bedit2.text, 6, 1) <> ":" Then
    For n = 1 To Len(bedit2.text)
        If n = 3 Or n = 6 Then
            a$ = a$ + ":"
            'a$ = a$ + Mid$(bedit2.text, n, 1)
        Else
            a$ = a$ + Mid$(bedit2.text, n, 1)
        End If
    Next n
    bedit2.text = a$
End If
bedit2.selstart = 8
End If
End Sub

