VistA Analysis » VistA Reference » RPCs » TIU DOCUMENTS BY CONTEXT

TIU DOCUMENTS BY CONTEXT

Returns lists of TIU Documents that satisfy the following search criteria: 1 - signed documents (all) 2 - unsigned documents 3 - uncosigned documents4 - signed documents/author5 - signed documents/date range

Properties

Property Value
Label CONTEXT
MUMPS Implementation TIUSRVLO
Return Type GLOBAL ARRAY

Input Parameters

Name Type Maximum Data Length Required Description
CLASS LITERAL   true This is a pointer to the Class of TIU DOCUMENTS which the user isinterested in (e.g., 3 for PROGRESS NOTES, 244 for DISCHARGE SUMMARIES,etc.).
CONTEXT LITERAL   true This is an integer number which maps the context in which the user wishesthe notes to be returned. The mapping is as follows: 1 - signed documents (all)2 - unsigned documents 3 - uncosigned documents4 - signed documents/author5 - signed documents/date range
DFN LITERAL   true Pointer to Patient File (#2).
EARLY LITERAL   true EARLY DATE/TIME in regular FileMan format for the inclusive lower bound onthe search.
LATE LITERAL   true LATE DATE/TIME in regular FileMan format for the inclusive upper bound onthe search.
PERSON LITERAL   true This is a pointer to the NEW PERSON FILE (#200) for the author of thedocuments to be retrieved.
OCCLIM LITERAL   true This is the maximum number of documents to be retrieved in the currentquery.
SEQUENCE LITERAL   true This is the sequence by reference date/time (A=ascending (OLDEST FIRST),D=descending (NEWEST FIRST)) in which the user would like the listreturned.
SHOWADD LITERAL   true This BOOLEAN parameter determines whether addenda will be included in thereturn array, when their parent documents are identified by the searchcriteria, and vice versa. Also if SHOWADD is TRUE (1), the "+" at thebeginning of the return text will be omitted (since it offers onlyredundant information).
INCUND LITERAL   true Optional Boolean parameter determines whether Undictated and Untranscribed documents should be returned along with Unsigneddocuments, when the CONTEXT is passed as 2.

MUMPS Method Description

Property Value
Method CONTEXT^TIUSRVLO
Method Comment main
Input Parameters CLASS, CONTEXT, DFN, EARLY, LATE, PERSON, OCCLIM, SEQUENCE, SHOWADD, INCUND
First Comment
 --- Call with:  TIUY     - RETURN ARRAY pass by reference
CLASS - Pointer to TIU DOCUMENT DEFINITION #8925.1
CONTEXT - 1=All Signed (by PT),
- 2="Unsigned (by PT&(AUTHOR!TANSCRIBER))
- 3="Uncosigned (by PT&EXPECTED COSIGNER
- 4="Signed notes (by PT&selected author)
- 5="Signed notes (by PT&date range)
DFN - Pointer to Patient (#2)
[EARLY] - FM date/time to begin search
[LATE] - FM date/time to end search
[PERSON] - Pointer to file 200 (DUZ if not passed)
[OCCLIM] - Occurrence Limit (optional)
[SEQUENCE]- "A"=ascending (Regular date/time)
- "D"=descending (Reverse date/time) (dflt)
[INCUND] - Boolean: include undictated & untranscribed
Code
 S TIUY=$NA(^TMP("TIUR",$J))
K @TIUY
I $G(CONTEXT)'>0 Q
I $G(CLASS)'>0 Q
I $G(CONTEXT)=1 D STRT1^AWCMCPR1 ; TIU*1.0*181
S:+$G(EARLY)'>0!(+$G(CONTEXT)=1) EARLY=0
S:+$G(LATE)'>0!(+$G(CONTEXT)=1) LATE=5000000
I EARLY>LATE D SWAP(.EARLY,.LATE)
I $L(LATE,".")=1 D EXPRANGE(.EARLY,.LATE)
S:+$G(PERSON)'>0 PERSON=DUZ
S:$G(SEQUENCE)']"" SEQUENCE="D"
S:+$G(OCCLIM)'>0 OCCLIM=9999999
S DFN=+$G(DFN)
S EARLY=9999999-EARLY,LATE=9999999-LATE ; CHANGE TO REVERSE DATES
I CONTEXT=1!(CONTEXT=5) D G CTXQ
. D ACLPT(.TIUY,CLASS,DFN,LATE,EARLY,OCCLIM,SEQUENCE)
I CONTEXT=2 D G CTXQ
. I DFN>0 D Q
. . D ACLAU(.TIUY,CLASS,PERSON,DFN,LATE,EARLY,SEQUENCE,$G(INCUND))
. F S DFN=$O(^TIU(8925,"ACLAU",CLASS,PERSON,DFN)) Q:DFN'>0 D ACLAU(.TIUY,CLASS,PERSON,DFN,LATE,EARLY,SEQUENCE,$G(INCUND))
I CONTEXT=3 D G CTXQ
. I DFN>0 D Q
. . D ACLEC(.TIUY,CLASS,PERSON,DFN,LATE,EARLY,SEQUENCE)
. F S DFN=$O(^TIU(8925,"ACLEC",CLASS,PERSON,DFN)) Q:DFN'>0 D ACLEC(.TIUY,CLASS,PERSON,DFN,LATE,EARLY,SEQUENCE)
I CONTEXT=4 D G CTXQ
. I DFN>0 D Q
. . ;VMP OIFO BAY PINES;ELR;TIU*1.0*194 REMOVED EXECUTION OF ACLSB & ADDED APTCL
. . ;D ACLSB(.TIUY,CLASS,PERSON,DFN,LATE,EARLY,SEQUENCE)
. . D APTCL^TIUSRVLP(.TIUY,CLASS,PERSON,DFN,LATE,EARLY,SEQUENCE)
. F S DFN=$O(^TIU(8925,"APTCL",DFN)) Q:DFN'>0 D APTCL^TIUSRVLP(.TIUY,CLASS,PERSON,DFN,LATE,EARLY,SEQUENCE)

CPRS

File Type Description
Pascal File rDCSumm.pas
Pascal File rTIU.pas


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