ISMedicationsSet.LastDays

Description

The prescriptions that were ordered within the specified count of days.

Syntax

object.LastDays(aDayCount)

Part Attribute Type Description
object Required
The object always implements the ISMedicationsSet interface
aDayCount In, Required
int
The specified count of days
Restriction: This property is readonly.

Return Value

ISPrescriptions

Example

Display the number of the prescriptions that were ordered within the specified count of days, their Rx names and dates.

Dim aPatient
Dim aMedicationsSet
Dim aDayCount
Dim aPrescriptions, aPrescription
Dim aMessage
Dim i  

Set aPatient = Profile.SelectPatient                             
set aMedicationsSet = aPatient.Medications
aDayCount = 20
set aPrescriptions = aMedicationsSet.LastDays(aDayCount)

aMessage = "Prescriptions Count = " & aPrescriptions.Count & vbNewLine 

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

Profile.MsgBox(aMessage)  
Note:

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

Version information

Added in v7.8.0