; Get document data for insertion
; Receives DA, TSTART, FIRSTPFX
; FIRSTPFX = $$INSPFIX of parent of inserted document.
; Returns line TSTART.
; Receives XIDDATA by ref, finds it, and passes it back.
GETTL(TIUD0,PREFIX)
; Get title column data; put updated prefix
SETTLPT(STRING,DA,PREFIX)
; Set field TITLE or PATIENT into string,
VEXREQ(VALMY)
;Check for valid expand/contract requests.
; A list of documents to expand/contract is invalid if any docmt
IDDATA(TIUDA,TIUD0,TIUD21)
; Return TIUGDATA:
; TIUGDATA = 0 or
; = TIUDA^haskid^IDparent^prmsort, where
; TIUDA = note DA
; haskid = 1 if note has ID kid, else 0
; IDparent = parent DA if note has ID parent, else 0
; prmsort = 'TITLE' if entries ordered by title, else 'REFDT'
GETPT(TIUD0,PREFIX)
; Get patient column data; put updated prefix data