- IBDFU6 ;ALB/CJM - ENCOUNTER FORM - (utilities for data fields);3/29/93
- ;;3.0;AUTOMATED INFO COLLECTION SYS;;APR 24, 1997
- FORMAT(ARY,WIDTH,LABEL) ;formats the word-processing field pointed to by @ARY into a column of width=WIDTH
- N LINE,W
- K ^UTILITY($J,"W"),DIWF
- S LINE=0,DIWL=1,DIWR=WIDTH
- I $D(LABEL) S X=$E(LABEL_" ",1,WIDTH) I X'="" D ^DIWP
- F S LINE=$O(@ARY@(LINE)) Q:'LINE S X=$G(@ARY@(LINE,0)) I X'="" D ^DIWP
- K X,DIWL,DIWR,DIWF
- Q
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HIBDFU6 454 printed Feb 19, 2025@00:20:07 Page 2
- IBDFU6 ;ALB/CJM - ENCOUNTER FORM - (utilities for data fields);3/29/93
- +1 ;;3.0;AUTOMATED INFO COLLECTION SYS;;APR 24, 1997
- FORMAT(ARY,WIDTH,LABEL) ;formats the word-processing field pointed to by @ARY into a column of width=WIDTH
- +1 NEW LINE,W
- +2 KILL ^UTILITY($JOB,"W"),DIWF
- +3 SET LINE=0
- SET DIWL=1
- SET DIWR=WIDTH
- +4 IF $DATA(LABEL)
- SET X=$EXTRACT(LABEL_" ",1,WIDTH)
- IF X'=""
- DO ^DIWP
- +5 FOR
- SET LINE=$ORDER(@ARY@(LINE))
- if 'LINE
- QUIT
- SET X=$GET(@ARY@(LINE,0))
- IF X'=""
- DO ^DIWP
- +6 KILL X,DIWL,DIWR,DIWF
- +7 QUIT