private static string getHL7ValueSEL(HL7Message message, List <MessageGroupInstance> messageGroupInstances, List <MessageGroup> messageGroups, WebservicePropertySet wsProperty ) { // get the ms groups List <MessageGroup> msGroups = ConfigurationUtility.GetIncomingWebserviceMessageGroup(wsProperty, messageGroups); // get segment string type MessageGroupInstance messageGroupInstance = messageGroupInstances.Find(i => i.id == msGroups[ZERO].messageGroupInstanceId); // get the message position for this specific column List <Configuration> configMessagePoisition = ConfigurationDAO.GetMessagePosition(messageGroupInstance); // get the coordinates for the message item string messageCoordinates = HL7MessageUtility.getItemCoordinates(configMessagePoisition); // get segment string type string segmentType = configMessagePoisition[ZERO_ELEMENT].segmentType.name; // get the value for the database inside of the value position string hl7Value = HL7MessageUtility.getValueByPosition( message, HL7MessageUtility.getSegmentType(segmentType), messageCoordinates); return(hl7Value); }
public static void TestConfigLoad() { Configuration masterConfig = ConfigurationDAO.GetAllConfigurations(); List <Application> applications = masterConfig.applications; List <Communication> communications = masterConfig.communications; List <WebserviceObject> webserviceObjects = masterConfig.webserviceObjects; List <WebserviceInstance> webserviceInstances = masterConfig.webserviceInstances; List <WebservicePropertySet> webserviceProperties = masterConfig.webservicePropertySets; List <MessageGroup> messageGroups = masterConfig.messageGroups; applications.ForEach(delegate(Application app) { if (app.name != RSERVER) { return; } // get the unprocessed message count for the application List <MessageBucket> brokerInformation = MessageBucketDAO.GetUnprocessedMessageHeaderInstancesByApplication(app); brokerInformation.ForEach(delegate(MessageBucket broker) { // get the message header and message MessageHeaderInstance messageHeaderInstance = broker.messageHeaderInstance; Message message = broker.message; // locally retrieve the communication object from memory Communication communication = ConfigurationUtility.GetIncomingWebserviceCommunication(app, communications); // locally retrieve the webservice instance object from memory WebserviceInstance webserviceInstance = ConfigurationUtility.GetIncomingWebserviceInstance(communication, webserviceInstances); // locally retrieve the web service objects from memory List <WebserviceObject> wsObjects = ConfigurationUtility.GetIncomingWebserviceObjects(webserviceInstance, webserviceObjects); // for each object - for each property set for that object - handle accordingly wsObjects.ForEach(delegate(WebserviceObject wsObject) { Console.WriteLine("OBJECT:" + wsObject.name); List <WebservicePropertySet> wsProperties = ConfigurationUtility.GetIncomingWebservicePropertySets(wsObject, webserviceProperties); wsProperties.ForEach(delegate(WebservicePropertySet wsProperty) { Console.WriteLine("Property:" + wsProperty.name); List <MessageGroup> msGroups = ConfigurationUtility.GetIncomingWebserviceMessageGroup(wsProperty, messageGroups); Console.WriteLine("Group Count:" + msGroups.Count); }); }); // update the table to processed // BrokerDAO.UpdateProcessedFlagAndMessageLog(messageHeaderInstance, message, true); }); }); }