When implementing research protocols there is often a disconnect between what the researcher wants, and what the developer thinks they want. This can result in wasted effort and protracted development times. With a graphical representation of the protocol the discussion between developers and researchers can find these disconnects earlier in the process, and save on development time. When approached to implement a research protocol on fasting we decided to experiment with this approach.

Using a modeling tool called Umple we created a finite state machine (pictured above) of the research protocol based on early conversations with our clients. This state machine is written in a language specific to Umple, but can be used to generate code in a variety of programming languages (including SQL). For this project we were able to build an application that uses this state machine and would require minimal changes if the state machine were ever updated. 

So far this has sped up development and has given everyone a clear idea of how the application works. Researchers are able to draw changes to the state graph, which can be written in Umple and used to re-generate the state machine, which is then put into the main application. Currently changes to the state machine can only be done in the Umple language, but we’re exploring creating a graphical user interface for researchers to create the state graph themselves.