The health of people with diabetes is being put at risk due to the failure of doctors to recognize which type of diabetes they have, a new study.