Abstract:
A system, method and computer program for processing data having a plurality of data values contained in a plurality of data fields of varying types and lengths that includes encoding data values of the data fields into integer values, forming one or more first binary words from the binary form of the integer values, identifying a selected combination of the data fields, unpacking integer values of encoded data values of the identified data fields from the one or more first binary words, combining the unpacked integer values to form one or more second binary words, and employing each of the one or more second binary words as an input parameter to a selected function to derive output information collectively representing data values of the identified data fields. At least some portion of at least one of the one or more first binary words are formed from the binary form of the integer values encoded from at least two different data fields.

Description:
BACKGROUND OF THE INVENTION  
       [0001]     1. Field of the Invention  
         [0002]     The present invention relates to a system, method, and computer program for encoding, processing and decoding data that provides for enhanced speed and efficiency. More particularly, the present invention relates to a system, method, and computer program for encoding, processing and decoding a large volume of data having different types of data fields, arranged as collections of data values of varying length, that is stored and readily accessible from storage for use in the preparation of reports.  
         [0003]     2. Discussion of the Background  
         [0004]     In fields where a large volume of data is processed, such as the healthcare field, there is a continuing need to store a large volume of data that may have many different types or categories of data fields. For example, in the healthcare field, different data categories for respective patients may include diagnosis related data, procedures performed, inpatient length of stay and cost information. Further, other data categories may include the patent&#39;s age, ethnic and gender information. Hereinafter, a data field is used to describe a collection of data values, such as the column name for a column of data in a row-column table or database. It is frequently necessary to access the data related to these data fields after the data has been stored, such as generating reports that combine portions of data selected from different types of data fields.  
         [0005]     Data fields tend to vary in both data size and data type. A data type, for instance, may be, but is not limited to, numeric, alphanumeric, date, and currency. For example, cost and length of stay information may be represented as numerical values. Whereas, diagnoses, diagnosis related groups (DRG) and medical procedures may be represented as alphanumerical codes that identify particular diagnoses or procedures, respectively. Further, the size of a data field may vary depending on the maximum numerical value associated with the data field. Additionally, some types of data fields may be used as independent variables, while other types serve as dependent variables. An independent variable is defined as any variable for which counts are computed for each data value or group of values. Further, a dependent variable is defined as any variable for which meaningful statistics are computed for each independent variable or combination of independent variables. For example, in an important class of reports, independent variables may represent age, gender, diagnoses and procedures. Whereas, dependent variables may represent statistics, such as the length of stay and cost information that are calculated based on selected age, gender, diagnoses and/or procedures.  
         [0006]     Differences among respective types of data fields tend to impede efforts to efficiently store and access different data types in a common storage arrangement. In providing improved storage and access for such data, it is important to ensure that users will be able to readily generate reports of different kinds, each comprising a different combination of available stored data fields.  
       SUMMARY OF THE INVENTION  
       [0007]     Accordingly, one object of the present invention is to provide a method for processing data having a plurality of data values contained in a plurality of data fields of varying types and lengths. The method includes encoding data values of the data fields into integer values, forming one or more first binary words from the binary form of the integer values, and identifying a selected combination of the data fields. The method further includes unpacking integer values of encoded data values of the identified data fields from the one or more first binary words, combining the unpacked integer values to form one or more second binary words, and employing each of the one or more second binary words as an input parameter to a selected function to derive output information collectively representing data values of the identified data fields. At least some portion of at least one of the one or more first binary words are formed from the binary form of the integer values encoded from at least two different data fields.  
         [0008]     Another object of the present invention is to provide a method for encoding a plurality of data values contained in a plurality of data fields of varying types and lengths. The data values in one of the plurality of data fields are different in at least one of number, type and length from the data values in at least one other of the plurality of data fields. The method includes mapping each of the plurality of data values of a corresponding one of the plurality of data fields to an integer value in a corresponding plurality of integers, representing each integer value in one of the plurality of integers as a binary having a bit length determined by the largest integer value in the one of the plurality of integers, and combining respective binaries to form one or more binary words. Each of the one or more binary words are of the same specified length, and the binaries contained in at least one of the one or more binary words represents data values selected from different data fields.  
         [0009]     Yet another object of the present invention is to provide a computer program for processing data having a plurality of data values contained in a plurality of data fields of varying types and lengths. The computer program includes a first computer code for encoding data values of the data fields into integer values, a second computer code for forming one or more first binary words from the binary form of the integer values, and a third computer code for identifying a selected combination of the data fields. The computer program further includes a fourth computer code for unpacking integer values of encoded data values of the identified data fields from the one or more first binary words, a fifth computer code for combining the unpacked integer values to form one or more second binary words, and a sixth computer code for employing each of the one or more second binary words as an input parameter to a selected function to derive output information collectively representing data values of the identified data fields. At least some portion of at least one of the one or more first binary words are formed from the binary form of the integer values encoded from at least two different data fields.  
         [0010]     Still another object of the present invention is to provide a computer system for processing data having a plurality of data values contained in a plurality of data fields of varying types and lengths. The computer system includes a processor and a computer readable medium connected to the processor. The computer-readable medium includes processor instructions configured to be read by the processor and to thereby cause the processor to encode data values of the data fields into integer values, form one or more first binary words from the binary form of the integer values, and identify a selected combination of the data fields. Further, the processor is caused to unpack integer values of encoded data values of the identified data fields from the one or more first binary words, combine the unpacked integer values to form one or more second binary words, and employ each of the one or more second binary words as an input parameter to a selected function to derive output information collectively representing data values of the identified data fields. At least some portion of at least one of the one or more first binary words are formed from the binary form of the integer values encoded from at least two different data fields. 
     
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0011]     A more complete appreciation of the present invention and many of the attendant advantages thereof will be readily obtained as the same becomes better understood by reference to the following detailed description when considered in conjunction with the accompanying drawings, wherein:  
         [0012]      FIG. 1  is a flow chart illustrating an overview of a method and system for high speed encoding, processing and decoding of data according to an embodiment of the present invention;  
         [0013]      FIG. 2  is a flow chart illustrating creating definition files that specify distinct textual information relative to data defined as an alphanumeric data type according to an embodiment of the present invention;  
         [0014]      FIG. 3  is a flow chart illustrating creating an encoded database according to an embodiment of the present invention;  
         [0015]      FIG. 4  is a flow chart illustrating encoding data fields into integers according to an embodiment of the present invention;  
         [0016]      FIG. 5  is a flow chart illustrating packing binary words according to an embodiment of the present invention;  
         [0017]      FIG. 6  is a flow chart illustrating retrieving records according to an embodiment of the present invention;  
         [0018]      FIG. 7  is a flow chart illustrating extracting encoded words containing selected data fields according to an embodiment of the present invention;  
         [0019]      FIG. 8  is a flow chart illustrating creating a sorted binary tree according to an embodiment of the present invention;  
         [0020]      FIG. 9  is a flow chart illustrating generating a report according to an embodiment of the present invention;  
         [0021]      FIG. 10  is an example of an encoded dictionary file according to an embodiment of the present invention;  
         [0022]      FIG. 11  is an example of packing a binary word according to an embodiment of the present invention;  
         [0023]      FIG. 12  is an example of extracting data fields from a binary word according to an embodiment of the present invention;  
         [0024]      FIG. 13  is an example of a generated report according to an embodiment of the present invention; and  
         [0025]      FIG. 14  provides examples of definition files according to an embodiment of the present invention. 
     
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS  
       [0026]     Referring now to the drawings, wherein like reference numerals designate identical or corresponding parts throughout the several views, preferred embodiments of the present invention are described.  
         [0027]     Referring to  FIG. 1 , a flow chart illustrating an overview of a method and system for high speed encoding, processing and decoding of data according to an embodiment of the present invention is shown. Generally, the method and system for high speed encoding, processing and decoding of data uses one or more original dictionaries  12  and one or more encoded dictionaries  42  to generate an encoded form of one or more original dictionaries  12 . The encoded form of the one or more original dictionaries  12  includes, but is not limited to, one or more definition files  24 , one or more encoded databases  52 , and possibly one or more overflow files  54 . The creation of one or more definition files  24  that specify distinct textual information relative to data defined as an alphanumeric data type is shown generally at block  20  of  FIG. 1  and discussed in detail below with reference to  FIG. 2 . Further, the creation of one or more encoded databases  52  along with one or more overflow files  54  is shown generally at block  50  of  FIG. 1  and discussed in detail below with reference to  FIGS. 3-5 . Finally, the encoded form ( 24 ,  52  and  54 ) of one or more original dictionaries  12  is used to optimally process and decode data records as shown generally at block  130  of  FIG. 1  and discussed in detail below with reference to  FIGS. 6-9 .  
         [0028]     As shown at block  10  of  FIG. 1 , one or more original dictionaries  12  are created that specify data field information within one or more original databases  22 . For instance, an original dictionary  12  for an original database  22  having one or more ASCII data files may include, within an ASCII file, data field information, such as the field name, the field byte offset within an ASCII record, the field size in bytes, the field data type, key information, and the significant number of digits for floating point numbers. The field types in an original dictionary  12  include, but are not limited to, alphanumeric, integer, float, double, currency and date.  
         [0029]     An original dictionary  12  may be created either manually or using a computer program. The present invention envisions high speed encoding, processing and decoding of data that may be defined across databases never designed to collaborate and on different computer devices anywhere over a local network, an Intranet, the Internet, or other similar network. For instance, the high speed encoding, processing and decoding of data may be defined across multiple databases including, but not limited to, inpatient, outpatient, pharmacy, radiology and physical therapy databases representing both fixed and non-fixed length records.  
         [0030]     Optionally, the original dictionary  12  may be used to specify only a subset of the data fields within an original database  22  that are to be used in the encoding and decoding processing. The remaining fields in the original database would be excluded from the encoding and decoding processing, thereby reducing processing demands and storage requirements.  
         [0031]     As shown at block  40  of  FIG. 1 , one or more encoded dictionaries  42  are created. Each encoded dictionary  42  specifies data field information within one or more encoded databases  52 . Similar to the original dictionary  12 , the encoded dictionary  42  may be defined in an ASCII file or a database schema. Further, the field types in an encoded dictionary  42  include, but are not limited to, alphanumeric, integer, float, double, currency and date. An encoded dictionary  42  may be created either manually or using a computer program.  
         [0032]     An encoded dictionary  42  may be configured as a table for each of the data fields and associated information, as follows:  
         [0033]     (1) overflow—a data value having an overflow value results in real data value being fetched from an external location, such as another file;  
         [0034]     (2) definition—if non-zero, this variable is associated with a definition file. This file consists of all the titles, names or descriptions for the codes;  
         [0035]     (3) word—a database record is made up of unsigned integers of 32 bits. The word indicates which word in the record contains the data field;  
         [0036]     (4) bits—the number of bits required to contain the data field value;  
         [0037]     (5) decimals—applies only to floating point numbers. The number of decimals places in the value;  
         [0038]     (6) shift—the number of bits needed to shift a binary value to the right before masking in order to extract the value; and  
         [0039]     (7) baseline—for data type “date” it is the baseline. For all other types of data, it serves other purposes.  
         [0040]     For instance,  FIG. 10  shows an encoded dictionary file  42 A configured as a table according to an embodiment of the present invention. The encoded dictionary file  42 A includes data field information that specifies the binary structure of a encoded dictionary file  42 A. The data field information includes columns for each of the data fields including, but not limited to, specifying the field name  230 , the field right-bit shift offset  242  within a binary word  236 , the field size in bits  238 , the field data type  246 , key information  248 , and the significant number of digits  240  for floating point numbers. For example, the binary DRG data field  250  in the encoded dictionary file  42 A is located one bit ( 242 ) from the rightmost word boundary of the third word ( 236 ) and has a size of ten bits ( 238 ).  
         [0041]     Referring to  FIG. 2 , a flow chart illustrating creating definition files that specify distinct textual information relative to data values defined as an alphanumeric data type according to an embodiment of the present invention is shown. Generally, a separate encoded definition file  24  is created containing the sorted unique data values for each data field having an alphanumeric data type. More specifically, as shown at block  26 , the records from one or more original databases  22  are read, and the data values having an alphanumeric data type, as defined by a corresponding one or more original dictionaries  12 , are extracted from the records of the original databases  22 . As shown at block  28 , those data values are then uniquely sorted into a predefined order, such as an ascending sort order, with all duplicates removed. The uniquely sorted data values are then written to the one or more definition files  24 , as shown at block  30 .  FIG. 14  shows portions of example Diagnosis  24 A and DRG  24 B definition files.  
         [0042]     Optionally, one or more encoded dictionaries  24  may be created manually using any commercially available ASCII text editor  34 . Further, one or more ASCII files  32  may be created by any means and then read as records at block  26  instead of using the one or more original databases  22 .  
         [0043]     Referring to  FIG. 3 , a flow chart illustrating creating an encoded database according to an embodiment of the present invention is shown. One or more encoded databases  52  are created by encoding one or more data fields read from the one or more original databases  22  into one or more integers, as shown generally at block  60  of  FIG. 3  and discussed in detail below with reference to  FIG. 4 . Next, the one or more data fields are packed into one or more words, as shown generally at block  100  of  FIG. 3  and discussed in detail below with reference to  FIG. 5 . The integer data values and the associated encoded binary size (m) of that data field are used to pack the integer values in binary form into words, such as 32-bit words. This is carried out by means of shift and bitwise operations. Notably, the use of a 32-bit word is merely illustrative and is not intended to limit the size of a word. Rather a word may work equally as well with other sizes including but not limited to 16-bit, 64-bit and 128-bit words. Finally, the one or more packed words are written to one or more encoded databases  52 , as shown at block  120 .  
         [0044]     Referring to  FIG. 4 , a flow chart illustrating encoding data fields into integers according to an embodiment of the present invention is shown. As shown at block  62 , data values of data fields, specified by one or more original dictionaries  12 , are read from the one or more original databases  22 . As previously discussed, the field types in an original dictionary  12  include, but are not limited to, alphanumeric, integer, float, double, currency and date. Thus, the data values of data fields having different data types are read from the one or more original databases  22 .  
         [0045]     Generally, each data value of a data field is mapped to an integer value in a collection of integers. The number of integers in the collection of integers is equal to the number of distinct data values in the given data field. Obviously, there are differences in converting data values of different data types to integer values. Therefore, the data type for the data field is determined at logic block  64 . For purposes of illustration, five data types comprising integer  66 , float/double  68 , currency  70 , date  72  and alphanumeric  74  are shown. The data value of a data field having an alphanumeric data type  74  may represent a code for particular diagnosis or medical procedure. Other data values having numerical data types may be converted to a corresponding integer value, as shown in blocks  76 - 80 . It is to be understood, however, that the invention could readily be used with other data types as well representing both medical and non-medical related data.  
         [0046]     More specifically, as shown at block  76 , a data value having a float/double data type is converted to an integer value (n), by multiplying the data value by 10 d , where d is the number of significant decimal places. Similarly, a data value having a currency data type is converted to an integer value by multiplying the data value by 10 2 , as shown at block  78 . Further, a data value having a date data type is converted to an integer value by calculating the number of days between the data value date and a prior pre-determined base line date, such as 01/01/YYYY, as shown at block  80 .  
         [0047]     Additionally, as shown at block  82 , an entry is located in one or more definition files  24  that matches the data value of a data field having an alphanumeric data type. For each data value, an integer value is determined that represents the absolute sorted position (“rank”) in relation to other members of the data field. More specifically, as shown at block  84 , the data value is set to the rank which represents the absolute record offset from the beginning one of the definition files  24 . Thus, the data value of an alphanumeric data field is mapped to an integer value in a distinct integer collection of the same rank in its ascending order.  
         [0048]     After all data values in a data field have been converted to integer values, the minimum number of bits required to hold or represent each integer value in binary form is determined, as shown at block  86 . The minimum number of bits required to hold or represent a particular data value in binary form (b) is computed as X≧LogN/Log2, where (N) is the largest number in the corresponding integer collection. Optimally, X is the lowest number that meets this condition. As shown at logic block  88 , if the minimum number of bits (b) is greater than the encoded binary size (m) of that data field, as specified in one of the encoded dictionaries  22 , then an that entry is added to one or more overflow files  54 , as shown at block  90 . Further, as shown at block  92 , the data value (n) is set equal to the (2 m −1), where (m) is the encoded binary size of that data field. If the minimum number of bits (b) is not greater than the maximum number of bits (m) allocated for that data field, then processing continues  94 .  
         [0049]     Referring to  FIG. 5 , a flow chart illustrating packing binary words according to an embodiment of the present invention is shown. As shown at block  102 , a 32-bit word (w) is initialized with the data value (n 1 ) of the first data field. As shown at block  104 , the 32-bit word is then left-bit shifted according to the encoded binary size of the next data field, as specified in one of the encoded dictionaries  42 . An accumulative add is then performed on the word with the data value of the next data field, as shown at block  106 . This continues until the word is packed, as shown at logic block  108 .  
         [0050]     Referring to  FIG. 11 , an example of packing a binary word according to an embodiment of the present invention is shown. Data fields corresponding to Diagnosis Related Group (DRG), Diagnosis 3  and Length of Stay (LengthOfStay) are shown on lines  260 - 264 , respectively. The data field for the Diagnosis 3  category (25000), shown on line  262 , is a numeric code used to represent diabetes. Assuming there are a total number of 15535 data values in the Diagnosis 3  data field, then 14 bits are needed to represent any data value contained therein. For example, if the data value (25000), shown on line  262 , is ranked as the 2,452nd data value in the Diagnosis 3  data field, then it is represented by the integer value 2452. The right hand entry of line  262  shows the 14-bit binary form (00100110010100) of the integer value 2452.  
         [0051]     Similarly, the data value for the DRG data field ( 243 ) is shown in its 10-bit binary form (0011110011), as shown on line  260 . Further, the data value for the Length of Stay data field (84 days) is also shown in its binary form (01010100), as shown on line  264 .  
         [0052]     As shown on line  266 , the binary form of the data value for the Diagnosis 3  data field is positioned as the 14 right-most bits of a 32-bit word (word=Diagnosis 3 ). The word is then shifted to the left by 10 bits (word &lt;&lt;=10), as shown on line  268 . The binary form of the data value for the DRG data field is then inserted as an accumulative add to the 10 right-most bits of the 32-bit word (word +=DRG), as shown on line  270 . The 32-bit word containing the binary forms of the data values for the Diagnosis 3  data field and DRG data field is then shifted to the left by 8 bits (word &lt;&lt;=8), as shown on line  272 . Finally, the binary form of the data value for the Length of Stay (LengthOfStay) data field is then inserted as an accumulative add to the 8 right-most bits of the 32-bit word, as shown on line  274 .  
         [0053]     Referring to  FIG. 6 , a flow chart illustrating retrieving records according to an embodiment of the present invention is shown. Initially, as shown at block  140 , data fields are selected or specified for retrieval from one or more encoded databases  52 . Selection of one or more selected data fields for retrieval may either be done manually or using a user interface. Typically, the selected or specified data fields will be information required to generate a particular report. Also, different specified data fields will frequently be stored (in their respective encoded forms) in different packed words, such as 32-bit words. The selected data fields are extracted from one or more words, as shown generally at block  150  of  FIG. 6  and discussed in detail below with reference to  FIG. 7 . The selected data fields are then packed into one or two binary form temporary words, as shown at block  170 , used as input parameters to a binary tree algorithm function, as shown generally at block  190  of  FIG. 6  and discussed in detail below with reference to  FIG. 8 . Packing the variables into one or two words takes less memory for the binary tree algorithm function. As such, any of following may be used as input parameters to the binary tree algorithm function:  
         [0054]     (1) no dependent variables and all independent variables are encoded into one 32-bit word and passed as a single parameter;  
         [0055]     (2) no dependent variables and all independent variables are encoded into two 32-bit words and passed as two parameters;  
         [0056]     (3) one or more dependent variables and all independent variables are encoded into one 32-bit word and passed as a single parameter; or  
         [0057]     (4) one or more dependent variables and all independent variables are encoded into two 32-bit words and passed as two parameters.  
         [0058]     A sorted binary tree is created with corresponding frequencies using the one or two temporary words, as shown generally at block  190  of  FIG. 6  and discussed in detail below with reference to  FIG. 8 . As shown at logic block  208 , processing continues until all records have been processed. Finally, a report is generated based upon the selected data fields, as shown generally at block  210  of  FIG. 6  and discussed in detail below with reference to  FIG. 9 .  
         [0059]     More specifically, referring to  FIG. 7 , a flow chart illustrating extracting encoded words containing selected data fields according to an embodiment of the present invention is shown. As shown at block  152 , a word containing a selected data field, as specified by one of the encoded dictionaries  42 , is retrieved from one of the encoded databases  52 . The word is right-bit shifted according to the shift offset for the encoded binary field, as shown at block  154 . Next, as shown at block  156 , the selected data field is extracted from the word using a bit-mask calculated from the encoded binary size of that data field. For instance, as shown in  FIG. 10 , a word containing a data value of a Diagnosis 3  data field  252  is right-bit shifted by 18 bits according to the shift offset  242 . The data value of the Diagnosis 3  data field is then extracted by bit-masking the word with (2 14 −1), where  14  represents the encoded binary size in bits  238  of the Diagnosis 3  data field  252 . Processing then continues for all selected data fields in all words containing the selected data fields, as shown at logic blocks  158  and  160  of  FIG. 7 .  
         [0060]      FIG. 12  shows an example of extracting data fields from a binary word according to an embodiment of the present invention. In this example, the Diagnostic 3 , DRG and Length of Stay (LengthOfStay) data values are extracted from a 32-bit word (word) using bitwise and mask operations, as shown at lines  282 - 294 . Mask 1   276 , mask 2   278  and mask 3   280  comprise 14-bit, 10-bit, and 8-bit binary masks, respectively, shown in binary forms.  
         [0061]     As shown on lines  284  and  286 , the LengthOfStay portion (bits  0 - 7 ) of the original 32-bit word shown on line  282  is extracted. The original 32-bit word shown on line  282  is right-bit shifted by 0 bits as shown on line  284 . Next, the resulting 32-bit word is ANDed with mask 3   280 , thereby removing the bits that are not contained in both the right shifted 32-bit word and mask 3   280 . Thus, mask 3   280  is used to remove the leftmost  24  bits from the resulting 32-bit word while keeping the rightmost 8 bits, thereby extracting the LengthOfStay portion of the 32-bit word (bits  0 - 7  of the original 32-bit word shown on line  282 ).  
         [0062]     Next, as shown on lines  288  and  290 , the DRG portion (bits 8- 17 ) of the original 32-bit word shown on line  282  is extracted. The original 32-bit word shown on line  282  is right shifted by 8 bits, as shown on line  288 . Thus, the LengthOfStay portion of the original 32-bit word is removed. Next, the resulting 32-bit word is ANDed with mask 2   278 , thereby removing the bits that are not contained in both the right-bit shifted 32-bit word and mask 2   278 , as shown on line  290 . Thus, mask 2   278  is used to remove the leftmost 22 bits from the right shifted 32-bit word while keeping the rightmost 10 bits, thereby extracting the DRG portion of the 32-bit word (bits  8 - 17  of the original 32-bit word shown on line  282 ).  
         [0063]     Next, as shown on lines  292  and  294 , the Diagnosis 3  portion (bits  18 - 31 ) of the original 32-bit word shown on line  282  is extracted. The original 32-bit word shown on line  282  is right shifted by 18 bits, as shown on line  292 . Thus, the LengthOfStay and DRG potions of the original 32-bit word are removed. Next, the resulting 32-bit word is ANDed with mask 1   276 , thereby removing the bits that are not contained in both the right-bit shifted 32-bit word and mask 1   276 , as shown on line  294 . Thus, mask 1   276  is used to remove the leftmost 18 bits from the right-bit shifted 32-bit word while keeping the rightmost  14  bits, thereby extracting the Diagnosis 3  portion of the 32-bit word (bits  18 - 31  of the original 32-bit word shown on line  282 ). However, in this example, mask 1   276  is not necessary to extract the data value for the Diagnosis 3  data field because the LengthOfStay and DRG potions of the original 32-bit word were previously removed leaving only the Diagnosis 3  portion after the original 32-bit word was right-bit shifted by 18 bits.  
         [0064]     Referring to  FIG. 8 , a flow chart illustrating creating a sorted binary tree according to an embodiment of the present invention is shown. One or two new temporary binary form words are used as input parameters to a binary tree algorithm. In particular, as shown at block  192 , the first word that is input into the binary tree algorithm creates the root node for a sorted binary tree. Each successive word is uniquely sorted as appropriate in the sorted binary tree, as shown at logic block  194  and blocks  196  and  200 . As shown at block  198 , if the successive word is not unique, then a frequency count is incremented. Next, a determination is made as to whether there are any associated dependent variables, at logic block  202 . If there are associated dependent variables, then the number (number +=1), a total (total +=x) and a sum of squares (ssq+=x 2 ) are accumulated for the dependent variables, as shown at block  204 , where (x) is the data value of the selected data field. As shown at logic block  206 , processing continues until all words in all records are sorted.  
         [0065]     Referring to  FIG. 9 , a flow chart illustrating generating a report according to an embodiment of the present invention is shown. As shown at block  212 , a word is retrieved form the sorted binary tree. The word is right-bit shifted according to the shift offset for the encoded binary field, as shown at block  214 . Next, as shown at block  216 , the selected data field is extracted from the word using a bit-mask calculated using the encoded binary size of that data field. As shown at logic blocks  218  and  220 , processing continues for all data fields in all words. The binary form integer values are then decoded to provide data values in their original units, statistical information is calculated, and the results are output to an ASCII text file or formatted output file for use in generating the desired report, as shown at blocks  222 - 226 , respectively. Statistical information may include, but is not limited to, the number (n), the adjusted sum of squares (assq=ssq−(total 2 /n)), variance (v=assq/(n−1)), mean (m=total/n) and standard deviation (sd=iv). For instance,  FIG. 13  shows an example of a generated report outputting covered charges for Medicare inpatients by sex and age.  
         [0066]     As an example demonstrating the successive steps for retrieving stored data from one or more encoded databases  52 , assume that a report needs to be generated that shows the number of patients with or without surgery by discharge status and sex at a particular hospital. Further, assume that the Surgery Indicator, Discharge Status and Gender data fields are selected. These types of data fields are considered to be independent variables. Data values from each of these data fields are successively extracted, record by record, and packed into new binary words, as previously discussed with reference to  FIG. 7 . These words are then used as input parameters to the binary tree algorithm, as previously discussed with reference to  FIG. 8 . In the binary tree algorithm each unique Surgery Indicator/Discharge Status/Gender combination generates a distinct level for output and one count is added for that level each time a new binary word matches it. After all the records in one or more of the encoded databases  52  have been processed, the count frequency for each unique Surgery Indicator/Discharge Status/Gender combination may be used to provide the desired information for the report.  
         [0067]     Other data fields, such as Hospital Length of Stay and Currency Amounts, are referred to as dependent variables because they are used to compute statistics, such as number, mean, total and standard deviation. Dependent variable data fields are extracted from the binary words stored in one or more encoded databases  52 , record by record, and then stored in a structure which is appended to the packed independent variable parameter words, as previously discussed with reference to  FIGS. 6-8 . Generally, the binary tree algorithm can accumulate frequencies and/or statistics for all combinations of data values, as previously discussed with reference to  FIG. 8 .  
         [0068]     After all of the records in one or more of the encoded databases  52  have been processed, a binary tree algorithm is used to produce packed parameter words, their respective frequencies and associated statistics. The encoded data values, that is, integers in binary form, are unpacked from the parameter words using shifting and masking operations. The binary form integer values are then decoded to provide data values in their original units, and outputted to an ASCII text file or formatted output file for use in generating the desired report.  
         [0069]     The present invention thus includes a computer program which may be hosted on a storage medium and includes instructions which perform the processes set forth in the present specification. The storage medium can include, but is not limited to, any type of disk including floppy disks, optical disks, CD-ROMs, magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs, flash memory, magnetic or optical cards, or any type of media suitable for storing electronic instructions.  
         [0070]     Obviously, many other modifications and variations of the present invention are possible in light of the above teachings. The specific embodiments discussed herein are merely illustrative, and are not meant to limit the scope of the present invention in any manner. It is therefore to be understood that within the scope of the disclosed concept, the invention may be practiced otherwise than as specifically described.