I have a patient list and I have the date and time when a specific procedure was done. I need to return the patients and only their first datetime when the procedure was performed during the same hospitalization(same Case ID)
For eg:
Patient ID | Date time | Case ID |
---|---|---|
1 | 2015-9-26 18:48:05.000 | 10 |
1 | 2015-9-26 18:55:00.000 | 10 |
1 | 2015-9-28 13:30:00.000 | 10 |
1 | 2015-9-30 15:10:00.000 | 10 |
2 | 2016-5-01 17:20:00.000 | 20 |
2 | 2016-5-10 09:20:00.000 | 20 |
I would like to return a table that looks like this:
Patient ID | Date time | Case ID |
---|---|---|
1 | 2015-9-26 18:48:05.000 | 10 |
2 | 2016-5-01 17:20:00.000 | 20 |
The end table should return the patients and only the first date time of the start time of the procedure.
I don’t know if there is a specific function to return this. It would be nice to get some help and suggestions.
3