def _compute_name(self):
comp_name = '/'
for hc_res_detected_issue in self:
if hc_res_detected_issue.patient_id:
comp_name = hc_res_detected_issue.patient_id.name
if hc_res_detected_issue.patient_id.birth_date:
patient_birth_date = datetime.strftime(datetime.strptime(hc_res_detected_issue.patient_id.birth_date, DF), "%Y-%m-%d")
comp_name = comp_name + "("+ patient_birth_date + "),"
if hc_res_detected_issue.category_id:
comp_name = comp_name + " " + hc_res_detected_issue.category_id.name + "," or ''
if hc_res_detected_issue.date:
patient_date = datetime.strftime(datetime.strptime(hc_res_detected_issue.date, DTF), "%Y-%m-%d")
comp_name = comp_name + " " + patient_date
hc_res_detected_issue.name = comp_name
评论列表
文章目录