[MT-L] Macro and computed field needed

50 views
Skip to first unread message

Helt, Karen

unread,
Apr 30, 2010, 1:31:47 PM4/30/10
to medit...@mtusers.com
I am hoping someone out there can help me - I am a real novice at writing macros. I had the following IF statement in a VAL statement in a computed field:

xx.designator
DAT=FREE
LEN=10
VAL=IF{@location="AC" "IN0101";IF{@location="OB" "IN0101";IF{@location="JRC" "IN0101";
VAL=IF{@location="ED" "ER0101";IF{@location="URC" "ER0101";
VAL=IF{@location="SDC" "AS0101";
VAL=IF{@location="XR" "OU0101";
VAL=IF{@location="RHBS.1" "OR0101";IF{@location="RHBS.2 "OR0101";IF{@location="RHBS" "OR0101"}}}}}}}}}}

It is telling me the VAL statement is too long which I had a feeling was going to happen.

How would I write this in a macro in a more efficient way and how would I then write the computed field to bring in the correct information.

Any help would be greatly appreciated.

Karen Helt
Systems Analyst
Sauk Prairie Memorial Hospital
80 First Street
Prairie du Sac, WI 53578
608/643-7673
kh...@spmh.org


====================================

Please do NOT send messages that ask "Please post to the list" or "I'd like to see your answers" or "Send that info to me, too" These are useless messages that just waste the email server's resources. Instead, email the original requester and ask that they send you or post the results of their question.

To UNSUBSCRIBE, go to http://MTUSers.net
for information.

You can locate the:
1) meditech-l archives
2) NPR/Magic/CS tips
3) job opportunities in the Meditech community
http://mtusers.net

If you need help or advice on how to use the meditech-l, email lo...@MTUsers.com or ju...@MTUsers.net. Both of these people help manage the meditech-l, so they are your best resource.

--
You received this message because you are subscribed to the Google Groups "Meditech-L" group.
To post to this group, send email to Medit...@googlegroups.com.
To unsubscribe from this group, send email to Meditech-L+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/Meditech-L?hl=en.

Gary Hall

unread,
Apr 30, 2010, 1:37:25 PM4/30/10
to Helt, Karen, medit...@mtusers.com
The quick answer:

Create a footnote: AL D loccheck (or any name you want to use for it)

Go to option 6 from your report editing menu (Macros). Enter that same name loccheck or whatever.

Take your IF logic from your VAL and put it in there.

At the end of your IF logic in the macro, put the resulting value into a variable /LOCRESULT (or whatever name you want to call it).

Change your VAL statement to just be VAL=/LOCRESULT (or whatever you named the variable).

Make sure to compile using option 3 on your report menu, so it includes the macro.

OK, having said all that, I haven't checked through what you're trying to do, and whether you're doing this at the detail level, though it looks like it. I.e., some macros you'll write at a header or trailer key or whatever non-detail level, or even START, or CLOSE.UP. But assuming you're at the detail level, that should get you pretty close to what you're trying to do.

Gary Hall
Director of Information Technology
Estes Park Medical Center
970-577-4443 (office)
970-744-9052 (cell)
970-577-4355 (fax)
t resource.

Purvins, James A.

unread,
Apr 30, 2010, 1:41:45 PM4/30/10
to Gary Hall, Helt, Karen, medit...@mtusers.com
You probably don't need all those nested IF statements and you could
stash the @location variable into a local.

So your extremely nested IF might look something like this:

xx.designator
DAT=FREE
LEN=10
VAL=IF{@location^L="AC" "IN0101";L="OB" "IN0101";L="JRC" "IN0101";L="ED"
"ER0101";
VAL=L="URC" "ER0101";L="SDC" "AS0101";L="XR" "OU0101";L="RHBS.1"
"OR0101";L="RHBS.2 "OR0101";
VAL=L="RHBS" "OR0101"}

Good Luck and Happy Friday everyone !

:o)

James Purvins
Inland Northwest Health Services
(509) 232-8384

This e-mail and any attachments are confidential and may also be
privileged. If you are not the named recipient, or have otherwise
received this communication in error, please delete it from your inbox,
notify the sender immediately by replying to the message, and do not
disclose its contents to any other person, use the information for any
purpose or store or copy the information in any medium. Thank you for
your cooperation

Helt, Karen

unread,
Apr 30, 2010, 2:05:47 PM4/30/10
to Purvins, James A., Gary Hall, medit...@mtusers.com
Thanks to everyone for your help below worked - I don't know what I would do without this list group to help me when I get stuck.

Karen

Stewart, Donald

unread,
Apr 30, 2010, 2:09:06 PM4/30/10
to Helt, Karen, medit...@mtusers.com
Two options (I like number 2 the best), neither needs a macro:
(1.)
VAL=IF{@location^LOC="AC" "IN0101";LOC="OB" "IN0101";LOC="JRC" "IN0101";
VAL=LOC="ED" "ER0101";LOC="URC" "ER0101";LOC="SDC" "AS0101";
VAL=LOC="XR" "OU0101";LOC="RHBS.1" "OR0101";LOC="RHBS.2
"OR0101";LOC="RHBS" "OR0101"}
(2.)
VAL=IF{@location^LOC="AC"!(LOC="OB")!(LOC="JRC") "IN0101";
VAL=LOC="ED"!(LOC="URC") "ER0101";LOC="SDC" "AS0101";
VAL=LOC="XR"!(LOC="RHBS.1")!(LOC="RHBS.2)!(LOC="RHBS") "OR0101"}

You guys must send all your Press-Ganey data in one file. We send
separate files for each category, so I have them select which file to
send and all the records for that file have the same designator.

Best wishes and a happy weekend!
Donald

Ganesh Seshadri

unread,
May 3, 2010, 11:49:08 AM5/3/10
to Stewart, Donald, Helt, Karen, medit...@mtusers.com
This is for magic: Another way is to make use of CDS group response field (usable in all DPMs) or BAR claim map dictionary (for BAR reports) as "dictionaries" and keep the logic out of NPR altogether.

In the group response dict, make an entry NPRPG (I keep all of "my" lookups prefixed NPR) where you would enter AC, RHBS, etc as the element code and IN0101, OR0101 etc. as the element name.

In the report use VAL=ATMIS.GROUP.RESP.element.response["NPRPG",ATlocation]

Another technique is to tie in a CDS to the location dictionary which has a query for PG code and it will now appear on page 2 of the location dictionary. Put in the PG codes for AC, OB, etc, in the location dictionary, and just refer to it in your VAL statement as
ATMIS.LOCN.DICT.cd.response[ATlocation,"querymn"]

cbodn...@rcrh.org

unread,
May 3, 2010, 12:34:46 PM5/3/10
to medit...@mtusers.com
How have others handled an "opt-out" request for Press Ganey, or HCAHPS?

Do you have a CD Query in ADM for this? Other options?

TIA,
Cindy

Cindy Bodnar-Anderson
IS, Regional Health
Regional Health's mission is to provide and support health care excellence in partnership with the communities we serve.

Note: The information contained in this message, including any attachments, may be privileged, confidential, or protected from disclosure under state or federal laws . If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the Sender immediately by a "reply to sender only" message and destroy all electronic or paper copies of the communication, including any attachments.

Julia Carter

unread,
May 3, 2010, 12:43:04 PM5/3/10
to cbodn...@rcrh.org, medit...@mtusers.com
Funny you should mention Press Ganey. I'm working at a site now that had the same kind of request. I just did a selection on page 2 with the patient's name NE. I don't necessarily think that's a long-term, many patient solution, but it worked as a temporary solution.

Julia

Julia Carter, CPAR
Senior Consultant
Consultant People
396 W Main St
Lewisville, TX 75057
http://www.cpeople.org
(229) 891-6668

Craver, Richard

unread,
May 3, 2010, 1:12:27 PM5/3/10
to Julia Carter, cbodn...@rcrh.org, medit...@mtusers.com
We use Press Ganey for our hospital surveys.

We set up a Y/N query, marked it Y for Demo Recall and put it on the B/AR
customer defined screen. If the patient opts out our Patient
Representative, who manage the surveys, mark the field Y to opt out. I then
have a select on the NPR report for the PG data that the query NE Y.

We put the query on the B/AR menu so it is available for a longer period of
time. Putting it in ADM will work too.

Rich

Richard Craver
Database Analyst/Report Writer
Columbia Memorial Hospital
Managed Information Systems
71 Prospect Ave.
Hudson, NY 12534
(518) 828-8109
This email message and any accompanying data or files is confidential and may contained privileged information intended only for the named recipient(s). The recipient of this email is prohibited from disclosing the information to any other party and is required to destroy the information after the stated need has been fulfilled. The information contained herein is regarded as Protected Health Information (PHI) as defined by the Health Insurance Portability and Accountability Act (HIPAA), and must be treated in accordance with the law. Any breach of confidentiality may result in potential liability, including civil and criminal penalties. If this information is received by anyone other than the intended recipient, please delete this email from your computer, destroy any copies in any form immediately and contact the sender by return email or telephone.

Ganesh Seshadri

unread,
May 3, 2010, 1:41:29 PM5/3/10
to Julia Carter, cbodn...@rcrh.org, medit...@mtusers.com
We don't standardly ask for an opt-out using a query during registration. If a patient calls in asking to opt out, we put the unit number in a group response definition which is checked against each patient. I'm not sure if opting out is an HCAHPS option for exclusion, so I don't believe we do this for inpatients.

-----Original Message-----
From: meditech-...@mtusers.com [mailto:meditech-...@mtusers.com] On Behalf Of Julia Carter
Sent: Monday, May 03, 2010 12:43 PM
To: cbodn...@rcrh.org; medit...@MTUsers.com
Subject: Re: [MT-L] survey opt-out methods?

Reply all
Reply to author
Forward
0 new messages