If you look in the sample production class you will see a couple of setups. Go to ENSEMBLE-->INTEROPERATE---> DICOM setups and To make the association on the production level, and set DICOM AET Title... Part of the production code will create the list for your transfer syntax using "listbuild"
My Example is DCMROUTER that I am sending C-FIND to I also sent to a Duplex DICOM operation.
Write !,"Configure JDICOM Storage AET DCMROUTER, 192.168.72.45, 104"
#; We will be accepting Storage requests from DCMROUTER
Do ##class(EnsLib.DICOM.Util.AssociationContext).CreateAssociation("DCMROUTER","ENSEMBLETEST",$ListBuild($$$IMPLICITVRLETRANSFERSYNTAX))
Do ##class(EnsLib.DICOM.Util.AssociationContext).CreateAssociation("ENSEMBLETEST","DCMROUTER",$ListBuild($$$IMPLICITVRLETRANSFERSYNTAX))
Quit
}
/// Override this in your Production class to do setup before the Production starts
ClassMethod OnStart(pTimeStarted As %String) As %Status
{
#; Make sure that the associations exist
If '##class(EnsLib.DICOM.Util.AssociationContext).AETExists("DCMROUTER","ENSEMBLETEST")
{
Do ##class(EnsLib.DICOM.Util.AssociationContext).CreateAssociation("DCMROUTER","ENSEMBLETEST",$ListBuild($$$IMPLICITVRLETRANSFERSYNTAX))
}
If '##class(EnsLib.DICOM.Util.AssociationContext).AETExists("ENSEMBLETEST","DCMROUTER")
{
Do ##class(EnsLib.DICOM.Util.AssociationContext).CreateAssociation("ENSEMBLETEST","DCMROUTER",$ListBuild($$$IMPLICITVRLETRANSFERSYNTAX))
}
Quit $$$OK
}
--------HL7 to DICOM TRANSFORM is here--------
Include EnsDICOM
Class RATC.HL7toNewDICOM Extends Ens.DataTransform
{
ClassMethod Transform(source As EnsLib.HL7.Message, target As EnsLib.DICOM.Document) As %Status
{
Set $ZT="Trap",tSC=$$$OK
do {
set target=##class(EnsLib.DICOM.Document).%New()
set tSC=target.SetValueAt("1.2.840.10008.5.1.4.1.2.2.1","CommandSet.AffectedSOPClassUID")
set tSC=target.SetValueAt("32","CommandSet.CommandField")
set tSC=target.SetValueAt("C-FIND-RQ","CommandSet.CommandField")
set tSC=target.SetValueAt("3","CommandSet.MessageID")
set tSC=target.SetValueAt("0","CommandSet.Priority")
set tSC=target.SetValueAt("258","CommandSet.CommandDataSetType")
//DTTM
set tSC=target.SetValueAt("20100225","DataSet.StudyDate")
//set tSC=target.SetValueAt($Extract(source.GetValueAt("ORCgrp(1).OBRuniongrp.OBRunion.OBR:7.1"),"DataSet.(0008,0020)"),1,8)
set tSC=target.SetValueAt("","DataSet.StudyTime")
//set tSC=target.SetValueAt(source.GetValueAt("PIDgrpgrp(1).ORCgrp(1).OBR:FillerOrderNumber.entityidentifier"),"DataSet.AccessionNumber")
set tSC=target.SetValueAt("3342222","DataSet.AccessionNumber")
set tSC=target.SetValueAt("","DataSet.QueryRetrieveLevel")
set tSC=target.SetValueAt("OT","DataSet.ModalitiesInStudy")
set tSC=target.SetValueAt("","DataSet.InstitutionName")
set tSC=target.SetValueAt("","DataSet.ReferringPhysicianName")
set tSC=target.SetValueAt("","DataSet.StudyDescription")
set tSC=target.SetValueAt(source.GetValueAt("PIDgrpgrp(1).PIDgrp.PID:PatientName"),"DataSet.PatientName")
set tSC=target.SetValueAt(source.GetValueAt("PIDgrpgrp(1).PIDgrp.PID:PatientIdentifierList(1).ID"),"DataSet.PatientID")
set tSC=target.SetValueAt(source.GetValueAt("PIDgrpgrp(1).PIDgrp.PID:7"),"DataSet.PatientBirthDate") // PIDgrpgrp(1).PIDgrp.PID:7 is same as PIDgrpgrp(1).PIDgrp.PID:DateTimeofBirth
set tSC=target.SetValueAt(source.GetValueAt("PIDgrpgrp(1).PIDgrp.PID:AdministrativeSex"),"DataSet.PatientSex")
//set tSC=target.SetValueAt("","DataSet.PatientAge")
set tSC=target.SetValueAt("","DataSet.StudyInstanceUID")
set tSC=target.SetValueAt("","DataSet.StudyID")
set tSC=target.SetValueAt("STUDY","DataSet.(0008,0052)")
Set tSC = $$$OK
} while (0)
Exit
Quit tSC
Trap
Set $ZT="",tSC=$$$EnsSystemError
Goto Exit
}
}