1 /*
2  *
3  *  Copyright (C) 2002-2016, OFFIS e.V.
4  *  All rights reserved.  See COPYRIGHT file for details.
5  *
6  *  This software and supporting documentation were developed by
7  *
8  *    OFFIS e.V.
9  *    R&D Division Health
10  *    Escherweg 2
11  *    D-26121 Oldenburg, Germany
12  *
13  *
14  *  Module: dcmsr
15  *
16  *  Author: Joerg Riesmeier
17  *
18  *  Purpose:
19  *    classes: DSRSOPInstanceReferenceList
20  *             - InstanceStruct, SeriesStruct, StudyStruct
21  *
22  */
23 
24 
25 #ifndef DSRSOPRF_H
26 #define DSRSOPRF_H
27 
28 #include "dcmtk/config/osconfig.h"   /* make sure OS specific configuration is included first */
29 
30 #include "dcmtk/dcmsr/dsrtypes.h"
31 #include "dcmtk/dcmsr/dsrcodvl.h"
32 
33 
34 /*---------------------*
35  *  class declaration  *
36  *---------------------*/
37 
38 /** Class for SOP instance reference lists
39  */
40 class DCMTK_DCMSR_EXPORT DSRSOPInstanceReferenceList
41   : public DSRTypes
42 {
43 
44   public:
45 
46     /** constructor
47      ** @param  sequence  DICOM tag specifying the attribute (sequence) of the reference list
48      */
49     DSRSOPInstanceReferenceList(const DcmTagKey &sequence);
50 
51     /** destructor
52      */
53     ~DSRSOPInstanceReferenceList();
54 
55     /** clear list of references
56      */
57     void clear();
58 
59     /** check whether list of references is empty
60      ** @return OFTrue if list is empty, OFFalse otherwise
61      */
62     OFBool isEmpty() const;
63 
64     /** get number of instance stored in the list of references
65      ** @return number of instances
66      */
67     size_t getNumberOfInstances() const;
68 
69     /** read list of referenced SOP instances.
70      *  The hierarchical structure is automatically reorganized in a way that each study,
71      *  each series (within a study) and each instance (within a series) only exist once,
72      *  i.e. the structure might look different when written back to a dataset.  However,
73      *  the content is identical and this way of storing information saves storage space.
74      ** @param  dataset  DICOM dataset from which the data should be read
75      *  @param  flags    flag used to customize the reading process (see DSRTypes::RF_xxx)
76      ** @return status, EC_Normal if successful, an error code otherwise
77      */
78     OFCondition read(DcmItem &dataset,
79                      const size_t flags);
80 
81     /** write list of referenced SOP instances.
82      *  Does nothing if list is empty.
83      ** @param  dataset  DICOM dataset to which the data should be written
84      ** @return status, EC_Normal if successful, an error code otherwise
85      */
86     OFCondition write(DcmItem &dataset) const;
87 
88     /** read list of references from XML document.
89      *  The hierarchical structure is automatically reorganized in a way that each study,
90      *  each series (within a study) and each instance (within a series) only exist once,
91      *  i.e. the structure might look different when written back to a dataset.  However,
92      *  the content is identical and this way of storing information saves storage space.
93      ** @param  doc     document containing the XML file content
94      *  @param  cursor  cursor pointing to the starting node
95      *  @param  flags   flag used to customize the reading process (see DSRTypes::XF_xxx)
96      ** @return status, EC_Normal if successful, an error code otherwise
97      */
98     OFCondition readXML(const DSRXMLDocument &doc,
99                         DSRXMLCursor cursor,
100                         const size_t flags);
101 
102     /** write current list of references in XML format
103      ** @param  stream  output stream to which the XML data is written
104      *  @param  flags   flag used to customize the output (see DSRTypes::XF_xxx)
105      ** @return status, EC_Normal if successful, an error code otherwise
106      */
107     OFCondition writeXML(STD_NAMESPACE ostream &stream,
108                          const size_t flags) const;
109 
110     /** set specific character set, which is used for checking the affected element values.
111      *  Please note that this method does not return an error if the given 'value' is not
112      *  defined by the DICOM standard or not supported by this implementation.
113      ** @param  value  value to be set (single or multiple values) or "" for no value
114      *  @param  check  check 'value' for conformance with VR (CS) and VM (1-n) if enabled
115      ** @return status, EC_Normal if successful, an error code otherwise
116      */
117     OFCondition setSpecificCharacterSet(const OFString &value,
118                                         const OFBool check = OFTrue);
119 
120     /** add the specified item to the list of references.
121      *  Before adding the item, the given UID values are usually checked.  If one of the
122      *  values is invalid, nothing is done but an error is returned.  If successful, the
123      *  item is inserted into the hierarchical structure of studies, series and instances,
124      *  if not already contained in the list. In any case, the specified item is selected
125      *  as the current one.
126      ** @param  studyUID     study instance UID of the entry to be added
127      *  @param  seriesUID    series instance UID of the entry to be added
128      *  @param  sopClassUID  SOP class UID of the entry to be added
129      *  @param  instanceUID  SOP instance UID of the entry to be added
130      *  @param  check        if enabled, check values for validity before adding them.
131      *                       See checkSOPInstance() method for details.  Empty values are
132      *                       never accepted.
133      ** @return status, EC_Normal if successful, an error code otherwise
134      */
135     OFCondition addItem(const OFString &studyUID,
136                         const OFString &seriesUID,
137                         const OFString &sopClassUID,
138                         const OFString &instanceUID,
139                         const OFBool check = OFTrue);
140 
141     /** add item from specified DICOM dataset to the list of references.
142      *  Internally, an item representing the given dataset is inserted into the hierarchical
143      *  structure of studies, series and instances, if not already contained in the list.
144      *  In any case, the specified item is selected as the current one.
145      ** @param  dataset  reference to DICOM dataset from which the relevant UIDs are retrieved
146      *  @param  check    if enabled, check values for validity before adding them.  See
147      *                   checkSOPInstance() method for details.  An empty value is never
148      *                   accepted.
149      ** @return status, EC_Normal if successful, an error code otherwise
150      */
151     OFCondition addItem(DcmItem &dataset,
152                         const OFBool check = OFTrue);
153 
154     /** remove the current item from the list of referenced SOP instances.
155      *  After successful removal the cursor is set to the next valid position.
156      ** @return status, EC_Normal if successful, an error code otherwise
157      */
158     OFCondition removeItem();
159 
160     /** remove the specified item from the list of references.
161      *  After successful removal the cursor is set to the next valid position.
162      ** @param  sopClassUID  SOP class UID of the item to be removed
163      *  @param  instanceUID  SOP instance UID of the item to be removed
164      ** @return status, EC_Normal if successful, an error code otherwise
165      */
166     OFCondition removeItem(const OFString &sopClassUID,
167                            const OFString &instanceUID);
168 
169     /** remove the specified item from the list of references.
170      *  After successful removal the cursor is set to the next valid position.
171      ** @param  studyUID     study instance UID of the item to be removed
172      *  @param  seriesUID    series instance UID of the item to be removed
173      *  @param  instanceUID  SOP instance UID of the item to be removed
174      ** @return status, EC_Normal if successful, an error code otherwise
175      */
176     OFCondition removeItem(const OFString &studyUID,
177                            const OFString &seriesUID,
178                            const OFString &instanceUID);
179 
180     /** select the specified item as the current one
181      ** @param  sopClassUID  SOP class UID of the item to be selected
182      *  @param  instanceUID  SOP instance UID of the item to be selected
183      ** @return status, EC_Normal if successful, an error code otherwise
184      */
185     OFCondition gotoItem(const OFString &sopClassUID,
186                          const OFString &instanceUID);
187 
188     /** select the specified item as the current one
189      ** @param  studyUID     study instance UID of the item to be selected
190      *  @param  seriesUID    series instance UID of the item to be selected
191      *  @param  instanceUID  SOP instance UID of the item to be selected
192      ** @return status, EC_Normal if successful, an error code otherwise
193      */
194     OFCondition gotoItem(const OFString &studyUID,
195                          const OFString &seriesUID,
196                          const OFString &instanceUID);
197 
198     /** select the first item in the list.
199      *  That means the first instance in the first series of the first study
200      *  is selected (if available).
201      ** @return status, EC_Normal if successful, an error code otherwise.
202      *    (e.g. if the list is empty)
203      */
204     OFCondition gotoFirstItem();
205 
206     /** select the next item in the list.
207      *  That means the next instance in the current series, or the first instance
208      *  in the next series, or the first instance in the first series of the next
209      *  study is selected (if available).  The combination of this function and
210      *  gotoFirstItem() allows to iterate over all referenced SOP instances.
211      ** @return status, EC_Normal if successful, an error code otherwise.
212      *    (e.g. if the end of the list has been reached)
213      */
214     OFCondition gotoNextItem();
215 
216     /** get the study instance UID of the currently selected entry
217      ** @param  stringValue  reference to string variable in which the result is stored
218      ** @return reference to the resulting string (might be empty)
219      */
220     const OFString &getStudyInstanceUID(OFString &stringValue) const;
221 
222     /** get the series instance UID of the currently selected entry
223      ** @param  stringValue  reference to string variable in which the result is stored
224      ** @return reference to the resulting string (might be empty)
225      */
226     const OFString &getSeriesInstanceUID(OFString &stringValue) const;
227 
228     /** get the SOP instance UID of the currently selected entry
229      ** @param  stringValue  reference to string variable in which the result is stored
230      ** @return reference to the resulting string (might be empty)
231      */
232     const OFString &getSOPInstanceUID(OFString &stringValue) const;
233 
234     /** get the SOP class UID of the currently selected entry
235      ** @param  stringValue  reference to string variable in which the result is stored
236      ** @return reference to the resulting string (might be empty)
237      */
238     const OFString &getSOPClassUID(OFString &stringValue) const;
239 
240     /** get name associated with the SOP class UID of the currently selected entry
241      ** @param  stringValue  reference to string variable in which the result is stored
242      *  @param  defaultName  string value that is returned if the SOP class UID is unknown
243      ** @return reference to the resulting string (might be empty even if 'defaultName' is
244      *          non-empty, e.g. in case no entry is currently selected)
245      */
246     const OFString &getSOPClassName(OFString &stringValue,
247                                     const OFString &defaultName = "unknown SOP Class UID") const;
248 
249     /** get the retrieve application entity title of the currently selected entry (optional).
250      *  The resulting string may contain multiple values separated by a backslash ("\").
251      ** @param  stringValue  reference to string variable in which the result is stored
252      ** @return reference to the resulting string (might be empty)
253      */
254     const OFString &getRetrieveAETitle(OFString &stringValue) const;
255 
256     /** get the retrieve location UID of the currently selected entry (optional)
257      ** @param  stringValue  reference to string variable in which the result is stored
258      ** @return reference to the resulting string (might be empty)
259      */
260     const OFString &getRetrieveLocationUID(OFString &stringValue) const;
261 
262     /** get the storage media file set ID of the currently selected entry (optional)
263      ** @param  stringValue  reference to string variable in which the result is stored
264      ** @return reference to the resulting string (might be empty)
265      */
266     const OFString &getStorageMediaFileSetID(OFString &stringValue) const;
267 
268     /** get the storage media file set UID of the currently selected entry (optional)
269      ** @param  stringValue  reference to string variable in which the result is stored
270      ** @return reference to the resulting string (might be empty)
271      */
272     const OFString &getStorageMediaFileSetUID(OFString &stringValue) const;
273 
274     /** get purpose of reference code of the currently selected entry (optional)
275      ** @param  codeValue  variable where a copy of the code should be stored
276      ** @return status, EC_Normal if successful, an error code otherwise
277      */
278     OFCondition getPurposeOfReference(DSRCodedEntryValue &codeValue) const;
279 
280     /** set the retrieve application entity title of the currently selected entry
281      ** @param  value  string value to be set (possibly multi-valued) or "" for no value
282      *  @param  check  check 'value' for conformance with VR (AE) and VM (1-n) if enabled
283      ** @return status, EC_Normal if successful, an error code otherwise
284      */
285     OFCondition setRetrieveAETitle(const OFString &value,
286                                    const OFBool check = OFTrue);
287 
288     /** set the retrieve location UID of the currently selected entry
289      ** @param  value  string value to be set (single value only) or "" for no value
290      *  @param  check  check 'value' for conformance with VR (UI) and VM (1) if enabled
291      ** @return status, EC_Normal if successful, an error code otherwise
292      */
293     OFCondition setRetrieveLocationUID(const OFString &value,
294                                        const OFBool check = OFTrue);
295 
296     /** set the storage media file set ID of the currently selected entry
297      ** @param  value  string value to be set (single value only) or "" for no value
298      *  @param  check  check 'value' for conformance with VR (SH) and VM (1) if enabled
299      ** @return status, EC_Normal if successful, an error code otherwise
300      */
301     OFCondition setStorageMediaFileSetID(const OFString &value,
302                                          const OFBool check = OFTrue);
303 
304     /** set the storage media file set UID of the currently selected entry
305      ** @param  value  string value to be set (single value only) or "" for no value
306      *  @param  check  check 'value' for conformance with VR (UI) and VM (1) if enabled
307      ** @return status, EC_Normal if successful, an error code otherwise
308      */
309     OFCondition setStorageMediaFileSetUID(const OFString &value,
310                                           const OFBool check = OFTrue);
311 
312     /** set purpose of reference code of the currently selected entry.
313      *  Before setting the value, it is usually checked.  If the value is invalid, the
314      *  current value is not replaced and remains unchanged.
315      ** @param  codeValue  value to be set (optional).  Use an empty code to remove the
316      *                     current value.
317      *  @param  check      if enabled, check value for validity before setting it.  See
318      *                     checkPurposeOfReference() method for details.
319      ** @return status, EC_Normal if successful, an error code otherwise
320      */
321     OFCondition setPurposeOfReference(const DSRCodedEntryValue &codeValue,
322                                       const OFBool check = OFTrue);
323 
324 
325   protected:
326 
327     /** Internal structure defining the instance list items
328      */
329     struct DCMTK_DCMSR_EXPORT InstanceStruct
330     {
331         /** constructor
332          ** @param  sopClassUID  SOP class UID
333          ** @param  instanceUID  SOP instance UID
334          */
335         InstanceStruct(const OFString &sopClassUID,
336                        const OFString &instanceUID);
337 
338         /** clear additional information
339          */
340         void clear();
341 
342         /// SOP Class UID (VR=UI, type 1)
343         const OFString SOPClassUID;
344         /// SOP Instance UID (VR=UI, type 1)
345         const OFString InstanceUID;
346         /// Purpose of Reference Code Sequence (VR=SQ, type 3).
347         /// NB: According to the DICOM standard, "One or more Items are permitted in this
348         ///     sequence."  However, the current implementation only supports a single
349         ///     item.  Also see documentation of DSRCodedEntryValue::readSequence().
350         DSRCodedEntryValue PurposeOfReference;
351     };
352 
353     /** Internal structure defining the series list items
354      */
355     struct DCMTK_DCMSR_EXPORT SeriesStruct
356     {
357         /** constructor
358          ** @param  seriesUID  series instance UID
359          */
360         SeriesStruct(const OFString &seriesUID);
361 
362         /** destructor
363          */
364         ~SeriesStruct();
365 
366         /** get number of instance stored in the list of instances
367          ** @return number of instances
368          */
369         size_t getNumberOfInstances() const;
370 
371         /** read instance level attributes from dataset
372          ** @param  dataset  DICOM dataset from which the list should be read
373          *  @param  flags    flag used to customize the reading process (see DSRTypes::RF_xxx)
374          ** @return status, EC_Normal if successful, an error code otherwise
375          */
376         OFCondition read(DcmItem &dataset,
377                          const size_t flags);
378 
379         /** write series and instance level attributes to dataset
380          ** @param  dataset  DICOM dataset to which the list should be written
381          ** @return status, EC_Normal if successful, an error code otherwise
382          */
383         OFCondition write(DcmItem &dataset) const;
384 
385         /** read series and instance level attributes from XML document
386          ** @param  doc     document containing the XML file content
387          *  @param  cursor  cursor pointing to the starting node
388          *  @param  flags   flag used to customize the reading process (see DSRTypes::XF_xxx)
389          ** @return status, EC_Normal if successful, an error code otherwise
390          */
391         OFCondition readXML(const DSRXMLDocument &doc,
392                             DSRXMLCursor cursor,
393                             const size_t flags);
394 
395         /** write series and instance level attributes in XML format
396          ** @param  stream  output stream to which the XML document is written
397          *  @param  flags   flag used to customize the output (see DSRTypes::XF_xxx)
398          ** @return status, EC_Normal if successful, an error code otherwise
399          */
400         OFCondition writeXML(STD_NAMESPACE ostream &stream,
401                              const size_t flags) const;
402 
403         /** set cursor to the specified instance (if existent)
404          ** @param  instanceUID  SOP instance UID of the entry to be searched for
405          ** @return pointer to the instance structure if successful, NULL otherwise
406          */
407         InstanceStruct *gotoInstance(const OFString &instanceUID);
408 
409         /** select the first item in the list.
410          *  That means the first instance in the current series.
411          ** @return status, EC_Normal if successful, an error code otherwise
412          */
413         OFCondition gotoFirstItem();
414 
415         /** select the next item in the list.
416          *  That means the next instance in the current series (if available).
417          ** @return status, EC_Normal if successful, an error code otherwise
418          */
419         OFCondition gotoNextItem();
420 
421         /** add new entry to the list of instances (if not already existent).
422          *  Finally, the specified item is selected as the current one.
423          ** @param  sopClassUID  SOP class UID of the entry to be added
424          *  @param  instanceUID  SOP instance UID of the entry to be added
425          ** @return status, EC_Normal if successful, an error code otherwise
426          */
427         OFCondition addItem(const OFString &sopClassUID,
428                             const OFString &instanceUID);
429 
430         /** remove the current item from the list of instances.
431          *  After successful removal the cursor is set to the next valid position.
432          ** @return status, EC_Normal if successful, an error code otherwise
433          */
434         OFCondition removeItem();
435 
436         /// Series Instance UID (VR=UI, VM=1, type 1)
437         const OFString SeriesUID;
438         /// Retrieve Application Entity Title (VR=AE, VM=1-n, type 3)
439         OFString RetrieveAETitle;
440         /// Retrieve Location UID (VR=UI, VM=1, type 3)
441         OFString RetrieveLocationUID;
442         /// Storage Media File Set ID (VR=SH, VM=1, type 3)
443         OFString StorageMediaFileSetID;
444         /// Storage Media File Set UID (VR=UI, VM=1, type 3)
445         OFString StorageMediaFileSetUID;
446 
447         /// list of referenced instances
448         OFList<InstanceStruct *> InstanceList;
449         /// currently selected instance (cursor)
450         OFListIterator(InstanceStruct *) Iterator;
451     };
452 
453     /** To make VC6 happy.
454      */
455     friend struct SeriesStruct;
456 
457     /** Internal structure defining the study list items
458      */
459     struct DCMTK_DCMSR_EXPORT StudyStruct
460     {
461         /** constructor
462          ** @param  studyUID  study instance UID
463          */
464         StudyStruct(const OFString &studyUID);
465 
466         /** destructor
467          */
468         ~StudyStruct();
469 
470         /** get number of instance stored in the list of series
471          ** @return number of instances
472          */
473         size_t getNumberOfInstances() const;
474 
475         /** read series and instance level from dataset
476          ** @param  dataset  DICOM dataset from which the list should be read
477          *  @param  flags    flag used to customize the reading process (see DSRTypes::RF_xxx)
478          ** @return status, EC_Normal if successful, an error code otherwise
479          */
480         OFCondition read(DcmItem &dataset,
481                          const size_t flags);
482 
483         /** write study, series and instance level attributes to dataset
484          ** @param  dataset  DICOM dataset to which the list should be written
485          ** @return status, EC_Normal if successful, an error code otherwise
486          */
487         OFCondition write(DcmItem &dataset) const;
488 
489         /** read study, series and instance level attributes from XML document
490          ** @param  doc     document containing the XML file content
491          *  @param  cursor  cursor pointing to the starting node
492          *  @param  flags   flag used to customize the reading process (see DSRTypes::XF_xxx)
493          ** @return status, EC_Normal if successful, an error code otherwise
494          */
495         OFCondition readXML(const DSRXMLDocument &doc,
496                             DSRXMLCursor cursor,
497                             const size_t flags);
498 
499         /** write study, series and instance level attributes in XML format
500          ** @param  stream  output stream to which the XML document is written
501          *  @param  flags   flag used to customize the output (see DSRTypes::XF_xxx)
502          ** @return status, EC_Normal if successful, an error code otherwise
503          */
504         OFCondition writeXML(STD_NAMESPACE ostream &stream,
505                              const size_t flags) const;
506 
507         /** set cursor to the specified series entry (if existent)
508          ** @param  seriesUID  series instance UID of the entry to be searched for
509          ** @return pointer to the series structure if successful, NULL otherwise
510          */
511         SeriesStruct *gotoSeries(const OFString &seriesUID);
512 
513         /** set cursor to the specified instance entry (if existent)
514          ** @param  instanceUID  SOP instance UID of the entry to be searched for
515          ** @return pointer to the instance structure if successful, NULL otherwise
516          */
517         InstanceStruct *gotoInstance(const OFString &instanceUID);
518 
519         /** select the first item in the list.
520          *  That means the first instance in the first series of the current study.
521          ** @return status, EC_Normal if successful, an error code otherwise
522          */
523         OFCondition gotoFirstItem();
524 
525         /** select the next item in the list.
526          *  That means the next instance in the current series, or the first instance
527          *  in the next series (if available).
528          ** @return status, EC_Normal if successful, an error code otherwise
529          */
530         OFCondition gotoNextItem();
531 
532         /** add new entry to the list of series and instances (if not already existent).
533          *  Finally, the specified items are selected as the current one.
534          ** @param  seriesUID    series instance UID of the entry to be added
535          *  @param  sopClassUID  SOP class UID of the entry to be added
536          *  @param  instanceUID  SOP instance UID of the entry to be added
537          ** @return status, EC_Normal if successful, an error code otherwise
538          */
539         OFCondition addItem(const OFString &seriesUID,
540                             const OFString &sopClassUID,
541                             const OFString &instanceUID);
542 
543         /** remove the current item from the list of series and instances.
544          *  After successful removal the cursors are set to the next valid position.
545          ** @return status, EC_Normal if successful, an error code otherwise
546          */
547         OFCondition removeItem();
548 
549         /** remove empty/incomplete items from the list.
550          *  (e.g. series with no instances)
551          *  Please note that this function modifies the value of 'Iterator'.
552          */
553         void removeIncompleteItems();
554 
555         /// Study Instance UID (VR=UI, type 1)
556         const OFString StudyUID;
557 
558         /// list of referenced series
559         OFList<SeriesStruct *> SeriesList;
560         /// currently selected series (cursor)
561         OFListIterator(SeriesStruct *) Iterator;
562     };
563 
564     /** To make VC6 happy.
565      */
566     friend struct StudyStruct;
567 
568     /** set cursor to the specified study entry (if existent)
569      ** @param  studyUID  study instance UID of the entry to be searched for
570      ** @return pointer to the study structure if successful, NULL otherwise
571      */
572     StudyStruct *gotoStudy(const OFString &studyUID);
573 
574     /** get pointer to currently selected study structure (if any)
575      ** @return pointer to the study structure if successful, NULL otherwise
576      */
577     StudyStruct *getCurrentStudy() const;
578 
579     /** get pointer to currently selected series structure (if any)
580      ** @return pointer to the series structure if successful, NULL otherwise
581      */
582     SeriesStruct *getCurrentSeries() const;
583 
584     /** get pointer to currently selected instance structure (if any)
585      ** @return pointer to the instance structure if successful, NULL otherwise
586      */
587     InstanceStruct *getCurrentInstance() const;
588 
589     /** remove empty/incomplete items from the list.
590      *  (e.g. series with no instances or studies with no series)
591      *  Please note that this function modifies the value of 'Iterator'.
592      */
593     void removeIncompleteItems();
594 
595     /** check the four specified UID values for validity.
596      *  Currently, the only checks performed are that the strings are non-empty and that
597      *  the given values conform to the corresponding VR (UI) and VM (1).
598      ** @param  studyUID     study instance UID to be checked
599      *  @param  seriesUID    series instance UID to be checked
600      *  @param  sopClassUID  SOP class UID to be checked
601      *  @param  instanceUID  SOP instance UID to be checked
602      ** @return status, EC_Normal if all values are valid, an error code otherwise
603      */
604     OFCondition checkSOPInstance(const OFString &studyUID,
605                                  const OFString &seriesUID,
606                                  const OFString &sopClassUID,
607                                  const OFString &instanceUID) const;
608 
609     /** check the specified purpose of reference code for validity.
610      *  Internally, the method DSRCodedEntryValue::checkCurrentValue()
611      *  is used for this purpose (if the code is not empty).
612      ** @param  purposeOfReference  purpose of reference code to be checked
613      ** @return status, EC_Normal if code is valid, an error code otherwise
614      */
615     OFCondition checkPurposeOfReference(const DSRCodedEntryValue &purposeOfReference) const;
616 
617 
618   private:
619 
620     /// DICOM tag specifying the attribute (sequence) of the reference list
621     const DcmTagKey SequenceTag;
622 
623     /// list of studies
624     OFList<StudyStruct *> StudyList;
625     /// internal cursor to current (selected) list item
626     OFListIterator(StudyStruct *) Iterator;
627     /// specific character set used for checking purposes
628     OFString SpecificCharacterSet;
629 
630     // default constructor - not implemented!
631     DSRSOPInstanceReferenceList();
632     // copy constructor - not implemented!
633     DSRSOPInstanceReferenceList(const DSRSOPInstanceReferenceList &);
634     // assignment operator - not implemented!
635     DSRSOPInstanceReferenceList &operator=(const DSRSOPInstanceReferenceList &);
636 };
637 
638 
639 #endif
640