When importing sample data to a sample set, you must provide a unique identifier for each sample record.
  • Name Column - If the sample set has Name column, it is used as the unique identifier and every row must have a unique value.
  • Name Expressions - You can create a unique id (with which to populate the "Name" column by concatenating a variety of elements, including fixed strings, data from the current record, and special tokens.
  • Example Name Expressions - Example uses of name expressions to form ids.

Name Column

Every sample set has a Name column. The values in this column must be unique.

If the data includes a Name column which contains duplicate values, the server will not be able to import your data. An example sample set using the 'Name' column:

NameDescriptionVolumeVolumeUnitFlag
S-100Plasma100mL 
S-200Plasma100mL 
S-300Plasma100mL 
S-400Plasma100mL 

Name Expressions

Name expressions let you build unique ids out of a variety of different elements, including: values drawn from the sample data, string constants, random numbers, etc. See the examples of name expressions below. When you first create a sample set, you can specify the name expression to use.

Note that the Name shown in the above panel is for naming the sample set itself, not the Name column defined within it.

In additional to column names, the following tokens can be used:

  • Inputs: A collection of all DataInputs and MaterialInputs for the current sample. You can concatenate using one or more value from the collection.
  • DataInputs: A collection of all DataInputs for the current sample. You can concatenate using one or more value from the collection.
  • MaterialInputs: A collection of all MaterialInputs for the current sample. You can concatenate using one or more value from the collection.
  • now: The current date, which you can format using string formatters.
  • batchRandomId: A four digit random number applied to the entire set of incoming sample records. On each import event, this random batch number will be regenerated.
  • randomId: A four digit random number for each sample row.
  • dailySampleCount: An incrementing counter, starting with the integer '1', that resets each day.
  • weeklySampleCount: An incrementing counter, starting with the integer '1', that resets each week.
  • montlySampleCount: An incrementing counter, starting with the integer '1', that resets each month.
  • yearlySampleCount: An incrementing counter, starting with the integer '1', that resets each year.
The sample counters are incremented for the date when the sample is inserted, but can use a different date by attaching the counter to a date column. For example, ${sampleDate:dailySampleCount} will use the date found in the row's "SampleDate" column or today's date if the column has no value.

To further manipulate the name expression tokens, use string formatters. For details see String Expression Format Functions.

Example Name Expressions

Name ExpressionExample OutputDescription
${ParticipantId}_${Barcode}P1_189
P2_190
P3_191
P4_192
ParticipantId + Barcode.
${Lab:defaultValue('Unknown')}_${Barcode}Hanson_189
Hanson_190
Krouse_191
Unknown_192
Lab + Barcode. If the Lab value is null, then use the string 'Unknown'.
S_${randomId}S_3294
S_1649
S_9573
S_8843
Random numbers.
S_${now:date}_${dailySampleCount}S_20170202_1
S_20170202_2
S_20170202_3
S_20170202_4
Date + incrementing integer.

Assume that the name expressions above are applied to the following sample set:

Plasma Samples

NameBarcodeTypeDrawDateParticipantIdMaterialInputs/ReagentsLab
S-189189Plasma1/1/2010P1RegAHanson
S-190190Plasma(null)P2RegBHanson
S-191191Plasma1/3/2010P3(null)Krouse
S-192192Plasma1/4/2010P4RegD, RegX, RegY(null)

Name Expressions Used with String Modifiers

The following name expressions are used in combination with string modifiers.

Name Expression00000000000000000000000000000000000000000000000Example Output000000000000000000Description
S_${Column1}_${Column2}S_101_102Create an id from the letter 'S' and two values from the current row of data, separated by underscore characters.
S-${Column1}-${now:date}-${batchRandomId}S-1-20170103-9001 
S-${Column1:suffix('-')}${Column2:suffix('-')}${batchRandomId}S-2-4-5862 
${Column1:defaultValue('S')}-${now:date('yy-MM-dd')}-${randomId}2-17-01-03-1166${Column1:defaultValue('S')} means 'Use the value of Column1, but if that is null, then use the default: the letter S'
${DataInputs:first:defaultValue('S')}-${Column1}Nucleotide1-5${DataInputs:first:defaultValue('S')} means 'Use the first DataInput value, but if that is null, use the default: the letter S'
${DataInputs:join('_'):defaultValue('S')}-${Column1}Nucleotide1_Nucleotide2-1${DataInputs:join('_'):defaultValue('S')} means 'Join together all of the DataInputs separated by undescores, but if that is null, then use the default: the letter S'

Related Topics

Discussion

Was this content helpful?

Log in or register an account to provide feedback


previousnext
 
expand all collapse all