You recognize revenue in the period in which it is earned. For the sale of goods, this period is usually the period in which you deliver the goods to the customer.
For the sale of services, such as the services of a physician, you record revenue in the period in which the services are performed. "Services" is a broad term that includes all products other than tangible goods--rental revenue for the use of rental property, room revenue for the use of a hotel room, interest revenue for the use of money, franchise revenue for the use of a name, royalty revenue for the use of written or recorded material, tuition revenue for the use of educational resources, or dues revenue for the services provided by a club or association. All are accounted for in the same way.
Note that you do not record revenue prior to the period in which goods are delivered or services performed. In accounting, no entry is made in the period in which the sales order is booked. You record revenue in the period in which the goods are delivered.