renalware-core 2.0.12 → 2.0.13

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: c7c6d5676c20af6cae4347f70aab29e6f156d4280ab6d650c6e13633178cb128
4
- data.tar.gz: ffaebb9b45c7820ae5a711ab2e203093a05d179268ca7240c50605db69fc96e3
3
+ metadata.gz: f58372406094a085ea5fd1ffe9a57724951450eb6db8adf1b2513513800479f3
4
+ data.tar.gz: c7a49293b5baf36736b8dc90695721328b57b6402243b9970e352859d233948b
5
5
  SHA512:
6
- metadata.gz: 58f4bda8f4695d56e1c63be933ee5c7a0fa9cb70a177ea539ae6d6256a6191482687a18303eee0c85cf56eb44e688ed3ff1e45e43c4ae7d7b409eac8fe1933f4
7
- data.tar.gz: 121933949b237cdbfc7b3c3b9ea4e9f516f8d55394353d15a8e119a3202189b9c4130e4cb9e086b69628b109c43afe7fcb20c3c0b95ed4e636610a1f696fc9a5
6
+ metadata.gz: 3a92d4849645611cfc0fe10f06c27e38fbf7e75cf0c445751e94be9c978b04c217377064dd69bce6a0c817dfb085cf865d011fc8ed415ee8ea3a7f0ec2b2902d
7
+ data.tar.gz: ad1af0c79116b59c41068e0f0dec65ab81c00da7842ef9c6acf1be37616ec3a829499683f292da0f3b25dad252e6120ccce2c91d51d988512beef7fb0ee3bb10
@@ -3,6 +3,8 @@ module Renalware
3
3
  attribute :systolic, Integer
4
4
  attribute :diastolic, Integer
5
5
 
6
+ validates :systolic, numericality: { allow_blank: true }
7
+ validates :diastolic, numericality: { allow_blank: true }
6
8
  validates_with Renalware::Patients::BloodPressureValidator
7
9
 
8
10
  def to_s
@@ -33,6 +33,13 @@ module Renalware
33
33
  attribute :temperature_measured, Document::Enum, enums: %i(yes no), default: :yes
34
34
  attribute :bm_stix, Float
35
35
 
36
+ %i(
37
+ weight
38
+ temperature
39
+ bm_stix
40
+ pulse
41
+ ).each { |att| validates(att, numericality: { allow_blank: true }) }
42
+
36
43
  validates :weight, "renalware/patients/weight" => true
37
44
  validates :temperature, "renalware/patients/temperature" => true
38
45
  validates :bm_stix, "renalware/patients/bm_stix" => true
@@ -55,6 +62,16 @@ module Renalware
55
62
  (100..800).step(100)
56
63
  end
57
64
 
65
+ %i(
66
+ arterial_pressure
67
+ venous_pressure
68
+ fluid_removed
69
+ flow_rate
70
+ machine_urr
71
+ machine_ktv
72
+ litres_processed
73
+ ).each { |att| validates(att, numericality: { allow_blank: true }) }
74
+
58
75
  validates :machine_urr, inclusion: { in: 0..100, allow_blank: true }
59
76
  validates :machine_ktv, inclusion: { in: (0.2..3.5), allow_blank: true }
60
77
  validates :blood_flow, numericality: {
@@ -70,6 +87,13 @@ module Renalware
70
87
  attribute :subs_goal, Float
71
88
  attribute :subs_rate, Float
72
89
  attribute :subs_volume, Float
90
+
91
+ %i(
92
+ subs_fluid_pct
93
+ subs_goal
94
+ subs_rate
95
+ subs_volume
96
+ ).each { |att| validates(att, numericality: { allow_blank: true }) }
73
97
  end
74
98
  attribute :hdf, HDF
75
99
 
@@ -1,27 +1,9 @@
1
- dl.dl-horizontal
2
- / dt Name
3
- / dd= address.name
4
-
5
- dt Organisation Name
6
- dd= address.organisation_name
7
-
8
- dt Street 1
9
- dd= address.street_1
10
-
11
- dt Street 2
12
- dd= address.street_2
13
-
14
- dt Street 3
15
- dd= address.street_3
16
-
17
- dt Town
18
- dd= address.town
19
-
20
- dt County
21
- dd= address.county
22
-
23
- dt Postcode
24
- dd= address.postcode
25
-
26
- dt Country
27
- dd= address.country
1
+ = definition_list_for(address) do |list|
2
+ = list.definition(:organisation_name)
3
+ = list.definition(:street_1)
4
+ = list.definition(:street_2)
5
+ = list.definition(:street_3)
6
+ = list.definition(:town)
7
+ = list.definition(:county)
8
+ = list.definition(:postcode)
9
+ = list.definition(:country)
@@ -1,16 +1,6 @@
1
1
  - recently_changed = defined?(recently_changed) && recently_changed
2
2
 
3
3
  li.prescription class=("recently_changed" if recently_changed)
4
- - if recently_changed
5
- | *
6
- = blank_separator
7
-
8
- / We pass in date_changed if the prescription is recently_changed or recently_stopped
9
- / It could be the prescribed_on or terminated_on date
10
- - if defined?(date_changed)
11
- span.date-changed= l(date_changed)
12
- = blank_separator
13
-
14
4
  = prescription.drug.name
15
5
  = blank_separator
16
6
  = prescription.dose
@@ -18,3 +8,13 @@ li.prescription class=("recently_changed" if recently_changed)
18
8
  = prescription.medication_route.code
19
9
  = blank_separator
20
10
  = prescription.frequency
11
+
12
+ / We pass in date_changed if the prescription is recently_changed or recently_stopped
13
+ / It could be the prescribed_on or terminated_on date
14
+ - if defined?(date_changed)
15
+ = blank_separator
16
+ span.date-changed= l(date_changed)
17
+
18
+ - if recently_changed
19
+ = blank_separator
20
+ | *
@@ -4,10 +4,15 @@ article
4
4
 
5
5
  dl.dl-horizontal
6
6
  dt Email
7
- dd= patient.email
7
+ - if patient.email.present?
8
+ dd= patient.email
9
+ - if patient.current_address&.email.present?
10
+ dd= patient.current_address&.email
8
11
 
9
- dt Telephone1
10
- dd= patient.telephone1
11
-
12
- dt Telephone2
13
- dd= patient.telephone2
12
+ dt Telephone
13
+ - if patient.telephone1.present?
14
+ dd= patient.telephone1
15
+ - if patient.telephone2.present?
16
+ dd= patient.telephone2
17
+ - if patient.current_address&.telephone.present?
18
+ dd= patient.current_address&.telephone
@@ -4,12 +4,12 @@
4
4
  .small-5.medium-4.large-3.columns
5
5
  = fd.label :age, f.object.class.human_attribute_name(attribute), class: "right inline"
6
6
  .small-2.medium-1.columns
7
- = fd.input :systolic, as: :integer,
7
+ = fd.input :systolic,
8
8
  placeholder: "syst",
9
9
  error: false,
10
10
  label: false, wrapper: "vertical_form"
11
11
  .small-2.medium-1.columns.end
12
- = fd.input :diastolic, as: :integer,
12
+ = fd.input :diastolic,
13
13
  placeholder: "dias",
14
14
  error: false,
15
15
  label: false, wrapper: "vertical_form"
@@ -9,7 +9,7 @@ en:
9
9
  street_3: Line 3
10
10
  town: Town
11
11
  county: County
12
- postcode: Postal Code
12
+ postcode: Postcode
13
13
  country: Country
14
14
  telephone: Telephone
15
15
  email: Email
@@ -1,3 +1,3 @@
1
1
  module Renalware
2
- VERSION = "2.0.12".freeze
2
+ VERSION = "2.0.13".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: renalware-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.12
4
+ version: 2.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Airslie
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-29 00:00:00.000000000 Z
11
+ date: 2018-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails