Dear all,
I have a database on blood transfusion. Every Blood sample of patient is allocated a unique lab number. Should they need blood transfusion, all units transfused during the validity of the sample (usually for 3 days), will be under the lab number. Some patients get transfusion other don't.
I would like to create a query that only shows records of patients that have received more that 4 units of blood within 24 hours.
Every time we issue blood to patient X (during validity period), the lab number appears on my database.
Essentially, I'd like to show records with lab number that appear 4 times or more.
e.g
LabNumber DateRequired patientID BloodProduct BloodProductId
1234 21/05/2017 MR X RedCell 111111
1234 21/05/2017 MR X RedCell 111112
1234 21/05/2017 MR X RedCell 111113
1234 21/05/2017 MR X RedCell 111114
1235 22/05/2017 MR X RedCell 111999
1236 25/05/2017 MR Y Platelets 111456
1237 26/05/2017 MR O - -
1256 29/05/2017 MR X RedCell 1565656
1256 29/05/2017 MR X RedCell 1565657
Many thanks,
Much appreciate.
I have a database on blood transfusion. Every Blood sample of patient is allocated a unique lab number. Should they need blood transfusion, all units transfused during the validity of the sample (usually for 3 days), will be under the lab number. Some patients get transfusion other don't.
I would like to create a query that only shows records of patients that have received more that 4 units of blood within 24 hours.
Every time we issue blood to patient X (during validity period), the lab number appears on my database.
Essentially, I'd like to show records with lab number that appear 4 times or more.
e.g
LabNumber DateRequired patientID BloodProduct BloodProductId
1234 21/05/2017 MR X RedCell 111111
1234 21/05/2017 MR X RedCell 111112
1234 21/05/2017 MR X RedCell 111113
1234 21/05/2017 MR X RedCell 111114
1235 22/05/2017 MR X RedCell 111999
1236 25/05/2017 MR Y Platelets 111456
1237 26/05/2017 MR O - -
1256 29/05/2017 MR X RedCell 1565656
1256 29/05/2017 MR X RedCell 1565657
Many thanks,
Much appreciate.