Hi

        The power of the NPR Custom Report Writer is found in understanding
subscripting.  In this case you are trying to access the response of a cusomer
defined query.  If you look at the segment where this data exists it looks like
this

PHA.PAT.queries[pha.patient,query]

The simplest way of accessing your query would be to do this

xx.pregnant
DAT=FREE
LEN=10
[EMAIL PROTECTED],"PREG"]

However the more sophistocated way of doing it would be as follows.
xx.pregnant
DAT=FREE
LEN=10
VAL=IF{"PREG"^query,@PHA.PAT.response}

        What you have to understand is that the subscripts of a segment or index
are simply RESERVED local variable names.  If the subscripts (local variables)
are set to the appropriate values then they do not have to explicitly included
as they are in the first of the two examples above.

        In the second example above pha.patient is automatically set as it is
the subscript of the main segment.

      One of the lessons you are taught in beginner NPR is that you can not
access data in "sibling" segments.  Setting the values of these subscripts not
only allows you to access data in sibling segments but as well you can access
data in other DPMs and even other applications if they are open to the
application you are currently using.

Hope this Helps
Ken

Ken MacPherson
Systems Analyst / NPR Team Member
NShIS Implementation Project
EMail mailto:[EMAIL PROTECTED]
Phone 902 237 5153

Confidentiality Notice

This message may contain privileged and/or confidential information. If you have
received this e-mail in error or are not the intended recipient, you may not
use, copy, disseminate or distribute it. Do not open any attachments. Delete
this message immediately from your system and notify the sender by e-mail or
telephone that you have done so

Thank You
 
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of
MEDITECH-L
Sent: Sunday, December 17, 2006 12:16 AM
To: [EMAIL PROTECTED]
Subject: [MEDITECH-L] Subscripting Help

Hello Everyone,

I come to you humbly with a basic report writer question regarding subscripting.
For the life of me I can't seem to get 2 measley query responses onto my MAR
header and am hoping someone can correct my computed fields to do so.

The MAR header fragment is written in PHA.MAR with a detail DPM of PHA.PAT.
I want to get a basic query response(xx.pregnant) and a group response query
response(xx.lactation.status) that are answered in E/E Patient Data in pharmacy
and are thus stored in PHA.PAT onto my MAR.

xx.pregnant:
DAT=QRY.RESP (although I have tried FREE as well!) FONT=b JFY=L LEN=10
[EMAIL PROTECTED]"PREG"]


xx.lactation.status
DAT=QRY.RESP (although I have tried FREE as well!) FONT=b

To subscribe or unsubscribe to the meditech-l, visit MTUsers.COM.

To check the status of the meditech-l, visit MTUsers.NET.

For help, email [EMAIL PROTECTED]
______________________________________
meditech-l mailing list
[email protected]
http://mtusers.com/mailman/listinfo/meditech-l


=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
To subscribe or unsubscribe to the meditech-l, visit MTUsers.COM.

To check the status of the meditech-l, visit MTUsers.NET.

For help, email [EMAIL PROTECTED]
______________________________________
meditech-l mailing list
[email protected]
http://mtusers.com/mailman/listinfo/meditech-l

Reply via email to