def recompute_dots_casedata(casedoc, couch_user, submit_date=None, sync_token=None):
    """
    On a DOT submission, recompute the DOT block and submit a casedoc update xform
    Recompute and reset the ART regimen and NONART regimen to whatever the server says it is, in the casedoc where there's an idiosyncracy with how the phone has it set.

    This only updates the patient's casexml block with new dots data, and has no bearing on website display - whatever is pulled from the dots view is real.
    """
    if ['DOT5', 'DOT3', 'DOT1'] in getattr(casedoc, 'dot_status', None):
        update_dict = {}
        dots_data = get_dots_case_json(casedoc)

        update_dict['dots'] = json.dumps(dots_data)
        submit_case_update_form(casedoc, update_dict, couch_user, submit_date=submit_date, xmlns=XMLNS_PATIENT_UPDATE_DOT, sync_token=sync_token)
dataset/ETHPy150Open dimagi/commcare-hq/custom/_legacy/pact/api.py/recompute_dots_casedata/swapped operands of `in`