moving some medical logic to the service layer

formatting