This function adds a new mental event with the selected case by the selected template.
object.CreateMentalEvent(aTemplate, aCase)
Part | Attribute | Type | Description |
---|---|---|---|
object |
Required | The object always implements the
ISPatient interface |
|
aTemplate |
In, Required | The mental event template, on User Interface can be
found in Maintain/Events |
|
aCase |
In, Required | The case of the mental event |
Add a new mental event with the selected case by the selected template.
Dim aPatient
Dim aFilter
Dim aFilter1
Dim aCases
Dim aCase
Dim aTemplate
Dim aCreatedEvent
Set aPatient = Profile.SelectPatient
set aFilter = Profile.CreateCasesFilter
aFilter.PatientId = aPatient.ID
set aCases = Profile.LoadCases(aFilter)
if aCases.Count = 0 then
Profile.MsgBox("No cases!")
else
set aCase = aCases.Item(0)
end if
set aFilter1 = Profile.CreateMentalEventTemplatesFilter
aFilter1.Name = "Change Legal Status"
set aTemplate = Profile.LoadMentalEventTemplates(aFilter1).Item(0)
set aCreatedEvent = aPatient.CreateMentalEvent(aTemplate, aCase)
Profile.MsgBox ("New mental event was created successfully!")
In Profile Client v8 on User Interface Mental Events can be added and found in
.