ISPatientSharingConsent.IsSharedPartition

Description

This function checks if the specified partition is shared with in the patient sharing consent.

Syntax

object.IsSharedPartition(aPartitionID)

Part Attribute Type Description
object Required
The object always implements the ISPatientSharingConsent interface
aPartitionID In, Required
int
ID of the partition

Return Value

bool

Returns True if the specified partition is shared with in the patient sharing consent.

Example

Display IsSharedPartition for the patient sharing consent.

Dim aPatient
Dim aSharingConsents
Dim aMessage
Dim aPartitionID
Dim aSharedItem  
Dim aPatientSharingConsent
Dim aSharedPartition
Dim i, j 

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

aMessage = "Sharing Consents Count = " & aSharingConsents.Count & vbNewLine

aPartitionID = Profile.CurrentPartition.Id
aSharedItem = 4  'scsiDiagnosesActive

for i = 0 to aSharingConsents.Count - 1
  set aPatientSharingConsent = aSharingConsents.Item(i)
  aMessage = aMessage & vbNewLine & (i + 1) & ". " &_
    "Patient: " & aPatientSharingConsent.Patient.SurnameFirstName & vbNewLine &_
    "    Valid From: " & aPatientSharingConsent.ValidFrom & vbNewLine &_
    "    Valid To: " & aPatientSharingConsent.ValidTo & vbNewLine &_ 
    "    Enabled: " & aPatientSharingConsent.Enabled & vbNewLine &_
    "    Is Rescinded: " & aPatientSharingConsent.IsRescinded & vbNewLine &_
    "    Password Entered: " & aPatientSharingConsent.PasswordEntered & vbNewLine &_
    "    Is Shared Item: " & aPatientSharingConsent.IsSharedItem(aSharedItem) & vbNewLine &_
    "    Is Shared Current Partition: " & aPatientSharingConsent.IsSharedPartition(aPartitionID) & vbNewLine &_
    "    Shared Partitions Count: " & aPatientSharingConsent.SharedPartitionCount & vbNewLine
    
  for j = 0 to aPatientSharingConsent.SharedPartitionCount - 1
    set aSharedPartition = aPatientSharingConsent.SharedPartition(j)
    aMessage = aMessage &_
      "     -Partition Name: " & aSharedPartition.Name & vbNewLine &_
      "     -ID: " & aSharedPartition.ID & vbNewLine
  next 'j  
  
  if not aPatientSharingConsent.CaseObj is nothing then
    aMessage = aMessage &_
      "    Case Object: " & aPatientSharingConsent.CaseObj.CaseTitle & vbNewLine
  end if
next 'i

Profile.MsgBox(aMessage)     
Note:

In Profile Client v8 on User Interface Shared Partition can be found in Clinical > Medical Record > Sharing Consent > Open the selected consent > With these Clinics ...

Version information

Added in v7.8.0