updated to read from careServiceFunction documents to define the stored functions