NextGen Knowledge Center

MIN Database Function

Use:Displays the minimum value of a numeric field for the currently selected practice and patient.

You can use this function with the following template types: Medical Records, Medical Records Popup, Medical Records Extended Popup, Demographics Extended Popup.

Syntax:
{MIN( «field» )}
Arguments:

«field»
    table_name.field_name (no braces)
Returns:The minimum numeric value
Example 1:

Field = medical_record_template_.txt_mrt_numeric_field 
Five encounters (5, 45, 32, 121, 99)
{MIN( medical_record_template_.txt_mrt_numeric_field )}

Result: 5

Example 2:

Field = medical_record_popup_.txt_mrpu_numeric_field
Three encounters (13, 84, 62)
{MIN( medical_record_popup_.txt_mrpu_numeric_field )}

Result: 13

Example 3:

Field = medical_record_ext_popup_.txt_mrepu_numeric_field 
Two encounters, three records per encounter
(324, 356, 213, 278, 410, 156)
{MIN( medical_record_ext_popup_.txt_mrepu_numeric_field )}

Result: 156

Example 4:

Field = demographic_ext_popup_.txt_depu_numeric_field 
One encounter, four records (3, 6, 12, 8))
{MIN( demographic_ext_popup_.txt_depu_numeric_field )}

Result: 3