From 24aaca0f9e2ad4fe8cc01c6e7f6906b783200935 Mon Sep 17 00:00:00 2001 From: Marcelo Arocha Date: Fri, 20 Dec 2024 14:03:31 -0300 Subject: [PATCH 1/4] add private memory --- services/memory_service.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/services/memory_service.py b/services/memory_service.py index c7947e65..5f69b94e 100644 --- a/services/memory_service.py +++ b/services/memory_service.py @@ -176,7 +176,12 @@ def is_admin_memory(key): def is_private(key): - private_keys = ["config-signature", "filter-private", "user-preferences"] + private_keys = [ + "config-signature", + "filter-private", + "user-preferences", + "clinical-notes-private", + ] for k in private_keys: if k in key: From d48049529678722ad643bca6f44f0a17768e0606 Mon Sep 17 00:00:00 2001 From: Marcelo Arocha Date: Fri, 20 Dec 2024 16:01:39 -0300 Subject: [PATCH 2/4] cn: show all admissions --- services/clinical_notes_service.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/services/clinical_notes_service.py b/services/clinical_notes_service.py index f47c9d0e..42a45ba1 100644 --- a/services/clinical_notes_service.py +++ b/services/clinical_notes_service.py @@ -216,9 +216,8 @@ def get_notes(admission_number: int, filter_date: str): admission_list = ( db.session.query(Patient) .filter(Patient.idPatient == admission.idPatient) - .filter(Patient.admissionNumber < admission_number) .order_by(desc(Patient.admissionDate)) - .limit(10) + .limit(15) .all() ) From f20403460a3a6e0b316c99b446170e5bacbc045a Mon Sep 17 00:00:00 2001 From: Marcelo Arocha Date: Sun, 22 Dec 2024 17:16:37 -0300 Subject: [PATCH 3/4] v4.20-beta --- config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.py b/config.py index 02978210..2a33d242 100644 --- a/config.py +++ b/config.py @@ -5,7 +5,7 @@ class Config: - VERSION = "v4.19-beta" + VERSION = "v4.20-beta" FRONTEND_VERSION = "4.0.14" ENV = getenv("ENV") or NoHarmENV.DEVELOPMENT.value SECRET_KEY = getenv("SECRET_KEY") or "secret_key" From e7cac5b574e969583c258b186f50b1eb03647178 Mon Sep 17 00:00:00 2001 From: Marcelo Arocha Date: Mon, 23 Dec 2024 11:01:46 -0300 Subject: [PATCH 4/4] getnames internal config --- routes/names.py | 6 +++--- services/admin/admin_integration_service.py | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/routes/names.py b/routes/names.py index 26d82e23..a6f0fb43 100644 --- a/routes/names.py +++ b/routes/names.py @@ -33,7 +33,7 @@ def proxy_name(idPatient): ) if client_id == "noharm-internal": - url = url.replace("{idPatient}", str(int(idPatient))) + url += f"patient-name/{int(idPatient)}" params = dict(config["getname"]["params"]) else: params = dict(config["getname"]["params"], **{"cd_paciente": idPatient}) @@ -111,7 +111,7 @@ def proxy_multiple(): try: if client_id == "noharm-internal": - url = url.replace("{idPatient}", "multiple") + url += "patient-name/multiple" params = dict( config["getname"]["params"], **{"patients": [str(id) for id in ids_list]}, @@ -226,7 +226,7 @@ def search_name(term): else config["getname"]["url"] ) - url = url.replace("/patient-name/{idPatient}", f"/search-name/{term}") + url += f"search-name/{term}" params = dict(config["getname"]["params"]) try: diff --git a/services/admin/admin_integration_service.py b/services/admin/admin_integration_service.py index 4ef0f1ad..0e1a13ab 100644 --- a/services/admin/admin_integration_service.py +++ b/services/admin/admin_integration_service.py @@ -162,6 +162,7 @@ def _set_new_config(old_config: dict, new_config: dict): config["getname"]["secret"] = new_config["getname"]["secret"] elif "proxy" == config["getname"]["type"]: config["getname"]["url"] = new_config["getname"]["url"] + config["getname"]["urlDev"] = new_config["getname"]["urlDev"] config["getname"]["params"] = json.loads(new_config["getname"]["params"]) config["getname"]["token"] = { "url": new_config["getname"]["token"]["url"],