def body():
    ' Dead Bodies Registry '
    gender_opts = s3db.pr_gender_opts
    gender_opts[1] = T('unknown')
    btable = s3db.dvi_body
    itable = s3db.dvi_identification
    status = request.get_vars.get('status', None)
    if (status == 'unidentified'):
        query = ((itable.deleted == False) & (itable.status == 3))
        ids = db(query).select(itable.pe_id)
        ids = [i.pe_id for i in ids]
        if ids:
            s3.filter = (~ btable.pe_id.belongs(ids))
    s3db.configure('dvi_body', main='pe_label', extra='gender')
    ntable = s3db.pr_note
    ntable.status.readable = False
    ntable.status.writable = False
    dvi_tabs = [(T('Recovery'), ''), (T('Checklist'), 'checklist'), (T('Images'), 'image'), (T('Physical Description'), 'physical_description'), (T('Effects Inventory'), 'effects'), (T('Journal'), 'note'), (T('Identification'), 'identification')]
    rheader = S3ResourceHeader([[(T('ID Tag Number'), 'pe_label')], ['gender'], ['age_group']], tabs=dvi_tabs)
    output = s3_rest_controller(rheader=rheader)
    return output
Dead Bodies Registry
def body():
    '  '
    gender_opts = s3db.pr_gender_opts
    gender_opts[1] = T('unknown')
    btable = s3db.dvi_body
    itable = s3db.dvi_identification
    status = request.get_vars.get('status', None)
    if (status == 'unidentified'):
        query = ((itable.deleted == False) & (itable.status == 3))
        ids = db(query).select(itable.pe_id)
        ids = [i.pe_id for i in ids]
        if ids:
            s3.filter = (~ btable.pe_id.belongs(ids))
    s3db.configure('dvi_body', main='pe_label', extra='gender')
    ntable = s3db.pr_note
    ntable.status.readable = False
    ntable.status.writable = False
    dvi_tabs = [(T('Recovery'), ), (T('Checklist'), 'checklist'), (T('Images'), 'image'), (T('Physical Description'), 'physical_description'), (T('Effects Inventory'), 'effects'), (T('Journal'), 'note'), (T('Identification'), 'identification')]
    rheader = S3ResourceHeader([[(T('ID Tag Number'), 'pe_label')], ['gender'], ['age_group']], tabs=dvi_tabs)
    output = s3_rest_controller(rheader=rheader)
    return output