test-patient-generator 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/tpg/generation/exporter.rb +7 -5
  2. metadata +8 -8
@@ -64,13 +64,15 @@ module TPG
64
64
  # @return A zip file containing all of the QRDA Category 1 patients that were passed in.
65
65
  def self.zip_qrda_cat_1_patients(measure_patients, measures)
66
66
  file = Tempfile.new("patients-#{Time.now.to_i}")
67
-
68
67
  Zip::ZipOutputStream.open(file.path) do |zip|
69
- measure_patients.each do |nqf_id, patient|
68
+ measure_patients.each do |nqf_id, patients|
70
69
  measure_defs = measures.find {|m| m.id == nqf_id}
71
- # Create a directory for this measure and insert the HTML for this patient.
72
- zip.put_next_entry(File.join(measure_defs.hqmf_id, "#{patient_filename(patient)}.xml"))
73
- zip << HealthDataStandards::Export::Cat1.new.export(patient, [measure_defs], Time.gm(2011, 1, 1), Time.gm(2011, 12, 31))
70
+ patients = [patients] unless patients.is_a? Array # we should be able to support multiple patients... however, the qrda patient generation just passes a single patient... lame.
71
+ patients.each do |patient|
72
+ # Create a directory for this measure and insert the HTML for this patient.
73
+ zip.put_next_entry(File.join(measure_defs.hqmf_id, "#{patient_filename(patient)}.xml"))
74
+ zip << HealthDataStandards::Export::Cat1.new.export(patient, [measure_defs], Time.gm(2011, 1, 1), Time.gm(2011, 12, 31))
75
+ end
74
76
  end
75
77
  end
76
78
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: test-patient-generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-02-27 00:00:00.000000000 Z
13
+ date: 2013-04-24 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: health-data-standards
@@ -19,7 +19,7 @@ dependencies:
19
19
  requirements:
20
20
  - - ~>
21
21
  - !ruby/object:Gem::Version
22
- version: 3.0.1
22
+ version: 3.1.1
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -27,7 +27,7 @@ dependencies:
27
27
  requirements:
28
28
  - - ~>
29
29
  - !ruby/object:Gem::Version
30
- version: 3.0.1
30
+ version: 3.1.1
31
31
  - !ruby/object:Gem::Dependency
32
32
  name: hquery-patient-api
33
33
  requirement: !ruby/object:Gem::Requirement
@@ -35,7 +35,7 @@ dependencies:
35
35
  requirements:
36
36
  - - ~>
37
37
  - !ruby/object:Gem::Version
38
- version: 1.0.1
38
+ version: 1.0.2
39
39
  type: :runtime
40
40
  prerelease: false
41
41
  version_requirements: !ruby/object:Gem::Requirement
@@ -43,7 +43,7 @@ dependencies:
43
43
  requirements:
44
44
  - - ~>
45
45
  - !ruby/object:Gem::Version
46
- version: 1.0.1
46
+ version: 1.0.2
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: hqmf2js
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -51,7 +51,7 @@ dependencies:
51
51
  requirements:
52
52
  - - ~>
53
53
  - !ruby/object:Gem::Version
54
- version: 1.2.0
54
+ version: 1.2.1
55
55
  type: :runtime
56
56
  prerelease: false
57
57
  version_requirements: !ruby/object:Gem::Requirement
@@ -59,7 +59,7 @@ dependencies:
59
59
  requirements:
60
60
  - - ~>
61
61
  - !ruby/object:Gem::Version
62
- version: 1.2.0
62
+ version: 1.2.1
63
63
  description: A utility to generate patients for unit testing clinical quality measure
64
64
  logic. The instructions for generation are guided by HQMF documents and exported
65
65
  into various health standards, e.g. C32, CCR.