Hello Katie.

We are a MAGIC 5.5 SR3 site, however, I was under the impression that the
table names were now identical (?) in both C/S and MAGIC.

At any rate below is the SQL code for obtaining the response (Y/N) to the
NUR Query "NURDECUBIT". Perhaps this will give you a point in the right
direction.  (The elapsed time calculation is looking for patients that have
been inpatients for at least 7 days.) Change the name of the Query that you
are interested in from NURDECUBIT to whatever, and plug this code into
either the SQL Query Analyzer or into Access Projects and you should start
getting results.

SELECT BarVisits.AdmitDateTime, BarVisits.DischargeDateTime, 
    BarVisits.AccountNumber, BarVisits.Name, BarVisits.RoomID, 
    NurQueryResults.Query, NurQueryResults.DateTime, 
    NurQueryResults.Response, DATEDIFF(dd, 
    BarVisits.AdmitDateTime, BarVisits.DischargeDateTime) 
    AS LOS
FROM dbo.NurQueryResults RIGHT OUTER JOIN
    dbo.BarVisits ON 
    dbo.NurQueryResults.VisitID = dbo.BarVisits.VisitID
WHERE (dbo.NurQueryResults.QueryID = 'NURDECUBIT') AND 
    (dbo.BarVisits.DischargeDateTime >= CONVERT(DATETIME, 
    '2006-11-01 00:00:00', 102)) AND (DATEDIFF(dd, 
    dbo.BarVisits.AdmitDateTime, 
    dbo.BarVisits.DischargeDateTime) >= 7)

Good luck.

Doug

Doug Hiteshew, MT(ASCP)
Senior Systems Analyst
Johnson Memorial Hospital
Franklin, IN
V: 317-736-3397
F: 317-346-3011
E: [EMAIL PROTECTED]




-----Original Message-----
From: Kathryn Wohnoutka [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 03, 2007 4:24 PM
To: [EMAIL PROTECTED]; meditech-l@mtusers.com
Subject: [MEDITECH-L] Client Server: Data Repository Request


We are working on constructing a Pain report (PCS Intervention/Assessment
and MAR Assessment documentation) using DR.  Is anyone else using DR for PCS
assessments?  If so, what tables are you using?

Thank you in advance for your assistance,
Katie Wohnoutka
Citizens Memorial Hospital
Bolivar, Mo.

The information contained in this e-mail, including any attachments,is
legally privileged and confidential. If you are not the intended recipient,
you are hereby notified that any use or dissemination of this message is
strictly prohibited. If you have received this message in error, please
immediately notify us by telephone 417-328-6526 and delete this message from
your system. Even though this e-mail and any attachments are believed to be
free of any virus or other defect that might affect any computer system into
which it is received and opened, it is the responsibility of the recipient
to ensure that it is virus free, and no responsibility is accepted by
Citizens Memorial Hospital for any loss or damage arising in any way from
its use.

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

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

For help, email [EMAIL PROTECTED]

Visit the MTUsers WikiPedia at MTUsers.NET/mwiki
______________________________________
meditech-l mailing list
meditech-l@MTUsers.com http://mtusers.com/mailman/listinfo/meditech-l
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
To subscribe or unsubscribe to the meditech-l, visit MTUsers.NET.

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

For help, email [EMAIL PROTECTED]

Visit the MTUsers WikiPedia at MTUsers.NET/mwiki
______________________________________
meditech-l mailing list
meditech-l@MTUsers.com
http://mtusers.com/mailman/listinfo/meditech-l

Reply via email to