00001 /* 00002 * 00003 * Copyright (C) 2000-2005, 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: dcmsr 00019 * 00020 * Author: Joerg Riesmeier 00021 * 00022 * Purpose: 00023 * classes: DSRByReferenceTreeNode 00024 * 00025 * Last Update: $Author: meichel $ 00026 * Update Date: $Date: 2005/12/08 16:05:14 $ 00027 * CVS/RCS Revision: $Revision: 1.10 $ 00028 * Status: $State: Exp $ 00029 * 00030 * CVS/RCS Log at end of file 00031 * 00032 */ 00033 00034 00035 #ifndef DSRREFTN_H 00036 #define DSRREFTN_H 00037 00038 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ 00039 00040 #include "dcmtk/dcmsr/dsrdoctr.h" 00041 #include "dcmtk/dcmsr/dsrdoctn.h" 00042 00043 00044 /*---------------------* 00045 * class declaration * 00046 *---------------------*/ 00047 00050 class DSRByReferenceTreeNode 00051 : public DSRDocumentTreeNode 00052 { 00053 // allow access to private member variables 00054 friend class DSRDocumentTree; 00055 00056 public: 00057 00062 DSRByReferenceTreeNode(const E_RelationshipType relationshipType); 00063 00069 DSRByReferenceTreeNode(const E_RelationshipType relationshipType, 00070 const size_t referencedNodeID); 00071 00074 virtual ~DSRByReferenceTreeNode(); 00075 00079 virtual void clear(); 00080 00086 virtual OFBool isValid() const; 00087 00094 virtual OFCondition print(ostream &stream, 00095 const size_t flags) const; 00096 00103 virtual OFCondition writeXML(ostream &stream, 00104 const size_t flags, 00105 OFConsole *logStream) const; 00106 00111 virtual OFCondition setConceptName(const DSRCodedEntryValue &conceptName); 00112 00118 virtual OFCondition setObservationDateTime(const OFString &observationDateTime); 00119 00126 virtual OFCondition setTemplateIdentification(const OFString &templateIdentifier, 00127 const OFString &mappingResource); 00128 00132 size_t getReferencedNodeID() const 00133 { 00134 return ReferencedNodeID; 00135 } 00136 00137 00138 protected: 00139 00145 virtual OFCondition readContentItem(DcmItem &dataset, 00146 OFConsole *logStream); 00147 00153 virtual OFCondition writeContentItem(DcmItem &dataset, 00154 OFConsole *logStream) const; 00155 00161 virtual OFCondition readXMLContentItem(const DSRXMLDocument &doc, 00162 DSRXMLCursor cursor); 00163 00174 virtual OFCondition renderHTMLContentItem(ostream &docStream, 00175 ostream &annexStream, 00176 const size_t nestingLevel, 00177 size_t &annexNumber, 00178 const size_t flags, 00179 OFConsole *logStream) const; 00180 00181 00182 private: 00183 00185 OFBool ValidReference; 00187 OFString ReferencedContentItem; 00189 size_t ReferencedNodeID; 00190 00191 00192 // --- declaration of default/copy constructor and assignment operator 00193 00194 DSRByReferenceTreeNode(); 00195 DSRByReferenceTreeNode(const DSRByReferenceTreeNode &); 00196 DSRByReferenceTreeNode &operator=(const DSRByReferenceTreeNode &); 00197 }; 00198 00199 00200 #endif 00201 00202 00203 /* 00204 * CVS/RCS Log: 00205 * $Log: dsrreftn.h,v $ 00206 * Revision 1.10 2005/12/08 16:05:14 meichel 00207 * Changed include path schema for all DCMTK header files 00208 * 00209 * Revision 1.9 2003/10/30 17:53:02 joergr 00210 * Added full support for the ContentTemplateSequence (read/write, get/set 00211 * template identification). Template constraints are not checked yet. 00212 * 00213 * Revision 1.8 2003/09/15 14:18:54 joergr 00214 * Introduced new class to facilitate checking of SR IOD relationship content 00215 * constraints. Replaced old implementation distributed over numerous classes. 00216 * 00217 * Revision 1.7 2003/08/07 12:45:14 joergr 00218 * Added readXML functionality. 00219 * 00220 * Revision 1.6 2001/09/28 14:07:02 joergr 00221 * Added term "class" to friend declaration to keep gcc 3.0 quiet. 00222 * 00223 * Revision 1.5 2001/09/26 13:04:10 meichel 00224 * Adapted dcmsr to class OFCondition 00225 * 00226 * Revision 1.4 2001/06/01 15:51:03 meichel 00227 * Updated copyright header 00228 * 00229 * Revision 1.3 2000/11/07 18:14:30 joergr 00230 * Enhanced support for by-reference relationships. 00231 * 00232 * Revision 1.2 2000/11/01 16:23:23 joergr 00233 * Added support for conversion to XML. 00234 * 00235 * Revision 1.1 2000/10/26 14:22:42 joergr 00236 * Added support for "Comprehensive SR". 00237 * 00238 * 00239 * 00240 */