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

XBARRAY0.m

Go to the documentation of this file.
  1. XBARRAY0 ; IHS/ADC/GTH - Documentation for XBARRAY ; [ 02/07/97 3:02 PM ]
  1. ;;3.0;IHS/VA UTILITIES;;FEB 07, 1997
  1. ;
  1. ; This utility provides a word processing format of free
  1. ; text and local variable references to build an array.
  1. ;
  1. ; A file is necessary that has a .01 field for the form
  1. ; name and a WP field to hold the WP form.
  1. ;
  1. ; Two Entry points
  1. ;
  1. ; EDIT^XBARRAY(.NAME,DIC,FIELD) Edits and Displays the
  1. ; form. Place the call to EDIT in the code where
  1. ; the data or variables have been gathered.
  1. ; Typically this is one line previous to the call
  1. ; to $$GEN^XBARRAY. Once the form is designed the
  1. ; EDIT call is commented out.
  1. ;
  1. ; $$GEN^XBARRAY(.NAME,DIC,FIELD,ROOT,FORMAT,LINE)
  1. ; Generates the form into the ARRAY indicated by
  1. ; the ROOT. The call to $$GEN must have all
  1. ; variables used gathered. The return value of
  1. ; $$GEN is equal to the last line set in the array.
  1. ;
  1. ; VARIABLES
  1. ; .NAME - The name space variable that holds the name
  1. ; of the form to be used. A pass by reference is
  1. ; needed for efficiency so that the pre-compilation of
  1. ; the form is held for repetitive use. The compilation
  1. ; is stored in the sub array as NAME(@NAME,line,.....,).
  1. ; IE one local variable can be used for all form
  1. ; references.
  1. ; Ex: S BARFORM="A/R BILL" will store and use
  1. ; the form compilation in BARFORM("A/R BILL",line,....,)
  1. ; When finished KILL BARFORM(BARFORM) will retrieve the
  1. ; local variable space from the last form used.
  1. ;
  1. ; DIC - The root or file number of the file holding the
  1. ; forms.
  1. ;
  1. ; FIELD ; The field number of the WP field holding the
  1. ; form.
  1. ;
  1. ; ROOT - The root of the target array to be built.
  1. ; Either a global or a variable root as in the format
  1. ; used for a %XY^%RCR call. (%RCR is actually used)
  1. ;
  1. ; FORMAT
  1. ; null or zero The array is built ROOT(line)="...
  1. ; 1 The array is built ROOT(line,0)="....
  1. ;
  1. ; LINE - The offset in line numbers in building the
  1. ; array. The array will start construction at LINE +1.
  1. ; The value of the last line created is returned $$GEN.
  1. ;
  1. ; WP FORMAT INSTRUCTIONS
  1. ;
  1. ; Free Text: Free text is key striked in where desired.
  1. ; Do not use ~ as it is used to mark variables.
  1. ;
  1. ; Variables: The reference to a variable is marked with
  1. ; a beginning ~ and a trailing ~. The trailing ~ is
  1. ; always required even if the variable is last item
  1. ; on the line.
  1. ;
  1. ; Mnemonics: A short hand for variables is available.
  1. ;
  1. ; Comments: Programmers comments can be put into the form
  1. ; which are ignored by the generator.
  1. ;
  1. ; Output Transform: Mumps output transforms can be
  1. ; indicated for execution upon selected variables.
  1. ;
  1. ; WP SPECIAL FUNCTIONS Located at the top of the form.
  1. ;
  1. ; Comment line Begin the line with a ';'
  1. ;
  1. ; Variable Mneumonic Reference: Name spaced variables can
  1. ; be long. A mnemonic reference is available to make
  1. ; life simple. Multiple mnemonic lines can be used
  1. ; if desired.
  1. ;
  1. ; SETUP
  1. ;
  1. ; #mnemonic1|variable1*mnemonic2|variable2*...
  1. ; #mnemonicZ|variableZ*.....
  1. ;
  1. ; Example: #D|DUZ*V|BARVPT
  1. ; #I|BARIPT
  1. ;
  1. ; (BARIPT array is storing IHS Patient Information)
  1. ; (BARVPT array is storing VA Patient Information)
  1. ;
  1. ;
  1. ; '#' Marker placed in the first column
  1. ;
  1. ; mnemonic1 User's choice
  1. ; ex: D to denote DUZ
  1. ; '|' Separator
  1. ;
  1. ; variable1 User's choice of the local variable
  1. ; ex: DUZ
  1. ; '*' Repetative marker if more than one
  1. ; mnemonic is indicated
  1. ;
  1. ; USE The mnemonic reference can be used any where
  1. ; in the WP form.
  1. ;
  1. ; Format ~mnemonic|variable subscript~
  1. ;
  1. ; '~' Beginning marker for the variable
  1. ;
  1. ; mnemonic1 User's mnemonic
  1. ;
  1. ; '|' Separator
  1. ;
  1. ; subscript The subscript of the variable to be used
  1. ;
  1. ; '~' Ending marker for the variable
  1. ;
  1. ; ex: ~D|~ for DUZ
  1. ; ~D|0~ for DUZ(0)
  1. ; ~I|.01~ for BARIPT(.01)
  1. ;
  1. ; MUMPS OUTPUT TRANSFORM
  1. ; A simple mumps output transform is also provided to aid
  1. ; in form design. A variable or mnemonic indicated will
  1. ; have its output transformed prior to being put into the
  1. ; form.
  1. ;
  1. ; SETUP
  1. ;
  1. ; *var1!mumps code1*var2!mumps code2
  1. ; *mnemonic3!mumps code3*mnemonic4!mumps code4
  1. ;
  1. ; Ex: *DUZ(2)!$J(X,10,2) will output $J(DUZ(2),10,2)
  1. ; *D | 2!$J(X,10,2) mnemonic notation of same
  1. ;
  1. ; '*' Output Transform marker in column one. At TOF
  1. ;
  1. ; Variable/ Variable or mnemonic as it would appear in the
  1. ; Mneumonic form between '~'s.
  1. ;
  1. ; '!' Separator
  1. ;
  1. ; mumps code Mumps code expression as a function of x.
  1. ; Do not state 'S X=f(x)'
  1. ; Enter the function only, f(x).
  1. ;
  1. ; '*' Separator if more than one is put on one line.
  1. ;
  1. ; SPECIAL OUTPUT TRANSFORMS provided by XBARRAY
  1. ;
  1. ; xxx!$$MDY(X) a literal ~"NOW"~ or variable ~IT|9~
  1. ; ex: *"NOW"!$$MDY(X) or *IT|9!$$MDY(X)
  1. ; returns mm/dd/yy
  1. ;
  1. ; xxx!$$WP("X") for a word processing field
  1. ; NOTE: "X" IS ABSOLUTELY NECESSARY
  1. ; The variable array must have the form
  1. ; VAR(subcript,n) where n = 1:1
  1. ;
  1. DOCE ;
  1. ;
  1. TEST ; If you have A/R installed, uncomment the following lines for a
  1. ; demonstration.
  1. ; D INIT^BARUTL
  1. ; D ENP^XBDIQ1(200,DUZ,".01:.116","BARU(")
  1. ; S BARFORM="PW TEST"
  1. ; D EDIT^XBARRAY(.BARFORM,90053.01,1000)
  1. ; S Y=$$GEN^XBARRAY(.BARFORM,90053.01,1000,"BARFM",0,10)
  1. ; KILL BARFORM(BARFORM)
  1. ; Q
  1. ;