A system and method for simulating clinical trial protocols with compiled state
machines is presented. The system receives input data representing a clinical trial
protocol. This information is sorted into a plurality of schedules, including dosage
schedules, observation schedules, and various other types of schedules. The schedules
are translated into a general purpose high level programming language and then
compiled into and executable file. The executable file may comprise a plurality
of discrete state machines, each state machine corresponding directly to a single
schedule. During the clinical trial simulation, the executable file is run by the
trial simulator to simulate the trial protocol.