<< Masa.20100927-search-link-between_sl_entry_and_limitation_text | 2010 | Masa.20100923-trace-limitation-data-flow-in-oddbapp >>
grep search
masa@masa ~/ywesee/oddb.org $ grep -r create_limitation_text src src/model/analysis/position.rb: def create_limitation_text src/model/index_therapeuticus.rb: def create_limitation_text src/model/migel/group.rb: def create_limitation_text src/model/migel/product.rb: def create_limitation_text src/model/migel/subgroup.rb: def create_limitation_text src/model/slentry.rb: def create_limitation_text masa@masa ~/ywesee/oddb.org $ grep -r @app.create src src/plugin/analysis.rb: @app.create(ptr) src/plugin/bsv_xml.rb: group = @app.create @pointer src/plugin/bsv_xml.rb: comp = @app.create cptr src/plugin/interaction.rb: cyp450 = @app.create(pointer) src/plugin/swissmedic.rb: comp ||= @app.create(seq.pointer + :composition) src/plugin/swissmedic.rb: part ||= @app.create(package.pointer + :part) src/plugin/vaccines.rb: atc = @app.create(Persistence::Pointer.new([:atc_class, code])) src/util/updater.rb: logs = @app.create(logs_pointer) src/util/updater.rb: @app.create(logs_pointer + [:log, latest >> 1]) src/util/updater.rb: logs = @app.create(logs_pointer) src/util/updater.rb: logs = @app.create(logs_pointer) src/util/updater.rb: logs = @app.create(logs_pointer) masa@masa ~/ywesee/oddb.org $ grep -r "def issue_create" src src/util/persistence.rb: def issue_create(app) masa@masa ~/ywesee/oddb.org $ grep -r "issue_create" src src/util/oddbapp.rb: if(item = pointer.issue_create(self)) src/util/persistence.rb: def issue_create(app) src/util/persistence.rb: # Only the hook must be stored in issue_create
Procedure
ODDB::View::Drugs::RootResultList::COMPONENTS[[1, 0]] in create(limitation_text) ODDB::View::Drugs::ResultComposite::COMPONENTS[[0, 2]] in create(ODDB::View::Drugs::RootResultList) ODDB::View::Drugs::Result::COMPONENTS[[0, 2]] in create(content)
Summary
Default condition
before

after

Experiment
Check ODBA Cache data in the process from 'before' to 'after'
src/plugin/bsv_xml.rb
print "pointer="
p pointer
print "========== ODBA Cache ==========\n"
sl = pointer.creator.resolve @app
pp sl
@app.update pointer.creator, sl_data, :bag
Result
pointer=#<ODDB::Persistence::Pointer:0x7f3c81fb6bd8 @directions=[[:registration, "55972"], [:sequence, "03"], [:package, "019"], [:sl_entry]]>
========== ODBA Cache ==========
#<ODDB::SlEntry:0x7f3c81fafc48
@bsv_dossier="17846",
@data_origins=
{"status"=>:bag,
"introduction_date"=>:bag,
"valid_from"=>:bag,
"limitation_points"=>:bag,
"limitation"=>:bag,
"valid_until"=>:bag,
"bsv_dossier"=>:bag},
@introduction_date=Sun, 01 Jul 2007,
@limitation=nil,
@limitation_points=nil,
@limitation_text=nil,
@odba_id=1271980,
@odba_observers=[],
@odba_persistent=true,
@oid=1271980,
@pointer=
#<ODDB::Persistence::Pointer:0x7f3c81faf0b8
@directions=
[[:registration, "55972"],
[:sequence, "03"],
[:package, "019"],
[:sl_entry]]>,
@revision=Fri Sep 24 10:10:46 +0200 2010,
@status="0",
@valid_from=Sun, 01 Jul 2007,
@valid_until=Fri, 31 Dec 9999>
pointer=#<ODDB::Persistence::Pointer:0x7f3c81f81690 @directions=[[:registration, "55972"], [:sequence, "03"], [:package, "017"], [:sl_entry]]>
========== ODBA Cache ==========
#<ODDB::SlEntry:0x7f3c81f7b128
@bsv_dossier="17846",
@data_origins=
{"status"=>:bag,
"introduction_date"=>:bag,
"valid_from"=>:bag,
"limitation_points"=>:bag,
"limitation"=>:bag,
"valid_until"=>:bag,
"bsv_dossier"=>:bag},
@introduction_date=Sun, 01 Jul 2007,
@limitation=nil,
@limitation_points=nil,
@limitation_text=nil,
@odba_id=1271979,
@odba_observers=[],
@odba_persistent=true,
@oid=1271979,
@pointer=
#<ODDB::Persistence::Pointer:0x7f3c81f7a5c0
@directions=
[[:registration, "55972"],
[:sequence, "03"],
[:package, "017"],
[:sl_entry]]>,
@revision=Fri Sep 24 10:10:46 +0200 2010,
@status="0",
@valid_from=Sun, 01 Jul 2007,
@valid_until=Fri, 31 Dec 9999>
Difference
limitation_text = nil !?
Confirm
src/plugin/bsv_xml.rb
print "\npointer="
p pointer
print "========== sl_data ==========\n"
pp sl_data
@app.update pointer.creator, sl_data, :bag
Result
pointer=#<ODDB::Persistence::Pointer:0x7f23b91fc168 @directions=[[:registration, "55972"], [:sequence, "03"], [:package, "017"], [:sl_entry]]>
========== sl_data ==========
{:bsv_dossier=>"17846",
:limitation_points=>nil,
:status=>"0",
:introduction_date=>Sun, 01 Jul 2007,
:limitation=>true,
:valid_until=>Fri, 31 Dec 9999,
:valid_from=>Sun, 01 Jul 2007}
pointer=#<ODDB::Persistence::Pointer:0x7f23b9085b18 @directions=[[:registration, "56107"], [:sequence, "01"], [:package, "004"], [:sl_entry]]>
========== sl_data ==========
{:bsv_dossier=>"17885",
:limitation_points=>nil,
:status=>"0",
:introduction_date=>Thu, 01 May 2003,
:limitation=>true,
:valid_until=>Fri, 31 Dec 9999,
:valid_from=>Thu, 01 May 2003}
Notes
Confirm
src/util/persistence.rb
def issue_update(hook, values, origin = nil)
obj = resolve(hook)
unless(obj.nil?)
diff = obj.diff(values, hook)
print "obj.class=", obj.class, "\n"
print "diff="
pp diff
unless diff.empty?
obj.update_values(diff, origin)
obj.odba_store
end
end
obj
end
Result
obj.class=ODDB::Sequence
diff={}
obj.class=ODDB::Package
diff={}
obj.class=ODDB::Sequence
diff={}
obj.class=ODDB::Package
diff={}
pointer=#<ODDB::Persistence::Pointer:0x7f451084d788 @directions=[[:registration, "55972"], [:sequence, "03"], [:package, "019"], [:sl_entry]]>
obj.class=ODDB::SlEntry
diff={:limitation_points=>nil, :limitation=>true}
pointer=#<ODDB::Persistence::Pointer:0x7f4510832140 @directions=[[:registration, "55972"], [:sequence, "03"], [:package, "017"], [:sl_entry]]>
obj.class=ODDB::SlEntry
diff={:limitation_points=>nil, :limitation=>true}
obj.class=ODDB::LimitationText
diff={:de=>
#<ODDB::Text::Chapter:0x7f451086e258
@heading="",
@sections=
[#<ODDB::Text::Section:0x7f451086e140
@paragraphs=
[#<ODDB::Text::Paragraph:0x7f451086de70
@format=
#<ODDB::Text::Format:0x7f451086dce0 @end=-1, @start=0, @values=[]>,
@formats=
[#<ODDB::Text::Format:0x7f451086dce0 @end=-1, @start=0, @values=[]>],
@preformatted=false,
@raw_txt=nil,
@text="Schwere, therapieresistente Akneformen.">],
@subheading="Isotretinoin Mepha\n">]>,
:fr=>
#<ODDB::Text::Chapter:0x7f451086c570
@heading="",
@sections=
[#<ODDB::Text::Section:0x7f451086c458
@paragraphs=
[#<ODDB::Text::Paragraph:0x7f451086c318
@format=
#<ODDB::Text::Format:0x7f451086c1d8 @end=-1, @start=0, @values=[]>,
@formats=
[#<ODDB::Text::Format:0x7f451086c1d8 @end=-1, @start=0, @values=[]>],
@preformatted=false,
@raw_txt=nil,
@text=
"Formes graves de l'acn\303\251, r\303\251sistantes \303\240 la th\303\251rapie.">],
@subheading="Isotretinoine Mepha\n">]>,
:it=>
#<ODDB::Text::Chapter:0x7f451086abf8
@heading="",
@sections=
[#<ODDB::Text::Section:0x7f451086ab08
@paragraphs=
[#<ODDB::Text::Paragraph:0x7f451086a9f0
@format=
#<ODDB::Text::Format:0x7f451086a888 @end=-1, @start=0, @values=[]>,
@formats=
[#<ODDB::Text::Format:0x7f451086a888 @end=-1, @start=0, @values=[]>],
@preformatted=false,
@raw_txt=nil,
@text="Forme gravi di acne, resistenti alla terapia.">],
@subheading="Isotretinoine Mepha\n">]>}
obj.class=ODDB::LimitationText
diff={:de=>
#<ODDB::Text::Chapter:0x7f451086e2f8
@heading="",
@sections=
[#<ODDB::Text::Section:0x7f451086d8d0
@paragraphs=
[#<ODDB::Text::Paragraph:0x7f451086d7b8
@format=
#<ODDB::Text::Format:0x7f451086d678 @end=-1, @start=0, @values=[]>,
@formats=
[#<ODDB::Text::Format:0x7f451086d678 @end=-1, @start=0, @values=[]>],
@preformatted=false,
@raw_txt=nil,
@text="Schwere, therapieresistente Akneformen.">],
@subheading="Isotretinoin Mepha\n">]>,
:fr=>
#<ODDB::Text::Chapter:0x7f451086c5e8
@heading="",
@sections=
[#<ODDB::Text::Section:0x7f451086be90
@paragraphs=
[#<ODDB::Text::Paragraph:0x7f451086bd78
@format=
#<ODDB::Text::Format:0x7f451086bc38 @end=-1, @start=0, @values=[]>,
@formats=
[#<ODDB::Text::Format:0x7f451086bc38 @end=-1, @start=0, @values=[]>],
@preformatted=false,
@raw_txt=nil,
@text=
"Formes graves de l'acn\303\251, r\303\251sistantes \303\240 la th\303\251rapie.">],
@subheading="Isotretinoine Mepha\n">]>,
:it=>
#<ODDB::Text::Chapter:0x7f451086ac70
@heading="",
@sections=
[#<ODDB::Text::Section:0x7f451086a568
@paragraphs=
[#<ODDB::Text::Paragraph:0x7f451086a450
@format=
#<ODDB::Text::Format:0x7f451086a2e8 @end=-1, @start=0, @values=[]>,
@formats=
[#<ODDB::Text::Format:0x7f451086a2e8 @end=-1, @start=0, @values=[]>],
@preformatted=false,
@raw_txt=nil,
@text="Forme gravi di acne, resistenti alla terapia.">],
@subheading="Isotretinoine Mepha\n">]>}
obj.class=ODDB::Registration
diff={}
obj.class=ODDB::Sequence
diff={}
obj.class=ODDB::Package
diff={}
obj.class=ODDB::Sequence
diff={}
obj.class=ODDB::Package
diff={}
pointer=#<ODDB::Persistence::Pointer:0x7f4510678ed0 @directions=[[:registration, "56107"], [:sequence, "01"], [:package, "004"], [:sl_entry]]>
obj.class=ODDB::SlEntry
diff={:limitation_points=>nil}
pointer=#<ODDB::Persistence::Pointer:0x7f4510662c48 @directions=[[:registration, "56107"], [:sequence, "01"], [:package, "002"], [:sl_entry]]>
obj.class=ODDB::SlEntry
diff={:limitation_points=>nil}
obj.class=ODDB::LimitationText
diff={}
obj.class=ODDB::LimitationText
diff={}
obj.class=ODDB::Registration
diff={}
Notes
print "txt_ptr="
p txt_ptr
print "========== lim_data ==========\n"
pp lim_data
@app.update txt_ptr.creator, lim_data, :bag
Result
pointer=#<ODDB::Persistence::Pointer:0x7fd90412fb80 @directions=[[:registration, "55972"], [:sequence, "03"], [:package, "019"], [:sl_entry]]>
pointer=#<ODDB::Persistence::Pointer:0x7fd904118160 @directions=[[:registration, "55972"], [:sequence, "03"], [:package, "017"], [:sl_entry]]>
txt_ptr=#<ODDB::Persistence::Pointer:0x7fd9041017d0 @directions=[[:registration, "55972"], [:sequence, "03"], [:package, "019"], [:sl_entry], [:limitation_text]]>
========== lim_data ==========
{:de=>
#<ODDB::Text::Chapter:0x7fd9041501a0
@heading="",
@sections=
[#<ODDB::Text::Section:0x7fd904150060
@paragraphs=
[#<ODDB::Text::Paragraph:0x7fd90414fef8
@format=
#<ODDB::Text::Format:0x7fd90414fc78 @end=-1, @start=0, @values=[]>,
@formats=
[#<ODDB::Text::Format:0x7fd90414fc78 @end=-1, @start=0, @values=[]>],
@preformatted=false,
@raw_txt=nil,
@text="Schwere, therapieresistente Akneformen.">],
@subheading="Isotretinoin Mepha\n">]>,
:fr=>
#<ODDB::Text::Chapter:0x7fd90414e620
@heading="",
@sections=
[#<ODDB::Text::Section:0x7fd90414e530
@paragraphs=
[#<ODDB::Text::Paragraph:0x7fd90414e418
@format=
#<ODDB::Text::Format:0x7fd90414e2d8 @end=-1, @start=0, @values=[]>,
@formats=
[#<ODDB::Text::Format:0x7fd90414e2d8 @end=-1, @start=0, @values=[]>],
@preformatted=false,
@raw_txt=nil,
@text=
"Formes graves de l'acn\303\251, r\303\251sistantes \303\240 la th\303\251rapie.">],
@subheading="Isotretinoine Mepha\n">]>,
:it=>
#<ODDB::Text::Chapter:0x7fd90414cca8
@heading="",
@sections=
[#<ODDB::Text::Section:0x7fd90414cbb8
@paragraphs=
[#<ODDB::Text::Paragraph:0x7fd90414ca78
@format=
#<ODDB::Text::Format:0x7fd90414c8c0 @end=-1, @start=0, @values=[]>,
@formats=
[#<ODDB::Text::Format:0x7fd90414c8c0 @end=-1, @start=0, @values=[]>],
@preformatted=false,
@raw_txt=nil,
@text="Forme gravi di acne, resistenti alla terapia.">],
@subheading="Isotretinoine Mepha\n">]>}
txt_ptr=#<ODDB::Persistence::Pointer:0x7fd9040ab308 @directions=[[:registration, "55972"], [:sequence, "03"], [:package, "017"], [:sl_entry], [:limitation_text]]>
========== lim_data ==========
{:de=>
#<ODDB::Text::Chapter:0x7fd904150218
@heading="",
@sections=
[#<ODDB::Text::Section:0x7fd90414f958
@paragraphs=
[#<ODDB::Text::Paragraph:0x7fd90414f818
@format=
#<ODDB::Text::Format:0x7fd90414f6b0 @end=-1, @start=0, @values=[]>,
@formats=
[#<ODDB::Text::Format:0x7fd90414f6b0 @end=-1, @start=0, @values=[]>],
@preformatted=false,
@raw_txt=nil,
@text="Schwere, therapieresistente Akneformen.">],
:fr=>
#<ODDB::Text::Chapter:0x7fd90414e6c0
@heading="",
@sections=
[#<ODDB::Text::Section:0x7fd90414dfb8
@paragraphs=
[#<ODDB::Text::Paragraph:0x7fd90414dea0
@format=
#<ODDB::Text::Format:0x7fd90414dd60 @end=-1, @start=0, @values=[]>,
@formats=
[#<ODDB::Text::Format:0x7fd90414dd60 @end=-1, @start=0, @values=[]>],
@preformatted=false,
@raw_txt=nil,
@text=
"Formes graves de l'acn\303\251, r\303\251sistantes \303\240 la th\303\251rapie.">],
@subheading="Isotretinoine Mepha\n">]>,
:it=>
#<ODDB::Text::Chapter:0x7fd90414cd48
@heading="",
@sections=
[#<ODDB::Text::Section:0x7fd90414c438
@paragraphs=
[#<ODDB::Text::Paragraph:0x7fd90414c280
@format=
#<ODDB::Text::Format:0x7fd90414c0c8 @end=-1, @start=0, @values=[]>,
@formats=
[#<ODDB::Text::Format:0x7fd90414c0c8 @end=-1, @start=0, @values=[]>],
@preformatted=false,
@raw_txt=nil,
@text="Forme gravi di acne, resistenti alla terapia.">],
@subheading="Isotretinoine Mepha\n">]>}
pointer=#<ODDB::Persistence::Pointer:0x7fd903f4dfb0 @directions=[[:registration, "56107"], [:sequence, "01"], [:package, "004"], [:sl_entry]]>
pointer=#<ODDB::Persistence::Pointer:0x7fd903f39f88 @directions=[[:registration, "56107"], [:sequence, "01"], [:package, "002"], [:sl_entry]]>
txt_ptr=#<ODDB::Persistence::Pointer:0x7fd903f250b0 @directions=[[:registration, "56107"], [:sequence, "01"], [:package, "004"], [:sl_entry], [:limitation_text]]>
========== lim_data ==========
{:de=>
#<ODDB::Text::Chapter:0x7fd903f6cd20
@heading="",
@sections=
[#<ODDB::Text::Section:0x7fd903f6cb90
@paragraphs=
[#<ODDB::Text::Paragraph:0x7fd903f6ca00
@format=
#<ODDB::Text::Format:0x7fd903f6c7f8 @end=-1, @start=0, @values=[]>,
@formats=
[#<ODDB::Text::Format:0x7fd903f6c7f8 @end=-1, @start=0, @values=[]>],
@preformatted=false,
@raw_txt=nil,
@text="Schwere, therapieresistente Akneformen.">],
@subheading="Isotretinoin Teva\n">]>,
:fr=>
#<ODDB::Text::Chapter:0x7fd903f6aca0
@heading="",
@sections=
[#<ODDB::Text::Section:0x7fd903f6abb0
@paragraphs=
[#<ODDB::Text::Paragraph:0x7fd903f6aa48
@format=
#<ODDB::Text::Format:0x7fd903f6a8b8 @end=-1, @start=0, @values=[]>,
@formats=
[#<ODDB::Text::Format:0x7fd903f6a8b8 @end=-1, @start=0, @values=[]>],
@preformatted=false,
@raw_txt=nil,
@text=
"Formes graves de l'acn\303\251, r\303\251sistantes \303\240 la th\303\251rapie.">],
@subheading="Isotretinoin Teva\n">]>,
:it=>
#<ODDB::Text::Chapter:0x7fd903f68d38
@heading="",
@sections=
[#<ODDB::Text::Section:0x7fd903f68c48
@paragraphs=
[#<ODDB::Text::Paragraph:0x7fd903f68b30
@format=
#<ODDB::Text::Format:0x7fd903f689a0 @end=-1, @start=0, @values=[]>,
@formats=
[#<ODDB::Text::Format:0x7fd903f689a0 @end=-1, @start=0, @values=[]>],
@preformatted=false,
@raw_txt=nil,
@text="Forme gravi di acne, resistenti alla terapia.">],
@subheading="Isotretinoin Teva\n">]>}
txt_ptr=#<ODDB::Persistence::Pointer:0x7fd903ef79f8 @directions=[[:registration, "56107"], [:sequence, "01"], [:package, "002"], [:sl_entry], [:limitation_text]]>
========== lim_data ==========
{:de=>
#<ODDB::Text::Chapter:0x7fd903f6cde8
@heading="",
@sections=
[#<ODDB::Text::Section:0x7fd903f6c438
@paragraphs=
[#<ODDB::Text::Paragraph:0x7fd903f6c2f8
@format=
#<ODDB::Text::Format:0x7fd903f6c1b8 @end=-1, @start=0, @values=[]>,
@formats=
[#<ODDB::Text::Format:0x7fd903f6c1b8 @end=-1, @start=0, @values=[]>],
@preformatted=false,
@raw_txt=nil,
@text="Schwere, therapieresistente Akneformen.">],
@subheading="Isotretinoin Teva\n">]>,
:fr=>
#<ODDB::Text::Chapter:0x7fd903f6ad40
@heading="",
@sections=
[#<ODDB::Text::Section:0x7fd903f6a3b8
@paragraphs=
[#<ODDB::Text::Paragraph:0x7fd903f6a250
@format=
#<ODDB::Text::Format:0x7fd903f6a048 @end=-1, @start=0, @values=[]>,
@formats=
[#<ODDB::Text::Format:0x7fd903f6a048 @end=-1, @start=0, @values=[]>],
@preformatted=false,
@raw_txt=nil,
@text=
"Formes graves de l'acn\303\251, r\303\251sistantes \303\240 la th\303\251rapie.">],
@subheading="Isotretinoin Teva\n">]>,
:it=>
#<ODDB::Text::Chapter:0x7fd903f68db0
@heading="",
@sections=
[#<ODDB::Text::Section:0x7fd903f68680
@paragraphs=
[#<ODDB::Text::Paragraph:0x7fd903f68518
@format=
#<ODDB::Text::Format:0x7fd903f683d8 @end=-1, @start=0, @values=[]>,
@formats=
[#<ODDB::Text::Format:0x7fd903f683d8 @end=-1, @start=0, @values=[]>],
@preformatted=false,
@raw_txt=nil,
@text="Forme gravi di acne, resistenti alla terapia.">],
@subheading="Isotretinoin Teva\n">]>}
Notes
def diff(values, app=nil, masa=nil)
#adjust_types(values, app)
result = {}
adjust_types(values, app).each { |key, value|
if(self.respond_to?(key))
oldval = self.send(key)
if masa == ODDB::LimitationText
print "key="
pp key
print "=========== oldval ==========\n"
pp oldval
end
if(oldval.nil? || undiffable?(oldval) || value != oldval)
result.store(key, value)
end
end
}
result
end
Result
pointer=#<ODDB::Persistence::Pointer:0x7fe03cc6fa10 @directions=[[:registration, "55972"], [:sequence, "03"], [:package, "019"], [:sl_entry]]>
obj.class=ODDB::SlEntry
pointer=#<ODDB::Persistence::Pointer:0x7fe03cc59cb0 @directions=[[:registration, "55972"], [:sequence, "03"], [:package, "017"], [:sl_entry]]>
obj.class=ODDB::SlEntry
obj.class=ODDB::LimitationText
key=:de
=========== oldval ==========
""
key=:fr
=========== oldval ==========
""
key=:it
=========== oldval ==========
""
obj.class=ODDB::LimitationText
key=:de
=========== oldval ==========
""
key=:fr
=========== oldval ==========
""
key=:it
=========== oldval ==========
""
pointer=#<ODDB::Persistence::Pointer:0x7fe03cad8e68 @directions=[[:registration, "56107"], [:sequence, "01"], [:package, "004"], [:sl_entry]]>
obj.class=ODDB::SlEntry
pointer=#<ODDB::Persistence::Pointer:0x7fe03cac41e8 @directions=[[:registration, "56107"], [:sequence, "01"], [:package, "002"], [:sl_entry]]>
obj.class=ODDB::SlEntry
obj.class=ODDB::LimitationText
key=:de
=========== oldval ==========
#<ODDB::Text::Chapter:0x7fe03caa9578
@heading="",
@sections=
[#<ODDB::Text::Section:0x7fe03caa94b0
@paragraphs=
[#<ODDB::Text::Paragraph:0x7fe03caa9410
@format=
#<ODDB::Text::Format:0x7fe03caa92a8 @end=-1, @start=0, @values=[]>,
@formats=
[#<ODDB::Text::Format:0x7fe03caa92a8 @end=-1, @start=0, @values=[]>],
@preformatted=false,
@raw_txt=nil,
@text="Schwere, therapieresistente Akneformen.">],
@subheading="Isotretinoin Teva\n">]>
key=:fr
=========== oldval ==========
#<ODDB::Text::Chapter:0x7fe03caa9168
@heading="",
@sections=
[#<ODDB::Text::Section:0x7fe03caa90c8
@paragraphs=
[#<ODDB::Text::Paragraph:0x7fe03caa9028
@format=
#<ODDB::Text::Format:0x7fe03caa8f60 @end=-1, @start=0, @values=[]>,
@formats=
[#<ODDB::Text::Format:0x7fe03caa8f60 @end=-1, @start=0, @values=[]>],
@preformatted=false,
@raw_txt=nil,
@text=
"Formes graves de l'acn\303\251, r\303\251sistantes \303\240 la th\303\251rapie.">],
@subheading="Isotretinoin Teva\n">]>
key=:it
=========== oldval ==========
#<ODDB::Text::Chapter:0x7fe03caa9c80
@heading="",
@sections=
[#<ODDB::Text::Section:0x7fe03caa9b40
@paragraphs=
[#<ODDB::Text::Paragraph:0x7fe03caa9a28
@format=
#<ODDB::Text::Format:0x7fe03caa98e8 @end=-1, @start=0, @values=[]>,
@formats=
[#<ODDB::Text::Format:0x7fe03caa98e8 @end=-1, @start=0, @values=[]>],
@preformatted=false,
@raw_txt=nil,
@text="Forme gravi di acne, resistenti alla terapia.">],
@subheading="Isotretinoin Teva\n">]>
obj.class=ODDB::LimitationText
key=:de
=========== oldval ==========
#<ODDB::Text::Chapter:0x7fe03ca7c4b0
@heading="",
@sections=
[#<ODDB::Text::Section:0x7fe03ca7c410
@paragraphs=
[#<ODDB::Text::Paragraph:0x7fe03ca7c398
@format=
#<ODDB::Text::Format:0x7fe03ca7c320 @end=-1, @start=0, @values=[]>,
@formats=
[#<ODDB::Text::Format:0x7fe03ca7c320 @end=-1, @start=0, @values=[]>],
@preformatted=false,
@raw_txt=nil,
@text="Schwere, therapieresistente Akneformen.">],
@subheading="Isotretinoin Teva\n">]>
key=:fr
=========== oldval ==========
#<ODDB::Text::Chapter:0x7fe03ca7c208
@heading="",
@sections=
[#<ODDB::Text::Section:0x7fe03ca7c168
@paragraphs=
[#<ODDB::Text::Paragraph:0x7fe03ca7c0f0
@format=
#<ODDB::Text::Format:0x7fe03ca7c078 @end=-1, @start=0, @values=[]>,
@formats=
[#<ODDB::Text::Format:0x7fe03ca7c078 @end=-1, @start=0, @values=[]>],
@preformatted=false,
@raw_txt=nil,
@text=
"Formes graves de l'acn\303\251, r\303\251sistantes \303\240 la th\303\251rapie.">],
@subheading="Isotretinoin Teva\n">]>
key=:it
=========== oldval ==========
#<ODDB::Text::Chapter:0x7fe03ca7c9b0
@heading="",
@sections=
[#<ODDB::Text::Section:0x7fe03ca7c898
@paragraphs=
[#<ODDB::Text::Paragraph:0x7fe03ca7c7d0
@format=
#<ODDB::Text::Format:0x7fe03ca7c708 @end=-1, @start=0, @values=[]>,
@formats=
[#<ODDB::Text::Format:0x7fe03ca7c708 @end=-1, @start=0, @values=[]>],
@preformatted=false,
@raw_txt=nil,
@text="Forme gravi di acne, resistenti alla terapia.">],
@subheading="Isotretinoin Teva\n">]>
Notes
Experiment
src/util/persistence.rb
def diff(values, app=nil, masa=nil)
#adjust_types(values, app)
result = {}
adjust_types(values, app).each { |key, value|
if(self.respond_to?(key))
oldval = self.send(key)
if masa == ODDB::LimitationText
oldval = nil
end
if(oldval.nil? || undiffable?(oldval) || value != oldval)
result.store(key, value)
end
end
}
result
end
Result
Therefore
Consideration
Solution
Experiment
src/util/persistence.rb
def update_values(values, origin=nil)
@revision = Time.now
values.each { |key, value|
print "key=", key, "\n"
key = key.to_s
data_origins.store(key, origin)
self.send(key + '=', value)
}
end
Result
pointer=#<ODDB::Persistence::Pointer:0x7f89de2b1f00 @directions=[[:registration, "55972"], [:sequence, "03"], [:package, "019"], [:sl_entry]]> key=limitation_points key=limitation pointer=#<ODDB::Persistence::Pointer:0x7f89de29ad00 @directions=[[:registration, "55972"], [:sequence, "03"], [:package, "017"], [:sl_entry]]> key=limitation_points key=limitation pointer=#<ODDB::Persistence::Pointer:0x7f89de138c00 @directions=[[:registration, "56107"], [:sequence, "01"], [:package, "004"], [:sl_entry]]> key=limitation_points key=limitation pointer=#<ODDB::Persistence::Pointer:0x7f89de123ad0 @directions=[[:registration, "56107"], [:sequence, "01"], [:package, "002"], [:sl_entry]]> key=limitation_points key=limitation key=report key=parts key=mail_from key=report key=recipients
Conclusion
update_bsv (src/util/bsv_xml.rb) does not update the @limitation_text of sl_entry object (the link between sl_entry and limitation_text)
Experiment
src/plugin/bsv_xml.rb
if (lim_data = @lim_texts[pac_ptr]) && !lim_data.empty?
sl_data.store :limitation, true
# experiment
txt_ptr = pack.sl_entry.pointer + :limitation_text
sl_data.store :limitation_text, txt_ptr.resolve(@app)
end
Result
