From f99cad8f1530749db6088857baf0ce337926431f Mon Sep 17 00:00:00 2001 From: Pedro Marques Date: Tue, 10 Dec 2024 18:23:19 -0300 Subject: [PATCH 1/2] Trigger Deploy --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 90dbb86..d083d8e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Histórico Clínico Integrado - Responsável de Infraestrutura: Gabriel Milan (Escritório de Dados) -- Administrador: Pedro Marques (DIT@SMS) +- Administrador: Pedro Marques (DIT @ SMS) ## O que é o HCI? - O HCI tem como objetivo integrar os dados de saúde municipais de diferentes unidades de saúde, seja da atenção primária, hospitalar, etc. From 179483efd1c1e76f526d43bdd28b91a6821329af Mon Sep 17 00:00:00 2001 From: Pedro Marques Date: Thu, 19 Dec 2024 14:40:31 -0300 Subject: [PATCH 2/2] refactor: update search_patient query to improve parameter naming and selection --- app/routers/frontend.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/routers/frontend.py b/app/routers/frontend.py index 666faa7..f9064ca 100644 --- a/app/routers/frontend.py +++ b/app/routers/frontend.py @@ -121,15 +121,15 @@ async def search_patient( clause = "" if cns: - clause = f"valor_cns = {cns}" + clause = f"cns_particao = {cns}" elif cpf: - clause = f"cpf_particao = {cpf}" + clause = f"cpf = '{cpf}'" elif name: clause = f"search(nome,'{name}')" results = await read_bq( f""" - SELECT nome, valor_cns as cns, cpf + SELECT * FROM `{BIGQUERY_PROJECT}`.{BIGQUERY_PATIENT_SEARCH_TABLE_ID} WHERE {clause} """,