Leave a comment at the end of this page or email contact@krishagni.com
Search based on time difference
OpenSpecimen supports temporal queries to find specimens based on calculation between date or numeric fields.
Usecase: User wants to find all aliquots which are processed within 30 minutes of collection. To start with, identify the date fields which will be used for this query:
- Collection date: Captured at primary specimen level but available at all child specimens in query under field 'Collection Date'
- Processing date : Captured under 'Created On'
To create the temporal query, follow below steps:
- Go to queries, click on 'Create' and click on the temporal expression icon
Type the temporal expression within the text area. There are many temporal functions available, refer to Calculated fields (Temporal Queries) for more details. For the example query, use minutes_between function. Within the function, enter the two date fields and condition like '< 30' outside the brackets. The format of the date fields should be Class.attribute name. OpenSpecimen auto completes as you are typing. Click on