# DICOM query error in latest build of 5.7

**URL:** <https://discourse.slicer.org/t/dicom-query-error-in-latest-build-of-5-7/36190>\
**Category:** Support\
**Tags:** dicom\
**Created:** [May 16, 2024, 4:16am UTC](https://discourse.slicer.org/t/dicom-query-error-in-latest-build-of-5-7/36190 "2024-05-16T04:16:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pearsonm](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pearsonm/32/18514_2.png) [@pearsonm](https://discourse.slicer.org/u/pearsonm)\
**Post date:** [May 16, 2024, 4:16am UTC](https://discourse.slicer.org/t/dicom-query-error-in-latest-build-of-5-7/36190/1 "2024-05-16T04:16:34Z")

</div>

Hello,

When I do a DICOM query using the current testing version, the query is performed but results are not displayed.  
Slicer: 5.7.0-2024-05-13 r32855 / 3802d81  
Distributor ID: Ubuntu  
Description: Ubuntu 23.10  
Release: 23.10  
Codename: mantic

There are multiple copies of the following error

```auto
'DisplayedNumberOfStudies', 'DisplayedFieldsUpdatedTimestamp', 'Connections')VALUES ( NULL, ?, ?, ?, ?, ?, ?, ?, ?, NULL, NULL, NULL, NULL) 
[Qt] Error: 
[Qt] Parameter count mismatch
[Qt] SQL failed: 
[Qt] SELECT Connections FROM Patients WHERE UID= ? 
[Qt] Error: 
[Qt] Parameter count mismatch
[Qt] SQL failed: 
[Qt] UPDATE Patients SET Connections = :connectionsData WHERE UID = :uid 
[Qt] Error: 
[Qt] Parameter count mismatch
[Qt] SQL failed: 

```

This error occurs in both a local build and the current build on [slicer.org](http://slicer.org).  
I tried creating a new DICOM DB and deleting all preferences but the error persisted.

I can still import DICOM files from a local directory and the new files show up in the database so the problem seems to be cfind related.

My previous build from April does not have the error.

Any ideas?

Mark

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [May 16, 2024, 12:26pm UTC](https://discourse.slicer.org/t/dicom-query-error-in-latest-build-of-5-7/36190/2 "2024-05-16T12:26:47Z")

</div>

@Davide_Punzo could you have a look?

---

<div class="post-metadata">

**Author:** ![Davide\_Punzo](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/davide_punzo/32/66104_2.png) [@Davide\_Punzo](https://discourse.slicer.org/u/Davide_Punzo)\
**Post date:** [May 16, 2024, 1:19pm UTC](https://discourse.slicer.org/t/dicom-query-error-in-latest-build-of-5-7/36190/3 "2024-05-16T13:19:53Z")

</div>

Thanks for reporting Mark!

I fixed it in [ENH+BUG for the visual DICOM browser by Punzo · Pull Request #1203 · commontk/CTK · GitHub](https://github.com/commontk/CTK/pull/1203/commits/4ac8f132bb2fbff0023f898d323b82a97de3192b)

the issue was that I didn’t updated the schema file which is used only by the old query/retrieve widget (and this widget unfortunately seems to lacks an automated real scenario test).

I am not sure when the PR will be merged. For the moment, you can checkout the PR for your local build. I will give an update as soon as the PR will be merged 🙂

Also please feel free to try the new query/retrieve of the experimental visual DICOM browser (more info at [New Feature: visual DICOM browser](https://discourse.slicer.org/t/new-feature-visual-dicom-browser/33874)). Any feedback would be very appreciated.

---

<div class="post-metadata">

**Author:** ![Davide\_Punzo](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/davide_punzo/32/66104_2.png) [@Davide\_Punzo](https://discourse.slicer.org/u/Davide_Punzo)\
**Post date:** [May 20, 2024, 5:36pm UTC](https://discourse.slicer.org/t/dicom-query-error-in-latest-build-of-5-7/36190/4 "2024-05-20T17:36:21Z")

</div>

PRs have been merged (thanks @lassoan), so in tomorrow Slicer preview you should have the fix @pearsonm @pieper

Reference:

> <https://github.com/Slicer/Slicer/pull/7751>
>
> Contains these CTK fixes and improvements:
> 
> Revision: acfc526a2a7f646dd9cd27d2…a35625825302ee4a
> Author: Davide Punzo \<punzodavide@hotmail.it\>
> Date: Fri May 17 06:07:02 2024 +0200
> Message:
> BUG: Ensure all studies metadata are queried before filtering
> 
> Revision: 4ac8f132bb2fbff0023f898d323b82a97de3192b
> Author: Davide Punzo \<punzodavide@hotmail.it\>
> Date: Thu May 16 15:15:12 2024 +0200
> Message:
> BUG: Update dicom-qr-schema.sql to version 0.8.1
> 
> Revision: 9eda3b8baa9d7f9ea109770e5c348f086a735e88
> Author: Davide Punzo \<punzodavide@hotmail.it\>
> Date: Wed May 15 19:57:28 2024 +0200
> Message:
> BUG: Conceal empty patient and study widgets during filtering
> 
> Revision: 890e51bfc02f9d9c028300423752af255c85027c
> Author: Davide Punzo \<punzodavide@hotmail.it\>
> Date: Tue May 14 15:16:48 2024 +0200
> Message:
> BUG: Match thumbnail background color to rendered image
> 
> Revision: 5767aff7c2a5bdd6c2a288a723f2abdc6c8a9388
> Author: Davide Punzo \<punzodavide@hotmail.it\>
> Date: Tue May 14 15:11:12 2024 +0200
> Message:
> BUG: Remove white box from selected thumbnails
> 
> Revision: 831a5415987c07cf46da566f061f0c9bb210537f
> Author: Davide Punzo \<punzodavide@hotmail.it\>
> Date: Tue May 14 15:06:22 2024 +0200
> Message:
> BUG: Adjust thumbnail rendering for OS scaling compatibility
> 
> Revision: 5bef417a02120351d617038cd411ce28d86bb70a
> Author: Davide Punzo \<punzodavide@hotmail.it\>
> Date: Tue May 14 11:09:59 2024 +0200
> Message:
> ENH: Autoselect last inserted patient during DICOM import
> 
> Revision: ab95f3f2bb89df8bc67786237391bd59ed762b15
> Author: Davide Punzo \<punzodavide@hotmail.it\>
> Date: Tue May 7 12:06:50 2024 +0200
> Message:
> BUG: Standardize DICOM Tags to upper case

> <https://github.com/commontk/CTK/pull/1203>
