Here's a fairly standard DNR policy.
http://www.wirral.nhs.uk/document_uploads/Policies_general/GP4DNRPolicySept2010.pdf
It doesn't necessarily mean that the patient is expected to die soon.
The doctor should certainly not complete a DNR form without discussing it with the patient and obtaining their agreement if the patient is capable. The doctor doesn't need relatives' permission but again should have discussed it.
Remember also that DNR only refers to cardiopulmonary resuscitation and not to withholding other forms of treatment or food and drink.