renalware-core 2.0.156 → 2.0.157

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8cf60bdb6d9f435ff8fe48ab880bc07df93a75895fdac04a454c98bc0ba6f5c9
4
- data.tar.gz: 247bf617e5fdff3002c8efb35b193747bcb43a82133955535544ebe52665337e
3
+ metadata.gz: 7752535c3cedc34c80615f02356cf882df7875e7c6331102db999f3530941b9f
4
+ data.tar.gz: 7ce5aa638ff0972fdb81be2f6ff5f988c913fba8d7895864e088727e13db6164
5
5
  SHA512:
6
- metadata.gz: 6205bb2b55102daac7631ad5500e5260998f0694ff4a0321e0be1550f09ea3679e1e99017caf998d7167e5bf2d20bbcb407887cfee5db0dc23da894a54fd0051
7
- data.tar.gz: f43f2db14c1af7c8791d708e89d7e315c8aa1a6f156d3e215db2aaa1d0a5ff92ab56a70f5d9694999acc331a83e0a2a325db8a4cbb4d0eba49661d0423146c71
6
+ metadata.gz: bbde270c7717349a2fce0abc4d3db70a7a07893914a3f2ab8b45f4d77927178c81bfa8983a5d58e1b779de7e0bf1974155507d8f8bb5578276409bc9c8b2d446
7
+ data.tar.gz: 86e5a36768fbaab56afa31d298f04f64000f9c71e59a1918e725e0d5aaa308db6528131b04ac80c2600dbbc56437cf6d08edb36e1c3266defa5a91c88360b8cc
@@ -5,7 +5,7 @@ class AddBMIToClinicVisits < ActiveRecord::Migration[5.2]
5
5
  :clinic_visits,
6
6
  :bmi,
7
7
  :decimal,
8
- precision: 4,
8
+ precision: 10,
9
9
  scale: 1,
10
10
  null: true,
11
11
  comment: "Body Mass Index calculated using a before_save when the clinic visit is updated"
@@ -13,10 +13,13 @@ class AddBMIToClinicVisits < ActiveRecord::Migration[5.2]
13
13
 
14
14
  reversible do |direction|
15
15
  direction.up do
16
+ # Update the bmi for existing clinic visits, but restrict to avoid generating a
17
+ # non-sense value in case height or weight were entered incorrectly.
18
+ # NB: height is in metres and weight in kg
16
19
  connection.execute(
17
20
  "update renalware.clinic_visits "\
18
21
  "set bmi = round(((weight / height)::decimal / height::decimal), 1) "\
19
- "where height > 0 and weight > 0;"
22
+ "where height > 0 and height < 3 and weight > 0 and weight < 500;"
20
23
  )
21
24
  end
22
25
  direction.down do
@@ -5,6 +5,6 @@ module Renalware
5
5
  # to creat that class even though its not used. If we don't do this zeitwerk
6
6
  # complains that version.rb does export a constant called Version.
7
7
  class VersionNumber
8
- VERSION = "2.0.156"
8
+ VERSION = "2.0.157"
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: renalware-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.156
4
+ version: 2.0.157
5
5
  platform: ruby
6
6
  authors:
7
7
  - Airslie