Esempio n. 1
0
        public static void sendHL7Recursion(IEnumerable<string> hl7Messages, SendHl7 sendhl)
        {
            //  send the hl7 messages
                var status = sendhl.SendHL7Multiple(hl7Messages);

                Option<string> message = Option.None<string>();

                if (status == HL7Status.NOCONNECTION)
                {
                    message = Option.Some("HL7 connection failed (NOCONNECTION), attempt resending Order Message to DI?");
                }
                else if (status == HL7Status.NACK)
                {
                    //MessageBox.Show("HL7 connection Successful, but NACK returned");
                }
                else if (status == HL7Status.EXCEPTION)
                {
                    message = Option.Some("HL7 connection failed (EXCEPTION), attempt resending Order Message to DI?");
                }

                message.forEach(mess =>
                {

                    if (DialogResult.Yes == MessageBox.Show(mess, mess, MessageBoxButtons.YesNo))
                    {
                        sendHL7Recursion(hl7Messages, sendhl);
                    }

                });
        }
Esempio n. 2
0
        public static void sendHL7(string mrn, string firstName, string lastName, string ordernumber, string ward, Dictionary<SpecimenType, IEnumerable<string>> testCodeUniqueIndividual)
        {
            //set the IP and port to send to
            var sendhl = new SendHl7("172.18.140.209", 10013);

            //create the HL7 message
            var co = new OrderMessage(mrn, firstName, lastName, ordernumber, "", ward, Sex.U, testCodeUniqueIndividual);

            var hl7Messages = co.toHl7();

             if (DialogResult.Yes == MessageBox.Show("Send Order Message to DI?", "Send Order Message to DI?", MessageBoxButtons.YesNo))
             {
                sendHL7Recursion(hl7Messages, sendhl);
             }
        }