medical_test now closes its cursor after completion.