In most cases, prescribing medication outside of a formal medical setting (such as a doctor's office or hospital) is not considered appropriate or legal.
Prescribing medication involves a thorough evaluation of the patient's medical history, current health status, potential drug interactions, and other factors that require careful consideration. A doctor needs to have all the necessary information and conduct a proper examination to make an informed decision about the appropriate treatment.
If a doctor happens to encounter a sick person in public, they may offer immediate advice or first aid if it's within their capabilities and appropriate to do so. However, prescribing medication typically requires a proper assessment in a medical setting.
If you or someone you know needs medical attention or medication, it's essential to visit a healthcare professional or a nearby medical facility where they can conduct a thorough evaluation and prescribe appropriate treatment based on individual needs.