oddb2xml 3.0.10 → 3.0.12
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 +3 -1
- data/Gemfile.lock +1 -1
- data/History.txt +7 -0
- data/README.md +1 -1
- data/lib/oddb2xml/builder.rb +12 -4
- data/lib/oddb2xml/chapter_70_hack.rb +23 -3
- data/lib/oddb2xml/fhir_support.rb +8 -1
- data/lib/oddb2xml/semantic_check.rb +11 -1
- data/lib/oddb2xml/version.rb +1 -1
- data/spec/artikelstamm_spec.rb +19 -1
- data/spec/data/check_artikelstamm/artikelstamm_v5_single_element_okay.xml +50 -0
- data/spec/data/varia_De_spa.htm +16 -0
- data/spec/fhir_spec.rb +4 -0
- metadata +5 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e12453c6fd722397734fdaa3097a4d30b80d801099158f62278b137abf26f326
|
|
4
|
+
data.tar.gz: 7c6f3a7f2f7b2bfb4e59bfbb49ccee75cfe0a9b82448e4d8804a4dd951740e2b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 88ecd436bfc9aa028b9e696ebc4525d018c0563732071c8047535916ee2560f1e3dadf63fd60aaee8d201a205fba1fd81866b598ff96fd3e6558d221dd35d907
|
|
7
|
+
data.tar.gz: c64e06d03256092805e6215536d0b1da6527db831b7e157dc6e6e65535933287444293c30bf7bdd6d31b607f589ac1563e1a186fcce3b8be9e5afb5f8c07f9ad
|
data/CLAUDE.md
CHANGED
|
@@ -47,10 +47,12 @@ The system follows a **download → extract → build → compress** pipeline:
|
|
|
47
47
|
|
|
48
48
|
6. **Compressor** (`lib/oddb2xml/compressor.rb`) — Optional ZIP/TAR.GZ output compression.
|
|
49
49
|
|
|
50
|
-
7. **FHIR support** (`lib/oddb2xml/fhir_support.rb`) — Self-contained module providing `FhirDownloader` and FHIR NDJSON parsing. Activated via `--fhir` (or `--fhir-url=<URL>`). Downloads per-language NDJSON files (`foph-sl-export-latest-{de,fr,it}.ndjson`) from `epl.bag.admin.ch` to populate French and Italian product names/descriptions. Maps legal status codes `756005022007` and `756005022008` to Swissmedic category D. Reads the BAG **Indikationscode** (`XXXXX.NN`) from the explicit `indicationCode` extension on each `RegulatedAuthorization.indication[].extension[regulatedAuthorization-limitation]` (BAG SL FHIR export >= v2.0.5; handled from 3.0.10). The BAG changelog states the limitation code (`ClinicalUseDefinition.id`) and the indication code are **independent** fields, so the older derivation — combining each indication CUD's `.NN` id-suffix with the reimbursement RA's `FOPHDossierNumber` — is kept only as a fallback for feeds lacking the extension. Exposed as `item[:indication_codes]` and per-package `:indication_codes` (each entry a `{code:, cud_id:, text:}` hash, where `cud_id` is the `limitationIndication` CUD reference used to resolve the text). From 3.0.7 onwards, `Builder#build_product` emits one `<INDICATION_CODE code="XXXXX.NN" cud_id="DRUG.NN">limitation text</INDICATION_CODE>` child per indication on every `<PRD>` in `oddb_product.xml`; live feed numbers: 539 products / 1,293 codes / 100 % with non-empty indication text. Mandatory on prescriptions/invoices for SL price-model drugs from 2026-07-01 — see issue [#113](https://github.com/zdavatz/oddb2xml/issues/113). **Limitation texts** (3.0.8 onwards): the `regulatedAuthorization-limitation` extension has no inline `limitationText` in the live BAG feed — it carries a `limitationIndication` reference to a `ClinicalUseDefinition` whose `indication.diseaseSymptomProcedure.concept.text` is the actual text. The parser stores the ref as `cud_ref` on each Limitation, `Bundle#cud_text_by_id` resolves DE, and `merge_language` propagates FR/IT from the per-language NDJSON files via the same CUD id. Coverage on the live feed jumped from 0 / 9'108 to 9'108 / 9'108 (issue [#116](https://github.com/zdavatz/oddb2xml/issues/116)).
|
|
50
|
+
7. **FHIR support** (`lib/oddb2xml/fhir_support.rb`) — Self-contained module providing `FhirDownloader` and FHIR NDJSON parsing. Activated via `--fhir` (or `--fhir-url=<URL>`). Downloads per-language NDJSON files (`foph-sl-export-latest-{de,fr,it}.ndjson`) from `epl.bag.admin.ch` to populate French and Italian product names/descriptions. Maps legal status codes `756005022007` and `756005022008` to Swissmedic category D. Reads the BAG **Indikationscode** (`XXXXX.NN`) from the explicit `indicationCode` extension on each `RegulatedAuthorization.indication[].extension[regulatedAuthorization-limitation]` (BAG SL FHIR export >= v2.0.5; handled from 3.0.10). The BAG changelog states the limitation code (`ClinicalUseDefinition.id`) and the indication code are **independent** fields, so the older derivation — combining each indication CUD's `.NN` id-suffix with the reimbursement RA's `FOPHDossierNumber` — is kept only as a fallback for feeds lacking the extension. Exposed as `item[:indication_codes]` and per-package `:indication_codes` (each entry a `{code:, cud_id:, text:}` hash, where `cud_id` is the `limitationIndication` CUD reference used to resolve the text). From 3.0.7 onwards, `Builder#build_product` emits one `<INDICATION_CODE code="XXXXX.NN" cud_id="DRUG.NN">limitation text</INDICATION_CODE>` child per indication on every `<PRD>` in `oddb_product.xml`; live feed numbers: 539 products / 1,293 codes / 100 % with non-empty indication text. Mandatory on prescriptions/invoices for SL price-model drugs from 2026-07-01 — see issue [#113](https://github.com/zdavatz/oddb2xml/issues/113). **Limitation texts** (3.0.8 onwards): the `regulatedAuthorization-limitation` extension has no inline `limitationText` in the live BAG feed — it carries a `limitationIndication` reference to a `ClinicalUseDefinition` whose `indication.diseaseSymptomProcedure.concept.text` is the actual text. The parser stores the ref as `cud_ref` on each Limitation, `Bundle#cud_text_by_id` resolves DE, and `merge_language` propagates FR/IT from the per-language NDJSON files via the same CUD id. Coverage on the live feed jumped from 0 / 9'108 to 9'108 / 9'108 (issue [#116](https://github.com/zdavatz/oddb2xml/issues/116)). **Limitation code / LIMNAMEBAG** (3.0.12 onwards): FHIR has no native BAG limitation code (LIMCD), so `create_limitations_for_package` sets `LimitationCode = cud_ref` (the `limitationIndication` CUD id) instead of `""`. Without this, every FHIR limitation shared an empty `:code`; `Builder#build_artikelstamm` groups its `<LIMITATIONS>` section by code, so all of them collapsed into a single `<LIMITATION>` with an empty `<LIMNAMEBAG>` and only one text survived. Using the CUD id as the key makes each distinct limitation emit and be referenced from its `<PRODUCT>`. The downstream `bin/check_artikelstamm` (`semantic_check.rb`) also crashed on the lone-element output because Ox `:hash_no_attrs` collapses a one-child section into a Hash (and an empty one into nil) — `SemanticCheckXML#get_items` now normalises every section to an Array.
|
|
51
51
|
|
|
52
52
|
8. **Refdata cleanup** (`lib/oddb2xml/refdata_cleanup.rb`) — Compensates for known data-quality issues in upstream Refdata.Articles.xml before they reach the output. Each fix is guarded by a Swissmedic-side heuristic (e.g. comma in `substance_swissmedic` to distinguish mono products from real combinations). Currently fixes the doubled-dose template bug (`X mg / X mg / Stk`). Called from `Builder#apply_refdata_description_cleanups!` at the start of `prepare_articles`. See GitHub issue #112 for the catalogue.
|
|
53
53
|
|
|
54
|
+
9. **Chapter-70 hack** (`lib/oddb2xml/chapter_70_hack.rb`) — Legacy scraper for the SL "Komplementärarzneimittel" products (homeopathic/anthroposophic/phytotherapeutic), called only from `Builder#build_artikelstamm`. **Deprecated / non-FHIR only (3.0.11 onwards):** the source page `varia_De.htm` was rebuilt as a JavaScript SPA with no static data table, so the scraper now returns nothing there. These products + limitations now come through the FHIR feed (SL classification `20. KOMPLEMENTÄRARZNEIMITTEL`, 221 products on the live DE feed with real GTINs and limitation texts), so `build_artikelstamm` **skips the scraper entirely when `@options[:fhir]`** (the default for `--artikelstamm` since 3.0.9). In `--no-fhir` mode the scraper degrades gracefully (skips non-row/`<script>` nodes and empty tables, warns, returns `[]`) instead of raising `NoMethodError`. See GitHub issue #118.
|
|
55
|
+
|
|
54
56
|
### Key data identifiers
|
|
55
57
|
- **GTIN/EAN13**: Primary article identifier (13-digit barcode)
|
|
56
58
|
- **Pharmacode**: Swiss pharmacy code
|
data/Gemfile.lock
CHANGED
data/History.txt
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
=== 3.0.12 / 02.06.2026
|
|
2
|
+
* Artikelstamm: fix FHIR limitations collapsing into a single empty <LIMITATION>. FHIR has no native BAG limitation code (LIMCD), so every limitation was emitted with an empty LIMNAMEBAG. The Artikelstamm groups its <LIMITATIONS> section by code, so all of them collapsed into one entry with an empty name, losing every other limitation text. The CUD id (the limitationIndication reference that already identifies each text) is now used as the limitation code / LIMNAMEBAG, so each distinct limitation is emitted and referenced correctly.
|
|
3
|
+
* check_artikelstamm: fix crash "no implicit conversion of Symbol into Integer" in SemanticCheck. Ox (:hash_no_attrs) collapses a section containing exactly one child element (e.g. a single <LIMITATION>) into a Hash instead of an Array, and an empty section into nil; get_items now normalises every section to an Array so the checks no longer crash on one-element or empty PRODUCTS/LIMITATIONS/ITEMS.
|
|
4
|
+
|
|
5
|
+
=== 3.0.11 / 02.06.2026
|
|
6
|
+
* Artikelstamm: fix crash in the chapter-70 hack. The upstream source page http://www.spezialitaetenliste.ch/varia_De.htm has been rebuilt as a JavaScript single-page app and no longer ships the chapter-70 data table as static HTML, so Chapter70xtractor.parse raised NoMethodError. The chapter-70 (Komplementärarzneimittel) products and their limitations now arrive through the FHIR feed (SL classification "20. KOMPLEMENTÄRARZNEIMITTEL"), so the legacy scraper is now skipped entirely in FHIR mode (the default for --artikelstamm since 3.0.9). For --no-fhir runs the scraper degrades gracefully: it skips non-row nodes and an empty/missing table, logs a warning and returns no items instead of crashing (issue #118).
|
|
7
|
+
|
|
1
8
|
=== 3.0.10 / 01.06.2026
|
|
2
9
|
* FHIR: read the BAG Indikationscode (XXXXX.NN) from the explicit `indicationCode` extension now carried on each limitation (BAG SL FHIR export >= v2.0.5) instead of reconstructing it from FOPHDossierNumber + the ClinicalUseDefinition id suffix. The changelog states the limitation code (CUD id) and the indication code are independent fields, so the old derivation was no longer guaranteed correct. Falls back to the previous derivation for older feeds that lack the extension. Output is identical on the current live feed. Other changelog items (limitation text moved to ClinicalUseDefinition, sanitized CUD ids, un-truncated `<` in texts, deduplicated/ordered Ingredients) were already handled or are transparent upstream fixes.
|
|
3
10
|
|
data/README.md
CHANGED
|
@@ -51,7 +51,7 @@ HIN (http://hin.ch) creates daily the actual file. They can be downloaded from `
|
|
|
51
51
|
see `--help`.
|
|
52
52
|
|
|
53
53
|
```
|
|
54
|
-
/opt/src/oddb2xml/bin/oddb2xml version 3.0.
|
|
54
|
+
/opt/src/oddb2xml/bin/oddb2xml version 3.0.12
|
|
55
55
|
Usage:
|
|
56
56
|
oddb2xml [option]
|
|
57
57
|
produced files are found under data
|
data/lib/oddb2xml/builder.rb
CHANGED
|
@@ -1742,7 +1742,7 @@ module Oddb2xml
|
|
|
1742
1742
|
# Set the pharmatype to 'Y' for outdated products, which are no longer found
|
|
1743
1743
|
# in refdata/packungen
|
|
1744
1744
|
chap70 = nil
|
|
1745
|
-
if @chapter70items
|
|
1745
|
+
if @chapter70items&.values&.find { |x| x[:pharmacode]&.eql?(obj[:pharmacode]) }
|
|
1746
1746
|
Oddb2xml.log "found chapter #{obj[:pharmacode]}" if $VERBOSE
|
|
1747
1747
|
chap70 = true
|
|
1748
1748
|
end
|
|
@@ -1804,9 +1804,17 @@ module Oddb2xml
|
|
|
1804
1804
|
end
|
|
1805
1805
|
end
|
|
1806
1806
|
unless @prepared
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1807
|
+
# The chapter-70 ("Komplementärarzneimittel") products and their
|
|
1808
|
+
# limitations now arrive through the FHIR feed (SL classification
|
|
1809
|
+
# "20. KOMPLEMENTÄRARZNEIMITTEL"), so the legacy varia_De.htm scraper
|
|
1810
|
+
# is redundant in FHIR mode. The varia page itself has been rebuilt as
|
|
1811
|
+
# a JavaScript SPA that no longer ships the data table, so the scraper
|
|
1812
|
+
# can only fail there now. See GitHub issue #118.
|
|
1813
|
+
unless @options[:fhir]
|
|
1814
|
+
require "oddb2xml/chapter_70_hack"
|
|
1815
|
+
Oddb2xml::Chapter70xtractor.parse
|
|
1816
|
+
@chapter70items = Oddb2xml::Chapter70xtractor.items
|
|
1817
|
+
end
|
|
1810
1818
|
prepare_limitations
|
|
1811
1819
|
prepare_articles
|
|
1812
1820
|
prepare_products
|
|
@@ -39,12 +39,31 @@ module Oddb2xml
|
|
|
39
39
|
effort: :tolerant,
|
|
40
40
|
smart: true
|
|
41
41
|
}
|
|
42
|
-
|
|
42
|
+
parsed = Ox.load(Oddb2xml.uri_open(html_file).read, mode: :hash_no_attrs)
|
|
43
|
+
res = parsed.values.first["body"] if parsed.respond_to?(:values) && parsed.values.first.is_a?(Hash)
|
|
43
44
|
result = []
|
|
44
45
|
idx = 0
|
|
45
46
|
@@items = {}
|
|
46
|
-
res.values
|
|
47
|
-
|
|
47
|
+
unless res.respond_to?(:values)
|
|
48
|
+
warn "Chapter70: varia page has no <body> to parse (got #{res.class}); skipping"
|
|
49
|
+
return []
|
|
50
|
+
end
|
|
51
|
+
# The varia page used to expose the chapter-70 table as static HTML. It
|
|
52
|
+
# is now a JavaScript single-page app whose <body> only contains an empty
|
|
53
|
+
# <sl-root> shell, so there is no data table to walk. Each entry yielded
|
|
54
|
+
# by iterating a Hash is a [tag, content] pair; a real row carries a Hash
|
|
55
|
+
# of cells, while stray nodes (e.g. <script>) carry an Array. Skip the
|
|
56
|
+
# latter so a redesigned/empty page degrades to "no items" instead of
|
|
57
|
+
# raising NoMethodError. See GitHub issue #118.
|
|
58
|
+
rows = res.values.last
|
|
59
|
+
unless rows.respond_to?(:each)
|
|
60
|
+
warn "Chapter70: varia page has no parseable rows (got #{rows.class}); skipping"
|
|
61
|
+
return []
|
|
62
|
+
end
|
|
63
|
+
rows.each do |item|
|
|
64
|
+
cells = item.is_a?(Hash) ? item.values.first : nil
|
|
65
|
+
next unless cells.respond_to?(:each)
|
|
66
|
+
cells.each do |sub_elem|
|
|
48
67
|
what = Chapter70xtractor.parse_td(sub_elem)
|
|
49
68
|
idx += 1
|
|
50
69
|
puts "#{idx}: xx #{what}" if $VERBOSE
|
|
@@ -52,6 +71,7 @@ module Oddb2xml
|
|
|
52
71
|
end
|
|
53
72
|
end
|
|
54
73
|
result2 = result.find_all { |x| (x.is_a?(Array) && x.first.is_a?(String)) && x.first.to_i > 100 }
|
|
74
|
+
warn "Chapter70: varia page yielded no chapter-70 products; skipping" if result2.empty?
|
|
55
75
|
result2.each do |entry|
|
|
56
76
|
data = {}
|
|
57
77
|
pharma_code = entry.first
|
|
@@ -569,7 +569,14 @@ module Oddb2xml
|
|
|
569
569
|
text_de = lim[:text] || (cud_ref && cud_texts[cud_ref]) || ""
|
|
570
570
|
|
|
571
571
|
limitation = OpenStruct.new
|
|
572
|
-
limitation
|
|
572
|
+
# FHIR has no native BAG limitation code (LIMCD). The CUD id
|
|
573
|
+
# (limitationIndication reference) uniquely identifies each limitation
|
|
574
|
+
# text, so use it as the LIMNAMEBAG key. Without this, every FHIR
|
|
575
|
+
# limitation shares an empty code: the Artikelstamm builder groups its
|
|
576
|
+
# <LIMITATIONS> section by code, collapsing all of them into a single
|
|
577
|
+
# <LIMITATION> with an empty <LIMNAMEBAG> and losing every other text
|
|
578
|
+
# (and crashing the semantic checker on the resulting lone element).
|
|
579
|
+
limitation.LimitationCode = cud_ref || ""
|
|
573
580
|
limitation.LimitationType = "" # Could derive from status
|
|
574
581
|
limitation.LimitationNiveau = "" # Not in FHIR
|
|
575
582
|
limitation.LimitationValue = "" # Not in FHIR
|
|
@@ -31,7 +31,17 @@ module Oddb2xml
|
|
|
31
31
|
# of the whole spec suite
|
|
32
32
|
xx = @hash[:ARTIKELSTAMM] || @hash["ARTIKELSTAMM"]
|
|
33
33
|
comps = xx[component_name.to_sym] || xx[component_name]
|
|
34
|
-
comps.
|
|
34
|
+
return [] unless comps.is_a?(Hash)
|
|
35
|
+
res = comps.values.first
|
|
36
|
+
# Ox (:hash_no_attrs) collapses a section that contains exactly one child
|
|
37
|
+
# element (e.g. a single <LIMITATION>) into a single Hash instead of an
|
|
38
|
+
# Array, and an empty section (<LIMITATIONS/>) into nil/"". Normalise so
|
|
39
|
+
# callers always iterate over an Array of Hashes.
|
|
40
|
+
case res
|
|
41
|
+
when Array then res
|
|
42
|
+
when Hash then [res]
|
|
43
|
+
else []
|
|
44
|
+
end
|
|
35
45
|
end
|
|
36
46
|
|
|
37
47
|
def load_file(name)
|
data/lib/oddb2xml/version.rb
CHANGED
data/spec/artikelstamm_spec.rb
CHANGED
|
@@ -38,7 +38,11 @@ describe Oddb2xml::Builder do
|
|
|
38
38
|
context "when artikelstamm option is given" do
|
|
39
39
|
before(:all) do
|
|
40
40
|
common_run_init
|
|
41
|
-
|
|
41
|
+
# --no-fhir: these fixtures (chapter-70 fake GTINs, BAG-XML preparations)
|
|
42
|
+
# exercise the legacy pipeline. Since 3.0.9 --artikelstamm defaults to the
|
|
43
|
+
# FHIR feed, which has no VCR cassette here and skips the chapter-70 hack
|
|
44
|
+
# (issue #118), so the suite must opt out to keep testing legacy output.
|
|
45
|
+
options = Oddb2xml::Options.parse(["--artikelstamm", "--no-fhir"]) # , '--log'])
|
|
42
46
|
# @res = buildr_capture(:stdout){ Oddb2xml::Cli.new(options).run }
|
|
43
47
|
Oddb2xml::Cli.new(options).run # to debug
|
|
44
48
|
@artikelstamm_name = File.join(Oddb2xml::WORK_DIR, "artikelstamm_#{Date.today.strftime("%d%m%Y")}_v5.xml")
|
|
@@ -503,10 +507,24 @@ Der behandelnde Arzt ist verpflichtet, die erforderlichen Daten laufend im vorge
|
|
|
503
507
|
end
|
|
504
508
|
it "parsing" do
|
|
505
509
|
require "oddb2xml/chapter_70_hack"
|
|
510
|
+
# Stub explicitly so this test is independent of example ordering
|
|
511
|
+
# (the SPA test below re-stubs the same URL).
|
|
512
|
+
url = "http://www.spezialitaetenliste.ch/varia_De.htm"
|
|
513
|
+
stub_request(:any, url).to_return(body: File.read(File.join(Oddb2xml::SpecData, "varia_De.htm")))
|
|
506
514
|
result = Oddb2xml::Chapter70xtractor.parse
|
|
507
515
|
expect(result.class).to eq Array
|
|
508
516
|
expect(result.first).to eq ["2069562", "70.01.10", "Urtinktur", "1--10 g/ml", "13.40", ""]
|
|
509
517
|
expect(result.last).to eq ["6516727", "70.02", "Allergenorum extractum varium / Inj. Susp. \n\tFortsetzungsbehandlung", "1 Durchstfl 1.5 ml", "311.85", "L"]
|
|
510
518
|
end
|
|
519
|
+
it "degrades gracefully when varia page is a JavaScript SPA (issue #118)" do
|
|
520
|
+
require "oddb2xml/chapter_70_hack"
|
|
521
|
+
spa = File.read(File.join(Oddb2xml::SpecData, "varia_De_spa.htm"))
|
|
522
|
+
url = "http://www.spezialitaetenliste.ch/varia_De.htm"
|
|
523
|
+
stub_request(:any, url).to_return(body: spa)
|
|
524
|
+
result = nil
|
|
525
|
+
expect { result = Oddb2xml::Chapter70xtractor.parse }.not_to raise_error
|
|
526
|
+
expect(result).to eq []
|
|
527
|
+
expect(Oddb2xml::Chapter70xtractor.items).to eq({})
|
|
528
|
+
end
|
|
511
529
|
end
|
|
512
530
|
end
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!--Regression fixture for the Ox single-element collapse: exactly one PRODUCT,
|
|
3
|
+
one LIMITATION and one ITEM. Ox(:hash_no_attrs) returns a single Hash (not an
|
|
4
|
+
Array) for each such section, which crashed SemanticCheck before the get_items
|
|
5
|
+
normalisation. See Jenkins "everyReferencedLimitationIsIncluded" TypeError.-->
|
|
6
|
+
<ARTIKELSTAMM xmlns="http://elexis.ch/Elexis_Artikelstamm_v5" CREATION_DATETIME="2026-06-02T11:00:00.000+01:00" BUILD_DATETIME="2026-06-02T11:00:00.000+01:00" DATA_SOURCE="oddb2xml">
|
|
7
|
+
<PRODUCTS>
|
|
8
|
+
<PRODUCT>
|
|
9
|
+
<PRODNO>2848601</PRODNO>
|
|
10
|
+
<SALECD>A</SALECD>
|
|
11
|
+
<DSCR>Ancopir Inj Lös</DSCR>
|
|
12
|
+
<DSCRF>Ancopir sol inj</DSCRF>
|
|
13
|
+
<ATC>A11DB</ATC>
|
|
14
|
+
<LIMNAMEBAG>070240</LIMNAMEBAG>
|
|
15
|
+
<SUBSTANCE>Verschiedene Kombinationen</SUBSTANCE>
|
|
16
|
+
</PRODUCT>
|
|
17
|
+
</PRODUCTS>
|
|
18
|
+
<LIMITATIONS>
|
|
19
|
+
<LIMITATION>
|
|
20
|
+
<LIMNAMEBAG>070240</LIMNAMEBAG>
|
|
21
|
+
<DSCR>Gesamthaft zugelassen: <b>40</b> Punkte</DSCR>
|
|
22
|
+
<DSCRF>Prescription limitée au maximum à: <b>40</b> points</DSCRF>
|
|
23
|
+
<LIMITATION_PTS>40</LIMITATION_PTS>
|
|
24
|
+
</LIMITATION>
|
|
25
|
+
</LIMITATIONS>
|
|
26
|
+
<ITEMS>
|
|
27
|
+
<ITEM PHARMATYPE="P">
|
|
28
|
+
<GTIN>7680284860144</GTIN>
|
|
29
|
+
<PHAR>0177804</PHAR>
|
|
30
|
+
<SALECD>A</SALECD>
|
|
31
|
+
<DSCR>Ancopir, Injektionslösung</DSCR>
|
|
32
|
+
<DSCRF>--missing--</DSCRF>
|
|
33
|
+
<COMP>
|
|
34
|
+
<NAME>Dr. Grossmann AG, Pharmaca</NAME>
|
|
35
|
+
<GLN/>
|
|
36
|
+
</COMP>
|
|
37
|
+
<PEXF>3.89</PEXF>
|
|
38
|
+
<PPUB>8.55</PPUB>
|
|
39
|
+
<PKG_SIZE>5</PKG_SIZE>
|
|
40
|
+
<MEASURE>Ampulle(n)</MEASURE>
|
|
41
|
+
<MEASUREF>Ampulle(n)</MEASUREF>
|
|
42
|
+
<DOSAGE_FORM>Injektionslösung</DOSAGE_FORM>
|
|
43
|
+
<DOSAGE_FORMF>Solution injectable</DOSAGE_FORMF>
|
|
44
|
+
<SL_ENTRY>true</SL_ENTRY>
|
|
45
|
+
<IKSCAT>B</IKSCAT>
|
|
46
|
+
<DEDUCTIBLE>10</DEDUCTIBLE>
|
|
47
|
+
<PRODNO>2848601</PRODNO>
|
|
48
|
+
</ITEM>
|
|
49
|
+
</ITEMS>
|
|
50
|
+
</ARTIKELSTAMM>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<title>BAG SL</title>
|
|
6
|
+
<base href="/">
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<noscript><div><section><strong>JavaScript ist erforderlich!</strong></section></div></noscript>
|
|
10
|
+
<div><div><section><strong>Nicht unterstützter Browser!</strong></section></div></div>
|
|
11
|
+
<sl-root></sl-root>
|
|
12
|
+
<script src="polyfills-HE33VVSG.js" type="module"></script>
|
|
13
|
+
<script src="scripts-ALGZMJC4.js" defer></script>
|
|
14
|
+
<script src="main-DRAKRIKO.js" type="module"></script>
|
|
15
|
+
</body>
|
|
16
|
+
</html>
|
data/spec/fhir_spec.rb
CHANGED
|
@@ -157,6 +157,10 @@ describe "FHIR Indikationscode support" do
|
|
|
157
157
|
expect(texts).to include(start_with("In Kombination mit FOLFIRI"))
|
|
158
158
|
# CUD reference is carried through so merge_language can resolve FR/IT.
|
|
159
159
|
expect(pkg[:limitations].map { |l| l[:cud_ref] }).to include("CYRAMZA.01", "CYRAMZA.02")
|
|
160
|
+
# FHIR has no native LIMCD, so the CUD id becomes the limitation code
|
|
161
|
+
# (LIMNAMEBAG). Without this every limitation shares an empty code and the
|
|
162
|
+
# Artikelstamm collapses them into one entry, losing all other texts.
|
|
163
|
+
expect(pkg[:limitations].map { |l| l[:code] }).to include("CYRAMZA.01", "CYRAMZA.02")
|
|
160
164
|
end
|
|
161
165
|
|
|
162
166
|
it "fills DescriptionFr / DescriptionIt from the language-specific bundles" do
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: oddb2xml
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.0.
|
|
4
|
+
version: 3.0.12
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Yasuhiro Asaka, Zeno R.R. Davatz, Niklaus Giger
|
|
@@ -520,6 +520,7 @@ files:
|
|
|
520
520
|
- spec/data/check_artikelstamm/artikelstamm_v5_pharma_has_product.xml
|
|
521
521
|
- spec/data/check_artikelstamm/artikelstamm_v5_prodno_not_uniq.xml
|
|
522
522
|
- spec/data/check_artikelstamm/artikelstamm_v5_product_needs_article.xml
|
|
523
|
+
- spec/data/check_artikelstamm/artikelstamm_v5_single_element_okay.xml
|
|
523
524
|
- spec/data/column_c.txt
|
|
524
525
|
- spec/data/compositions.txt
|
|
525
526
|
- spec/data/compressor/oddb2xml_files_bm_update.txt
|
|
@@ -547,6 +548,7 @@ files:
|
|
|
547
548
|
- spec/data/v5_first.xml
|
|
548
549
|
- spec/data/v5_second.xml
|
|
549
550
|
- spec/data/varia_De.htm
|
|
551
|
+
- spec/data/varia_De_spa.htm
|
|
550
552
|
- spec/data/vcr/transfer.dat
|
|
551
553
|
- spec/data/vcr/transfer.zip
|
|
552
554
|
- spec/data/wsdl_nonpharma.xml
|
|
@@ -617,6 +619,7 @@ test_files:
|
|
|
617
619
|
- spec/data/check_artikelstamm/artikelstamm_v5_pharma_has_product.xml
|
|
618
620
|
- spec/data/check_artikelstamm/artikelstamm_v5_prodno_not_uniq.xml
|
|
619
621
|
- spec/data/check_artikelstamm/artikelstamm_v5_product_needs_article.xml
|
|
622
|
+
- spec/data/check_artikelstamm/artikelstamm_v5_single_element_okay.xml
|
|
620
623
|
- spec/data/column_c.txt
|
|
621
624
|
- spec/data/compositions.txt
|
|
622
625
|
- spec/data/compressor/oddb2xml_files_bm_update.txt
|
|
@@ -644,6 +647,7 @@ test_files:
|
|
|
644
647
|
- spec/data/v5_first.xml
|
|
645
648
|
- spec/data/v5_second.xml
|
|
646
649
|
- spec/data/varia_De.htm
|
|
650
|
+
- spec/data/varia_De_spa.htm
|
|
647
651
|
- spec/data/vcr/transfer.dat
|
|
648
652
|
- spec/data/vcr/transfer.zip
|
|
649
653
|
- spec/data/wsdl_nonpharma.xml
|