CONTACT US

568-3-53 (3rd Floor) Kompleks Mutiara 3 1/2 Mile, Jalan Ipoh 51200 Kuala Lumpur, Malaysia 6012-9714904 support@yohz.com https://www.yohz.com https://www.dicomsearch.com https://yohzapps.yohz.com
Copyright © 2005 - 2020 Yohz Software, a division of Yohz Ventures Sdn Bhd. ALL RIGHTS RESERVED. All trademarks or registered trademarks are property of their respective owners

2.3

Simplified searching using aliases

In addition to allowing you to use the full SQL syntax to run your queries, DICOM Search also offers a simpler way of running your search. Recall that in our previous step, to retrieve all images with the ultrasound modality, we entered SELECT * FROM tags WHERE [00800060] = 'US' The disadvantage of this is that you need to remember which columns to select, the name of the table, and also the proper syntax (SELECT … followed by FROM tags followed by WHERE …). What if you could enter just this: modality = 'US' That’s all, DICOM Search will return the same 26 rows, this time with only the essential columns. Behind the scenes, DICOM Search is actually running this query: SELECT ds_thumbnail, ds_filename, ds_keyID , [00080060] FROM tags WHERE [00080060] = 'US' Now, how did DICOM Search expand modality = ‘US’ to SELECT ds_thumbnail, ds_filename, ds_keyID , [00080060] FROM tags WHERE [00080060] = 'US' Let’s break this down. First, the SELECT portion i.e. SELECT ds_thumbnail, ds_filename, ds_keyID , [00080060] The fields ds_thumbnail, ds_filename, ds_keyID have been set up as the default query prefix if your query does not start with SELECT. You can add additional columns to the default prefix whenever the need arises. The [00080060] field is added automatically to the SELECT list because it was used as your search criteria. The FROM tags portion never changes, as it is the only table we can search in. Finally, the search criteria: WHERE [00080060] = 'US' is added because we have an alias defined for the modality tag. If you bring up the Tags and Fields window, there is an Alias column where you can define short names for each public DICOM element. In this case, we already have an alias for element 0008,0060, modality. Thus, anytime we use the word modality in our search query, it will be replaced by DICOM Search with the value [00080060]. There are a few predefined aliases already set up, and you can add more as required. Aliases must start with an alphabet, contain only alphanumeric characters, and cannot contain spaces in them. Aliases can be used in the SELECT or WHERE portion of our queries. Try running this query: SELECT name, age, weight, modality FROM tags WHERE weight > 60 Next, we’ll talk more about setting up the shortcuts that help us write simplified search queries.

Section summary

DICOM Search offers a simpler way to enter your search queries using aliases Define as many aliases as you require for commonly searched or retrieved DICOM elements.

Related help file topics

Simplified search

CONTACT US

568-3-53 (3rd Floor) Kompleks Mutiara 3 1/2 Mile, Jalan Ipoh 51200 Kuala Lumpur, Malaysia 6012-9714904 support@yohz.com https://www.yohz.com https://www.dicomsearch.com https://yohzapps.yohz.com
Copyright © 2005 - 2020 Yohz Software, a division of Yohz Ventures Sdn Bhd. ALL RIGHTS RESERVED. All trademarks or registered trademarks are property of their respective owners

2.3

Simplified searching using aliases

In addition to allowing you to use the full SQL syntax to run your queries, DICOM Search also offers a simpler way of running your search. Recall that in our previous step, to retrieve all images with the ultrasound modality, we entered SELECT * FROM tags WHERE [00800060] = 'US' The disadvantage of this is that you need to remember which columns to select, the name of the table, and also the proper syntax (SELECT … followed by FROM tags followed by WHERE …). What if you could enter just this: modality = 'US' That’s all, DICOM Search will return the same 26 rows, this time with only the essential columns. Behind the scenes, DICOM Search is actually running this query: SELECT ds_thumbnail, ds_filename, ds_keyID , [00080060] FROM tags WHERE [00080060] = 'US' Now, how did DICOM Search expand modality = ‘US’ to SELECT ds_thumbnail, ds_filename, ds_keyID , [00080060] FROM tags WHERE [00080060] = 'US' Let’s break this down. First, the SELECT portion i.e. SELECT ds_thumbnail, ds_filename, ds_keyID , [00080060] The fields ds_thumbnail, ds_filename, ds_keyID have been set up as the default query prefix if your query does not start with SELECT. You can add additional columns to the default prefix whenever the need arises. The [00080060] field is added automatically to the SELECT list because it was used as your search criteria. The FROM tags portion never changes, as it is the only table we can search in. Finally, the search criteria: WHERE [00080060] = 'US' is added because we have an alias defined for the modality tag. If you bring up the Tags and Fields window, there is an Alias column where you can define short names for each public DICOM element. In this case, we already have an alias for element 0008,0060, modality. Thus, anytime we use the word modality in our search query, it will be replaced by DICOM Search with the value [00080060]. There are a few predefined aliases already set up, and you can add more as required. Aliases must start with an alphabet, contain only alphanumeric characters, and cannot contain spaces in them. Aliases can be used in the SELECT or WHERE portion of our queries. Try running this query: SELECT name, age, weight, modality FROM tags WHERE weight > 60 Next, we’ll talk more about setting up the shortcuts that help us write simplified search queries.

Section summary

DICOM Search offers a simpler way to enter your search queries using aliases Define as many aliases as you require for commonly searched or retrieved DICOM elements.

Related help file topics

Simplified search