DICOM to HL7

We have a case where a vendor can send us more information in the DICOM message rather than in the HL7 result message. In theory it should be possible to take a DICOM and convert it to HL7, stupid question is has anyone done it before? Does anyone have any good examples of a DTL they did to show me how to setup the message structures and translation?

Thanks

Scott Roth

The Ohio State University Wexner Medical Center

Scott.Roth@osumc.edu

  • 0
  • 0
  • 184
  • 1
  • 1

Answers

Scott,

The trick is in using the appropriate syntax to access the individual fields within the DICOM message.  In the example below, we're extracting data from the DICOM message to insert into a simple scheduling request message output as XML.  The same syntax can be used in reverse, writing from HL7 into DICOM.  Since the DICOM message is not fully-defined within Ensemble/HealthShare, the graphical DTL editor view is not pretty...

Hope this helps,
Mike

Class Test.Transform.DICOMToPatientSchedule Extends Ens.DataTransformDTL [ DependsOn = (EnsLib.DICOM.Document, Test.Msg.PatientScheduleReq) ]
{

Parameter IGNOREMISSINGSOURCE = 1;

Parameter REPORTERRORS = 1;

Parameter TREATEMPTYREPEATINGFIELDASNULL = 0;

XData DTL [ XMLNamespace = "http://www.intersystems.com/dtl]
{
<transform sourceClass='EnsLib.DICOM.Document' targetClass='Test.Msg.PatientScheduleReq' targetDocType='2.3.1:ADT_A01' create='new' language='objectscript' >
<assign value='source.GetValueAt("DataSet.PatientID")' property='target.PID' action='set' />
<assign value='"DICOM"' property='target.MessageSource' action='set' />
<assign value='source.GetValueAt("DataSet.PatientName")' property='target.PatientName' action='set' />
<assign value='source.GetValueAt("DataSet.ScheduledProcedureStepSequence[1].ScheduledProcedureStepStartDate")' property='target.ExamDateTime' action='set' />
<assign value='source.GetValueAt("DataSet.ScheduledProcedureStepSequence[1].ScheduledProcedureStepStartDate")' property='target.FileDate' action='set' />
<assign value='source.GetValueAt("DataSet.ScheduledProcedureStepSequence[1].ScheduledProcedureStepDescription")' property='target.ExamType' action='set' />
<assign value='source.GetValueAt("DataSet.AccessionNumber")' property='target.AccessionNumber' action='set' />
<assign value='source.GetValueAt("DataSet.StudyInstanceUID")' property='target.VisitId' action='set' />
<assign value='source.GetValueAt("DataSet.ScheduledProcedureStepSequence[1].ScheduledPerformingPhysicianName")' property='target.AttendingPhysician' action='set' />
</transform>
}

}

Thanks not the exact answer that I was looking for but I think I can make it work somehow.