Datablaze question

I'm in the process of making a large database of presenting symptoms along with corresponding components for my history, physical exam, and plan sections of my notes (see below).

Currently I'm using the following snippet to search my database and populate my snippets:

{note: trim=yes}Complaint / diagnosis:{dbselect: SELECT dx / complaint FROM history ORDER BY dx / complaint ASC; space=57Y9Lcf1LFEnYOwzkFVofq; menu=yes; name=db_select}{button: hx_selected= db_lists["hx components"]
symptoms_selected = db_lists["symptoms default"]
; label=confirm}{endnote: trim=no}
{note: trim=yes; preview=no}
database: {dbselect: SELECT dx / complaint, symptoms, red flags, treatments tried, other hx, associated sx, hx components, symptoms default, pain location FROM history WHERE dx / complaint = @dx; space=57Y9Lcf1LFEnYOwzkFVofq; menu=no; name=db_lists}
dx: {dx=db_select["dx / complaint"]}
pain: {pain=db_lists["pain location"][1]}
{endnote}
{import: /template-hx; trim=no}

It's working well but I was wondering if there is a way to add a column to the table to add keywords to search by instead. For example if I want the sore throat row to be selected I would like to have it so that I can search for "sore throat", "strep throat", "hoarseness", etc.

Wondering who I would go about this (would a multiple select field work?)

1 Like

Hi @Doc_Krieger
When you start typing in the Read from table menu it automatically searches all the fields (columns) being read.
Adding a column to the table with keywords you'd like to be able to search and reading that column in the Read from table command should work.

Thanks @Dan_Barak1 I'll give it a try. I found that since my table contains so may overlapping keywords it made it hard to search the whole table (ex theres a lot of symptoms and assoc symptoms that overlap in other conditions). I made it so that the database query just focuses on the "dx / complaint" field and maybe another field "keywords" and then using that result in my a second database query to look up all the corresponding column / field entries for that row.

Just not sure if that is the most effective way to do it since I'm basically making 2 database queries in a snippet.