Application of chitosan and chitosan derivatives as biomaterials