Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wherrera10/dosecalculators.jl
Gtk medication dosage calculators for Julia
https://github.com/wherrera10/dosecalculators.jl
calculator gtk medicine pharmacology
Last synced: 18 days ago
JSON representation
Gtk medication dosage calculators for Julia
- Host: GitHub
- URL: https://github.com/wherrera10/dosecalculators.jl
- Owner: wherrera10
- License: bsd-2-clause
- Created: 2021-06-20T21:32:22.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-06-27T22:59:18.000Z (over 3 years ago)
- Last Synced: 2025-01-18T20:02:04.793Z (20 days ago)
- Topics: calculator, gtk, medicine, pharmacology
- Language: Julia
- Homepage:
- Size: 154 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DoseCalculators.jl
Gtk medication dosage calculators for Julia
## Usage:
First you should define a function which takes named arguments weight = kg, height = cm, and age = years.
See the file examples/medication_formulas.jl for examples of formulas.
This type of app does not consider concomitant medications. If there are such issues, consider mention in the text of `rlabel`.
#### Always sanity check medical apps for errors! Unchecked unit or decimal place errors can kill!
## Functions:
#### dose_calculator_app(func::Function, title = "Dose Calculator", rlabel = "Results")Create a `Gtk` widget with entries for `weight`, `height`, `age`, and dose interval.
Arguments:
`func` is a function which takes named arguments age = years, weight = kg, height = cm and returns total 24-hour dosage in mg.
`title` is the title for the app, and
`rlabel` is the label to be given the results## Example:
using DoseCalculators
function amoxicillin_po(; age, weight, height)
if age <= 3/12
return weight * 30.0
elseif age <= 16 && weight <= 40
return weight * 37.0
else
return 1500.0
end
end
dose_calculator_app(amoxicillin_po, "Amoxicillin PO Dosing", "Amoxicillin dosage(mg)")
See the `examples` directory for other examples of formulas.
## Installation:
You may install the package from Github in the usual way:# press ] to go to Pkg mode
pkg> add DoseCalculators
Or, to install the current master copy:
using Pkg
Pkg.add("http://github.com/wherrera10/DoseCalculators.jl")