In this paper, a method of generating appropriate user interfaces at runtime is investigated. It is proposed to use the established formalism of Situation Calculus to describe and specify user interfaces. It is shown how specific features of the formalism provide many desirable properties in the design and specification of user interfaces that are adaptable to context and composed at runtime. The formalism provides a provably correct deployment, whilst giving a means of deliberation on the optimum configuration that is directly compiled through a developed Neptune scripting language. The major features of the formalism and programming language are described together with an illustration of how this has been used in an implemented e-health case study for decision support with partner institutions in breast cancer care. It is shown how pluggable decision models may be introduced and system adaptation to clinician context achieved, whilst system integrity is maintained.