Skip to content

Commit

Permalink
Merge pull request #425 from noharm-ai/develop
Browse files Browse the repository at this point in the history
  • Loading branch information
marceloarocha authored Dec 25, 2024
2 parents 8dabd1d + e7cac5b commit a985103
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions routes/names.py
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down Expand Up @@ -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]},
Expand Down Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions services/admin/admin_integration_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down
3 changes: 1 addition & 2 deletions services/clinical_notes_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
)

Expand Down
7 changes: 6 additions & 1 deletion services/memory_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit a985103

Please sign in to comment.