ISPatient.LoadSharingConsents

Description

This function returns all sharing consents of the patient.

Syntax

object.LoadSharingConsents()

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

Return Value

ISCollection

Returns the collection of ISPatientSharingConsent

Example

Display the number of the patient's sharing consents and the names of the partitions in each sharing consent.

Dim aPatient 
Dim aaConsents
Dim aConsent
Dim aPartition
Dim aMessage

Set aPatient = Profile.SelectPatient
set aConsents = aPatient.LoadSharingConsents 

aMessage = "Sharing Consents count = " & aConsents.Count

for i = 0 to aConsents.Count - 1
  set aConsent = aConsents.Item(i)
  aMessage = aMessage & vbNewLine &_
    "Consent has " & aConsent.SharedPartitionCount & " Shared Partition(s): "
  for j = 0 to aConsent.SharedPartitionCount - 1
    set aPartition = aConsent.SharedPartition(j)
    aMessage = aMessage & aPartition.Name & " (" & aPartition.Code & "); "       
  next   
next
  
Profile.MsgBox(aMessage)  
Note:

In Profile Client v8 on User Interface Sharing Consents can be found in Clinical > Medical Record > Sharing Consent.

Version information

Added in v7.8.0