ISContact.ConsultationType

Description

The type of the consultation for the contact with the specified disease.

Syntax

object.ConsultationType

Part Attribute Type Description
object Required
The object always implements the ISContact interface
Restriction: This property is readonly.

Return Value

TSConsultationType

Example

Display some information about the contacts of patient's encounters, including the types of the consultations.

sub main 
  Dim aPatient        
  Dim aFilter              
  Dim aEncounters, aEncounter
  Dim i, j
  Dim aMessage
  Dim aContact

  Set aPatient = Profile.SelectPatient 
  set aFilter = Profile.CreateEncounterFilter
  aFilter.PatientId = aPatient.ID                 
  set aEncounters = aPatient.LoadEncounters(aFilter)
                                                                 
  aMessage = "Encounters Count = " & aEncounters.Count

  for i = 0 to aEncounters.Count - 1
    set aEncounter = aEncounters.Item(i)              
    aMessage = aMessage & vbNewLine & (i + 1) & ". " &_
      "Date: " & aEncounter.Date & vbNewLine &_                            
      "Date Created: " & aEncounter.DateCreated & vbNewLine &_
      "Pos Code: " & aEncounter.PosCode & vbNewLine &_
      "Provider Code: " & aEncounter.ProviderCode & vbNewLine &_
      "Service Code: " & aEncounter.ServiceCode & vbNewLine &_
      "Type Description: " & aEncounter.TypeDescription & vbNewLine

    if aEncounter.Contacts.Count <> 0 then
      for j = 0 to aEncounter.Contacts.Count -1
        set aContact = aEncounter.Contacts.Item(j)
        aMessage = aMessage & "      Contact" & vbNewLine &_ 
          "    - Date: " & aContact.Date & vbNewLine &_
          "    - Date Altered: " & aContact.DateAltered & vbNewLine &_
          "    - Date Created: " & aContact.DateCreated & vbNewLine &_
          "    - Date Resolved: " & aContact.DateResolved & vbNewLine &_
          "    - Diagnosis Description: " & aContact.DiagnosisDescription & vbNewLine &_
          "    - Diagnosis Code: " & aContact.DiagnosisCode & vbNewLine &_
          "    - Pos Code: " & aContact.PosCode & vbNewLine &_
          "    - POS Name: " & aContact.POSName & vbNewLine &_
          "    - Provider Code: " & aContact.ProviderCode & vbNewLine &_
          "    - Referral Type: " & aContact.ReferralType & vbNewLine &_
          "    - Service Code: " & aContact.ServiceCode & vbNewLine &_
          "    - Subject: " & aContact.Subject & vbNewLine &_
          "    - Time: " & aContact.Time & vbNewLine &_
          "    - Consultation Type: " & GetConsultTypeDescr(aContact.ConsultationType) & vbNewLine 
        
      next
    end if                 
  next 

  Profile.MsgBox(aMessage) 

end sub

function GetConsultTypeDescr(aConsultationType)
  Dim aResult                             
                                                            
  Select Case aConsultationType
    Case 0
      aResult = "None"  
    Case 1
      aResult = "First Visit"
    Case 2                                 
      aResult = "Subsequent Visit"     
    Case 3
      aResult = "Subsequent Visit No Prior Drug" 
           
  End Select                     
  
  GetConsultTypeDescr = aResult               
end function 
Note:

This field is calculable and cannot be found on UI.

Version information

Added in v7.8.0