VistA Analysis » VistA Reference » RPCs » TIU ID CAN ATTACH

TIU ID CAN ATTACH

This BOOLEAN RPC evaluates the question of whether a particular documentmay be attached as an entry to an Interdisciplinary Note (i.e., can thisdocument be an ID Child?).

Properties

Property Value
Label CANATTCH
MUMPS Implementation TIUSRVA
Return Type SINGLE VALUE

Input Parameters

Name Type Maximum Data Length Required Description
TIUDA LITERAL   true This is the IEN of the prospective ID Child document in the TIU Documentfile.

MUMPS Method Description

Property Value
Method CANATTCH^TIUSRVA
Method Comment Can this document be attached as an ID Child
Input Parameters TIUDA
Code
 N TITLEDA,PARENTDA
S TITLEDA=+$G(^TIU(8925,TIUDA,0))
I TITLEDA'>0 S TIUY="0^Document #"_TIUDA_" does not exist." Q
S PARENTDA=+$G(^TIU(8925,TIUDA,21))
S TIUY=$$POSSPRNT^TIULP(TITLEDA)
I +TIUY S TIUY="-1"_U_$P(TIUY,U,2) Q
I +$$ISCWAD^TIULX(TITLEDA) D Q
. S TIUY="0^ CWAD Documents may not be Attached as Interdisciplinary Entries."
I +$$ISA^TIULX(TITLEDA,+$$CLASS^TIUCNSLT) D Q
. S TIUY="0^ Consult Results may not be Attached as Interdisciplinary Entries."
S TIUY=$$CANDO^TIULP(TIUDA,"ATTACH TO ID NOTE")
I PARENTDA D ; action must be "detach"
. I 'TIUY S TIUY="0^ You may not detach this note from an interdisciplinary note." Q
. S TIUY=$$CANDO^TIULP(PARENTDA,"ATTACH ID ENTRY")
. I 'TIUY S TIUY="0^ You may not detach this note from its interdisciplinary note."

CPRS

File Type Description
Pascal File rTIU.pas


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