There is no hard and fast rule, but the facility will have a requirement that notes be completed in a timely manner. This is usually (by custom, not law) within no more than 24 hours of seeing the patient. That way the notes will be in place if the patient needs to be admitted to the hospital or needs to see a specialist. In our practice we usually dictate after seeing each patient, but even on the busiest of days we don't leave the office at the end of the day until all notes are completed.
Please let me know if you have questions.