fixes patient_count and adds insurance check functionality