Skip to content

Automate-Medical/pft-extractor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PFT Extractor

A project for managing pulmonary function test data using AWS.

PFT X uses Textract and regular expressions to filter pulmonary function test data out of PDF format and into structured JSON.

Note This project is for demonstration purposes only.

Architecture

V3

Tech

  • AWS
    • DynamoDB
    • Lambda
    • Textract
    • S3
    • KMS
    • SNS
    • CDK
    • CloudWatch
    • CloudFormation
  • TypeScript
  • SST + AWS CDK
  • React
  • Next.js

Opinions

  • ⚙️ Reproducible cloud infrastructure
  • 🕵️‍♂️ Audit friendly

Environment setup

src/server

  1. Set up ~/.aws/credentials. This guide will assume you are using your crendetials as the "default" profile.
  2. Ensure you have Node.js 14.x installed
  3. cd src/server; npm install
  4. npm run deploy
  5. Create a user account to log into via the AWS Managment panel -> Cognito
  6. The deployment will store output values necessary to run the client in outputs.cdk.json - this file will not be committed

src/client

The frontend application for the project can be run completely locally.

  1. Ensure you have Node.js 12.x installed
  2. cd src/client; npm install
  3. Use the outputs.cdk.json values to build a file at src/client/.env.local that looks like:
NEXT_PUBLIC_API_ENDPOINT = ""
NEXT_PUBLIC_AWS_REGION = ""
NEXT_PUBLIC_USER_POOL_ID = ""
NEXT_PUBLIC_USER_POOL_WEB_CLIENT_ID = ""
  1. npm run start

Development

src/server

We use AWS CloudFormation Stacks to describe the entirety of an individual deployment of the software. We use Serverless Stack (SST) - which is a superset framework on top of AWS CDK - to achieve this. One of the great features about SST is the ability to proxy Lambdas locally. When you're reading to begin work on the contents of src/server/src, which is where the APIs etc are defined, you can run a local development environment with npm run start.

src/development

No additional development notes. Make sure you set up your .env.local file.

About

Automate Medical's PFT processing platform

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published