ISPrescriptionProviderComments.Item

Description

Each of the provider comments within the collection.

Syntax

object.Item(aIndex)

Part Attribute Type Description
object Required
The object always implements the ISPrescriptionProviderComments interface
aIndex In, Required
int
Restriction: This property is readonly.

Return Value

ISPrescriptionProviderComment

Example

Display the number of the prescriptions and the provider comments to them.

Dim aPatient 
Dim aFilter
Dim aPrescriptions, aPrescription
Dim i, j
Dim aMessage
Dim aProviderComments, aProviderComment
Dim aProvider

Set aPatient = Profile.SelectPatient
set aFilter = Profile.CreatePrescriptionFilter
aFilter.Patient = aPatient
set aPrescriptions = Profile.LoadPrescriptions(aFilter)

aMessage = "The number of the prescriptions for " & aPatient.SurnameFirstName &_ 
  " = " & aPrescriptions.Count & vbNewLine
  
for i = 0 to aPrescriptions.Count - 1
  set aPrescription = aPrescriptions.Item(i)
  aMessage = aMessage & vbNewLine & (i + 1) & ") " & aPrescription.RxName &_ 
    " was prescribed on " & aPrescription.Date  

  if not aPrescription.ProviderComments is nothing then
    aMessage = aMessage & vbNewLine & "    Provider Comments Count = " &_
      aPrescription.ProviderComments.Count  
  end if

  set aProviderComments = aPrescription.ProviderComments
  
  for j = 0 to aProviderComments.Count - 1
    set aProviderComment = aProviderComments.Item(j)
    set aProvider = aProviderComment.Provider
   
    if aProvider.ID <> 0 then
      aMessage = aMessage & vbNewLine & "    Provider: " & aProvider.FullName
    end if
    
    aMessage = aMessage & vbNewLine &_
      "    Date: " & aProviderComment.Date & vbNewLine &_
      "    Comment: " & aProviderComment.Comment & vbNewLine  
   
  next 'j 
next 'i   

Profile.MsgBox(aMessage)     
Note:

In Profile Client v8 on User Interface Provider Comments can be found in Clinical > Medical Record > Prescriptions > Details > Comment.

Version information

Added in v7.8.0