Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: TIUFLLM

TIUFLLM.m

Go to the documentation of this file.
  1. TIUFLLM ; SLC/MAM - Library; List Manager Related: RTSCROLL(TIUREC,TYPE), PARSE(INFO), NINFO(LINENO,FILEDA,INFO,PINFO,TENDA), PLUSUP(INFO,TIUREC) ;4/6/95 10:48
  1. ;;1.0;TEXT INTEGRATION UTILITIES;;Jun 20, 1997
  1. ;
  1. RTSCROLL(TIUREC,TYPE) ; Called by BUFENTRY^TIUFLLM2. For lines being set for
  1. ;Templates HACJ only. Copy chars 15-20, 44-49 of entry into chars
  1. ;215-220, 244-249. Depending on rt/left scroll position, replace those
  1. ;chars w Type.
  1. ; Requires TIUREC, TYPE from BUFENTRY.
  1. ; TIUFLFT, TIUFIXED are for updating lines in H/A/C/J from Template D or T.
  1. S TIUREC=$$SETSTR^VALM1($E(TIUREC,15,20),TIUREC,215,6)
  1. S TIUREC=$$SETSTR^VALM1($E(TIUREC,43,48),TIUREC,243,6)
  1. I $G(TIUFLFT)>49 D
  1. . I TIUFTMPL="J" D Q
  1. . . I $G(VALM("FIXED"))=20!($G(TIUFIXED)=20) S TIUREC=$$SETSTR^VALM1(" ",TIUREC,20,1) Q
  1. . D
  1. . . S TYPE=" "_TYPE_" "
  1. . . I $G(VALM("FIXED"))=20!($G(TIUFIXED)=20) S TIUREC=$$SETSTR^VALM1(TYPE,TIUREC,15,6) Q
  1. . . S TIUREC=$$SETSTR^VALM1(TYPE,TIUREC,43,6)
  1. Q
  1. ;
  1. PARSE(INFO) ; Splits INFO into pieces such as LINENO, XPDLCNT, etc.
  1. ;Sets INFO pieces into subscripts.
  1. ;Requires INFO, where INFO is either as set in NINFO^TIUFLLM or
  1. ;in UPDATE^TIUFLLM1 or = ^TMP("TIUFIDX,$J,LINENO).
  1. ; WARNING: +INFO may be set by NINFO or UPDATE to 0!
  1. ; Other pieces of INFO may be 0 or ""!
  1. N LINENO,FILEDA,XPDLCNT,LEVEL,PLINENO,TENDA,PLINENO
  1. S LINENO=+INFO,FILEDA=$P(INFO,U,2),XPDLCNT=$P(INFO,U,3),LEVEL=$P(INFO,U,4),PLINENO=$P(INFO,U,5),TENDA=$P(INFO,U,6)
  1. S INFO("LINENO")=LINENO,INFO("FILEDA")=FILEDA
  1. S INFO("XPDLCNT")=XPDLCNT,INFO("LEVEL")=LEVEL,INFO("PLINENO")=PLINENO,INFO("TENDA")=TENDA
  1. PARSX Q
  1. ;
  1. NINFO(LINENO,FILEDA,INFO,PINFO,TENDA) ; Returns INFO for New (anticipated)
  1. ;LM Entry, where INFO = LINENO^FILEDA^XPDLCNT^LEVEL^PLINENO^TENDA or
  1. ;INFO = Error msg
  1. ; Requires LINENO = anticipated List Manager Entry #
  1. ; Requires FILEDA = 8925.1 IFN of new entry
  1. ; PINFO, TENDA are required IF new Entry has existing parent LM Entry
  1. ;on current or parent LM Template H.
  1. ; PINFO has form of INFO, above, but for LM parent of new entry.
  1. ; TENDA = LINENO's DA in parent item multiple (10 Node).
  1. ; XPDLCNT = # of lines entry has been expanded, = 0 for new entry.
  1. ; LEVEL = LINENO hierarchy level. Clinical Documents has LEVEL 0. Used
  1. ;for right shift for Template H.
  1. ; Module sets LEVEL,PLINENO,TENDA = 0 IF new entry has no existing parent.
  1. N XPDLCNT,LEVEL,PLINENO
  1. S XPDLCNT=0
  1. S LEVEL=$S($G(PINFO):$P(PINFO,U,4)+1,1:0),PLINENO=+$G(PINFO),TENDA=+$G(TENDA)
  1. S INFO=LINENO_U_FILEDA_U_XPDLCNT_U_LEVEL_U_PLINENO_U_TENDA
  1. NINFX Q
  1. ;
  1. PLUSUP(INFO,TIUREC) ; Update the plus item indicator in front of LM Entry Name for Template H.
  1. ; Assumes Name proper starts at col 8, for level 0. + goes in front of Name.
  1. ; Returns TIUREC with + added or deleted.
  1. ; Requires INFO array, where INFO is either as set in NINFO^TIUFLLM or
  1. ;is = ^TMP("TIUFIDX,$J,LINENO), and where INFO array is as set in
  1. ;PARSE^TIUFLLM(INFO).
  1. ; Requires TIUREC = LM Entry as in TIUF1 array.
  1. ; INFO("XPDLCNT") must anticipate next redisplay of screen - whether
  1. ;Entry will/not be expanded.
  1. N HASITEMS,LEVEL,NMCOLUMN,COLUMN,PLUS
  1. S LEVEL=INFO("LEVEL"),HASITEMS=$$HASITEMS^TIUFLF1(INFO("FILEDA"))
  1. S PLUS=" "
  1. I HASITEMS,'INFO("XPDLCNT") S PLUS="+"
  1. S NMCOLUMN=8,COLUMN=NMCOLUMN+(2*LEVEL)-1
  1. S TIUREC=$$SETSTR^VALM1(PLUS,TIUREC,COLUMN,1)
  1. Q TIUREC
  1. ;