I am trying to track the time between when a patient is discharged from a hospital to when they receive a follow-up telephone call. There is no direct link in the database (Teradata) between the hospital admission encounter and the folow-up telephone call so I would like to match the discharge...
You are correct, there is no difference. I should have proof-read it more clearly. The second record in both recordsets above should be excluded. I meant to have only one record from 10/22 and for that record to have a NULL test_time.
As to your point about a calendar table, I actually am...
Hi,
I have a SQL problem that I have solved using an OLAP function but I am wondering if there is a better way to do it - more elegant with potentially better performance. Here is the essence of the problem. Each person must take a test once per day over a specified period of time. They may...
Thanks, PH. Unfortunately, this doesn't give me the detail data. I forgot to mention this caveat in the first post.
I had to do this in a couple of steps. First I create the unit by which I need to count. In this case it is a concatenation of Name, Assessment Date, and Assessment Type. Then I...
I need to do a conditional count on a number of assessments. It needs to be a distinct count over person and date. My raw data looks something like this:
Name [tab]Date [tab]Assessment Type [tab]Assessment Time
Chuck Smith [tab]6/7/2010 [tab]1 [tab]6/7/10 1:00
Chuck Smith [tab]6/7/2010 [tab]2...
Hi,
I have a query that was suggested to me on an ANSI-SQL forum. When I tried it in Teradata (V2R5 or R6) it didn't run. The error I received was "3706: Syntax error: Expected something between '(' and the 'SELECT' keyword." I can't find any problem with the syntax so I was wondering if there...
Tests are given to patients and the time and result of the tests are recorded. Multiple tests can be given to a patient during their visit, which is uniquely identified by the inpatient_data_id. The data might look like this:
inpatient_data_id test_time test_result
1234 2009-06-22 01:41:00 465...
Here is a solution that works. However, in reality the query requires a number of other tables with # of records > 1 million so I am concerned about performance. I would still appreciate any suggestions you have to make this more efficient.
-Kevin
SELECT ts.patient, ts.encounter_id...
I have two tables, Tests and Orders. There is not a direct relationship between a distinct test and a distinct order. The most granular link is Encounter_ID and there can be numerous tests and orders for a particular encounter. I need to create a list of all the tests with any associated orders...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.