ISInfant.Delete

Description

This function deletes the selected Infant object.

Syntax

object.Delete

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

Example

Delete one Infant object in the selected pregnancy record, display the number of the Infant objects in this record before and after deleting.

Dim aPatient
Dim aPregnancy
Dim aInfant
Dim aMessage

Set aPatient = Profile.SelectPatient
if aPatient.Sex <> "F" then
  Profile.MsgBox("You should select female patient!")
  exit sub
end if
  
if aPatient.PregnancyCount = 0 then 
  aMessage = aMessage & "No pregnancies"
else
  set aPregnancy = aPatient.GetPregnancy(1)
    aMessage = aMessage & "    " & vbNewLine & "Code: " & aPregnancy.DxCode &_ 
      "; Description: " & aPregnancy.DxDescription & vbNewLine    
  if aPregnancy.InfantCount = 0 then
    aMessage = aMessage & "   -" & "No infants" & vbNewLine
  else
    aMessage = aMessage & "Infants Count = " & aPregnancy.InfantCount & vbNewLine
    set aInfant = aPregnancy.Infant(0)
    aInfant.Delete
    aMessage = aMessage & "Infants Count after deleting = " &_ 
      aPregnancy.InfantCount & vbNewLine
  end if  
end if
Profile.MsgBox(aMessage)  
Note:

In Profile Client v8 on User Interface Infant object can be found and deleted in Clinical > Medical Record > Obstetric, in Clinical > Clinical Details > Obstetric History or in Patient > Cases > Clinical > Obstetric.

Version information

Added in v7.8.0