test-patient-generator 1.0.0 → 1.0.1

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.
data/Gemfile CHANGED
@@ -1,9 +1,9 @@
1
1
  source "http://rubygems.org"
2
2
 
3
- gem 'hqmf-parser', '~> 1.0.2'
3
+ gem 'hqmf-parser', '~> 1.0.4'
4
4
  gem 'hquery-patient-api', '~> 0.3.0'
5
- gem 'hqmf2js', '~> 1.0.0'
6
- gem 'health-data-standards', '~> 2.1.2'
5
+ gem 'hqmf2js', '~> 1.0.1'
6
+ gem 'health-data-standards', '~> 2.1.3'
7
7
 
8
8
  gem 'rake'
9
9
  gem 'pry'
@@ -123,7 +123,7 @@ module HQMF
123
123
  # These fields are sometimes Coded and sometimes Values.
124
124
  if field.type == "CD"
125
125
  codes = Coded.select_codes(field.code_list_id, value_sets)
126
- elsif field.type == "IVL_PQ"
126
+ elsif field.type == "IVL_PQ" || field.type =='PQ'
127
127
  value = field.format
128
128
  end
129
129
 
data/lib/tpg/ext/value.rb CHANGED
@@ -11,11 +11,11 @@ module HQMF
11
11
 
12
12
  #
13
13
  def format
14
- unit_mapping = {"a" => "years", "mo" => "months", "wk" => "weeks", "d" => "days"}
15
- pretty_unit = unit_mapping[unit] if unit
16
- pretty_unit ||= unit
14
+ # unit_mapping = {"a" => "years", "mo" => "months", "wk" => "weeks", "d" => "days"}
15
+ # pretty_unit = unit_mapping[unit] if unit
16
+ # pretty_unit ||= unit
17
17
 
18
- { "scalar" => value, "units" => pretty_unit }
18
+ { "scalar" => value, "units" => unit }
19
19
  end
20
20
 
21
21
  #
@@ -100,7 +100,7 @@ module HQMF
100
100
  else
101
101
  initial_attributes.each {|attribute, value| patient.send("#{attribute}=", value)}
102
102
  end
103
- patient.medical_record_number = "#{patient.first} #{patient.last}".hash.abs
103
+ patient.medical_record_number = Digest::MD5.hexdigest("#{patient.first} #{patient.last}")
104
104
 
105
105
  patient
106
106
  end
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.0.0
4
+ version: 1.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-01 00:00:00.000000000 Z
12
+ date: 2012-11-14 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: A utility to generate patients for unit testing clinical quality measure
15
15
  logic. The instructions for generation are guided by HQMF documents and exported