From 48fec746fdf044584a0a803a9a6e35573c010f0c Mon Sep 17 00:00:00 2001 From: Furen Xiao Date: Sat, 29 Mar 2025 06:32:50 +0800 Subject: [PATCH] add gender and birthday --- mysite/mrn2hash.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mysite/mrn2hash.py b/mysite/mrn2hash.py index 0a967d4..6c16441 100644 --- a/mysite/mrn2hash.py +++ b/mysite/mrn2hash.py @@ -32,12 +32,14 @@ def hashptid(mrn, hosp='NTUH'): PATIENTS = [] -for p in Patient.objects.all(): +for p in Patient.objects.all().order_by('medical_records'): md5, hash = hashptid(p.medical_records) print (p.medical_records, hash) PATIENTS.append({ 'ChartNo': p.medical_records, 'hash': hash, + 'gender': p.gender, + 'birthday': p.birthday, })