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

Hi Bill,

I am not aware of any changes made by Meditech for 5.5.2 to affect the Report 
Title.  Below is a solution for defaulting in multiple values based on 
conditions:

1)       Create a macro called 'screen' with the following code:

@DELETE.ARRAY,
@ERASE.SCREEN,
@CREATE.ARRAY,
@DISPLAY.ARRAY,
""^X;

DELETE.ARRAY
""^X,DO{+/[EMAIL PROTECTED],X]^X ""^/[EMAIL PROTECTED],X]},
""^X,DO{+/[EMAIL PROTECTED],"E",X]^X ""^/[EMAIL PROTECTED],"E",X]},
""^X,DO{+c.location[X]^X ""^c.location[X]}

ERASE.SCREEN
0^itn,
[EMAIL PROTECTED](1,itn)'>@MAX @Display.erase(c.location)}

CREATE.ARRAY
IF{c.service="MED" 1^c.location["3E"],
                   1^c.location["3W"]}

DISPLAY.ARRAY
0^itn,
""^c.location,
DO{+c.location[c.location]^c.location 0^/[EMAIL 
PROTECTED],"E",c.location^/[EMAIL PROTECTED],@Add(1,itn)]],
                                      IF{itn'>@MAX @Display(c.location)}},
1^/[EMAIL PROTECTED]

ARRAY
"T2"

MAX
3

2)      Replace T2 in the local macro called ARRAY with the T# of your Select 
Field.  For my report, my Select Field using the  LI attribute was # 2, hence I 
used /T2.

3)      Replace c.location with the name of your Select Field.  It sounds like 
yours might be c.location as well.

4)      Replace 3 in the local macro called MAX with the number of rows 
showing.  You can use the # 7 option, Edit Picture, to  add/delete rows.

5)      File and translate your macro.  You will get a message that the field 
'itn' cannot be found.  You can ignore that       message.  That is a field 
that is used by the NPR Macros Display.erase and Display.  It is normally just 
used by        Meditech, not within the Report Writer.

6)      Use this screen attribute on your first Select Field, using option # 8, 
Edit Elements:          
        FCL1=%DPM.zcus.report.M.screen("")

        Replace 'DPM' with your report DPM and 'report' with the name of your 
report.

7)      If you change the number of rows showing, you will need to 
change/file/translate your macro.  If you ever change the    row/column of your 
Select Field, you will need to file/translate your macro.

Thanks,

Brian Schmit
Sr. Programmer, Picis
Direct: 781 557 3315
Fax: 781 557 3140
100 Quannapowitt Parkway
Suite 405
Wakefield, MA 01880
[EMAIL PROTECTED]
www.picis.com

Please visit www.picis.com/meditech for additional information about our NPR 
Report Writing Trainings.

The information in this email is confidential and may be legally privileged. It 
is intended solely for the addressee. Access or use by any other person to this 
internet email is not authorized and may be unlawful. If you are not the 
intended recipient, please delete or destroy this email. If you do not wish to 
receive future emails from the sender, please reply directly to this email 
requesting you be removed from any mailing list.


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Bill Palmer
Sent: Thursday, April 13, 2006 12:33 PM
To: 'Joe Cocuzzo'; [EMAIL PROTECTED]; David McAllister;
Meditech-l List
Subject: Re: [MEDITECH-L] ASK THE EXPERTS topic - preload one
selectionbased on response to another selectio


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

While we're on the topic of calling macros from the title, we recently
upgraded from Magic 4.9.6 to 5.5.2.  One of my reports that calls a
macro from the title now crashes.  I was able to copy the report from
TEST and it works but if I translate it starts crashing again.

I haven't had time to look into this.  Does anyone know if Meditech
changed something to cause this?

-- 

Bill Palmer
Financial Coordinator, Information Sys
Mid-Columbia Medical Center
The Dalles, OR 97058
541-296-7417

>>> On 4/12/2006 at 10:41 am, in message
<[EMAIL PROTECTED]>, "David McAllister"
<[EMAIL PROTECTED]> wrote:
> All messages should be posted in plain text.  HTML will be converted
to
> attachments.    The meditech-l web site is MTUsers.com
> ======================================
> 
> Joe:  Here's an "ask the experts" topic for you...
> 
> One of the techniques I use quite often in my report writing is to
> pre-load responses into a select field.  I do this, of course, by
> calling a macro in the title of the report.  For example, to
pre-load
> responses into the location field in an ADM.PAT report I will put
this
> code in that macro...
> 1^c.location["2E"],
> 1^c.location["3E"],
> etc.
> 
> I want to take this concept one step futher...  I want to be able to
> have a report that has 2 selections, where the 1st selection
determines
> which set of locations gets pre-loaded into the 2nd selection!
> 
> For example,
> 
> Here's what the user will see when they run this report...
> 
> LOCATION SET _________
> LOCATIONS _____
>           _____
>           _____
> 
> If the user enters a 1 at LOCATION SET, I want this to happen:
> 1^c.location["2E"],
> 1^c.location["3E"]
> and here is what the user would see on their select screen:
> 
> LOCATION SET 1
> LOCATIONS    2E
>              3E
> 
> But if the user enter 2 at LOCATION SET, I want this to happen:
> 1^c.location["4W"],
> 1^c.location["5E"],
> 1^c.location["ICU"]
> and here is what the user would see on their select screen:
> 
> LOCATION SET 2
> LOCATIONS    4W
>              5E
>              ICU
> 
> I can't write an IF statement to do this into the macro called from
the
> title because at that time LOCATION SET is not known.  I can't write
an
> IF statement into a START macro because by then the select screen
has
> already been built.  I need to be able to "reconstruct" the select
> screen on a field-by-field basis as the user fills out the select
> screen.  Is there any way to inject code into a report between each
step
> from one selection field entry to another?  If so, I'm thinking that
> would be the place to write my IF statement.  I hope all that made
> sense.
> 
> Anyway... do you think something like this is possible?  If so, I
have
> several creative uses in mind for just such a technique.  Thanks for
any
> help you can give on this!
> 
> David McAllister, MT(ASCP)
> Systems Analyst/Programmer
> Jeff Anderson Reg. Med. Ctr.
> Meridian, Mississippi
> Office: 601-553-6027 (M-F 0500-1330 central)
> Email: [EMAIL PROTECTED] 
> 
> P.S. I wish I could be 6 places at once!  There are so many great
> workshops all scheduled at the same time on Tuesday afternoon that it
is
> almost impossible to select just one!  At future conferences, I think
it
> would be great if all of these terrific workshop offerings could be
> repeated such that a person could attend more than just one of them!
> 
> 
> ***********************************************************
> The information in this email is confidential and may be legally
> privileged. It is intended solely for the addressee. Access to this
> email by anyone else is unauthorized. If you are not the intended
> recipient, any disclosure, copying, distribution or any action taken
> or omitted to  be taken in reliance on it, is prohibited and may be
> unlawful. If you believe that you have received this email in error,
> please contact the sender.
> ************************************************************
> _______________________________________________
> 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

_______________________________________________
meditech-l mailing list
[email protected]
http://mtusers.com/mailman/listinfo/meditech-l

Reply via email to