Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create ATC-Code from Swissmedic Import and add description from WHO Import. Both should be possible as Power-User via Admin-Interface. #128

Closed
zdavatz opened this issue Jan 25, 2021 · 18 comments
Assignees

Comments

@zdavatz
Copy link
Owner

zdavatz commented Jan 25, 2021

Both products Galafold and Nucala have a 7 digit ATC-Code in zugelassene_packungen_ham.xlsx.
latest-screenshot
latest-screenshot

Why does oddb.org not show this new ATC-Code already correctly in the Search result? Also see #122

latest-screenshot

At least the manual saving the new ATC-Code in the Interface should work.

https://user-images.githubusercontent.com/4953/105482810-35656d00-5ca9-11eb-9459-0b37ba01b98f.png
https://user-images.githubusercontent.com/4953/105483007-7d848f80-5ca9-11eb-824f-9a6d7c77e46c.png

@zdavatz zdavatz changed the title Create ATC-Code from WHO Import Create ATC-Code from Swissmedic Import and add description from WHO Import. Both should be possible as Power-User via Admin-Interface. Jan 25, 2021
@ngiger
Copy link
Collaborator

ngiger commented Feb 2, 2021

Kannst Du mir die URL angeben, mit der Du den ATC-Code erzeugen lassen willst?

@zdavatz
Copy link
Owner Author

zdavatz commented Feb 2, 2021

z.B.: Nucala oder Galafold Es ist kein "Erzeugen" es ist mehr ein "hinterlegen" via GUI.

ngiger added a commit to ngiger/oddb.org that referenced this issue Feb 2, 2021
ngiger added a commit to ngiger/oddb.org that referenced this issue Feb 2, 2021
@ngiger
Copy link
Collaborator

ngiger commented Feb 2, 2021

Corrected src/plug/swissmedic.rb to catch a situation where a ATC-Code must be created, too.

Fixed src/plug/who.rb to create correctly a new ATC-Code.

Adding a new ATC-code via the admin view was never possible, and it would take me several hours to fix it.

@zdavatz
Copy link
Owner Author

zdavatz commented Feb 2, 2021

Can you run the importer to correct it on the server?

@ngiger
Copy link
Collaborator

ngiger commented Feb 2, 2021

As soon as it finished here, which will take a few hours more.

@zdavatz
Copy link
Owner Author

zdavatz commented Feb 2, 2021

Ok, then we wait till Swissmedic publishes their new data.

ngiger added a commit to ngiger/oddb.org that referenced this issue Feb 2, 2021
ngiger added a commit to ngiger/oddb.org that referenced this issue Feb 2, 2021
ngiger added a commit to ngiger/oddb.org that referenced this issue Feb 2, 2021
ngiger added a commit to ngiger/oddb.org that referenced this issue Feb 3, 2021
ngiger added a commit to ngiger/oddb.org that referenced this issue Feb 3, 2021
ngiger added a commit to ngiger/oddb.org that referenced this issue Feb 3, 2021
ngiger added a commit to ngiger/oddb.org that referenced this issue Feb 3, 2021
@ngiger
Copy link
Collaborator

ngiger commented Feb 3, 2021

Aufwand (inklusive installation auf thinpower) war 3.25h.

@zdavatz
Copy link
Owner Author

zdavatz commented Feb 3, 2021

@ngiger sagt: Habe die gemachten Anpassungen für ATC auf thinpower installiert und service/ch.oddb neu gestartet.
Morgen sollten dann via import_daily die 2 fehlenden ATC-Codes hineinkommen.

@zdavatz zdavatz closed this as completed Feb 3, 2021
@zdavatz
Copy link
Owner Author

zdavatz commented Feb 4, 2021

@ngiger ich sehe noch keine neuen ATC-Codes. Wie sollten die neuen ATC-Codes reinkommen? Via aips.xml oder via Swissmedic_Packungen.xlsx?

@zdavatz zdavatz reopened this Feb 4, 2021
@ngiger
Copy link
Collaborator

ngiger commented Feb 4, 2021

Die neuen Codes kommen nur herein, wenn man die betroffenen FIs neu parsed und dazu hat der import-daily im Moment keinen Anlass.

@zdavatz
Copy link
Owner Author

zdavatz commented Feb 4, 2021

sudo -u apache bundle-300 exec ruby-300 jobs/update_textinfo_swissmedicinfo --target=fi --reparse 66108 67350 in screen import_swissmedic laufen lassen, um die beiden Registration aufzudatieren, sagt @ngiger

@zdavatz
Copy link
Owner Author

zdavatz commented Feb 4, 2021

seems to be working but I still get this in the console:

2021-02-04 19:02:08 +0100: /var/www/oddb.org/src/plugin/text_info.rb:198:in `ensure_correct_atc_code': ensure_correct_atc_code iksnr 67351 atcFromFI Codice atcFromXml Codice matched and found
2021-02-04 19:02:08 +0100: job is done. now postprocess works ...
ODBA::Stub was unable to replace ODDB::SimpleLanguage::Descriptions#30593148 from ODDB::Fachinfo:#30593146
ODBA::Stub was unable to replace ODDB::SimpleLanguage::Descriptions#30593148 from ODDB::Fachinfo:#30593146
Descriptions.description error
/var/www/oddb.org/src/util/language.rb:29:in `description'
/var/www/oddb.org/src/util/language.rb:54:in `method_missing'
/var/www/oddb.org/src/model/fachinfo.rb:79:in `localized_name'
/var/www/oddb.org/vendor/bundle/ruby/3.0.0/gems/odba-1.1.6/lib/odba/stub.rb:112:in `method_missing'
/var/www/oddb.org/src/view/rss/fachinfo.rb:85:in `block (2 levels) in to_html'
/var/www/oddb.org/src/view/rss/fachinfo.rb:84:in `each'
/var/www/oddb.org/src/view/rss/fachinfo.rb:84:in `block in to_html'
/var/www/oddb.org/vendor/bundle/ruby/3.0.0/gems/rss-0.2.9/lib/rss/maker/base.rb:439:in `make'
/var/www/oddb.org/vendor/bundle/ruby/3.0.0/gems/rss-0.2.9/lib/rss/maker/base.rb:403:in `make'
/var/www/oddb.org/vendor/bundle/ruby/3.0.0/gems/rss-0.2.9/lib/rss/maker.rb:29:in `make'
/var/www/oddb.org/src/view/rss/fachinfo.rb:74:in `to_html'
ODBA::Stub was unable to replace ODDB::SimpleLanguage::Descriptions#30593148 from ODDB::Fachinfo:#30593146
ODBA::Stub was unable to replace ODDB::SimpleLanguage::Descriptions#30593148 from ODDB::Fachinfo:#30593146
Descriptions.description error
/var/www/oddb.org/src/util/language.rb:29:in `description'
/var/www/oddb.org/src/util/language.rb:54:in `method_missing'
/var/www/oddb.org/src/util/language.rb:31:in `description'
/var/www/oddb.org/src/util/language.rb:54:in `method_missing'
/var/www/oddb.org/src/model/fachinfo.rb:79:in `localized_name'
/var/www/oddb.org/vendor/bundle/ruby/3.0.0/gems/odba-1.1.6/lib/odba/stub.rb:112:in `method_missing'
/var/www/oddb.org/src/view/rss/fachinfo.rb:85:in `block (2 levels) in to_html'
/var/www/oddb.org/src/view/rss/fachinfo.rb:84:in `each'
/var/www/oddb.org/src/view/rss/fachinfo.rb:84:in `block in to_html'
/var/www/oddb.org/vendor/bundle/ruby/3.0.0/gems/rss-0.2.9/lib/rss/maker/base.rb:439:in `make'
/var/www/oddb.org/vendor/bundle/ruby/3.0.0/gems/rss-0.2.9/lib/rss/maker/base.rb:403:in `make'
ODBA::Stub was unable to replace ODDB::SimpleLanguage::Descriptions#30593148 from ODDB::Fachinfo:#30593146
ODBA::Stub was unable to replace ODDB::SimpleLanguage::Descriptions#30593148 from ODDB::Fachinfo:#30593146

@zdavatz
Copy link
Owner Author

zdavatz commented Feb 4, 2021

Für Galafold hat es geklappt, nicht aber für Nucala, siehe

latest-screenshot

hier ist jetzt etwas doppelt.

@ngiger
Copy link
Collaborator

ngiger commented Feb 4, 2021

Via bin/admin erhalte ich:

-> ODDB::AtcClass
ch.oddb> registration('67350').atc_class.code
-> Codice
ch.oddb> registration('67350').atc_class.name
->
ch.oddb> registration('66108').atc_class.class
-> ODDB::AtcClass
ch.oddb> registration('66108').atc_class.code
-> A16AX14
ch.oddb> registration('66108').atc_class.name
->
ch.oddb> atc_class('A16AX14').class
-> NilClass
ch.oddb> atc_class('R03DX09').class
-> NilClass

Irgendwas ist hier schief. Lasse mal zuerst noch den who importer laufen via sudo -u apache bundle-300 exec ruby-300 jobs/import_whocc

@zdavatz
Copy link
Owner Author

zdavatz commented Feb 5, 2021

I am now running this sudo -u apache bundle-300 exec ruby-300 jobs/update_textinfo_swissmedicinfo --target=fi --reparse 66108 67350 again in screen -x 14948

@zdavatz
Copy link
Owner Author

zdavatz commented Feb 5, 2021

these Errors are still coming:
latest-screenshot

@zdavatz
Copy link
Owner Author

zdavatz commented Feb 5, 2021

Login in as root User and setting the ATC-Code via Web-Interface results in

latest-screenshot

but the Information is saved.

@zdavatz
Copy link
Owner Author

zdavatz commented Feb 5, 2021

Ok, I fixed manually via the interface as Admin User.

@zdavatz zdavatz closed this as completed Feb 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants