Differentiating Planned vs. Unplanned Specimen Labels in OpenSpecimen
Got feedback or spotted a mistake?

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

Differentiating Planned vs. Unplanned Specimen Labels in OpenSpecimen

Often, users want different specimen labels for planned and unplanned specimens so they can be easily identified during collection.

Common Questions?

  1. Do planned, and unplanned specimens use the same label tokens from CP Label Settings?

  2. How can we set different label formats for planned vs. unplanned specimens?

  3. How does OpenSpecimen decide which label format to use if there are multiple?

Answers

1. Do planned and unplanned specimens use CP Label Settings tokens?

  • Yes, if label tokens are added only in the Collection Protocol (CP) Settings and not in any Specimen Requirement (SR).

2. How to configure separate label formats for planned vs. unplanned specimens?

The user can use the below approaches to achieve the same result.

Approach 1 – Different formats in SR vs. CP Settings.

  • SR Label Format → Add the label tokens you want for planned specimens.

  • CP Settings Label Format → Add a different label tokens for primary/derived/aliquot specimens.

  • Example:

    • CP Level Label Format → Screenshot here

    • SR Level Label Format → Screenshot here


Refer below screenshot — CP Level Label Format

image-20250813-061327.png

SR Level Label Format

image-20250813-061525.png

 

Approach 2 – JSON-based Advanced Format

  • Use JSON rules based on SR Codes and the Lineage field. (Link provided in heading)

  • Example conditions:

    • If SR code is present → Use <abc> format.

    • If SR code is absent → Use <zyx> format.

  • Important: Remove all formats from CP and SR levels — JSON will handle all labels.

3. How does OpenSpecimen choose the label format? (Priority Order)

  1. Specimen Requirement (SR) Label Format

  2. CP Settings Label Format

  3. JSON Configuration

Got feedback or spotted a mistake?

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