This function deletes the patient's questions.
object.Delete
Part | Attribute | Type | Description |
---|---|---|---|
object |
Required | The object always implements the
ISQuestion interface |
Display the number of questions before and after deleting.
Dim aTrans
Dim aPatient
Dim aQuestions, aQuestion
Dim aMessage
Dim i
Set aTrans = Profile.StartMapTransaction
set aPatient = Profile.SelectPatient
set aQuestions = Profile.ProfileInternal.LoadQuestionsForPatient(aPatient.ID)
aMessage = "The number of questions before deleting is " & aQuestions.Count
for i = 0 to aQuestions.Count - 1
set aQuestion = aQuestions.Item(i)
aMessage = aMessage & vbNewLine &_
"Title: " & aQuestion.Title & vbNewLine &_
"Amend Date: " & aQuestion.AmendDate & vbNewLine &_
"Amend Number: " & aQuestion.AmendNumber & vbNewLine &_
"Answer: " & aQuestion.Answer & vbNewLine &_
"Body: " & aQuestion.Body & vbNewLine &_
"Category ID: " & aQuestion.CategoryID & vbNewLine &_
"Date: " & aQuestion.Date & vbNewLine &_
"ID: " & aQuestion.ID & vbNewLine &_
"Patient: " & aPatient.SurnameFirstName & vbNewLine &_
"Status: " & aQuestion.Status & vbNewLine
aQuestion.Delete
next
aTrans.SnapShot
set aQuestions = Profile.ProfileInternal.LoadQuestionsForPatient(aPatient.ID)
aMessage = aMessage & vbNewLine & "The number of questions after deleting is " &_
aQuestions.Count
Profile.MsgBox(aMessage)
In Profile Client v8 on User Interface Questions can be found in
.