Caption for the button OK in the compare form.
object.CaptionOK
Part | Attribute | Type | Description |
---|---|---|---|
object |
Required | The object always implements the
ISCompareForm interface |
string
Create a form comparing the information from the current and the last patient versions.
sub main
Dim aForm
Dim aPatient
Dim aFilter
Dim aVersions, aVersion
Dim i
set aForm = Profile.CreateCompareForm
set aPatient = Profile.SelectPatient
set aFilter = Profile.CreateVersionFilter
aFilter.FromDate = #01/01/2019#
aFilter.ToDate = now
set aVersions = aPatient.FindVersions(aFilter)
if aVersions.Count > 0 then
set aVersion = aVersions.Item(0)
for i = 1 to aVersions.Count - 1
if aVersion.ID < aVersions.Item(i).ID then
set aVersion = aVersions.Item(i)
end if
next
else
set aVersion = aPatient
end if
aForm.Caption = "Patient Version Compare"
aForm.CaptionLeft = "Current Version"
aForm.CaptionRight = "Last Version"
aForm.CaptionOK = "Accept"
aForm.CaptionCancel = "Decline"
const ridUnknown = -1
const ridRoot = 0
const ridGeneral = 10
const ridConnect = 20
const ridSocial = 30
const tsUndefined = 0
const tsFalse = 1
const tsTrue = 2
aForm.AddRow "General", "", "", ridRoot, ridGeneral
aForm.AddRow "Last Name", aPatient.LastName, aVersion.LastName, ridGeneral, ridUnknown
aForm.AddRow "First Name", aPatient.FirstName, aVersion.FirstName, ridGeneral, ridUnknown
aForm.AddRow "Sex", aPatient.SexLong, aVersion.SexLong, ridGeneral, ridUnknown
aForm.AddRow "DOB", aPatient.DOB, aVersion.DOB, ridGeneral, ridUnknown
aForm.AddRow "Connectivity", "", "", ridRoot, ridConnect
aForm.AddRow "Home Phone", aPatient.HomePhone, aVersion.HomePhone, ridConnect, ridUnknown
aForm.AddRow "Work Phone", aPatient.WorkPhone, aVersion.WorkPhone, ridConnect, ridUnknown, tsTrue
aForm.AddRow "Cell Phone", aPatient.CellPhone, aVersion.CellPhone, ridConnect, ridUnknown
aForm.AddRow "Email", aPatient.Email, aVersion.Email, ridConnect, ridUnknown
aForm.AddRow "Social", "", "", ridRoot, ridSocial
aForm.AddRow "Work Name", aPatient.WorkName, aVersion.WorkName, ridSocial, ridUnknown
if aForm.ShowModal = idOk then
Profile.MsgBox "The changes are accepted"
else
Profile.MsgBox "The changes are declined"
end if
end sub