oddb2xml 3.0.1 → 3.0.3
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/CLAUDE.md +1 -1
- data/Gemfile.lock +1 -1
- data/History.txt +13 -0
- data/README.md +4 -5
- data/lib/oddb2xml/cli.rb +8 -3
- data/lib/oddb2xml/downloader.rb +2 -7
- data/lib/oddb2xml/extractor.rb +3 -1
- data/lib/oddb2xml/fhir_support.rb +86 -26
- data/lib/oddb2xml/options.rb +2 -2
- data/lib/oddb2xml/util.rb +14 -6
- data/lib/oddb2xml/version.rb +1 -1
- data/oddb2xml.gemspec +1 -1
- data/spec/builder_spec.rb +1 -1
- data/spec/data/Refdata.Articles.xml +853 -0
- data/spec/downloader_spec.rb +4 -4
- data/spec/extractor_spec.rb +3 -3
- data/spec/fixtures/vcr_cassettes/oddb2xml.json +2092 -1980
- data/spec/options_spec.rb +2 -0
- data/spec/spec_helper.rb +5 -3
- metadata +5 -3
data/spec/downloader_spec.rb
CHANGED
|
@@ -154,8 +154,8 @@ describe Oddb2xml::RefdataDownloader do
|
|
|
154
154
|
expect(@xml).to match(XML_VERSION_1_0)
|
|
155
155
|
end
|
|
156
156
|
it "should return valid xml" do
|
|
157
|
-
expect(@xml).to match(/
|
|
158
|
-
expect(@xml).to match(/
|
|
157
|
+
expect(@xml).to match(/PHARMA/)
|
|
158
|
+
expect(@xml).to match(/Article/)
|
|
159
159
|
end
|
|
160
160
|
end
|
|
161
161
|
end
|
|
@@ -173,8 +173,8 @@ describe Oddb2xml::RefdataDownloader do
|
|
|
173
173
|
expect(@xml).to match(XML_VERSION_1_0)
|
|
174
174
|
end
|
|
175
175
|
it "should return valid xml" do
|
|
176
|
-
expect(@xml).to match(/
|
|
177
|
-
expect(@xml).to match(/
|
|
176
|
+
expect(@xml).to match(/NONPHARMA/)
|
|
177
|
+
expect(@xml).to match(/Article/)
|
|
178
178
|
end
|
|
179
179
|
end
|
|
180
180
|
end
|
data/spec/extractor_spec.rb
CHANGED
|
@@ -74,7 +74,7 @@ describe Oddb2xml::RefdataExtractor do
|
|
|
74
74
|
desc_fr: "LEVETIRACETAM DESITIN mini cpr pel 250 mg 30 pce",
|
|
75
75
|
desc_it: "LEVETIRACETAM DESITIN Mini Filmtab 250 mg 30 Stk",
|
|
76
76
|
atc_code: "N03AX14",
|
|
77
|
-
last_change: "
|
|
77
|
+
last_change: "",
|
|
78
78
|
company_name: "Desitin Pharma GmbH",
|
|
79
79
|
company_ean: "7601001320451"}
|
|
80
80
|
expect(item_found).to eq(expected)
|
|
@@ -94,8 +94,8 @@ describe Oddb2xml::RefdataExtractor do
|
|
|
94
94
|
expected = {refdata: true,
|
|
95
95
|
_type: :nonpharma,
|
|
96
96
|
ean13: "7611600441020",
|
|
97
|
-
no8:
|
|
98
|
-
last_change:
|
|
97
|
+
no8: "",
|
|
98
|
+
last_change: "",
|
|
99
99
|
data_origin: "refdata",
|
|
100
100
|
desc_de: "TUBEGAZE Verband weiss Nr 12 20m Finger gross",
|
|
101
101
|
desc_fr: "TUBEGAZE pans tubul blanc Nr 12 20m doigts grands",
|