This function creates a new prescription for the patient.
object.CreatePrescription()
Part | Attribute | Type | Description |
---|---|---|---|
object |
Required | The object always implements the
ISMedicationsSet interface |
Display the number of the prescriptions before and after creation a new prescription and some information about it.
Dim aTr
Dim aPatient
Dim aMedicationsSet
Dim aPrescriptions
Dim aNewPrescr
Dim aMessage
Set aTr = Profile.StartMapTransaction
set aPatient = Profile.SelectPatient
set aMedicationsSet = aPatient.Medications
set aPrescriptions = aMedicationsSet.All
aMessage = "Prescriptions Count before = " & aPrescriptions.Count & vbNewLine
set aNewPrescr = aMedicationsSet.CreatePrescription
aNewPrescr.StartDate = Now + 1
aNewPrescr.UnstructuredRxString = "Pentasa"
aNewPrescr.FreqStr = "2 tablets as directed"
aNewPrescr.OrderedByID = Profile.LoadProvider("MM").ID
if not aNewPrescr is nothing then
aMessage = aMessage & "New prescription was created successfully" & vbNewLine &_
"-Name: " & aNewPrescr.UnstructuredRxString & vbNewLine &_
"-Start Date: " & aNewPrescr.StartDate & vbNewLine &_
"-Frequency: " & aNewPrescr.FreqStr & vbNewLine &_
"-Provider: " & Profile.LoadProviderbyID(aNewPrescr.OrderedByID).FullName
end if
aTr.SnapShot
set aPrescriptions = aMedicationsSet.All
aMessage = aMessage & vbNewLine & "Prescriptions Count after = " & aPrescriptions.Count
Profile.MsgBox(aMessage)
In Profile Client v8 on User Interface Prescription can be found in
.