Building a serverless cloud-native EDI solution with AWS
AWS Architecture BlogBuilding a serverless cloud-native EDI solution with AWSby Ripunjaya Pattnaik and Prasad Shetty | on12 APR 2022| inAmazon CloudWatch,Amazon MQ,Amazon Simple Storage Service (S3),Architecture,AWS Lambda|Permalink|ShareElectronic data interchange (EDI) is a technology that exchanges information between organizations in a structured digital form based on regulated message formats and standards. EDI has been used in healthcare for decades on the payer side for determination of coverage and benefits verification. There are different standards for exchanging electronic business documents, likeAmerican National Standards Institute X12 (ANSI), Electronic Data Interchange for Administration, Commerce and Transport (EDIFACT), and Health Level 7 (HL7).HL7 is the standard to exchange messages between enterprise applications, like a Patient Administration System and a Pathology Laboratory Information. However, HL7 messages are embedded in Health Insurance Portability and Accountability Act (HIPAA) X12 for transactions between enterprises, like hospital and insurance companies.HIPAA is a federal law that required the creation of national standards to protect sensitive patient health information from being disclosed without the patient’s consent or knowledge. It also mandates healthcare organizations to follow a standardized mechanism of EDI to submit and process insurance claims.In this blog post, we will discuss how you can build a serverless cloud-native EDI implementation on AWS using theEdifecs XEngine Server.EDI implementation challengesDue to its structured format, EDI facilitates the consistency of business information for all participants in the exchange process. The primary EDI software that is used processes the information and then translates it into a more readable format. This can be imported directly and automatically into your integration systems. Figure 1 shows a high-level transaction for a healthcare EDI process.Figure 1. EDI Transaction Sets exchanges between healthcare provider and payerAlong with the implementation itself, the following are some of the common challenges encountered in EDI system development:Scaling.Despite the standard protocols of EDI, the document types and business rules differ across healthcare providers. You must scale the scope of your EDI judiciously to handle a diverse set of data rules with multiple EDI protocols.Flexibility in EDI integration.As standards evolve, your EDI system development must reflect those changes.Data volumes and handling bad data.As the volume of data increases, so does the chance for errors. Your storage plans must adjust as well.Agility.In healthcare, EDI handles business documents promptly, as real-time document delivery is critical.Compliance.State Medicaid and Medicare rules and compliance can be difficult to manage. HIPAA compliance and CAQH CORE certifications can be difficult to acquire.Solution overview and architecture data flowProviders and Payers can send requests as enrollment inquiry, certification request, or claim encounter to one another. This architecture uses these as source data requests coming from the Providers and Payers as flat files (.txt and .csv), Active Message Queues, and API calls (submitters).The steps for the solution shown in Figure 2 are as follows:1.Flat, on-premises files are transferred to Amazon Simple Storage Service (S3) buckets using AWS Transfer Family(2).3.AWS Fargate on Amazon Elastics Container Service (Amazon ECS) runs Python packages to convert the transactions into JSON messages, then queues it on Amazon MQ(4).5.Java Message Service (JMS) Bridge, which runs Apache Camel on Fargate, pulls the messages from the on-premises messaging systems and queues them on Amazon MQ(6).7.Fargate also runs programs to call the on-premises API or web services to get the transactions and queues it on Amazon MQ(8).9.Amazon CloudWatch monitors the queue depth. If queue depth goes beyond a set threshold, CloudWatch sends notifications to the containers through Amazon Simple Notification Service (SNS)(10).11.Amazon SNS triggers AWS Lambda, which adds tasks to Fargate(12), horizontally scaling it to handle the spike.13.Fargate runs Python programs to read the messages on Amazon MQ and uses PYX12 packages to convert the JSON messages to EDI file formats, depending on the type of transactions.14.The container also may queue the EDI requests on different queues, as the solution uses multiple trading partners for these requests.15.The solution runs Edifecs XEngine Server on Fargate with Docker image. This polls the messages from the queues previously mentioned and converts them to EDI specification by the trading partners that are registered with Edifecs.16.Python module running on Fargate converts the response from the trading partners to JSON.17.Fargate sends JSON payload as a POST request using Amazon API Gateway, which updates requestors’ backend systems/databases(12)that are running microservices on Amazon ECS(11).18.The solution also runs Elastic Load Balancing to balance the load across the Amazon ECS cluster to take care of any spikes.19.Amazon ECS runs microservices that uses Amazon RDS(20)for domain specific data.Figure 2. EDI transaction-processing system architecture on AWSHandling PII/PHI dataThe EDI request and response file includes protected health information (PHI)/personal identifiable information (PII) data related to members, claims, and financial transactions. The solution leverages all AWS services that are HIPAA eligible and encrypts data at rest and in-transit. The file transfers are through FTP, and the on-premises request/response files are Pretty Good Privacy (PGP) encrypted. The Amazon S3 buckets are secured through bucket access policies and are AES-256 encrypted.Amazon ECS tasks that are hosted in Fargate use ephemeral storage that is encrypted with AES-256 encryption, using an encryption key managed by Fargate. User data stored in Amazon MQ is encrypted at rest. Amazon MQ encryption at rest provides enhanced security by encrypting data using encryption keys stored in the AWS Key Management Service. All connections between Amazon MQ brokers use Transport Layer Security to provide encryption in transit. All APIs are accessed through API gateways secured throughAmazon Cognito. Only authorized users can access the application.The architecture provides many benefits to EDI processing:Scalability.Because the solution is highly scalable, it can speed integration of new partner/provider requirements.Compliance.Use the architecture to run sensitive, HIPAA-regulated workloads. If you plan to include PHI (as defined by HIPAA) on AWS services, first accept the AWS Business Associate Addendum (AWS BAA). You can review, accept, and check the status of your AWS BAA through a self-service portal available inAWS Artifact. Any AWS service can be used with a healthcare application, but onlyservices coveredby the AWS BAA can be used to store, process, and transmit protected health information under HIPAA.Cost effective.Though serverless cost is calculated by usage, with this architecture you save as your traffic grows.Visibility.Visualize and understand the flow of your EDI processing using Amazon CloudWatch to monitor your databases, queues, and operation portals.Ownership.Gain ownership of your EDI and custom or standard rules for rapid change management and partner onboarding.ConclusionIn this healthcare use case, we demonstrated how a combination of AWS services can be used to increase efficiency and reduce cost. This architecture provides a scalable, reliable, and secure foundation to develop your EDI solution, while using dependent applications. We established how to simplify complex tasks in order to manage and scale your infrastructure for a high volume of data. Finally, the solution provides for monitoring your workflow, services, and alerts.For further reading:Serverless Computing using AWSServerless and ContainersTAGS:healthcare,serverlessRipunjaya PattnaikRipunjaya is an Enterprise Solutions Architect at AWS. He enjoys problem-solving and advising his customers. In his free time, he likes to try new sports, play ping-pong and watch movies.Prasad ShettyPrasad Shetty is a Boston-based Solutions Architect at AWS. He brings more than 20 years of experience in modernizing and delivering Digital Innovation and Transformation projects across enterprises. He is motivated by helping customers architect and optimize applications on AWS. In his leisure time, Prasad enjoys biking and traveling.
Electronic data interchange (EDI) is a technology that exchanges information between organizations in a structured digital form based on regulated message formats and standards. EDI has been used in healthcare for decades on the payer side for determination of coverage and benefits verification. There are different standards for exchanging electronic business documents, like American National […]
Ripunjaya Pattnaik
Amazon CloudWatch Amazon MQ Amazon Simple Storage Service (S3) Architecture AWS Lambda