@property
    def case_link(self):
        case_id, case_name = self.case['_id'], self.case['mother_name']
        try:
            return html.mark_safe("<a class='ajax_dialog' href='%s'>%s</a>" % (
                html.escape(reverse('crs_details_report', args=[self.report.domain, case_id, self.report.slug])),
                html.escape(case_name),
            ))
        except NoReverseMatch:
            return "%s (bad ID format)" % case_name
dataset/ETHPy150Open dimagi/commcare-hq/custom/apps/crs_reports/reports.py/HNBCReportDisplay.case_link/original