6.0 Inventory/Journal files setup
 .  
This documentation applies to Glasses Inventory Version 7.6-3 (or higher) and Glasses Reader version 4.7-2 (or higher).

      Located in the My Documents area drive are two folders: 1) Glasses_Inventory (for the Glasses Inventory Program) and 2) Glasses_Data (for the Glasses Reader Program.  In the Glasses_Inventory folder you find 1) Total_Inventory.txt and 2) JournalFile.txt.  These files record the total currently available inventory.  A third file "Diagnostic File" is also available if it is set in program options.  These three files are documented below.   In the Glasses_Data folder you will find the Total_Inventory.txt documented below.

     When the program is first asked to show inventory, it loads the inventory from these two files.  First it loads all the settings in the "Total_Inventory.txt" file and then later it modifies those settings with the contents of the "JournalFile.txt" file.  Typically at the beginning of a clinic the entire inventory of the program is recorded in the "Total_Inventory.txt" file while the Journal file is zero length and contains no information.  As glasses are used, this inventory reduction is recorded in the Journal file.  This means that the P.C. can be shut down and restarted later and it will automatically return to the last inventory level.

 Date-Time Files
Both the JournalFile.txt and also the Total_Inventory.txt files can be named:  JournalFile-Date-Time.txt and also Total_Inventory-Date-Time.txt
These are "prior" versions of the files.  Those files which do not have "date-time" in their name are the most current versions of the files.

These "date-time" files are created whenever a new version of the current file is needed.  For example when Glasses Reader does a SORT function (button at bottom/right of the screen), the current version of the total_inventory.txt file is renamed to total_inventory-Date-Time.txt and a new total_inventory.txt file is created.  Whenever the new total_inventory.txt file is transferred to the Glasses Inventory program (via File | Transfer inventory to Glasses Inventory program) the current copy of the total_inventory.txt file which Glasses Inventory is using is renamed to total_Inventory-Date-Time.txt and a new version of the Total_Inventory.txt file is put in place.  This same thing happens with the JournalFile.txt file as it also is renamed to JournalFile-Date-Time.txt before inserting new empty JournalFile.txt file into place.

 Total Inventory File                                         <--- Back to top of section.
Each prescription inventory record in the "Total_Inventory.txt" file is formatted as shown in the below example:

25,-5.00,-.00,00,,-5.75,-.00,00,,0,0,0,0,0,M,0,Com,10/6/2001,9:54:41 AM
Nr, Ls, Lc, Lx, La, Rs, Rc, Rx, Ra, Sg, Re, Sc, Pr, Bf, Sz, RGn, Cm, Dt, Tm
Where:
   Nr = Eyeglasses inventory number from 1 to 10,000 (maximum),
   Ls = Left Spherical power in Dioplers,
   Lc = Left Cylindrical power in Dioplers,
   Lx = Left Axis in Degrees,
   La = Left Add power in Dioplers,
   Rs = Right Spherical power in Dioplers,
   Rc = Right Cylindrical power in Dioplers,
   Rx = Right Axis in Degrees,
   Ra = Right Add power in Dioplers,
 The following 1/0 = Yes/No flags:
   Sg = Yes/No Sunglasses,
   Re = Yes/No Reading glasses,
   Sc = Yes/No lens are scratched,
   Pr  = Yes/No progressive lens,
   Bf  = Yes/No bifocal lens,
   Sz = S for small, M for Medium, and L for large,   (For some lensmeters, this shows as a number for PD in mm)
   R=  Number of rejects for this pair of glasses. This number is combined with Gn below.
   Gn = Gender.  0= Either Male or Female, 1=Female, 2=Male, 3=Child.
   Cm = Comment on the glasses,
   Dt =  Date glasses were measured,
   Tm = Time glasses were measured.

VERY IMPORTANT:
The author of this program uses a Reichert AL200 Lensometer to read the prescriptions of the eyeglasses.  It has been interfaced to a computer to capture each reading and automatically place it into the "Total_Inventory.txt" file in the exact format required above.  Using the "Glasses Reader" program (described at this link:Reader Program) you can do the following list of basic functions:
    1.  Transfer readings from 23 different lensmeters (as shown below) to an inventory file and/or bar code printers.
    2.  Manually enter data into the system using a specially designed screen keyboard.
    3.  Scan in data from bar coded labels previously created by this program.
Paintbrush Picture
If anybody reading this should purchase any of the above units, I will gladly provide the program to go with it for a $50 donation to my ministry fund.  If you are making your reading with a manual Lensometer, then I suggest that you either use the manual function of the above program or construct the file into a multicolumn spreadsheet in Microsoft Excel formatted as follows:
(Columns B, C, and D which are L-Sphere, L-Cylinder, L-Axis have been removed from the above illustration for space).

The spreadsheet can then be saved as a ".CSV" file (comma delimited) and then renamed to "Total_Inventory.txt" for use by the program.  The first title line must be removed for proper operation of the program.

 The Journal File                                        <--- Back to top of section.
The journal file contains these record types to record the use of inventory and to also provide a record of the various prescriptions encountered.  Here is an example of the different types of records:
450,True,1,-1.50,0.00,000,0.00,(-1.50),-0.50,0.00,000,0.00,(-0.50)
Nr, Flag, Pn, Lsr, Lcr, Lar, Lrp, Lse, Rsr, Rcr, Rar, Rrp, Rse
Where:
   Nr = Index into inventory file starting at one.  It is ONLY the Inventory number used if there are no gaps in your inventory.
   Flag = "True" to remove from inventory and "False" to put back in inventory.  
             If this flag is a number then it indicates the number of rejects which have occurred for this pair of glasses.
  Pn = Person number receiving glasses,
   Lsr = Left Sphere reading,
   Lcr = Left Cylinder reading,
   Lar = Left Axis reading,
   Lrp = Left Reading Power,  (=Left Sphere + Left Add)
   Lse = Left Spherical equivalent,
  Rsr = Right Sphere reading,
  Rcr = Right Cylinder reading,
   Rar = Right Axis reading,
   Rrp = Right reading power, (=Right Sphere + Right Add) and
  Rse = Right Spherical equivalent.

The below record is added to the Journal file when you click the button Entitled Save UN-Matched Prescription.
You can see the unmatched prescriptions by going to Reports and select Display Measurements without a Match.

Here is what the record in the Journal file looks like:
Measurement,3,-1,14,2.00,2.50,4.00,-1.25,60,2.00,3.38
Measurement, Lsr, Lcr, Lar, Lrp, Lse, Rsr, Rcr, Rar, Rrp, Rse
Where:
   Measurement = Indicator that this record is a measurement of a person,
   Lsr = Left Sphere reading,
   Lcr = Left Cylinder reading,
   Lar = Left Axis reading,
   Lrp = Left Reading Power,  (=Left Sphere + Left Add)
   Lse = Left Spherical equivalent,
   Rsr = Right Sphere reading,
   Rcr = Right Cylinder reading,
   Rar = Right Axis reading,
   Rrp = Right reading power,  (=Right Sphere + Right Add) and
   Rse = Right Spherical equivalent.

This record is written as the result of clicking the "Save UN-Matched Prescription" button on the calculator window.


 The Diagnostics File                                      <--- Back to top of section.

Bitmap Image
Lens Search under Diagnostics Option
Figure 1
Got to the Options selection.  If under "General Program ptions" select "Set Program Diagnostic Mode" and then initiates the search as shown in Figures 1.  The diagnostics file written will look like the below.  The first line indicates the prescription of the patient.  The second and third lines indicate the Program Options parameters.  The fourth line indicates the match flags.  Subsequent lines show the choices which have been made.  This feature will be used if there is reason to believe that the program is malfunctioning.

Prescription: ,Left= ,,3.00,0.00,000,0.00,[Equiv=3.00],Right= ,4.00,0.00,000,0.00,[Equiv=4.00]
--Parameters: Over/Under,,,(A) Sphere=,,0.50,,(B) Cylinder=,,0.50,(C) Axis=,,5
--Parameters (Cont):,,,(D) Max NO Astig Cylinder=,,,.25,(E) Min Sphere for D=,,2.00,
--Match Flags:,,,(F) Left first=, 0,,(G) Right first=,,, 0,(H) Both=, 1,(I) Reading Power Also=,,, 0,(J) Reading Power ONLY=,,, 0
--Choice: ,Left= ,0115,3.50,0.00,000,2.25, -Match,Right: ,3.50,-0.25,000,2.25, -Match,Flags: ,Sunglasses= , 0, Reading= , 0, Progressive= , 0, Bi-Trifocal= , 1
--Choice: ,Left= ,0337,3.25,0.00,000,0.00, -Match,Right: ,4.50,-0.25,087,0.00, -Match,Flags: ,Sunglasses= , 1, Reading= , 0, Progressive= , 0, Bi-Trifocal= , 0
--Choice: ,Left= ,0495,3.25,0.00,000,0.00, -Match,Right: ,4.50,-0.25,101,0.00, -Match,Flags: ,Sunglasses= , 0, Reading= , 0, Progressive= , 0, Bi-Trifocal= , 0
--Choice: ,Left= ,0497,3.50,0.00,000,0.00, -Match,Right: ,3.75,-0.25,118,0.00, -Match,Flags: ,Sunglasses= , 0, Reading= , 0, Progressive= , 0, Bi-Trifocal= , 0
--Choice: ,Left= ,0584,3.50,-0.25,167,2.75, -Match,Right: ,3.50,-0.25,068,2.75, -Match,Flags: ,Sunglasses= , 0, Reading= , 0, Progressive= , 0, Bi-Trifocal= , 1
--Choice: ,Left= ,1422,3.50,-0.25,130,2.00, -Match,Right: ,3.50,-0.25,157,1.75, -Match,Flags: ,Sunglasses= , 0, Reading= , 0, Progressive= , 0, Bi-Trifocal= , 1
--Choice: ,Left= ,1426,3.50,-0.25,021,0.00, -Match,Right: ,3.75,0.00,000,0.00, -Match,Flags: ,Sunglasses= , 0, Reading= , 0, Progressive= , 0, Bi-Trifocal= , 0
--Choice: ,Left= ,1609,3.50,0.00,000,0.00, -Match,Right: ,3.50,-0.25,163,0.00, -Match,Flags: ,Sunglasses= , 0, Reading= , 0, Progressive= , 1, Bi-Trifocal= , 1
--Choice: ,Left= ,1712,2.50,-0.25,004,2.25, -Match,Right: ,4.00,-0.25,169,2.25, -Match,Flags: ,Sunglasses= , 0, Reading= , 0, Progressive= , 0, Bi-Trifocal= , 1


Go to 7.0 Useful Things to see several ways to use the program.