(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.
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.
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 .
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 getattr(casedoc, 'dot_status', None) in ['DOT5', 'DOT3', 'DOT1']:
        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)
def recompute_dots_casedata ( casedoc , couch_user , submit_date = None , sync_token = None ) : if getattr ( casedoc , 'dot_status' , None ) in [ 'DOT5' , 'DOT3' , 'DOT1' ] : 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 )