Desktop drug dose calculator

I’m new!!

I recently made an interactive pdf form to calculate drug infusion rates/doses based on entered patient age and dob. This required javascript. It works well but i would like to add more functionality.

At present, each output field has its own code. The parameters relating to each drug e.g dose per Kg and age restrictions are held within this code. I want the application to be easy to edit such that variables for each drug are held in a database. I want a user interface to enter patient details and then calculations to be performed, creating an output form/pdf that can be printed.

I hope this makes sense? What is my best strategy for doing this?