Erstellen eines Pulsoximetrie-Trackers mit AWS Amplify und AWS ohne Server

Dieses Tutorial zeigt eine Beispiellösung zum Sammeln, Verfolgen und Freigeben von Pulsoximetriedaten für mehrere Benutzer. Es basiert auf serverlosen AWS-  Technologien   für zuverlässige Skalierbarkeit und Sicherheit. Die externe  Anwendung ist in  VueJS geschrieben  und verwendet das  Amplify Framework  . Sauerstoffsättigungsmessungen werden  durchgeführt von  Hand oder  unter Verwendung eines BerryMed Pulsoximeter  über die zu einem Browser verbunden  Internet via Bluetooth  .





Screenshot einer externen Anwendung, die in einem Desktop-Browser ausgeführt wird.
Screenshot einer externen Anwendung, die in einem Desktop-Browser ausgeführt wird.

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





:





  •  Node.js npm





  • BerryMed BM1000C





  • AWS.      AWS





Hochwertiges Diagramm der gesamten Sauerstoffmonitoranwendung.
.

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





Diagramm, das zeigt, wie der Amazon Cognito-Autorisierungsworkflow funktioniert
, , 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 .  .





    aws_user_pools_id in der Datei src / aws-exports.js
    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
          
          



    :





    Sie sollten eine Ausgabe wie diese sehen
  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 .





Die Fernüberwachung der Vitalfunktionen des Patienten ist aktueller denn je. Dieser Leitfaden zeigt eine Anwendungslösung für die persönliche Gesundheit und Telemedizin. Die Komplettlösung umfasst Mehrbenutzerfunktionen und einen sicheren und skalierbaren Server ohne Server. Die App verwendet einen Browser, um mit einem physischen Gerät zu interagieren und die Sauerstoffsättigung und die Herzfrequenz zu messen. Es veröffentlicht Messungen in einer Datenbank unter Verwendung einer serverlosen API. Historische Daten können als Trenddiagramm angezeigt und auch von anderen Benutzern abgerufen werden.








All Articles