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

IBDF2B1.m

Go to the documentation of this file.
  1. IBDF2B1 ;ALB/CJM - ENCOUNTER FORM - (continuation of IBDF2B);12/15/92
  1. ;;3.0;AUTOMATED INFO COLLECTION SYS;;APR 24, 1997
  1. ;
  1. TXTPRINT ;for printing a word-processing field
  1. ;
  1. ;if the this is not the first time this form is being printed and the data doesn't change then don't print it!
  1. Q:(('IBPRINT("ENTIRE"))&('RTN("CHANGES")))
  1. ;
  1. N LINE,LNSUSED,SPACE,QUIT S LNSUSED=0 ;LNSUSED keeps track of number of available lines for text are used already
  1. S SPACE=$S(SPACING=2:2,1:1)
  1. I 'HIO!('WIO)!(XIO'=+XIO)!(YIO'=+YIO) Q
  1. I LABEL'="",(('IBPRINT("WITH_DATA"))!($G(@RTN("DATA_LOCATION")@(1,0))="")) D
  1. .D DRWSTR^IBDFU(YIO+SPACE-1,XIO,LABEL,DISPLAY)
  1. .D DRWSTR^IBDFU(YIO+SPACE-1,XIO+$L(LABEL)," "_$$HLINE^IBDFU(WIO-($L(LABEL)+1)))
  1. .S LNSUSED=SPACE
  1. I IBPRINT("WITH_DATA"),($G(@RTN("DATA_LOCATION")@(1,0))'="") D
  1. .D FORMAT^IBDFU6("^TMP(""IB"",$J,""INTERFACES"",+$G(DFN),RTN(""NAME""))",WIO,LABEL)
  1. .S (LNSUSED,LINE,QUIT)=0 F S LINE=$O(^UTILITY($J,"W",1,LINE)) D Q:QUIT
  1. ..I 'LINE!(LNSUSED+SPACE>HIO) S QUIT=1 D:(LINE&('IBDEVICE("LISTMAN"))&RTN("FULL")) OVERFLOW^IBDF2B("CURRENT") Q
  1. ..D DRWSTR^IBDFU(YIO+LNSUSED+(SPACE-1),XIO,$$PADRIGHT^IBDFU($G(^UTILITY($J,"W",1,LINE,0)),WIO))
  1. ..S LNSUSED=LNSUSED+SPACE
  1. D ADDLINES^IBDF2B
  1. K ^UTILITY($J,"W",1)
  1. Q