renalware-core 2.0.86 → 2.0.87
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/app/models/renalware/ukrdc/create_encrypted_patient_xml_files.rb +1 -1
- data/app/models/renalware/zip_archive.rb +3 -1
- data/app/views/renalware/api/ukrdc/patients/_patient.xml.builder +9 -5
- data/lib/renalware/version.rb +1 -1
- data/spec/factories/patients/languages.rb +5 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6862e9a5b2b690ebc9b8a96c8202b0b08227d0f2bc0aea9633e9405301da3d62
|
4
|
+
data.tar.gz: e2537d376ecacc0a4905382a8abe12fbf79af6dff901479a51aadf004cc71114
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 /
|
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
|
-
|
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
|
-
|
15
|
-
xml.
|
16
|
-
|
17
|
-
|
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
|
-
|
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
|
data/lib/renalware/version.rb
CHANGED