SR using VT_Num types

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
Tsunamis
Posts: 31
Joined: Wed, 2005-05-04, 17:07

SR using VT_Num types

#1 Post by Tsunamis »

Hi,

I'm currently working on, making a SR using Numeric measurement values.
I use the report generation program provided by dcmtk : mkreport. I added a new report creation and tried to add some numeric measurements.
The problem is that when generating code, i obtain all the nodes in the command line informations :
As you'll see, the num aren't there... is there any reason?

-------------------------------------------------------------------------------
mkreport : reportec.dcm

Basic Text SR Document

Patient : Meguira^Alberto (M)
Referring Physician: Pululu^Joseph
Completion Flag : COMPLETE
Verification Flag : VERIFIED
20050513123710: Augustus Caesar^Gaius Iulius Octavianus, Dr. Laurent
Content Date/Time : 20050513 123710

<CONTAINER:(,,"Test Echo")=SEPARATE>
<contains CONTAINER:(,,"Patient Characteristics")=SEPARATE>
<contains CONTAINER:(,,"Findings")=SEPARATE>
<contains CONTAINER:(,,"Measurement Group")=SEPARATE>
<contains CODE:(,,"Cardiac Output")=(IHE.03,99_OFFIS_DCMTK,"2D")>
<has concept mod CODE:(,,"Method")=(IHE.03,99_OFFIS_DCMTK,"Teicholz")>
<has concept mod CODE:(,,"Method")=(IHE.19,99_OFFIS_DCMTK,"Teicholz")>
it has been generated by this code :

Code: Select all


static void generate_echo(DSRDocument *doc)
{
    doc->createNewDocument(DSRTypes::DT_BasicTextSR);
    doc->createNewSeriesInStudy("1.2.276.0.7230010.3.4.1915765545.18030.917282194.11");
    doc->setStudyDescription("Medicasoft Echo cardiography test SR");
    doc->setSeriesDescription("Fake Report, Test of EchoCardioGraphy");

    doc->setPatientsName("Meguira^Alberto");
    doc->setPatientsSex("M");
    doc->setReferringPhysiciansName("Pululu^Joseph");

    doc->getTree().addContentItem(DSRTypes::RT_isRoot, DSRTypes::VT_Container);
    doc->getTree().getCurrentContentItem().setConceptName(DSRCodedEntryValue("MS_0.1", OFFIS_CODING_SCHEME_DESIGNATOR, "Test Echo"));

    doc->getTree().addContentItem(DSRTypes::RT_contains, DSRTypes::VT_Container, DSRTypes::AM_belowCurrent);
    doc->getTree().getCurrentContentItem().setConceptName(DSRCodedEntryValue("MS_2.1", OFFIS_CODING_SCHEME_DESIGNATOR, "Patient Characteristics"));

    doc->getTree().addContentItem(DSRTypes::RT_contains, DSRTypes::VT_Container);
    doc->getTree().getCurrentContentItem().setConceptName(DSRCodedEntryValue("CH_3.1", OFFIS_CODING_SCHEME_DESIGNATOR, "Findings"));

    doc->getTree().addContentItem(DSRTypes::RT_contains, DSRTypes::VT_Container, DSRTypes::AM_belowCurrent);
    doc->getTree().getCurrentContentItem().setConceptName(DSRCodedEntryValue("CH_4.1", OFFIS_CODING_SCHEME_DESIGNATOR, "Measurement Group"));
    
    doc->getTree().addContentItem(DSRTypes::RT_contains, DSRTypes::VT_Code, DSRTypes::AM_belowCurrent);
    doc->getTree().getCurrentContentItem().setConceptName(DSRCodedEntryValue("IHE.02", OFFIS_CODING_SCHEME_DESIGNATOR, "Image Mode"));
    doc->getTree().getCurrentContentItem().setCodeValue(DSRCodedEntryValue("IHE.03", OFFIS_CODING_SCHEME_DESIGNATOR, "2D"));

    doc->getTree().addContentItem(DSRTypes::RT_contains, DSRTypes::VT_Num);
	doc->getTree().getCurrentContentItem().setConceptName(DSRCodedEntryValue("MS_4.3", OFFIS_CODING_SCHEME_DESIGNATOR, "LVDd"));
	doc->getTree().getCurrentContentItem().setNumericValue(DSRNumericMeasurementValue ("45", DSRCodedEntryValue("MS.02", OFFIS_CODING_SCHEME_DESIGNATOR, "mm"), DSRCodedEntryValue("MS0.0.7", OFFIS_CODING_SCHEME_DESIGNATOR, "LVDd")));
    
	doc->getTree().addContentItem(DSRTypes::RT_contains, DSRTypes::VT_Num);
	doc->getTree().getCurrentContentItem().setConceptName(DSRCodedEntryValue("MS_4.3", OFFIS_CODING_SCHEME_DESIGNATOR, "LVDs"));
	doc->getTree().getCurrentContentItem().setNumericValue(DSRNumericMeasurementValue  ("37", DSRCodedEntryValue("MS.02", OFFIS_CODING_SCHEME_DESIGNATOR, "mm"), DSRCodedEntryValue("MS0.0.6", OFFIS_CODING_SCHEME_DESIGNATOR, "LVDs")));
    
	doc->getTree().addContentItem(DSRTypes::RT_contains, DSRTypes::VT_Num);
	doc->getTree().getCurrentContentItem().setConceptName(DSRCodedEntryValue("MS_4.4", OFFIS_CODING_SCHEME_DESIGNATOR, "LV Vol d"));
	doc->getTree().getCurrentContentItem().setNumericValue(DSRNumericMeasurementValue  ("154", DSRCodedEntryValue("MS.02", OFFIS_CODING_SCHEME_DESIGNATOR, "mm?"), DSRCodedEntryValue("MS0.0.5", OFFIS_CODING_SCHEME_DESIGNATOR, "LV Vol d")));

    doc->getTree().addContentItem(DSRTypes::RT_hasConceptMod, DSRTypes::VT_Code, DSRTypes::AM_belowCurrent);
    doc->getTree().getCurrentContentItem().setConceptName(DSRCodedEntryValue("MS6.1", OFFIS_CODING_SCHEME_DESIGNATOR, "Method"));
    doc->getTree().getCurrentContentItem().setCodeValue(DSRCodedEntryValue("IHE.03", OFFIS_CODING_SCHEME_DESIGNATOR, "Teicholz"));

	doc->getTree().goUp();

	doc->getTree().addContentItem(DSRTypes::RT_contains, DSRTypes::VT_Num);
	doc->getTree().getCurrentContentItem().setConceptName(DSRCodedEntryValue("MS_9.4", OFFIS_CODING_SCHEME_DESIGNATOR, "LV Vol s"));
	doc->getTree().getCurrentContentItem().setNumericValue(DSRNumericMeasurementValue  ("114", DSRCodedEntryValue("MS.15", OFFIS_CODING_SCHEME_DESIGNATOR, "mm*mm*mm"), DSRCodedEntryValue("MS0.0.4", OFFIS_CODING_SCHEME_DESIGNATOR, "LV Vol s")));

    doc->getTree().addContentItem(DSRTypes::RT_hasConceptMod, DSRTypes::VT_Code, DSRTypes::AM_belowCurrent);
    doc->getTree().getCurrentContentItem().setConceptName(DSRCodedEntryValue("MS9.5", OFFIS_CODING_SCHEME_DESIGNATOR, "Method"));
    doc->getTree().getCurrentContentItem().setCodeValue(DSRCodedEntryValue("IHE.19", OFFIS_CODING_SCHEME_DESIGNATOR, "Teicholz"));

    doc->getTree().goUp();

	doc->getTree().addContentItem(DSRTypes::RT_contains, DSRTypes::VT_Num);
	doc->getTree().getCurrentContentItem().setConceptName(DSRCodedEntryValue("MS_10.1", OFFIS_CODING_SCHEME_DESIGNATOR, "Stroke Volume"));
	doc->getTree().getCurrentContentItem().setNumericValue(DSRNumericMeasurementValue  ("12", DSRCodedEntryValue("MS.15", OFFIS_CODING_SCHEME_DESIGNATOR, "mm*mm*mm"), DSRCodedEntryValue("MS0.0.3", OFFIS_CODING_SCHEME_DESIGNATOR, "Stroke Vol")));

	doc->getTree().addContentItem(DSRTypes::RT_contains, DSRTypes::VT_Num);
	doc->getTree().getCurrentContentItem().setConceptName(DSRCodedEntryValue("MS_10.2", OFFIS_CODING_SCHEME_DESIGNATOR, "Shortening Fraction"));
	doc->getTree().getCurrentContentItem().setNumericValue(DSRNumericMeasurementValue  ("14", DSRCodedEntryValue("MS.16", OFFIS_CODING_SCHEME_DESIGNATOR, "mm*mm*mm"), DSRCodedEntryValue("MS0.0.2", OFFIS_CODING_SCHEME_DESIGNATOR, "short. frac.")));

	doc->getTree().addContentItem(DSRTypes::RT_contains, DSRTypes::VT_Num);
	doc->getTree().getCurrentContentItem().setConceptName(DSRCodedEntryValue("MS_10.3", OFFIS_CODING_SCHEME_DESIGNATOR, "Cardiac Output"));
	doc->getTree().getCurrentContentItem().setNumericValue(DSRNumericMeasurementValue  ("145", DSRCodedEntryValue("MS.17", OFFIS_CODING_SCHEME_DESIGNATOR, "l*s"), DSRCodedEntryValue("MS.0.1", OFFIS_CODING_SCHEME_DESIGNATOR, "Card. output")));

    doc->completeDocument();
    doc->verifyDocument("Augustus Caesar^Gaius Iulius Octavianus", "Dr. Laurent");
}
[/quote]
________
hemp marijuana
________
ZL900A
Last edited by Tsunamis on Tue, 2011-02-01, 14:39, edited 2 times in total.

Jörg Riesmeier
ICSMED DICOM Services
ICSMED DICOM Services
Posts: 2217
Joined: Fri, 2004-10-29, 21:38
Location: Oldenburg, Germany

#2 Post by Jörg Riesmeier »

As you can read in the DICOM standard the Basic Text SR IOD does not support NUM content items. You should use the Enhanced SR or Comprehensive SR IOD instead.

Btw, you should check the return value of addContentItem() and other methods in order to notice things like that ...

Tsunamis
Posts: 31
Joined: Wed, 2005-05-04, 17:07

#3 Post by Tsunamis »

Thanks a lot J?rg ;)
I admit I had some difficulties with the differents SR standards.
________
Toyota Fine-X specifications
________
hot box vaporizer
Last edited by Tsunamis on Tue, 2011-02-01, 14:39, edited 2 times in total.

yym0854
Posts: 11
Joined: Tue, 2007-09-25, 10:22

#4 Post by yym0854 »

doc->getTree().addContentItem(DSRTypes::RT_isRoot, DSRTypes::VT_Container);
doc->getTree().getCurrentContentItem().setConceptName(DSRCodedEntryValue("MS_0.1", OFFIS_CODING_SCHEME_DESIGNATOR, "Test Echo"));

doc->getTree().addContentItem(DSRTypes::RT_contains, DSRTypes::VT_Container, DSRTypes::AM_belowCurrent);
doc->getTree().getCurrentContentItem().setConceptName(DSRCodedEntryValue("MS_2.1", OFFIS_CODING_SCHEME_DESIGNATOR, "Patient Characteristics"));

doc->getTree().addContentItem(DSRTypes::RT_contains, DSRTypes::VT_Container);
doc->getTree().getCurrentContentItem().setConceptName(DSRCodedEntryValue("CH_3.1", OFFIS_CODING_SCHEME_DESIGNATOR, "Findings"));

doc->getTree().addContentItem(DSRTypes::RT_contains, DSRTypes::VT_Container, DSRTypes::AM_belowCurrent);
doc->getTree().getCurrentContentItem().setConceptName(DSRCodedEntryValue("CH_4.1", OFFIS_CODING_SCHEME_DESIGNATOR, "Measurement Group"));

doc->getTree().addContentItem(DSRTypes::RT_contains, DSRTypes::VT_Code, DSRTypes::AM_belowCurrent);
doc->getTree().getCurrentContentItem().setConceptName(DSRCodedEntryValue("IHE.02", OFFIS_CODING_SCHEME_DESIGNATOR, "Image Mode"));
doc->getTree().getCurrentContentItem().setCodeValue(DSRCodedEntryValue("IHE.03", OFFIS_CODING_SCHEME_DESIGNATOR, "2D"));

I created a SR File like this, but I cannot read the string "2D",please tell me how can I read it? Think you.

yym0854
Posts: 11
Joined: Tue, 2007-09-25, 10:22

#5 Post by yym0854 »

sorry my SR file create like this:

document.getTree().addContentItem(DSRTypes::RT_isRoot, DSRTypes::VT_Container);
document.getTree().getCurrentContentItem().setConceptName(DSRCodedEntryValue("IHE.01", OFFIS_CODING_SCHEME_DESIGNATOR, "Document Title"));

document.getTree().addContentItem(DSRTypes::RT_hasObsContext, DSRTypes::VT_Code, DSRTypes::AM_belowCurrent);
document.getTree().getCurrentContentItem().setConceptName(DSRCodedEntryValue("IHE.02", OFFIS_CODING_SCHEME_DESIGNATOR, "Observation Context Mode"));
document.getTree().getCurrentContentItem().setCodeValue(DSRCodedEntryValue("IHE.03", OFFIS_CODING_SCHEME_DESIGNATOR, "DIRECT"));

document.getTree().addContentItem(DSRTypes::RT_hasObsContext, DSRTypes::VT_PName);
document.getTree().getCurrentContentItem().setConceptName(DSRCodedEntryValue("IHE.04", OFFIS_CODING_SCHEME_DESIGNATOR, "Recording Observer's Name"));
document.getTree().getCurrentContentItem().setStringValue("Enter text");


document.getTree().addContentItem(DSRTypes::RT_hasObsContext, DSRTypes::VT_Text);
document.getTree().getCurrentContentItem().setConceptName(DSRCodedEntryValue("IHE.05", OFFIS_CODING_SCHEME_DESIGNATOR, "Recording Observer's Organization Name"));
document.getTree().getCurrentContentItem().setStringValue("Enter text");

document.getTree().addContentItem(DSRTypes::RT_hasObsContext, DSRTypes::VT_Code);
document.getTree().getCurrentContentItem().setConceptName(DSRCodedEntryValue("IHE.06", OFFIS_CODING_SCHEME_DESIGNATOR, "Observation Context Mode"));
document.getTree().getCurrentContentItem().setCodeValue(DSRCodedEntryValue("IHE.07", OFFIS_CODING_SCHEME_DESIGNATOR, "PATIENT"));

document.getTree().addContentItem(DSRTypes::RT_contains, DSRTypes::VT_Text);
document.getTree().getCurrentContentItem().setConceptName(DSRCodedEntryValue("IHE.11", OFFIS_CODING_SCHEME_DESIGNATOR, "Key Image Description"));
document.getTree().getCurrentContentItem().setStringValue("Enter text");

document.getTree().addContentItem(DSRTypes::RT_contains, DSRTypes::VT_Image);
document.getTree().getCurrentContentItem().setConceptName(DSRCodedEntryValue("IHE.10", OFFIS_CODING_SCHEME_DESIGNATOR, "Image Reference"));
document.getTree().getCurrentContentItem().setImageReference(DSRImageReferenceValue("0", "0"));

I donot know how to read the string I added,please give me some help.thank you!

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest