Exemple #1
0
        private BaseActor CreateActor(System.String actorNameString)
        {
            BaseActor     actor     = null;
            ActorNameEnum actorName = ActorNames.NameEnum(actorNameString);

            switch (actorName)
            {
            case ActorNameEnum.AdtPatientRegistration:
                actor = new AdtPatientRegistrationActor(_actorsTransactionLog);
                break;

            case ActorNameEnum.OrderPlacer:
                actor = new OrderPlacerActor(_actorsTransactionLog);
                break;

            case ActorNameEnum.DssOrderFiller:
                actor = new DssOrderFillerActor(_actorsTransactionLog);
                break;

            case ActorNameEnum.AcquisitionModality:
                actor = new AcquisitionModalityActor(_actorsTransactionLog);
                break;

            case ActorNameEnum.ImageManager:
                actor = new ImageManagerActor(_actorsTransactionLog);
                break;

            case ActorNameEnum.ImageArchive:
                actor = new ImageArchiveActor(_actorsTransactionLog);
                break;

            case ActorNameEnum.PerformedProcedureStepManager:
                actor = new PpsManagerActor(_actorsTransactionLog);
                break;

            case ActorNameEnum.EvidenceCreator:
                actor = new EvidenceCreatorActor(_actorsTransactionLog);
                break;

//				case ActorNameEnum.ReportManager:
//					actor = new ReportManagerActor(_actorsTransactionLog);
//					break;
            case ActorNameEnum.PrintComposer:
                actor = new PrintComposerActor(_actorsTransactionLog);
                break;

            case ActorNameEnum.PrintServer:
                actor = new PrintServerActor(_actorsTransactionLog);
                break;

            case ActorNameEnum.Unknown:
            default:
                break;
            }

            return(actor);
        }
Exemple #2
0
        public void LoadConfiguration(System.String configurationFilename)
        {
            XmlTextReader reader = new XmlTextReader(configurationFilename);

            while (reader.EOF == false)
            {
                reader.ReadStartElement("IheIntegrationProfile");
                _profileName = reader.ReadElementString("IntegrationProfileName");

                while (reader.IsStartElement())
                {
                    reader.ReadStartElement("IheActorConfiguration");
                    System.String actorNameString = reader.ReadElementString("ActorName");

                    BaseActor   actor       = CreateActor(actorNameString);
                    ActorConfig actorConfig = new ActorConfig(actor.ActorName);

                    while (reader.IsStartElement())
                    {
                        reader.ReadStartElement("PeerIheActorDicomConfiguration");
                        System.String peerActorNameString = reader.ReadElementString("ActorName");

                        ActorNameEnum peerActorName = ActorNames.NameEnum(peerActorNameString);
                        DicomConfig   dicomConfig   = new DicomConfig(peerActorName);

                        dicomConfig.SessionId = UInt16.Parse(reader.ReadElementString("SessionId"));
                        reader.ReadStartElement("DvtNode");
                        dicomConfig.DvtAeTitle    = reader.ReadElementString("AeTitle");
                        dicomConfig.DvtIpAddress  = reader.ReadElementString("IpAddress");
                        dicomConfig.DvtPortNumber = UInt16.Parse(reader.ReadElementString("PortNumber"));
                        reader.ReadEndElement();
                        reader.ReadStartElement("SutNode");
                        dicomConfig.SutAeTitle    = reader.ReadElementString("AeTitle");
                        dicomConfig.SutIpAddress  = reader.ReadElementString("IpAddress");
                        dicomConfig.SutPortNumber = UInt16.Parse(reader.ReadElementString("PortNumber"));
                        reader.ReadEndElement();
                        dicomConfig.DataDirectory = reader.ReadElementString("DataDirectory");
                        System.String storeData = reader.ReadElementString("StoreData");
                        if (storeData == "True")
                        {
                            dicomConfig.StoreData = true;
                        }
                        else
                        {
                            dicomConfig.StoreData = false;
                        }
                        reader.ReadStartElement("DefinitionFiles");

                        bool readingDefinitions = true;
                        while (readingDefinitions == true)
                        {
                            dicomConfig.AddDefinitionFile(reader.ReadElementString("DefinitionFile"));
                            reader.Read();
                            if ((reader.NodeType == XmlNodeType.EndElement) &&
                                (reader.Name == "DefinitionFiles"))
                            {
                                reader.Read();
                                readingDefinitions = false;
                            }
                        }

                        dicomConfig.ResultsRootDirectory = reader.ReadElementString("ResultsRootDirectory");

                        _resultsDirectory = dicomConfig.ResultsRootDirectory;

                        reader.ReadEndElement();

                        actorConfig.Add(dicomConfig);
                    }
                    reader.ReadEndElement();

                    actor.ConfigActor(actorConfig);
                    _actors.Add(actor);
                }
                reader.ReadEndElement();
            }

            reader.Close();
        }