ISWhiteboardItem.PrivacyId

Description

ID of the privacy role.

Syntax

object.PrivacyId

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

Return Value

int

Example

Display the number of whiteboard items and some information about them, including their privacy roles.

Dim aPatient
Dim aFilter
Dim aWhiteboardItems, aWhiteboardItem
Dim aMessage
Dim aRoles, aRole
Dim i

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 &_       
    "Added: " & aWhiteboardItem.AddedDT & vbNewLine &_
    "Removed: " & aWhiteboardItem.RemovedDT & vbNewLine &_
    "Privacy Id: " & aWhiteboardItem.PrivacyId & vbNewLine &_
    "Instruction: " & aWhiteboardItem.Instruction & vbNewLine 
    
  if aWhiteboardItem.PrivacyId > 0 then 
    set aParams = Profile.CreatePrivateRoleLoadParam
    aParams.RoleIdExactly = aWhiteboardItem.PrivacyId  
    set aRoles = Profile.LoadPrivateRoles(aParams)
    if aRoles.Count > 0 then     
      aMessage = aMessage & "Role Name: " & aRoles.Item(0).RoleName & vbNewLine
    end if      
  end if      
    
next

Profile.MsgBox(aMessage)
Note:

In Profile Client v8 on User Interface ID cannot be found, but Privacy can be found in Organisation > Work Centre > Work > Whiteboard > Edit Whiteboard Entry > Privacy field.

Version information

Added in v7.8.0