CURATOR HELP CENTER
Step 4: Query builder
After uploading the metadata you are presented with an interface that helps you to build the dataset query, and preview how the query filters would look like.
Query
Query file is used to link metadata items with a UI tool that generates user controls. With a data query enabled, collaborators will be able to filter metadata to find the cases that meet their inclusion criteria for any upcoming research. Later Collaboration requests can either be sent about the whole metadata file or required for a subset of items that match the selected query criteria.

Query UI builder
There are several ways how to build a Query for your dataset.

Manual editor
The easy-to-use Manual Editor allows you to define the parameters that will be available to collaboration partners for detailed filtering within your anonymized metadata.
With the Manual editor you will be able to:
1. Add New Query Filter,
2. Edit the labels according to data keys,
3. Choose filter types that suit the parameter the best,
4. Edit available options for list parameters,
5. Edit the sequence of the query.
While editing the query manually, all the changes are automatically displayed in the tab with the JSON Description and vice versa.
To edit query parameters, select the Pencil icon on the right side of each filter parameter line.

- Adjust the Filter label value as per need.
- Enable the option Data is keyed if available for the parameter type to change the labels of the parameter answer choices.
Ensure Consistency between Query Parameters and Source Metaset File.

When utilizing query parameters, it's crucial to maintain consistency with the original metaset file. While you have the flexibility to adjust label values, ensure that the key values remain unchanged. This preserves the linkage between the metaset file and the filter panel, ensuring seamless functionality.
To view and test the query select the Query preview option.
JSON Description
You can insert a query or make changes to defined query parameters by editing the JSON Description especially if the dataset has an extensive list of query parameters.

To enable data query in the UI tool, the file must follow the given structure:
- label: label to be used for the input.
- key: corresponds to the item key in metadata (see metadata sample) and links metadata values to the filter.
- type: type of input to render. Values `range` (sliders), `list` (dropdown multi select), `icd`- more specialized input for large amounts of items specific to ICD code. And `date` for filtering in time.
- options: range of possible values or items in the dropdown.
- value: default value for range, optional.
- siUnit: labels for range slider values.
- order: in what order to show filter inputs.
- category: under what category to show filter.


[     [{
		"label": "Weight",
		"key": "weight",
		"type": "range",
		"options": [40, 240],
		"value": [55, 150], //preselected values
		"siUnit": "kg",
		"order": 1,
		"category": "Basic data"
	},
	{
		"label": "Blood Tests",
		"key": "bloodTests",
		"type": "list",
		"options": ["CBC", "BMP", ....],
		"order": 2,
		"category": "Blood data"
	},
	{
		"label": "Date of Birth",
		"key": "dateOfBirth",
		"min": "1918-01-04",
		"max": "2020-12-27",
		"type": "date",
		"options": ["1918-01-04", "1941-04-30", ....],
		"category": "Basic data",
		"order": 3,
		"category": "Basic data",
	},
	{
		"label": "ICD Code",
		"key": "icd",
		"type": "icd",
		"options": [{
				"key": "A02",
				"label": "A02: Other salmonella infections"
			}, {
				"key": "A038",
				"label": "A038: Other shigellosis"
			},
			....
		}],
	"order": 4,
	"category": null,
}]
{...} Load from JSON file
The query builder also provides an option to load the query from a ready JSON file which will allow you to avoid building the query manually.
We use cookies in order to secure and improve the Longenesis web page functionality, as well as to optimize your experience within this page.
Please see our Privacy policy for more information on how we use the information about your use of our web page. By continuing to use this web page you agree to our Privacy Policy.