nc_834v5010generator - project status - November

Nov 13, 2014 08:25



2014-11-13

Kinda doing a minor major rewrite of the _834v5010validator, _834v5010segment, and _834v5010dataElement objects.

I've been slowly adding 834v5010 Segment and Data Element definitions to the _834V5010RULES file, then running DDD and stepping through the code, to see if I had captured the algorithm for loading Segments, Data Elements, and Data Element Codes correctly.

At first I just started with ISA, then would use it to work on the _834v5010validator's read/load code into in-memory objects that represent the transaction, that will be then used to validate any files the User creates or edits.

So, recently, I got to the point the _834v5010RULES file contains definitions for the ISA, GS, ST, and BGN segments, and their data elements, and the data element's codes (if the DE is of type IDENTIFIER).

Well, that's where I noticed I had only coded up the Requirements definition for data elements and segments, notated by 'M', 'O', and 'X' in the TR3. I realized I also needed to add attributes into the program for storing the Industry Usage, notated by REQUIRED, NOT USED, and SITUATIONAL.

I also had to re-write the _834V5010RULES file to have text for the requirements designator and industry usage. A segment (using ISA as an example) now looks like:

SEGMENT_IDENTIFIER ISA
SEGMENT_NAME INTERCHANGE CONTROL HEADER
SEGMENT_INDUSTRY_USAGE REQUIRED
SEGMENT_REPEAT 1

And a data element (using ISA01 as an example) now looks like:

DATA_ELEMENT_IDENTIFIER ISA01
DATA_ELEMENT_NAME Authorization Information Qualifier
DATA_ELEMENT_INDUSTRY_USAGE REQUIRED
DATA_ELEMENT_REQUIREMENT_DESIGNATOR M
DATA_ELEMENT_DATA_TYPE ID
DATA_ELEMENT_DATA_CODE 00 No Authorization Information Present (No Meaningful Information in I02)
DATA_ELEMENT_DATA_CODE 03 Additional Data Identification
DATA_ELEMENT_MINIMUM_LENGTH 2
DATA_ELEMENT_MAXIMUM_LENGTH 2

I also decided to remove generating debugging strings of the in-memory objects, and instead will have the validator have a method that generates as output text that is of the same format as the _834V5010RULES files, where the information comes from the in-memory objects.

I'll know when all is correct, when the output diff'd to the input file looks the same, in terms of the _834V5010RULES text.

So, that's where I am at, currently.

2014-11-14

Working on displaying the output of the in-memory Segments and DataElements as a CDK scrollable text viewer, in Ncurses834v5010view::displayLoadValidationRulesGUI(ProgramMode & programMode, ViewMode & viewMode, CDKSCREEN * pCdkScreen)

CDK_List

2014-11-20

Feeling HAPPY: Figured out that CDK's CDKViewer wants a 'list**' that has a last cString item that is null. This requirement is not really mentioned in any of the CDK source code examples. I only found by burning hours of research, to see that the cdk.c 'read a file into a list**' always added one additional char* value that was NULL.

Once I saw that 'add a null item to the end of list**', I updated my CDK_List to optionally do the same, and now my code correctly displays the list** objects I create via my own CDK_List.

Also, updated the Ncurses834v5010view to use getcwd/unistd.h and store the initial directory upon program startup, as I need it to then navigate to the _834v5010RULES file.

Made sure the updates compiled successfully. Updated the sourcecode to the website http://mrflash818.geophile.net/software/nc_834v5010generator/

2014-11-21

Thanks to the fix for CDK_List, now the _834v5010RULES file text is displaying correctly on the "nc_generator - load validation rules" screen. Was able to find and fix a small handful of bugs in the _834v5010RULES file.

Right now the _834v5010validator code works for loading all of the attributes and data elements for the ISA segment. Next I need to add code for handling the DATA_ELEMENT_LAST_ELEMENT_FOR_THE_SEGMENT flag, so the validator can switch state, and then be in a mode to begin reading the next segment in the file.

Uploaded the fixed _834v5010RULES file, and the program source code, to the website.

2014-11-22

Added code to _834v5010validator to handle DATA_ELEMENT_LAST_ELEMENT_FOR_THE_SEGMENT. Now the validator reads/loads-in-memory-834/displays ISA,GS, ST, and BGN up to BGN09, which is the entire _834v5010RULES file. Huzzah! All of those segments and all of their data elements are displaying properly in the 'load validation rules' screen : )

Now my program is also a good self-help tool, as it let's me know if I made a mistake in manual data entry to the _834v5010RULES file.

Next, need to keep adding to the _834v5010RULES file, until the entire X12 834v5010 transaction is defined, and loads into the validator.

Uploaded the fixed _834v5010RULES file, that now goes up to BGN09, and the program source code, to the website.



2014-11-29

Did no coding. Focused on adding to the _834v5010RULES file. Did a few hours of manual data entry. Stopped at

robert@debian:~/projects/cplusplus/_834v5010generator/validator$ tail _834v5010RULES
DATA_ELEMENT_DATA_TYPE ID
DATA_ELEMENT_DATA_CODE _ Empty
DATA_ELEMENT_MINIMUM_LENGTH 1
DATA_ELEMENT_MAXIMUM_LENGTH 1
DATA_ELEMENT_LAST_ELEMENT_FOR_THE_SEGMENT

#
# INS - MEMBER LEVEL DETAIL - Loop 2000
# TR3 pg 47
#

834, nc_834v5010generator, cdk, cplusplus, programming

Previous post Next post
Up