Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | Related Pages

wlfsim.h

00001 /*
00002 *
00003 *  Copyright (C) 1996-2002, OFFIS
00004 *
00005 *  This software and supporting documentation were developed by
00006 *
00007 *    Kuratorium OFFIS e.V.
00008 *    Healthcare Information and Communication Systems
00009 *    Escherweg 2
00010 *    D-26121 Oldenburg, Germany
00011 *
00012 *  THIS SOFTWARE IS MADE AVAILABLE,  AS IS,  AND OFFIS MAKES NO  WARRANTY
00013 *  REGARDING  THE  SOFTWARE,  ITS  PERFORMANCE,  ITS  MERCHANTABILITY  OR
00014 *  FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER DISEASES  OR
00015 *  ITS CONFORMITY TO ANY SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND
00016 *  PERFORMANCE OF THE SOFTWARE IS WITH THE USER.
00017 *
00018 *  Module:  dcmwlm
00019 *
00020 *  Author:  Thomas Wilkens
00021 *
00022 *  Purpose: Class for managing file system interaction.
00023 *
00024 *  Last Update:      $Author: wilkens $
00025 *  Update Date:      $Date: 2004/01/07 08:32:28 $
00026 *  Source File:      $Source: /share/dicom/cvs-depot/dcmtk/dcmwlm/include/wlfsim.h,v $
00027 *  CVS/RCS Revision: $Revision: 1.7 $
00028 *  Status:           $State: Exp $
00029 *
00030 *  CVS/RCS Log at end of file
00031 *
00032 */
00033 
00034 #ifndef WlmFileSystemInteractionManager_h
00035 #define WlmFileSystemInteractionManager_h
00036 
00037 #include "osconfig.h"
00038 
00039 template <class T> class OFOrderedSet;
00040 class DcmTagKey;
00041 class OFConsole;
00042 class OFCondition;
00043 
00048 class WlmFileSystemInteractionManager
00049 {
00050   private:
00054     WlmFileSystemInteractionManager(const WlmFileSystemInteractionManager &old);
00055 
00059     WlmFileSystemInteractionManager &operator=(const WlmFileSystemInteractionManager &obj);
00060 
00061   protected:
00063     OFBool verboseMode;
00065     OFBool debugMode;
00067     OFConsole *logStream;
00069     char *dfPath;
00071     char *calledApplicationEntityTitle;
00073     DcmDataset **matchingRecords;
00075     unsigned long numOfMatchingRecords;
00076 
00081     void DumpMessage( const char *message );
00082 
00088     void DetermineWorklistFiles( OFOrderedSet<OFString> &worklistFiles );
00089 
00095     OFBool IsWorklistFile( const char *fname );
00096 
00103     OFBool DatasetMatchesSearchMask( DcmDataset *dataset, DcmDataset *searchMask );
00104 
00110     void DetermineMatchingKeyAttributeValues( DcmDataset *dataset, const char **&matchingKeyAttrValues );
00111 
00118     OFBool ScheduledStationAETitlesMatch( const char *datasetValue, const char *searchMaskValue );
00119 
00129     OFBool ScheduledProcedureStepStartDateTimesMatch( const char *datasetDateValue, const char *datasetTimeValue, const char *searchMaskDateValue, const char *searchMaskTimeValue );
00130 
00137     OFBool ModalitiesMatch( const char *datasetValue, const char *searchMaskValue );
00138 
00145     OFBool ScheduledPerformingPhysiciansNamesMatch( const char *datasetValue, const char *searchMaskValue );
00146 
00153     OFBool PatientsNamesMatch( const char *datasetValue, const char *searchMaskValue );
00154 
00161     OFBool PatientIdsMatch( const char *datasetValue, const char *searchMaskValue );
00162 
00169     OFBool AccessionNumbersMatch( const char *datasetValue, const char *searchMaskValue );
00170 
00177     OFBool RequestedProcedureIdsMatch( const char *datasetValue, const char *searchMaskValue );
00178 
00185     OFBool ReferringPhysiciansNamesMatch( const char *datasetValue, const char *searchMaskValue );
00186 
00193     OFBool PatientsSexesMatch( const char *datasetValue, const char *searchMaskValue );
00194 
00201     OFBool RequestingPhysiciansMatch( const char *datasetValue, const char *searchMaskValue );
00202 
00209     OFBool AdmissionIdsMatch( const char *datasetValue, const char *searchMaskValue );
00210 
00217     OFBool RequestedProcedurePrioritiesMatch( const char *datasetValue, const char *searchMaskValue );
00218 
00228     OFBool DateTimeRangeMatch( const char *datasetDateValue, const char *datasetTimeValue, const char *searchMaskDateValue, const char *searchMaskTimeValue );
00229 
00237     OFBool DateRangeMatch( const char *datasetDateValue, const char *searchMaskDateValue );
00238 
00246     OFBool TimeRangeMatch( const char *datasetTimeValue, const char *searchMaskTimeValue );
00247 
00257     OFBool DateTimeSingleValueMatch( const char *datasetDateValue, const char *datasetTimeValue, const char *searchMaskDateValue, const char *searchMaskTimeValue );
00258 
00266     OFBool DateSingleValueMatch( const char *datasetDateValue, const char *searchMaskDateValue );
00267 
00275     OFBool TimeSingleValueMatch( const char *datasetTimeValue, const char *searchMaskTimeValue );
00276 
00284     OFBool CaseSensitiveSingleValueMatch( const char *datasetValue, const char *searchMaskValue );
00285 
00292     OFBool WildcardMatch( const char *datasetValue, const char *searchMaskValue );
00293 
00303     OFBool MatchStarSymbol( const char *dv, const char *sv );
00304 
00313     void ExtractValuesFromRange( const char *range, char *&lower, char *&upper );
00314 
00315   public:
00318     WlmFileSystemInteractionManager();
00319 
00322     ~WlmFileSystemInteractionManager();
00323 
00327     void SetLogStream( OFConsole *value );
00328 
00332     void SetVerbose( OFBool value );
00333 
00337     void SetDebug( OFBool value );
00338 
00343     OFCondition ConnectToFileSystem( char *dfPathv );
00344 
00348     OFCondition DisconnectFromFileSystem();
00349 
00357     OFBool IsCalledApplicationEntityTitleSupported( char *calledApplicationEntityTitlev );
00358 
00366     unsigned long DetermineMatchingRecords( DcmDataset *searchMask );
00367 
00383     unsigned long GetNumberOfSequenceItemsForMatchingRecord( DcmTagKey sequenceTag, WlmSuperiorSequenceInfoType *superiorSequenceArray, unsigned long numOfSuperiorSequences, unsigned long idx );
00384 
00395     void GetAttributeValueForMatchingRecord( DcmTagKey tag, WlmSuperiorSequenceInfoType *superiorSequenceArray, unsigned long numOfSuperiorSequences, unsigned long idx, char *&value );
00396 
00400     void ClearMatchingRecords();
00401 };
00402 
00403 #endif
00404 
00405 /*
00406 ** CVS Log
00407 ** $Log: wlfsim.h,v $
00408 ** Revision 1.7  2004/01/07 08:32:28  wilkens
00409 ** Added new sequence type return key attributes to wlmscpfs. Fixed bug that for
00410 ** equally named attributes in sequences always the same value will be returned.
00411 ** Added functionality that also more than one item will be returned in sequence
00412 ** type return key attributes.
00413 **
00414 ** Revision 1.6  2003/12/23 13:04:36  wilkens
00415 ** Integrated new matching key attributes into wlmscpfs.
00416 **
00417 ** Revision 1.5  2003/07/02 09:17:55  wilkens
00418 ** Updated documentation to get rid of doxygen warnings.
00419 **
00420 ** Revision 1.4  2002/12/16 11:08:35  wilkens
00421 ** Added missing #include "osconfig.h" to certain files.
00422 **
00423 ** Revision 1.3  2002/12/09 13:41:43  joergr
00424 ** Renamed parameter to avoid name clash with global function index().
00425 ** Added private undefined copy constructor and/or assignment operator.
00426 **
00427 ** Revision 1.2  2002/08/12 10:56:08  wilkens
00428 ** Made some modifications in in order to be able to create a new application
00429 ** which contains both wlmscpdb and ppsscpdb and another application which
00430 ** contains both wlmscpfs and ppsscpfs.
00431 **
00432 ** Revision 1.1  2002/08/05 09:09:58  wilkens
00433 ** Modfified the project's structure in order to be able to create a new
00434 ** application which contains both wlmscpdb and ppsscpdb.
00435 **
00436 ** Revision 1.1  2002/07/17 13:10:21  wilkens
00437 ** Corrected some minor logical errors in the wlmscpdb sources and completely
00438 ** updated the wlmscpfs so that it does not use the original wlistctn sources
00439 ** any more but standard wlm sources which are now used by all three variants
00440 ** of wlmscps.
00441 **
00442 **
00443 **
00444 */


Generated on 29 Apr 2005 for OFFIS DCMTK Version 3.5.3 by Doxygen 1.4.2