Legally the hospital or medical center, the doctor and the person who handles the medical records are affected by the consequence given that improper documentation is illegal, as it is seen as either sabotaging a patient or misconduct.
Ethically it would be the patient and their family as they are the ones who are facing consequences of someone else's actions.
Hope this helps!