ISProfile.LoadWhiteboardItems

Description

This function returns the whiteboard items loaded on the basis of the selected filter.

Syntax

object.LoadWhiteboardItems(aWhiteboardFilter)

Part Attribute Type Description
object Required
The object always implements the ISProfile interface
aWhiteboardFilter In, Required
The object that defines conditions for filtering

Return Value

ISWhiteboardItems

Returns the whiteboard items loaded on the basis of the selected filter.

Example

Display the number of the whiteboard items loaded on the basis of the selected filter and the information about them.

sub main
  Dim aPatient
  Dim aFilter
  Dim aWhiteboardItems
  Dim aWhiteboardItem
  Dim aMessage

  Set aPatient = Profile.SelectPatient
  set aFilter = Profile.CreateWhiteboardFilter
  aFilter.PatientId = aPatient.Id
  set aWhiteboardItems = Profile.LoadWhiteboardItems(aFilter)
  aMessage = "Whiteboard Items Count = " & aWhiteboardItems.Count

  for i = 0 to aWhiteboardItems.Count - 1
    set aWhiteboardItem = aWhiteboardItems.Item(i)
    aMessage = aMessage & vbNewLine & " ---------------------- " & vbNewLine &_
       "Acuity: " & aWhiteboardItem.AcuityTypeCode & vbNewLine &_
       "Reason: " & aWhiteboardItem.ReasonTypeCode & vbNewLine &_       
       "Board: " & aWhiteboardItem.BoardTypeCode & vbNewLine &_
       "From POS: " & GetProviderNameById(aWhiteboardItem.FromPosID) & vbNewLine &_  
       "From Provider: " & GetProviderNameById(aWhiteboardItem.FromProviderID) & vbNewLine &_
       "To POS: " & GetProviderNameById(aWhiteboardItem.ToPOSID) & vbNewLine &_ 
       "To Provider: " & GetProviderNameById(aWhiteboardItem.ToProviderID) & vbNewLine
  next

  Profile.MsgBox(aMessage)
end sub    


function GetProviderNameById(aProviderId)
  Dim aName
  Dim aProvider
  
  if aProviderId = 0 then
    aName = " - "
  else
    set aProvider = Profile.LoadProviderById(aProviderId)
    aName = aProvider.FullName    
  end if
  
  GetProviderNameById = aName
end function  
Note:

In Profile Client v8 on User Interface Whiteboard can be found in Organisation > Work Centre > Work > Whiteboard.

See also

Version information

Added in v7.8.0