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

IBDFU91.m

Go to the documentation of this file.
  1. IBDFU91 ;ALB/CJM - ENCOUNTER FORM - transforms needed to validate,display and pass data;AUG 18,1995
  1. ;;3.0;AUTOMATED INFO COLLECTION SYS;;APR 24, 1997
  1. ;
  1. OUTPUT(PI,Y) ;xecutes the output transform of the package interface on Y
  1. ;Y should be passed by reference
  1. ;the underlying output transform should set Y="" if the transform can not be made
  1. ;in that case Y is set to "?"
  1. ;
  1. I $G(PI),$D(Y) X $G(^IBE(357.6,PI,14)) I Y="" S Y="?"
  1. Q
  1. ;
  1. INPUT(PI,X) ;xecutes the input transform of the package interface on X
  1. ;X should be passed by reference
  1. ;the underlying input transform:
  1. ; can be interactive if $G(IBDEVICE("LISTMAN"))
  1. ; should set X to the form needed for passing to the database
  1. ; X should be killed if it can not be put into the correct form
  1. ; does not guarantee validity - for example, X could be an inactive code
  1. ;
  1. I $G(PI),$D(X) X $G(^IBE(357.6,PI,9))
  1. Q
  1. ;
  1. CHOICE(PI,X) ;executes the selector of the package interface=PI, user input is X
  1. ; -- X should be passed by reference.
  1. ; -- sets IBLABEL,IBID,IBQUAL
  1. ;
  1. N DIC,DIE,%,%W,%Y,C,DIPGM,DISYS,I,Q,D,D0,DO,DI,DQ,D1,%X,%Y,Y,DIX,DICR
  1. ;execute the selector
  1. I $G(PI) X $G(^IBE(357.6,PI,17))
  1. Q
  1. ;
  1. FDCHOICE(PI,X) ;executes the selector of the package interface=PI,X=the user input, then runs it through the input transform for a value that can be passed to the PCE GDI
  1. ; -- X should be passed by reference.
  1. ;
  1. N DIC,DIE,%,%W,%Y,C,DIPGM,DISYS,I,Q,D,D0,DO,DI,DQ,D1,%X,%Y,Y,DIX,DICR,IBLABEL,IBQUAL,IBID
  1. I $G(PI) D
  1. .;execute the selector
  1. .X $G(^IBE(357.6,PI,17))
  1. .;the selector actually returns the ID for the selection in the variabel IBID - X is the displayable value, which may be different
  1. .;I $G(IBID)="" K X Q
  1. .;pass the selection through the input transform
  1. .I $D(X),$G(IBID)'="" S X=IBID D INPUT(PI,.X)
  1. Q
  1. ;
  1. HPTRNS(TYPEDATA,X,IBFORMID) ;used to transform a value read from a hand print field (X) into a value that can be passed to the database
  1. ;TYPEDATA = data type (file 359.1)
  1. ;IBFORMID = id in form tracking,should be passed by reference
  1. ; available form form tracking:
  1. ; IBFORMID("DFN")
  1. ; IBFORMID("APPT")
  1. ; IBFORMID("CLINIC")
  1. ; IBFORMID("SOURCE")
  1. ;
  1. ;X = the value that needs to be transformed
  1. ;returns the transformed value
  1. ;returns "" if it can not be put inot the correct form
  1. ;
  1. ;the underlying input transform:
  1. ; should not be interactive
  1. ; can use the IBFORMID array
  1. ; should set X to the form needed for passing to the database
  1. ; X should be killed if it can not be put into the correct form
  1. ; does not guarantee validity - for example, X could be an inactive code
  1. ;
  1. I '$G(TYPEDATA)!'$D(X) S X="" Q X
  1. I '$D(^IBE(359.1,TYPEDATA,0)) S X="" Q
  1. X $G(^IBE(359.1,TYPEDATA,1))
  1. S:'$D(X) X=""
  1. Q X
  1. ;
  1. VALIDATE(PI,X) ;used to validate the value stored with a selection(file 357.3)
  1. ;PI is assumed to be a selection type package interface
  1. ;kills X if not valid, but otherwise does not change it
  1. ;pass X by reference
  1. ;the underlying validation transform:
  1. ; should not be interactive
  1. ; should kill X if it is not valid
  1. ;
  1. I X="" K X Q
  1. I 'PI K X Q
  1. I '$D(^IBE(357.6,PI,0)) K X Q
  1. X $G(^IBE(357.6,PI,11))
  1. Q
  1. ;
  1. HELP(PI) ;writes the help message for the package interface
  1. ;
  1. I PI W !,?6,$G(^IBE(357.6,PI,10)),!
  1. I PI D CHOICE(PI,"?")
  1. Q