ISPatientProblem.SetGUID

Description

This function sets Globally Unique Identifier for the patient's problem.

Syntax

object.SetGUID aGUID

Part Attribute Type Description
object Required
The object always implements the ISPatientProblem interface
aGUID In, Required
string
Globally Unique Identifier to set

Example

Add a new problem and generate GUID for it.

sub main
  Dim aGuid
  Dim aPatient
  Dim aNewProblem
  Dim aMessage
   
  aGuid = GetNewGUID

  Set aPatient = Profile.SelectPatient
  Set aNewProblem = aPatient.AddProblem(1) 'ptDiagnosis
  aNewProblem.DxCode = "LETH"
  aNewProblem.SetGUID (aGuid) 
  aNewProblem.Save

  set aNewProblem = Profile.LoadPatientProblemByGuid(aGuid)

  aMessage = aMessage & vbNewLine & "New problem was added successfully " &_ 
    "with GUID '" & aNewProblem.GUID & "'" 
  Profile.MsgBox (aMessage)
end sub


function GetNewGuid
  Dim aTypeLib
  Dim aGuid
   
  Set aTypeLib = CreateObject("Scriptlet.TypeLib")
  aGuid = aTypeLib.Guid
  aGuid = Left(aGuid, Len(aGuid) - 2)
  aGuid = Mid(aGuid, 2, 8) &_
          Mid(aGuid, 11, 4) &_
          Mid(aGuid, 16, 4) &_
          Mid(aGuid, 21, 4) &_
          Mid(aGuid, 26, 12)
  GetNewGuid = aGuid        
end function  
Note: This function is not recommended to use because GUID shouldn't be set or changed manually.

In Profile Client v8 on User Interface GUID cannot be found.

Version information

Added in v7.9.2