Software Architecture For Capturing Clinical Information In Hadron Therapy And The Design Of An Ion Beam For Radiobiology