(doc, include_path=False)
return [struct if include_path else struct.caseblock for struct in _extract_case_blocks(form)]
Extract all case blocks from a document, returning an array of dictionaries
    with the data in each case.

    The json returned is not normalized for casexml version;
    for that get_case_updates is better.

    if `include_path` is True then instead of returning just the case block it will
    return a namedtuple with the following attributes:

       caseblock: case block
       path: ["form", "path", "to", "block"]

    Repeat nodes will all share the same path.
Extract all case blocks from a document, returning an array of dictionaries
    with the data in each case.
Extract all case blocks from a document returning an array of dictionaries with the data in each case .
def extract_case_blocks(doc, include_path=False):
    """
    Extract all case blocks from a document, returning an array of dictionaries
    with the data in each case.

    The json returned is not normalized for casexml version;
    for that get_case_updates is better.

    if `include_path` is True then instead of returning just the case block it will
    return a namedtuple with the following attributes:

       caseblock: case block
       path: ["form", "path", "to", "block"]

    Repeat nodes will all share the same path.
    """
    if isinstance(doc, dict):
        form = doc
    else:
        form = doc.form_data

    return [struct if include_path else struct.caseblock for struct in _extract_case_blocks(form)]
def extract_case_blocks ( doc , include_path = False ) : if isinstance ( doc , dict ) : form = doc else : form = doc . form_data return [ struct if include_path else struct . caseblock for struct in _extract_case_blocks ( form ) ]