def rebuild_case_from_forms(domain, case_id, detail):

    return FormProcessorInterface(domain).hard_rebuild_case(case_id, detail)
Given a case ID, rebuild the entire case state based on all existing forms
dataset/ETHPy150Open dimagi/commcare-hq/corehq/ex-submodules/casexml/apps/case/cleanup.py/rebuild_case_from_forms