All messages should be posted in plain text. HTML will be converted to
attachments. The meditech-l web site is MTUsers.com
======================================
Hi Kiley,
The following should work for you:
@BAR.PAT.unit.number^MRI.PAT.unit.number,
%Z.link("?","MRI","%.MRI.data","MRI.DB")^OLD,
@Chg.prefix(MRI.PAT,:,?),
@MRI.PAT.unit.num.index^MRI.PAT.urn,
@MRI.DRC.nok.name^NOK.NAME,
ZZ%O(?,OLD)
You will need to replace "MRI.DB" with the name of your MRI database.
This code: @BAR.PAT.unit.number^MRI.PAT.unit.number,
assigns the value of the field unit.number from the DPM BAR.PAT
into the subscript unit.number in the DPM MRI.PAT. I do
this b/c we need the unit number to find the unique record number (urn) in
MRI.PAT which is also used by MRI.DRC.
This code: %Z.link("?","MRI","%.MRI.data","MRI.DB")^OLD,
launches the program Z.link which connects the prefix (in this
case "?") to the database specified. It also returns the previous
connection for the prefix "?" and stores it in the local variable OLD.
This code: @Chg.prefix(MRI.PAT,:,?),
instructs all code that follows to use ? instead of : for any
tables (segments) within MRI.PAT. THe index
MRI.PAT.unit.num.index uses the prefix : but I used ? in my Z.link program.
This code: @MRI.PAT.unit.num.index^MRI.PAT.urn,
assigns the value from the index MRI.PAT.unit.num.index to the
subscript MRI.PAT.urn.
This code: @MRI.DRC.nok.name^NOK.NAME,
assigns the value of the field nok.name from the DPM MRI.DRC to
the local variable NOK.NAME. You can grab as much data out of
MRI.DRC as you like. Please keep in mind you have a limited amount of space to
store your local variables (called symbols which are stored in a
symbol table, you have 1KB or 1024 bytes for storing these
variables). You can also preceed your local variable names with the prefix /,
in which case they will no longer be local variables but instead
become global variables.
This code: ZZ%O(?,OLD)
reconnects the prefix ? back to its original connection.
I hope that helps. Please let me know if you have any questions.
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 Kiley Jay Wynne
Sent: Thursday, June 29, 2006 9:49 AM
To: [EMAIL PROTECTED]
Subject: [MEDITECH-L] Magic: NPR Macro Z.Link
All messages should be posted in plain text. HTML will be converted to
attachments. The meditech-l web site is MTUsers.com
======================================
Good morning L'ers:
I have a large report that was written in BAR.PAT, using the bar.acct
segment. This report pulls bad debt information that is sent to
collection agencies. I need to include Next of Kin data that resides
in MRI.DRC. I want to pull this data in a macro using the z.link
program. The data is not populating the variables so I am not sure if
my parameters are correct for z.link or if I am missing something else.
If any one can assist it will be greatly appreciated.
Kiley Jay Wynne
Beaufort Memorial Hospital
955 Ribaut Road
Beaufort, SC 29902
843.522.7909 - Office
843.522.5961 - Facsimile
[EMAIL PROTECTED]
_______________________________________________
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