ISHriTemplates.Count

Description

The number of the HRI templates within the collection.

Syntax

object.Count

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

Return Value

int

Example

Display the number of the HRI templates within the collection and some information about them, including the types and the names of the linked concepts.

Dim aHRITemplates, aHRITemplate 
Dim aTemplateData
Dim i
Dim aMessage
       
set aHRITemplates = Profile.GetHRITemplates

aMessage = "There are " & aHRITemplates.Count & " HRI Templates: "

for i = 0 to aHRITemplates.Count - 1 
  set aHRITemplate = aHRITemplates.Item(i)
  set aTemplateData = aHRITemplate.HRI
 
  aMessage = aMessage & vbNewLine & (i + 1) & ") " &_
    aTemplateData.Concept.Name & vbTab   
   
  select case aTemplateData.TypingType
    case 1 'tshtQuantity 
      aMessage = aMessage & " - Quantity"  
    case 2 'tshtRange  
      aMessage = aMessage & " - Range"   
    case 3 'tshtRatio   
      aMessage = aMessage & " - Ratio"   
    case 4 'tshtText    
      aMessage = aMessage & " - Text"
    case else   
      aMessage = aMessage & " - Unknown"
  end select
next 'i

Profile.MsgBox(aMessage)
Note: In Profile Client v8 on User Interface HriTemplates can be found in Maintain > Templates > Health Record Collection Templates > Reference > Embedded Observations.

Version information

Added in v7.8.0