Refactor QeueuDispatch for doc validation and get doc stat