Getting a positive test after miscarriage

D

Does anyone know how long after you've had a miscarriage you get the positive test for. Its been 3 weeks on Saturday i miscarried. The hospital want to scan me to see if anything is left. Anyone else had this?