If you went to the hospital, the hospital would have run routine bloodwork on you (e.g. the copy of your bloodwork the police were given/had); the police could get access to this without your knowledge, because they are getting the record from the hospital, not you; and they are not taking a sample of your blood, but rather are viewing the results of  tests already run for medical purposes. It is very likely therefore that under these circumstances, they legally obtained the test results without your knowledge.