Example 1: Age as of today
Note: If the "date of birth" value is blank for the participant, the query results would be blank.
Example 2: Age at collection
Note:
This expression only works for "parent (New)" specimens.
If the "date of birth" value is blank for the participant, the query results would be blank.
Temporal Expression: "years_between( Specimen.extensions.SpecimenCollectionEvent.time, Participant.dateOfBirth) any"
Example 3: Age at collection
Note:
This expression works for specimens at any level (New, Derived, and Aliquot).
If the "date of birth" value is blank for the participant, the query results would be blank.
Temporal Expression: "years_between( Specimen.spmnCollRecvDetails.collTime, Participant.dateOfBirth) any"
Example 4: Time difference between frozen and received time
Example 5: Tissue specimens collected in the last 2 months
Example 6: Calculating the sample amount
Example 7: Count of specimens collected per month
Example 8: Count of participants registered per month.
Example 9: Count of specimens collected after a particular date
Example 10: Age in years (rounded off)
Expression: round( years_between( Participant.regDate, Participant.dateOfBirth), 0) any
Example 11: Age in years (rounded off) between 10-20 age
Expression: round( years_between( Participant.regDate, Participant.dateOfBirth), 0) between (10,20)
Example 12: Number of participants enrolled and parent samples entered per week.
Result view:
Note: Select the count of participant and primary specimen in 'Aggregates' column to view the count in the result view.
Example 13: Finding percent from 2 numbers in custom form
In the above example, number1 and number2 are two numeric fields defined in a form attached at 'Registration Forms' level. There is no % function in temporal queries, but the formula to find percent can directly used to calculate the same.
Example 14: Calculating the initial cell value from the volume processed and initial concentration, where the volume processed and initial concentration are specimen custom fields.
In the above expression,
aj_specimen_form is the variable name of the custom form.
initial_processing_volume and initial_cell_volume are the variable names of the volume processed and initial concentration custom fields.
Example 15: Average of 2 custom fields.
In the above expression,
'skin_cancer_registration_custom_field_form' is the variable name of the form name.
‘number_field_1' and 'number_field_2’ are variable names of the custom fields.
The CP (e.g. 'Skin Cancer Study') must be selected, for custom forms and fields.