<< | Index | >>
Finaly, Updater jobs are
ch.oddb> Updater.new(self).update_atc_dosing_link ch.oddb> Updater.new(self).update_atc_drugbank_link
$ ruby jobs/update_atc_dosing_link $ ruby jobs/update_atc_drugbank_link
There are strange hash key in oddb.yaml.
ddds: O: !oddb.org,2003/ODDB::AtcClass::DDD administration_route: O dose: !oddb.org,2003/ODDB::Drugs::Dose not_normalized: val: 10 unit: mg scale: note: Omicrocryst.substance: !oddb.org,2003/ODDB::AtcClass::DDD administration_route: O dose: !oddb.org,2003/ODDB::Drugs::Dose not_normalized: val: 7 unit: mg scale: note: microcryst.substance
ch.oddb> registration('35265').sequences.values.first.atc_class.ddds.keys -> ["O", "Omicrocryst.substance"]
def create_ddd(roa) ddds[roa] = DDD.new(roa) end
ddd chapter needs note section.
Package class use string '0' key.
def ddd if (atc = atc_class) and atc.respond_to?(:has_ddd?) and atc.has_ddd? atc.ddds['O'] end end
It seems that this keys are expected values and its are needed.
ch.oddb> keys = []; registrations.values.each {|r| r.sequences.values.each {|s| keys << s.atc_class.ddds.keys } }; p keys.flatten.uniq.length -> 90
I generated all key list.
P P* O R PRefers to lysine acetylsalisylate ORefers to propyphenazone N Ohydrochloride, (pro-phylactic daily dose) Ohydrochloride, (prop-hylactic daily dose) V O0.5 mg Fluoride PFe3+ N* OFe2+ ORefers to ergotamine Ochloride Oteoclate Rchloride Rteoclate SL TD oral aerosol ORefers to phenazone SL* TDgel Obase Pbase OErythromycin ethylsuccinate tablets Pdepot * lamella ointment Pdepot long duration Pdepot short duration TDpatch refer to amount delivered per 24 hours VVaginal ring refers to amount delivered per 24 hours VVaginal ring refers to amount delivered per 24 hours * Oexpressed as folinic acid Pexpressed as folinic acid OFe3+ Inhal.solution Ptherapeutic dose Oprophylactic dose Inhal.powder Inhal.aerosol ORefers to phenylpropanolamine Omicrocryst.substance Oexpressed as pyri-methamine OCa2+ SLBase SLBase * ORefers to levodopa ORefers to pseudoephedrine O40 mg fluoride Inhal Inhal* Chewing gum Omicronised Pcourse dose O* ORefers to amoxicillin PRefers to amoxicillin VSingle dose treatment PRefers to imipenem depot implant Panti Xa Pdepot inj Pper injection PRefers to piperacillin ORefers to diclofenac OIndependent of strength Instill.sol. intravesical urethral OSe TDdelivered dose TDdelivered dose * Ohydrochloride s.c. implant Inhal.solution * Pexpressed as fosaprepitant Pexpressed as fosaprepitant * ORefers to alendronic acid TD patch TD patch* Pdepot. Expressed as paliperidone Oexpressed as lanthanum SLRefers to buprenorphine OThe DDD refers to oxycodone, valid for combinations with naloxone, only. ORefers to cinnarizine
Finaly, I updated to handle ddds(Dose) of ATCClass
not as Hash, But also as just Array in oddb.yaml.
ddds: - !oddb.org,2003/ODDB::AtcClass::DDD administration_route: Inhal.powder dose: !oddb.org,2003/ODDB::Drugs::Dose not_normalized: val: 18 unit: mcg scale: note: - !oddb.org,2003/ODDB::AtcClass::DDD administration_route: Inhal.solution dose: !oddb.org,2003/ODDB::Drugs::Dose not_normalized: val: 5 unit: mcg scale: note:
Total 5913 atc classes needs id of drugbank.ca.
ch.oddb> atc_classes.values.select {|atc| !atc.description.empty? }.length -> 7347
ch.oddb> atc_classes.values.select {|atc| !atc.description.empty? and atc.code.length > 6 }.length -> 5913
I created updater job.
ch.oddb> Updater.new(self).update_atc_drug_bank_link -> ["yasaka@ywesee.com"]
And improved method name of dosing_de updater, too.
Now We have 2 updater for links(drugbank.ca
and dosing.de
) by ATC code.
ch.oddb> Updater.new(self).update_atc_dosing_de_link -> ["yasaka@ywesee.com"]
Renamed drug_bank and dosing_de * drug_bank to drugbank * dosing_de to dosing
Registration Model has nil value as export_flag.
check_accessor_list = { ... :export_flag => ["FalseClass","NilClass","TrueClass"] ...
I updated empty(nil) export_flag as false in oddd.yaml.
$ grep -w export_flag data/downloads/oddb.yaml | sort | uniq export_flag: false export_flag: true