ISMentalEvent.Name

Description

The name of the mental event.

Syntax

object.Name

Part Attribute Type Description
object Required
The object always implements the ISMentalEvent interface

Return Value

string

Example

Display the number of the legal status changes, some information about them and the linked mental events, including their names.

Dim aFilter
Dim aLegalStatusChanges, aLegalStatusChange
Dim aMessage
Dim i 
Dim aEvent
Dim aCreator
Dim aPatient
Dim aType

set aFilter = Profile.CreateLegalStatusChangeFilter
aFilter.FromDate = #09/09/2015#
set aLegalStatusChanges = Profile.LoadLegalStatusChanges(aFilter)

aMessage = "Legal Status Changes Count = " & aLegalStatusChanges.Count
for i = 0 to aLegalStatusChanges.Count - 1
  set aLegalStatusChange = aLegalStatusChanges.Item(i)
  set aEvent = Profile.LoadMentalHealthEvent(aLegalStatusChange.EventID)
  
  aMessage = aMessage & vbNewLine & (i + 1) & ") " &_
    "Created Date/Time: " & aLegalStatusChange.CreatedDT & vbNewLine &_
    "    ID: " & aLegalStatusChange.ID & vbNewLine &_
    "    Modified Date/Time: " & aLegalStatusChange.ModifiedDT & vbNewLine 
    
  if not aEvent is nothing then
    set aCreator = Profile.LoadProviderById(aEvent.CreatedBy)
    set aPatient = Profile.LoadPatient(aEvent.PatientId)
    set aType = Profile.LoadShortCode(aEvent.TypeId)
    aMessage = aMessage &_
      "Event: " & aEvent.Name & vbNewLine &_
      "Comment: " & aEvent.Comment & vbNewLine &_
      "Created By: " & aCreator.FullName & vbNewLine &_
      "Created On: " & aEvent.CreatedOn & vbNewLine &_
      "ID: " & aEvent.ID & vbNewLine &_
      "Legal Status: " & aEvent.LegalStatus & vbNewLine &_
      "Modified On: " & aEvent.ModifiedOn & vbNewLine &_
      "Patient: " & aPatient.SurnameFirstName & vbNewLine &_
      "Report Date: " & aEvent.ReportDate & vbNewLine &_ 
      "Type: " & aType.Description & vbNewLine 
            
  end if  
                                 
next      

Profile.MsgBox(aMessage)     
Note:

In Profile Client v8 on User Interface Name can be found in Clinical > Medical Record > Mental Health > Reason.

Version information

Added in v7.8.0