/// <summary> /// Apply the Dicom Configuration to the Client, /// </summary> /// <param name="commonConfig">Common Configuration.</param> /// <param name="config">Dicom Configuration.</param> public override void ApplyConfig(CommonConfig commonConfig, DicomPeerToPeerConfig config) { // set up the worklist SCP WorklistScp worklistScp = new WorklistScp(); // update supported transfer syntaxes here //worklistScp.ClearTransferSyntaxes(); //worklistScp.AddTransferSyntax(HliScp.IMPLICIT_VR_LITTLE_ENDIAN); // Save the SCP and apply the configuration Scp = worklistScp; base.ApplyConfig(commonConfig, config); // set up the Modality Worklist information models _modalityWorklistInformationModel = new ModalityWorklistInformationModel(); // load the information models _modalityWorklistInformationModel.LoadInformationModel(RootedBaseDirectory.GetFullPathname(commonConfig.RootedBaseDirectory, config.SourceDataDirectory)); // add any default attribute values to the information models bool overWriteExistingValue = true; _modalityWorklistInformationModel.AddDefaultAttributeToInformationModel(overWriteExistingValue, "0x00400001", VR.AE, config.FromActorAeTitle); _modalityWorklistInformationModel.AddDefaultAttributeToInformationModel(overWriteExistingValue, "0x00400002", VR.DA, System.DateTime.Now.ToString("yyyyMMdd", System.Globalization.CultureInfo.InvariantCulture)); _modalityWorklistInformationModel.AddDefaultAttributeToInformationModel(overWriteExistingValue, "0x00400003", VR.TM, System.DateTime.Now.ToString("HHmmss", System.Globalization.CultureInfo.InvariantCulture)); // add any additional attribute values to the information models //modalityWorklistInformationModel.AddAdditionalAttributeToInformationModel(overWriteExistingValue, "0x00080054", VR.AE, config.DvtAeTitle); // add the default message handlers with the information model worklistScp.AddDefaultMessageHandlers(_modalityWorklistInformationModel); }
/// <summary> /// Apply the Dicom Configuration to the Client, /// </summary> /// <param name="commonConfig">Common Configuration.</param> /// <param name="config">Dicom Configuration.</param> public override void ApplyConfig(CommonConfig commonConfig, DicomPeerToPeerConfig config) { // set up the Query/Retrieve information models QueryRetrieveInformationModels informationModels = new QueryRetrieveInformationModels(); // Do not load the Information Models here as they are loaded (refreshed) on each query // - just define the data directory informationModels.DataDirectory = RootedBaseDirectory.GetFullPathname(commonConfig.RootedBaseDirectory, config.SourceDataDirectory); // add any default attribute values to the information models bool overWriteExistingValue = true; informationModels.AddDefaultAttribute(overWriteExistingValue, "0x00080005", VR.CS, "ISO IR 6"); informationModels.AddDefaultAttribute(overWriteExistingValue, "0x00080090", VR.PN, "Referring^Physician^Dr"); // add any additional attribute values to the information models informationModels.AddAdditionalAttribute(overWriteExistingValue, "0x00080054", VR.AE, config.ToActorAeTitle); // set up the query/retrieve SCP QueryRetrieveScp queryRetrieveScp = new QueryRetrieveScp(); // update supported transfer syntaxes here //queryRetrieveScp.ClearTransferSyntaxes(); //queryRetrieveScp.AddTransferSyntax(HliScp.IMPLICIT_VR_LITTLE_ENDIAN); // Save the SCP and apply the configuration Scp = queryRetrieveScp; base.ApplyConfig(commonConfig, config); // add the default message handlers with the information models queryRetrieveScp.AddDefaultMessageHandlers(informationModels); }
/// <summary> /// Class Constructor. /// </summary> /// <param name="profileName">Integration Profile Name.</param> public IheFrameworkConfig(System.String profileName) { _profileName = profileName; _commonConfig = new CommonConfig(); _actorConfigCollection = new ActorConfigCollection(); _peerToPeerConfigCollection = new BasePeerToPeerConfigCollection(); }
/// <summary> /// Apply the Actor Configuration. /// </summary> /// <param name="commonConfig">Common Configuration.</param> /// <param name="peerToPeerConfigCollection">Peer to Peer Configuration collection.</param> protected override void ApplyConfig(CommonConfig commonConfig, BasePeerToPeerConfigCollection peerToPeerConfigCollection) { // for receiving Patient Registration [RAD-1] // for receiving Patient Update [RAD-12] AddHl7Server(Hl7ServerTypeEnum.Hl7Server, ActorTypeEnum.AdtPatientRegistration, commonConfig, peerToPeerConfigCollection); // for receiving Filler Order Management [RAD-3] // for receiving Appointment Notification [RAD-48] AddHl7Server(Hl7ServerTypeEnum.Hl7Server, ActorTypeEnum.DssOrderFiller, commonConfig, peerToPeerConfigCollection); // for sending Placer Order Management [RAD-2] AddHl7Client(Hl7ClientTypeEnum.Hl7Client, ActorTypeEnum.DssOrderFiller, commonConfig, peerToPeerConfigCollection); }
/// <summary> /// Apply the Dicom Configuration to the Client, /// </summary> /// <param name="commonConfig">Common Configuration.</param> /// <param name="config">Dicom Configuration.</param> public override void ApplyConfig(CommonConfig commonConfig, DicomPeerToPeerConfig config) { // Instantiate a new MPPS SCP and add the default message handlers MppsScp mppsScp = new MppsScp(); mppsScp.AddDefaultMessageHandlers(); // update supported transfer syntaxes here //mppsScp.ClearTransferSyntaxes(); //mppsScp.AddTransferSyntax(HliScp.IMPLICIT_VR_LITTLE_ENDIAN); // Save the SCP and apply the configuration Scp = mppsScp; base.ApplyConfig(commonConfig, config); }
/// <summary> /// Apply the Dicom Configuration to the Client, /// </summary> /// <param name="commonConfig">Common Configuration.</param> /// <param name="config">Dicom Configuration.</param> public override void ApplyConfig(CommonConfig commonConfig, DicomPeerToPeerConfig config) { // set up the storage SCP StorageScp storageScp = new StorageScp(); // update supported transfer syntaxes here //storageScp.ClearTransferSyntaxes(); //storageScp.AddTransferSyntax(HliScp.IMPLICIT_VR_LITTLE_ENDIAN); // Save the SCP and apply the configuration Scp = storageScp; base.ApplyConfig(commonConfig, config); // add the default message handlers storageScp.AddDefaultMessageHandlers(); }
/// <summary> /// Class constructor. /// </summary> /// <param name="parentActor">Parent Actor Name - (containing actor).</param> /// <param name="actorName">Destination Actor Name.</param> /// <param name="commonConfig">Common Configuration.</param> /// <param name="config">HL7 Configuration.</param> public Hl7Client(BaseActor parentActor, ActorName actorName, CommonConfig commonConfig, Hl7PeerToPeerConfig config) : base(parentActor, actorName) { _hl7ThreadForHl7Client = new Hl7ThreadForHl7Client(this); DvtkHighLevelInterface.Common.Threads.ThreadManager threadManager = new DvtkHighLevelInterface.Common.Threads.ThreadManager(); _hl7ThreadForHl7Client.Initialize(threadManager); _hl7ThreadForHl7Client.Options.UseResultsFileNameIndex = true; _hl7ThreadForHl7Client.Options.SessionId = config.SessionId; _hl7ThreadForHl7Client.Options.Identifier = String.Format("From_{0}_To_{1}", ParentActor.ActorName.TypeId, ActorName.TypeId); _triggerQueue = System.Collections.Queue.Synchronized(new System.Collections.Queue()); _config = config; if (commonConfig.ResultsDirectory != System.String.Empty) { if (commonConfig.ResultsSubdirectory != System.String.Empty) { _hl7ThreadForHl7Client.Options.ResultsDirectory = RootedBaseDirectory.GetFullPathname(commonConfig.RootedBaseDirectory, commonConfig.ResultsDirectory + "\\" + commonConfig.ResultsSubdirectory); } else { _hl7ThreadForHl7Client.Options.ResultsDirectory = RootedBaseDirectory.GetFullPathname(commonConfig.RootedBaseDirectory, commonConfig.ResultsDirectory); } } // Set up the HL7 Validation Profile Store if ((commonConfig.Hl7ProfileDirectory != System.String.Empty) && (commonConfig.Hl7ProfileStoreName != System.String.Empty)) { _hl7ProfileStore = new Hl7ProfileStore(RootedBaseDirectory.GetFullPathname(commonConfig.RootedBaseDirectory, commonConfig.Hl7ProfileDirectory), commonConfig.Hl7ProfileStoreName); } // Set up the HL7 Validation Context if (commonConfig.Hl7ValidationContextFilename != System.String.Empty) { _hl7ValidationContext = new Hl7ValidationContext(RootedBaseDirectory.GetFullPathname(commonConfig.RootedBaseDirectory, commonConfig.Hl7ValidationContextFilename)); } // Set up the validation Web Service if (commonConfig.NistWebServiceUrl != System.String.Empty) { _nistWebServiceClient = new NistWebServiceClient(commonConfig.NistWebServiceUrl); } }
/// <summary> /// Apply the Dicom Configuration to the Client, /// </summary> /// <param name="commonConfig">Common Configuration.</param> /// <param name="config">Dicom Configuration.</param> public override void ApplyConfig(CommonConfig commonConfig, DicomPeerToPeerConfig config) { // Do not load the Information Models here as hey are loaded (refreshed) on each storage commitment event // - just define the data directory _informationModels.DataDirectory = RootedBaseDirectory.GetFullPathname(commonConfig.RootedBaseDirectory, config.SourceDataDirectory); // add any default attribute values to the information models bool overWriteExistingValue = true; _informationModels.AddDefaultAttribute(overWriteExistingValue, "0x00080005", VR.CS, "ISO IR 6"); _informationModels.AddDefaultAttribute(overWriteExistingValue, "0x00080090", VR.PN, "Referring^Physician^Dr"); // set up the storage commit SCP StorageCommitScp storageCommitScp = new StorageCommitScp(); // update supported transfer syntaxes here //storageCommitScp.ClearTransferSyntaxes(); //storageCommitScp.AddTransferSyntax(HliScp.IMPLICIT_VR_LITTLE_ENDIAN); // Save the SCP and apply the configuration Scp = storageCommitScp; base.ApplyConfig(commonConfig, config); // use the common config option 1 to determine how the storage commitment should be handled if (ConfigOption1.Equals("DO_STORAGE_COMMITMENT_ON_SINGLE_ASSOCIATION") == true) { // add the default message handlers with the information model // - allows support for the NActionNEventReportHandler which // returns an N-EVENT-REPORT-RQ on the same association as the // N-ACTION-RQ was received. storageCommitScp.AddDefaultMessageHandlers(_informationModels, 5000); } else { // add the default message handlers storageCommitScp.AddDefaultMessageHandlers(); } }
/// <summary> /// Apply the Actor Configuration. /// </summary> /// <param name="commonConfig">Common Configuration.</param> /// <param name="peerToPeerConfigCollection">Peer to Peer Configuration collection.</param> protected override void ApplyConfig(CommonConfig commonConfig, BasePeerToPeerConfigCollection peerToPeerConfigCollection) { // for receiving Procedure Scheduled [RAD-4] // for receiving Patient Update [Rad-12] // for receiving Procedure Updated [RAD-13] AddHl7Server(Hl7ServerTypeEnum.Hl7Server, ActorTypeEnum.DssOrderFiller, commonConfig, peerToPeerConfigCollection); // for receiving Image Availability Query [RAD-11] // for receiving Performed Work Status Update [RAD-42] // AddDicomServer(DicomServerTypeEnum., ActorTypeEnum.DssOrderFiller, commonConfig, peerToPeerConfigCollection); // for receiving Modality Procedure Step In Progress [RAD-6] // for receiving Modality Procedure Step Completed [RAD-7] // for receiving Creator Procedure Step In Progress [RAD-20] // for receiving Creator Procedure Step Completed [RAD-21] AddDicomServer(DicomServerTypeEnum.DicomMppsServer, ActorTypeEnum.PerformedProcedureStepManager, commonConfig, peerToPeerConfigCollection); // for receiving Storage Commitment [RAD-10] AddDicomServer(DicomServerTypeEnum.DicomStorageCommitServer, ActorTypeEnum.AcquisitionModality, commonConfig, peerToPeerConfigCollection); // for receiving Storage Commitment [RAD-10] AddDicomServer(DicomServerTypeEnum.DicomStorageCommitServer, ActorTypeEnum.EvidenceCreator, commonConfig, peerToPeerConfigCollection); // for receiving Image Availability Query [RAD-11] AddDicomServer(DicomServerTypeEnum.DicomQueryRetrieveServer, ActorTypeEnum.ReportManager, commonConfig, peerToPeerConfigCollection); // for sending Performed Work Status Update [RAD-42] // for sending Instance Availability Notification [RAD-49] // AddDicomClient(DicomClientTypeEnum., ActorTypeEnum.DssOrderFiller, commonConfig, peerToPeerConfigCollection); // for sending Storage Commitment [RAD-10] AddDicomClient(DicomClientTypeEnum.DicomStorageCommitClient, ActorTypeEnum.AcquisitionModality, commonConfig, peerToPeerConfigCollection); // for sending Storage Commitment [RAD-10] AddDicomClient(DicomClientTypeEnum.DicomStorageCommitClient, ActorTypeEnum.EvidenceCreator, commonConfig, peerToPeerConfigCollection); }
/// <summary> /// Apply the Actor Configuration. /// </summary> /// <param name="commonConfig">Common Configuration.</param> /// <param name="peerToPeerConfigCollection">Peer to Peer Configuration collection.</param> protected override void ApplyConfig(CommonConfig commonConfig, BasePeerToPeerConfigCollection peerToPeerConfigCollection) { // for receiving Modality Images Stored [RAD-8] AddDicomServer(DicomServerTypeEnum.DicomStorageServer, ActorTypeEnum.AcquisitionModality, commonConfig, peerToPeerConfigCollection); // for receiving Creator Images Stored [RAD-18] AddDicomServer(DicomServerTypeEnum.DicomStorageServer, ActorTypeEnum.EvidenceCreator, commonConfig, peerToPeerConfigCollection); // for receiving Query Images [RAD-14] // for receiving Retrieve Images [RAD-16] AddDicomServer(DicomServerTypeEnum.DicomQueryRetrieveServer, ActorTypeEnum.ImageDisplay, commonConfig, peerToPeerConfigCollection); // for sending Retrieve Images [RAD-16] UpdateDicomServer(this.ActorName, ActorTypeEnum.ImageDisplay, commonConfig, peerToPeerConfigCollection); }
/// <summary> /// Create a Hl7 Server of the given type. /// </summary> /// <param name="hl7ServerType">Hl7 Server Type - enum.</param> /// <param name="toActor">To Actor instance.</param> /// <param name="fromActorName">From Actor Name.</param> /// <param name="commonConfig">Common Configuration.</param> /// <param name="config">HL7 Configuration.</param> /// <returns>Hl7 Server.</returns> public static Hl7Server CreateHl7Server(Hl7ServerTypeEnum hl7ServerType, BaseActor toActor, ActorName fromActorName, CommonConfig commonConfig, Hl7PeerToPeerConfig config) { Hl7Server hl7Server = null; switch (hl7ServerType) { case Hl7ServerTypeEnum.Hl7QueryServer: hl7Server = new Hl7QueryServer(toActor, fromActorName, commonConfig, config); break; case Hl7ServerTypeEnum.Hl7Server: hl7Server = new Hl7Server(toActor, fromActorName, commonConfig, config); break; case Hl7ServerTypeEnum.Unknown: default: break; } return(hl7Server); }
/// <summary> /// Create an Hl7 Client of the given type. /// </summary> /// <param name="hl7ClientType">Hl7 Client Type - enum.</param> /// <param name="fromActor">From Actor instance.</param> /// <param name="toActorName">To Actor Name.</param> /// <param name="commonConfig">Common Configuration.</param> /// <param name="config">HL7 Configuration.</param> /// <returns>Hl7 Client.</returns> public static Hl7Client CreateHl7Client(Hl7ClientTypeEnum hl7ClientType, BaseActor fromActor, ActorName toActorName, CommonConfig commonConfig, Hl7PeerToPeerConfig config) { Hl7Client hl7Client = null; switch (hl7ClientType) { case Hl7ClientTypeEnum.Hl7Client: hl7Client = new Hl7Client(fromActor, toActorName, commonConfig, config); break; case Hl7ClientTypeEnum.Unknown: default: break; } return(hl7Client); }
/// <summary> /// Update the Dicom Configuration of the Server. /// </summary> /// <param name="commonConfig">Common Configuration.</param> /// <param name="clientConfig">Dicom Client Configuration.</param> public void UpdateConfig(CommonConfig commonConfig, DicomPeerToPeerConfig clientConfig) { _scp.Options.RemotePort = clientConfig.PortNumber; _scp.Options.RemoteHostName = clientConfig.ToActorIpAddress; foreach (System.String filename in clientConfig.DefinitionFiles) { _scp.Options.LoadDefinitionFile(RootedBaseDirectory.GetFullPathname(commonConfig.RootedBaseDirectory, filename)); } }
/// <summary> /// Create an Hl7 Client of the given type. /// </summary> /// <param name="hl7ClientType">Hl7 Client Type - enum.</param> /// <param name="fromActor">From Actor instance.</param> /// <param name="toActorName">To Actor Name.</param> /// <param name="commonConfig">Common Configuration.</param> /// <param name="config">HL7 Configuration.</param> /// <returns>Hl7 Client.</returns> public static Hl7Client CreateHl7Client(Hl7ClientTypeEnum hl7ClientType, BaseActor fromActor, ActorName toActorName, CommonConfig commonConfig, Hl7PeerToPeerConfig config) { Hl7Client hl7Client = null; switch (hl7ClientType) { case Hl7ClientTypeEnum.Hl7Client: hl7Client = new Hl7Client(fromActor, toActorName, commonConfig, config); break; case Hl7ClientTypeEnum.Unknown: default: break; } return hl7Client; }
/// <summary> /// Configure the Actor /// </summary> /// <param name="commonConfig">Common Configuration.</param> /// <param name="peerToPeerConfigCollection">Peer to Peer Configuration collection.</param> public void ConfigActor(CommonConfig commonConfig, BasePeerToPeerConfigCollection peerToPeerConfigCollection) { switch (_actorState) { case ActorStateEnum.ActorCreated: case ActorStateEnum.ActorStopped: // initialize the actor - this allows an actor to be re-configured after being used InitActor(); // call sub-class method to apply the actor specific config ApplyConfig(commonConfig, peerToPeerConfigCollection); // set state to stopped _actorState = ActorStateEnum.ActorStopped; break; default: // actor is started - so cannot be (re)configured break; } }
/// <summary> /// Create a Hl7 Server of the given type. /// </summary> /// <param name="hl7ServerType">Hl7 Server Type - enum.</param> /// <param name="toActor">To Actor instance.</param> /// <param name="fromActorName">From Actor Name.</param> /// <param name="commonConfig">Common Configuration.</param> /// <param name="config">HL7 Configuration.</param> /// <returns>Hl7 Server.</returns> public static Hl7Server CreateHl7Server(Hl7ServerTypeEnum hl7ServerType, BaseActor toActor, ActorName fromActorName, CommonConfig commonConfig, Hl7PeerToPeerConfig config) { Hl7Server hl7Server = null; switch (hl7ServerType) { case Hl7ServerTypeEnum.Hl7QueryServer: hl7Server = new Hl7QueryServer(toActor, fromActorName, commonConfig, config); break; case Hl7ServerTypeEnum.Hl7Server: hl7Server = new Hl7Server(toActor, fromActorName, commonConfig, config); break; case Hl7ServerTypeEnum.Unknown: default: break; } return hl7Server; }
/// <summary> /// Apply the Actor Configuration. /// </summary> /// <param name="commonConfig">Common Configuration.</param> /// <param name="peerToPeerConfigCollection">Peer to Peer Configuration collection.</param> protected override void ApplyConfig(CommonConfig commonConfig, BasePeerToPeerConfigCollection peerToPeerConfigCollection) { // for sending Patient Registration [RAD-1] // for sending Patient Update [Rad-12] AddHl7Client(Hl7ClientTypeEnum.Hl7Client, ActorTypeEnum.OrderPlacer, commonConfig, peerToPeerConfigCollection); // for sending Patient Registration [RAD-1] // for sending Patient Update [Rad-12] AddHl7Client(Hl7ClientTypeEnum.Hl7Client, ActorTypeEnum.DssOrderFiller, commonConfig, peerToPeerConfigCollection); // for receiving Patient Query AddHl7Server(Hl7ServerTypeEnum.Hl7QueryServer, ActorTypeEnum.DssOrderFiller, commonConfig, peerToPeerConfigCollection); }
/// <summary> /// Apply the Actor Configuration. /// </summary> /// <param name="commonConfig">Common Configuration.</param> /// <param name="peerToPeerConfigCollection">Peer to Peer Configuration collection.</param> protected override void ApplyConfig(CommonConfig commonConfig, BasePeerToPeerConfigCollection peerToPeerConfigCollection) { // for receiving Patient Registration [RAD-1] // for receiving Patient Update [RAD-12] AddHl7Server(Hl7ServerTypeEnum.Hl7Server, ActorTypeEnum.AdtPatientRegistration, commonConfig, peerToPeerConfigCollection); // for receiving Placer Order Management [RAD-2] AddHl7Server(Hl7ServerTypeEnum.Hl7Server, ActorTypeEnum.OrderPlacer, commonConfig, peerToPeerConfigCollection); // for receiving Query Modality Worklist [RAD-5] AddDicomServer(DicomServerTypeEnum.DicomWorklistServer, ActorTypeEnum.AcquisitionModality, commonConfig, peerToPeerConfigCollection); // for receiving Modality Procedure Step In Progress [RAD-6] // for receiving Modality Procedure Step Completed [RAD-7] // for receiving Creator Procedure Step In Progress [RAD-20] // for receiving Creator Procedure Step Completed [RAD-21] AddDicomServer(DicomServerTypeEnum.DicomMppsServer, ActorTypeEnum.PerformedProcedureStepManager, commonConfig, peerToPeerConfigCollection); // for receiving Instance Availability Notification [RAD-49] // AddDicomServer(DicomServerTypeEnum., ActorTypeEnum.ImageManager, commonConfig, peerToPeerConfigCollection); // for sending Filler Order Management [RAD-3] // for sending Appointment Notification [RAD-48] AddHl7Client(Hl7ClientTypeEnum.Hl7Client, ActorTypeEnum.OrderPlacer, commonConfig, peerToPeerConfigCollection); // for sending Procedure Scheduled [RAD-4] // for sending Patient Update [Rad-12] // for sending Procedure Updated [RAD-13] AddHl7Client(Hl7ClientTypeEnum.Hl7Client, ActorTypeEnum.ImageManager, commonConfig, peerToPeerConfigCollection); // for sending Image Availability Query [RAD-11] // for sending Performed Work Status Update [RAD-42] // AddDicomClient(DicomClientTypeEnum., ActorTypeEnum.ImageManager, commonConfig, peerToPeerConfigCollection); // for sending Patient Query AddHl7Client(Hl7ClientTypeEnum.Hl7Client, ActorTypeEnum.AdtPatientRegistration, commonConfig, peerToPeerConfigCollection); }
/// <summary> /// Update the given DicomServer using the Destination Actor Configuration. /// </summary> /// <param name="serverActorName">DicomServer Actor Name.</param> /// <param name="clientActorType">DicomClient Actor Type.</param> /// <param name="commonConfig">Common Configuration.</param> /// <param name="peerToPeerConfigCollection">Peer to Peer Configuration collection.</param> protected void UpdateDicomServer(ActorName serverActorName, ActorTypeEnum clientActorType, CommonConfig commonConfig, BasePeerToPeerConfigCollection peerToPeerConfigCollection) { foreach (BasePeerToPeerConfig basePeerToPeerConfig in peerToPeerConfigCollection) { if ((basePeerToPeerConfig is DicomPeerToPeerConfig) && (basePeerToPeerConfig.FromActorName.TypeId == serverActorName.TypeId) && (basePeerToPeerConfig.ToActorName.Type == clientActorType)) { DicomServer dicomServer = GetDicomServer(basePeerToPeerConfig.ToActorName); if (dicomServer != null) { dicomServer.UpdateConfig(commonConfig, (DicomPeerToPeerConfig)basePeerToPeerConfig); } } } }
/// <summary> /// Apply the Actor Configuration. /// </summary> /// <param name="commonConfig">Common Configuration.</param> /// <param name="peerToPeerConfigCollection">Peer to Peer Configuration collection.</param> protected abstract void ApplyConfig(CommonConfig commonConfig, BasePeerToPeerConfigCollection peerToPeerConfigCollection);
/// <summary> /// Add an HL7Server for the given Destination Actor Name and Configuration. /// </summary> /// <param name="hl7ServerType">Hl7 Server Type.</param> /// <param name="fromActorType">From Actor Type.</param> /// <param name="commonConfig">Common Configuration.</param> /// <param name="peerToPeerConfigCollection">Peer to Peer Configuration collection.</param> protected void AddHl7Server(Hl7ServerTypeEnum hl7ServerType, ActorTypeEnum fromActorType, CommonConfig commonConfig, BasePeerToPeerConfigCollection peerToPeerConfigCollection) { foreach (BasePeerToPeerConfig basePeerToPeerConfig in peerToPeerConfigCollection) { if ((basePeerToPeerConfig is Hl7PeerToPeerConfig) && (basePeerToPeerConfig.ToActorName.TypeId == _actorName.TypeId) && (basePeerToPeerConfig.FromActorName.Type == fromActorType)) { Hl7Server hl7Server = ClientServerFactory.CreateHl7Server(hl7ServerType, this, basePeerToPeerConfig.FromActorName, commonConfig, (Hl7PeerToPeerConfig)basePeerToPeerConfig); if (hl7Server != null) { SubscribeEvent(hl7Server); _hl7Servers.Add(hl7Server.ActorName.TypeId, hl7Server); // Initialize the connection with the from actor as being active. // - this can always be overruled by the application later. SetActorDefaultConnectionActive(basePeerToPeerConfig.FromActorName); } } } }
/// <summary> /// Add the given DicomClient using the Destination Actor Configuration. /// </summary> /// <param name="dicomClientType">Dicom Client Type.</param> /// <param name="toActorType">To Actor Type.</param> /// <param name="commonConfig">Common Configuration.</param> /// <param name="peerToPeerConfigCollection">Peer to Peer Configuration collection.</param> protected void AddDicomClient(DicomClientTypeEnum dicomClientType, ActorTypeEnum toActorType, CommonConfig commonConfig, BasePeerToPeerConfigCollection peerToPeerConfigCollection) { foreach (BasePeerToPeerConfig basePeerToPeerConfig in peerToPeerConfigCollection) { if ((basePeerToPeerConfig is DicomPeerToPeerConfig) && (basePeerToPeerConfig.FromActorName.TypeId == _actorName.TypeId) && (basePeerToPeerConfig.ToActorName.Type == toActorType)) { DicomClient dicomClient = ClientServerFactory.CreateDicomClient(dicomClientType, this, basePeerToPeerConfig.ToActorName); if (dicomClient != null) { dicomClient.ApplyConfig(commonConfig, (DicomPeerToPeerConfig)basePeerToPeerConfig); SubscribeEvent(dicomClient); _dicomClients.Add(dicomClient.ActorName.TypeId, dicomClient); // Initialize the connection with the to actor as being active. // - this can always be overruled by the application later. SetActorDefaultConnectionActive(basePeerToPeerConfig.ToActorName); } } } }
/// <summary> /// Apply the Actor Configuration. /// </summary> /// <param name="commonConfig">Common Configuration.</param> /// <param name="peerToPeerConfigCollection">Peer to Peer Configuration collection.</param> protected override void ApplyConfig(CommonConfig commonConfig, BasePeerToPeerConfigCollection peerToPeerConfigCollection) { // for receiving Storage Commitment [RAD-10] AddDicomServer(DicomServerTypeEnum.DicomStorageCommitServer, ActorTypeEnum.ImageManager, commonConfig, peerToPeerConfigCollection); // for sending Query Modality Worklist [RAD-5] AddDicomClient(DicomClientTypeEnum.DicomWorklistClient, ActorTypeEnum.DssOrderFiller, commonConfig, peerToPeerConfigCollection); // for sending Modality Procedure Step In Progress [RAD-6] // for sending Modality Procedure Step Completed [RAD-7] AddDicomClient(DicomClientTypeEnum.DicomMppsClient, ActorTypeEnum.PerformedProcedureStepManager, commonConfig, peerToPeerConfigCollection); // for sending Modality Images Stored [RAD-8] AddDicomClient(DicomClientTypeEnum.DicomStorageClient, ActorTypeEnum.ImageArchive, commonConfig, peerToPeerConfigCollection); // for sending Storage Commitment [RAD-10] AddDicomClient(DicomClientTypeEnum.DicomStorageCommitClient, ActorTypeEnum.ImageManager, commonConfig, peerToPeerConfigCollection); }
/// <summary> /// Apply the Actor Configuration. /// </summary> /// <param name="commonConfig">Common Configuration.</param> /// <param name="peerToPeerConfigCollection">Peer to Peer Configuration collection.</param> protected override void ApplyConfig(CommonConfig commonConfig, BasePeerToPeerConfigCollection peerToPeerConfigCollection) { // for receiving Retrieve Images [RAD-16] AddDicomServer(DicomServerTypeEnum.DicomStorageServer, ActorTypeEnum.ImageArchive, commonConfig, peerToPeerConfigCollection); // for sending Query Images [RAD-14] // for sending Retrieve Images [RAD-16] AddDicomClient(DicomClientTypeEnum.DicomQueryRetrieveClient, ActorTypeEnum.ImageArchive, commonConfig, peerToPeerConfigCollection); }
/// <summary> /// Apply the Actor Configuration. /// </summary> /// <param name="commonConfig">Common Configuration.</param> /// <param name="peerToPeerConfigCollection">Peer to Peer Configuration collection.</param> protected override void ApplyConfig(CommonConfig commonConfig, BasePeerToPeerConfigCollection peerToPeerConfigCollection) { // for receiving Modality Procedure Step In Progress [RAD-6] // for receiving Modality Procedure Step Completed [RAD-7] AddDicomServer(DicomServerTypeEnum.DicomMppsServer, ActorTypeEnum.AcquisitionModality, commonConfig, peerToPeerConfigCollection); // for receiving Creator Procedure Step In Progress [RAD-20] // for receiving Creator Procedure Step Completed [RAD-21] AddDicomServer(DicomServerTypeEnum.DicomMppsServer, ActorTypeEnum.EvidenceCreator, commonConfig, peerToPeerConfigCollection); // for sending Modality Procedure Step In Progress [RAD-6] // for sending Modality Procedure Step Completed [RAD-7] // for sending Creator Procedure Step In Progress [RAD-20] // for sending Creator Procedure Step Completed [RAD-21] AddDicomClient(DicomClientTypeEnum.DicomMppsClient, ActorTypeEnum.DssOrderFiller, commonConfig, peerToPeerConfigCollection); // for sending Modality Procedure Step In Progress [RAD-6] // for sending Modality Procedure Step Completed [RAD-7] // for sending Creator Procedure Step In Progress [RAD-20] // for sending Creator Procedure Step Completed [RAD-21] AddDicomClient(DicomClientTypeEnum.DicomMppsClient, ActorTypeEnum.ImageManager, commonConfig, peerToPeerConfigCollection); }
/// <summary> /// Apply the Actor Configuration. /// </summary> /// <param name="commonConfig">Common Configuration.</param> /// <param name="peerToPeerConfigCollection">Peer to Peer Configuration collection.</param> protected override void ApplyConfig(CommonConfig commonConfig, BasePeerToPeerConfigCollection peerToPeerConfigCollection) { // for sending Print Request with Presentation LUT [RAD-23] AddDicomClient(DicomClientTypeEnum.DicomPrintClient, ActorTypeEnum.PrintServer, commonConfig, peerToPeerConfigCollection); }
/// <summary> /// Class constructor. /// </summary> /// <param name="parentActor">Parent Actor Name - (containing actor).</param> /// <param name="actorName">Destination Actor Name.</param> /// <param name="commonConfig">Common Configuration.</param> /// <param name="config">HL7 Configuration.</param> public Hl7QueryServer(BaseActor parentActor, ActorName actorName, CommonConfig commonConfig, Hl7PeerToPeerConfig config) : base(parentActor, actorName, commonConfig, config) { }
/// <summary> /// Apply the Dicom Configuration to the Server. /// </summary> /// <param name="commonConfig">Common Configuration.</param> /// <param name="config">Dicom Configuration.</param> public virtual void ApplyConfig(CommonConfig commonConfig, DicomPeerToPeerConfig config) { if (_scp != null) { _scp.Initialize(ParentActor.ThreadManager); _scp.Options.SessionId = config.SessionId; _scp.Options.Identifier = String.Format("To_{0}_From_{1}", ParentActor.ActorName.TypeId, ActorName.TypeId); if (commonConfig.ResultsDirectory != System.String.Empty) { _scp.Options.StartAndStopResultsGatheringEnabled = true; _scp.ResultsFilePerAssociation = true; if (commonConfig.ResultsSubdirectory != System.String.Empty) { _scp.Options.ResultsDirectory = RootedBaseDirectory.GetFullPathname(commonConfig.RootedBaseDirectory, commonConfig.ResultsDirectory + "\\" + commonConfig.ResultsSubdirectory); } else { _scp.Options.ResultsDirectory = RootedBaseDirectory.GetFullPathname(commonConfig.RootedBaseDirectory, commonConfig.ResultsDirectory); } } else { _scp.Options.StartAndStopResultsGatheringEnabled = false; } _scp.Options.CredentialsFilename = RootedBaseDirectory.GetFullPathname(commonConfig.RootedBaseDirectory, commonConfig.CredentialsFilename); _scp.Options.CertificateFilename = RootedBaseDirectory.GetFullPathname(commonConfig.RootedBaseDirectory, commonConfig.CertificateFilename); _scp.Options.SecureConnection = config.SecureConnection; _scp.Options.LocalAeTitle = config.ToActorAeTitle; _scp.Options.LocalPort = config.PortNumber; _scp.Options.RemoteAeTitle = config.FromActorAeTitle; _scp.Options.RemotePort = config.PortNumber; _scp.Options.RemoteHostName = config.ToActorIpAddress; _scp.Options.AutoValidate = config.AutoValidate; _scp.Options.DataDirectory = RootedBaseDirectory.GetFullPathname(commonConfig.RootedBaseDirectory, config.StoreDataDirectory); if (config.StoreData == true) { _scp.Options.StorageMode = Dvtk.Sessions.StorageMode.AsMediaOnly; } else { _scp.Options.StorageMode = Dvtk.Sessions.StorageMode.NoStorage; } foreach (System.String filename in config.DefinitionFiles) { _scp.Options.LoadDefinitionFile(RootedBaseDirectory.GetFullPathname(commonConfig.RootedBaseDirectory, filename)); } // finally copy any config options _configOption1 = config.ActorOption1; _configOption2 = config.ActorOption2; _configOption3 = config.ActorOption3; } }