EPha rewrites some ATC-Codes (see WIDO). The content can be found via https://github.com/epha/robot/blob/master/data/manual/swissmedic/atc.csv
Done (including unit-test) with commit Consider changes in ATC-codes by EPha
When calling grep benzylicus oddb_calc.xml | grep -v SUBSTANCE_NAME we find 16 lines where the substance was not recognized correctly, e.g. <CORRESP>conserv.: alcohol benzylicus 18 mg, aqua ad iniectabilia q.s. ad solutionem pro 2 ml</CORRESP>
Reworking to handle lines starting with Solvens to make them parse the containing substance and setting a "corresp" if this is not possible. E.g. Redimune 3 g, Trockensubstanz mit Solvens which has Solvens: natrii chloridi solutio 9 g/L 100 ml.
Unit-Tests work. Waiting for oddb2xml --calc to finish to compare all items with the previous version.
The EAN13 7680556740075 has a wrong corresp field, which currently looks like
<ARTICLE>
<GTIN>7680556740075</GTIN>
<NAME>Caverject DC 20, Injektionspräparat</NAME>
<PKG_SIZE>2</PKG_SIZE>
<SELLING_UNITS>2</SELLING_UNITS>
<MEASURE>Spritze(n)</MEASURE>
<GALENIC_FORM>Injektionspräparat</GALENIC_FORM>
<GALENIC_GROUP>Injektion/Infusion</GALENIC_GROUP>
<COMPOSITIONS>
<COMPOSITION>
<CORRESP>alprostadilum 20 µg, alfadexum, lactosum anhydricum,
natrii citras dihydricus, conserv.: alcohol benzylicus 4.45 mg, aqua
ad iniectabilia q.s. ad solutionem pro 0.5 ml in solutione recenter
reconstituta</CORRESP>
<SUBSTANCES/>
</COMPOSITION>
</COMPOSITIONS>
</ARTICLE>
Something odd seems to happen hear, as CompositionParser.new.composition.parse_with_debug of the source string gives a correct result.
The two Caverject are the only product which start their "Zusammensetzung" with "Solvens:", which is semantically just wrong! Therefore adding a fix, which transforms Solvens: alprostadilum by alprostadilum
Pushed commit Fix Caverjet by eliminatins semantically wrong leading "Solvens:"
For EAN13 7680235330306 "Solu-Cortef 100 mg, Injektions-/Infusionspräparat" I have now instead of
<COMPOSITION>
<CORRESP>conserv.: alcohol benzylicus 18 mg, aqua ad iniectabilia q.s. ad solutionem pro 2 ml</CORRESP>
<SUBSTANCES/>
</COMPOSITION>
the better
<COMPOSITION>
<EXCIPIENS>
<SUBSTANCE_NAME>aqua ad iniectabilia q.s. ad solutionem</SUBSTANCE_NAME>
<QTY>2</QTY>
<UNIT>ml</UNIT>
</EXCIPIENS>
<LABEL>Solvens</LABEL>
<SUBSTANCES>
<SUBSTANCE>
<MORE_INFO>conserv.</MORE_INFO>
<SUBSTANCE_NAME>Alcohol Benzylicus</SUBSTANCE_NAME>
<IS_ACTIVE_AGENT>false</IS_ACTIVE_AGENT>
<QTY>18</QTY>
<UNIT>mg/2 ml</UNIT>
</SUBSTANCE>
</SUBSTANCES>
</COMPOSITION>
Pushed commit Give substances for lines starting with Solvens