I'm going to have a dataset in a temp table with columns:
PatientID (varchar)
LabValue (float)
CollectionDateTime (datetime)
A patient ID may repeat 1, 5, or 100 times in this table, with various collection dates and lab values.
I need to end up with the following information:
For each...