Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

AWS HealthLake Exports

Posted on Aug 26 • Originally published at binaryheap.com In my previous article I wrote about a Callback Pattern with AWS Step Functions built upon the backbone of HealthLake's export. As much as I went deep with code on the Callback portion, I felt that I didn't give the HealthLake side of the equation enough run. So this article is that adjustment. Managing exports with AWS HealthLake.AWS HealthLake is a HIPAA-eligible service that provides FHIR APIs that help healthcare and life sciences companies securely store, transform, transact, and analyze health data in minutes to give a chronological view at the patient and population-level. - AWSMy words on that are that HealthLake is a FHIR-compliant database that gives a developer a robust set of APIs to build patient-centered applications. You can use HealthLake for building transactional applications, analyze large volumes of data, store structured and semi-structured information and build analytics and reports.When building with HealthLake I find it fits in one of two places.Before June 2023, exports in AWS HeathLake were only supported in the console or through CLI commands. With the release of these new bulk APIs for managing exports, it allows the workflows like what I showed in the Callback article.This capability unlocks many different use cases but the biggest two that I see coming to the front are:Two more notes on the exports before I show what all goes into making it possible in your environment. The API provides a couple of nice options to control what you are going to export.First, with a Patient centered export, you can supply that in the URL and HealthLake will export all records related to your patients in the Patient resource. So things attached as FHIR References, Subscribers and whatnot throughout your dataset.Second, by using a Since parameter, HealthLake will export only those records changed >= that Since parameter.For more reading on the export, here's the documentationUsing exports with AWS HealthLake requires a touch of setup. In the following sections I'll explain what all needs to be configured and then we will look at how to execute the exports.The first step in preparing for our export is to build a role that has access to the HealthLake datastore in addition to the actions for running and describing the export. A snippet of CDK code that does this is below:Good bit going on with the above, so let's talk about that for a second.These new actions are specifically associatied with the AWS HealthLake exports.The other parts of the role are wrapped around S3 and KMS. This matters because the export is going to write its results into the S3 bucket/key of your choosing. And the role that this executes under is going to need permission to those things.The last piece of the role is that I'm limiting access via a Trust Policy so that only the account I want and the datastore I choose for further restriction. It's just good practice.To demonstrate exports with AWS HealthLake I'm going to use a simple API call and show you the cURL requests. At the bottom of the article will be the link to the full repository I used in the Callback article, so you can refer to that as well.I left out the "Authorization" header for obvious reasons. But things to note that are meaningful.The Payload you pass into the POST request is specific as well. You'll need to supply:When you run the request, the following output will be returned.AWS HealthLake exports are async operations. You POST into the API and you get a JobId that you'll use to check on the progress of your job.The API provides a GET request that allows you to describe the job you are interrogating.Remember from the previous article, you can only have 1 job running at a time but you can always go back and inspect older jobs. I can't find information around how long the job history hangs around but I generally am not looking back that far so I haven't noticed.The response to the describe call is going to look like this:I'll break down that payload.First off you see the "jobProperties" that highlight the things you passed in via the POST. It does include some additional information about the job itself. Runtime, status, job id, and job name.The other pieces of information describe the actual request including the full URL.Lastly, you get an "output" object. This is a list of the NDJSON files and their resource type along with their full URL to the file in S3. This is important because if you want to do something with these files, you can.A quick note on NDJSON. The first time I looked into the output of the files, I was a bit shocked that it wasn't a single record in a file. I guess that shouldn't have shocked me but it did. NDJSON is "Newline Delimited JSON" meaning that you have multiple records in a file separated by \r\n or \nThe output in S3 will look like the below:That completes the discussion on the Callback and the underlying HealthLake exports in AWS that supports it. I've become a tremendous fan of HealthLake and believe that it fits a space of serious challenge in HealthCare. Data aggregation and interopability.By leveraging these new APIs from AWS, you can take advantage of an export capability that can support a variety of workloads. I hope you've got a better understanding of how it all comes together. If you want to dig into the full source for everything, here is the GitHub repositoryEnjoy! And Happy Building!Templates let you quickly answer FAQs or store snippets for re-use. Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink. Hide child comments as well Confirm For further actions, you may consider blocking this person and/or reporting abuse Guille Ojeda - Aug 17 Navdeep Mishra - Aug 19 Akande Olalekan Toheeb - Aug 19 Rodion Chachura - Jul 30 Would you like to become an AWS Community Builder? Learn more about the program and apply to join when applications are open next. Once suspended, aws-builders will not be able to comment or publish posts until their suspension is removed. Once unsuspended, aws-builders will be able to comment and publish posts again. Once unpublished, all posts by aws-builders will become hidden and only accessible to themselves. If aws-builders is not suspended, they can still re-publish their posts from their dashboard. Note: Once unpublished, this post will become invisible to the public and only accessible to Benjamen Pyle. They can still re-publish the post if they are not suspended. Thanks for keeping DEV Community safe. Here is what you can do to flag aws-builders: aws-builders consistently posts content that violates DEV Community's code of conduct because it is harassing, offensive or spammy. Unflagging aws-builders will restore default visibility to their posts. DEV Community — A constructive and inclusive social network for software developers. With you every step of your journey. Built on Forem — the open source software that powers DEV and other inclusive communities.Made with love and Ruby on Rails. DEV Community © 2016 - 2023. We're a place where coders share, stay up-to-date and grow their careers.



This post first appeared on VedVyas Articles, please read the originial post: here

Share the post

AWS HealthLake Exports

×

Subscribe to Vedvyas Articles

Get updates delivered right to your inbox!

Thank you for your subscription

×