VistA Analysis » VistA Reference » RPCs » TIU GET DOCUMENTS FOR REQUEST

TIU GET DOCUMENTS FOR REQUEST

This Remote Procedure returns the list of documents associated with agiven Request (e.g., Consult Request, or Surgical Case).

Properties

Property Value
Label GETDOCS
MUMPS Implementation TIUSRVLR
Return Type GLOBAL ARRAY

Input Parameters

Name Type Maximum Data Length Required Description
OVP LITERAL   true This is the variable pointer (e.g., "12745;GMR(123," or "14672;SRF(") thatidentifies the record in the requesting application.

MUMPS Method Description

Property Value
Method GETDOCS^TIUSRVLR
Method Comment Get TIU Documents for a given Consult or
Input Parameters OVP, SEQUENCE
First Comment
 Surgical Case
Code
 N TIUDA,TIUI
S (TIUDA,TIUI)=0,TIUY=$NA(^TMP("TIULIST",$J)) K @TIUY
S SEQUENCE=$S($G(SEQUENCE)]"":$G(SEQUENCE),1:"D")
F S TIUDA=$O(^TIU(8925,"G",OVP,TIUDA)) Q:+TIUDA'>0 D
. S TIUI=TIUI+1
. ; Cross-check value of field 1405 with x-ref value
. I OVP'=$P($G(^TIU(8925,TIUDA,14)),U,5) Q
. ; If a document is an ID Entry, get its parent
. ; I +$G(^TIU(8925,TIUDA,21)) S TIUDA=+$G(^TIU(8925,TIUDA,21))
. ; Don't include entry in list more than once
. I +$O(@TIUY@("INDX",TIUDA,0)) Q
. ; Don't include entry in list if RETRACTED
. I $P($G(^TIU(8925,TIUDA,0)),U,5)=15 Q
. S @TIUY@(TIUI)=TIUDA_U_$$RESOLVE^TIUSRVLO(TIUDA)
. S @TIUY@("INDX",TIUDA,TIUI)=""
. I +$$HASDAD^TIUSRVLI(TIUDA) D SETDAD^TIUSRVLI(.TIUY,TIUDA,.TIUI)
. I +$$HASKIDS^TIUSRVLI(TIUDA) D SETKIDS^TIUSRVLI(.TIUY,TIUDA,.TIUI)

CPRS

File Type Description
NOT OSEHRA CPRS  


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