Print Rules
Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com

Print Rules

Introduction

You can print labels for Collected Specimens, Containers, and Distributed Specimens. This is achieved using the Print Rules features under the “Extras” tab.

From v12.1, there is a menu option ‘Print Rule’ to set up the print rules.

What is a Print Rule?

A Print Rule defines the conditions under which a specific label format should be printed. This allows for highly customizable label printing based on specimen type, volume, or other attributes.

Example Scenarios:

  1. DNA label for 1 ml tube

  2. DNA label for 10 ml tube

  3. Frozen tissue labels

You can configure multiple rules, and the system will print using the first matching rule. To know more, refer wiki page execution of print rules.

How to Define Print Rules?

  • Log in as a Super Administrator user.

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

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

Print Rule Common Fields

Field

Description

Example Values

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 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

Create print rules for specific conditions

Print rules are executed based on the restrictions applied in the print rules configurations. These restrictions give flexibility to administrators to define separate print rules based on the criteria, e.g., include PHI fields for a specific collection protocol, print labels with different tokens based on the login location of the user, and separate information needs to be present for different specimen types

Print Rule Restriction

Effect

Print Rule Restriction

Effect

Collection Protocol

Only print labels from the specified collection protocols. This enables users to set separate print rules based on study requirements

Specimen Class

Only print labels for the specified specimen types. This allows users to create separate labels for specimen classes, e.g., tissue and fluid specimens.

Specimen Types

Only print labels for the specified specimen types. This allows users to create separate labels for specimen types, e.g., serum and urine specimens.

Visit Site

Only print labels if the specified visit site is the same as the visit site defined while collecting specimens. This allows the creation of separate labels across different sites

IP Range

Only print labels if the user is using from the defined IP Range. When users switch sites regularly, this feature, instead of the visit site filter, helps users print appropriate labels based on their physical location.

User groups

Only print labels if the logged-in user belongs to the user group defined in the print rule. This enables admins to set print rules for a group of users

Users

Only print labels if the user logs in using the account defined in the print rule.

Lineage

Only print labels for the defined lineage. When the print tokens/ printers for primary specimens and aliquots are different.

 

Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com