Index>
20150824-correct-count-active-agents
Summary
- Display count of active agents is sometime wrong
- Sort Wirk- and Hilfstoffe alphabetically
- Label "Entspricht" should be on the top left of the text. Example is OLIMEL
Commits
Index
- Keep in Mind for work to do
-
- Fix dojo error http://www.sitepen.com/blog/2012/10/31/debugging-dojo-common-error-messages/#forgot-dom-ready
- I removed on May-27 tests for ix_registrationss, fix_sequences, fix_compositions, fix_packages from test/test_plugin/swissmedic.rb,as he could not find any references for them in the src code. Did I erroneously remove stuff when cleaning up the swissmedic import earlier?
- The whole test for older/newer Packages must be adapted to xlsx. One must compare the rows (e.g. by creating csv files) and do the same stuff in xlsx!
- creat gem: task: input=file with ean-codes, standard output show ean-codes + atc-code. Source is Swissmedic Packungen.xlsx or XML.
- Import via data/medreg_companies.yaml
- Fix problem with radioactivatum 99m-technetio when parsing Wirkstoffe
- Fix galenic_forms when parsing swissmedic.xlsx
- Cleanup generic_type. Replace it everywhere by sl_generic_type and adapt code accordingly.
- Get updated ATC-codes from EPha for oddb.org, too.
- Display new fields CORRESP for compositions in oddb.org.
- Use refdatabase for oddb.org, too.
- Fix running rspec for new packungen.xlsx in oddb2xml
- Error when visiting (a logged as user ngiger) http://ch.oddb.org/de/gcc/drug/reg/65346/seq/03
Label "Entspricht" should be on the top left of the text. Example is OLIMEL.
See OLIMEL. Fixed with commit Correspond label must be at top
Sort Wirk- and Hilfstoffe alphabetically
When displaying a sequence like Nutriflex we must sort the active agents alphabetically.
Done with commit Sort active and inactive agents
Display count of active agents is sometime wrong
Searching Nutriflex using Price comparision has wrong entries like "Infusionslösung: 0 Wirkstoffe" for "Nutriflex plus" 5x2000ml. Also http://ch.oddb.org/de/gcc/compare/ean13/7680516711398
Using pry to debug the situation in src/view/additional_information.rb (method) compositions I see that for the class ODDB::State::Drugs::Compare::Comparison::PackageFacade the method compositions returns []
, whereas model.sequence.compositions
returns [#<ODBA::Stub:70072713546260#34131710 @odba_class=ODDB::Composition @odba_container=70072713536060#9479390>, #<ODBA::Stub:70072713545340#34131738 @odba_class=ODDB::Composition @odba_container=70072713536060#9479390>]
Looks as if the method composition in src/model/part.rb does not return the correct compostions from sequence. A package seems to have a parts Array where each part correspond to one composition in the compositions array of the corresponding sequence. But the plugin swissmedic did not correctly update these fields.
Decided to add helper methods get_active_agents and get_inactive_agents in model/composition.rb. This didn't work out as expected. Therefore I decided to try whether renaming the active_agents as agents using a single bin/admin command would not be a better idea.
Decided to remove the unused spagyric_dose and spagyric_type from active_agent.