ID of the patient the medication order item is assigned to.
object.PatientId
Part | Attribute | Type | Description |
---|---|---|---|
object |
Required | The object always implements the
ISMedOrderItem interface |
int
Display the number of the medication order items and some information about them, including the names of the patients they are assigned to.
Dim aPatient
Dim aFilter
Dim aMedOrderItems, aMedOrderItem
Dim aMessage
Dim i
Set aFilter = Profile.MakeMedOrderItemsFilter
aFilter.ProviderID = Profile.LoadProvider("MM").ID
aFilter.OnlyPNRIrregular = False
aFilter.OnlyRegular = False
aFilter.OnlyDiscontinued = False
set aMedOrderItems = Profile.LoadMedOrderItems(aFilter)
aMessage = "Medication Order Items Count = " & aMedOrderItems.Count
for i = 0 to aMedOrderItems.Count - 1
set aMedOrderItem = aMedOrderItems.Item(i)
set aPatient = Profile.LoadPatient(aMedOrderItem.PatientId)
aMessage = aMessage & vbNewLine & (i + 1) & ") " &_
"Medication Name: " & aMedOrderItem.Medication.RxName & vbNewLine &_
"Date: " & aMedOrderItem.Medication.Date & vbNewLine &_
"Patient: " & aPatient.SurnameFirstName & vbNewLine &_
"URL: " & aMedOrderItem.URL & vbNewLine
next
Profile.MsgBox(aMessage)
In Profile Client v8 on User Interface Patient ID cannot be found, but Medication Order Items can be found in
.