ISPrescriptionFilter.CalcUsualPrescrId

Description

This filter property is used to initialize the property SameUsualPrescrId for each prescription in the collection. If this filter property is False, the property SameUsualPrescrId = -1.

Syntax

object.CalcUsualPrescrId

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

Return Value

bool

Example

Display some information about of the prescriptions loaded on the basis of the selected filter, including the Rx medications for these prescriptions and the appropriate usual prescriptions.

Dim aFilter
Dim aPrescriptions, aPrescription
Dim aUsualPrescrId
Dim aUsualPrescr
Dim i
Dim aMessage

Set aFilter = Profile.CreatePrescriptionFilter
aFilter.Patient = Profile.SelectPatient
aFilter.CalcUsualPrescrId = True 
set aPrescriptions = Profile.LoadPrescriptions(aFilter)
aMessage = "Prescriptions Count = " & aPrescriptions.Count & vbNewLine
for i = 0 to aPrescriptions.Count - 1
  set aPrescription = aPrescriptions.Item(i)
  
  aUsualPrescrId = aPrescription.SameUsualPrescrId
  
  aMessage = aMessage & vbNewLine & (i + 1) & ") " &_ 
    aPrescription.RxName & " (start date: " & aPrescription.StartDate & ")"
    
  if aUsualPrescrId > 0 then  
    set aUsualPrescr = Profile.LoadRxPrescription(aUsualPrescrId)
    aMessage = aMessage & vbNewLine & vbTab & "Appropriate Usual Prescription: '" &_  
      aUsualPrescr.RxName & "'"
  else
    aMessage = aMessage & vbNewLine & vbTab & "No appropriate Usual Prescription"  
  end if
next      

Profile.MsgBox(aMessage)   
Note: The process of the property SameUsualPrescrId initialization: there is an usual prescription that has the same Rx preparation or Rx package as the current prescription. So ID of the appropriate usual prescription is assigned to the property SameUsualPrescrId.

In Profile Client v8 on User Interface Usual Prescriptions can be found in Clinical > Medical Record > Prescriptions > Usual Scripts.

Version information

Added in v8.2.0