This function links the form to the encounter contact.
object.SetCurrentContact
aContact
Part | Attribute | Type | Description |
---|---|---|---|
object |
Required | The object always implements the
ISProfileForm interface |
|
aContact |
In, Required | The encounter contact |
Check if the form is linked to the encounter. If not, open the encounter editor and link the form to the first encounter contact.
Dim aEncounter
Dim aEncounterEditor
Dim aFormContact
Set aEncounter = Form.FindLinkedEncounterViaActionLinks
if not aEncounter is nothing then exit sub
if Profile.MsgBox("Do you want to create new encounter and link the form to it?",_
vbYesNo + vbQuestion) = vbNo then exit sub
Profile.OpenEncounterEditor Form.PatientId, 0
set aEncounterEditor = Profile.EncounterEditor(Form.PatientId)
set aFormContact = aEncounterEditor.CurrentContact
aEncounterEditor.ActivateContact aFormContact.Id
Form.SetCurrentContact(aFormContact)
Form.Save
aContact
modified in
v7.11.0