00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
#ifndef DSRCODVL_H
00036
#define DSRCODVL_H
00037
00038
#include "osconfig.h"
00039
00040
#include "dsrtypes.h"
00041
00042
#include "ofstring.h"
00043
00044
00045
00046
00047
00048
00051 class DSRCodedEntryValue
00052 {
00053
00054
friend class DSRContentItem;
00055
00056
public:
00057
00060
DSRCodedEntryValue();
00061
00072
DSRCodedEntryValue(
const OFString &codeValue,
00073
const OFString &codingSchemeDesignator,
00074
const OFString &codeMeaning);
00075
00090
DSRCodedEntryValue(
const OFString &codeValue,
00091
const OFString &codingSchemeDesignator,
00092
const OFString &codingSchemeVersion,
00093
const OFString &codeMeaning);
00094
00098
DSRCodedEntryValue(
const DSRCodedEntryValue &codedEntryValue);
00099
00102
virtual ~DSRCodedEntryValue();
00103
00108
DSRCodedEntryValue &
operator=(
const DSRCodedEntryValue &codedEntryValue);
00109
00116 OFBool
operator==(
const DSRCodedEntryValue &codedEntryValue)
const;
00117
00121
virtual void clear();
00122
00127
virtual OFBool
isValid()
const;
00128
00133
virtual OFBool
isEmpty()
const;
00134
00146
void print(ostream &stream,
00147
const OFBool printCodeValue = OFTrue,
00148
const OFBool printInvalid = OFFalse)
const;
00149
00161
OFCondition readSequence(
DcmItem &dataset,
00162
const DcmTagKey &tagKey,
00163
const OFString &type,
00164
OFConsole *logStream);
00165
00172
OFCondition writeSequence(
DcmItem &dataset,
00173
const DcmTagKey &tagKey,
00174
OFConsole *logStream)
const;
00175
00181
OFCondition readXML(
const DSRXMLDocument &doc,
00182
DSRXMLCursor cursor);
00183
00190
OFCondition writeXML(ostream &stream,
00191
const size_t flags,
00192
OFConsole *logStream)
const;
00193
00204
OFCondition renderHTML(ostream &stream,
00205
const size_t flags,
00206
OFConsole *logStream,
00207
const OFBool fullCode = OFTrue,
00208
const OFBool valueFirst = OFFalse)
const;
00209
00213 inline const DSRCodedEntryValue &
getValue()
const
00214
{
00215
return *
this;
00216 }
00217
00222
OFCondition getValue(
DSRCodedEntryValue &codedEntryValue)
const;
00223
00228 inline const OFString &
getCodeValue()
const
00229
{
00230
return CodeValue;
00231 }
00232
00240 inline const OFString &
getCodingSchemeDesignator()
const
00241
{
00242
return CodingSchemeDesignator;
00243 }
00244
00250 inline const OFString &
getCodingSchemeVersion()
const
00251
{
00252
return CodingSchemeVersion;
00253 }
00254
00260 inline const OFString &
getCodeMeaning()
const
00261
{
00262
return CodeMeaning;
00263 }
00264
00271
OFCondition setValue(
const DSRCodedEntryValue &codedEntryValue);
00272
00289
OFCondition setCode(
const OFString &codeValue,
00290
const OFString &codingSchemeDesignator,
00291
const OFString &codeMeaning);
00292
00313
OFCondition setCode(
const OFString &codeValue,
00314
const OFString &codingSchemeDesignator,
00315
const OFString &codingSchemeVersion,
00316
const OFString &codeMeaning);
00317
00318
00319
protected:
00320
00324 inline DSRCodedEntryValue *
getValuePtr()
00325 {
00326
return this;
00327 }
00328
00335
OFCondition readItem(
DcmItem &dataset,
00336
OFConsole *logStream,
00337
const char *moduleName = NULL);
00338
00344
OFCondition writeItem(
DcmItem &dataset,
00345
OFConsole *logStream)
const;
00346
00356 OFBool
checkCode(
const OFString &codeValue,
00357
const OFString &codingSchemeDesignator,
00358
const OFString &codeMeaning)
const;
00359
00360
00361
private:
00362
00364 OFString CodeValue;
00366 OFString CodingSchemeDesignator;
00368 OFString CodingSchemeVersion;
00370 OFString CodeMeaning;
00371 };
00372
00373
00374
#endif
00375
00376
00377
00378
00379
00380
00381
00382
00383
00384
00385
00386
00387
00388
00389
00390
00391
00392
00393
00394
00395
00396
00397
00398
00399
00400
00401
00402
00403
00404
00405
00406
00407
00408
00409
00410
00411
00412
00413
00414
00415
00416
00417
00418
00419
00420
00421
00422
00423
00424
00425
00426
00427
00428
00429