Class: ODDB::Html::View::Drugs::PackageInnerComposite
- Inherits:
-
HtmlGrid::Composite
- Object
- HtmlGrid::Composite
- ODDB::Html::View::Drugs::PackageInnerComposite
show all
- Includes:
- PackageMethods, Google
- Defined in:
- lib/oddb/html/view/drugs/package.rb
Constant Summary
collapse
- COMPONENTS =
{
[0,0] => :name,
[1,0,0] => :google,
[2,0] => :code_cid,
[0,1] => :company,
[2,1] => :atc,
[0,2] => :code_registration,
[0,3] => :price_public,
[2,3] => :price_festbetrag,
[0,4] => :code_festbetragsstufe,
[2,4] => :code_festbetragsgruppe,
[0,5] => :code_zuzahlungsbefreit,
[2,5] => :price_zuzahlung,
[0,6] => :code_prescription,
[2,6] => :equivalence_factor,
[1,7,0] => :fachinfo_link,
[1,7,1] => :patinfo_link,
}
- CSS_MAP =
{
[1,0] => 'google',
}
- LABELS =
true
- LEGACY_INTERFACE =
false
- DEFAULT_CLASS =
HtmlGrid::Value
Instance Method Summary
collapse
Methods included from Google
#google
#active_agents, #adjust_price, #code_boolean, #code_festbetragsgruppe, #code_prescription, #code_registration, #code_zuzahlungsbefreit, #ddd_prices, #fachinfo_link, #feedback, #patinfo_link, #price_difference, #price_exfactory, #price_festbetrag, #price_public, #price_zuzahlung, #product, #product_local, #product_remote, #row_css, #size
Instance Method Details
#atc(model) ⇒ Object
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
|
# File 'lib/oddb/html/view/drugs/package.rb', line 287
def atc(model)
if(atc = model.atc)
span = HtmlGrid::Span.new(model, @session, self)
span.value = [atc.code]
if(name = atc.name)
span.value.push('(', name, ')')
end
ddds = atc.ddds
unless(ddds.empty?)
span.css_id = "atc"
span.dojo_title = ddds.join("\n")
end
span.label = true
span
end
end
|
#code_cid(model) ⇒ Object
319
320
321
|
# File 'lib/oddb/html/view/drugs/package.rb', line 319
def code_cid(model)
model.code(:cid, ODDB.config.country)
end
|
#code_festbetragsstufe(model) ⇒ Object
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
|
# File 'lib/oddb/html/view/drugs/package.rb', line 303
def code_festbetragsstufe(model)
if(code = super)
span = HtmlGrid::Span.new(model, @session, self)
span.value = code
link = HtmlGrid::Link.new(:festbetragsstufe,
model, @session, self)
link.href = @lookandfeel.lookup(:festbetragsstufe_url)
span.dojo_title = [
@lookandfeel.lookup("festbetragsstufe_#{code}"),
link,
]
span.css_id = "fb_#@list_index"
span.label = true
span
end
end
|
#company(model) ⇒ Object
322
323
324
325
326
|
# File 'lib/oddb/html/view/drugs/package.rb', line 322
def company(model)
if(company = model.company)
company.name
end
end
|
#equivalence_factor(model) ⇒ Object
327
328
329
330
331
332
333
334
335
336
337
338
339
|
# File 'lib/oddb/html/view/drugs/package.rb', line 327
def equivalence_factor(model)
factors = model.parts.collect { |part|
(comp = part.composition) && comp.equivalence_factor
}.compact
unless(factors.empty?)
link = HtmlGrid::Link.new(:equivalence_factor, model,
@session, self)
link.href = "http://www.gesetze-im-internet.de/fgnv/anlage_5.html"
link.value = factors
link.label = true
link
end
end
|