ncs_mdes 0.8.1 → 0.9.0
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/CHANGELOG.md +7 -0
- data/documents/{3.0/NCS_Transmission_Schema_3.0.00.00.xsd → 2.2/NCS_Transmission_Schema_2.2.01.01.xsd} +31533 -37996
- data/documents/2.2/heuristic_overrides.yml +3 -0
- data/documents/{2.2/NCS_Transmission_Schema_2.2.01.00.xsd → 3.0/NCS_Transmission_Schema_3.0.00.09.xsd} +62762 -51765
- data/documents/3.0/heuristic_overrides.yml +3 -0
- data/lib/ncs_navigator/mdes/source_documents.rb +2 -2
- data/lib/ncs_navigator/mdes/variable_type.rb +1 -1
- data/lib/ncs_navigator/mdes/version.rb +1 -1
- data/spec/ncs_navigator/mdes/source_documents_spec.rb +4 -4
- data/spec/ncs_navigator/mdes/specification_spec.rb +2 -2
- data/spec/ncs_navigator/mdes/variable_type_spec.rb +12 -0
- metadata +4 -4
@@ -52,6 +52,9 @@ foreign_keys:
|
|
52
52
|
eighteen_mth_mother_cond:
|
53
53
|
eighteen_mth_habits_id: eighteen_mth_mother_habits
|
54
54
|
|
55
|
+
eighteen_mth_mother_lice_2:
|
56
|
+
eighteen_mth_mother_id: eighteen_mth_mother_2
|
57
|
+
|
55
58
|
eighteen_mth_mother_saq:
|
56
59
|
asq18_address_id: address
|
57
60
|
r_p_id: participant
|
@@ -54,9 +54,9 @@ module NcsNavigator::Mdes
|
|
54
54
|
when '2.1'
|
55
55
|
create('2.1', '2.1/NCS_Transmission_Schema_2.1.00.00.xsd', '2.1.00.00')
|
56
56
|
when '2.2'
|
57
|
-
create('2.2', '2.2/NCS_Transmission_Schema_2.2.01.
|
57
|
+
create('2.2', '2.2/NCS_Transmission_Schema_2.2.01.01.xsd', '2.2.01.01')
|
58
58
|
when '3.0'
|
59
|
-
create('3.0', '3.0/NCS_Transmission_Schema_3.0.00.
|
59
|
+
create('3.0', '3.0/NCS_Transmission_Schema_3.0.00.09.xsd', '3.0.00.09')
|
60
60
|
else
|
61
61
|
raise "MDES #{version} is not supported by this version of ncs_mdes"
|
62
62
|
end
|
@@ -178,7 +178,7 @@ module NcsNavigator::Mdes
|
|
178
178
|
|
179
179
|
log.warn("Missing value for code list entry on line #{enum.line}") unless enum['value']
|
180
180
|
|
181
|
-
new(enum['value']).tap do |cle|
|
181
|
+
new(enum['value'] && enum['value'].strip).tap do |cle|
|
182
182
|
cle.label = enum['label']
|
183
183
|
cle.global_value = enum['global_value']
|
184
184
|
cle.master_cl = enum['master_cl']
|
@@ -136,11 +136,11 @@ module NcsNavigator::Mdes
|
|
136
136
|
include_context 'version docs'
|
137
137
|
|
138
138
|
it 'has the correct path for the schema' do
|
139
|
-
subject.schema.should =~ %r{2.2/NCS_Transmission_Schema_2.2.01.
|
139
|
+
subject.schema.should =~ %r{2.2/NCS_Transmission_Schema_2.2.01.01.xsd$}
|
140
140
|
end
|
141
141
|
|
142
142
|
it 'has a different specification_version' do
|
143
|
-
subject.specification_version.should == '2.2.01.
|
143
|
+
subject.specification_version.should == '2.2.01.01'
|
144
144
|
end
|
145
145
|
end
|
146
146
|
|
@@ -150,11 +150,11 @@ module NcsNavigator::Mdes
|
|
150
150
|
include_context 'version docs'
|
151
151
|
|
152
152
|
it 'has the correct path for the schema' do
|
153
|
-
subject.schema.should =~ %r{3.0/NCS_Transmission_Schema_3.0.00.
|
153
|
+
subject.schema.should =~ %r{3.0/NCS_Transmission_Schema_3.0.00.09.xsd$}
|
154
154
|
end
|
155
155
|
|
156
156
|
it 'has a different specification_version' do
|
157
|
-
subject.specification_version.should == '3.0.00.
|
157
|
+
subject.specification_version.should == '3.0.00.09'
|
158
158
|
end
|
159
159
|
end
|
160
160
|
|
@@ -85,7 +85,7 @@ module NcsNavigator::Mdes
|
|
85
85
|
|
86
86
|
context 'in version 3.0' do
|
87
87
|
let(:version) { '3.0' }
|
88
|
-
let(:expected_table_count) {
|
88
|
+
let(:expected_table_count) { 407 }
|
89
89
|
|
90
90
|
include_examples 'tables fully resolved'
|
91
91
|
end
|
@@ -226,7 +226,7 @@ module NcsNavigator::Mdes
|
|
226
226
|
|
227
227
|
context 'version 3.0' do
|
228
228
|
let(:version) { '3.0' }
|
229
|
-
let(:expected_type_count) {
|
229
|
+
let(:expected_type_count) { 517 }
|
230
230
|
|
231
231
|
include_examples 'types fully resolved'
|
232
232
|
end
|
@@ -172,6 +172,18 @@ module NcsNavigator::Mdes
|
|
172
172
|
code_list_entry('<xs:enumeration ncsdoc:label="Foo"/>')
|
173
173
|
logger[:warn].first.should == 'Missing value for code list entry on line 2'
|
174
174
|
end
|
175
|
+
|
176
|
+
describe 'with external whitespace on the value' do
|
177
|
+
let(:missing) {
|
178
|
+
code_list_entry(<<-XSD)
|
179
|
+
<xs:enumeration value=" -4 " ncsdoc:label="Missing in Error" ncsdoc:desc="" ncsdoc:global_value="99-4" ncsdoc:master_cl="missing_data"/>
|
180
|
+
XSD
|
181
|
+
}
|
182
|
+
|
183
|
+
it 'removes the whitespace' do
|
184
|
+
missing.value.should == '-4'
|
185
|
+
end
|
186
|
+
end
|
175
187
|
end
|
176
188
|
|
177
189
|
describe "#label" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ncs_mdes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
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-09-
|
12
|
+
date: 2012-09-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nokogiri
|
@@ -125,11 +125,11 @@ files:
|
|
125
125
|
- documents/2.1/disposition_codes.yml
|
126
126
|
- documents/2.1/extract_disposition_codes.rb
|
127
127
|
- documents/2.1/heuristic_overrides.yml
|
128
|
-
- documents/2.2/NCS_Transmission_Schema_2.2.01.
|
128
|
+
- documents/2.2/NCS_Transmission_Schema_2.2.01.01.xsd
|
129
129
|
- documents/2.2/disposition_codes.yml
|
130
130
|
- documents/2.2/extract_disposition_codes.rb
|
131
131
|
- documents/2.2/heuristic_overrides.yml
|
132
|
-
- documents/3.0/NCS_Transmission_Schema_3.0.00.
|
132
|
+
- documents/3.0/NCS_Transmission_Schema_3.0.00.09.xsd
|
133
133
|
- documents/3.0/disposition_codes.yml
|
134
134
|
- documents/3.0/extract_disposition_codes.rb
|
135
135
|
- documents/3.0/heuristic_overrides.yml
|