In my state a patient does not have to be an imminent danger to self or others to receive forced meds, if and only if, the patient is IVC and 2 doctors have deemed it medically necessary. (I don't believe we have a court order for meds - just a court order for treatment.) Our docs are certainly not quick to order such but if the patient has refused po meds for several days and is obviously not improving, the forced meds order is put in place. In that scenario, we first offer the po and if the patient refuses, the IMs are given. If the patient complies, it is not a restraint. If the patient resists and a held/restraint scenario is used, documentation follows accordingly.
We have had many a staff person injured - some quite badly - because the docs waited and waited and waited until there was extreme aggression before ordering the forced meds. It doesn't help that we have a new doc every 4-6 months. Our providers are not happy here.
Obviously in the OP scenario, it certainly seems po meds would have been appropriate though I agree with Jules A that it often depends on the specifics.