First there is no requirement to meter the output of the generator, the utility does not make you pay for electricity you produce. They just don't want you to give it to them without a whole lot of safety requirements.
The utility does not want to charge 2 customers for their electricity through 1 meter they want 1 for each customer and the Code requires this in most cases.
Each customer gets normal through a meter and to a load center through the normal power in the transfer switch.
The generator can have two output breakers or 1 to a combination panel with two load breakers. one to the dentist transfer switch and the other to the pharmacy transfer switch. In a power failure the generator starts, both transfer switches transfer the power to the generator and the utility is disconnected until normal power is restored. the generator shuts off and customer pay hydro again. It is the responsibility of the customers to share the maintenance cost of the generator and its fuel.
2 utility services and 1 generator with two loads.
Private message me and I'll fax you a diagram you can take to your inspector