Class: Stupidedi::Versions::Interchanges::TwoHundred::ElementDefs::SpecialAN

Inherits:
Stupidedi::Versions::Interchanges::TwoHundred::ElementDefs.tt::AN
  • Object
show all
Defined in:
lib/stupidedi/versions/interchanges/00200/element_defs.rb

Overview

Fun (stupid) problem. The specifications declare ISA02 and ISA04 are required elements, but they only have “meaningful information” when ISA01 and ISA03 qualifiers aren’t “00”.

Without specifications regarding what should be entered in these required elements, our best option is to defer to convention, which seems to be that these elements should have 10 spaces – which means they’re blank. So we can’t really make these elements required! Even stupider, these are the only blank elements that should be written out space-padded to the min_length – every other element should be collapsed to an empty string.

So this “Special” class overrides to_x12 for empty values, but it otherwise looks and acts like a normal AN and StringVal

Defined Under Namespace

Classes: SpecialVal

Instance Method Summary collapse

Instance Method Details

#companionObject



37
38
39
# File 'lib/stupidedi/versions/interchanges/00200/element_defs.rb', line 37

def companion
  SpecialVal
end