Skip to content

Commit

Permalink
Merge pull request #265 from prefeitura-rio/development
Browse files Browse the repository at this point in the history
Versão 2.5b
  • Loading branch information
TanookiVerde authored Dec 20, 2024
2 parents f99cad8 + 9c2e264 commit 54dc84c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/routers/frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}
""",
Expand Down

0 comments on commit 54dc84c

Please sign in to comment.