Class: ODDB::OdbaExporter::AcscLine
- Inherits:
-
SubstanceLine
- Object
- Line
- PackageLine
- SubstanceLine
- ODDB::OdbaExporter::AcscLine
- Defined in:
- ext/export/src/oddbdat.rb
Constant Summary collapse
- LENGTH =
10
Instance Method Summary collapse
-
#initialize(package, active_agent, count) ⇒ AcscLine
constructor
A new instance of AcscLine.
- #structure ⇒ Object
Methods inherited from Line
Constructor Details
#initialize(package, active_agent, count) ⇒ AcscLine
Returns a new instance of AcscLine.
503 504 505 506 |
# File 'ext/export/src/oddbdat.rb', line 503 def initialize(package, active_agent, count) @count = count super end |
Instance Method Details
#structure ⇒ Object
507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 |
# File 'ext/export/src/oddbdat.rb', line 507 def structure return if @substance.nil? qty, unit = if((dose = @substance.dose) && dose.is_a?(Quanty)) [dose.qty, dose.unit] end { 1 => '41', 2 => @date, 3 => @package.oid, 4 => @count, 5 => '4', 6 => @substance.substance.oid, 7 => qty, 8 => unit, 9 => 'W', } end |