ISPatientSMS.ProviderID

Description

ID of the provider who sent the selected SMS message. If the message was sent by the patient, provider ID = 0.

Syntax

object.ProviderID

Part Attribute Type Description
object Required
The object always implements the ISPatientSMS interface
Restriction: This property is readonly.

Return Value

int

Example

Send a new SMS message, display its text and provider.

Dim aPatient
Dim aPhoneNumber
Dim aPatientSms
Dim aProvider
Dim aMessage 

Set aPatient = Profile.SelectPatient
aPhoneNumber = aPatient.CellPhone
 
set aPatientSms = Profile.SendPatientSMS(aPatient.ID, aPhoneNumber, "Hello!") 

if aPatientSms.ProviderId > 0 then 
  set aProvider = Profile.LoadProviderById(aPatientSms.ProviderId)
  aMessage = "Text: " & aPatientSms.Text & " (Provider: " &_ 
    aProvider.FullName & ")" 
else
  aMessage = "Text: " & aPatientSms.Text 
end if
      
Profile.MsgBox(aMessage) 
Note:

In Profile Client v8 on User Interface Provider ID cannot be found, but Provider can be found in Organisation > Control Centre > Manage > SMS Log > Sent by.

Version information

Added in v7.8.0