[MEDITECH NPR Reports / NPR Report Writing / NPR Report Writer / MEDITECH Report / Non-Procedural Report / NPR Reports / MEDITECH Reports] MEDITECH NPR Report Writing: NPR Macro Template (Example)

Monday, May 21, 2007

NPR Macro Template (Example)

;*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#
;
; Purpose: Centralize most used code from NPR reports NUR.
; Created: John Sharpe on August 13th, 2005
; Last Modified: John Sharpe on December 17th, 2005
; Name: write.data
; Macro Type: Program (Program / Footnote)
; Parameters: A as routine: 1=write.dynamic.text
; 2=write.to.mv
; 3=flatten.mv.tracker
; B as mv array
; C as field number
; D as line length
; E as number of spaces to indent
; F as data order
;
;*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#;
B^/MV.ARRAY,
C^/FN,
D^/LINE.LENGTH,
E^/INDENT.SPACES,
F+1^/DATA.ORDER,
;
IF{A=1 @WRITE.DYNAMIC.TEXT;
A=2 @WRITE.TO.MV;
A=3 @FLATTEN.MV.TRACKER},
;
1;

WRITE.DYNAMIC.TEXT
; Purpose: Write dynamic strings of text to /MV[] as MS Word would.
; Programmer: JNS12 on January 26th, 2005
; Inputs: /RESPO (Strings), /LINE.LENGTH (Integer), /INDENT.SPACES (String)
; Outputs: /MV[]
;
""^NXT.STR,
""^NXT.CHAR,
""^/W.CTR,
DO{+/RESPO[/W.CTR] @GET.NXT.STR,
@PROCESS.NXT.STR;
IF{L(STOR.LIN:0S)>0 STOR.LIN^/MV.TEXT,
""^STOR.LIN,@WRITE.TO.MV}}


.: This relates to Meditech Programming. :.

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home

[MEDITECH NPR Reports / NPR Report Writing / NPR Report Writer / MEDITECH Report / Non-Procedural Report / NPR Reports / MEDITECH Reports]