This function creates a new letter for the patient.
object.CreateLetter(aPatientID,
aLetterTemplateId)
Part | Attribute | Type | Description |
---|---|---|---|
object |
Required | The object always implements the
ISProfile interface |
|
aPatientID |
In, Required | int |
ID of the patient |
aLetterTemplateId |
In, Required | int |
ID of the letter template |
Create a new letter for the patient.
Dim aPatient
Dim aLetters, aLetter
Dim aTemplate, aTemplateId
Dim aNewLetter
Dim i
Dim aMessage
Set aPatient = Profile.SelectPatient
set aLetters = aPatient.GetLetters (1) ' slcfWordRTF
aMessage =_
"The number of the letters of the selected format is " & aLetters.Count
aTemplateId = 0
for i = 0 to aLetters.Count - 1
set aLetter = aLetters.Item(i)
set aTemplate = aLetter.Template
if not aTemplate is nothing then
if aTemplate.Subject = "Consultation Slips" then
aTemplateId = aLetter.Template.ID
end if
end if
next
if aTemplateId > 0 then
set aNewLetter = Profile.CreateLetter (aPatient.ID, aTemplateId)
aMessage = aMessage & vbNewLine & " The letter was successfully created "
else
aMessage = aMessage & vbNewLine & " There is no letter template with the specified subject"
end if
Profile.MsgBox(aMessage)
In Profile Client v8 on User Interface Letters can be found in
or in .