Tallan's Blog

Tallan’s Experts Share Their Knowledge on Technology, Trends and Solutions to Business Challenges

Posts Tagged ".NET Framework"

Generate HIPAA EDI Testing Files – 4 Easy Steps!

Paul Gutierrez

Need a way to test your systems without compromising patient data? Creating Electronic Data Interchange (EDI) test files from scratch can be an extremely time-consuming option. This leaves many searching for downloadable sample files that often contain only the mandatory loops and hinder the scope of your HIPAA EDI testing.
Fortunately, today’s Healthcare EDI professionals can find an EDI Management Platform to help alleviate their HIPAA compliance headaches.
The T-Connect EDI management suite features the X12 Studio EDI Toolbox, an EDI development toolkit with a wide range of features that are essential to simplifying the EDI development process. There you’ll find the HIPAA Test File Generator which can generate various sample EDI files, for any healthcare EDI transaction type, in the blink of an eye.
This post will demonstrate how to generate EDI test files in X12 Studio EDI Toolbox

1. The process for utilizing the HIPAA Test File Generator is straightforward. To start, click on the “HIPAA Test File…

Splitting 835 Healthcare Claim Payment

The Electronic Data Interchange (EDI) consists of a file in a specific format that represents data exchanged in a transaction from supply chain to healthcare. EDI 835 Claim Payment transaction provides payments information in reference to claims in EDI 837 Healthcare Claim format. The details include transactions such as charges, deductible, copay, payers, payee, etc. The information is stored a hierarchical structure. The standard of EDI format is well defined and the complexity can be very overwhelming. Additionally, we do not want this high degree of detail slowing our processing time.
One of the problems that enterprise systems face with EDI is file size. A single EDI 835 may contain multiple claim records and the quantity of claims in a single file can make it very difficult to process the file. Systems are often bogged down when dealing with a very…

BizTalk 2016 Feature Pack 1 Management REST API Tutorial

Kevin Morillo

One of the great new additions of the recently released Feature Pack 1 for Microsoft BizTalk 2016 is a REST API, which can be used to administer BizTalk Server.  Longtime users of BizTalk may have experience with using ExplorerOM.dll or WMI based scripts to manage their BizTalk environment.  The REST API introduced in Feature Pack 1 provides a more flexible alternative, including a Swagger definition providing rapid implementation of an application to consume the API.  In this post, I will walk through the process of installing the API as well as using Swagger to generate a C# client and demonstrating a simple command.

Dynamically set InstanceContextMode for a WCF Service from app.config or web.config

Dan Field

WCF offers a lot of very powerful configuration and extensibility options – sometimes it becomes a bit dizzying.
I recently had a requirement to design a WCF service that could potentially consume many system resources (particularly, RAM) in some client scenarios. Any single call will be manageable, and concurrent calls would be manageable in some environments (but not others – the service is required to be able to process large files in a single call, but can only handle so much before running out of memory). Obviously, it would be good to find ways to split up calls to the service or for the client to sequence them, but WCF offers a very simple configuration attribute to specify that the service should run as a Singleton, processing only one call at a time:
Problem solved, right? Now what if a particular environment…

How to resolve the “Reason: Unexpected event (“eos”) in state “processing_header”.” error from the XML Disassembler

Dan Field

This error is typically harmless, but can result when the XML Disassembler encounters an empty Envelope message instance that’s formatted like this:
instead of this:
BizTalk chooses to make a semantic difference between these two instances, and process the second one fine (publishing no messages), but raising an exception like this for the first:
There was a failure executing the response(receive) pipeline: “…” Source: “XML disassembler” Send Port: “…” URI: “…” Reason: Unexpected event (“eos”) in state “processing_header”.

This can happen particularly when using an XmlProcedure or XmlPolling from SQL – if the resultset is empty, the adapter will publish this message. While this behavior may be desirable (and can frequently be avoided by ensuring you have good Data Available statements on your polling ports, and only call XmlProcedures with valid parameters/at valid times), it can also generate a lot of alarming errors….

SqlCommand oddity raises NullReferenceException on an otherwise valid query

Dan Field

Bit of a head scratcher for this one. I was working on some ADO.NET code that involved calling a stored procedure with many (10k+) table valued parameter rows being passed in. Occasionally, I’d see a bug where ExecuteNonQuery would result in an exception with the following stack trace (I tried it with ExecuteReader and ExecuteScalar just to be sure as well):
System.NullReferenceException was unhandled by user code
HResult=-2147467261
Message=Object reference not set to an instance of an object.
Source=System.Data
StackTrace:
at System.Data.SqlClient.SqlCommand.OnReturnStatus(Int32 status)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)

I knew for sure the command object was not null, and so I started looking at the Reference Source. It seemed the parameter collection was the cause of the issue.
I enabled CLR debugging in Visual Studio and dove in. The most relevant block of that function is here:
In my case, count was…

Xsd.exe, Arrays, and “Specified”

Dan Field

Microsoft’s XSD utility provides an excellent way to generate classes from schema definition files, but has a few quirks that can make using the generated classes a bit tougher. In particular, it serializes repeating structures as arrays rather than using the generic List class, and it serializes any element with a “minOccurs = ‘0’” with a separate “Specified” property (which must be set to true if the member is to be serialzied back to XML).
We frequently use serialization techniques here, and while there are some utilities out there that offer similar post processing, many of them are not free and/or difficult to package with a build (include an executable in the project? not ideal). In light of that, I wrote a PowerShell script (below) that can be included in source control and utilized in a post-build event. For example,
The /c…

WCF-SQL Polling and the ESB Portal

Dan Field

With the ESB Toolkit, BizTalk provides an excellent framework for handling exceptions that occur throughout the ESB. There are many built in facilities that are as simple as checking off a box to route failed messages to the portal, and within orchestrations you can easily build ESB Exception messages in catch blocks and route them to the portal as well.
However, these only apply if a message actually makes it to a pipeline or orchestration. For WCF SQL Polling receive locations, it’s possible that no message will ever make it to the pipeline – for example, if the procedure causes an exception to occur (perhaps by a developer intentionally using THROW or RAISERROR), the adapter will write the exception to the event log without providing a message for any pipeline or orchestration processing. Checking “suspend message on failure” doesn’t offer any…

Working with SQL in BizTalk and Mule

Dan Field

Databases are very frequently at the heart of an enterprise integration. EAI tasks frequently involve polling databases, calling stored procedures in databases, as well as ETL and basic CRUD work on databases. The database backing a particular application is often a natural source to integrate with – and if no on premise database exists for a particular source, creating one for local OLTP purposes can help increase insight and decrease chattiness between on premises and off premises applications.
It’s no wonder then that both BizTalk and Mulesoft ESB offer database connectivity out of the box. In this post, I’ll compare Mule and BizTalk’s SQL capabilities, primarily focusing on Oracle and SQL Server. Why these two? They’re the most popular enterprise grade database engines. MySQL is also very popular, but lacking in some enterprise features that this blog will be examining.  PostgresSQL…

Muenchian Grouping in BizTalk while keeping Mapper functionality

Dan Field

Muenchian Grouping is a powerful technique for to allow grouping by common values among looping/repeating nodes in an XML document.  BizTalk does not have out of the box support for this, but it can be achieved by adding custom XSLT to a map.  Chris Romp wrote a post about this years ago that serves as an excellent example of the idea in BizTalk: http://blogs.msdn.com/b/chrisromp/archive/2008/07/31/muenchian-grouping-and-sorting-in-biztalk-maps.aspx.  The drawback of his method is that you lose all other Mapper functionality by using completely custom XSLT, and custom XSLT is more difficult to maintain than a BizTalk map.
Enter Sandro Periera’s phenomenal tutorial on Muenchian Grouping in BizTalk maps (https://code.msdn.microsoft.com/windowsdesktop/Muenchian-Grouping-and-790347d2).  His solution is particularly powerful because it allows you to maintain the functionality and simplicity of the BizTalk Mapping engine while extending it to allow for the Muenchian Grouping technique as well.  However, there is still…

\\\