Modality Worklists, getting a StudyInstanceUID

Back to the MWL’s:

I modified a template with a few extra fields, modality, Station AET, Scheduled DATE and Scheduled TIME (bottom of message). Apparently the StudyInstanceUID is something that is normally generated by the RIS ?

DCMTK apparently can be used to generate a StudyInstanceUID using something like this (no idea how to compile that).

`

#include “dcmtk/config/osconfig.h” /* make sure OS specific configuration is included first */

#include “dcmtk/dcmdata/dcuid.h”
#include “dcmtk/ofstd/ofstream.h”

int main(int /argc/, char * /argv/ [])
{
char uid[100];
cout << "Study Instance UID : " << dcmGenerateUniqueIdentifier(uid, SITE_STUDY_UID_ROOT) << endl;
return( 0 );
}

`


although not sure if it comes bundled that way.

Also, the source for Orthanc has some file in there FromDcmtkBridge.cpp (searched for SITE_STUDY_UID_ROOT)that looks like it does just that. Does the REST API provide a mechanism for getting a StudyInstanceUID to be included in a MWL file ?

`
switch (level)
{
case ResourceType_Patient:
// The “PatientID” field is of type LO (Long String), 64
// Bytes Maximum. An UUID is of length 36, thus it can be used
// as a random PatientID.
return Toolbox::GenerateUuid();

case ResourceType_Instance:
return dcmGenerateUniqueIdentifier(uid, SITE_INSTANCE_UID_ROOT);

case ResourceType_Series:
return dcmGenerateUniqueIdentifier(uid, SITE_SERIES_UID_ROOT);

case ResourceType_Study:
return dcmGenerateUniqueIdentifier(uid, SITE_STUDY_UID_ROOT);

default:
throw OrthancException(ErrorCode_ParameterOutOfRange);
}
}
`

`

Dicom-Meta-Information-Header

Used TransferSyntax: Little Endian Explicit

(0002,0000) UL 202 # 4, 1 FileMetaInformationGroupLength
(0002,0001) OB 00\01 # 2, 1 FileMetaInformationVersion
(0002,0002) UI [1.2.276.0.7230010.3.1.0.1] # 26, 1 MediaStorageSOPClassUID
(0002,0003) UI [1.2.276.0.7230010.3.1.4.2831176407.11154.1448031138.805061] # 58, 1 MediaStorageSOPInstanceUID
(0002,0010) UI =LittleEndianExplicit # 20, 1 TransferSyntaxUID
(0002,0012) UI [1.2.276.0.7230010.3.0.3.6.0] # 28, 1 ImplementationClassUID
(0002,0013) SH [OFFIS_DCMTK_360] # 16, 1 ImplementationVersionName

Dicom-Data-Set

Used TransferSyntax: Little Endian Explicit

(0008,0005) CS [ISO_IR 100] # 10, 1 SpecificCharacterSet
(0008,0050) SH [DEVACC00000001] # 6, 1 AccessionNumber
(0008,0060) CS [MR] # Modality
(0010,0010) PN [Scotti^Stephen^Douglas] # 16, 1 PatientName
(0010,0020) LO [DEV0000001] # 8, 1 PatientID
(0010,0030) DA [] # 8, 1 PatientBirthDate
(0010,0040) CS [M] # 2, 1 PatientSex
(0010,2000) LO [test] # 10, 1 MedicalAlerts Indication
(0010,2110) LO [] # 6, 1 Allergies
(0020,000d) UI [] # 26, 1 StudyInstanceUID
(0032,1032) PN [0001^Scotti^Stephen] # 6, 1 RequestingPhysician
(0032,1060) LO [MRI LEFT ANKLE WITHOUT CONTRAST] # 6, 1 RequestedProcedureDescription
(0040,0001) AE [AETITLE_MRI] # Station AET
(0040,0002) DA [20200416] # Scheduled DATE
(0040,0003) TM [1500] # Scheduled TIME
(0040,1001) SH [73721] # 10, 1 RequestedProcedureID
(0040,1003) SH [routine] # 4, 1 RequestedProcedurePriority
`

Your question is site-specific.

Hire a professional DICOM consultant instead of flooding this forum:
https://groups.google.com/d/topic/orthanc-users/vWpHWFkYiWI/discussion