AWSAmplifyとAWSサーバーレスを使用したパルスオキシメトリトラッカーの構築

このチュートリアルでは、複数のユーザーのパルスオキシメトリデータを収集、追跡、および共有するためのサンプルソリューションを示します。 信頼性の高いスケーラビリティとセキュリティのために、AWSサーバーレス テクノロジー 使用して構築されています。外部 アプリケーションはVueJS で記述されており、  AmplifyFrameworkを使用してい ます 。酸素飽和度の測定は、 手動で、または Bluetooth 経由でインターネット経由でブラウザに接続されたBerryMedパルスオキシメータを使用して 実行され ます 。





デスクトップブラウザで実行されている外部アプリケーションのスクリーンショット。
デスクトップブラウザで実行されている外部アプリケーションのスクリーンショット。

, ,    AWS (AWS SAM). -  REST API Amazon API Gateway , AWS Lambda .  Python -    Amazon DynamoDB .   Amazon Cognito .





:





  •  Node.js npm





  • BerryMed BM1000C





  • AWS.      AWS





完全な酸素モニターアプリケーションの高レベルの図。
.

: . Amplify CLI  Amazon Cognito - .      Amazon Cognito     API.  , .





AmazonCognito認証ワークフローがどのように機能するかを示す図
, , Amazon Cognito

.  , ,  AWS Cloud9 IDE.  AWS Cloud9, , .





:





Amplify CLI, .





  1. npm install -g @aws-amplify/cli
          
          



  2. Amplify CLI .   .





    amplify configure
          
          



  3.   GitHub .





    git clone https://github.com/aws-samples/aws-serverless-oxygen-monitor-web-bluetooth.git
          
          



  4. ampify-frontend Amplify CLI.  .





    cd aws-serverless-oxygen-monitor-web-bluetooth/amplify-frontend
    amplify init
          
          



  5. AWS Amplify CLI.





    amplify push
          
          



  6.   aws_userpools_id   src / aws-exports.js .  .





    src /aws-exports.jsファイルのaws_user_pools_id
    aws_user_pools_id src / aws-exports.js

.   AWS SAM CLI ,   AWS :





  1.    Oxygen-Monitor AWS .





  2.       aws_userpools_id   UserPoolID .





  3.  Deploy () .





  4.  API endpoint ( API),  .





    Endpiont API
    Endpiont API

  1.  ampify-frontend / src / api-config.js     .   API  .





    const apiConfig = {
      “endpoint”: “<API ENDPOINT>”
    };
    
    export default apiConfig;
          
          



  2. .





    cd aws-serverless-oxygen-monitor-web-bluetooth/amplify-frontend
    npm install
    npm run serve
          
          



    :





    このような出力が表示されるはずです
  3. , :





    amplify publish
          
          



    URL- .





, , .





.  .  , .





BerryMed , .   « », .  Bluetooth Chrome Android.





Bluetooth Bluetooth,   "Enter Manually" ( )  .





, .  , DynamoDB.  , .





, , .  , .  .





, , .





 GitHub  serverless-backend /    AWS SAM   Lambda .  API, - DynamoDB.  Amazon Cognito API, ¨UserPoolID¨, :





JWT, .  DynamoDB, , .





.  ,  AddLevels,  ""   DynamoDB.





 FetchLevels  .  FetchSharedUserLevels Access Table,  , .





.  ,   ManageAccess  , .   Access Table,  .  .





 GetSharedUsers  , .  . FetchUsersWithAccess  , , , .





DynamoDB AWS SAM , .  - . . ,  DynamoDB.





LevelsTable:
    Type: AWS::DynamoDB::Table
    Properties: 
      AttributeDefinitions: 
        - 
          AttributeName: "username"
          AttributeType: "S"
        - 
          AttributeName: "timestamp"
          AttributeType: "N"
      KeySchema: 
        - AttributeName: username
          KeyType: HASH
        - AttributeName: timestamp
          KeyType: RANGE
      ProvisionedThroughput: 
        ReadCapacityUnits: "5"
        WriteCapacityUnits: "5"

  SharedAccessTable:
    Type: AWS::DynamoDB::Table
    Properties: 
      AttributeDefinitions: 
        - 
          AttributeName: "username"
          AttributeType: "S"
        - 
          AttributeName: "shared_user"
          AttributeType: "S"
      KeySchema: 
        - AttributeName: username
          KeyType: HASH
        - AttributeName: shared_user
          KeyType: RANGE
      ProvisionedThroughput: 
        ReadCapacityUnits: "5"
        WriteCapacityUnits: "5"
      
      



 GitHub  ampify-frontend / src /  .  main.js  Amplify VueJS ,  aws-exports.js.  ,  api-config.js.





 components/OxygenMonitor.vue  API API.





API Vue, .





  /ConnectDevice.vue,   Bluetooth Web -  .   UUID Bluetooth  , BerryMed.    Bluetooth,  .





 handleData  .  .





 OxygenMonitor   ConnectDevice  .  .





Vue .





, , Amplify Framework .





患者のバイタルサインのリモートモニタリングは、これまで以上に重要です。このガイドは、個人の健康と遠隔医療のアプリケーションソリューションを示しています。完全なソリューションには、マルチユーザー機能と安全でスケーラブルなサーバーレスサーバーが含まれます。このアプリは、ブラウザーを使用して物理デバイスと対話し、酸素飽和度と心拍数を測定します。サーバーレスAPIを使用して測定値をデータベースに公開します。履歴データはトレンドチャートとして表示でき、他のユーザーもアクセスできます。








All Articles