[MEDITECH-L] MAGIC 5.6.2 NPR Line Check mult query help

212 views
Skip to first unread message

Buck Wendy

unread,
Oct 5, 2009, 4:58:58 PM10/5/09
to medit...@mtusers.com
I have a multiple query pulling to an NPR report written in NUR.PC.WORK (triggered from pg 2 of Intervention dictionary, Documentation activity). I want to write a line check so that certain lines on the report are suppressed if the query response is "11" or "12". Since 12 is the highest response value (right now) I'm just checking for a response greater than 10.

I can fit up to 4 lines on there but after that it tells me my LC is too long. Is there a clever way around this? Thanks in advance for any assistance!

LC=@ADM.PAT.ccdqr.mult.response[@patient,"NDVT20",1]>"10"!
LC=@ADM.PAT.ccdqr.mult.response[@patient,"NDVT20",2]>"10"!
LC=@ADM.PAT.ccdqr.mult.response[@patient,"NDVT20",3]>"10"!
LC=@ADM.PAT.ccdqr.mult.response[@patient,"NDVT20",4]>"10"

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

Please do NOT send messages that ask "Please post to the list" 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.

The meditech-l archives (and other tips) can be found at
http://mtusers.net/zarchives

Job opportunities in the Meditech community can be found at
http://mtusers.net/zjobs

Joe Cocuzzo

unread,
Oct 6, 2009, 8:29:29 AM10/6/09
to medit...@mtusers.com

First a caveat, I would not recommend checking @ADM.PAT.ccdqr data from an NUR.PC.WORK report because ADM does not necessarily contain what you would consider the most recent answer to the query.

ADM will contain the last non-nil response to the query if the intervention is set to Default Queries = N or nil. That means that if the response was deleted in the most recent documentation, it will persist in ADM.

I have run across hospitals teaching their Nurses to enter a . to delete a home medication because they have written their med reconciliation report out of ADM.PAT.ccdqr.response data, because otherwise deleted meds persist on their home med report.

If you want to know more about how to deal with this, you could check out my MUSE presentation on report writing in NUR (for both C/S and Magic)

http://www.iatric.com/information/muse2005.asp#regionals

If you do set Default Queries = Y, then a deletion of previous answer in the most recent documentation will flow to ADM and you will have the most recent answer. HOWEVER, if you undo the most recent documentation, all the answers will be deleted, even though you have a valid prior time documented.

That said, if you want to check all the entries of the multiple query in an LC, you could loop as follows:

LC=IF{""^OK,"NDVT20"^ADM.PAT.ccdqr.query,
LC=DO{@Next(ADM.PAT.ccdqr.mult.seq.no) 1, LC=IF{@ADM.PAT.ccdqr.mult.response>10 1^OK}},OK}

Be careful not to leave a trailing space on your LC, that is stripped by the translator when the LC code is joined up. The reason you run into a LC length limit is that the RW translator will crash if tries to make a line of code>255 char.

Your other option would be to have a set of LC's across several lines that evaluate to nil, but set a flag and then check the flag on the last line.

D Line 1 LC=IF{""^OK,@ADM.PAT.ccdqr.mult.response["NDVT10",1]>10 1^OK,""} D Line 2 LC=IF{@ADM.PAT.ccdqr.mult.response["NDVT10",2]>10 1^OK,""} D Line 3 LC=IF{@ADM.PAT.ccdqr.mult.response["NDVT10",3]>10 1^OK,""} D Line N LC=OK


Joe Cocuzzo
Vice President
NPR Services
Iatric Systems, Inc.
Phone/Fax: (978) 805-4115
Email: mailto:Joe.C...@iatric.com
Web: http://www.iatric.com/

Iatric Systems is a leading provider of integrated software applications, interfaces and reporting solutions for hospitals and healthcare systems.
__________

Kenny Whiteside

unread,
Oct 6, 2009, 8:51:17 AM10/6/09
to Joe Cocuzzo, medit...@mtusers.com
Hey Joe,

Regarding the part about:

"If you do set Default Queries = Y, then a deletion of previous answer in the most recent documentation will flow to ADM and you will have the most recent answer. HOWEVER, if you undo the most recent documentation, all the answers will be deleted, even though you have a valid prior time documented."

We ran into that problem and someone on the "L" suggested that if the individual queries were defined with a PCI section that if the last documenation was undone, ADM.PAT would be updated with the prior responses based on the responses stored in PCI. This seemed to work.

Can you verify if this is true? If so, we should really never build queries without defining the PCI section.

Thanks for the information,
Kenny Whiteside


>>> Joe Cocuzzo <Joe.C...@iatric.com> 10/06/2009 8:29 AM >>>

http://www.iatric.com/information/muse2005.asp#regionals

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


--
This message has been scanned for viruses and
dangerous content, and is
believed to be clean.


Catawba Valley Medical Center
810 Fairgrove Church Rd
Hickory NC 28602
828-326-3000

"This electronic message may contain information that is confidential and/or legally privileged. It is intended only for the use of the individual(s) and/or entity named as recipients in the message. Please notify the sender immediately and delete the material from your computer if you have received this message in error. Do not deliver, distribute, or copy this message, and do not disclose its contents or take any action as a result of the information it contains. Thank you."

Joe Cocuzzo

unread,
Oct 6, 2009, 9:02:43 AM10/6/09
to Kenny Whiteside, medit...@mtusers.com
I was not aware that PCI factored into the behavior. When I tested this, I tested in NUR and ADM only and probably the queries I used were not set up in PCI.

Even if you were positive this would happen, what are the odds that some future NUR assessment/intervention designer would remember that step for all queries? I'd think that it is safer to do more programming in NUR than to rely on the ccdqr.responses in ADM.


Joe Cocuzzo
Vice President
NPR Services
Iatric Systems, Inc.
Phone/Fax: (978) 805-4115
Email: mailto:Joe.C...@iatric.com
Web: http://www.iatric.com/

__________

Kenny Whiteside

unread,
Oct 6, 2009, 9:12:00 AM10/6/09
to Joe Cocuzzo, medit...@mtusers.com
I agree when it comes to NPR. As for attributes used on CDS's, I've always pulled previously filed responses to queries that called the responses from ADM.PAT (@p.ADM.PAT.ccdqr.response["QUERY"]. Is there an easy way to do that from NUR without having to define the intervention, td.date, td.time, etc?

Kenny

>>> Joe Cocuzzo <Joe.C...@iatric.com> 10/06/2009 9:02 AM >>>

Reply all
Reply to author
Forward
0 new messages