ISCase.CaseType

Description

The case type of the case.

Syntax

object.CaseType

Part Attribute Type Description
object Required
The object always implements the ISCase interface

Return Value

ISCaseType

Example

Display the number of the cases loaded on the basis of the selected filter, their titles, source refs, case types and the dates and time when they were opened.

Dim aTrans
Dim aPatient 
Dim aCaseTypes, aCaseType
Dim aNewCase
Dim aFilter
Dim aCases, aCase
Dim i
Dim aMessage

Set aTrans = Profile.StartMapTransaction  
set aFilter = Profile.CreateCaseTypesFilter
aFilter.Description = "Case Type 1" 
set aCaseTypes = Profile.LoadCaseTypes(aFilter)

if aCaseTypes.Count = 0 then 
  Profile.MsgBox("No case type with the specified description")
  exit sub
end if
  
set aCaseType = aCaseTypes.Item(0)
  
set aPatient = Profile.SelectPatient
set aNewCase = Profile.CreateCase(aPatient.ID)
aNewCase.CaseTitle = "New Case"
aNewCase.CaseType = aCaseType
aNewCase.SourceRef = "MySourceRef " & aNewCase.ID
aTrans.SnapShot 
  
set aFilter = Profile.CreateCasesFilter
aFilter.Patient = aPatient
aFilter.CaseType = aCaseType
aFilter.SourceRef = aNewCase.SourceRef 
set aCases = Profile.LoadCases(aFilter)

aMessage = "Cases Count = " & aCases.Count 
  
for i = 0 to aCases.Count -1
  set aCase = aCases.Item(i)
  aMessage = aMessage & vbNewLine & (i + 1) & ") " & aCase.CaseTitle &_ 
    " was opened on " & aCase.OpenedOn & vbNewLine & "        -Source Ref: " &_
    aCase.SourceRef & vbNewLine & "        -CaseType: " & aCase.CaseType.Description  
next      

Profile.MsgBox(aMessage)  
Note:

In Profile Client v8 on User Interface Case Type can be found in Organisation > Work Centre > Work > Cases > Administrative > General > Case Type field.

Version information

Added in v7.8.0