A system and method of controlling the administration of a medical substance is disclosed. An aerosol generator is configured to aerosolize a medical substance and administer the aerosolized medical substance to a patient using a ventilator. The patient is provided with a patient control interface through which the patient initiates the administration of a dose of the aerosolized medical substance. A processor is configured to control the ventilator and the aerosol generator in response to the patient control interface such that the patient controls the administration of the aerosolized medical substance in accordance with limits on the administration of the medical substance.