This function deletes the patient group.
object.Delete
Part | Attribute | Type | Description |
---|---|---|---|
object |
Required | The object always implements the
ISProfilePatientGroup interface |
Display the patient groups before and after deleting.
sub main
Dim aFilter
Dim aPatientGroups, aPatientGroup
Dim aTrans
Dim aMessage
Set aFilter = Profile.CreateProfilePatientGroupFilter
aFilter.PatientGroupType = 3 'spgtAll
aFilter.PatientGroupName = "test1"
aFilter.PatientGroupNameCompareOperation = 1 'sfcoEqual
set aTrans = Profile.StartMapTransaction
set aPatientGroups = Profile.LoadProfilePatientGroupsByFilter(aFilter)
aMessage = "The patient group before deleting: " & vbNewLine & GetPatientsGroupsAsList(aPatientGroups)
for i = 0 to aPatientGroups.Count - 1
set aPatientGroup = aPatientGroups.Item(i)
aPatientGroup.Delete
next
aTrans.SnapShot
set aPatientGroups = Profile.LoadProfilePatientGroupsByFilter(aFilter)
aMessage = aMessage & vbNewLine & vbNewLine &_
"The patient group after deleting: " & vbNewLine & GetPatientsGroupsAsList(aPatientGroups)
Profile.MsgBox(aMessage)
end sub
function GetPatientsGroupsAsList(aPatientGroups)
Dim aMessage
Dim aPatientGroup
aMessage = "Patient Groups Count: " & aPatientGroups.Count
for i = 0 to aPatientGroups.Count - 1
set aPatientGroup = aPatientGroups.Item(i)
aMessage = aMessage & vbNewLine & (i + 1) & ") " & aPatientGroup.Name
next
GetPatientsGroupsAsList = aMessage
end function
In Profile Client v8 on User Interface Patient Groups can be found in
.