Paul Hegel · Oct 17, 2019 go to post

Thanks @Kenneth.Poindexter8571,

This is helpful.  It triggered my memory.  So I created a new namespace and HL7 production which included some nice base features to help me test an integration on my local system.

Services: HL7FileService

Processes: Ens.Alert and MsgRouter

Operations: BadMessageHandler, EmailAlert, HL7FileOperation and PagerAlert.

Paul Hegel · Oct 16, 2019 go to post

You can convert the DateTime to a Time String and send that in the insert or update strings.

Here is the Cache Class used in my example:


Class User.TestTimeData Extends %Persistent
{

Property TimeFormat As %String [ Required ];

Property TimeTest As %Time [ Required ];
}

Here is the C# .Net Core Console App code example:
using System;
using System.Data.Odbc;

namespace TestCacheTimeType
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
DateTime dateTime = DateTime.MinValue.AddHours(22).AddMinutes(10);

string timeLong = dateTime.ToLongTimeString();
InsertRecord("ToLongTimeString", timeLong);

string timeShort = dateTime.ToShortTimeString();
InsertRecord("ToShortTimeString", timeShort);

string timeFormatted = dateTime.ToString("HH:mm:ss");
InsertRecord("ToString\"HH:mm:ss)\"", timeFormatted);

Console.WriteLine("Press any key to exit....");
Console.Read();

}

static void InsertRecord(string TimeFormat, string TimeToInsert)
{
Console.WriteLine("{0}: {1}", TimeFormat, TimeToInsert);
using (OdbcConnection connection = new OdbcConnection("DSN=IRISHealth-WebDev; UID=; PWD =; "))
{
string insertSQL = "Insert into SQLUser.TestTimeData(TimeFormat, TimeTest) values('" + TimeFormat + "', '" + TimeToInsert + "');";
// inserts a new row in the source table.
OdbcCommand command = new OdbcCommand(insertSQL, connection);
// Open the connection and execute the insert command.
try
{
connection.Open();
command.ExecuteNonQuery();
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}

}

}
}
}

Paul Hegel · Oct 9, 2019 go to post

Thanks Sean,

This helped me understand the OData specification in a quick way.

Paul

Paul Hegel · Aug 1, 2019 go to post

I've noticed this as well, it seems you have two choices:

  1. Duplicate the rule using a different source on the new rule.  
  2. Ignore the source and use other parameters in the message and/or use a rule function to decide on the routing of the package.   
    • Your class should Extend Ens.Rule.FunctionSet 
    • For example your functioin could use a lookup table to decide your routing

With the use of functions you might be able to accomplish exactly what you want.

Paul