[MEDITECH-L] C/S NPR - Writing data to local disk with macro

160 views
Skip to first unread message

Michael McEldowney

unread,
Jun 27, 2008, 12:34:14 PM6/27/08
to medit...@mtusers.com
Hello all,

I have a need to download data from an NPR macro to my local disk so I can shell a windows program to process the data. Doing a simple "download" won't work for me, as I don't want the end user to have to launch the windows program. Anyone done something like this?


Thanks,

Mike McEldowney
Salina Regional Health Center

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

Keep up to date on recent announcements about MUSE by visiting the meditech-l web site at MTUsers.net and go to the tab labeled "MUSE - Dallas 05/08"

If you want to ask a question from the meditech-l users who will be attending MUSE or share something about MUSE with each other, you can post messages on the web site on the tab "MUSE - Dallas 05/08"

Jason Bolssen

unread,
Jun 27, 2008, 1:03:47 PM6/27/08
to Michael McEldowney, medit...@mtusers.com
Mike,

I've included a Z program I use to read/write files to Windows. Take a
look and let me know if you have any questions.

Basically, you need to do the following:

"File Path"@File.create,
"File Path"@File.open^FH,
"Line to Write"@File.write,
@File.close
F...@Handle.close

I don't think you really need to do the @Handle.close event but I like
to make sure that the file is really released before moving on so I
throw it in there.

Jason Bolssen, MT (ASCP)
Clinical Integration Engineer
ITC/Systems
Avera McKennan Hospital
Sioux Falls, SD
605-322-6192 (Voice)
605-322-6210 (Fax)
jason....@mckennan.org

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


-----------------------------------------
Confidentiality Notice: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure, or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.

Jason Bolssen

unread,
Jun 27, 2008, 2:00:54 PM6/27/08
to Michael McEldowney, medit...@mtusers.com, Mitch Lawrence
It appears that my attachment was stripped. I've renamed the CS NPR
file to .jrb, just rename it back to a .zip file to use it. And
hopefully this one will go through.

Thanks,

Mike,

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

file_npr.jrb

Brian Schmit

unread,
Jun 30, 2008, 10:40:14 AM6/30/08
to mmce...@srhc.com, medit...@mtusers.com
Hi Mike,

You can do the following:

1) Create a macro called 'close.up' with the following code:

%Z.rw.close.up(""),
@Shell.execute(/ZDOWN.PATH)

2) File and translate your macro.

3) Add the following Footnote: AL CLOSE.UP close.up

4) File and translate your report.

Z.rw.close.up is a Meditech NPR Procedure that actually gets executed by your Report object code once it finishes running. So here we are running that Procedure ourselves. @Shell.execute is an NPR Programming Macro that will launch the appropriate executable for the desired file. /ZDOWN.PATH is a global variable that stores the path to your downloaded file.

Please let me know if you have any questions.

Good luck,

Brian Schmit
Interface People, LP
Mobile: 617-823-9326
Office: 214-222-1125 ext. 251
Brian....@ipeople.com
http://www.ipeople.com

Brian Schmit

unread,
Jun 30, 2008, 2:09:35 PM6/30/08
to NH...@milreg.org, medit...@mtusers.com
Hi Nicole,

I don't have a full NPR Report but you can use the fields
MIS.USER.so.date and MIS.USER.so.time to get the last sign-on date and
time for each individual user. Those fields come from a segment that
uses the MIS.USER.initials as the Subscript.

Thanks,

Brian Schmit

Interface People, LP

Mobile: 617-823-9326

Office: 214-222-1125 ext. 251

Brian....@ipeople.com

http://www.ipeople.com

________________________________

Hi all,

I am in urgent need of a NPR report to show last log on. We are MAGIC
5.61. Anyone have one that they can share?

Thank you,

Nicole A. Heim

Manager, Applications

Information Systems

Milford Regional Medical Center

phone: 508-422-2971

cell: 508-614-0782

fax: 508-473-7081

email: nh...@milreg.org

Brian Schmit

unread,
Jul 1, 2008, 5:09:07 PM7/1/08
to Wendy...@stdavids.com, medit...@mtusers.com
Hi Wendy,

Here are some steps that should take care of what you are looking to do:

1) Create a report called MIS.USER.zcus.notice.report. Give it
whatever Report Title you like and an Active field of Y.

2) Create a user-defined field called xx.temp with the following
attributes:

DAT=FREE

LEN=92

VAL=/TEMP

3) Put the field marker for xx.temp on the D line of your Report
Picture.

4) File and translate that report.

5) For any report you want to have print out this notice, you
need to create a macro called close.up with the following code:

%Z.rw.close.up(0),

%Z.on.device("","","","","PRINTER"),

"Report DPM.zcus.report has printed."^/TEMP,

%MIS.USER.zcus.notice.report.R(0)

6) Replace PRINTER with the mnemonic of the printer you want to
use to print the notice, and replace "Report DPM.zcus.report has
printed." with whatever text you would like to have print out on your
notice (make sure to keep in wrapped in quotes).

7) File and translate the macro.

8) Add the following Footnote to this report: AL
CLOSE.UP close.up

9) File and translate this report.

That should do it. Please let me know if you run into any problems.

Thanks,

Brian Schmit

Interface People, LP

Mobile: 617-823-9326

Office: 214-222-1125 ext. 251

Brian....@ipeople.com

http://www.ipeople.com

________________________________

I have a request to print a notice to a specific printer whenever a
particular report is run on-demand (not to the same printer). Does
anyone know if such a thing is possible?

Thank you!

Wendy A Buck, R.N., B.S.N.

Manager of Clinical Application Services St. David's HealthCare
Partnership - CWT Division IT&S

15501 Long Vista Drive, Suite 300

Austin, TX. 78728

Office: 512-681-2128

Fax: 512-681-2132

SDHP Mission: "To provide exceptional care to every patient every day
with a spirit of warmth, friendliness, and personal pride"

SDHP Values: ICARE... Integrity, Compassion, Accountability, Respect,
Excellence This email and any files transmitted with it may contain
PRIVILEGED or CONFIDENTIAL information and may be read or used only by
the intended recipient. If you are not the intended recipient of the
email or any of its attachments, please be advised that you have
received this email in error and that any use, dissemination,
distribution, forwarding, printing, or copying of this email or any
attached files is strictly prohibited. If you have received this email
in error, please immediately purge it and all attachments and notify the
sender by reply email or contact the sender at the number listed.

Brian Schmit

unread,
Jul 9, 2008, 10:12:32 AM7/9/08
to pste...@mendotahospital.org, medit...@mtusers.com
Hi Phil,

There are a few different ways to do it. Here is one:

1) Create a user-defined field for your report with the
following attributes:

DAT=FREE

LEN=10

VAL=""

2) Put this user-defined field on your report as you would any
other "multiple" field, on two consecutive lines, one on top of the
other:

D xx.field

D xx.field

3) Add the following Line Attribute to the top of those two
lines: MV=LOC

4) Add the following Footnote: AL D locations

5) File and translate your report.

6) Return to Page 3, go to the Fields section, scroll down to
your user-defined field, and find the field number.

The field number appears to the left of the field. Make
note of that number.

7) Create a macro called 'locations' with the following code:

patient^ADM.PAT.urn,

""^ADM.PAT.other.location,

DO{@Next(ADM.PAT.other.location)
ADM.PAT.other.location^/MV["LOC",ADM.PAT.other.location,FIELD]}

8) Replace FIELD with the field number you recorded in step 6.

9) File and translate the macro.

10) Retranslate your report.

I think that should do it. Please let me know if you run into any
problems.

Thanks,

Brian Schmit

Interface People, LP

Mobile: 617-823-9326

Office: 214-222-1125 ext. 251

Brian....@ipeople.com

http://www.ipeople.com

________________________________

I am hoping to pull the information from:

DPM = ADM.PAT

Segment = other.locations

RW Segment = adm.pat.other.outpat.locations

Field = other.location (it is a multiple)

To an NPR report written in NUR.PC.WORK

I have reached the end of my beginner skills without success. Can this
be done?

Thanks fer lookin!

Phil Steines

Mendota Community Hospital

1315 Memorial Dr.

Mendota, IL 61342

(815) 539-7461 or direct (815) 539-1638

pste...@mendotahospital.org

CONFIDENTIALITY NOTICE: This e-mail communication and any attachments
may contain confidential and privileged information for the use of the
designated recipients named above. If you are not the intended
recipient, you are hereby notified that you have received this
communication in error and that any review, disclosure, dissemination,
distribution or copying of it or its contents is prohibited. If you have
received this communication in error, please notify Mendota Community
Hospital immediately by telephone at (815) 539-7461 and destroy all
copies of this communication and any attachments.

Reply all
Reply to author
Forward
0 new messages