def person():
    """ Missing Persons Registry (Match Finder) """

    table = s3db.pr_person
    s3.crud_strings["pr_person"].update(
        title_display = T("Missing Person Details"),
        title_list = T("Missing Persons"),
        label_list_button = T("List Missing Persons"),
        msg_list_empty = T("No Persons found"),
        msg_no_match = T("No Persons currently reported missing"))

    s3db.configure("pr_group_membership",
                   list_fields = ["id",
                                  "group_id",
                                  "group_head",
                                  "comments"
                                  ],
                   )

    s3db.configure("pr_person",
                   deletable = False,
                   editable = False,
                   listadd = False,
                   list_fields = ["id",
                                  "first_name",
                                  "middle_name",
                                  "last_name",
                                  "picture",
                                  "gender",
                                  "age_group"
                                  ],
                   )

    def prep(r):
        if not r.id and not r.method and not r.component:
            body_id = r.get_vars.get("match", None)
            body = db(db.dvi_body.id == body_id).select(
                      db.dvi_body.pe_label, limitby=(0, 1)).first()
            label = body and body.pe_label or "#%s" % body_id
            if body_id:
                query = dvi_match_query(body_id)
                r.resource.add_filter(query)
                s3.crud_strings["pr_person"].update(
                    #subtitle_list = T("Candidate Matches for Body %s" % label),
                    msg_no_match = T("No matching records found"))
        return True
    s3.prep = prep

    field = table.missing
    field.readable = False
    field.writable = False
    field.default = True

    table.age_group.readable = True
    table.age_group.writable = True

    # Show only missing persons in list views
    if len(request.args) == 0:
        s3.filter = (db.pr_person.missing == True)

    mpr_tabs = [(T("Missing Report"), "missing_report"),
                (T("Person Details"), None),
                (T("Physical Description"), "physical_description"),
                (T("Images"), "image"),
                (T("Identity"), "identity"),
                (T("Address"), "address"),
                (T("Contact Data"), "contact"),
                (T("Journal"), "note"),
                ]

    rheader = lambda r: s3db.pr_rheader(r, tabs=mpr_tabs)

    output = s3_rest_controller("pr", "person",
                                main = "first_name",
                                extra = "last_name",
                                rheader = rheader,
                                )
    return output

# -------------------------------------------------------------------------
dataset/ETHPy150Open sahana/eden/controllers/dvi.py/person/original