ICD-10 Billable-Flagged Order Codes Sample File, with folding applied.
The Foldable Record Blocks concept is applicable only with Mixed Record-type Fixed-width Data Files with hierarchical data. Therefore, the Foldable Record Blocks concept does NOT apply to all fixed-width files, especially Homogenous Record-type Fixed-width Data Files.
In a file with Foldable Record Blocks:
- Record types that can be designated as block headers are folding nodes. Every record block starts with a folding node.
- Record types that are merely members of a record block are leaf nodes. Some leaf node records can be designated as terminators of specific record blocks.
-
When there are folding node records with varying levels of priority (or precedence), a nested structure of record blocks will emerge.
-
A nested structure can also emerge if folding node records with equal precedence are also recursive.
To understand this latter case better with an analogy in a programming language, consider the
IF ... THEN
conditional block and theDO WHILE ...
iteration block. Both control blocks can be recursive. Both will also have same level of precedence. That is, anIF ... THEN
block can enclose aDO WHILE ...
block or the other way around, yielding many levels of nesting in multitudinous ways.
-
Multiple Block Termination (End of File): At the end of file, all record blocks are automatically terminated.
-
Multiple Block Termination (Outranking): A record block with higher precedence will terminate multiple levels of nested record blocks with lower precedence and immediately preceding it in the data file.
-
Single Block Termination (Peer & Non-Recursive): A new record block will terminate a single level of record block that immediately precedes it in the data file if that preceding block has an equal precedence while also being non-recursive.
-
Innermost Nested Block Termination (Block-ending Leaf Node Record): A leaf node record can terminate a record block for which it has been designated as a block-ending record. If a leaf node record has been designated as a block-ending record for multiple record types with differing or nested levels of precedence or recursion, only the still-open, innermost applicable block will be terminated.
To understand this last case better with an analogy in a programming language, consider multiple levels of nested
IF ... THEN
blocks. The firstEND IF
will terminate the innermostIF ... THEN
block. The nextEND IF
will terminate the enclosing, next innermostIF ...THEN
block, and so on.
A Foldable Record Scheme can be associated with a single Fixed-width File Type as defined in the File Type Metadata Editor.
With that associated File Type as the reference basis, you will then need to specify:
-
Header Records: The Record Types that will serve as block headers i.e., folding nodes.
-
Block Priority: A numeric value denoting the order priority for a record block. A block with lower numeric value of priority will enclose a block with higher numeric value of priority. i.e., A block with lower numeric value of priority will have a higher precedence.
-
Block Recursiveness: This flag will specify whether specific record blocks with same priority value will nest inside each other. For most data files, record blocks will be non-recursive.
-
Block Termination: This will be an optional list of Record Types that will terminate a specific record block.
For more information, see: Fold Structures Editor
The definition schemes for record blocks will reside in the new FoldStructs.ini
file. Upon the first run of Notepad++ after upgrading the FWDataViz dll with the Foldable Record Blocks feature, this new file will get copied into one of the two folder locations:
-
%APPDATA%/Notepad++/plugins/Config/FWDataViz/
(for non-portable installs of Notepad++)OR
-
<Notepad++_executable_folder>/plugins/Config/FWDataViz/
(for portable installs of Notepad++)
- In the
Base
section, theFoldStructCount
key value should indicate the number of File Types that are being defined with folding record blocks.
-
Each File Type will have its own section in the format FSnnn, starting with
FS001
. -
FileType
: This value must exactly match the corresponding File Type section name in theVisualizer.ini
file. -
FileLabel
: This value must optionally match the correspondingFileLabel
value in theVisualizer.ini
file. -
FoldLevelAuto
: This value can be eitherY
orN
. This will specify if the plugin should automatically try to do a full file scan and apply the specified folding structure for the matching File Type after a file loads in the Notepad++ editor, . Recommend setting this toN
for File Types with likely large data files, when this process can take a long time. -
HeaderRecords
: A comma-separated list of Record Types (see Header Records under: Scheme). The Record Types in the list must exactly match the corresponding Record Types of associated the File Type in theVisualizer.ini
file. -
RECnnn_Priority
: A numeric value (see Block Priority under: Scheme).Recommend using values in increments of 10, so that blocks that need to be added at a later time can be specified with intermediate values. For example, the outermost record block can have a priority of 10, the next record block that may be enclosed within it can have a priority of 20, and so on.
-
RECnnn_Recursive
: This value can be eitherY
orN
(see Block Recursiveness under: Scheme). For most data files, this value will beN
. -
RECnnn_EndRecords
: An optional, comma-separated list of Record Types (see Block Termination under: Scheme). The Record Types in the list must exactly match the corresponding Record Types of associated the File Type in theVisualizer.ini
file.
Viewing the sample files, and then reviewing their definitions in the FoldStructs.ini
file will help clarify the Foldable Record Blocks concept and usage.
This file has the most basic record block folding with just two record types, and only one level of folding.
This file has three levels of hierarchical folding. Yet the structure is not too complex since there is no recursive nesting.
This sample file is named after the icon of a serpent eating its own tail. This contrived sample file has been included to showcase the full possibilities with the Foldable Record Block feature of FWDataViz.
-
The
P3
record type has 20 fields, each 3-characters wide.P3
record type is recursive, and is terminated by theQ4
record type. -
The
Q4
record type has 15 fields, each 4-characters wide.Q4
record type is recursive, and is terminated by theR5
record type. -
The
R5
record type has 12 fields, each 5-characters wide.R5
record type is recursive, and is terminated by theS6
record type. -
The
S6
record type has 10 fields, each 6-characters wide.S6
record type is recursive, and is terminated by theP3
record type. -
The
TF
record type 5 is non-recursive. TheTF
record type terminates all other record types:P3
,Q4
,R5
&S6
.
💡 To gain better sense of the recursive and nested folding structure in this file, turn on the Show Calltip option on the plugin panel, and then click through lines 1 to 10. The last line within the calltip will indicate the fold level of the current line.
To illustrate the nesting of fold levels in this file, the levels are indented in the clip below.
See also: Extract Configuration Data | Append Configuration Data