Re: query to count multiple records as one?
From: LMS (anonymous_at_discussions.microsoft.com)
Date: 07/18/04
- Next message: mj: "Re: crosstab query filtered by form"
- Previous message: spencer4: "Re: Combining fields"
- In reply to: Tom Ellison: "Re: query to count multiple records as one?"
- Next in thread: Tom Ellison: "Re: query to count multiple records as one?"
- Reply: Tom Ellison: "Re: query to count multiple records as one?"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 18 Jul 2004 09:40:59 -0700
Thanks. It's quite possible that my analysis is faulty,
so here is more information.
A brief bit of background: the data I'm working with is
collected for billing purposes and the purpose to which
I'm putting it is related not to billing but rather to
the use of an electronic documentation tool. It's a bad
situation, but it's the only data available to my team.
That said, I recognize that a person may go into the OR
twice on the same day; however, in the particular data I
have that is extremely unlikely (verified independently)
and the assumption is within the acceptable tolerance for
error. Date is unfortunately just the date, without
time or length of surgery, and in all the data I have for
12 months there is no occurrence of a patient being at
more than one hospital on the same day. The data
includes no indication of the specific OR or assisting
team or anything else I can think of to indicate whether
all of the surgeries occurred in the same OR session.
I did in fact write the query you suggested. However, as
indicated in the additional message I posted right
afterward (see below), I have to have not just a count
but a list of all the procedure codes that are counted as
one.
Subsequent post:
I should have added that my results need to include the
PROCEDURE_CODE for all of the procedures done on a given
day, because I need to use them for a subsequent query.
The ideal results would be something like
MD_NAME, DATE, PATIENT_ID,PROCEDURE_CODE_1,
PROCEDURE_CODE_2, etc.
The number of records would give me my count.
Linda
- Next message: mj: "Re: crosstab query filtered by form"
- Previous message: spencer4: "Re: Combining fields"
- In reply to: Tom Ellison: "Re: query to count multiple records as one?"
- Next in thread: Tom Ellison: "Re: query to count multiple records as one?"
- Reply: Tom Ellison: "Re: query to count multiple records as one?"
- Messages sorted by: [ date ] [ thread ]