29 #ifndef WlmDataSource_h
30 #define WlmDataSource_h
32 #include "dcmtk/config/osconfig.h"
33 #include "dcmtk/dcmwlm/wltypdef.h"
34 #include "dcmtk/dcmdata/dcdatset.h"
35 #include "dcmtk/oflog/oflog.h"
39 #define DCMWLM_TRACE(msg) OFLOG_TRACE(DCM_dcmwlmGetLogger(), msg)
40 #define DCMWLM_DEBUG(msg) OFLOG_DEBUG(DCM_dcmwlmGetLogger(), msg)
41 #define DCMWLM_INFO(msg) OFLOG_INFO(DCM_dcmwlmGetLogger(), msg)
42 #define DCMWLM_WARN(msg) OFLOG_WARN(DCM_dcmwlmGetLogger(), msg)
43 #define DCMWLM_ERROR(msg) OFLOG_ERROR(DCM_dcmwlmGetLogger(), msg)
44 #define DCMWLM_FATAL(msg) OFLOG_FATAL(DCM_dcmwlmGetLogger(), msg)
virtual ~WlmDataSource()
destructor
WlmReturnedCharacterSetType returnedCharacterSet
returned character set type
class maintaining a attribute tag (group and element number)
virtual void SetCfgFileSelectValues(const OFString &)
Set value in a member variable in a derived class.
OFBool readLockSetOnDataSource
indicates if a read lock was set on the data source
virtual OFCondition DisconnectFromDataSource()=0
Disconnects from the data source.
void SetCalledApplicationEntityTitle(const OFString &value)
Set value in member variable.
void CheckNonSequenceElementInSearchMask(DcmDataset *searchMask, int &invalidMatchingKeyAttributeCount, DcmElement *element, DcmSequenceOfItems *supSequenceElement=NULL)
This function checks if a non-sequence element in the search mask has a correct format.
virtual void SetCommaSeparatePatientName(OFBool)
Set value in a member variable in a derived class.
abstract base class for all DICOM elements
void PutErrorElements(const DcmTagKey &tag)
This function inserts the tag of an error element into the corresponding member variable, without checking if it is already contained in this variable.
class representing a DICOM Sequence of Items (SQ).
void SetFailOnInvalidQuery(OFBool value)
Set value in member variable.
void PutOffendingElements(const DcmTagKey &tag)
This function inserts the tag of an offending element into the corresponding member variable...
WlmSuperiorSequenceInfoType * superiorSequenceArray
information about superior sequence elements; necessary for inserting values into resultDataset ...
OFBool noSequenceExpansion
indicates if the expansion of empty sequence attributes shall take place or not
OFBool IsSupportedReturnKeyAttribute(DcmElement *element, DcmSequenceOfItems *supSequenceElement=NULL)
This function checks if the given element refers to an attribute which is a supported return key attr...
virtual void SetDatabaseType(WlmDatabaseType)
Set value in a member variable in a derived class.
This class encapsulates data structures and operations for connecting to an arbitrary data source in ...
DcmAttributeTag * GetOffendingElements()
Get value from member variable.
virtual void SetDbUserName(const OFString &)
Set value in a member variable in a derived class.
OFString DeleteLeadingAndTrailingBlanks(const OFString &value)
This function makes a copy of value without leading and trailing blanks.
OFBool IsValidTimeOrTimeRange(const OFString &value)
This function checks if the given value is a valid time or time range.
OFBool foundUnsupportedOptionalKey
indicates if we encountered an unsupported optional key attribute in the search mask ...
OFBool CheckMatchingKey(const DcmElement *elem)
This function checks if the passed matching key's value only uses characters which are part of its da...
WlmDataSource()
default constructor.
virtual void SetSerialNumber(const int)
Set value in a member variable in a derived class.
DcmLongString * GetErrorComments()
Get value from member variable.
void SetReturnedCharacterSet(WlmReturnedCharacterSetType value)
Set value in member variable.
virtual void SetDfPath(const OFString &)
Set value in a member variable in a derived class.
virtual void SetDbUserPassword(const OFString &)
Set value in a member variable in a derived class.
OFBool IsValidTime(const OFString &value)
This function checks if the given time value is valid.
OFBool failOnInvalidQuery
indicates if the application shall fail on an invalid C-Find RQ message
virtual void SetReturnPatientUidInAccessionNumber(OFBool)
Set value in a member variable in a derived class.
void CheckSequenceElementInSearchMask(DcmDataset *searchMask, int &invalidMatchingKeyAttributeCount, DcmElement *element, DcmSequenceOfItems *supSequenceElement=NULL)
This function checks if a sequence element in the search mask has a correct format.
virtual void SetCfgFileMatchRecords(const OFString &)
Set value in a member variable in a derived class.
virtual WlmDataSourceStatusType StartFindRequest(const DcmDataset &findRequestIdentifiers)=0
Based on the search mask which was passed, this function determines all the records in the database w...
unsigned long numOfSuperiorSequences
number of elements in above array
virtual void SetCreateNullvalues(OFBool)
Set value in a member variable in a derived class.
OFString specificCharacterSet
potentially specified specific character set (in search mask)
a class representing the DICOM value representation 'Long String' (LO)
OFBool GetStringValue(const DcmElement *elem, OFString &resultVal)
This function returns the value of the given DICOM string element (attribute) in the parameter result...
OFBool CheckSearchMask(DcmDataset *searchMask)
This function checks if the search mask has a correct format.
OFBool ContainsOnlyValidCharacters(const char *s, const char *charset)
This function returns OFTrue if all the characters of s can be found in the string charset...
WlmDataSourceStatusType CancelFindRequest()
This function handles a C-CANCEL Request during the processing of a C-FIND Request.
OFBool IsSupportedMatchingKeyAttribute(DcmElement *element, DcmSequenceOfItems *supSequenceElement=NULL)
This function checks if the given element refers to an attribute which is a supported matching key at...
virtual OFBool IsCalledApplicationEntityTitleSupported()=0
Checks if the called application entity title is supported.
virtual OFCondition ConnectToDataSource()=0
Connects to the data source.
OFString calledApplicationEntityTitle
called AE title
void ClearDataset(DcmDataset *idents)
This function removes all elements from the given DcmDataset object.
void SetNoSequenceExpansion(OFBool value)
Set value in a member variable.
WlmDataSource & operator=(const WlmDataSource &Src)
Protected undefined operator=.
virtual DcmDataset * NextFindResponse(WlmDataSourceStatusType &rStatus)=0
This function will return the next dataset that matches the given search mask, if there is one more r...
DcmAttributeTag * errorElements
list of error elements
a class handling the DICOM dataset format (files without meta header)
OFBool IsValidDateOrDateRange(const OFString &value)
This function checks if the given value is a valid date or date range.
structure for handling arbitrary types of superior sequences in query result datasets ...
virtual void SetPfFileName(const OFString &)
Set value in a member variable in a derived class.
virtual void SetDbDsn(const OFString &)
Set value in a member variable in a derived class.
OFBool IsValidDate(const OFString &value)
This function checks if the given date value is valid.
void ExpandEmptySequenceInSearchMask(DcmElement *&element)
According to the 2001 DICOM standard (part 4, section C.2.2.2.6), if a search mask contains a sequenc...
simple wrapper around the "low-level" Logger object to make it easier to switch to a different system...
virtual void SetEnableRejectionOfIncompleteWlFiles(OFBool)
Set value in a member variable in a derived class.
a simple string class that implements a subset of std::string.
virtual void SetInstitutionId(const unsigned int)
Set value in a member variable in a derived class.
DcmAttributeTag * offendingElements
list of offending elements
DcmDataset * identifiers
the search mask which is contained in the C-Find RQ message
OFList< DcmDataset * > matchingDatasets
array of matching datasets
DcmLongString * errorComment
error comment
virtual void SetModalityToReturn(const OFString &)
Set value in a member variable in a derived class.
General purpose class for condition codes.
a class representing the DICOM value representation 'Attribute Tag' (AT)