All messages should be posted in plain text.  HTML will be converted to
attachments.    The meditech-l web site is MTUsers.com
======================================

I use a zcus (code attached - should be placed to a macro file) to
re-size a body of text.  The arguments are

; A = nameof existing text file - i.e. [EMAIL PROTECTED](@text.lines)
; B = <not used> - the re-sized text is put in /UC
; C = maximum line length for new text file
; D = TRUE if the new file already exists and we should append
;     (otherwise clear /UC)

This is actually a slight modification of LAB.U.text.reformat - which I
wrote eons ago.

>>> "Joe Cocuzzo" <[EMAIL PROTECTED]> 08/01/06 7:05 AM >>>
All messages should be posted in plain text.  HTML will be converted
to
attachments.    The meditech-l web site is MTUsers.com
======================================


You could use Z.split.text to split it into multiple lines.
This will break it at a space or punctuation into a desired number of
pieces of a desired maximum length.
So, if you ask for 3 pieces of 50 it should manage to handle 101
characters in 150 max characters.  You could
code to make sure there is no leftover:

@rx.id^XXX,
%Z.split.text(XXX," ;,.",50,3)^XXX,
XXX|1 will be first piece
XXX|2 will be second piece
XXX|3 will be third piece
XXX|0 will be any leftover text that could not fit into the first
three
pieces.


Arguments:       A input string, or 'name of' input string (see E) 
B - break characters, eg, " ;,." 
C - length of desired piece 
D - number of desired pieces 
E - if present, A is 'name of' input string; 
else, A is input string 

Returns:            requested number of pieces in |1, |2, |3 etc 

Example call:    %Z.split.text("Hello there I am split."," .",10,3)^x,


Returns             x|0 nil 
                        x|1 "Hello" 
                        x|2 "there I am" 
x|3 "split." 
 


Joe Cocuzzo
Vice President
NPR Services
Iatric Systems, Inc.
Phone/Fax: (978) 805-4115
Email: [EMAIL PROTECTED] 
Web: www.iatric.com 


-----Original Message-----
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED] 
Sent: Monday, July 31, 2006 1:30 PM
To: [EMAIL PROTECTED] 
Subject: [MEDITECH-L] PHA.RX.rx.id.text

All messages should be posted in plain text.  HTML will be converted
to
attachments.    The meditech-l web site is MTUsers.com
======================================


Hi All:
 
I have the desire to use the PHA.RX.rx.id.text field.  I see that it
is
limited in report writer to 92 characters. I would like to print the
first 50 characters, then line break and print the next 50 characters,
etc., on the next line(s).  I looked at Meditech KB 11887 but received
a
syntax error when attempting to use the KB article.
 
Has anyone been able to use the rx.id.text field in multiple lines?  I
was able to change the last number/subscript to lengthen the line from
92 chars to 101 characters with success
([EMAIL PROTECTED];%PHA.RX.drugs(urn,1,101)}, but I sure would like to break
this into multiple 50 character lines.
 
Any suggestions would be hugely appreciated.
 
Thanks, Cheri
Cheri Adams
Sr. Clinical Systems Analyst
 
Upper Chesapeake Health
501 South Union Avenue
Havre de Grace, MD  21078
[EMAIL PROTECTED] (for e-mail with attachments) [EMAIL PROTECTED] 
voice:  443-843-5514
pager:  410-588-0232
 
_______________________________________________
meditech-l mailing list
[email protected] 
http://mtusers.com/mailman/listinfo/meditech-l 

_______________________________________________
meditech-l mailing list
[email protected] 
http://mtusers.com/mailman/listinfo/meditech-l
; program
;
; A = nameof existing text file
; B = <not used - hard code /UC as output file>
; C = maximum line length for new text file
; D = TRUE if the new file already exists and we should append
;     (otherwise clear /UC)
;
@INITIALIZE,
[EMAIL PROTECTED] [EMAIL PROTECTED] @SAVE.OLD.IN.NEW;
                     @APPEND.OLD.TO.NEW},""^O,
                  [EMAIL PROTECTED] @SAVE;
                     @TOO.SHORT;
                     @BREAK.AND.SAVE}},
@SAVE;

INITIALIZE
IF{'C 2;C'?0N 2;C<2 2;C}^C,
IF{D -/UC[""^D]^S;DO{>/UC[D]^D ""^/UC[D]}}

NEXT.OLD.LINE
IF{O;+[A,M]^M [A,M]^O}

NO.NEW
'N

SAVE.OLD.IN.NEW
O:0S^N

APPEND.OLD.TO.NEW
N_" "_(O:0S)^N

EXACT.FIT
L(N)^L=C

SAVE
N^/UC[S+1^S],""^N

TOO.SHORT
L<C

BREAK.AND.SAVE
IF{N$(C-L(N$C'~(" ":32_D(255)))_" ");N$C}^O,
O^/UC[S+1^S],L(O)-1^O,N%O^O,""^N
_______________________________________________
meditech-l mailing list
[email protected]
http://mtusers.com/mailman/listinfo/meditech-l

Reply via email to