ISHRObservation.Delete

Description

This function deletes the Health Record Observation.

Syntax

object.Delete

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

Example

Delete the observation. Display the number of observations before and after deleting.

Dim aTr
Dim aPatient
Dim aFilter
Dim aHRObservations, aHRObservations1
Dim aHRObservation  
Dim aMessage
Dim i   

Set aTr = Profile.StartMapTransaction
Set aPatient = Profile.SelectPatient
set aFilter = Profile.CreateObservationFilter
aFilter.PatientId = aPatient.ID 
aFilter.DateFrom = #01/01/2019#
aFilter.DateTo = #01/01/2020#
set aHRObservations = aFilter.Load

aMessage = "HR Observations Count before deleting = " & aHRObservations.Count & vbNewLine

set aHRObservation = aHRObservations.Item(0)
aHRObservation.Delete

aTr.SnapShot

set aTr = Profile.StartMapTransaction
set aHRObservations1 = aFilter.Load

aMessage = aMessage & "HR Observations Count after deleting = " &_
  aHRObservations1.Count & vbNewLine
    
Profile.MsgBox(aMessage)  
Note:

In Profile Client v8 on User Interface HR Observations can be found and deleted in Organisation > Work Centre > Work > Manual Trans > Edit the selected transaction > Item and in Clinical > Medical Record > Measures.

Version information

Added in v7.9.2