ISClinicalViews.GetClinicalView

Description

This function returns the clinical view by its group ID and view ID.

Syntax

object.GetClinicalView(aGroupID, aViewId)

Part Attribute Type Description
object Required
The object always implements the ISClinicalViews interface
aGroupID In, Required
int
ID of the clinical view group
aViewId In, Required
int
ID of the clinical view

Return Value

ISClinicalView

Returns the clinical view by its group ID and view ID.

Example

Display the total number of the clinical views and some information about the ones of the specified group.

Dim aPatient  
Dim aClinicalView, aClinicalViews
Dim aGroupId
Dim aIntColl
Dim i
Dim aMessage

'The list of the predefined view group Ids
const cNoGroupID       = 0
const cEMRGroupID      = -1
const cPatientGroupID  = -2
const cCaseGroupID     = -3
const cAccessionPatientGroupID = -4
const cHealthLinkFormsGroupID = -5

set aPatient = Profile.SelectPatient
set aClinicalViews = aPatient.LoadClinicalViews
aGroupId = cCaseGroupID

aMessage = "The total number of the Clinical Views is " & aClinicalViews.Count & ": " & vbNewLine &_
  "The list of the views for the group with Id = " & aGroupId  & vbNewLine


'collect views identifiers
set aIntColl = Profile.CreateIntCollection
for i = 0 to aClinicalViews.Count - 1
  aIntColl.Add(aClinicalViews.Item(i).ViewId)
next 'i

'load views by identifiers
for i = 0 to aIntColl.Count - 1                   
  set aClinicalView = aClinicalViews.GetClinicalView(aGroupId, aIntColl.Item(i)) 
  if not aClinicalView is nothing then 
    aMessage = aMessage & vbNewLine &_
      (i + 1) & ") Caption: " & aClinicalView.Caption & vbNewLine &_
      "     ViewID: " & aClinicalView.ViewID & vbNewLine &_
      "     Desc: " & aClinicalView.Desc & vbNewLine
  end if      
next 'i

Profile.MsgBox(aMessage)
Note:

In Profile Client v8 on User Interface Clinical Views can be found in Maintain > HTML Views Setup.

Version information

Added in v7.8.0