Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 patient cycle time

Author  Topic 

murd
Starting Member

24 Posts

Posted - 2014-11-25 : 13:21:31
CREATE TABLE dbo.Appointments(
AppointmentsId int IDENTITY(1,1),,
ApptKind int NULL,
OwnerId int NULL,
ApptStart datetime NULL,
ApptStop datetime NULL,
Duration int NULL,
Status varchar(50) NULL
)


Trying to track current cycle time for patients from the time that they first walk in the door, until they leave.

The status column indicates the current status in which im trying to track:
Arrived
Exam Room
With doctor
Completed

appointmentid | Arrived time | Exam Room | With Doctor | Completed

1 time time time time

What is the best way of going about this since the time and status is within the same table for a single patient?

Muj9
Yak Posting Veteran

75 Posts

Posted - 2014-11-26 : 06:03:37
if the staus contains :-
Arrived
Exam Room
With doctor
Completed

and you would like the result to be like:-
-------------------------------------------
appointmentid | Arrived time | Exam Room | With Doctor | Completed
1 | time | time | time | time

so which time filed are you looking at for status?

Go to Top of Page
   

- Advertisement -