- Java 1.11+
- Apache Maven
- LinuxForHealth HL7v2-FHIR Converter
- Optional: AWS SAM (Serverless Application Model) CLI
- Optional: GNU Make
- Optional: Docker
- Add local AWS Credentials
# Build & Deploy CloudFormation stack with Make
make build-deploy
make delete-stack
make check-size
# Build with Maven
mvn clean install
# Run local unit & integration tests
mvn test
# Run test in docker
sam local invoke
# Deploy with AWS SAM CLI & CloudFormation template
sam build -t template.yaml
sam deploy -g -t template.yaml
- Extract reusable mapping logic into separate module
- Light dependency injection with something like Dagger at compile time
- The lambda function is triggered by incoming HL7 messages from an SQS queue
- The function transforms HL7 messages into FHIR JSON
- Individual failures are tracked and returned as a partial batch response
- Successful transformations are sent to another SQS queue holding FHIR JSON
An AWS CloudFormation template provides configuration for:
- AWS Lambda transformation function
- Incoming HL7 queue
- Outgoing FHIR queue
- IAM roles + policies for access to queues
- Advantages
- Reuse of stable HAPI HL7 & FHIR infrastructure
- Disadvantages
- High memory usage from the mapping library used and Java generally
- Startup is potentially too slow for certain use cases
- Each queue should be limited to specific HL7 message types & FHIR resources from specific FHIR versions.