InsertElement Example for Delphi
var
nRet: Integer;
begin
LEADDicom1.EnableMethodErrors := false;
{ insert the new element }
LEADDicom1.FindTag(TAG_DISCHARGE_DATE);
nRet := LEADDicom1.InsertElement(false, TAG_DISCHARGE_DATE, LEADDicom1.CurrentTag.VR, false, ELEMENT_INDEX_MAX);
If nRet <> SUCCESS Then
ShowMessage('Error Inserting Element')
Else
ShowMessage('Inserted Element: ' + LEADDicom1.CurrentTag.Name);
LEADDicom1.EnableMethodErrors := true;
End;