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

IBDFU1A.m

Go to the documentation of this file.
  1. IBDFU1A ;ALB/CJM - ENCOUNTER FORM (read data field description);NOV 16,1992
  1. ;;3.0;AUTOMATED INFO COLLECTION SYS;;APR 24, 1997
  1. ;utilities
  1. FLDDESCR(IBFLD) ;IBFLD should be a pointer to the IB DATA FIELD file
  1. ;parses the 0 NODE and returns the fields
  1. ;returns 1 if the field description is not found
  1. N NODE
  1. Q:'$G(IBFLD) 0
  1. S:$G(IBFLD) NODE=$G(^IBE(357.5,IBFLD,0))
  1. Q:NODE="" 0
  1. S FLDNAME=$P(NODE,"^",1)
  1. S BLK=$P(NODE,"^",2)
  1. S RTN=$P(NODE,"^",3)
  1. S LASTITEM=$P(NODE,"^",4)
  1. S ITEM=+$P(NODE,"^",5)
  1. S LABEL=$P(NODE,"^",6)
  1. S DISPLAY=$P(NODE,"^",7)
  1. S XIO=+$P(NODE,"^",10)
  1. S YIO=+$P(NODE,"^",11)
  1. S HIO=+$P(NODE,"^",12)
  1. S SPACING=$P(NODE,"^",13)
  1. S WIO=+$P(NODE,"^",14)
  1. Q 1
  1. SFLDDSCR(IBFLD,LAST) ;gets the next subfield - LAST is the last subfield processed, IBFLD is the field
  1. ;outputs - LABEL,XIO,YIO,WIO,XLAB,YLAB,PIECE,LENGTH,LAST
  1. ;returns 0 if no more subfields, LAST otherwise
  1. ;
  1. N NODE
  1. F S LAST=$O(^IBE(357.5,IBFLD,2,LAST)) Q:'LAST S NODE=$G(^IBE(357.5,IBFLD,2,LAST,0)) I NODE'="" D Q
  1. .S LABEL=$P(NODE,"^",1),DISPLAY=$P(NODE,"^",3),XLAB=$P(NODE,"^",4),YLAB=$P(NODE,"^",5),YIO=$P(NODE,"^",6),XIO=$P(NODE,"^",7),WIO=$P(NODE,"^",8),PIECE=$P(NODE,"^",9)
  1. Q LAST