I am trying to expand upon and already useful median query in SQL. I need to figure out where to put a GROUP BY statement so I can get the median "length of stay" grouped by a field in the table called "TSheetTitleDescription". The folowing is the median query that works flawlessly:
SELECT...
...= 1 ThenDMedian = rst(expr)'If the number of records is 1, the value of the expression in that record is the medianElsemiddleIndex = Int(0.5 * (numberofrecords - 1) + 1)'MiddleIndex now points to the middle of the recordset if the recordset contains an odd number of records.'If the recordset...
I think I can add GROUP BY TSheetTitleDescription in the first query as it is a field in the LOS_min_amb_work query I am just not sure where to put it.
...TimeValue([HospitalArrivalTime]) AS HATTime, Detail.DispositionTime, IIf(([DispositionTime]-[HATTime])<0,(([DispositionTime]-[HATTime])+1)*1440,([DispositionTime]-[HATTime])*1440) AS LOS, Detail.PhysicianExamTime...
I am trying to calculate the median of some times taken from a query. The query calculates time from arrival to disposition in minutes. (by multiplying the time by 1440).
My access report can spit out the average of these for all the patients but the median is a different story. I have dound...
Golom-
I have tried but can not get this to work. I already have a table clock which should be the same as the integers table. I have a large "detail" table with most of the other data in it including hospital arrival time and disposition time. I have tried substituting the "detail" table for...
To further explain:
Patient 1 arrives at 10 am and leaves at 2pm
Patient 2 arrives at 11 am and leaves at 1pm
Patient 3 arrives at 11 am and leaves at 4:30pm.
A chart of this would look like this
Time 10 11 12 1 2 3 4 5
Pt. 1 Yes Yes Yes Yes No No No No...
I am looking for some expertise in writing a query. This is from a large Emergency Department database written in access 2000, front and back end......
I have a patient ID (unique), arrival time and discharge time. What I need to do is count the number of peole in the department each hour. I...
Can I use something of this nature? I want the field to show if the person was admitted, to what unit and room number and if they are transfered, to what facility. This control source does not work but I thought maybe someone could fix it.
=Trim([PatientCareUnitDescription] & " " &...
I have a reprt based on a query. Each listing in the report has multiple items- name, account number, mode of arrival, diagnosis. All of the items are single in the listing except diagnosis which may have multiple items. When I run the report it lists a name and account number and all the...
How do I move a database I created and secured on my laptop to a network drive and then on to computers for other folks to use? I have copied the security file (mdw) to the other computer but it does not give me the ability to use the workgroup administrator tool to join the mdw file. It says...
Where is the DTS import tool located?
Also, I understand Access front ends and back ends but I am ignorant to SQL. Will I need to create a new SQL backend? Shuld I conovert my Access backend to SQL and attach the access front end to it? Will the server I use need to have SQL running on it or...
I have an extensive database I would like to convert to SQL server. I created it in Access 97 and have upgraded to access 2000 (no further as all of the computers on the network do not support Access beyond 2000). I have a front end on each cmputer that uses it and a backend residing on one of...
I am looking for a way to use the time interval to automatically shut down a database after a period of inactivity. It is health care related and HIPPA requirements dictate this.
Any thoughts on the code would be appreciated.
And where the code should be inserted- into the main data entry form...
One other thing- the query was written in Access using the design view and not the SQL view. I cannot take credit that my SQL writing is anywhere near that good.
Jimirvine-
Thanks that is useful information. Most of the calculations are time related not date related. I do not see the TimeDiff as a built in function- will it still work?
One problem I am having with the speed of the database is the backend has been moved to a different server. safer...
...TimeValue([HospitalArrivalTime]) AS HATTime, Detail.DispositionTime, IIf(([DispositionTime]-[HATTime])<0,(([DispositionTime]-[HATTime])+1)*1440,([DispositionTime]-[HATTime])*1440) AS LOS, Detail.TriageDateTime, TimeValue([TriageDateTime]) AS TTime, Detail.PhysicianExamTime...
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.