Viewing 15 posts - 46 through 60 (of 167 total)
Sergiy: Sure. We'll take care of the dates. The report is not supposed to run on monthly basis. So the dates should be flexible including +/- 3 days. With some...
October 5, 2016 at 5:21 pm
CELKO: Do not understand - is it about script from my post of Posted 9/27/2016 10:05:34 PM? This is just a result of query that I originally sent as...
October 5, 2016 at 5:18 pm
Absolutely - that's what we are going to do.
Thanks
October 4, 2016 at 10:30 am
We select all admissions within the defined TIME RANGE. If 'your' record is within this range (say month of August 2016) and there is another one in August 2016, and...
October 3, 2016 at 4:56 pm
The difference between yours and J's is that his singled out only first 2 records while yours - any number of records. The original dataset is selected on n>1 during...
October 3, 2016 at 8:46 am
To DesNorton - this code returns the original data set
Thank you
Val
September 30, 2016 at 11:59 am
If somebody's interested, I attach my test data set with results for both codes.
Sorry for Excel but it can be easily imported into SS2K8 using import wizard
September 30, 2016 at 8:35 am
I run both codes on my original dataset. Sergiy's returned 130 records, J's - 79. The reason - Sergiy's counted all cases with counts 2 and more, J's...
September 30, 2016 at 8:19 am
Testing update:
J Livingston's code runs OK - same results as in Sergiy's.
Thanks a lot!
September 29, 2016 at 1:03 pm
To everybody:
thanks a lot for the discussion and suggestions. So far I tested only Sergiy's codes - work perfectly well - thanks again, Sergiy! Next week I'll test other codes...
September 29, 2016 at 11:37 am
Sergiy - looks logically right. I'll work on it tomorrow, when I'm back in office. Not sure it's going to work in more than two events for the same patient.
Thank...
September 28, 2016 at 7:30 am
Thank you. However the task may be more complicated: in some cases there is more than 2 IDs (check 10011580, 10014918, just for example, in my table posted @ 10:05:34)
September 27, 2016 at 7:48 pm
Thank you. I understand and, as you can see above, provided an sql version of the table. And thank you for your code - I'll test it tomorrow (now out...
September 27, 2016 at 4:36 pm
Now each pair where the difference between two dates is less than 72 hrs will appear in a new table or result set
Thanks
September 27, 2016 at 4:32 pm
This is the fragment of the table
CREATE TABLE [dbo].[Readmission_Table](
[ID] [float] NULL,
[ArrivalDateTime] [datetime] NULL
) ON [PRIMARY]
GO
INSERT [dbo].[Readmission_Table] ([ID], [ArrivalDateTime]) VALUES (10000683, CAST(0x0000A66801716A50 AS DateTime))
INSERT [dbo].[Readmission_Table] ([ID], [ArrivalDateTime]) VALUES (10000683, CAST(0x0000A66900B9AB40 AS...
September 27, 2016 at 3:05 pm
Viewing 15 posts - 46 through 60 (of 167 total)