This function returns the medication that was last prescribed relatively the specified date.
object.LastPrescribed(
[RxOID = 0[, DT = #12/30/1899#]])
Part | Attribute | Type | Description |
---|---|---|---|
object |
Required | The object always implements the
ISMedicationsSet interface |
|
RxOID |
In, Optional Default value is 0 |
int |
OID of the Rx Source |
DT |
In, Optional Default value is
#12/30/1899# |
DateTime |
The date relatively which the last prescribed
medication is determined. |
Display some information about the medication that was last prescribed relatively the specified date.
Dim aPatient
Dim aMedicationsSet
Dim aRxSourceID
Dim aDate
Dim aLastPrescription
Dim aMessage
Set aPatient = Profile.SelectPatient
set aMedicationsSet = aPatient.Medications
aRxSourceID = 0
aDate = Now
set aLastPrescription = aMedicationsSet.LastPrescribed(aRxSourceID, aDate)
if not aLastPrescription is nothing then
aMessage = "The last prescription is '" & aLastPrescription.RxName & "'" & vbNewLine &_
"Date: " & aLastPrescription.Date & vbNewLine &_
"Dosage: " & aLastPrescription.DosageLine & vbNewLine &_
"OID: " & aLastPrescription.OID
else
aMessage = "There is no prescription with the specified Rx Source ID"
end if
Profile.MsgBox(aMessage)
In Profile Client v8 on User Interface Prescriptions can be found in
.