ISPrescriptionFilter.DateToExpr

Description

This filter property is used to load the collection of prescriptions that were last modified till the specified date. The date for filtering can be set as a string in the current system date format or can be specified relative to the current date/time. For example, "Today-1d" is used for loading the prescriptions till yesterday.

Today Current date
d Days
w Weeks
m Months
y Years

Syntax

object.DateToExpr

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

Return Value

string

Example

Display the number of the prescriptions loaded on the basis of the selected filter, the names of the Rx medications and the dates when they were last modified.

Dim aFilter
Dim aPrescriptions, aPrescription
Dim i
Dim aMessage

Set aFilter = Profile.CreatePrescriptionFilter
aFilter.DateFromExpr = "8/4/2019" 'the string which is presented in the current system date format
aFilter.DateToExpr = "Today-1d"  'the string which specifies the date relative to the current date|time 
set aPrescriptions = Profile.LoadPrescriptions(aFilter)

aMessage = "Prescriptions Count = " & aPrescriptions.Count & vbNewLine
for i = 0 to aPrescriptions.Count - 1
  set aPrescription = aPrescriptions.Item(i)
  aMessage = aMessage & vbNewLine & (i + 1) & ") " & aPrescription.RxName &_ 
    " was last modified on " & aPrescription.Date  
next      

Profile.MsgBox(aMessage)   
Note:

In Profile Client v8 on User Interface Date cannot be found.

Version information

Added in v7.8.0