Doctors role in noting dying declaration is to-
Before recording the statement of dying declaration, the doctor should certify that the person is conscious and his mental faculties are normal (compos mends).
Ascertain compos mentis
Call the magistrate
Elicit information by leading questions
Ask the investigating medical officer to be there