A Formal Framework for Deployable Mobile Healthcare Applications