refactor
first part of showing medical ntoes
refactor the code
update database