renalware-core 2.0.86 → 2.0.87

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: f0619a3c5a98002ec8281db110db2468f2fec1a263ebe187f4633bdeec2128ee
4
- data.tar.gz: a750c55b958f4f1d87248209e88d2b7b7e236a845cc572137568ada6b3d65b14
3
+ metadata.gz: 6862e9a5b2b690ebc9b8a96c8202b0b08227d0f2bc0aea9633e9405301da3d62
4
+ data.tar.gz: e2537d376ecacc0a4905382a8abe12fbf79af6dff901479a51aadf004cc71114
5
5
  SHA512:
6
- metadata.gz: a5a356a8c8090597b1a2b1ed972a1ebe908cf77a412bcd55c2a54a7e0b069838a8c4b4858bf62995e93e23d1d95a1123205b2e42e656254e9a5e6d130d22abd1
7
- data.tar.gz: 96719750e97f20df80adc68330d1a5a15c44519136411e60c8885fabddcd0e044e03a42a7bfa0ce7b7e9ab0bff9578c9bc1acf6434fe8e90598f550dea63608a
6
+ metadata.gz: 4d07603534caca499ceed69353afe2a694f39c8768286680e1773ba5ab0bd7b5f2e1122f9a91ee260f31521a94a01370cdd353e7d348c610862bad829d1af7e4
7
+ data.tar.gz: ffbb71aafaeda1f69c821f3ca00d5eb3ef7b22931b484fe7bcac80f33c6e082a393f1e35d7b7695854ddc8d41edf70ab4044115e6c660307b865f5ee1cfbb82e
@@ -8,7 +8,7 @@ module Renalware
8
8
  # Using a working folder with a timestamp name, find matching patients and for each, generate
9
9
  # an XML file (see UKRDC Schema) containing changes since the last time we sent the URDC data
10
10
  # about them. Encrypt the xml files and copy to an outgoing folder
11
- # which might for example be a symlink to an outgoing folder in /mmedia/ukrdc which in turn
11
+ # which might for example be a symlink to an outgoing folder in /media/ukrdc which in turn
12
12
  # is mount on a remote share for example on an SFTP server.
13
13
  #
14
14
  class CreateEncryptedPatientXMLFiles
@@ -9,7 +9,9 @@ module Renalware
9
9
  end
10
10
 
11
11
  def unzip
12
- Dir.mktmpdir(nil, Rails.root.join("tmp").to_s) do |dir|
12
+ # Create a tmp dir and ensure PG has access to it.
13
+ Dir.mktmpdir do |dir|
14
+ `chmod a+rX #{dir}`
13
15
  files = unzip_to_tmp_dir_and_return_pathames_array(dir)
14
16
  yield(files)
15
17
  end
@@ -11,11 +11,14 @@ path = "renalware/api/ukrdc/patients" # or "."
11
11
 
12
12
  xml.Patient do
13
13
  xml.PatientNumbers do
14
- xml.PatientNumber do
15
- xml.Number patient.nhs_number
16
- xml.Organization "NHS"
17
- xml.NumberType "NI"
14
+ if patient.nhs_number.present?
15
+ xml.PatientNumber do
16
+ xml.Number patient.nhs_number
17
+ xml.Organization "NHS"
18
+ xml.NumberType "NI"
19
+ end
18
20
  end
21
+
19
22
  Renalware.config.patient_hospital_identifiers.values.each do |field|
20
23
  next if (number = patient.public_send(field)).blank?
21
24
 
@@ -65,7 +68,8 @@ xml.Patient do
65
68
  end
66
69
  end
67
70
 
68
- if patient.language.present?
71
+ # Omit 'Other' language as it is not part of the ISO set, but we have it for some reason
72
+ if patient.language.present? && patient.language.code != "ot"
69
73
  xml.PrimaryLanguage do
70
74
  xml.CodingStandard "NHS_DATA_DICTIONARY_LANGUAGE_CODE" # ISO 639-1 plus braille and sign
71
75
  xml.Code patient.language&.code
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Renalware
4
- VERSION = "2.0.86"
4
+ VERSION = "2.0.87"
5
5
  end
@@ -19,5 +19,10 @@ FactoryBot.define do
19
19
  name { "Unknown" }
20
20
  code { "un" }
21
21
  end
22
+
23
+ trait :other do
24
+ name { "Other" }
25
+ code { "ot" }
26
+ end
22
27
  end
23
28
  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.86
4
+ version: 2.0.87
5
5
  platform: ruby
6
6
  authors:
7
7
  - Airslie