Comments (4)
Yep, this seems like a bug. Can you paste the code used to generate the segments up to this point? Does the stack trace blame the line that says buidler.MEA
or a different line?
from stupidedi.
Hi Kyle,
Yes the stack trace blames the builder.MEA
line
from stupidedi.
config = Stupidedi::Config.contrib
config.interchange.register("00200") do
Stupidedi::Versions::Interchanges::TwoHundred::InterchangeDef
end
config.functional_group.register("002001") do
Stupidedi::Versions::FunctionalGroups::TwoThousandOne::FunctionalGroupDef
end
config.transaction_set.register("002001", "SH", "856") do
Stupidedi::Contrib::TwoThousandOne::TransactionSetDefs::SH856
end
strict = true
builder = Stupidedi::Builder::BuilderDsl.build(config, strict)
builder.ISA("00", " " * 6, # authorization information
"00", " " * 6, # authentication information
"01", edi_asn_oem.sender_id, # submitter identification
"01", edi_asn_oem.receiver_id, # recipient identification
Time.now.utc, # date
Time.now.utc, # time
"U", # repetition separator
"00200", # interchange version
isa_control_number, # control number
"0", # acknowledgement request
"P", # usage indicator
":") # component separator
builder.GS "PS", edi_asn_oem.sender_id, edi_asn_oem.receiver_id, create_date, create_time, gs_group_control_number, "X", "002001"
builder.ST "856", st_transaction_set_control_number
builder.BSN "00", bol, create_date, create_time
req_date = '140824'
req_time = '0920'
builder.DTM "011",req_date, req_time
builder.HL "1", nil, "S"
builder.MEA "PD", "G", weight_total, "LB", "0", "0"
from stupidedi.
Ah, the error happens because there are SyntaxNotes for elements 3, 5, 6, and 8; however the declaration of MEA
only has six elements. You should review whatever documentation you can find -- either the syntax notes are incorrect or you are missing information about some of the elements in MEA
.
The error message is pretty useless, and worse, the error handling code fails if you don't have pp
already loaded, so I'm going to fix that in the next commit.
from stupidedi.
Related Issues (20)
- iterating over files with multiple ISAs HOT 3
- Doesn't handle arbitrarily large input files, and never will be able to HOT 5
- Duplicate Keys HOT 3
- Unknown patient gender in 270 causes validation error HOT 2
- value PR is not allowed in element NM101 HOT 2
- Segment ST Does not occur HOT 2
- Parse EDI 850 ERROR HOT 1
- Accept Tempfile in Stupidedi::Reader.build HOT 1
- Segment N1*PR~ cannot be reached
- Parsing an 837 and grabbing segment values HOT 2
- Is there a way to skip validations and build without some of the segments HOT 2
- 004010 version - B3-07 precision doesn't work as intended HOT 2
- value 091 is not allowed in element DTM01 Date/Time Qualifier HOT 2
- TD1 for X12 Release 4010 gets reduced to 2 fields instead of 10 for no reason HOT 1
- 835 - 005010X221A1 - NTE segment error HOT 2
- Stream writing HOT 2
- help wanted: Only the first element is return when iterating a repeated element HOT 2
- Inconsistent floating point output in 834 ICM data HOT 9
- Adding the additional accepted values for a segement HOT 1
- File permissions issue on v1.4.3 HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stupidedi.