pueri 0.7.0 → 0.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +24 -0
- data/.rubocop.yml +1 -1
- data/ABOUT.md +28 -0
- data/CHANGELOG.md +16 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +3 -3
- data/README.md +19 -2
- data/docs/Pueri.html +3 -3
- data/docs/Pueri/Age.html +1 -1
- data/docs/Pueri/DoseCalc.html +1097 -0
- data/docs/Pueri/DoseCheck.html +1094 -0
- data/docs/Pueri/Neuro.html +1 -1
- data/docs/Pueri/Vax.html +1 -1
- data/docs/_index.html +23 -1
- data/docs/class_list.html +1 -1
- data/docs/file.README.html +10 -3
- data/docs/index.html +10 -3
- data/docs/method_list.html +203 -11
- data/docs/top-level-namespace.html +1 -1
- data/lib/pueri.rb +2 -0
- data/lib/pueri/dosecalc.rb +114 -0
- data/lib/pueri/dosecheck.rb +95 -0
- data/lib/pueri/version.rb +1 -1
- data/package.json +1 -1
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f588e2eede9595531d3c3f974ce6abb71089180353ffd2934d2c1e3604d56b1
|
4
|
+
data.tar.gz: fb14b72c9c15fa964a360a9552ed017eb580ad619b03337951a488d256c55a96
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a2387fa2b80b88101e62d4851d550009b95b19b65a9ac853951f4205d7e600908b82ade84e47a3dde3953b35f5c92d74bd9a6f9cd0d9f0984f46d7786e6eb15
|
7
|
+
data.tar.gz: 82ef5c2a79e5c8beacc6c7091ea7d3d9724b30eb8fa601b96d0cfd79d4add59da653ea3142cb72ba1071a12331d0fafa3215eda5fb08cb00a01efc1feba94334
|
@@ -0,0 +1,24 @@
|
|
1
|
+
name: Ruby
|
2
|
+
|
3
|
+
on: [push]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
build:
|
7
|
+
|
8
|
+
runs-on: ubuntu-latest
|
9
|
+
|
10
|
+
steps:
|
11
|
+
- uses: actions/checkout@v1
|
12
|
+
- name: Set up Ruby 2.6
|
13
|
+
uses: actions/setup-ruby@v1
|
14
|
+
with:
|
15
|
+
ruby-version: 2.6.x
|
16
|
+
- name: Add excecute permission
|
17
|
+
run: |
|
18
|
+
chmod +x ./bin/console
|
19
|
+
- name: Build and test with RSpec
|
20
|
+
run: |
|
21
|
+
gem install bundler -v 2.0.2
|
22
|
+
bundle install --retry 3
|
23
|
+
rubocop
|
24
|
+
bundle exec rspec spec
|
data/.rubocop.yml
CHANGED
data/ABOUT.md
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# Sobre o *Guias UBS*
|
2
|
+
|
3
|
+
## :warning: IMPORTANTE
|
4
|
+
|
5
|
+
**Os guias desse projeto não substituem acompanhamento com um profissional capacitado e registrado em seu respectivo conselho de classe.**
|
6
|
+
|
7
|
+
**Eles não devem ser usados sem suporte de um profissional de saúde capacitado.**
|
8
|
+
|
9
|
+
Procure a Unidade Básica de Saúde mais próxima da sua residência! :hospital:
|
10
|
+
|
11
|
+
## Aviso Legal
|
12
|
+
|
13
|
+
O uso desses materiais é feito por escolha do profissional.
|
14
|
+
|
15
|
+
Este projeto e seus membros não se responsabilizam por qualquer informação contida em seus materiais ou uso inadequado desses. Qualquer inacurácia ou desatualização devem ser remediados por estudo do próprio profissional, o qual, ao usar esses guias, assume responsabilidade para si no caso de uso de informação destualizada ou inacurada, uma vez que sua conduta pessoal é exclusivamente de sua resposabilidade.
|
16
|
+
|
17
|
+
Esse projeto é **fonte aberta** (*open source*), portanto nós encorajamos não só o uso dos recursos, mas a participação [saudável](CODE-OF-CONDUCT.md) para [melhorar o conteúdo disponível](CONTRIBUTING.md), permitindo que estes estejam sempre o mais atualizados o possível.
|
18
|
+
|
19
|
+
## Aviso Ético
|
20
|
+
|
21
|
+
De acordo com os princípios éticos vigentes [[1], [2]], esse projeto tem por objetivo expôr conteúdo educativo a profissionais da área da saúde, especialmente aqueles com nível superior e que atuem em atenção básica, visando facilitar o uso dos conhecimentos atualizados que **esse projeto assume que o profissional já tenha**.
|
22
|
+
|
23
|
+
Esse projeto **não se destina a assistência direta**, nós **não oferecemos consultas ou suporte clínico** através desse projeto, e nem o projeto nem nenhum de seus membros **pedirá dados pessoais** em nenhum momento para do projeto.
|
24
|
+
|
25
|
+
O *Guias UBS* é um recurso exclusivamente didático e não recebe suporte, financeiro ou de qualquer outra natureza, de nenhuma empresa. O projeto é voluntário e todos os seus membros participam sem fins lucrativos pessoais.
|
26
|
+
|
27
|
+
[1]: https://www.cremesp.org.br/?siteAcao=Publicacoes&acao=detalhes_capitulos&cod_capitulo=26
|
28
|
+
[2]: https://www.cremesp.org.br/?siteAcao=Publicacoes&acao=detalhes_capitulos&cod_capitulo=27
|
data/CHANGELOG.md
CHANGED
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
7
7
|
|
8
8
|
## [Unreleased]
|
9
9
|
|
10
|
+
## [0.11.2] - `2019-10-28`
|
11
|
+
|
12
|
+
### Added
|
13
|
+
* [Disclaimer](ABOUT.md), regarding the objectives and limitations of this project.
|
14
|
+
* `DoseCalc`, a class for calculating the dosage of medications for pediatric patients.
|
15
|
+
* `DoseCheck`, a class for checking the dosage-per-weight-day of prescribed medications.
|
16
|
+
|
17
|
+
### Changed
|
18
|
+
* Bumped [RuboCop](https://github.com/rubocop-hq/rubocop) to `v.0.76.0`.
|
19
|
+
|
20
|
+
## [0.7.0] - `2019-10-19`
|
21
|
+
|
10
22
|
### Added
|
11
23
|
* Code of Conduct from [Contributor Covenant v1.4.1](https://www.contributor-covenant.org/).
|
12
24
|
* [License](LICENSE.md).
|
@@ -24,3 +36,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
24
36
|
|
25
37
|
[PNI]: http://www.saude.gov.br/saude-de-a-z/vacinacao/calendario-vacinacao
|
26
38
|
[DNPM]: https://www.fcm.unicamp.br/fcm/neuropediatria-conteudo-didatico/desenvolvimento-neuropsicomotor
|
39
|
+
|
40
|
+
[Unreleased]: https://github.com/Nereare/pueri/compare/v0.11.2...HEAD
|
41
|
+
[0.11.2]: https://github.com/Nereare/pueri/compare/v0.7.0...v0.11.2
|
42
|
+
[0.7.0]: https://github.com/Nereare/pueri/releases/tag/v0.7.0
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
pueri (0.
|
4
|
+
pueri (0.11.2)
|
5
5
|
pastel (~> 0.7.3)
|
6
6
|
tty-table (~> 0.11.0)
|
7
7
|
|
@@ -36,7 +36,7 @@ GEM
|
|
36
36
|
diff-lcs (>= 1.2.0, < 2.0)
|
37
37
|
rspec-support (~> 3.9.0)
|
38
38
|
rspec-support (3.9.0)
|
39
|
-
rubocop (0.
|
39
|
+
rubocop (0.76.0)
|
40
40
|
jaro_winkler (~> 1.5.1)
|
41
41
|
parallel (~> 1.10)
|
42
42
|
parser (>= 2.6)
|
@@ -74,7 +74,7 @@ DEPENDENCIES
|
|
74
74
|
pueri!
|
75
75
|
rake (~> 13.0)
|
76
76
|
rspec (~> 3.9)
|
77
|
-
rubocop (~> 0.
|
77
|
+
rubocop (~> 0.76.0)
|
78
78
|
simplecov (~> 0.17.1)
|
79
79
|
yard (~> 0.9.20)
|
80
80
|
|
data/README.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
<p style='text-align: center; margin-bottom: 0;'>
|
2
|
+
<img alt='Pueri Logo' src='https://i.imgur.com/YZr2UEn.png' style='max-width: 250px; margin: 0;' />
|
3
|
+
</p>
|
4
|
+
|
1
5
|
# Pueri
|
2
6
|
|
3
7
|
[](https://github.com/Nereare/pueri/releases)
|
@@ -10,11 +14,24 @@
|
|
10
14
|
[](https://codeclimate.com/github/Nereare/pueri)
|
11
15
|
[](https://libraries.io/github/Nereare/pueri)
|
12
16
|
|
13
|
-
Um script em Ruby para ajudar o dia-a-dia de médicos e enfermeiros de Atenção Básica.
|
17
|
+
Um *script* em Ruby para ajudar o dia-a-dia de médicos e enfermeiros de Atenção Básica.
|
18
|
+
|
19
|
+
**Ao usar os conteúdos desse projeto, você assume estar ciente dos nossos [objetivos e limitações](ABOUT.md).**
|
14
20
|
|
15
21
|
## Installing
|
16
22
|
|
17
|
-
1.
|
23
|
+
1. Have both [Ruby](https://www.ruby-lang.org/) and [Bundler](https://bundler.io/) intalled.
|
24
|
+
2. Add this line to your `Gemfile`:
|
25
|
+
```ruby
|
26
|
+
gem 'pueri', '~> 0.11.2'
|
27
|
+
```
|
28
|
+
3. Then run:
|
29
|
+
```shell
|
30
|
+
bundle install
|
31
|
+
```
|
32
|
+
4. You are now ready to use the gem!
|
33
|
+
|
34
|
+
Read [the documentation](https://nereare.github.io/pueri/) for how to use it!
|
18
35
|
|
19
36
|
## Contributing
|
20
37
|
|
data/docs/Pueri.html
CHANGED
@@ -79,7 +79,7 @@
|
|
79
79
|
<dl>
|
80
80
|
<dt>Defined in:</dt>
|
81
81
|
<dd>lib/pueri.rb<span class="defines">,<br />
|
82
|
-
lib/pueri/age.rb,<br /> lib/pueri/vax.rb,<br /> lib/pueri/neuro.rb,<br /> lib/pueri/version.rb</span>
|
82
|
+
lib/pueri/age.rb,<br /> lib/pueri/vax.rb,<br /> lib/pueri/neuro.rb,<br /> lib/pueri/version.rb,<br /> lib/pueri/dosecalc.rb,<br /> lib/pueri/dosecheck.rb</span>
|
83
83
|
</dd>
|
84
84
|
</dl>
|
85
85
|
|
@@ -105,7 +105,7 @@ National Program of Immunization (PNI), using the 2019 uptade.</p>
|
|
105
105
|
|
106
106
|
|
107
107
|
|
108
|
-
<strong class="classes">Classes:</strong> <span class='object_link'><a href="Pueri/Age.html" title="Pueri::Age (class)">Age</a></span>, <span class='object_link'><a href="Pueri/Neuro.html" title="Pueri::Neuro (class)">Neuro</a></span>, <span class='object_link'><a href="Pueri/Vax.html" title="Pueri::Vax (class)">Vax</a></span>
|
108
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="Pueri/Age.html" title="Pueri::Age (class)">Age</a></span>, <span class='object_link'><a href="Pueri/DoseCalc.html" title="Pueri::DoseCalc (class)">DoseCalc</a></span>, <span class='object_link'><a href="Pueri/DoseCheck.html" title="Pueri::DoseCheck (class)">DoseCheck</a></span>, <span class='object_link'><a href="Pueri/Neuro.html" title="Pueri::Neuro (class)">Neuro</a></span>, <span class='object_link'><a href="Pueri/Vax.html" title="Pueri::Vax (class)">Vax</a></span>
|
109
109
|
|
110
110
|
|
111
111
|
</p>
|
@@ -221,7 +221,7 @@ National Program of Immunization (PNI), using the 2019 uptade.</p>
|
|
221
221
|
</div>
|
222
222
|
|
223
223
|
<div id="footer">
|
224
|
-
Generated on
|
224
|
+
Generated on Mon Oct 28 17:34:32 2019 by
|
225
225
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
226
226
|
0.9.20 (ruby-2.5.5).
|
227
227
|
</div>
|
data/docs/Pueri/Age.html
CHANGED
@@ -590,7 +590,7 @@ given day.</p>
|
|
590
590
|
</div>
|
591
591
|
|
592
592
|
<div id="footer">
|
593
|
-
Generated on
|
593
|
+
Generated on Mon Oct 28 17:34:32 2019 by
|
594
594
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
595
595
|
0.9.20 (ruby-2.5.5).
|
596
596
|
</div>
|
@@ -0,0 +1,1097 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title>
|
7
|
+
Class: Pueri::DoseCalc
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.20
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
pathId = "Pueri::DoseCalc";
|
19
|
+
relpath = '../';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
|
23
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
24
|
+
|
25
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
26
|
+
|
27
|
+
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="../class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
38
|
+
|
39
|
+
<a href="../_index.html">Index (D)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../Pueri.html" title="Pueri (module)">Pueri</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">DoseCalc</span>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div id="search">
|
47
|
+
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
49
|
+
href="../class_list.html">
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
56
|
+
</a>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div id="content"><h1>Class: Pueri::DoseCalc
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
<dl>
|
70
|
+
<dt>Inherits:</dt>
|
71
|
+
<dd>
|
72
|
+
<span class="inheritName">Object</span>
|
73
|
+
|
74
|
+
<ul class="fullTree">
|
75
|
+
<li>Object</li>
|
76
|
+
|
77
|
+
<li class="next">Pueri::DoseCalc</li>
|
78
|
+
|
79
|
+
</ul>
|
80
|
+
<a href="#" class="inheritanceTree">show all</a>
|
81
|
+
|
82
|
+
</dd>
|
83
|
+
</dl>
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
<dl>
|
96
|
+
<dt>Defined in:</dt>
|
97
|
+
<dd>lib/pueri/dosecalc.rb</dd>
|
98
|
+
</dl>
|
99
|
+
|
100
|
+
</div>
|
101
|
+
|
102
|
+
<h2>Overview</h2><div class="docstring">
|
103
|
+
<div class="discussion">
|
104
|
+
|
105
|
+
<p>Calculates the prescription of a given medication given the weight of the
|
106
|
+
pacient, the dose-per-weight-day, the concentration of the medication's
|
107
|
+
presentation and the periodicity of takes in hours.</p>
|
108
|
+
|
109
|
+
|
110
|
+
</div>
|
111
|
+
</div>
|
112
|
+
<div class="tags">
|
113
|
+
|
114
|
+
|
115
|
+
</div>
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
120
|
+
<ul class="summary">
|
121
|
+
|
122
|
+
<li class="public ">
|
123
|
+
<span class="summary_signature">
|
124
|
+
|
125
|
+
<a href="#conc_unit-instance_method" title="#conc_unit (instance method)">#<strong>conc_unit</strong> ⇒ Object </a>
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
</span>
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
<span class="summary_desc"><div class='inline'>
|
143
|
+
<p>Returns the value of attribute conc_unit.</p>
|
144
|
+
</div></span>
|
145
|
+
|
146
|
+
</li>
|
147
|
+
|
148
|
+
|
149
|
+
<li class="public ">
|
150
|
+
<span class="summary_signature">
|
151
|
+
|
152
|
+
<a href="#concentration-instance_method" title="#concentration (instance method)">#<strong>concentration</strong> ⇒ Object </a>
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
</span>
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
<span class="note title readonly">readonly</span>
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
<span class="summary_desc"><div class='inline'>
|
172
|
+
<p>Returns the value of attribute concentration.</p>
|
173
|
+
</div></span>
|
174
|
+
|
175
|
+
</li>
|
176
|
+
|
177
|
+
|
178
|
+
<li class="public ">
|
179
|
+
<span class="summary_signature">
|
180
|
+
|
181
|
+
<a href="#days-instance_method" title="#days (instance method)">#<strong>days</strong> ⇒ Object </a>
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
</span>
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
<span class="note title readonly">readonly</span>
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
<span class="summary_desc"><div class='inline'>
|
201
|
+
<p>Returns the value of attribute days.</p>
|
202
|
+
</div></span>
|
203
|
+
|
204
|
+
</li>
|
205
|
+
|
206
|
+
|
207
|
+
<li class="public ">
|
208
|
+
<span class="summary_signature">
|
209
|
+
|
210
|
+
<a href="#dose-instance_method" title="#dose (instance method)">#<strong>dose</strong> ⇒ Object </a>
|
211
|
+
|
212
|
+
|
213
|
+
|
214
|
+
</span>
|
215
|
+
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
<span class="note title readonly">readonly</span>
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
<span class="summary_desc"><div class='inline'>
|
230
|
+
<p>Returns the value of attribute dose.</p>
|
231
|
+
</div></span>
|
232
|
+
|
233
|
+
</li>
|
234
|
+
|
235
|
+
|
236
|
+
<li class="public ">
|
237
|
+
<span class="summary_signature">
|
238
|
+
|
239
|
+
<a href="#dose_unit-instance_method" title="#dose_unit (instance method)">#<strong>dose_unit</strong> ⇒ Object </a>
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
</span>
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
<span class="summary_desc"><div class='inline'>
|
257
|
+
<p>Returns the value of attribute dose_unit.</p>
|
258
|
+
</div></span>
|
259
|
+
|
260
|
+
</li>
|
261
|
+
|
262
|
+
|
263
|
+
<li class="public ">
|
264
|
+
<span class="summary_signature">
|
265
|
+
|
266
|
+
<a href="#name-instance_method" title="#name (instance method)">#<strong>name</strong> ⇒ Object </a>
|
267
|
+
|
268
|
+
|
269
|
+
|
270
|
+
</span>
|
271
|
+
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
<span class="note title readonly">readonly</span>
|
276
|
+
|
277
|
+
|
278
|
+
|
279
|
+
|
280
|
+
|
281
|
+
|
282
|
+
|
283
|
+
|
284
|
+
|
285
|
+
<span class="summary_desc"><div class='inline'>
|
286
|
+
<p>Returns the value of attribute name.</p>
|
287
|
+
</div></span>
|
288
|
+
|
289
|
+
</li>
|
290
|
+
|
291
|
+
|
292
|
+
<li class="public ">
|
293
|
+
<span class="summary_signature">
|
294
|
+
|
295
|
+
<a href="#result-instance_method" title="#result (instance method)">#<strong>result</strong> ⇒ Object </a>
|
296
|
+
|
297
|
+
|
298
|
+
|
299
|
+
</span>
|
300
|
+
|
301
|
+
|
302
|
+
|
303
|
+
|
304
|
+
<span class="note title readonly">readonly</span>
|
305
|
+
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
|
310
|
+
|
311
|
+
|
312
|
+
|
313
|
+
|
314
|
+
<span class="summary_desc"><div class='inline'>
|
315
|
+
<p>Returns the value of attribute result.</p>
|
316
|
+
</div></span>
|
317
|
+
|
318
|
+
</li>
|
319
|
+
|
320
|
+
|
321
|
+
<li class="public ">
|
322
|
+
<span class="summary_signature">
|
323
|
+
|
324
|
+
<a href="#time-instance_method" title="#time (instance method)">#<strong>time</strong> ⇒ Object </a>
|
325
|
+
|
326
|
+
|
327
|
+
|
328
|
+
</span>
|
329
|
+
|
330
|
+
|
331
|
+
|
332
|
+
|
333
|
+
<span class="note title readonly">readonly</span>
|
334
|
+
|
335
|
+
|
336
|
+
|
337
|
+
|
338
|
+
|
339
|
+
|
340
|
+
|
341
|
+
|
342
|
+
|
343
|
+
<span class="summary_desc"><div class='inline'>
|
344
|
+
<p>Returns the value of attribute time.</p>
|
345
|
+
</div></span>
|
346
|
+
|
347
|
+
</li>
|
348
|
+
|
349
|
+
|
350
|
+
<li class="public ">
|
351
|
+
<span class="summary_signature">
|
352
|
+
|
353
|
+
<a href="#weight-instance_method" title="#weight (instance method)">#<strong>weight</strong> ⇒ Object </a>
|
354
|
+
|
355
|
+
|
356
|
+
|
357
|
+
</span>
|
358
|
+
|
359
|
+
|
360
|
+
|
361
|
+
|
362
|
+
<span class="note title readonly">readonly</span>
|
363
|
+
|
364
|
+
|
365
|
+
|
366
|
+
|
367
|
+
|
368
|
+
|
369
|
+
|
370
|
+
|
371
|
+
|
372
|
+
<span class="summary_desc"><div class='inline'>
|
373
|
+
<p>Returns the value of attribute weight.</p>
|
374
|
+
</div></span>
|
375
|
+
|
376
|
+
</li>
|
377
|
+
|
378
|
+
|
379
|
+
</ul>
|
380
|
+
|
381
|
+
|
382
|
+
|
383
|
+
|
384
|
+
|
385
|
+
<h2>
|
386
|
+
Instance Method Summary
|
387
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
388
|
+
</h2>
|
389
|
+
|
390
|
+
<ul class="summary">
|
391
|
+
|
392
|
+
<li class="public ">
|
393
|
+
<span class="summary_signature">
|
394
|
+
|
395
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(params) ⇒ DoseCalc </a>
|
396
|
+
|
397
|
+
|
398
|
+
|
399
|
+
</span>
|
400
|
+
|
401
|
+
|
402
|
+
<span class="note title constructor">constructor</span>
|
403
|
+
|
404
|
+
|
405
|
+
|
406
|
+
|
407
|
+
|
408
|
+
|
409
|
+
|
410
|
+
|
411
|
+
<span class="summary_desc"><div class='inline'>
|
412
|
+
<p>Calculate the dosage for each taking of a given medicine.</p>
|
413
|
+
</div></span>
|
414
|
+
|
415
|
+
</li>
|
416
|
+
|
417
|
+
|
418
|
+
<li class="public ">
|
419
|
+
<span class="summary_signature">
|
420
|
+
|
421
|
+
<a href="#to_f-instance_method" title="#to_f (instance method)">#<strong>to_f</strong> ⇒ Float </a>
|
422
|
+
|
423
|
+
|
424
|
+
|
425
|
+
</span>
|
426
|
+
|
427
|
+
|
428
|
+
|
429
|
+
|
430
|
+
|
431
|
+
|
432
|
+
|
433
|
+
|
434
|
+
|
435
|
+
<span class="summary_desc"><div class='inline'>
|
436
|
+
<p>Outputs the calculated dosage for each taking.</p>
|
437
|
+
</div></span>
|
438
|
+
|
439
|
+
</li>
|
440
|
+
|
441
|
+
|
442
|
+
<li class="public ">
|
443
|
+
<span class="summary_signature">
|
444
|
+
|
445
|
+
<a href="#to_s-instance_method" title="#to_s (instance method)">#<strong>to_s</strong> ⇒ String </a>
|
446
|
+
|
447
|
+
|
448
|
+
|
449
|
+
</span>
|
450
|
+
|
451
|
+
|
452
|
+
|
453
|
+
|
454
|
+
|
455
|
+
|
456
|
+
|
457
|
+
|
458
|
+
|
459
|
+
<span class="summary_desc"><div class='inline'>
|
460
|
+
<p>Outputs the calculated dosage into a prescription string.</p>
|
461
|
+
</div></span>
|
462
|
+
|
463
|
+
</li>
|
464
|
+
|
465
|
+
|
466
|
+
</ul>
|
467
|
+
|
468
|
+
|
469
|
+
<div id="constructor_details" class="method_details_list">
|
470
|
+
<h2>Constructor Details</h2>
|
471
|
+
|
472
|
+
<div class="method_details first">
|
473
|
+
<h3 class="signature first" id="initialize-instance_method">
|
474
|
+
|
475
|
+
#<strong>initialize</strong>(params) ⇒ <tt><span class='object_link'><a href="" title="Pueri::DoseCalc (class)">DoseCalc</a></span></tt>
|
476
|
+
|
477
|
+
|
478
|
+
|
479
|
+
|
480
|
+
|
481
|
+
</h3><div class="docstring">
|
482
|
+
<div class="discussion">
|
483
|
+
|
484
|
+
<p>Calculate the dosage for each taking of a given medicine.</p>
|
485
|
+
|
486
|
+
|
487
|
+
</div>
|
488
|
+
</div>
|
489
|
+
<div class="tags">
|
490
|
+
<p class="tag_title">Parameters:</p>
|
491
|
+
<ul class="param">
|
492
|
+
|
493
|
+
<li>
|
494
|
+
|
495
|
+
<span class='name'>params</span>
|
496
|
+
|
497
|
+
|
498
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
499
|
+
|
500
|
+
|
501
|
+
|
502
|
+
—
|
503
|
+
<div class='inline'>
|
504
|
+
<p>A Hash of elements, all of which are required to properly calculate and
|
505
|
+
output the final dosage-per-taking:</p>
|
506
|
+
<dl class="rdoc-list label-list"><dt><code>:weight</code>
|
507
|
+
<dd>
|
508
|
+
<p>The weight of the pacient, in <em>kilograms</em>.</p>
|
509
|
+
</dd><dt><code>:dose</code>
|
510
|
+
<dd>
|
511
|
+
<p>The dose for the pacient, in <em>unit/kg/day</em>.</p>
|
512
|
+
</dd><dt><code>:time</code>
|
513
|
+
<dd>
|
514
|
+
<p>The time between takings, in hours.</p>
|
515
|
+
</dd><dt><code>:days</code>
|
516
|
+
<dd>
|
517
|
+
<p>The number of days to take the medication.</p>
|
518
|
+
</dd><dt><code>:concentration</code>
|
519
|
+
<dd>
|
520
|
+
<p>The posologic concentration, number only.</p>
|
521
|
+
</dd><dt><code>:dose_unit</code>
|
522
|
+
<dd>
|
523
|
+
<p>The unit of dosage for the pacient (<em>e.g.</em> mg/kg/d).</p>
|
524
|
+
</dd><dt><code>:conc_unit</code>
|
525
|
+
<dd>
|
526
|
+
<p>The unit of concentration (<em>e.g.</em> mg/mL, mcg/pill).</p>
|
527
|
+
</dd><dt><code>:name</code>
|
528
|
+
<dd>
|
529
|
+
<p>The name of the medication.</p>
|
530
|
+
</dd></dl>
|
531
|
+
</div>
|
532
|
+
|
533
|
+
</li>
|
534
|
+
|
535
|
+
</ul>
|
536
|
+
|
537
|
+
|
538
|
+
</div><table class="source_code">
|
539
|
+
<tr>
|
540
|
+
<td>
|
541
|
+
<pre class="lines">
|
542
|
+
|
543
|
+
|
544
|
+
23
|
545
|
+
24
|
546
|
+
25
|
547
|
+
26</pre>
|
548
|
+
</td>
|
549
|
+
<td>
|
550
|
+
<pre class="code"><span class="info file"># File 'lib/pueri/dosecalc.rb', line 23</span>
|
551
|
+
|
552
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span>
|
553
|
+
<span class='id identifier rubyid_init_vars'>init_vars</span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span>
|
554
|
+
<span class='ivar'>@result</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='lparen'>(</span><span class='ivar'>@weight</span> <span class='op'>*</span> <span class='ivar'>@dose</span> <span class='op'>*</span> <span class='ivar'>@time</span><span class='rparen'>)</span> <span class='op'>/</span> <span class='lparen'>(</span><span class='float'>24.0</span> <span class='op'>*</span> <span class='ivar'>@concentration</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_round'>round</span><span class='lparen'>(</span><span class='int'>3</span><span class='rparen'>)</span>
|
555
|
+
<span class='kw'>end</span></pre>
|
556
|
+
</td>
|
557
|
+
</tr>
|
558
|
+
</table>
|
559
|
+
</div>
|
560
|
+
|
561
|
+
</div>
|
562
|
+
|
563
|
+
<div id="instance_attr_details" class="attr_details">
|
564
|
+
<h2>Instance Attribute Details</h2>
|
565
|
+
|
566
|
+
|
567
|
+
<span id="conc_unit=-instance_method"></span>
|
568
|
+
<div class="method_details first">
|
569
|
+
<h3 class="signature first" id="conc_unit-instance_method">
|
570
|
+
|
571
|
+
#<strong>conc_unit</strong> ⇒ <tt>Object</tt>
|
572
|
+
|
573
|
+
|
574
|
+
|
575
|
+
|
576
|
+
|
577
|
+
</h3><div class="docstring">
|
578
|
+
<div class="discussion">
|
579
|
+
|
580
|
+
<p>Returns the value of attribute conc_unit</p>
|
581
|
+
|
582
|
+
|
583
|
+
</div>
|
584
|
+
</div>
|
585
|
+
<div class="tags">
|
586
|
+
|
587
|
+
|
588
|
+
</div><table class="source_code">
|
589
|
+
<tr>
|
590
|
+
<td>
|
591
|
+
<pre class="lines">
|
592
|
+
|
593
|
+
|
594
|
+
9
|
595
|
+
10
|
596
|
+
11</pre>
|
597
|
+
</td>
|
598
|
+
<td>
|
599
|
+
<pre class="code"><span class="info file"># File 'lib/pueri/dosecalc.rb', line 9</span>
|
600
|
+
|
601
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_conc_unit'>conc_unit</span>
|
602
|
+
<span class='ivar'>@conc_unit</span>
|
603
|
+
<span class='kw'>end</span></pre>
|
604
|
+
</td>
|
605
|
+
</tr>
|
606
|
+
</table>
|
607
|
+
</div>
|
608
|
+
|
609
|
+
|
610
|
+
<span id=""></span>
|
611
|
+
<div class="method_details ">
|
612
|
+
<h3 class="signature " id="concentration-instance_method">
|
613
|
+
|
614
|
+
#<strong>concentration</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
615
|
+
|
616
|
+
|
617
|
+
|
618
|
+
|
619
|
+
|
620
|
+
</h3><div class="docstring">
|
621
|
+
<div class="discussion">
|
622
|
+
|
623
|
+
<p>Returns the value of attribute concentration</p>
|
624
|
+
|
625
|
+
|
626
|
+
</div>
|
627
|
+
</div>
|
628
|
+
<div class="tags">
|
629
|
+
|
630
|
+
|
631
|
+
</div><table class="source_code">
|
632
|
+
<tr>
|
633
|
+
<td>
|
634
|
+
<pre class="lines">
|
635
|
+
|
636
|
+
|
637
|
+
8
|
638
|
+
9
|
639
|
+
10</pre>
|
640
|
+
</td>
|
641
|
+
<td>
|
642
|
+
<pre class="code"><span class="info file"># File 'lib/pueri/dosecalc.rb', line 8</span>
|
643
|
+
|
644
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_concentration'>concentration</span>
|
645
|
+
<span class='ivar'>@concentration</span>
|
646
|
+
<span class='kw'>end</span></pre>
|
647
|
+
</td>
|
648
|
+
</tr>
|
649
|
+
</table>
|
650
|
+
</div>
|
651
|
+
|
652
|
+
|
653
|
+
<span id=""></span>
|
654
|
+
<div class="method_details ">
|
655
|
+
<h3 class="signature " id="days-instance_method">
|
656
|
+
|
657
|
+
#<strong>days</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
658
|
+
|
659
|
+
|
660
|
+
|
661
|
+
|
662
|
+
|
663
|
+
</h3><div class="docstring">
|
664
|
+
<div class="discussion">
|
665
|
+
|
666
|
+
<p>Returns the value of attribute days</p>
|
667
|
+
|
668
|
+
|
669
|
+
</div>
|
670
|
+
</div>
|
671
|
+
<div class="tags">
|
672
|
+
|
673
|
+
|
674
|
+
</div><table class="source_code">
|
675
|
+
<tr>
|
676
|
+
<td>
|
677
|
+
<pre class="lines">
|
678
|
+
|
679
|
+
|
680
|
+
8
|
681
|
+
9
|
682
|
+
10</pre>
|
683
|
+
</td>
|
684
|
+
<td>
|
685
|
+
<pre class="code"><span class="info file"># File 'lib/pueri/dosecalc.rb', line 8</span>
|
686
|
+
|
687
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_days'>days</span>
|
688
|
+
<span class='ivar'>@days</span>
|
689
|
+
<span class='kw'>end</span></pre>
|
690
|
+
</td>
|
691
|
+
</tr>
|
692
|
+
</table>
|
693
|
+
</div>
|
694
|
+
|
695
|
+
|
696
|
+
<span id=""></span>
|
697
|
+
<div class="method_details ">
|
698
|
+
<h3 class="signature " id="dose-instance_method">
|
699
|
+
|
700
|
+
#<strong>dose</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
701
|
+
|
702
|
+
|
703
|
+
|
704
|
+
|
705
|
+
|
706
|
+
</h3><div class="docstring">
|
707
|
+
<div class="discussion">
|
708
|
+
|
709
|
+
<p>Returns the value of attribute dose</p>
|
710
|
+
|
711
|
+
|
712
|
+
</div>
|
713
|
+
</div>
|
714
|
+
<div class="tags">
|
715
|
+
|
716
|
+
|
717
|
+
</div><table class="source_code">
|
718
|
+
<tr>
|
719
|
+
<td>
|
720
|
+
<pre class="lines">
|
721
|
+
|
722
|
+
|
723
|
+
8
|
724
|
+
9
|
725
|
+
10</pre>
|
726
|
+
</td>
|
727
|
+
<td>
|
728
|
+
<pre class="code"><span class="info file"># File 'lib/pueri/dosecalc.rb', line 8</span>
|
729
|
+
|
730
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_dose'>dose</span>
|
731
|
+
<span class='ivar'>@dose</span>
|
732
|
+
<span class='kw'>end</span></pre>
|
733
|
+
</td>
|
734
|
+
</tr>
|
735
|
+
</table>
|
736
|
+
</div>
|
737
|
+
|
738
|
+
|
739
|
+
<span id="dose_unit=-instance_method"></span>
|
740
|
+
<div class="method_details ">
|
741
|
+
<h3 class="signature " id="dose_unit-instance_method">
|
742
|
+
|
743
|
+
#<strong>dose_unit</strong> ⇒ <tt>Object</tt>
|
744
|
+
|
745
|
+
|
746
|
+
|
747
|
+
|
748
|
+
|
749
|
+
</h3><div class="docstring">
|
750
|
+
<div class="discussion">
|
751
|
+
|
752
|
+
<p>Returns the value of attribute dose_unit</p>
|
753
|
+
|
754
|
+
|
755
|
+
</div>
|
756
|
+
</div>
|
757
|
+
<div class="tags">
|
758
|
+
|
759
|
+
|
760
|
+
</div><table class="source_code">
|
761
|
+
<tr>
|
762
|
+
<td>
|
763
|
+
<pre class="lines">
|
764
|
+
|
765
|
+
|
766
|
+
9
|
767
|
+
10
|
768
|
+
11</pre>
|
769
|
+
</td>
|
770
|
+
<td>
|
771
|
+
<pre class="code"><span class="info file"># File 'lib/pueri/dosecalc.rb', line 9</span>
|
772
|
+
|
773
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_dose_unit'>dose_unit</span>
|
774
|
+
<span class='ivar'>@dose_unit</span>
|
775
|
+
<span class='kw'>end</span></pre>
|
776
|
+
</td>
|
777
|
+
</tr>
|
778
|
+
</table>
|
779
|
+
</div>
|
780
|
+
|
781
|
+
|
782
|
+
<span id=""></span>
|
783
|
+
<div class="method_details ">
|
784
|
+
<h3 class="signature " id="name-instance_method">
|
785
|
+
|
786
|
+
#<strong>name</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
787
|
+
|
788
|
+
|
789
|
+
|
790
|
+
|
791
|
+
|
792
|
+
</h3><div class="docstring">
|
793
|
+
<div class="discussion">
|
794
|
+
|
795
|
+
<p>Returns the value of attribute name</p>
|
796
|
+
|
797
|
+
|
798
|
+
</div>
|
799
|
+
</div>
|
800
|
+
<div class="tags">
|
801
|
+
|
802
|
+
|
803
|
+
</div><table class="source_code">
|
804
|
+
<tr>
|
805
|
+
<td>
|
806
|
+
<pre class="lines">
|
807
|
+
|
808
|
+
|
809
|
+
8
|
810
|
+
9
|
811
|
+
10</pre>
|
812
|
+
</td>
|
813
|
+
<td>
|
814
|
+
<pre class="code"><span class="info file"># File 'lib/pueri/dosecalc.rb', line 8</span>
|
815
|
+
|
816
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_name'>name</span>
|
817
|
+
<span class='ivar'>@name</span>
|
818
|
+
<span class='kw'>end</span></pre>
|
819
|
+
</td>
|
820
|
+
</tr>
|
821
|
+
</table>
|
822
|
+
</div>
|
823
|
+
|
824
|
+
|
825
|
+
<span id=""></span>
|
826
|
+
<div class="method_details ">
|
827
|
+
<h3 class="signature " id="result-instance_method">
|
828
|
+
|
829
|
+
#<strong>result</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
830
|
+
|
831
|
+
|
832
|
+
|
833
|
+
|
834
|
+
|
835
|
+
</h3><div class="docstring">
|
836
|
+
<div class="discussion">
|
837
|
+
|
838
|
+
<p>Returns the value of attribute result</p>
|
839
|
+
|
840
|
+
|
841
|
+
</div>
|
842
|
+
</div>
|
843
|
+
<div class="tags">
|
844
|
+
|
845
|
+
|
846
|
+
</div><table class="source_code">
|
847
|
+
<tr>
|
848
|
+
<td>
|
849
|
+
<pre class="lines">
|
850
|
+
|
851
|
+
|
852
|
+
8
|
853
|
+
9
|
854
|
+
10</pre>
|
855
|
+
</td>
|
856
|
+
<td>
|
857
|
+
<pre class="code"><span class="info file"># File 'lib/pueri/dosecalc.rb', line 8</span>
|
858
|
+
|
859
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_result'>result</span>
|
860
|
+
<span class='ivar'>@result</span>
|
861
|
+
<span class='kw'>end</span></pre>
|
862
|
+
</td>
|
863
|
+
</tr>
|
864
|
+
</table>
|
865
|
+
</div>
|
866
|
+
|
867
|
+
|
868
|
+
<span id=""></span>
|
869
|
+
<div class="method_details ">
|
870
|
+
<h3 class="signature " id="time-instance_method">
|
871
|
+
|
872
|
+
#<strong>time</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
873
|
+
|
874
|
+
|
875
|
+
|
876
|
+
|
877
|
+
|
878
|
+
</h3><div class="docstring">
|
879
|
+
<div class="discussion">
|
880
|
+
|
881
|
+
<p>Returns the value of attribute time</p>
|
882
|
+
|
883
|
+
|
884
|
+
</div>
|
885
|
+
</div>
|
886
|
+
<div class="tags">
|
887
|
+
|
888
|
+
|
889
|
+
</div><table class="source_code">
|
890
|
+
<tr>
|
891
|
+
<td>
|
892
|
+
<pre class="lines">
|
893
|
+
|
894
|
+
|
895
|
+
8
|
896
|
+
9
|
897
|
+
10</pre>
|
898
|
+
</td>
|
899
|
+
<td>
|
900
|
+
<pre class="code"><span class="info file"># File 'lib/pueri/dosecalc.rb', line 8</span>
|
901
|
+
|
902
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_time'>time</span>
|
903
|
+
<span class='ivar'>@time</span>
|
904
|
+
<span class='kw'>end</span></pre>
|
905
|
+
</td>
|
906
|
+
</tr>
|
907
|
+
</table>
|
908
|
+
</div>
|
909
|
+
|
910
|
+
|
911
|
+
<span id=""></span>
|
912
|
+
<div class="method_details ">
|
913
|
+
<h3 class="signature " id="weight-instance_method">
|
914
|
+
|
915
|
+
#<strong>weight</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
916
|
+
|
917
|
+
|
918
|
+
|
919
|
+
|
920
|
+
|
921
|
+
</h3><div class="docstring">
|
922
|
+
<div class="discussion">
|
923
|
+
|
924
|
+
<p>Returns the value of attribute weight</p>
|
925
|
+
|
926
|
+
|
927
|
+
</div>
|
928
|
+
</div>
|
929
|
+
<div class="tags">
|
930
|
+
|
931
|
+
|
932
|
+
</div><table class="source_code">
|
933
|
+
<tr>
|
934
|
+
<td>
|
935
|
+
<pre class="lines">
|
936
|
+
|
937
|
+
|
938
|
+
8
|
939
|
+
9
|
940
|
+
10</pre>
|
941
|
+
</td>
|
942
|
+
<td>
|
943
|
+
<pre class="code"><span class="info file"># File 'lib/pueri/dosecalc.rb', line 8</span>
|
944
|
+
|
945
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_weight'>weight</span>
|
946
|
+
<span class='ivar'>@weight</span>
|
947
|
+
<span class='kw'>end</span></pre>
|
948
|
+
</td>
|
949
|
+
</tr>
|
950
|
+
</table>
|
951
|
+
</div>
|
952
|
+
|
953
|
+
</div>
|
954
|
+
|
955
|
+
|
956
|
+
<div id="instance_method_details" class="method_details_list">
|
957
|
+
<h2>Instance Method Details</h2>
|
958
|
+
|
959
|
+
|
960
|
+
<div class="method_details first">
|
961
|
+
<h3 class="signature first" id="to_f-instance_method">
|
962
|
+
|
963
|
+
#<strong>to_f</strong> ⇒ <tt>Float</tt>
|
964
|
+
|
965
|
+
|
966
|
+
|
967
|
+
|
968
|
+
|
969
|
+
</h3><div class="docstring">
|
970
|
+
<div class="discussion">
|
971
|
+
|
972
|
+
<p>Outputs the calculated dosage for each taking. <em>E.g.</em>
|
973
|
+
<code>3.7</code>, as in _use 3.7 units of medication each time_.</p>
|
974
|
+
|
975
|
+
|
976
|
+
</div>
|
977
|
+
</div>
|
978
|
+
<div class="tags">
|
979
|
+
|
980
|
+
<p class="tag_title">Returns:</p>
|
981
|
+
<ul class="return">
|
982
|
+
|
983
|
+
<li>
|
984
|
+
|
985
|
+
|
986
|
+
<span class='type'>(<tt>Float</tt>)</span>
|
987
|
+
|
988
|
+
|
989
|
+
|
990
|
+
—
|
991
|
+
<div class='inline'>
|
992
|
+
<p>The dosage to be used each time one takes the medication.</p>
|
993
|
+
</div>
|
994
|
+
|
995
|
+
</li>
|
996
|
+
|
997
|
+
</ul>
|
998
|
+
|
999
|
+
</div><table class="source_code">
|
1000
|
+
<tr>
|
1001
|
+
<td>
|
1002
|
+
<pre class="lines">
|
1003
|
+
|
1004
|
+
|
1005
|
+
42
|
1006
|
+
43
|
1007
|
+
44</pre>
|
1008
|
+
</td>
|
1009
|
+
<td>
|
1010
|
+
<pre class="code"><span class="info file"># File 'lib/pueri/dosecalc.rb', line 42</span>
|
1011
|
+
|
1012
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_to_f'>to_f</span>
|
1013
|
+
<span class='ivar'>@result</span>
|
1014
|
+
<span class='kw'>end</span></pre>
|
1015
|
+
</td>
|
1016
|
+
</tr>
|
1017
|
+
</table>
|
1018
|
+
</div>
|
1019
|
+
|
1020
|
+
<div class="method_details ">
|
1021
|
+
<h3 class="signature " id="to_s-instance_method">
|
1022
|
+
|
1023
|
+
#<strong>to_s</strong> ⇒ <tt>String</tt>
|
1024
|
+
|
1025
|
+
|
1026
|
+
|
1027
|
+
|
1028
|
+
|
1029
|
+
</h3><div class="docstring">
|
1030
|
+
<div class="discussion">
|
1031
|
+
|
1032
|
+
<p>Outputs the calculated dosage into a prescription string.</p>
|
1033
|
+
|
1034
|
+
|
1035
|
+
</div>
|
1036
|
+
</div>
|
1037
|
+
<div class="tags">
|
1038
|
+
|
1039
|
+
<p class="tag_title">Returns:</p>
|
1040
|
+
<ul class="return">
|
1041
|
+
|
1042
|
+
<li>
|
1043
|
+
|
1044
|
+
|
1045
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1046
|
+
|
1047
|
+
|
1048
|
+
|
1049
|
+
—
|
1050
|
+
<div class='inline'>
|
1051
|
+
<p>The prescription string.</p>
|
1052
|
+
</div>
|
1053
|
+
|
1054
|
+
</li>
|
1055
|
+
|
1056
|
+
</ul>
|
1057
|
+
|
1058
|
+
</div><table class="source_code">
|
1059
|
+
<tr>
|
1060
|
+
<td>
|
1061
|
+
<pre class="lines">
|
1062
|
+
|
1063
|
+
|
1064
|
+
31
|
1065
|
+
32
|
1066
|
+
33
|
1067
|
+
34
|
1068
|
+
35
|
1069
|
+
36</pre>
|
1070
|
+
</td>
|
1071
|
+
<td>
|
1072
|
+
<pre class="code"><span class="info file"># File 'lib/pueri/dosecalc.rb', line 31</span>
|
1073
|
+
|
1074
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_to_s'>to_s</span>
|
1075
|
+
<span class='lbracket'>[</span>
|
1076
|
+
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>- </span><span class='embexpr_beg'>#{</span><span class='ivar'>@name</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='ivar'>@concentration</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span><span class='embexpr_end'>}</span><span class='embexpr_beg'>#{</span><span class='ivar'>@conc_unit</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/</span><span class='tstring_end'>'</span></span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='comma'>,</span>
|
1077
|
+
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Tomar </span><span class='embexpr_beg'>#{</span><span class='ivar'>@result</span><span class='embexpr_end'>}</span><span class='embexpr_beg'>#{</span><span class='ivar'>@conc_unit</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_time_to_s'>time_to_s</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_days_to_s'>days_to_s</span><span class='embexpr_end'>}</span><span class='tstring_content'>.</span><span class='tstring_end'>"</span></span>
|
1078
|
+
<span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span>
|
1079
|
+
<span class='kw'>end</span></pre>
|
1080
|
+
</td>
|
1081
|
+
</tr>
|
1082
|
+
</table>
|
1083
|
+
</div>
|
1084
|
+
|
1085
|
+
</div>
|
1086
|
+
|
1087
|
+
</div>
|
1088
|
+
|
1089
|
+
<div id="footer">
|
1090
|
+
Generated on Mon Oct 28 17:34:32 2019 by
|
1091
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1092
|
+
0.9.20 (ruby-2.5.5).
|
1093
|
+
</div>
|
1094
|
+
|
1095
|
+
</div>
|
1096
|
+
</body>
|
1097
|
+
</html>
|