This is a list of function calls as they occur in sequence to print
out a growth chart in the RptGrowth report.
Some salient features:
- RptGrowth is currently accessible from the
CheckInPatient form and the SubGrowth subform
of the patient chart.
- Data on the actual layout of the growth tables is contained in a
local Access table called AxisData. This table includes
the upper and lower limits for this parameter, and the distance
between each tick on the graph for this parameter.
- The module employs a variety of module-specific global variables,
which are listed and described in the opening lines of the
RptGrowthmodule.
- There are some global public variables stored in the
ChartFunctions module, so that their values can be
exchanged between various forms and reports.
- ChartFunctions also contains a few procedures such
as
CalcDateDiff, CalcAge$, and
ConvertPoint, which are used in this module.
- Finally, the global variables that feed the patient's name,
sex, and date of birth to RptGrowth are stored in the
appropriate global variables before RptGrowth is opened.
List of procedure calls:
Report_Open
- Opens
InitializeVariables to set the global
variables required for plotting and to stuff patient information into
the report's header.
Detail1_Format which calls PrepareGraph
- Creates four GraphBox regions which delineate the
margins and size of the four fields where growth charts will be
printed and plotted.
- Calls
PrepareGrowthTable, which reads in some
initial data about the measurements and starts preparation of the
printed table in the bottom right corner.
- Calls
GraphParameter, feeding it the
Length measurements, to be plotted in the top left
box, with table information plotted in the bottom right.
- Calls
ReadAxisData to load age-specific data
into the XAxis variable.
- Calls
ReadAxisData to load length-specific data
into the YAxis variable.
- Builds a PatientSet recordset which contains the
patient's length measurements, and a PctSet recordset
which will contain the data used to plot the background percentile
curves.
- Makes sure there is data to plot and calls
PrintEmptyMessage to print a message in the appropriate
box and skip the rest of the procedure.
- Sets the report's foreground color to the sex-appropriate
color.
- Calls
PlotBackground to plot the percentile
background.
- Draws lines of background grid, using XAxis and
YAxis information.
- Runs a
FOR-NEXT loop which uses the
PlotCurve function to plot each
of the seven percentile curves.
- It uses XIn and YIn to mark the
actual observed values for a point, and XOut and
YOut to mark their absolute position in twips in a box.
- First, it locates the first XIn point that falls
within the bounds of the graph, with a call to the
ReadValue procedure.
ReadValue is fed flags indicating if we're
looking at a percentile curve or a patient curve, and reads in the
appropriate column heading of the recordset.
- Then, it reads in the YIn value that corresponds
to the first XIn input.
- Calls
ConvertPoint to translate each of these
inputs into physical locations on the report space.
- If Cflag is "pedi", i.e. we're
plotting patient-specific info, it puts a circle at that point.
- Then, a great
DO-LOOP segment, which reads in
each subsequent (XIn, YIn) point, converts it to an output
point, draws a line to this output point from the previous point, and
adds a circle if we're plotting patient-specific information. The
ReadValue and ConvertPoint procedures are
called in this loop.
- Finally, the procedure returns the last YOut, or
vertical position of the last point, as its value.
- Also calls the
SetLabel procedure which puts
the appropriate label at the end of each percentile curve. The
vertical position is determined by the value returned from the above
PlotCurve function.
- Prints appropriate title for the graph.
- Sets the report's foreground color to black, for plotting
patient-specific data.
- Calls
PlotCurve to plot
the PatientSet collection of measurement points.
- Calls
PrintParameters, which places the
measurements in tabular format in the designated TableBox
area (bottom right).
- Calls
GraphParameter again to plot
Weight and Head Circumference.
Last updated on June 11, 1998 by James C.S. Liu