Regarding the MWL.
I have a template for the MWL, and I can convert a .txt file to a .wl file using dcmtk. I also have a “ROOT” id that was obtained from IANA: e.g. 1.3.6.1.4.1.xxxxx, IANA. Not sure that is necessary, but nice to have.
I cannot yet test in a live environment, but I have some questions about how to fully implement the MWL.
I did find the Orthanc DICOM conformance statement. Orthanc DICOM conformance
So I am not yet clear on how to create a valid MWL file in regards to some of the settings and how / if to use a custom ROOT id.
We would mostly be using CT, MRI and US. It isn’t clear to be what the values should be for a template, both in the header and the Data-set, although most in the dataset are clear.
Question are:
-
What values are actual values that can / should be used for the Header, using Orthanc 1.7.1 with or without a private ROOT ID ? Which ones are “static” and which ones are dynamic ?
-
For the Data-set: Most of the items there are self-explanatory, except for the
StudyInstanceUID:
```(0020,000d) UI [’ . $this->DICOMROOT . ‘.’ . $this->device->id . '???] # 26, 1 StudyInstanceUID`
`Can we use our own ROOT ID and just guarantee that it is unique for a study (e.g. append the device id, date/time & some other params to identify a study), to generate a ```StudyInstanceUID, and how does that relate to the Orthanc DICOM conformance statement and the items in the header ?``
3. What tags set in the MWL can actually be queried on later using the tools/find with the REST API ?
If that is out-of-scope for the forum, would be willing to pay a consultant to clarify that as we get close to live testing. For now, just need assistance in creating a valid .txt template for a MWL file. Thanks.
`
public function makeMWLFile () {
//print_r($_POST);
$template =
'# Dicom-File-Format
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 [’ . $this->CharSet . ‘] # 10, 1 SpecificCharacterSet
(0008,0050) SH [’ . $this->AccessionNumber . ‘] # 6, 1 AccessionNumber
(0008,0060) CS [’ . $this->Modality . ‘] # Modality
(0010,0010) PN [’ . $this->PatientName . ‘] # 16, 1 PatientName
(0010,0020) LO [’ . $this->PatientID . ‘] # 8, 1 PatientID
(0010,0030) DA [’ . $this->PatientBirthDate . ‘] # 8, 1 PatientBirthDate
(0010,0040) CS [’ . $this->PatientSex . ‘] # 2, 1 PatientSex
(0010,2000) LO [’ . $this->MedicalAlerts . ‘] # 10, 1 MedicalAlerts Indication
(0010,2110) LO [’ . $this->Allergies . ‘] # 6, 1 Allergies
(0020,000d) UI [’ . $this->DICOMROOT . ‘.’ . $this->device->id . ‘???] # 26, 1 StudyInstanceUID
(0032,1032) PN [’ . $this->RequestingPhysician . ‘] # 6, 1 RequestingPhysician
(0032,1060) LO [’ . $this->RequestedProcedureDescription . ‘] # 6, 1 RequestedProcedureDescription
(0040,0001) AE [’ . $this->ScheduleStationAETitle . ‘] # Station AET
(0040,0002) DA [’ . $this->ScheduledProcedureStepStartDate . ‘] # Scheduled DATE
(0040,0003) TM [’ . $this->ScheduledProcedureStepStartTime . ‘] # Scheduled TIME
(0040,1001) SH [’ . $this->RequestedProcedureID . ‘] # 10, 1 RequestedProcedureID
(0040,1003) SH [’ . $this->RequestedProcedurePriority . ‘] # 4, 1 RequestedProcedurePriority’;
//echo $template;dump2dcm.exe sampleWorklist.txt newWorklist.wl
file_put_contents (self::$ORTHANC_MWL . “samplephp.txt”, $template);
echo ‘[{“status”:“Sent to ORTHANC”}]’;
self::dcmtk_command('dump2dcm ’ . self::$ORTHANC_MWL . "samplephp.txt " . self::$ORTHANC_MWL . “samplephp.wl”);
}
`
Sample Exanded Result for Study Query (Can you only query on the `MainDicomTags && ```PatientMainDicomTags using tools/find ?``
"ID": "", "IsStable": true, "LastUpdate": "20200606T015632", "MainDicomTags": { "AccessionNumber": "", "InstitutionName": "" "ReferringPhysicianName": "", "RequestingPhysician": "", "StudyDate": "", "StudyDescription": "", "StudyID": "", "StudyInstanceUID": "", "StudyTime": "" }, "ParentPatient": "", "PatientMainDicomTags": { "OtherPatientIDs": "", "PatientBirthDate": "", "PatientID": "", "PatientName": "", "PatientSex": "" }, "Series": [ "" ]