8.0 Inventory/Journal files setup
 .  
This documentation applies to Glasses Inventory Version 6.4-3 (or higher) and Glasses Reader version 3.2-4 (or higher).

      Located on the root of the C drive are two files:  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.

     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 6 different lensmeters to file and/or bar code printers.  (Tomey TL-900, Tomey TL-3000, Humphrey LA340, Humphrey LA350, Humphrey LA360, Nikon NL-2, Shin Nippon SLM-5000, Nidek LM-1000, Marco CL-3000 and also the Topcon CL-100.)
    2.  Manually enter data into the system using a specially designed screen keyboard.
    3.  Wand in data from bar coded labels previously created by this program.
If anybody reading this should purchase any of these particular 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.

Manual additions to Total Inventory file:   (Very rare)
Instead of beginning with an entry number if a record begins with one of these possibilities, it can indicate other types of inventory information:

     "Reading"
A reading record is formatted as follows:
  Reading,1.25,50
     Reading,Sp,Cn
Where the first field is always "Reading", the "Sp" is the Spherical power of the glasses and "Cn" is tne number of glasses.   In this example record it shows that there are 50 reading glasses with a spherical power of +1.25.

   "Lens"
A lens record is formatted as follows:
   Lens,5.25,-3,4
   Lens, Sp, Cy, Cn
Where the first field is always "Lens", the "Sp" is the Spherical power of the lens, "Cy" is the cylinder power of the lens (=0 if this lens is not for Astigmatism correction) and "Cn" is the number of round lens of this power.

   "LensChild"
A lens record is formatted as follows:
     LensChild,5.00,0,2
   LensChild, Sp, Cy, Cn
Where the first field is always "LensChild", the "Sp" is the Spherical power of the lens, "Cy" is the cylinder power of the lens (=0 if this lens is not for Astigmatism correction) and "Cn" is the number of round lens of this power.

   "Frames"
A frames record is formatted as follows:
  Frames,70,25
    Frames, Sz,Cn
Where the first field is always "Frames", the "Sz" is the size of the lens with value values only of 65,67, and 70 and "Cn" is the number of this size of frames.

   "FramesChild"
A frames record is formatted as follows:
  FramesChild,65,14
   FramesChild, Sz,Cn
Where the first field is always "FramesChild", the "Sz" is the size of the lens with value values only of 57,61, and 65 and "Cn" is the number of this size of frames.

 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.

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 "Prescription Save" button on the calculator window.

The below record types are obsolete records of rarely used features which by default are removed by the Glasses Inventory options settings.
Reading,1.00,049
Reading, Power, Count
Where:
   Reading = Indicator that record is talking about reading glasses,
   Power = Power of the reading glass,
   Count = Last known total count of this particular power.
This record is written in response to a change in a reading glass count.

Lens,5.75,0.00,011
Lens, Sphere, Cylinder, Count
Where:
   Lens = Indicator that record is talking about a count of 46mm snap-in lens,
   Sphere = Spherical power of the lens being counted,
   Cylinder = Cylinder powr of the lens being counted,
   Count = Last known count of this particular power of lens.
This record is written in response to a change in a round lens count.

LensChild,5.75,0.00,011
LensChild, Sphere, Cylinder, Count
Where:
   Lens = Indicator that record is talking about a count of 42mm snap-in lens,
   Sphere = Spherical power of the lens being counted,
   Cylinder = Cylinder powr of the lens being counted,
   Count = Last known count of this particular power of lens.
This record is written in response to a change in a round lens count.

Frames,65,024
Frames, Size, Count
Where:
    Frames = Indicator that this record is talking about round frame count,  Lens size is 46mm.
   Size = Size of frame with values of 65, 67 and 70,
   Count = Last know count of this particular frame size.
This record is written in response to a change in a round frames count.

Frames,61,020
FramesChild, Size, Count
Where:
    Frames = Indicator that this record is talking about round frame count, Lens size is 42mm.
   Size = Size of frame with values of 57, 61 and 65,
   Count = Last know count of this particular frame size.
This record is written in response to a change in a round frames count.

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

Bitmap Image
Lens Search under Diagnostics Option
Figure 1
If under "Search Options" one selects "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 9.0 Useful Things to see several ways to use the program.