Subject |
Re: Form to Form |
From |
Lee Grant <camilee@nospam.comcast.net> |
Date |
Sun, 11 Jun 2023 18:19:47 -0400 |
Newsgroups |
dbase.getting-started |
Attachment(s) |
gridMervyn.wfm, editpatMervyn.wfm |
Peter,
Incidentally, here are the two .wfm's (same name as the originals, so
save them with a different name if you need to) with the changes I've
made so far for you to check and see if they are in keeping with what
you really wanted to happen....and then all that should be left is the
actual selection and display of the proper record.
Lee
|
** END HEADER -- do not remove this line
//
// Generated on 06/04/2023
//
parameter bModal
local f
f = new gridtestForm()
if (bModal)
f.mdi = false // ensure not MDI
f.readModal()
else
f.open()
endif
class gridtestForm of FORM
set procedure to editpatMervyn.wfm additive
with (this)
metric = 6 // Pixels
height = 459.0
left = -93.0
top = 15.0
width = 926.0
text = "EDIT PATIENT DATA"
autoCenter = true
sizeable = false
moveable = false
maximize = false
minimize = false
endwith
this.DATABASE1 = new DATABASE(this)
with (this.DATABASE1)
left = 728.0
top = 11.0
width = 53.0
height = 37.0
databaseName = "MYTEST"
active = true
endwith
this.PATIENT1 = new QUERY(this)
with (this.PATIENT1)
onOpen = class::PATIENT1_ONOPEN
left = 7.0
top = 396.0
sql = "select * from patientmervyn"
active = true
endwith
this.TEXT1 = new TEXT(this)
with (this.TEXT1)
height = 30.0
left = 65.0
top = 25.0
width = 356.0
fontSize = 14.0
fontBold = true
text = "Enter Patient ID or Patient Last Name"
endwith
this.ENTRYFIELD1 = new ENTRYFIELD(this)
with (this.ENTRYFIELD1)
onKey = class::ENTRYFIELD1_onKey
height = 33.0
left = 64.0
top = 66.0
width = 248.0
function = "!"
fontSize = 14.0
value = ""
endwith
this.GRID1 = new GRID(this)
with (this.GRID1)
dataLink = form.patient1.rowset
columns["COLUMN1"] = new GRIDCOLUMN(form.GRID1)
with (columns["COLUMN1"])
dataLink = form.patient1.rowset.fields["pat_no"]
editorType = 1 // EntryField
width = 70.0
endwith
columns["COLUMN2"] = new GRIDCOLUMN(form.GRID1)
with (columns["COLUMN2"])
dataLink = form.patient1.rowset.fields["lname"]
editorType = 1 // EntryField
width = 150.0
endwith
columns["COLUMN3"] = new GRIDCOLUMN(form.GRID1)
with (columns["COLUMN3"])
dataLink = form.patient1.rowset.fields["fname"]
editorType = 1 // EntryField
width = 150.0
endwith
columns["COLUMN4"] = new GRIDCOLUMN(form.GRID1)
with (columns["COLUMN4"])
dataLink = form.patient1.rowset.fields["addr2"]
editorType = 1 // EntryField
width = 199.0
endwith
columns["COLUMN5"] = new GRIDCOLUMN(form.GRID1)
with (columns["COLUMN5"])
dataLink = form.patient1.rowset.fields["dob"]
editorType = 1 // EntryField
width = 120.0
endwith
with (columns["COLUMN1"].headingControl)
value = "Patient #"
endwith
with (columns["COLUMN2"].headingControl)
value = "Last Name"
endwith
with (columns["COLUMN3"].headingControl)
value = "First Name"
endwith
with (columns["COLUMN4"].headingControl)
value = "Address"
endwith
with (columns["COLUMN5"].headingControl)
value = "DOB"
endwith
cellHeight = 22.0
rowSelect = true
allowRowSizing = false
allowColumnSizing = false
allowColumnMoving = false
allowEditing = false
allowAddRows = false
visible = false
height = 297.0
left = 21.0
top = 110.0
width = 707.0
endwith
this.PBSEARCH = new PUSHBUTTON(this)
with (this.PBSEARCH)
onClick = class::PBSEARCH_ONCLICK
height = 39.0
left = 750.0
top = 77.0
width = 107.0
text = "SEARCH"
fontSize = 12.0
fontBold = true
endwith
this.PBGOEDIT = new PUSHBUTTON(this)
with (this.PBGOEDIT)
onClick = class::PBGOEDIT_ONCLICK
visible = false
height = 39.0
left = 750.0
top = 133.0
width = 107.0
text = "GO TO"
fontSize = 12.0
fontBold = true
endwith
this.PBQUIT = new PUSHBUTTON(this)
with (this.PBQUIT)
onClick = class::PBQUIT_ONCLICK
height = 39.0
left = 750.0
top = 214.0
width = 107.0
text = "QUIT"
fontSize = 12.0
fontBold = true
endwith
this.rowset = this.patient1.rowset
function PBSEARCH_onclick()
if ISBLANK(form.ENTRYFIELD1.value)
//play sound filename chord.wav
msgbox("Can't search without an entry.","NOTE",0)
FORM.ENTRYFIELD1.setfocus()
else
if isalpha(form.ENTRYFIELD1.value)
form.patient1.rowset.indexName := "upboth"
else
form.patient1.rowset.indexName := "pat_no"
endif
if not form.patient1.rowset.FINDKEY(form.ENTRYFIELD1.value)
form.ENTRYFIELD1.value=""
form.grid1.visible:= false
//play sound filename chord.wav
msgbox("This patient not found","ERROR",0)
form.ENTRYFIELD1.setfocus()
else
form.grid1.refresh()
form.PBGOEDIT.visible:= true
form.grid1.visible := true
form.grid1.setfocus()
endif
endif
return
function PATIENT1_onOpen
set procedure to editpatMervyn.wfm
form.editpatMervyn = new editpatMervynForm()
form.editpatMervyn.parent = form //Open path back to gridtest
//to editpatMervyn to facilitate requery().
return
function ENTRYFIELD1_onKey(nChar, nPosition,bShift,bControl)
local cVal
if len(this.value) <> 0 //Avoid error if entryfield is cleared
//If Enter or Tab press, execute the function pbedit_onClick
if nChar = 13 or nChar = 9
form.PBGoEdit_onClick()
endif
//Check first character and set appropriate index
if nPosition = 2 and not isAlpha(this.value)
form.PATIENT1.rowset.indexname = 'pat_no'
endif
if nPosition = 2 and isAlpha(this.value)
form.PATIENT1.rowset.indexname = 'upboth'
endif
//Change rowpointer
//findKey() requires a variable, not an object property,
//as its argument hence the use of cVal instead of this.value
if isAlpha(this.value)
cVal = trim(this.value)
form.PATIENT1.rowset.findkey(cVal)
else
cVal = this.value
form.Patient1.rowset.findkey(cVal)
endif
endif
return
function PBGOEDIT_onClick
private cpat_no,clname
store "" to cpat_no,clname
//patient1 is name of main program query
cpat_no = form.patient1.rowset.fields["pat_no"].value
clname = form.patient1.rowset.fields["lname"].value
msgbox("cpat_no: "+cpat_no) //this shows correct pat_no
//query1 is name of editpatMervyn program query
form.editpatMervyn.query1.rowset.findkey(cpat_no)
//form.editpatMervyn.query1.requery()
//clname = form.editpatMervyn.query1.rowset.fields["lname"].value
msgbox("clname: "+clname) // this shows Last Name of rowset.first()
//there is no change in rowset in "findkey(cpat_no)" above
form.editpatMervyn.mdi = false
form.editpatMervyn.readmodal()
return
function PBQUIT_onClick()
form.patient1.active = false
local f
f = findinstance("editpatMervynForm")
do while not empty(f)
f.close()
f = findinstance("editpatMervynForm",f)
enddo
form.editpatMervyn = null
close databases
form.close()
return true
endclass
| //set procedure to lookins1.wfm additive
//set procedure to lookins2.wfm additive
** END HEADER -- do not remove this line
//
// Generated on 05/05/2023
//
parameter bModal
local f
f = new EditPatMervynForm()
if (bModal)
f.mdi = false // ensure not MDI
f.readModal()
else
f.open()
endif
class EditPatMervynForm of FORM
with (this)
onOpen = class::FORM_ONOPEN
scaleFontSize = 12.0
metric = 6 // Pixels
height = 619.0
left = 0.0
top = 12.0
width = 920.0
text = ""
autoCenter = true
sizeable = false
moveable = false
sysMenu = false
maximize = false
minimize = false
sysMenu = false
endwith
this.DATABASE1 = new DATABASE(this)
with (this.DATABASE1)
left = 728.0
top = 11.0
width = 53.0
height = 37.0
databaseName = "MYTEST"
active = true
endwith
this.QUERY1 = new QUERY(this)
with (this.QUERY1)
left = 812.0
top = 11.0
width = 39.0
height = 37.0
database = form.database1
databaseName = "MYTEST"
sql = "select * from patientmervyn"
active = true
indexName = "pat_no"
endwith
this.QUERY2Inscode1 = new QUERY(this)
with (this.QUERY2Inscode1)
left = 812.0
top = 11.0
width = 39.0
height = 37.0
database = form.database1
databaseName = "MYTEST"
//sql = "select * from ins_info" // where ins_code=upper(:ins_code)"
//params["ins_code"] = ""
//active = true
endwith
this.TEXT1 = new TEXT(this)
with (this.TEXT1)
height = 27.0
left = 56.0
top = 11.0
width = 203.0
fontSize = 15.0
fontBold = true
text = "EDIT PATIENT DATA"
endwith
this.TEXTPATNO = new TEXT(this)
with (this.TEXTPATNO)
height = 25.0
left = 329.0
top = 15.0
width = 80.0
fontSize = 12.0
text = "Patient ID:"
endwith
this.ENTRYFIELDPATNO = new ENTRYFIELD(this)
with (this.ENTRYFIELDPATNO)
when = {;return .f.}
dataLink = form.query1.rowset.fields["pat_no"]
height = 28.0
left = 406.0
top = 11.0
width = 65.0
fontSize = 14.0
endwith
this.TEXTLNAME = new TEXT(this)
with (this.TEXTLNAME)
height = 22.0
left = 21.0
top = 55.0
width = 84.0
fontSize = 12.0
text = "Last Name"
endwith
this.ENTRYFIELDLNAME = new ENTRYFIELD(this)
with (this.ENTRYFIELDLNAME)
dataLink = form.query1.rowset.fields["lname"]
height = 26.0
left = 105.0
top = 55.0
width = 190.0
fontName = "Courier"
fontSize = 12.0
endwith
this.TEXTTITLE = new TEXT(this)
with (this.TEXTTITLE)
height = 22.0
left = 322.0
top = 55.0
width = 35.0
fontSize = 12.0
text = "<p>Title</p><p></p>"
endwith
this.ENTRYFIELDTITLE = new ENTRYFIELD(this)
with (this.ENTRYFIELDTITLE)
dataLink = form.query1.rowset.fields["title"]
height = 26.0
left = 357.0
top = 55.0
width = 55.0
fontName = "Courier"
fontSize = 12.0
endwith
this.TEXTFNAME = new TEXT(this)
with (this.TEXTFNAME)
height = 22.0
left = 441.0
top = 55.0
width = 84.0
fontSize = 12.0
text = "First Name"
endwith
this.ENTRYFIELDFNAME = new ENTRYFIELD(this)
with (this.ENTRYFIELDFNAME)
dataLink = form.query1.rowset.fields["fname"]
height = 26.0
left = 529.0
top = 55.0
width = 238.0
fontName = "Courier"
fontSize = 12.0
endwith
this.TEXTMI = new TEXT(this)
with (this.TEXTMI)
height = 22.0
left = 784.0
top = 55.0
width = 28.0
fontSize = 12.0
text = "<p>MI</p><p></p>"
endwith
this.ENTRYFIELDMI = new ENTRYFIELD(this)
with (this.ENTRYFIELDMI)
dataLink = form.query1.rowset.fields["mi"]
height = 26.0
left = 815.0
top = 55.0
width = 25.0
fontName = "Courier"
fontSize = 12.0
endwith
this.TEXTADDR1 = new TEXT(this)
with (this.TEXTADDR1)
height = 22.0
left = 56.0
top = 89.0
width = 35.0
fontSize = 12.0
text = "C/O"
endwith
this.ENTRYFIELDADDR1 = new ENTRYFIELD(this)
with (this.ENTRYFIELDADDR1)
dataLink = form.query1.rowset.fields["addr1"]
height = 26.0
left = 105.0
top = 89.0
width = 217.0
fontName = "Courier"
fontSize = 12.0
endwith
this.TEXTADDR2 = new TEXT(this)
with (this.TEXTADDR2)
height = 22.0
left = 35.0
top = 127.0
width = 61.0
fontSize = 12.0
text = "Address"
endwith
this.ENTRYFIELDADDR2 = new ENTRYFIELD(this)
with (this.ENTRYFIELDADDR2)
dataLink = form.query1.rowset.fields["addr2"]
height = 26.0
left = 105.0
top = 122.0
width = 280.0
fontName = "Courier"
fontSize = 12.0
endwith
this.TEXTCITY = new TEXT(this)
with (this.TEXTCITY)
height = 22.0
left = 406.0
top = 127.0
width = 35.0
fontSize = 12.0
text = "City"
endwith
this.ENTRYFIELDCITY = new ENTRYFIELD(this)
with (this.ENTRYFIELDCITY)
dataLink = form.query1.rowset.fields["city"]
height = 26.0
left = 442.0
top = 122.0
width = 237.0
fontName = "Courier"
fontSize = 12.0
endwith
this.TEXTST = new TEXT(this)
with (this.TEXTST)
height = 22.0
left = 700.0
top = 127.0
width = 42.0
fontSize = 12.0
text = "State"
endwith
this.ENTRYFIELDST = new ENTRYFIELD(this)
with (this.ENTRYFIELDST)
dataLink = form.query1.rowset.fields["st"]
height = 26.0
left = 749.0
top = 122.0
width = 28.0
fontName = "Courier"
fontSize = 12.0
endwith
this.TEXTZIP = new TEXT(this)
with (this.TEXTZIP)
height = 22.0
left = 789.0
top = 127.0
width = 32.0
fontSize = 12.0
text = "Zip"
endwith
this.ENTRYFIELDZIP = new ENTRYFIELD(this)
with (this.ENTRYFIELDZIP)
dataLink = form.query1.rowset.fields["zip"]
height = 26.0
left = 819.0
top = 122.0
width = 55.0
picture = "99999"
fontName = "Courier"
fontSize = 12.0
endwith
this.TEXTHPH = new TEXT(this)
with (this.TEXTHPH)
height = 16.0
left = 21.0
top = 155.0
width = 94.0
fontSize = 12.0
text = "Home Phone"
endwith
this.ENTRYFIELDHPHONE = new ENTRYFIELD(this)
with (this.ENTRYFIELDHPHONE)
dataLink = form.query1.rowset.fields["hphone"]
height = 22.0
left = 126.0
top = 155.0
width = 127.0
picture = "(999)999-9999"
fontName = "Courier"
fontSize = 12.0
endwith
this.TEXTBPH = new TEXT(this)
with (this.TEXTBPH)
height = 22.0
left = 273.0
top = 155.0
width = 117.0
fontSize = 12.0
text = "Business Phone"
endwith
this.ENTRYFIELDBPH = new ENTRYFIELD(this)
with (this.ENTRYFIELDBPH)
dataLink = form.query1.rowset.fields["bphone"]
height = 22.0
left = 399.0
top = 155.0
width = 127.0
picture = "(999)999-9999"
fontName = "Courier"
fontSize = 12.0
endwith
this.TEXTBEXT = new TEXT(this)
with (this.TEXTBEXT)
height = 22.0
left = 546.0
top = 155.0
width = 30.0
fontSize = 12.0
text = "Ext."
endwith
this.ENTRYFIELDBEXT = new ENTRYFIELD(this)
with (this.ENTRYFIELDBEXT)
dataLink = form.query1.rowset.fields["bext"]
height = 22.0
left = 581.0
top = 155.0
width = 47.0
picture = "!!!!!!!"
fontName = "Courier"
fontSize = 12.0
endwith
this.TEXTCPH = new TEXT(this)
with (this.TEXTCPH)
height = 22.0
left = 28.0
top = 182.0
width = 84.0
fontSize = 12.0
text = "Cell Phone"
endwith
this.ENTRYFIELDCPH = new ENTRYFIELD(this)
with (this.ENTRYFIELDCPH)
dataLink = form.query1.rowset.fields["cphone"]
height = 26.0
left = 126.0
top = 182.0
width = 127.0
picture = "(999)999-9999"
fontName = "Courier"
fontSize = 12.0
endwith
this.TEXTSEX = new TEXT(this)
with (this.TEXTSEX)
height = 24.0
left = 273.0
top = 190.0
width = 63.0
fontSize = 12.0
text = "Gender"
endwith
this.RADIOBUTTONMALE = new RADIOBUTTON(this)
with (this.RADIOBUTTONMALE)
dataLink = form.query1.rowset.fields["sex"]
height = 24.0
left = 336.0
top = 182.0
width = 66.0
text = "Male"
fontSize = 12.0
group = true
value = iif(form.query1.rowset.fields["sex"].value=true,true,false)
endwith
this.RADIOBUTTONFEMALE = new RADIOBUTTON(this)
with (this.RADIOBUTTONFEMALE)
dataLink = form.query1.rowset.fields["sex"]
height = 20.0
left = 336.0
top = 204.0
width = 72.0
text = "Female"
fontSize = 12.0
value = iif(form.query1.rowset.fields["sex"].value=false,true,false)
endwith
this.TEXTSSNO = new TEXT(this)
with (this.TEXTSSNO)
height = 24.0
left = 434.0
top = 182.0
width = 126.0
fontSize = 12.0
text = "Social Security #"
endwith
this.ENTRYFIELDSSNO = new ENTRYFIELD(this)
with (this.ENTRYFIELDSSNO)
dataLink = form.query1.rowset.fields["ssno"]
height = 26.0
left = 560.0
top = 182.0
width = 109.0
picture = "999-99-9999"
function = "R"
fontName = "Courier"
fontSize = 12.0
endwith
this.TEXTMBI = new TEXT(this)
with (this.TEXTMBI)
height = 24.0
left = 686.0
top = 182.0
width = 35.0
fontSize = 12.0
text = "MBI"
endwith
this.ENTRYFIELDMBI = new ENTRYFIELD(this)
with (this.ENTRYFIELDMBI)
dataLink = form.query1.rowset.fields["mbi"]
height = 26.0
left = 728.0
top = 182.0
width = 132.0
picture = "9A!9-A!9-AA99"
function = "R!"
fontName = "Courier"
fontSize = 12.0
endwith
this.TEXTBILLTO = new TEXT(this)
with (this.TEXTBILLTO)
height = 22.0
left = 21.0
top = 225.0
width = 108.0
fontSize = 12.0
text = "Send Bills To:"
endwith
this.RADIOBUTTONBILLTOPAT = new RADIOBUTTON(this)
with (this.RADIOBUTTONBILLTOPAT)
dataLink = form.query1.rowset.fields["bill_to"]
height = 22.0
left = 126.0
top = 216.0
width = 70.0
text = "Patient"
fontSize = 12.0
group = true
value = iif(form.query1.rowset.fields["bill_to"].value=true,true,false)
endwith
this.RADIOBUTTONBILLTOOTHER = new RADIOBUTTON(this)
with (this.RADIOBUTTONBILLTOOTHER)
dataLink = form.query1.rowset.fields["bill_to"]
height = 22.0
left = 127.0
top = 237.0
width = 70.0
text = "Other"
fontSize = 12.0
value = iif(form.query1.rowset.fields["bill_to"].value=false,true,false)
endwith
this.TEXTDOB = new TEXT(this)
with (this.TEXTDOB)
height = 22.0
left = 462.0
top = 220.0
width = 98.0
wrap = false
colorNormal = "BtnText"
alignVertical = 2 // Bottom
fontSize = 12.0
text = "Date of Birth"
endwith
this.ENTRYFIELDDOB = new ENTRYFIELD(this)
with (this.ENTRYFIELDDOB)
onGotFocus = {;keyboard "{Home}"}
onLostFocus = class::ENTRYFIELDDOB_ONLOSTFOCUS
valid = class::ENTRYFIELDDOB_VALID
dataLink = form.query1.rowset.fields["dob"]
height = 26.0
left = 560.0
top = 220.0
width = 100.0
picture = "99/99/9999"
function = "@D"
colorHighLight = "WindowText/0xffff80"
fontName = "Courier"
fontSize = 12.0
validRequired = true
validErrorMsg = "Invalid Date of Birth"
borderStyle = 7 // Client
endwith
this.TEXTSHOWAGE = new TEXT(this)
with (this.TEXTSHOWAGE)
height = 22.0
left = 686.0
top = 220.0
width = 38.0
fontSize = 12.0
text = "Age"
endwith
this.ENTRYFIELDSHOWAGE = new ENTRYFIELD(this)
with (this.ENTRYFIELDSHOWAGE)
when = {;return .f.}
height = 26.0
left = 728.0
top = 220.0
width = 41.0
fontName = "Courier"
fontSize = 12.0
value = " 67"
borderStyle = 7 // Client
endwith
this.RECTANGLE1 = new RECTANGLE(this)
with (this.RECTANGLE1)
left = 28.0
top = 264.0
width = 854.0
height = 195.0
text = ""
colorNormal = "BtnText/Silver"
borderStyle = 9 // Etched In
endwith
this.TEXTINS1ID = new TEXT(this)
with (this.TEXTINS1ID)
height = 22.0
left = 35.0
top = 276.0
width = 42.0
colorNormal = "BtnText/Silver"
fontSize = 12.0
text = "Ins 1"
endwith
this.ENTRYFIELDINS1ID = new ENTRYFIELD(this)
with (this.ENTRYFIELDINS1ID)
//onRightMouseDown = class::ENTRYFIELDINS1ID_ONRMD
//onLostFocus = class::ENTRYFIELDIns1ID_OLF
onKey = class::ENTRYFIELDINS1ID_ONKEY
//dataLink = form.query1.rowset.fields[1]
height = 26.0
left = 82.0
top = 275.0
width = 33.0
fontName = "Courier"
fontSize = 12.0
picture = "!!"
value = " "
maxLength = 2
endwith
this.ENTRYFIELDINS1NAME = new ENTRYFIELD(this)
with (this.ENTRYFIELDINS1NAME)
when = {;return .f.}
height = 26.0
left = 126.0
top = 275.0
width = 370.0
fontName = "Courier"
fontSize = 12.0
maxLength = 40
endwith
this.TEXTINS1NO = new TEXT(this)
with (this.TEXTINS1NO)
height = 22.0
left = 553.0
top = 276.0
width = 53.0
colorNormal = "BtnText/Silver"
fontSize = 12.0
text = "Ins 1 #"
endwith
this.ENTRYFIELDINS1NO = new ENTRYFIELD(this)
with (this.ENTRYFIELDINS1NO)
dataLink = form.query1.rowset.fields["ins1no"]
height = 26.0
left = 610.0
top = 275.0
width = 235.0
fontName = "Courier"
fontSize = 12.0
endwith
this.TEXTINS1GRPNO = new TEXT(this)
with (this.TEXTINS1GRPNO)
height = 22.0
left = 35.0
top = 304.0
width = 84.0
colorNormal = "BtnText/Silver"
fontSize = 12.0
text = "Ins 1 Grp #"
endwith
this.ENTRYFIELDINS1GRPID = new ENTRYFIELD(this)
with (this.ENTRYFIELDINS1GRPID)
dataLink = form.query1.rowset.fields["ins1_gr"]
height = 26.0
left = 126.0
top = 304.0
width = 190.0
fontName = "Courier"
fontSize = 12.0
endwith
this.TEXTINS1POL = new TEXT(this)
with (this.TEXTINS1POL)
height = 22.0
left = 369.0
top = 309.0
width = 132.0
colorNormal = "BtnText/Silver"
fontSize = 12.0
text = "Ins 1 Policy Holder"
endwith
this.RADIOBUTTONINS1PHPAT = new RADIOBUTTON(this)
with (this.RADIOBUTTONINS1PHPAT)
dataLink = form.query1.rowset.fields["ins1_ph"]
height = 24.0
left = 507.0
top = 302.0
width = 78.0
text = "P"
colorNormal = "BtnText/Silver"
fontSize = 12.0
group = true
value = iif(form.query1.rowset.fields["ins1_ph"].value=true,true,false)
endwith
this.RADIOBUTTONINS1PHOTHER = new RADIOBUTTON(this)
with (this.RADIOBUTTONINS1PHOTHER)
dataLink = form.query1.rowset.fields["ins1_ph"]
height = 20.0
left = 507.0
top = 323.0
width = 78.0
text = "O"
colorNormal = "BtnText/Silver"
fontSize = 12.0
value = iif(form.query1.rowset.fields["ins1_ph"].value=false,true,false)
endwith
this.TEXTINS1NOTES = new TEXT(this)
with (this.TEXTINS1NOTES)
height = 22.0
left = 560.0
top = 304.0
width = 84.0
colorNormal = "BtnText/Silver"
fontSize = 12.0
text = "Ins 1 Notes"
endwith
this.ENTRYFIELDINS1NOTES = new ENTRYFIELD(this)
with (this.ENTRYFIELDINS1NOTES)
dataLink = form.query1.rowset.fields["ins1notes"]
height = 26.0
left = 653.0
top = 304.0
width = 192.0
function = "!"
fontName = "Courier"
fontSize = 12.0
endwith
this.TEXTINS2ID = new TEXT(this)
with (this.TEXTINS2ID)
height = 22.0
left = 35.0
top = 346.0
width = 42.0
colorNormal = "BtnText/Silver"
fontSize = 12.0
text = "Ins 2 "
endwith
this.ENTRYFIELDINS2ID = new ENTRYFIELD(this)
with (this.ENTRYFIELDINS2ID)
dataLink = form.query1.rowset.fields["ins2"]
height = 26.0
left = 82.0
top = 346.0
width = 33.0
fontName = "Courier"
fontSize = 12.0
picture = "!!"
value = " "
maxLength = 2
endwith
this.ENTRYFIELDINS2NAME = new ENTRYFIELD(this)
with (this.ENTRYFIELDINS2NAME)
when = {;return .f.}
height = 26.0
left = 126.0
top = 346.0
width = 370.0
fontName = "Courier"
fontSize = 12.0
value = ""
maxLength = 40
endwith
this.TEXTINS2NO = new TEXT(this)
with (this.TEXTINS2NO)
height = 22.0
left = 553.0
top = 346.0
width = 53.0
colorNormal = "BtnText/Silver"
fontSize = 12.0
text = "Ins 2 #"
endwith
this.ENTRYFIELDINS2NO = new ENTRYFIELD(this)
with (this.ENTRYFIELDINS2NO)
dataLink = form.query1.rowset.fields["ins2no"]
height = 26.0
left = 610.0
top = 346.0
width = 235.0
fontName = "Courier"
fontSize = 12.0
endwith
this.TEXTINS2GRP = new TEXT(this)
with (this.TEXTINS2GRP)
height = 22.0
left = 35.0
top = 375.0
width = 84.0
colorNormal = "BtnText/Silver"
fontSize = 12.0
text = "Ins 2 Grp #"
endwith
this.ENTRYFIELDINS2GRPID = new ENTRYFIELD(this)
with (this.ENTRYFIELDINS2GRPID)
dataLink = form.query1.rowset.fields["ins2_gr"]
height = 26.0
left = 126.0
top = 375.0
width = 190.0
fontName = "Courier"
fontSize = 12.0
endwith
this.TEXTINS2POL = new TEXT(this)
with (this.TEXTINS2POL)
height = 22.0
left = 369.0
top = 381.0
width = 133.0
colorNormal = "BtnText/Silver"
fontSize = 12.0
text = "Ins 2 Policy Holder"
endwith
this.RADIOBUTTONINS2PHPAT = new RADIOBUTTON(this)
with (this.RADIOBUTTONINS2PHPAT)
dataLink = form.query1.rowset.fields["ins2_ph"]
height = 20.0
left = 507.0
top = 374.0
width = 78.0
text = "P"
colorNormal = "BtnText/Silver"
fontSize = 12.0
group = true
value = iif(form.query1.rowset.fields["ins2_ph"].value=true,true,false)
endwith
this.RADIOBUTTONINS2PHOTHER = new RADIOBUTTON(this)
with (this.RADIOBUTTONINS2PHOTHER)
dataLink = form.query1.rowset.fields["ins2_ph"]
height = 20.0
left = 507.0
top = 394.0
width = 67.0
text = "O"
colorNormal = "BtnText/Silver"
fontSize = 12.0
value = iif(form.query1.rowset.fields["ins2_ph"].value=false,true,false)
endwith
this.TEXTINS2NOTES = new TEXT(this)
with (this.TEXTINS2NOTES)
height = 19.0
left = 560.0
top = 375.0
width = 84.0
colorNormal = "BtnText/Silver"
fontSize = 12.0
text = "Ins 2 Notes"
endwith
this.ENTRYFIELDINS2NOTES = new ENTRYFIELD(this)
with (this.ENTRYFIELDINS2NOTES)
dataLink = form.query1.rowset.fields["ins2notes"]
height = 26.0
left = 653.0
top = 375.0
width = 192.0
fontName = "Courier"
fontSize = 12.0
endwith
this.CHECKBOXSOF = new CHECKBOX(this)
with (this.CHECKBOXSOF)
dataLink = form.query1.rowset.fields["sof"]
height = 24.0
left = 91.0
top = 425.0
width = 140.0
text = "Signature on File"
colorNormal = "BtnText/Silver"
fontSize = 12.0
textLeft = true
endwith
this.TEXTSOFDATE = new TEXT(this)
with (this.TEXTSOFDATE)
height = 24.0
left = 289.0
top = 425.0
width = 77.0
colorNormal = "BtnText/Silver"
fontSize = 12.0
text = "SOF Date"
endwith
this.ENTRYFIELDSOFDATE = new ENTRYFIELD(this)
with (this.ENTRYFIELDSOFDATE)
dataLink = form.query1.rowset.fields["sof_date"]
height = 26.0
left = 372.0
top = 425.0
width = 97.0
picture = "99/99/9999"
function = "D"
fontName = "Courier"
fontSize = 12.0
endwith
this.TEXTSOFVALDATE = new TEXT(this)
with (this.TEXTSOFVALDATE)
height = 22.0
left = 567.0
top = 425.0
width = 119.0
colorNormal = "BtnText/Silver"
fontSize = 12.0
text = "SOF Valid Date"
endwith
this.ENTRYFIELDSOFVALDATE = new ENTRYFIELD(this)
with (this.ENTRYFIELDSOFVALDATE)
dataLink = form.query1.rowset.fields["sof_valdat"]
height = 26.0
left = 686.0
top = 425.0
width = 97.0
picture = "99/99/9999"
function = "D"
fontName = "Courier"
fontSize = 12.0
endwith
this.TEXTFIRSTAPPT = new TEXT(this)
with (this.TEXTFIRSTAPPT)
height = 24.0
left = 47.0
top = 464.0
width = 86.0
fontSize = 12.0
text = "First Appt"
endwith
this.ENTRYFIELDFIRSTAPPT = new ENTRYFIELD(this)
with (this.ENTRYFIELDFIRSTAPPT)
dataLink = form.query1.rowset.fields["first_appt"]
height = 26.0
left = 140.0
top = 464.0
width = 100.0
picture = "99/99/9999"
function = "@D"
fontName = "Courier"
fontSize = 12.0
validRequired = true
endwith
this.TEXTLASTAPPT = new TEXT(this)
with (this.TEXTLASTAPPT)
height = 24.0
left = 266.0
top = 464.0
width = 77.0
fontSize = 12.0
text = "Last Appt"
endwith
this.ENTRYFIELDLASTAPPT = new ENTRYFIELD(this)
with (this.ENTRYFIELDLASTAPPT)
dataLink = form.query1.rowset.fields["last_appt"]
height = 24.0
left = 343.0
top = 464.0
width = 100.0
picture = "99/99/9999"
function = "D"
fontName = "Courier"
fontSize = 12.0
validRequired = true
endwith
this.TEXTREMDATE = new TEXT(this)
with (this.TEXTREMDATE)
height = 24.0
left = 46.0
top = 495.0
width = 115.0
fontSize = 12.0
text = "Reminder Date"
endwith
this.ENTRYFIELDREM_DATE = new ENTRYFIELD(this)
with (this.ENTRYFIELDREM_DATE)
dataLink = form.query1.rowset.fields["rem_date"]
onGotFocus = {;keyboard "{home}"+"{shift+end}"}
valid = class::ENTRYFIELDREM_DATE_VALID
height = 24.0
left = 175.0
top = 495.0
width = 62.0
picture = "99/99"
//function = "D"
fontName = "Courier"
fontSize = 12.0
validRequired = true
validerrormsg = "Invalid Entry"
borderstyle = 7 //Client
endwith
this.TEXTINTVL = new TEXT(this)
with (this.TEXTINTVL)
height = 20.0
left = 316.0
top = 495.0
width = 55.0
fontSize = 12.0
text = "Interval"
endwith
this.COMBOBOXINTVL = new COMBOBOX(this)
with (this.COMBOBOXINTVL)
datalink = form.query1.rowset.fields["intvl"]
height = 95
left = 378
top = 495
width = 53
fontName = "Courier"
colorNormal = "Black/White"
dataSource = 'array {"1Y","2Y","3Y","4Y","2M","3M","4M","6M","9M","18M"," "}'
style = 1 // DropDownList: must click
dropDownHeight = 8
systemTheme = .f.
picture = "!!!"
fontName = "Courier"
fontSize = 12.0
endwith
this.TEXTNEXTAPPT = new TEXT(this)
with (this.TEXTNEXTAPPT)
height = 24.0
left = 476.0
top = 495.0
width = 77.0
fontSize = 12.0
text = "Next Appt"
endwith
this.ENTRYFIELDNEXTAPPT = new ENTRYFIELD(this)
with (this.ENTRYFIELDNEXTAPPT)
dataLink = form.query1.rowset.fields["next_appt"]
height = 24.0
left = 567.0
top = 495.0
width = 97.0
picture = "99/99/9999"
function = "D"
fontName = "Courier"
fontSize = 12.0
validRequired = true
endwith
this.TEXTNOTES = new TEXT(this)
with (this.TEXTNOTES)
height = 24.0
left = 50.0
top = 531.0
width = 50.0
fontSize = 12.0
text = "Notes"
endwith
this.ENTRYFIELDNOTES = new ENTRYFIELD(this)
with (this.ENTRYFIELDNOTES)
dataLink = form.query1.rowset.fields["notes"]
height = 24.0
left = 105.0
top = 531.0
width = 195.0
fontName = "Courier"
fontSize = 12.0
endwith
this.TEXTPATNOTES = new TEXT(this)
with (this.TEXTPATNOTES)
height = 24.0
left = 53.0
top = 563.0
width = 104.0
fontSize = 12.0
text = "Patient Notes"
endwith
this.ENTRYFIELDPATNOTES = new ENTRYFIELD(this)
with (this.ENTRYFIELDPATNOTES)
dataLink = form.query1.rowset.fields["patmemo"]
height = 24.0
left = 165.0
top = 565.0
width = 54.0
fontName = "Courier"
fontSize = 12.0
endwith
this.RECTANGLE2 = new RECTANGLE(this)
with (this.RECTANGLE2)
left = 384.0
top = 530.0
width = 463.0
height = 55.0
text = ""
endwith
this.PUSHBUTTON1 = new PUSHBUTTON(this)
with (this.PUSHBUTTON1)
height = 26.0
left = 418.0
top = 545.0
width = 107.0
text = "BILLING"
fontSize = 12.0
fontBold = true
endwith
this.PUSHBUTTONAPPEND = new PUSHBUTTON(this)
with (this.PUSHBUTTONAPPEND)
onClick = class::PUSHBUTTONAPPEND_ONCLICK
height = 26.0
left = 550.0
top = 545.0
width = 130.0
text = "BEGIN APPEND"
fontSize = 12.0
fontBold = true
endwith
this.PUSHBUTTONQUIT = new PUSHBUTTON(this)
with (this.PUSHBUTTONQUIT)
onClick = class::PUSHBUTTONQUIT_ONCLICK
height = 26.0
left = 716.0
top = 545.0
width = 107.0
text = "QUIT"
fontSize = 12.0
fontBold = true
endwith
this.rowset = this.query1.rowset
//this.rowset = this.query2.rowset
function PUSHBUTTONQUIT_onClick()
if msgbox("Abandon Changes?","NOTICE",36) ==6
form.rowset.abandon()
endif
form.close()
return
function PushbuttonAppend_onclick
//form.rowset.beginappend()
msgbox("Nothing here yet")
return
function form_onOpen()
form.query1.rowset.FINDKEY(cpat_no)
form.query1.requery()
return
//Do not change EFSHOWAGE
form.entryfieldshowage.value= ;
STR(FLOOR((VAL(DTOS(DATE()))-VAL(DTOS(form.query1.rowset.fields["dob"].value)))/10000),3)
return
function entryfieldins1ID_onRMD
form.lookins1=new LOOKUPFORM1()
form.lookins1.parent=FORM
form.lookins1.readmodal()
return
/* function ENTRYFIELDIns1ID_OLF
use c:\pat\data\ins_info in select()
form.entryfieldins1name.value = lookup( ins_info, form.entryfieldIns1ID.value, ins_info, Ins_info->ins_code )
//database = form.database1
//sql = "select ins_code, ins_name from ins_info where ins_code:= 'UH'"
//active = true
form.query2.rowset.indexname = "INS_CODE"
mlookup = form.query2.rowset.lookuprowset
//mins_name= substr((form.query2.rowset.fields["ins_name"].value),4)
mnamelookup = form.query2.rowset.fields["ins_name"].value
msgbox("mlookup is "+mlookup+ " mnamelookup is "+mnamelookup)
return
*/
function ENTRYFIELDREM_DATE_valid
do case
case val(substr(this.value,4,2))=0
lnyear=2000
case val(substr(this.value,4,2))>70
lnyear=1900+val(substr(this.value,4,2))
case val(substr(this.value,4,2))<69 .and. ;
val(substr(this.value,4,2))<>0
lnyear=2000+val(substr(this.value,4,2))
endcase
IF LEN(TRIM(this.value))<5 .and.this.value<>" / "
RETURN .F.
ENDIF
IF (SUBSTR(this.value,1,2)>SUBSTR(DTOC(DATE()),1,2) ;
.AND. SUBSTR(this.value,1,2)>="01" .AND. SUBSTR(this.value,1,2)<="12" ;
.AND. lnyear=year(date())) &&SAME YEAR/LATER MONTH
RETURN .T.
ELSE
IF (SUBSTR(this.value,1,2)>="01" .AND. SUBSTR(this.value,1,2)<="12" ;
.AND. lnyear>year(date()) .and. lnyear<=year(date())+4) &&NEXT YEAR
RETURN .T.
ELSE
IF this.value=" / " .OR. this.value=SPACE(5)
RETURN .T.
ENDIF
ENDIF
ENDIF
return .F.
function ENTRYFIELDINS1ID_OnKey(nChar, nPosition,bShift,bControl)
if len(trim(this.value)) >1 // Two characters entered
form.QUERY2Inscode1.params['ins_code'] = this.value //pass value in entryfield to query parameter
form.QUERY2Inscode1.requery() // fetch state name for the given stateID
//Test to see if a valid stateID was entered
if form.QUERY2Inscode1.rowset.count() = 1 //found the state
form.ENTRYFIELDINS1NAME.value = form.QUERY2Inscode1.rowset.fields['ins_name'].value
this.before.setfocus() //Move focus to next object in z-order
else // stateId not found
//form.ENTRYFIELDINS1NAME.value = 'Invalid INS Code'
msgbox("Invalid Insurance Code")
form.ENTRYFIELDINS1ID.value = '' //Empty entryfield
form.ENTRYFIELDINS1ID.setfocus() //Back to entryfield to try again
endif
endif
return
function ENTRYFIELDDOB_valid
if this.value=" / / "
form.entryfieldshowage.value=" "
return .t.
else
if this.value=CTOD(DTOC(this.value));
.and. this.value<=date()
form.entryfieldshowage.value= ;
STR(FLOOR((VAL(DTOS(DATE()))-VAL(DTOS(form.query1.rowset.fields["dob"].value)))/10000),3)
return .t.
endif
endif
//form.entryfieldshowage.value= ;
//STR(FLOOR((VAL(DTOS(DATE()))-VAL(DTOS(form.query1.rowset.fields["dob"].value)))/10000),3)
return .f.
Function ENTRYFIELDDOB_OnLostFocus
form.entryfieldshowage.value= ;
STR(FLOOR((VAL(DTOS(DATE()))-VAL(DTOS(form.query1.rowset.fields["dob"].value)))/10000),3)
return
/* FUNCTION Age( dob )
-------------------------------------------------------------
Programmer..: Martin Leon
Date........: 10/23/1991
Notes.......: Returns age of thing as of date() given its
birthdate.
Written for.: dBASE IV, 1.1
Rev. History: 10/23/1991 -- Original
08/10/1993 -- Ken Mayer, "stole" algorithm
from the routine AGE2. It's more efficient.
Fall, 1994 -- revised for dBASE 5.0 for
Windows. Jay Parsons, 72662,1302
11/02/1996 -- Tinkered with minimally to make
part of custom class. Ken Mayer
Calls.......: None
Usage.......: DateEx.Age(<dBirth>)
Example.....: ? "Joe is "+ltrim(str(dMyDate.Age(dBirth)))+;
" today ..."
Returns.....: Numeric value in years
Parameters..: dBirth = birthdate of thing to return age of.
-------------------------------------------------------------
RETURN ( floor( ( val( dtos( date() ) ) ;
- val( dtos( dBirth ) ) ) / 10000 ) )
*/
endclass
|
|