ISDiseaseCodeSearchResults.Count

Description

The number of the objects linked to the disease codes and found by the specified conditions.

Syntax

object.Count

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

Return Value

int

Example

Display the number of the objects linked to the disease codes and some information about them.

Dim aLookupReason
Dim aEnableSearchInTermset
Dim aController
Dim aArea   
Dim aSubGroupID                 
Dim aStr 
Dim aPreferredOnly 
Dim aOrgStructureID 
Dim aMaxCount 
Dim aIsDescriptionSearch
Dim aResult, aResults
Dim aDisease
Dim i
Dim aMessage

aLookupReason = 0  'TSDiseaseCodeLookupReason.slrDiseaseCode    
aEnableSearchInTermset = True

set aController = Profile.ProfileInternal.CreateDiseaseCodeLookupController(_
aLookupReason, aEnableSearchInTermset) 'ISDiseaseCodeLookupController

aArea = 1  'TSDiseaseCodeSearchArea.ssaDiseaseCodes    
aSubGroupID = 0                 
aStr = "HEPA"
aPreferredOnly = False
aOrgStructureID = 0
aMaxCount = 200
aIsDescriptionSearch = False

set aResults = aController.DoSearch(aArea, aSubGroupID, aStr, aPreferredOnly,_
  aOrgStructureID, aMaxCount, aIsDescriptionSearch) 

aMessage = "The number of results is " & aResults.Count & vbNewLine

for i = 0 to aResults.Count - 1
  set aResult = aResults.DiseaseCodeSearchResult(i) 'ISDiseaseCodeSearchResult
  set aDisease = aController.LoadOrCreateDiseaseCode(aResult) 'ISDiseaseCodeLookupController
     
  aMessage = aMessage & vbNewLine &_
    (i + 1) & ") ID = " & aResult.ID & vbTab &_
    " CID = " & aResult.CID & vbTab &_
    " TypeID = " & aResult.TypeID & vbTab &_
    " IsPreferred = " & aResult.IsPreferred & vbTab &_
    " CODE = " & aResult.Code & vbTab &_
    " Description = " & aResult.Description & vbNewLine &_
    "    Disease Code = " & aDisease.Code & vbTab &_
    " ID = " & aDisease.Id & vbTab &_
    " Description = " & aDisease.Description
next

Profile.MessageBox(aMessage)
Note: In Profile Client v8 on User Interface Disease Code Search Results can be found in Maintain > Disease Codes.

Version information

Added in v7.8.0