VistA Analysis » VistA Reference » RPCs » TIU TEMPLATE DELETE

TIU TEMPLATE DELETE

This RPC will delete orphan entries in the Template file (i.e., onlythose entries that have been removed from any Groups, Classes, Personalor Shared Root entries).

Properties

Property Value
Label DELETE
MUMPS Implementation TIUSRVT
Return Type SINGLE VALUE

Input Parameters

Name Type Maximum Data Length Required Description
TIUDA LIST   true This is a list of records which are to be deleted.

MUMPS Method Description

Property Value
Method DELETE^TIUSRVT
Method Comment Delete TEMPLATES
Input Parameters TIUDA
First Comment
 Pass TIUDA as array of record numbers to be deleted by reference
SUCCESS will be returned as the actual number of templates deleted
Code
 N TIUI S (SUCCESS,TIUI)=0
F S TIUI=$O(TIUDA(TIUI)) Q:+TIUI'>0 D
. N DA
. S DA=+TIUDA(TIUI)
. I 'DA Q
. L -^TIU(8927,DA,0):1 ; Unlock before deleting
. ; Quit if the Template is NOT an ORPHAN
. I +$O(^TIU(8927,"AD",DA,0)) Q
. ; Otherwise, call FileMan to DELETE the record
. D ZAP(DA) S SUCCESS=SUCCESS+1

CPRS

File Type Description
Pascal File Templates/rTemplates.pas


Document generated on August 31st 2022, 2:55:43 pm