Mercurial > hgweb > health
changeset 3220:48c32daa1a49
Task #15167: Fix error in searching for existing records
| author | Chris Zimmerman <chris@teffalump.com> |
|---|---|
| date | Wed, 20 Feb 2019 16:58:06 -0800 |
| parents | f600a8a3db44 |
| children | 4b8d530688f5 |
| files | tryton/health_orthanc/health_orthanc.py |
| diffstat | 1 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/tryton/health_orthanc/health_orthanc.py +++ b/tryton/health_orthanc/health_orthanc.py @@ -236,7 +236,7 @@ for entry in entries: try: patient = cls.search( - [("uuid", "=", entry["ident"]), ("server", "=", server)], limit=1 + [("uuid", "=", entry["uuid"]), ("server", "=", server)], limit=1 )[0] patient.name = entry["name"] patient.bd = entry["bd"] @@ -248,15 +248,15 @@ )[0] patient.patient = g_patient logger.info( - "New Matching PUID found for {}".format(entry["uuid"]) + "New Matching PUID found for {}".format(entry["ident"]) ) except: pass updates.append(patient) - logger.info("Updating {}".format(entry["ident"])) + logger.info("Updating patient {}".format(entry["uuid"])) except: continue - logger.warning("Unable to update patient {}".format(entry["ident"])) + logger.warning("Unable to update patient {}".format(entry["uuid"])) cls.save(updates) @classmethod @@ -340,7 +340,7 @@ for entry in entries: try: study = cls.search( - [("uuid", "=", entry["ident"]), ("server", "=", server)], limit=1 + [("uuid", "=", entry["uuid"]), ("server", "=", server)], limit=1 )[0] study.description = entry["description"] study.date = entry["date"] @@ -349,10 +349,10 @@ study.ref_phys = entry["ref_phys"] study.req_phys = entry["req_phys"] updates.append(study) - logger.info("Updating {}".format(entry["ident"])) + logger.info("Updating study {}".format(entry["uuid"])) except: continue - logger.warning("Unable to update study {}".format(entry["ident"])) + logger.warning("Unable to update study {}".format(entry["uuid"])) cls.save(updates) @classmethod
