renalware-core 2.0.96 → 2.0.97
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c98885002789bb45e0735e4787c6ad538a4a4e64bcbbe703b529fb445195ea96
|
4
|
+
data.tar.gz: bc8424ff0d1a27da38da277601e09cdaf3ee7dd8a702f3b0bd55f2aba979c9c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 77470703e0611ac6520c7a536468684e401dd5ce616585c6ab89510fe9f1b7bfb72638224b08524cf832e7e3e9ae7c70cd2c6dc2331a3a2f6232eb6e7b6dbb51
|
7
|
+
data.tar.gz: 8ceab1c007ff580e5b166f40b1768331229fd79945cabe483229cc6e8a12221b7c56ca9a0bdd23760b54f88afb75d84a6b12a4ab96ff14197f43353998d0bee0
|
@@ -17,13 +17,28 @@ module Renalware
|
|
17
17
|
def observation_requests
|
18
18
|
Pathology::ObservationRequest
|
19
19
|
.where(id: Pathology::ObservationRequest.distinct_for_patient_id(patient_id))
|
20
|
-
.where("requested_at >= ?",
|
20
|
+
.where("requested_at >= ?", effective_changes_since)
|
21
21
|
.where("loinc_code is not null")
|
22
22
|
.eager_load(
|
23
23
|
:description,
|
24
24
|
observations: { description: :measurement_unit }
|
25
25
|
)
|
26
26
|
end
|
27
|
+
|
28
|
+
# If there is a pathology_start_date configured in an ENV var, use this
|
29
|
+
# for fetching pathology. This allows us to send a one-off batch of patients
|
30
|
+
# with historical pathology. Most of the time this setting is not present, and
|
31
|
+
# default to using changes_since.
|
32
|
+
def effective_changes_since
|
33
|
+
configured_pathology_start_date || changes_since
|
34
|
+
end
|
35
|
+
|
36
|
+
def configured_pathology_start_date
|
37
|
+
start_date = Renalware.config.ukrdc_pathology_start_date
|
38
|
+
return if start_date.blank?
|
39
|
+
|
40
|
+
Date.parse(start_date)
|
41
|
+
end
|
27
42
|
end
|
28
43
|
end
|
29
44
|
end
|
@@ -67,7 +67,16 @@ module Renalware
|
|
67
67
|
end
|
68
68
|
config_accessor(:ukrdc_site_code) { ENV.fetch("UKRDC_PREFIX", "RJZ") }
|
69
69
|
|
70
|
-
#
|
70
|
+
# To use a date other that the default changes_since date when
|
71
|
+
# compiling pathology to send to UKRDC, you can set an ENV var as follows:
|
72
|
+
# UKRDC_PATHOLOGY_START_DATE=01-01-2011
|
73
|
+
# in the .env file (or e.g. .env.production) and we will always fetch pathology
|
74
|
+
# from this date on. It only affects pathology and not medications, letters etc.
|
75
|
+
# It is not indented to keep this date set, but its useful if UKRDC ask for
|
76
|
+
# a dump of historical pathology.
|
77
|
+
config_accessor(:ukrdc_pathology_start_date) { ENV["UKRDC_PATHOLOGY_START_DATE"] }
|
78
|
+
|
79
|
+
# We override this in some tests as a means of getting wicked_pdf to generate an HTML version
|
71
80
|
# of the PDF so we can examine its content
|
72
81
|
config_accessor(:render_pdf_as_html_for_debugging) { false }
|
73
82
|
|
data/lib/renalware/version.rb
CHANGED
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.
|
4
|
+
version: 2.0.97
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Airslie
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-08-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active_type
|