hqmf-parser 1.0.5 → 1.0.6
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 +1 -1
- data/lib/hqmf-model/data_criteria.rb +4 -1
- metadata +1 -1
data/Gemfile
CHANGED
@@ -7,7 +7,7 @@ gem 'nokogiri'
|
|
7
7
|
gem 'rubyzip'
|
8
8
|
|
9
9
|
#gem "health-data-standards", :git => 'http://github.com/projectcypress/health-data-standards.git', :branch => 'develop'
|
10
|
-
gem "health-data-standards", '~> 2.1.
|
10
|
+
gem "health-data-standards", '~> 2.1.4'
|
11
11
|
gem "bson_ext"
|
12
12
|
|
13
13
|
# below are gems required for excel spreadsheet processing
|
@@ -141,6 +141,7 @@ module HQMF
|
|
141
141
|
|
142
142
|
# Create a new data criteria instance from a JSON hash keyed with symbols
|
143
143
|
def self.from_json(id, json)
|
144
|
+
|
144
145
|
title = json["title"] if json["title"]
|
145
146
|
display_name = json["display_name"] if json["display_name"]
|
146
147
|
description = json["description"] if json["description"]
|
@@ -298,7 +299,8 @@ module HQMF
|
|
298
299
|
end
|
299
300
|
|
300
301
|
def self.convert_value(json)
|
301
|
-
|
302
|
+
# null check is a hack for right now to deal with criteria that are not currenty properly parsed
|
303
|
+
return nil if json.nil? || json == "null"
|
302
304
|
value = nil
|
303
305
|
type = json["type"]
|
304
306
|
case type
|
@@ -311,6 +313,7 @@ module HQMF
|
|
311
313
|
when 'ANYNonNull'
|
312
314
|
value = HQMF::AnyValue.from_json(json)
|
313
315
|
else
|
316
|
+
|
314
317
|
raise "Unknown value type [#{type}]"
|
315
318
|
end
|
316
319
|
value
|