home *** CD-ROM | disk | FTP | other *** search
Wrap
Sub bounce (picsrc As Form, picdest As Control) picsrc.ScaleMode = PIXEL picdest.ScaleMode = PIXEL hDestDC% = picdest.hDC X% = 0: Y% = 0 nWidth% = picdest.ScaleWidth nHeight% = picdest.ScaleHeight hSrcDC% = picsrc.hDC xsrc% = 0: ysrc% = summary.HEdit1.Top dwRop& = &HCC0020 SUC% = BitBlt(hDestDC%, X%, Y%, nWidth%, nHeight%, hSrcDC%, xsrc%, ysrc%, dwRop&) picsrc.ScaleMode = TWIPS picdest.ScaleMode = TWIPS End Sub Sub bounce2 (picsrc As Control, picdest As Control) picsrc.ScaleMode = PIXEL picdest.ScaleMode = PIXEL hDestDC% = picdest.hDC X% = 0: Y% = 0 nWidth% = picdest.ScaleWidth nHeight% = picdest.ScaleHeight hSrcDC% = picsrc.hDC xsrc% = 0: ysrc% = 0 dwRop& = &HCC0020 SUC% = BitBlt(hDestDC%, X%, Y%, nWidth%, nHeight%, hSrcDC%, xsrc%, ysrc%, dwRop&) picsrc.ScaleMode = TWIPS picdest.ScaleMode = TWIPS End Sub Sub clearoutine () screen.MousePointer = 11 LSet temprecord = clearrecord For n = 0 To 2 assess1.Option3D1(n).ForeColor = &HFF0000 Next n For n = 0 To 5 assess1.Option3D4(n).ForeColor = &HFF0000 Next n For n = 0 To 4 assess1.Option3D10(n).ForeColor = &HFF0000 Next n assess1.Label5.ForeColor = &HFF0000 assess1.BEdit2.Text = "" assess1.HEdit2.Text = "" idform.BEdit1.Text = "" idform.HEdit1.Text = "" idform.BEdit1.Visible = -1 idform.BEdit1.Text = " - - " idform.HEdit1.Visible = 0 idform.HEdit1.Enabled = -1 idform.AniButton4.Value = 1 idform.AniButton3(2).Value = 1 idform.Option3D1(0).Value = 0 idform.Option3D1(1).Value = 0 idform.Check3D1.Value = 0 picloc = 0 assess1.Option3D1(0).Value = 0 assess1.Option3D1(1).Value = 0 assess1.Option3D1(2).Value = 0 assess1.Option3D4(0).Value = 0 assess1.Option3D4(1).Value = 0 assess1.Option3D4(2).Value = 0 assess1.Option3D4(3).Value = 0 assess1.Option3D4(4).Value = 0 assess1.Option3D4(5).Value = 0 assess1.Option3D10(0).Value = 0 assess1.Option3D10(1).Value = 0 assess1.Option3D10(2).Value = 0 assess1.Option3D10(3).Value = 0 assess1.Option3D10(4).Value = 0 assess1.Check3D3(0).Value = 0 assess1.Check3D3(1).Value = 0 assess1.Check3D3(2).Value = 0 assess1.Check3D3(3).Value = 0 assess1.Check3D3(4).Value = 0 assess1.Check3D3(5).Value = 0 assess1.Check3D3(6).Value = 0 assess1.Check3D3(7).Value = 0 assess1.Check3D3(8).Value = 0 assess1.Check3D1.Value = 0 assess1.Check3D2.Value = 0 assess2.BEdit1(0).Text = "" assess2.BEdit1(1).Text = "" assess2.BEdit2(0).Text = "" assess2.BEdit2(1).Text = "" assess2.hedit1(0).Text = "" assess2.hedit1(1).Text = "" assess2.hedit2(0).Text = "" assess2.hedit2(1).Text = "" assess2.HEdit3.Text = "" medhist.Check3D1(0).Value = 0 medhist.Check3D1(1).Value = 0 medhist.Check3D1(2).Value = 0 medhist.Check3D1(3).Value = 0 medhist.Check3D1(4).Value = 0 medhist.Check3D1(5).Value = 0 medhist.Check3D1(6).Value = 0 medhist.Check3D1(7).Value = 0 medhist.Check3D2(0).Value = 0 medhist.Check3D2(1).Value = 0 medhist.Check3D2(2).Value = 0 medhist.Check3D2(3).Value = 0 medhist.Check3D2(4).Value = 0 medhist.Check3D2(5).Value = 0 medhist.Check3D2(6).Value = 0 medhist.Check3D2(7).Value = 0 medhist.Check3D3(0).Value = 0 medhist.Check3D3(1).Value = 0 medhist.Check3D3(2).Value = 0 medhist.Check3D3(3).Value = 0 medhist.Check3D3(4).Value = 0 medhist.Check3D3(5).Value = 0 medhist.Check3D3(6).Value = 0 medhist.Check3D3(7).Value = 0 medhist.Check3D4(0).Value = 0 medhist.Check3D4(1).Value = 0 medhist.Check3D4(2).Value = 0 medhist.Check3D4(3).Value = 0 medhist.Check3D4(4).Value = 0 medhist.Check3D4(5).Value = 0 medhist.Check3D4(6).Value = 0 medhist.Check3D4(7).Value = 0 Do While MDIChild1A.List1(1).ListCount MDIChild1A.List1(1).RemoveItem 0 Loop Do While MDIChild1B.List2(1).ListCount MDIChild1B.List2(1).RemoveItem 0 Loop Do While MDIChild1C.List3(1).ListCount MDIChild1C.List3(1).RemoveItem 0 Loop Do While summary.List2.ListCount summary.List2.RemoveItem 0 Loop screen.MousePointer = 0 End Sub Sub dispose () exitsave.Show 1 If admit.Picture1.Tag = "new" Then admit.Picture1.Cls admit.Picture1.AutoRedraw = -1 admit.Picture1.Scale (0, 0)-(3, 4) admit.Picture1.CurrentX = .8 admit.Picture1.CurrentY = 1.2 admit.Picture1.Print "CLICK" admit.Picture1.CurrentX = 1 admit.Picture1.CurrentY = 2 admit.Picture1.Print " TO" admit.Picture1.CurrentX = .8 admit.Picture1.CurrentY = 2.8 admit.Picture1.Print "BEGIN" clearoutine admit.Show End If End Sub Sub editswap (thebedit As Control, thehedit As Control, process As Integer) Select Case process Case 1 For n = 1 To Len(thebedit.Text) a$ = a$ + Mid$(thebedit.Text, n, 1) + Chr$(32) Next n thehedit.Text = Chr$(32) + a$ Case 2 For n = 1 To Len(thehedit.Text) If Mid$(thehedit.Text, n, 1) <> " " Then a$ = a$ + Mid$(thehedit.Text, n, 1) End If Next n thebedit.Text = a$ End Select End Sub Sub Endroutine () Unload admit Unload assess1 Unload assess2 Unload assess3 Unload idform Unload medhist Unload MDIMForm Unload summary End 'redundant but... End Sub Sub fillfields () nofocuscalls = -1 assess1.BEdit1.Text = patrecord.dayt assess1.BEdit2.Text = patrecord.tyme assess1.Option3D1(0).Value = patrecord.theoption.opt1 assess1.Option3D1(1).Value = patrecord.theoption.opt2 assess1.Option3D1(2).Value = patrecord.theoption.opt3 assess1.Option3D4(0).Value = patrecord.theoption.opt4 assess1.Option3D4(1).Value = patrecord.theoption.opt5 assess1.Option3D4(2).Value = patrecord.theoption.opt6 assess1.Option3D4(3).Value = patrecord.theoption.opt7 assess1.Option3D4(4).Value = patrecord.theoption.opt8 assess1.Option3D4(5).Value = patrecord.theoption.opt9 assess1.Option3D10(0).Value = patrecord.theoption.opt10 assess1.Option3D10(1).Value = patrecord.theoption.opt11 assess1.Option3D10(2).Value = patrecord.theoption.opt11 assess1.Option3D10(3).Value = patrecord.theoption.opt13 assess1.Option3D10(4).Value = patrecord.theoption.opt14 assess1.Check3D3(0).Value = patrecord.chicks.chek1 assess1.Check3D3(1).Value = patrecord.chicks.chek2 assess1.Check3D3(2).Value = patrecord.chicks.chek3 assess1.Check3D3(3).Value = patrecord.chicks.chek4 assess1.Check3D3(4).Value = patrecord.chicks.chek5 assess1.Check3D3(5).Value = patrecord.chicks.chek6 assess1.Check3D3(6).Value = patrecord.chicks.chek7 assess1.Check3D3(7).Value = patrecord.chicks.chek8 assess1.Check3D3(8).Value = patrecord.chicks.chek9 assess1.Check3D1.Value = patrecord.chk1 assess1.Check3D2.Value = patrecord.chk2 assess2.BEdit1(0).Text = patrecord.name assess2.BEdit1(1).Text = patrecord.relation assess2.BEdit2(0).Text = patrecord.home assess2.BEdit2(1).Text = patrecord.work assess2.hedit1(0).Text = patrecord.name assess2.hedit1(1).Text = patrecord.relation assess2.hedit2(0).Text = patrecord.home assess2.hedit2(1).Text = patrecord.work assess2.HEdit3.Text = patrecord.hed1 medhist.Check3D1(0).Value = patrecord.d1.shek1 medhist.Check3D1(1).Value = patrecord.d1.shek2 medhist.Check3D1(2).Value = patrecord.d1.shek3 medhist.Check3D1(3).Value = patrecord.d1.shek4 medhist.Check3D1(4).Value = patrecord.d1.shek5 medhist.Check3D1(5).Value = patrecord.d1.shek6 medhist.Check3D1(6).Value = patrecord.d1.shek7 medhist.Check3D1(7).Value = patrecord.d1.shek8 medhist.Check3D2(0).Value = patrecord.d2.shek1 medhist.Check3D2(1).Value = patrecord.d2.shek2 medhist.Check3D2(2).Value = patrecord.d2.shek3 medhist.Check3D2(3).Value = patrecord.d2.shek4 medhist.Check3D2(4).Value = patrecord.d2.shek5 medhist.Check3D2(5).Value = patrecord.d2.shek6 medhist.Check3D2(6).Value = patrecord.d2.shek7 medhist.Check3D2(7).Value = patrecord.d2.shek8 medhist.Check3D3(0).Value = patrecord.d3.shek1 medhist.Check3D3(1).Value = patrecord.d3.shek2 medhist.Check3D3(2).Value = patrecord.d3.shek3 medhist.Check3D3(3).Value = patrecord.d3.shek4 medhist.Check3D3(4).Value = patrecord.d3.shek5 medhist.Check3D3(5).Value = patrecord.d3.shek6 medhist.Check3D3(6).Value = patrecord.d3.shek7 medhist.Check3D3(7).Value = patrecord.d3.shek8 medhist.Check3D4(0).Value = patrecord.d4.shek1 medhist.Check3D4(1).Value = patrecord.d4.shek2 medhist.Check3D4(2).Value = patrecord.d4.shek3 medhist.Check3D4(3).Value = patrecord.d4.shek4 medhist.Check3D4(4).Value = patrecord.d4.shek5 medhist.Check3D4(5).Value = patrecord.d4.shek6 medhist.Check3D4(6).Value = patrecord.d4.shek7 medhist.Check3D4(7).Value = patrecord.d4.shek8 '*********************************************************** '****************************************************************** num = 0 If num < patrecord.mdi1count Then MDIChild1A.List1(1).AddItem patrecord.mdi1.fd1 num = num + 1 Else GoTo done1 End If If num < patrecord.mdi1count Then MDIChild1A.List1(1).AddItem patrecord.mdi1.fd2 num = num + 1 Else GoTo done1 End If If num < patrecord.mdi1count Then MDIChild1A.List1(1).AddItem patrecord.mdi1.fd3 num = num + 1 Else GoTo done1 End If If num < patrecord.mdi1count Then MDIChild1A.List1(1).AddItem patrecord.mdi1.fd4 num = num + 1 Else GoTo done1 End If If num < patrecord.mdi1count Then MDIChild1A.List1(1).AddItem patrecord.mdi1.fd5 num = num + 1 Else GoTo done1 End If If num < patrecord.mdi1count Then MDIChild1A.List1(1).AddItem patrecord.mdi1.fd6 num = num + 1 Else GoTo done1 End If If num < patrecord.mdi1count Then MDIChild1A.List1(1).AddItem patrecord.mdi1.fd7 num = num + 1 Else GoTo done1 End If If num < patrecord.mdi1count Then MDIChild1A.List1(1).AddItem patrecord.mdi1.fd8 num = num + 1 Else GoTo done1 End If If num < patrecord.mdi1count Then MDIChild1A.List1(1).AddItem patrecord.mdi1.fd9 num = num + 1 Else GoTo done1 End If If num < patrecord.mdi1count Then MDIChild1A.List1(1).AddItem patrecord.mdi1.fd10 num = num + 1 Else GoTo done1 End If If num < patrecord.mdi1count Then MDIChild1A.List1(1).AddItem patrecord.mdi1.fd11 num = num + 1 Else GoTo done1 End If If num < patrecord.mdi1count Then MDIChild1A.List1(1).AddItem patrecord.mdi1.fd12 num = num + 1 Else GoTo done1 End If If num < patrecord.mdi1count Then MDIChild1A.List1(1).AddItem patrecord.mdi1.fd13 num = num + 1 Else GoTo done1 End If If num < patrecord.mdi1count Then MDIChild1A.List1(1).AddItem patrecord.mdi1.fd14 num = num + 1 Else GoTo done1 End If If num < patrecord.mdi1count Then MDIChild1A.List1(1).AddItem patrecord.mdi1.fd15 num = num + 1 Else GoTo done1 End If If num < patrecord.mdi1count Then MDIChild1A.List1(1).AddItem patrecord.mdi1.fd16 num = num + 1 Else GoTo done1 End If If num < patrecord.mdi1count Then MDIChild1A.List1(1).AddItem patrecord.mdi1.fd17 num = num + 1 Else GoTo done1 End If If num < patrecord.mdi1count Then MDIChild1A.List1(1).AddItem patrecord.mdi1.fd18 num = num + 1 Else GoTo done1 End If If num < patrecord.mdi1count Then MDIChild1A.List1(1).AddItem patrecord.mdi1.fd19 num = num + 1 Else GoTo done1 End If If num < patrecord.mdi1count Then MDIChild1A.List1(1).AddItem patrecord.mdi1.fd20 num = num + 1 Else GoTo done1 End If '*********************************************************** done1: '*********************************************************** num = 0 If num < patrecord.mdi2count Then MDIChild1B.List2(1).AddItem patrecord.mdi2.fd1 num = num + 1 Else GoTo done2 End If If num < patrecord.mdi2count Then MDIChild1B.List2(1).AddItem patrecord.mdi2.fd2 num = num + 1 Else GoTo done2 End If If num < patrecord.mdi2count Then MDIChild1B.List2(1).AddItem patrecord.mdi2.fd3 num = num + 1 Else GoTo done2 End If If num < patrecord.mdi2count Then MDIChild1B.List2(1).AddItem patrecord.mdi2.fd4 num = num + 1 Else GoTo done2 End If If num < patrecord.mdi2count Then MDIChild1B.List2(1).AddItem patrecord.mdi2.fd5 num = num + 1 Else GoTo done2 End If If num < patrecord.mdi2count Then MDIChild1B.List2(1).AddItem patrecord.mdi2.fd6 num = num + 1 Else GoTo done2 End If If num < patrecord.mdi2count Then MDIChild1B.List2(1).AddItem patrecord.mdi2.fd7 num = num + 1 Else GoTo done2 End If If num < patrecord.mdi2count Then MDIChild1B.List2(1).AddItem patrecord.mdi2.fd8 num = num + 1 Else GoTo done2 End If If num < patrecord.mdi2count Then MDIChild1B.List2(1).AddItem patrecord.mdi2.fd9 num = num + 1 Else GoTo done2 End If If num < patrecord.mdi2count Then MDIChild1B.List2(1).AddItem patrecord.mdi2.fd10 num = num + 1 Else GoTo done2 End If If num < patrecord.mdi2count Then MDIChild1B.List2(1).AddItem patrecord.mdi2.fd11 num = num + 1 Else GoTo done2 End If If num < patrecord.mdi2count Then MDIChild1B.List2(1).AddItem patrecord.mdi2.fd12 num = num + 1 Else GoTo done2 End If If num < patrecord.mdi2count Then MDIChild1B.List2(1).AddItem patrecord.mdi2.fd13 num = num + 1 Else GoTo done2 End If If num < patrecord.mdi2count Then MDIChild1B.List2(1).AddItem patrecord.mdi2.fd14 num = num + 1 Else GoTo done2 End If If num < patrecord.mdi2count Then MDIChild1B.List2(1).AddItem patrecord.mdi2.fd15 num = num + 1 Else GoTo done2 End If If num < patrecord.mdi2count Then MDIChild1B.List2(1).AddItem patrecord.mdi2.fd16 num = num + 1 Else GoTo done2 End If If num < patrecord.mdi2count Then MDIChild1B.List2(1).AddItem patrecord.mdi2.fd17 num = num + 1 Else GoTo done2 End If If num < patrecord.mdi2count Then MDIChild1B.List2(1).AddItem patrecord.mdi2.fd18 num = num + 1 Else GoTo done2 End If If num < patrecord.mdi2count Then MDIChild1B.List2(1).AddItem patrecord.mdi2.fd19 num = num + 1 Else GoTo done2 End If If num < patrecord.mdi2count Then MDIChild1B.List2(1).AddItem patrecord.mdi2.fd20 num = num + 1 Else GoTo done2 End If done2: '******************************************************************* num = 0 If num < patrecord.mdi3count Then MDIChild1C.List3(1).AddItem patrecord.mdi3.fd1 num = num + 1 Else GoTo done3 End If If num < patrecord.mdi3count Then MDIChild1C.List3(1).AddItem patrecord.mdi3.fd2 num = num + 1 Else GoTo done3 End If If num < patrecord.mdi3count Then MDIChild1C.List3(1).AddItem patrecord.mdi3.fd3 num = num + 1 Else GoTo done3 End If If num < patrecord.mdi3count Then MDIChild1C.List3(1).AddItem patrecord.mdi3.fd4 num = num + 1 Else GoTo done3 End If If num < patrecord.mdi3count Then MDIChild1C.List3(1).AddItem patrecord.mdi3.fd5 num = num + 1 Else GoTo done3 End If If num < patrecord.mdi3count Then MDIChild1C.List3(1).AddItem patrecord.mdi3.fd6 num = num + 1 Else GoTo done3 End If If num < patrecord.mdi3count Then MDIChild1C.List3(1).AddItem patrecord.mdi3.fd7 num = num + 1 Else GoTo done3 End If If num < patrecord.mdi3count Then MDIChild1C.List3(1).AddItem patrecord.mdi3.fd8 num = num + 1 Else GoTo done3 End If If num < patrecord.mdi3count Then MDIChild1C.List3(1).AddItem patrecord.mdi3.fd9 num = num + 1 Else GoTo done3 End If If num < patrecord.mdi3count Then MDIChild1C.List3(1).AddItem patrecord.mdi3.fd10 num = num + 1 Else GoTo done3 End If If num < patrecord.mdi3count Then MDIChild1C.List3(1).AddItem patrecord.mdi3.fd11 num = num + 1 Else GoTo done3 End If If num < patrecord.mdi3count Then MDIChild1C.List3(1).AddItem patrecord.mdi3.fd12 num = num + 1 Else GoTo done3 End If If num < patrecord.mdi3count Then MDIChild1C.List3(1).AddItem patrecord.mdi3.fd13 num = num + 1 Else GoTo done3 End If If num < patrecord.mdi3count Then MDIChild1C.List3(1).AddItem patrecord.mdi3.fd14 num = num + 1 Else GoTo done3 End If If num < patrecord.mdi3count Then MDIChild1C.List3(1).AddItem patrecord.mdi3.fd15 num = num + 1 Else GoTo done3 End If If num < patrecord.mdi3count Then MDIChild1C.List3(1).AddItem patrecord.mdi3.fd16 num = num + 1 Else GoTo done3 End If If num < patrecord.mdi3count Then MDIChild1C.List3(1).AddItem patrecord.mdi3.fd17 num = num + 1 Else GoTo done3 End If If num < patrecord.mdi3count Then MDIChild1C.List3(1).AddItem patrecord.mdi3.fd18 num = num + 1 Else GoTo done3 End If If num < patrecord.mdi3count Then MDIChild1C.List3(1).AddItem patrecord.mdi3.fd19 num = num + 1 Else GoTo done3 End If If num < patrecord.mdi3count Then MDIChild1C.List3(1).AddItem patrecord.mdi3.fd20 num = num + 1 Else GoTo done3 End If done3: '****************************************************** num = 0 If num < patrecord.sumcount Then summary.List2.AddItem patrecord.sum1.fd1 num = num + 1 Else GoTo sumdone End If If num < patrecord.sumcount Then summary.List2.AddItem patrecord.sum1.fd2 num = num + 1 Else GoTo sumdone End If If num < patrecord.sumcount Then summary.List2.AddItem patrecord.sum1.fd3 num = num + 1 Else GoTo sumdone End If If num < patrecord.sumcount Then summary.List2.AddItem patrecord.sum1.fd4 num = num + 1 Else GoTo sumdone End If If num < patrecord.sumcount Then summary.List2.AddItem patrecord.sum1.fd5 num = num + 1 Else GoTo sumdone End If If num < patrecord.sumcount Then summary.List2.AddItem patrecord.sum1.fd6 num = num + 1 Else GoTo sumdone End If If num < patrecord.sumcount Then summary.List2.AddItem patrecord.sum1.fd7 num = num + 1 Else GoTo sumdone End If If num < patrecord.sumcount Then summary.List2.AddItem patrecord.sum1.fd8 num = num + 1 Else GoTo sumdone End If If num < patrecord.sumcount Then summary.List2.AddItem patrecord.sum1.fd9 num = num + 1 Else GoTo sumdone End If If num < patrecord.sumcount Then summary.List2.AddItem patrecord.sum1.fd10 num = num + 1 Else GoTo sumdone End If If num < patrecord.sumcount Then summary.List2.AddItem patrecord.sum1.fd11 num = num + 1 Else GoTo sumdone End If If num < patrecord.sumcount Then summary.List2.AddItem patrecord.sum1.fd12 num = num + 1 Else GoTo sumdone End If If num < patrecord.sumcount Then summary.List2.AddItem patrecord.sum1.fd13 num = num + 1 Else GoTo sumdone End If If num < patrecord.sumcount Then summary.List2.AddItem patrecord.sum1.fd14 num = num + 1 Else GoTo sumdone End If If num < patrecord.sumcount Then summary.List2.AddItem patrecord.sum1.fd15 num = num + 1 Else GoTo sumdone End If If num < patrecord.sumcount Then summary.List2.AddItem patrecord.sum1.fd16 num = num + 1 Else GoTo sumdone End If If num < patrecord.sumcount Then summary.List2.AddItem patrecord.sum1.fd17 num = num + 1 Else GoTo sumdone End If If num < patrecord.sumcount Then summary.List2.AddItem patrecord.sum1.fd18 num = num + 1 Else GoTo sumdone End If If num < patrecord.sumcount Then summary.List2.AddItem patrecord.sum1.fd19 num = num + 1 Else GoTo sumdone End If If num < patrecord.sumcount Then summary.List2.AddItem patrecord.sum1.fd20 num = num + 1 Else GoTo sumdone End If sumdone: nofocuscalls = 0 End Sub Function FINALCHECK () As Integer FINALCHECK = -1 If Not ok.idf Then MsgBox "The Identification Form Is Not Complete", 0, "FinalCheck" FINALCHECK = 0 Exit Function End If If Not ok.ass1 Then MsgBox "The Admission Form Is Not Complete", 0, "FinalCheck" FINALCHECK = 0 Exit Function End If If Not ok.ass2 Then MsgBox "The Diagnosis Form Is Not Complete", 0, "FinalCheck" FINALCHECK = 0 Exit Function End If 'If Not ok.medh Then 'MsgBox "The History Form Is Not Complete", 0, "FinalCheck" 'FINALCHECK = 0 'Exit Function 'End If 'If Not ok.ass3 Then 'MsgBox "The Physical Form Is Not Complete", 0, "FinalCheck" 'FINALCHECK = 0 'Exit Function 'End If If Not ok.mdif Then MsgBox "The Clinical Form Is Not Complete", 0, "FinalCheck" FINALCHECK = 0 Exit Function End If If Not ok.sumf Then MsgBox "The Summary Form Is Not Complete", 0, "FinalCheck" FINALCHECK = 0 Exit Function End If End Function Sub formcheck (where$) MsgBox "You Have Not Completed " + Chr$(13) + "The Necessary Entries " + Chr$(13) + "On The " + where$, 48, "SMARTFORM" End Sub Sub getfields () LSet patrecord = temprecord patrecord.theoption.opt2 = assess1.Option3D1(1).Value patrecord.theoption.opt3 = assess1.Option3D1(2).Value patrecord.theoption.opt5 = assess1.Option3D4(1).Value patrecord.theoption.opt6 = assess1.Option3D4(2).Value patrecord.theoption.opt7 = assess1.Option3D4(3).Value patrecord.theoption.opt8 = assess1.Option3D4(4).Value patrecord.theoption.opt9 = assess1.Option3D4(5).Value patrecord.theoption.opt11 = assess1.Option3D10(1).Value patrecord.theoption.opt12 = assess1.Option3D10(2).Value patrecord.theoption.opt13 = assess1.Option3D10(3).Value patrecord.theoption.opt14 = assess1.Option3D10(4).Value patrecord.chicks.chek1 = assess1.Check3D3(0).Value patrecord.chicks.chek2 = assess1.Check3D3(1).Value patrecord.chicks.chek3 = assess1.Check3D3(2).Value patrecord.chicks.chek4 = assess1.Check3D3(3).Value patrecord.chicks.chek5 = assess1.Check3D3(4).Value patrecord.chicks.chek6 = assess1.Check3D3(5).Value patrecord.chicks.chek7 = assess1.Check3D3(6).Value patrecord.chicks.chek8 = assess1.Check3D3(7).Value patrecord.chicks.chek9 = assess1.Check3D3(8).Value patrecord.d1.shek1 = medhist.Check3D1(0).Value patrecord.d1.shek2 = medhist.Check3D1(1).Value patrecord.d1.shek3 = medhist.Check3D1(2).Value patrecord.d1.shek4 = medhist.Check3D1(3).Value patrecord.d1.shek5 = medhist.Check3D1(4).Value patrecord.d1.shek6 = medhist.Check3D1(5).Value patrecord.d1.shek7 = medhist.Check3D1(6).Value patrecord.d1.shek8 = medhist.Check3D1(7).Value patrecord.d2.shek1 = medhist.Check3D2(0).Value patrecord.d2.shek2 = medhist.Check3D2(1).Value patrecord.d2.shek3 = medhist.Check3D2(2).Value patrecord.d2.shek4 = medhist.Check3D2(3).Value patrecord.d2.shek5 = medhist.Check3D2(4).Value patrecord.d2.shek6 = medhist.Check3D2(5).Value patrecord.d2.shek7 = medhist.Check3D2(6).Value patrecord.d2.shek8 = medhist.Check3D2(7).Value patrecord.d3.shek1 = medhist.Check3D3(0).Value patrecord.d3.shek2 = medhist.Check3D3(1).Value patrecord.d3.shek3 = medhist.Check3D3(2).Value patrecord.d3.shek4 = medhist.Check3D3(3).Value patrecord.d3.shek5 = medhist.Check3D3(4).Value patrecord.d3.shek6 = medhist.Check3D3(5).Value patrecord.d3.shek7 = medhist.Check3D3(6).Value patrecord.d3.shek8 = medhist.Check3D3(7).Value patrecord.d4.shek1 = medhist.Check3D4(0).Value patrecord.d4.shek2 = medhist.Check3D4(1).Value patrecord.d4.shek3 = medhist.Check3D4(2).Value patrecord.d4.shek4 = medhist.Check3D4(3).Value patrecord.d4.shek5 = medhist.Check3D4(4).Value patrecord.d4.shek6 = medhist.Check3D4(5).Value patrecord.d4.shek7 = medhist.Check3D4(6).Value patrecord.d4.shek8 = medhist.Check3D4(7).Value '*********************************************************** '****************************************************************** num = 0 If MDIChild1A.List1(1).ListCount < num Then patrecord.mdi1.fd1 = MDIChild1A.List1(1).List(0) num = num + 1 End If If MDIChild1A.List1(1).ListCount < num Then patrecord.mdi1.fd2 = MDIChild1A.List1(1).List(1) num = num + 1 End If If MDIChild1A.List1(1).ListCount < num Then patrecord.mdi1.fd3 = MDIChild1A.List1(1).List(2) num = num + 1 End If If MDIChild1A.List1(1).ListCount < num Then patrecord.mdi1.fd4 = MDIChild1A.List1(1).List(3) num = num + 1 End If If MDIChild1A.List1(1).ListCount < num Then patrecord.mdi1.fd5 = MDIChild1A.List1(1).List(4) num = num + 1 End If If MDIChild1A.List1(1).ListCount < num Then patrecord.mdi1.fd6 = MDIChild1A.List1(1).List(5) num = num + 1 End If If MDIChild1A.List1(1).ListCount < num Then patrecord.mdi1.fd7 = MDIChild1A.List1(1).List(6) num = num + 1 End If If MDIChild1A.List1(1).ListCount < num Then patrecord.mdi1.fd8 = MDIChild1A.List1(1).List(7) num = num + 1 End If If MDIChild1A.List1(1).ListCount < num Then patrecord.mdi1.fd9 = MDIChild1A.List1(1).List(8) num = num + 1 End If If MDIChild1A.List1(1).ListCount < num Then patrecord.mdi1.fd10 = MDIChild1A.List1(1).List(9) num = num + 1 End If If MDIChild1A.List1(1).ListCount < num Then patrecord.mdi1.fd11 = MDIChild1A.List1(1).List(10) num = num + 1 End If If MDIChild1A.List1(1).ListCount < num Then patrecord.mdi1.fd12 = MDIChild1A.List1(1).List(11) num = num + 1 End If If MDIChild1A.List1(1).ListCount < num Then patrecord.mdi1.fd13 = MDIChild1A.List1(1).List(12) num = num + 1 End If If MDIChild1A.List1(1).ListCount < num Then patrecord.mdi1.fd14 = MDIChild1A.List1(1).List(13) num = num + 1 End If If MDIChild1A.List1(1).ListCount < num Then patrecord.mdi1.fd15 = MDIChild1A.List1(1).List(14) num = num + 1 End If If MDIChild1A.List1(1).ListCount < num Then patrecord.mdi1.fd16 = MDIChild1A.List1(1).List(15) num = num + 1 End If If MDIChild1A.List1(1).ListCount < num Then patrecord.mdi1.fd17 = MDIChild1A.List1(1).List(16) num = num + 1 End If If MDIChild1A.List1(1).ListCount < num Then patrecord.mdi1.fd18 = MDIChild1A.List1(1).List(17) num = num + 1 End If If MDIChild1A.List1(1).ListCount < num Then patrecord.mdi1.fd19 = MDIChild1A.List1(1).List(18) num = num + 1 End If If MDIChild1A.List1(1).ListCount < num Then patrecord.mdi1.fd20 = MDIChild1A.List1(1).List(19) num = num + 1 End If patrecord.mdi1count = num '******************************************************************* num = 0 If MDIChild1B.List2(1).ListCount < num Then patrecord.mdi2.fd1 = MDIChild1B.List2(1).List(0) num = num + 1 End If If MDIChild1B.List2(1).ListCount < num Then patrecord.mdi2.fd2 = MDIChild1B.List2(1).List(1) num = num + 1 End If If MDIChild1B.List2(1).ListCount < num Then patrecord.mdi2.fd3 = MDIChild1B.List2(1).List(2) num = num + 1 End If If MDIChild1B.List2(1).ListCount < num Then patrecord.mdi2.fd4 = MDIChild1B.List2(1).List(3) num = num + 1 End If If MDIChild1B.List2(1).ListCount < num Then patrecord.mdi2.fd5 = MDIChild1B.List2(1).List(4) num = num + 1 End If If MDIChild1B.List2(1).ListCount < num Then patrecord.mdi2.fd6 = MDIChild1B.List2(1).List(5) num = num + 1 End If If MDIChild1B.List2(1).ListCount < num Then patrecord.mdi2.fd7 = MDIChild1B.List2(1).List(6) num = num + 1 End If If MDIChild1B.List2(1).ListCount < num Then patrecord.mdi2.fd8 = MDIChild1B.List2(1).List(7) num = num + 1 End If If MDIChild1B.List2(1).ListCount < num Then patrecord.mdi2.fd9 = MDIChild1B.List2(1).List(8) num = num + 1 End If If MDIChild1B.List2(1).ListCount < num Then patrecord.mdi2.fd10 = MDIChild1B.List2(1).List(9) num = num + 1 End If If MDIChild1B.List2(1).ListCount < num Then patrecord.mdi2.fd11 = MDIChild1B.List2(1).List(10) num = num + 1 End If If MDIChild1B.List2(1).ListCount < num Then patrecord.mdi2.fd12 = MDIChild1B.List2(1).List(11) num = num + 1 End If If MDIChild1B.List2(1).ListCount < num Then patrecord.mdi2.fd13 = MDIChild1B.List2(1).List(12) num = num + 1 End If If MDIChild1B.List2(1).ListCount < num Then patrecord.mdi2.fd14 = MDIChild1B.List2(1).List(13) num = num + 1 End If If MDIChild1B.List2(1).ListCount < num Then patrecord.mdi2.fd15 = MDIChild1B.List2(1).List(14) num = num + 1 End If If MDIChild1B.List2(1).ListCount < num Then patrecord.mdi2.fd16 = MDIChild1B.List2(1).List(15) num = num + 1 End If If MDIChild1B.List2(1).ListCount < num Then patrecord.mdi2.fd17 = MDIChild1B.List2(1).List(16) num = num + 1 End If If MDIChild1B.List2(1).ListCount < num Then patrecord.mdi2.fd18 = MDIChild1B.List2(1).List(17) num = num + 1 End If If MDIChild1B.List2(1).ListCount < num Then patrecord.mdi2.fd19 = MDIChild1B.List2(1).List(18) num = num + 1 End If If MDIChild1B.List2(1).ListCount < num Then patrecord.mdi2.fd20 = MDIChild1B.List2(1).List(19) num = num + 1 End If patrecord.mdi2count = num '****************************************************************** num = 0 If MDIChild1C.List3(1).ListCount < num Then patrecord.mdi3.fd1 = MDIChild1C.List3(1).List(0) num = num + 1 End If If MDIChild1C.List3(1).ListCount < num Then patrecord.mdi3.fd2 = MDIChild1C.List3(1).List(1) num = num + 1 End If If MDIChild1C.List3(1).ListCount < num Then patrecord.mdi3.fd3 = MDIChild1C.List3(1).List(2) num = num + 1 End If If MDIChild1C.List3(1).ListCount < num Then patrecord.mdi3.fd4 = MDIChild1C.List3(1).List(3) num = num + 1 End If If MDIChild1C.List3(1).ListCount < num Then patrecord.mdi3.fd5 = MDIChild1C.List3(1).List(4) num = num + 1 End If If MDIChild1C.List3(1).ListCount < num Then patrecord.mdi3.fd6 = MDIChild1C.List3(1).List(5) num = num + 1 End If If MDIChild1C.List3(1).ListCount < num Then patrecord.mdi3.fd7 = MDIChild1C.List3(1).List(6) num = num + 1 End If If MDIChild1C.List3(1).ListCount < num Then patrecord.mdi3.fd8 = MDIChild1C.List3(1).List(7) num = num + 1 End If If MDIChild1C.List3(1).ListCount < num Then patrecord.mdi3.fd9 = MDIChild1C.List3(1).List(8) num = num + 1 End If If MDIChild1C.List3(1).ListCount < num Then patrecord.mdi3.fd10 = MDIChild1C.List3(1).List(9) num = num + 1 End If If MDIChild1C.List3(1).ListCount < num Then patrecord.mdi3.fd11 = MDIChild1C.List3(1).List(10) num = num + 1 End If If MDIChild1C.List3(1).ListCount < num Then patrecord.mdi3.fd12 = MDIChild1C.List3(1).List(11) num = num + 1 End If If MDIChild1C.List3(1).ListCount < num Then patrecord.mdi3.fd13 = MDIChild1C.List3(1).List(12) num = num + 1 End If If MDIChild1C.List3(1).ListCount < num Then patrecord.mdi3.fd14 = MDIChild1C.List3(1).List(13) num = num + 1 End If If MDIChild1C.List3(1).ListCount < num Then patrecord.mdi3.fd15 = MDIChild1C.List3(1).List(14) num = num + 1 End If If MDIChild1C.List3(1).ListCount < num Then patrecord.mdi3.fd16 = MDIChild1C.List3(1).List(15) num = num + 1 End If If MDIChild1C.List3(1).ListCount < num Then patrecord.mdi3.fd17 = MDIChild1C.List3(1).List(16) num = num + 1 End If If MDIChild1C.List3(1).ListCount < num Then patrecord.mdi3.fd18 = MDIChild1C.List3(1).List(17) num = num + 1 End If If MDIChild1C.List3(1).ListCount < num Then patrecord.mdi3.fd19 = MDIChild1C.List3(1).List(18) num = num + 1 End If If MDIChild1C.List3(1).ListCount < num Then patrecord.mdi3.fd20 = MDIChild1C.List3(1).List(19) num = num + 1 End If patrecord.mdi3count = num '****************************************************************** num = 0 If summary.List2.ListCount < num Then patrecord.sum1.fd1 = summary.List2.List(0) num = num + 1 Else GoTo donesum End If If summary.List2.ListCount < num Then patrecord.sum1.fd2 = summary.List2.List(1) num = num + 1 Else GoTo donesum End If If summary.List2.ListCount < num Then patrecord.sum1.fd3 = summary.List2.List(2) num = num + 1 Else GoTo donesum End If If summary.List2.ListCount < num Then patrecord.sum1.fd4 = summary.List2.List(3) num = num + 1 Else GoTo donesum End If If summary.List2.ListCount < num Then patrecord.sum1.fd5 = summary.List2.List(4) num = num + 1 Else GoTo donesum End If If summary.List2.ListCount < num Then patrecord.sum1.fd6 = summary.List2.List(5) num = num + 1 Else GoTo donesum End If If summary.List2.ListCount < num Then patrecord.sum1.fd7 = summary.List2.List(6) num = num + 1 Else GoTo donesum End If If summary.List2.ListCount < num Then patrecord.sum1.fd8 = summary.List2.List(7) num = num + 1 Else GoTo donesum End If If summary.List2.ListCount < num Then patrecord.sum1.fd9 = summary.List2.List(8) num = num + 1 Else GoTo donesum End If If summary.List2.ListCount < num Then patrecord.sum1.fd10 = summary.List2.List(9) num = num + 1 Else GoTo donesum End If If summary.List2.ListCount < num Then patrecord.sum1.fd11 = summary.List2.List(10) num = num + 1 Else GoTo donesum End If If summary.List2.ListCount < num Then patrecord.sum1.fd12 = summary.List2.List(11) num = num + 1 Else GoTo donesum End If If summary.List2.ListCount < num Then patrecord.sum1.fd13 = summary.List2.List(12) num = num + 1 Else GoTo donesum End If If summary.List2.ListCount < num Then patrecord.sum1.fd14 = summary.List2.List(13) num = num + 1 Else GoTo donesum End If If summary.List2.ListCount < num Then patrecord.sum1.fd15 = summary.List2.List(14) num = num + 1 Else GoTo donesum End If If summary.List2.ListCount < num Then patrecord.sum1.fd16 = summary.List2.List(15) num = num + 1 Else GoTo donesum End If If summary.List2.ListCount < num Then patrecord.sum1.fd17 = summary.List2.List(16) num = num + 1 Else GoTo donesum End If If summary.List2.ListCount < num Then patrecord.sum1.fd18 = summary.List2.List(17) num = num + 1 Else GoTo donesum End If If summary.List2.ListCount < num Then patrecord.sum1.fd19 = summary.List2.List(18) num = num + 1 Else GoTo donesum End If If summary.List2.ListCount < num Then patrecord.sum1.fd20 = summary.List2.List(20) num = num + 1 Else GoTo donesum End If donesum: patrecord.sumcount = num End Sub Sub highlight (foo As Form, group As Integer, myindex As Integer) Select Case group Case 3 For n = 0 To group - 1 If n <> myindex And foo.Option3D1(n).ForeColor = &H0& Then foo.Option3D1(n).ForeColor = &HFF0000 End If Next n foo.Option3D1(myindex).ForeColor = &H0& Case 6 For n = 0 To group - 1 If n <> myindex And foo.Option3D4(n).ForeColor = &H0& Then foo.Option3D4(n).ForeColor = &HFF0000 End If Next n foo.Option3D4(myindex).ForeColor = &H0& Case 5 For n = 0 To group - 1 If n <> myindex And foo.Option3D10(n).ForeColor = &H0& Then foo.Option3D10(n).ForeColor = &HFF0000 If n = 4 Then foo.Label5.ForeColor = &HFF0000 End If Next n foo.Option3D10(myindex).ForeColor = &H0& End Select End Sub ' COPYRIGHT: ' ' (C) Copyright Microsoft Corp. 1993. All rights reserved. ' ' You have a royalty-free right to use, modify, reproduce and ' distribute the Sample Files (and/or any modified version) in ' any way you find useful, provided that you agree that ' Microsoft has no warranty obligations or liability for any ' Sample Application Files which are modified. ' Sub main () admit.Show End Sub Sub menumode (fooey As Form) menu1.Show 1 Select Case menuchoice Case "new" admit.Picture1.Cls admit.Picture1.AutoRedraw = -1 admit.Picture1.Scale (0, 0)-(3, 4) admit.Picture1.CurrentX = .8 admit.Picture1.CurrentY = 1.2 admit.Picture1.Print "CLICK" admit.Picture1.CurrentX = 1 admit.Picture1.CurrentY = 2 admit.Picture1.Print " TO" admit.Picture1.CurrentX = .6 admit.Picture1.CurrentY = 2.8 admit.Picture1.Print "RETURN" clearoutine admit.Show If admit.Tag <> "cover" Then fooey.Hide Case "one" idform.Show If fooey.Tag <> "id" Then fooey.Hide Case "two" assess1.Show If fooey.Tag <> "admission" Then fooey.Hide Case "three" screen.MousePointer = 11 assess2.Show If fooey.Tag <> "diagnosis" Then fooey.Hide screen.MousePointer = 0 Case "four" screen.MousePointer = 11 medhist.Show If fooey.Tag <> "history" Then fooey.Hide screen.MousePointer = 0 Case "five" screen.MousePointer = 11 assess3.Show If fooey.Tag <> "physical" Then fooey.Hide screen.MousePointer = 0 Case "six" screen.MousePointer = 11 MDIMForm.Show If fooey.Tag <> "clinical" Then fooey.Hide screen.MousePointer = 0 Case "seven" screen.MousePointer = 11 summary.Show If fooey.Tag <> "summary" Then fooey.Hide screen.MousePointer = 0 Case "eight" 'clear dispose Case "nine" 'save dispose Case "ten" 'exit dispose Case "eleven" 'cancel End Select End Sub Sub restorebody (tid$) Static oldID As String Static test As Integer If LTrim$(RTrim$(tid$)) <> LTrim$(RTrim$(oldID)) Then screen.MousePointer = 11 assess3.Picture1.Picture = LoadPicture(tid$ + ".bmp") screen.MousePointer = 0 test = -1 End If End Sub Sub restoredata (cpID As Long) ' set global string for load on demand screen.MousePointer = 11 Open "health.dat" For Random As #1 Len = Len(patrecord) numrecs = LOF(1) \ Len(patrecord) For n = 1 To numrecs Get #1, n, patrecord If cpID = patrecord.patid Then recindex = n Exit For End If Next n Close #1 If cpID = patrecord.patid Then fillfields On Error Resume Next 'kludge for now!! If Not newflag Then ID$ = Left$(LTrim$(Str$(cpID)), 4) + "body" inkID$ = Left$(LTrim$(Str$(cpID)), 4) + "ink" restorebody ID$ summary.Picture1.Picture = LoadPicture(inkID$ + ".BMP") End If Else recindex = 0 End If screen.MousePointer = 0 End Sub Sub savedata () getfields On Error Resume Next SavePicture summary.Picture1.Picture, LTrim$(RTrim$(inkID$)) + ".bmp" Open "health.dat" For Random As #1 Len = Len(patrecord) If recindex <> 0 Then Put #1, recindex, patrecord Else Put #1, numrecs + 1, patrecord End If Close #1 End Sub Sub saveproc () screen.MousePointer = 11 SavePicture assess3.Picture3.Image, LTrim$(RTrim$(ID$)) + ".bmp" screen.MousePointer = 0 savedata End Sub Function smartform (which As Integer) As Integer If TYPECHECK Then Select Case which Case 1 If temprecord.sex <> 0 And temprecord.patid <> 0 Then ok.idf = -1 smartform = -1 End If Case 2 If temprecord.dayt <> "" And temprecord.tyme <> "" And temprecord.theoption.opt1 And temprecord.theoption.opt4 And temprecord.theoption.opt10 And temprecord.chk1 And temprecord.chk2 Then ok.ass1 = -1 smartform = -1 End If Case 3 If LTrim$(temprecord.name) <> "" And LTrim$(temprecord.relation) <> "" And LTrim$(temprecord.home) <> "" And LTrim$(temprecord.work) <> "" And LTrim$(temprecord.hed1) <> "" Then ok.ass2 = -1 smartform = -1 End If Case 4 ok.medh = -1 smartform = -1 Case 5 If picloc Then ok.ass3 = -1 smartform = -1 End If Case 6 If MDIChild1A.List1(1).ListCount > 0 And MDIChild1B.List2(1).ListCount > 0 And MDIChild1C.List3(1).ListCount > 0 Then ok.mdif = -1 smartform = -1 End If Case 7 If summary.List2.ListCount > 0 Then ok.sumf = -1 smartform = -1 End If End Select Else smartform = -1 End If End Function Function validID (IDstring As String) As Long validID = 0 For n = 1 To Len(IDstring) If Mid$(IDstring, n, 1) <> "-" Then c$ = c$ + Mid$(IDstring, n, 1) End If Next IDstring = c$ ' Look for a match For i = 1 To 3 'uses constants for testing If Val(LTrim$(RTrim$(IDstring))) = patientID(i) Then validID = patientID(i) found = -1 Exit For End If Next i If Not found Then Open "health.dat" For Random As #1 Len = Len(patrecord) numrecs = LOF(1) \ Len(patrecord) For n = 1 To numrecs Get #1, n, patrecord If Val(LTrim$(RTrim$(IDstring))) = patrecord.patid Then recindex = n Exit For End If Next n Close #1 If Val(LTrim$(RTrim$(IDstring))) = patrecord.patid Then validID = patrecord.patid ID$ = Left$(LTrim$(Str$(cpID)), 4) + "body" inkID$ = Left$(LTrim$(Str$(cpID)), 4) + "ink" Else recindex = 0 End If End If End Function