Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

You can configure multiple rules, and the system will print using the first matching rule.

...

There is no restriction on the type of printer used as long as the printer software supports it. OpenSpecimen interfaces with the printers via external software like BarTender, NiceLabel, etc. OpenSpecimen will pass the data needed for printing, and printing software will automatically pick files and print the labels.

...

Expand
titleExpand to view the stetps
  • Log in as a Super Administrator user.

  • Click on ‘Extras’ → ‘Print Rules’.

Image RemovedFrom v6.1, you Image Added
  • You can create print rules for 'Specimen', 'Distribution', and 'Container'. Click on the ‘Create’ button from the print rules list page.

Image RemovedImage Added

Print Rule Common Fields

Expand
titleExpand to view the list of fields

Field

Description

Example Values

Users

Login name of OpenSpecimen user who will be printing labels.

The default value is *, meaning any user.

John Doe, Mary Thomas, etc.

Ip IP Range

Specifies IP address range, using CIDR notation, of workstations of users who will be issuing print label requests.

The default value is *, meaning any workstation

Example 1: 192.168.2.0/24 matches IPv4 addresses in the range 192.168.2.0 to 192.168.2.255

Example 2: 2001:db8::/48 matches IPv6 addresses in range 2001:db8:0:0:0:0:0:0 to 2001:db8:ffff:ffff:ffff:ffff:ffff:ffff

Label Type

Type of label depending on how and where it will be used, e.g., Cap, Slide. If specified, the value of this field is written to both the database table and the cmd file. The printer software can read this type and print labels accordingly.

The default value is *, meaning don't care.

Cap, Slide, or any other value that is used to denote the type of printing the printer software needs to carry out

Label Design

The name of the design template to use for printing labels. This value is of interest to printer software in deciding how to label content should be arranged and printed.

The default value is *, meaning don't care

Example: Cryovial Cap Label

Name of design template configured in the printer software. In this instance, the name specifies label design suitable for printing labels to be used for cryovial caps

Label Tokens

Specifies a list of attribute names of participants, visits, or specimens records that need to be printed on labels. For a detailed list of available tokens, please refer below table

Default value: specimen_label,specimen_type,specimen_location

'Label, Specimen Type, Created on'  will instruct OpenSpecimen to output values of the following attributes of specimen record - label, specimen type, and created on the date

Printer

Name of the printer. The printer name and their network addresses are configured in printer software to direct the label printing to the appropriate printer

rosy, daisy

rosy and daisy are symbolic names that can be configured in printer software to send requests to printers configured at IP address 192.168.2.110 and 192.168.2.220, respectively

Output Directory

The absolute path of directory on the local filesystem that OpenSpecimen uses to generate cmd files. This should be a shared directory that is accessible to OpenSpecimen as well as printer software (like Bartender or Nice Label)

The default value is * indicating do not generate cmd files

E:/Printer/OpenSpecimenPrintedFiles/

File Format

The format of the data contained in the printed file. Supported values are "CMD", CMD (Quoted Values), and "CSV".

Current command-line formats are tested with Bartender and Nice Label software. If you use some other software and face any issue, please let us know.


File Line Ending

Check LF and CRLF if the file contains the selected character at the end of the line.


File extension

The file is created with a selected extension.

txt/cmd

Advanced Print Rules

From v6.3, you You can configure any field as a print - token including custom fields. Previously, you could only select specific tokens to choose from the dropdown.

Expand
titleSwitch to advanced mode
Image Removed

...

Here you can use the new ‘eval(…)’ method to create custom print-tokens.

...

Code Block
eval(displayLabel, expr);

For usage of the “eval” function, refer to examples in on the below pages:

Child pages (Children Display)

Download Labels Print File

Sometimes you might not be able to integrate OpenSpecimen with the printer due to network issues. E.g., in a multi-site study where the printers are in a collection site outside the VPN. In such cases, you can download the labels print file and upload it manually to the printing software like Bartender.

This is also useful during testing to check that the print rules are correctly configured properlyduring testing. This avoids having the testers to login log in to the server VM to check the content of the print files.

  • Login as super admin user

  • Click on the
    Expand
    titleSteps to enable setting to download print files

    At System Level

    • Log in as a Super Admin.

    • Navigate to 'Settings'.

    • Search for the property 'Download Labels Print File'

    or click on the
    • under 'Administrative'

    module and click on the property
    • .

    • Select the option 'Enabled'

    of
    • for the 'New Value' field and click on 'Update'.

    Image RemovedImage Added
    • Navigate to

    specimen or participants and visit's
    • participant/visit/specimen overview pages and click on 'Print'

    , the
    • . The print integration file will be downloaded in CSV format

    will be downloaded
    • .

    • A downloaded print CSV file will have one

    -
    • row per specimen, and each row will contain the data to be printed on the specimen labels/stickers based on the print rule set. See attached example:

    View file
    nameA Demo Longitudinal Study_AD.0199_20220525_143000.csv

    If the setting is enabled at the system level, it will apply to all CPs across the system, and all users will be able to download the print files CSV.

    At User Level

    • Navigate to the 'Users' module.

    • Select a user → Edit.

    • Enable the 'Download Labels Print File' setting for that user:

    Image Added

    If the setting is disabled at the system level and enabled at the user level, only that user can download the print files CSV.

    FAQs

    In what order are the print rules applied?

    ...