wlfsim query patient id wildcards

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
roydobbins
Posts: 25
Joined: Wed, 2005-07-20, 22:42
Location: Payson, Arizona

wlfsim query patient id wildcards

#1 Post by roydobbins »

I have a question about using wildcards in patient id query of modality worklist.

It seems that I can query patient name, accession number, requested procedure ID, using wildcards and retrieve matching records, eg:
patient name = D* will return all patients starting with the letter D

-but-

the same doesn't apply to ID?

Looking at IHE and other efforts, it seems like it is a requirement to be
able to query on patient ID wildcards as well.

Should this be fixed in wlfsim, or was it done that way for another reason, and would I be breaking something by making this fix?

roydobbins
Posts: 25
Joined: Wed, 2005-07-20, 22:42
Location: Payson, Arizona

#2 Post by roydobbins »

To be specific, I would propose this change in wlfsim.cxx:

[code]
// ----------------------------------------------------------------------------

OFBool WlmFileSystemInteractionManager::PatientIdsMatch( const char *datasetValue, const char *searchMaskValue )
// Date : July 12, 2002
// Author : Thomas Wilkens
// Task : This function returns OFTrue if the dataset's and the search mask's values in
// attribute patient id match; otherwise OFFalse will be returned.
// Parameters : datasetValue - [in] Value for the corresponding attribute in the dataset; might be NULL.
// searchMaskValue - [in] Value for the corresponding attribute in the search mask; never NULL.
// Return Value : OFTrue if the values match, OFFalse otherwise.
{
// if there is a value in the dataset, perform case sensitive single value matching
if( datasetValue != NULL )
// roy 04-11-2006 add wildcards... ===>
return( CaseSensitiveSingleValueMatch( datasetValue, searchMaskValue ) || WildcardMatch( datasetValue, searchMaskValue ) );
else
{
// if datasetValue is not existent, the search mask's value has to be empty to have
// a match (universal matching); in all other cases, we do not have a match
if( strcmp( searchMaskValue, "" ) == 0 )
return( OFTrue );
else
return( OFFalse );
}
}

[/code]

Marco Eichelberg
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 1445
Joined: Tue, 2004-11-02, 17:22
Location: Oldenburg, Germany
Contact:

#3 Post by Marco Eichelberg »

Looking at IHE and other efforts, it seems like it is a requirement to be able to query on patient ID wildcards as well.
I'd be interested to know where in the IHE Technical Framework you derive this requirement from. In fact, the DICOM standard explicitly forbids wildcard matching on the Patient ID, so I would be very surprised if IHE should mandate it. DICOM Part 4, Table K.6-1 specifies that "Patient ID shall be retrieved with Single Value Matching."

roydobbins
Posts: 25
Joined: Wed, 2005-07-20, 22:42
Location: Payson, Arizona

#4 Post by roydobbins »

Thanks, I must have been misunderstanding what I was referring to in the IHE tech framework...
The specific document I was looking at in this case was:

IHE Technical Framework vol II Transactions, rev 6.0, May 18, 2005

and within this,
4.5 Query Modality Worklist
then in section

4.5.4.1.2.1 Examples for the Use of Matching Key Attributes

[Quote]
Note: Applications are recommended to append a wildcard "*", if one was not previously entered by the user, at the end of each component of the structured Patient Name.
[/Quote]

Looks like I was confused by this to mean extending wildcards to all components of the query.

But that is precisely why I posted this question, rather than simply implementing the code as outlined, which would have been incorrect!

Many thanks for the response :D

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 1 guest