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

IBDF2G.m

Go to the documentation of this file.
  1. IBDF2G ;ALB/CJM - ENCOUNTER FORM - (prints input field);07/20/94
  1. ;;3.0;AUTOMATED INFO COLLECTION SYS;;APR 24, 1997
  1. MFLD(FIELD) ;for printing the multiple choice field=FIELD
  1. N BLOCK,LABEL,ROW,COL,NODE,CHOICE,ID,DISP,FNAME,FID,ALLOWED,HDR,QLFR,PI
  1. Q:'$G(FIELD)
  1. S NODE=$G(^IBE(357.93,FIELD,0))
  1. S BLOCK=$P(NODE,"^",8)
  1. ;if the input field does not belong to the right block, reindex it and quit
  1. I BLOCK'=IBBLK K DA S DA=FIELD,DIK="^IBE(357.93," D IX^DIK K DIK Q
  1. ;
  1. ;get the package interface
  1. S PI=$P(NODE,"^",6)
  1. ;
  1. S COL=$P(NODE,"^",3)
  1. S ROW=$P(NODE,"^",4)
  1. S HDR=$P(NODE,"^",2)
  1. I HDR]" ",ROW=+ROW,COL=+COL
  1. E S HDR=""
  1. S DISP=$P(NODE,"^",7)
  1. S FNAME=$P(NODE,"^")
  1. S ALLOWED=$P(NODE,"^",9)
  1. D:HDR]"" DRWSTR^IBDFU(+ROW,+COL,HDR,DISP)
  1. ;
  1. ;print the choices
  1. S FID="M"_FIELD
  1. S CHOICE=0 F S CHOICE=$O(^IBE(357.93,FIELD,1,CHOICE)) Q:'CHOICE D
  1. .S NODE=$G(^IBE(357.93,FIELD,1,CHOICE,0))
  1. .S ID=$P(NODE,"^",8) ;the ID of the choice
  1. .S LABEL=$P(NODE,"^",5)
  1. .S COL=$P(NODE,"^",2)
  1. .S ROW=$P(NODE,"^",3)
  1. .S DISP=$P(NODE,"^",4)
  1. .I LABEL]" ",ROW=+ROW,COL=+COL
  1. .E S LABEL=""
  1. .D:LABEL]"" DRWSTR^IBDFU(ROW,COL,LABEL,DISP)
  1. .S COL=$P(NODE,"^",6)
  1. .S ROW=$P(NODE,"^",7)
  1. .S QLFR=$P(NODE,"^",9)
  1. .I ROW=+ROW,COL=+COL D DRWBBL^IBDFM1(ROW,COL,PI,ID,FNAME,FID,ALLOWED,LABEL,HDR,QLFR)
  1. Q