Module: Kimaya::KimayaCore
- Included in:
- TPNCalc
- Defined in:
- lib/kimaya/kimaya_core.rb
Constant Summary collapse
- ERROR_CODES =
{ percent_dextrose_conc: "1002", current_weight: "1003", total_fluid_intake: "1004", total_fluid_intake_vol: "1005", feed_vol: "1006", losses: "1007", tpn_vol: "1008", fat_intake: "1009", fat_vol: "1011", lipid_conc: "1010", hav_vol: "1012", overfill_factor: "1013", prepared_overfill: "1014", amino_acid_intake: "1015", amino_acid_conc: "1016", amino_acid_vol: "1017", sodium_chloride_intake: "1018", sodium_chloride_conc: "1019", sodium_chloride_vol: "1020", potassium_chloride_intake: "1021", potassium_chloride_conc: "1022", potassium_chloride_vol: "1023", calcium_intake: "1024", calcium_conc: "1025", calcium_vol: "1026", magnesium_intake: "1027", magnesium_conc: "1028", magnesium_vol: "1029", mvi: "1032", remaining_dextrose_vol: "1033", achieved_dextrose_conc: "1034", fat_calories: "1035", cho_calories: "1036", cnr_rate: "1037", calories: "1039", dir_rate: "1040", dextrose_10: "1041", dextrose_50: "1042", heparin: "1044" }
Instance Attribute Summary collapse
-
#achieved_dextrose_conc ⇒ Object
Returns the value of attribute achieved_dextrose_conc.
-
#administration ⇒ Object
Returns the value of attribute administration.
-
#amino_acid_conc ⇒ Object
Returns the value of attribute amino_acid_conc.
-
#amino_acid_intake ⇒ Object
Returns the value of attribute amino_acid_intake.
-
#amino_acid_vol ⇒ Object
Returns the value of attribute amino_acid_vol.
-
#available_dextrose_concentrations ⇒ Object
Returns the value of attribute available_dextrose_concentrations.
-
#calcium_conc ⇒ Object
Returns the value of attribute calcium_conc.
-
#calcium_intake ⇒ Object
Returns the value of attribute calcium_intake.
-
#calcium_vol ⇒ Object
Returns the value of attribute calcium_vol.
-
#calories ⇒ Object
Returns the value of attribute calories.
-
#cho_calories ⇒ Object
Returns the value of attribute cho_calories.
-
#cnr_rate ⇒ Object
Returns the value of attribute cnr_rate.
-
#current_weight ⇒ Object
Returns the value of attribute current_weight.
-
#day_of_tpn ⇒ Object
Returns the value of attribute day_of_tpn.
-
#dextrose_concentrations ⇒ Object
Returns the value of attribute dextrose_concentrations.
-
#dir_rate ⇒ Object
Returns the value of attribute dir_rate.
-
#errors ⇒ Object
Returns the value of attribute errors.
-
#exceptions ⇒ Object
Returns the value of attribute exceptions.
-
#expected_dir ⇒ Object
Returns the value of attribute expected_dir.
-
#fat_calories ⇒ Object
Returns the value of attribute fat_calories.
-
#fat_intake ⇒ Object
Returns the value of attribute fat_intake.
-
#fat_vol ⇒ Object
Returns the value of attribute fat_vol.
-
#feed_vol ⇒ Object
Returns the value of attribute feed_vol.
-
#hav_vol ⇒ Object
Returns the value of attribute hav_vol.
-
#heparin ⇒ Object
Returns the value of attribute heparin.
-
#lipid_conc ⇒ Object
Returns the value of attribute lipid_conc.
-
#losses ⇒ Object
Returns the value of attribute losses.
-
#magnesium_conc ⇒ Object
Returns the value of attribute magnesium_conc.
-
#magnesium_intake ⇒ Object
Returns the value of attribute magnesium_intake.
-
#magnesium_vol ⇒ Object
Returns the value of attribute magnesium_vol.
-
#mvi ⇒ Object
Returns the value of attribute mvi.
-
#non_protein ⇒ Object
Returns the value of attribute non_protein.
-
#other_infusions ⇒ Object
Returns the value of attribute other_infusions.
-
#overfill_factor ⇒ Object
Returns the value of attribute overfill_factor.
-
#percent_dextrose_conc ⇒ Object
Returns the value of attribute percent_dextrose_conc.
-
#potassium_chloride_conc ⇒ Object
Returns the value of attribute potassium_chloride_conc.
-
#potassium_chloride_intake ⇒ Object
Returns the value of attribute potassium_chloride_intake.
-
#potassium_chloride_vol ⇒ Object
Returns the value of attribute potassium_chloride_vol.
-
#prepared_overfill ⇒ Object
Returns the value of attribute prepared_overfill.
-
#remaining_dextrose_vol ⇒ Object
Returns the value of attribute remaining_dextrose_vol.
-
#sodium_chloride_conc ⇒ Object
Returns the value of attribute sodium_chloride_conc.
-
#sodium_chloride_intake ⇒ Object
Returns the value of attribute sodium_chloride_intake.
-
#sodium_chloride_vol ⇒ Object
Returns the value of attribute sodium_chloride_vol.
-
#total_fluid_intake ⇒ Object
Returns the value of attribute total_fluid_intake.
-
#total_fluid_intake_vol ⇒ Object
Returns the value of attribute total_fluid_intake_vol.
-
#total_protein ⇒ Object
Returns the value of attribute total_protein.
-
#tpn_vol ⇒ Object
Returns the value of attribute tpn_vol.
-
#warnings ⇒ Object
Returns the value of attribute warnings.
-
#water ⇒ Object
Returns the value of attribute water.
Instance Method Summary collapse
Instance Attribute Details
#achieved_dextrose_conc ⇒ Object
Returns the value of attribute achieved_dextrose_conc.
3 4 5 |
# File 'lib/kimaya/kimaya_core.rb', line 3 def achieved_dextrose_conc @achieved_dextrose_conc end |
#administration ⇒ Object
Returns the value of attribute administration.
3 4 5 |
# File 'lib/kimaya/kimaya_core.rb', line 3 def administration @administration end |
#amino_acid_conc ⇒ Object
Returns the value of attribute amino_acid_conc.
3 4 5 |
# File 'lib/kimaya/kimaya_core.rb', line 3 def amino_acid_conc @amino_acid_conc end |
#amino_acid_intake ⇒ Object
Returns the value of attribute amino_acid_intake.
3 4 5 |
# File 'lib/kimaya/kimaya_core.rb', line 3 def amino_acid_intake @amino_acid_intake end |
#amino_acid_vol ⇒ Object
Returns the value of attribute amino_acid_vol.
3 4 5 |
# File 'lib/kimaya/kimaya_core.rb', line 3 def amino_acid_vol @amino_acid_vol end |
#available_dextrose_concentrations ⇒ Object
Returns the value of attribute available_dextrose_concentrations.
3 4 5 |
# File 'lib/kimaya/kimaya_core.rb', line 3 def available_dextrose_concentrations @available_dextrose_concentrations end |
#calcium_conc ⇒ Object
Returns the value of attribute calcium_conc.
3 4 5 |
# File 'lib/kimaya/kimaya_core.rb', line 3 def calcium_conc @calcium_conc end |
#calcium_intake ⇒ Object
Returns the value of attribute calcium_intake.
3 4 5 |
# File 'lib/kimaya/kimaya_core.rb', line 3 def calcium_intake @calcium_intake end |
#calcium_vol ⇒ Object
Returns the value of attribute calcium_vol.
3 4 5 |
# File 'lib/kimaya/kimaya_core.rb', line 3 def calcium_vol @calcium_vol end |
#calories ⇒ Object
Returns the value of attribute calories.
3 4 5 |
# File 'lib/kimaya/kimaya_core.rb', line 3 def calories @calories end |
#cho_calories ⇒ Object
Returns the value of attribute cho_calories.
3 4 5 |
# File 'lib/kimaya/kimaya_core.rb', line 3 def cho_calories @cho_calories end |
#cnr_rate ⇒ Object
Returns the value of attribute cnr_rate.
3 4 5 |
# File 'lib/kimaya/kimaya_core.rb', line 3 def cnr_rate @cnr_rate end |
#current_weight ⇒ Object
Returns the value of attribute current_weight.
3 4 5 |
# File 'lib/kimaya/kimaya_core.rb', line 3 def current_weight @current_weight end |
#day_of_tpn ⇒ Object
Returns the value of attribute day_of_tpn.
3 4 5 |
# File 'lib/kimaya/kimaya_core.rb', line 3 def day_of_tpn @day_of_tpn end |
#dextrose_concentrations ⇒ Object
Returns the value of attribute dextrose_concentrations.
3 4 5 |
# File 'lib/kimaya/kimaya_core.rb', line 3 def dextrose_concentrations @dextrose_concentrations end |
#dir_rate ⇒ Object
Returns the value of attribute dir_rate.
3 4 5 |
# File 'lib/kimaya/kimaya_core.rb', line 3 def dir_rate @dir_rate end |
#errors ⇒ Object
Returns the value of attribute errors.
15 16 17 |
# File 'lib/kimaya/kimaya_core.rb', line 15 def errors @errors end |
#exceptions ⇒ Object
Returns the value of attribute exceptions.
15 16 17 |
# File 'lib/kimaya/kimaya_core.rb', line 15 def exceptions @exceptions end |
#expected_dir ⇒ Object
Returns the value of attribute expected_dir.
3 4 5 |
# File 'lib/kimaya/kimaya_core.rb', line 3 def expected_dir @expected_dir end |
#fat_calories ⇒ Object
Returns the value of attribute fat_calories.
3 4 5 |
# File 'lib/kimaya/kimaya_core.rb', line 3 def fat_calories @fat_calories end |
#fat_intake ⇒ Object
Returns the value of attribute fat_intake.
3 4 5 |
# File 'lib/kimaya/kimaya_core.rb', line 3 def fat_intake @fat_intake end |
#fat_vol ⇒ Object
Returns the value of attribute fat_vol.
3 4 5 |
# File 'lib/kimaya/kimaya_core.rb', line 3 def fat_vol @fat_vol end |
#feed_vol ⇒ Object
Returns the value of attribute feed_vol.
3 4 5 |
# File 'lib/kimaya/kimaya_core.rb', line 3 def feed_vol @feed_vol end |
#hav_vol ⇒ Object
Returns the value of attribute hav_vol.
3 4 5 |
# File 'lib/kimaya/kimaya_core.rb', line 3 def hav_vol @hav_vol end |
#heparin ⇒ Object
Returns the value of attribute heparin.
3 4 5 |
# File 'lib/kimaya/kimaya_core.rb', line 3 def heparin @heparin end |
#lipid_conc ⇒ Object
Returns the value of attribute lipid_conc.
3 4 5 |
# File 'lib/kimaya/kimaya_core.rb', line 3 def lipid_conc @lipid_conc end |
#losses ⇒ Object
Returns the value of attribute losses.
3 4 5 |
# File 'lib/kimaya/kimaya_core.rb', line 3 def losses @losses end |
#magnesium_conc ⇒ Object
Returns the value of attribute magnesium_conc.
3 4 5 |
# File 'lib/kimaya/kimaya_core.rb', line 3 def magnesium_conc @magnesium_conc end |
#magnesium_intake ⇒ Object
Returns the value of attribute magnesium_intake.
3 4 5 |
# File 'lib/kimaya/kimaya_core.rb', line 3 def magnesium_intake @magnesium_intake end |
#magnesium_vol ⇒ Object
Returns the value of attribute magnesium_vol.
3 4 5 |
# File 'lib/kimaya/kimaya_core.rb', line 3 def magnesium_vol @magnesium_vol end |
#mvi ⇒ Object
Returns the value of attribute mvi.
3 4 5 |
# File 'lib/kimaya/kimaya_core.rb', line 3 def mvi @mvi end |
#non_protein ⇒ Object
Returns the value of attribute non_protein.
3 4 5 |
# File 'lib/kimaya/kimaya_core.rb', line 3 def non_protein @non_protein end |
#other_infusions ⇒ Object
Returns the value of attribute other_infusions.
3 4 5 |
# File 'lib/kimaya/kimaya_core.rb', line 3 def other_infusions @other_infusions end |
#overfill_factor ⇒ Object
Returns the value of attribute overfill_factor.
3 4 5 |
# File 'lib/kimaya/kimaya_core.rb', line 3 def overfill_factor @overfill_factor end |
#percent_dextrose_conc ⇒ Object
Returns the value of attribute percent_dextrose_conc.
3 4 5 |
# File 'lib/kimaya/kimaya_core.rb', line 3 def percent_dextrose_conc @percent_dextrose_conc end |
#potassium_chloride_conc ⇒ Object
Returns the value of attribute potassium_chloride_conc.
3 4 5 |
# File 'lib/kimaya/kimaya_core.rb', line 3 def potassium_chloride_conc @potassium_chloride_conc end |
#potassium_chloride_intake ⇒ Object
Returns the value of attribute potassium_chloride_intake.
3 4 5 |
# File 'lib/kimaya/kimaya_core.rb', line 3 def potassium_chloride_intake @potassium_chloride_intake end |
#potassium_chloride_vol ⇒ Object
Returns the value of attribute potassium_chloride_vol.
3 4 5 |
# File 'lib/kimaya/kimaya_core.rb', line 3 def potassium_chloride_vol @potassium_chloride_vol end |
#prepared_overfill ⇒ Object
Returns the value of attribute prepared_overfill.
3 4 5 |
# File 'lib/kimaya/kimaya_core.rb', line 3 def prepared_overfill @prepared_overfill end |
#remaining_dextrose_vol ⇒ Object
Returns the value of attribute remaining_dextrose_vol.
3 4 5 |
# File 'lib/kimaya/kimaya_core.rb', line 3 def remaining_dextrose_vol @remaining_dextrose_vol end |
#sodium_chloride_conc ⇒ Object
Returns the value of attribute sodium_chloride_conc.
3 4 5 |
# File 'lib/kimaya/kimaya_core.rb', line 3 def sodium_chloride_conc @sodium_chloride_conc end |
#sodium_chloride_intake ⇒ Object
Returns the value of attribute sodium_chloride_intake.
3 4 5 |
# File 'lib/kimaya/kimaya_core.rb', line 3 def sodium_chloride_intake @sodium_chloride_intake end |
#sodium_chloride_vol ⇒ Object
Returns the value of attribute sodium_chloride_vol.
3 4 5 |
# File 'lib/kimaya/kimaya_core.rb', line 3 def sodium_chloride_vol @sodium_chloride_vol end |
#total_fluid_intake ⇒ Object
Returns the value of attribute total_fluid_intake.
3 4 5 |
# File 'lib/kimaya/kimaya_core.rb', line 3 def total_fluid_intake @total_fluid_intake end |
#total_fluid_intake_vol ⇒ Object
Returns the value of attribute total_fluid_intake_vol.
3 4 5 |
# File 'lib/kimaya/kimaya_core.rb', line 3 def total_fluid_intake_vol @total_fluid_intake_vol end |
#total_protein ⇒ Object
Returns the value of attribute total_protein.
3 4 5 |
# File 'lib/kimaya/kimaya_core.rb', line 3 def total_protein @total_protein end |
#tpn_vol ⇒ Object
Returns the value of attribute tpn_vol.
3 4 5 |
# File 'lib/kimaya/kimaya_core.rb', line 3 def tpn_vol @tpn_vol end |
#warnings ⇒ Object
Returns the value of attribute warnings.
15 16 17 |
# File 'lib/kimaya/kimaya_core.rb', line 15 def warnings @warnings end |
#water ⇒ Object
Returns the value of attribute water.
3 4 5 |
# File 'lib/kimaya/kimaya_core.rb', line 3 def water @water end |
Instance Method Details
#round(value, scale) ⇒ Object
16 17 18 |
# File 'lib/kimaya/kimaya_core.rb', line 16 def round(value, scale) ("%.#{scale}f" % value).to_f end |