Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Thursday, July 5, 2007 4:31:07 PM(UTC)
anslasax18

Groups: Registered
Posts: 2


Hi, [:)]

I converted MyDicomNet.cpp of DicomMWL example in ClassLibrary folder in Medical Imaging Suite SDK v15 directory to object pascal code and have been testing it's functions in these days.

procedure OnReceiveAssociateAccept(hNet: HDICOMNET; hPDU: HDICOMPDU; pUserData: L_PVOID); stdcall;

...

   case FCommandType of

   MODALITY_WORKLIST_FIND:

CreateAndSetElement(hDS, TAG_SCHEDULED_PROCEDURE_STEP_START_DATE, VR_DA, Global.FSPSStartDate);
CreateAndSetElement(hDS, TAG_SCHEDULED_PROCEDURE_STEP_END_DATE,   VR_DA, Global.FSPSEndDate);

...

SendCFindRequest(
          nPresentationID,
          FUniqueID,
          UID_MODALITY_WORKLIST_FIND,
          COMMAND_PRIORITY_MEDIUM,
          hDS);

 

In above code, I just wanted to find worklist by querying START_DATE and END_DATE.

But,  if Global.FSPSStartDate is '07/05/2007'(Yesterday) and Global.FSPSEndDate is '07/06/2007'(Today) then I can't get any query results. I am using BUNNY test server, and
of course, there exists an worklist items of today and yesterday in it.

How can I solve this problem? Thanks a lot in advance.

- Anslasax

 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Wednesday, July 11, 2007 5:26:33 AM(UTC)

Travis  
Travis

Groups: Registered, Tech Support
Posts: 207

Was thanked: 3 time(s) in 3 post(s)

In our demo for Query and Retrieve, we do a search based on a date range.  I have copied and pasted the code below:
This starts on line#756 from the file CFind.cs in the project CSDicomFindMoveDemo found in the directory \LEADTOOLS 15\Examples\DotNet\CS\DicomFindMoveDemo

               case FindType.Study:
               {
                  ds.Initialize(DicomClassType.StudyRootQueryStudy, DicomDataSetInitializeType.ExplicitVRLittleEndian);

                  Utils.SetTag(ds, DicomTagType.QueryRetrieveLevel, "STUDY");
                  Utils.SetTag(ds, DicomTagType.StudyInstanceUID, query.StudyInstanceUid);
                  Utils.SetTag(ds, DicomTagType.StudyID, query.StudyID);
                  Utils.SetTag(ds, DicomTagType.AccessionNumber, query.AccessionNo);
                  Utils.SetTag(ds, DicomTagType.PatientName, query.PatientName);
                  Utils.SetTag(ds, DicomTagType.PatientID, query.PatientID);

                  if(DateTime.Compare(query.StudyStartDate, DateTime.MinValue) != 0 &&
                     DateTime.Compare(query.StudyEndDate, DateTime.MinValue) != 0)
                  {
                     StringBuilder range = new StringBuilder();

                     range.Append(query.StudyStartDate.ToString("yyyyMMdd"));
                     range.Append("-");
                     range.Append(query.StudyEndDate.ToString("yyyyMMdd"));

                     Utils.SetTag(ds, DicomTagType.StudyDate, Encoding.UTF8.GetBytes(range.ToString()));
                  }
                  else if(DateTime.Compare(query.StudyStartDate, DateTime.MinValue) == 0 &&
                         DateTime.Compare(query.StudyEndDate, DateTime.MinValue) != 0)
                  {
                     StringBuilder range = new StringBuilder();

                     range.Append("-");
                     range.Append(query.StudyEndDate.ToString("yyyyMMdd"));
                     Utils.SetTag(ds, DicomTagType.StudyDate, Encoding.UTF8.GetBytes(range.ToString()));
                  }
                  else if(DateTime.Compare(query.StudyStartDate, DateTime.MinValue) != 0 &&
                         DateTime.Compare(query.StudyEndDate, DateTime.MinValue) == 0)
                  {
                     StringBuilder range = new StringBuilder();

                     range.Append(query.StudyStartDate.ToString("yyyyMMdd"));
                     range.Append("-");
                     Utils.SetTag(ds, DicomTagType.StudyDate, Encoding.UTF8.GetBytes(range.ToString()));
                  }
               }
               break;
Travis Montgomery
Senior Sales Engineer
LEAD Logo
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.137 seconds.