Auto inputting google sheets form

This may be a long shot, but man if it was possible the time it would save us! Is it possible for a snippet to open a webpage and fill out a form with information extracted from the current site you are on? I was just watching the auto fill form video which got me thinking of possibilities in clinic. We are required to document all of our controlled drugs with date it was used, client name, client phone number, patient name, the amount used and who withdrew the medication. Our current web-based software does not have the ability to track this information, so we are currently using a shared google sheets document (one for each drug).

Here is what the layout of our typical control drug log on google sheets would look like (all made up things of course to protect confidentiality):

And here is what our typical medical record layout would be (once again made up - patient name blue box, owner name green box, owner phone # purple box, actual medical record brown box)

So in an ideal world, this is what I would LOVE to happen. I fill in the the drugs used in the medical record:
Drug A: 3.1ml
Drug B: 4ml
Drug C: 0.18ml

After filling it in, I would type the short cut snippet /cdA which would then auto pull up the pre-existing google sheets document for Drug A, find the next available blank row, and then from the medical record fill in the date (which would just be the current date), client name, patient name, phone number and then extract the # of ml used from the medical record (could I use a regex function for this)? If I am being extra extra picky, where I originally typed /cdA, text would appear that says "logged controlled drug". So am I crazy, or is this possible? I am happy to put the work in and learn if it is something that is a possibility. Thank you so much for your wealth of knowledge, this program has already saved us so much time but we are continuously looking for ways to improve efficiency!
Chrissy

Hi @mildmayveterinary ,
Did you get chance to check our DataBlaze which should solve your exact use case.
You can use the data from a table in a snippet easily.

{dbselect: SELECT `Drug Name`, sumagg(`Amount Added`) as `Total Amount` from Inventory group by `Drug Name`; space=id; name=inventory; multiple=yes}
{dbselect: SELECT `Drug Name`,sumagg(`Amount Deducted`) as `Total used` FROM Records group by `Drug Name`; space=id; name=drugs; menu=yes; multiple=yes}
{note: preview=no}
{date={time: YYYY-MM-DD}}
{`client id`=catch({site: text; selector=#client-id}, "CLIENT-1111")}
{`phone`=catch({site: text; selector=#phone}, "999-9999")}
{`animal id`=catch({site: text; selector=#animal-id}, "ANIMAL-222")}
{initials=catch({site: text; selector=#initials}, "A")}
{endnote}
{note}
{repeat: for drug in drugs; locals=entries}{`total amount`=find(inventory, (i) -> i[`drug name`]==drug[`drug name`])[`total amount`]-drug[`total used`]}
What is the amount consumed for {=drug[`drug name`]} ({=`total amount`}): {formtext: name=amount}

{endrepeat}
{endnote}
{=inventory}
{repeat: for entry in entries}
{`drug name`=entry["drug"][`drug name`]}
{`amount deducted`=entry["amount"]}
{balance=entry[`total amount`] - `amount deducted`}
{dbinsert: INSERT INTO Records SET date=@date, `client id`=`@client id`, `animal id`=`@animal id`, initials=@initials, `Cell Phone`=@phone, `drug name`=`@drug name`, `amount deducted`=`@amount deducted`, balance=@balance; space=id; autoaddfields=no}
{endrepeat}

I used two tables, one to keep tracking the inventory logs and other for usage logs.

This is great, thank you! I have been slowly working away at Datablaze and I think I have most set up the way I want, but I have been having trouble withdrawing data from our software to auto-input into the fields. I have been trying to use the website text selector, but I think I need a catch phase to get the info I want. It shows up in our software as follows:


and when I select an area from the website to insert, the whole box is highlighted/selected:

and this is the text that appears: {site: text; page=https://mmvc.use1.ezyvet.com/*; selector=#ownerSideBar232}.

2 problems I am having

  1. The selector is too specific to a specific patient and does not change if I am on another patient card
  2. I need to withdraw the phone number info for one section and the client name (first last - not as written in the selector field (which is prefix last, first) for another.

I'm guessing I could you regex for this - but I'm not being very successful...

Any help greatly appreciated!

Hi @mildmayveterinary
Can you please email us at support@blaze.today . We would love to work with you on a call to resolve this selector issue.

For the regex, the following can work.

{text="Dr Lorem ipsum
Home Phone Ph: (519) 901-2264"}
{=extractregex(text, "Ph: (.+)")}
or
{=extractregex(text, "([\d() -]+)$")}