*novice shortcutter skills here *
I’ve searched and copied and tried to edit some shortcuts I found online but I am having trouble using a dictionary in my shortcuts.
The shortcut is pretty simple:
- I put in the weight of a patient
- I have a dictionary (key is the name of the treatment medication, value is a number representing dosage)
- The calculation step is supposed to go through each of medications and give me the dose for the animal based on its weight.
The first dictionary entry initially worked ok and I can get a text output sentence with the variables in it.
As soon as I add repeat I can’t get it to work. Even the first calculation stopped working. I’ve deleted everything after the dictionary and just commented the desired steps.
Thanks so much!
The quick help with solutions in this group is amazing.
This is working great as is, but got me thinking. I know my patient weight and total dose required with the multiplication of
PatientWeight x mg per kg = calculated dosage.
With medications the next step is taking the jar with ie 3000 mg/scoop and having the shortcut also output the amount of powder/scoops/tablets
Patient: Test Horse
The dose for TMS is 7275mg.
Administer 2.425 scoops/tablets.
The dose for Gaba is 5820mg.
Administer 2.328 scoops/tablets.
I tried to duplicate the dictionary with the same key name and then the number being the concentration/scoop, but can’t get the calculation to work.
I think it would maybe be easier if the drug dictionary entries were not numbers but actually dictionaries for each drug (containing dosage, concentration, measurement, and frequency)
… I can’t figure out how to cycle through each drug name and then do calculations based on the items in the key dictionary …
Revised link with comments inserted re dictionaries