This function sets the encounter fields (section, duration, type and etc.) using settings for automatically created encounters.
object.SetAutoCreatedValues
| Part | Attribute | Type | Description |
|---|---|---|---|
object |
Required | The object always implements the
ISEncounter interface |
Add a new encounter and display some information about it.
sub main
Dim aPatient, aPatientID
Dim aCadeID
Dim aEncounter
Dim aMessage
Dim aSection
set aPatient = Profile.SelectPatient
aPatientID = aPatient.ID
aCaseID = 0
set aEncounter = Profile.CreateEncounter(aPatientID, aCaseID)
aMessage = "Encounter after creating: " & vbNewLine &_
GetEncounterInfo(aEncounter)
aEncounter.SetAutoCreatedValues
aMessage = aMessage & vbNewLine &_
"Encounter after updating fields: " & vbNewLine &_
GetEncounterInfo(aEncounter)
Profile.MsgBox(aMessage)
end sub
function GetEncounterInfo(aEncounter)
Dim aInfo
Dim aSection
aInfo = "ID: " & aEncounter.ID & vbNewLine &_
"Is New: " & aEncounter.IsNew & vbNewLine &_
"Duration (seconds): " & CDbl(Round(aEncounter.Duration * 24 * 60 * 60)) & vbNewLine &_
"Type Description: " & aEncounter.TypeDescription & vbNewLine
if aEncounter.Section > 0 then
set aSection = Profile.LoadShortCode(aEncounter.Section)
aInfo = aInfo &_
"Section: " & aSection.Description & vbNewLine
end if
GetEncounterInfo = aInfo
end function In Profile Client v8 on User Interface Auto Created Values cannot be found.