<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Marco David Martinez</title>
    <description>The latest articles on Forem by Marco David Martinez (@markwinap).</description>
    <link>https://forem.com/markwinap</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F363250%2F20d8c66a-46c4-4a27-9246-ae95bbefe4d4.jpeg</url>
      <title>Forem: Marco David Martinez</title>
      <link>https://forem.com/markwinap</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/markwinap"/>
    <language>en</language>
    <item>
      <title>Finally completed my Twilio Hackathon COVID-19-Communications project
</title>
      <dc:creator>Marco David Martinez</dc:creator>
      <pubDate>Fri, 01 May 2020 04:15:14 +0000</pubDate>
      <link>https://forem.com/markwinap/finally-completed-my-twilio-hackathon-covid-19-communications-project-593k</link>
      <guid>https://forem.com/markwinap/finally-completed-my-twilio-hackathon-covid-19-communications-project-593k</guid>
      <description>&lt;h2&gt;
  
  
  About
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Send SMS &amp;amp; Emails to Covid19 patients family members in a simple to use portal&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Video
&lt;/h2&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/a8uSXL18AM8"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Features
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Reactjs Portal&lt;/li&gt;
&lt;li&gt;Reporting capabilities&lt;/li&gt;
&lt;li&gt;Twilio SMS and Twilio Sendgrid&lt;/li&gt;
&lt;li&gt;Server less DB&lt;/li&gt;
&lt;li&gt;Server less Node.js functions&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to use it
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Portal Demo
&lt;/h3&gt;

&lt;p&gt;&lt;a href="http://covid-19-poc.s3-website-us-west-2.amazonaws.com/"&gt;http://covid-19-poc.s3-website-us-west-2.amazonaws.com/&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Repo
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/markwinap/Twilio-Hackathon-COVID-19-Communications"&gt;https://github.com/markwinap/Twilio-Hackathon-COVID-19-Communications&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Miro whiteboard
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://miro.com/welcomeonboard/LQ3MEi6RZNh6eXkRKrcqPocivjtZjTwSxqOiN27jDfpXxkjw7t0mstrfuitBWzip"&gt;https://miro.com/welcomeonboard/LQ3MEi6RZNh6eXkRKrcqPocivjtZjTwSxqOiN27jDfpXxkjw7t0mstrfuitBWzip&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Project Overview
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Folder Structure
&lt;/h2&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;├───diagrams
├───lambda
│   ├───covid19-rds-service
│   └───covid19-twilio-service
│       └───node_modules
│           ├───axios
│           │   ├───dist
│           │   └───lib
│           │       ├───adapters
│           │       ├───cancel
│           │       ├───core
│           │       └───helpers
│           ├───debug
│           │   └───src
│           ├───follow-redirects
│           └───ms
└───react-portal
    ├───public
    └───src
        ├───components
        │   ├───CardOption
        │   ├───DialogNewFamilly
        │   ├───DialogNewPatientNote
        │   ├───DialogPatient
        │   ├───DialogUpdateFamilly
        │   ├───DialogUpdatePatientNote
        │   ├───FabBack
        │   ├───GridOptions
        │   ├───HeroMessage
        │   ├───PatientTable
        │   ├───RegisterFamily
        │   ├───RegisterPatient
        │   ├───SearchOptions
        │   ├───SnackBarNotification
        │   ├───TableHeadPatient
        │   ├───TabPanel
        │   └───ToolbarTop
        ├───hooks
        │   └───Debounce
        ├───icons
        ├───pages
        │   ├───Main
        │   ├───Patient
        │   └───Register
        └───utils
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  Local Setup
&lt;/h3&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;git https://github.com/markwinap/Twilio-Hackathon-COVID-19-Communications.git
&lt;span class="nb"&gt;cd &lt;/span&gt;Twilio-Hackathon-COVID-19-Communications&lt;span class="se"&gt;\r&lt;/span&gt;eact-portal
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  Install Portal dependencies
&lt;/h3&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  Run portal locally
&lt;/h3&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;npm run
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  LAMBDA
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;covid19-rds-service&lt;/li&gt;
&lt;li&gt;covid19-twilio-service&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  RDS
&lt;/h2&gt;

&lt;p&gt;NAME: covid19&lt;br&gt;
Engine: Aurora (MySQL) Serverless&lt;/p&gt;

&lt;h3&gt;
  
  
  Patient TABLE SCHEDMA
&lt;/h3&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;patient&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="n"&gt;patientId&lt;/span&gt; &lt;span class="nb"&gt;INT&lt;/span&gt; &lt;span class="n"&gt;AUTO_INCREMENT&lt;/span&gt; &lt;span class="k"&gt;PRIMARY&lt;/span&gt; &lt;span class="k"&gt;KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;firstName&lt;/span&gt; &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;DEFAULT&lt;/span&gt; &lt;span class="s1"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;lastName&lt;/span&gt; &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;DEFAULT&lt;/span&gt; &lt;span class="s1"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;ssn&lt;/span&gt; &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;DEFAULT&lt;/span&gt; &lt;span class="s1"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;bed&lt;/span&gt; &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;DEFAULT&lt;/span&gt; &lt;span class="s1"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;age&lt;/span&gt; &lt;span class="nb"&gt;TINYINT&lt;/span&gt; &lt;span class="k"&gt;DEFAULT&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;sex&lt;/span&gt; &lt;span class="nb"&gt;TINYINT&lt;/span&gt; &lt;span class="k"&gt;DEFAULT&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;status&lt;/span&gt; &lt;span class="nb"&gt;TINYINT&lt;/span&gt; &lt;span class="k"&gt;DEFAULT&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;createdDate&lt;/span&gt; &lt;span class="nb"&gt;DATE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;updatedDate&lt;/span&gt; &lt;span class="nb"&gt;DATE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;admissionDate&lt;/span&gt; &lt;span class="nb"&gt;DATE&lt;/span&gt; &lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;exitDate&lt;/span&gt; &lt;span class="nb"&gt;DATE&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  Patient TABLE SCHEDMA
&lt;/h3&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;familly&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="n"&gt;famillyId&lt;/span&gt; &lt;span class="nb"&gt;INT&lt;/span&gt; &lt;span class="n"&gt;AUTO_INCREMENT&lt;/span&gt; &lt;span class="k"&gt;PRIMARY&lt;/span&gt; &lt;span class="k"&gt;KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;firstName&lt;/span&gt; &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;DEFAULT&lt;/span&gt; &lt;span class="s1"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;lastName&lt;/span&gt; &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="k"&gt;DEFAULT&lt;/span&gt; &lt;span class="s1"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;relationship&lt;/span&gt; &lt;span class="nb"&gt;TINYINT&lt;/span&gt;  &lt;span class="k"&gt;DEFAULT&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;email&lt;/span&gt; &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;40&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="n"&gt;mobile&lt;/span&gt; &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;40&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="n"&gt;createdDate&lt;/span&gt; &lt;span class="nb"&gt;DATE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;updatedDate&lt;/span&gt; &lt;span class="nb"&gt;DATE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;patientId&lt;/span&gt; &lt;span class="nb"&gt;INT&lt;/span&gt; &lt;span class="k"&gt;DEFAULT&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  PatientNotes TABLE SCHEDMA
&lt;/h3&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;notes&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="n"&gt;noteId&lt;/span&gt; &lt;span class="nb"&gt;INT&lt;/span&gt; &lt;span class="n"&gt;AUTO_INCREMENT&lt;/span&gt; &lt;span class="k"&gt;PRIMARY&lt;/span&gt; &lt;span class="k"&gt;KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;createdDate&lt;/span&gt; &lt;span class="nb"&gt;DATE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;updatedDate&lt;/span&gt; &lt;span class="nb"&gt;DATE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;patientId&lt;/span&gt; &lt;span class="nb"&gt;INT&lt;/span&gt; &lt;span class="k"&gt;DEFAULT&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="nb"&gt;TINYINT&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;DEFAULT&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;note&lt;/span&gt; &lt;span class="nb"&gt;TEXT&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  API GATEWAY
&lt;/h2&gt;

&lt;h3&gt;
  
  
  INSERT RECORD
&lt;/h3&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;--location&lt;/span&gt; &lt;span class="nt"&gt;--request&lt;/span&gt; POST &lt;span class="s1"&gt;'https://host/DEV/aurora'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;--header&lt;/span&gt; &lt;span class="s1"&gt;'Content-Type: application/json'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;--data-raw&lt;/span&gt; &lt;span class="s1"&gt;' {
    "sql":
      "INSERT INTO patient (firstName,lastName,ssn,bed,age,sex,status,createdDate,updatedDate,admissionDate,exitDate) values (:firstName,:lastName,:ssn,:bed,:age,:sex,:status,:createdDate,:updatedDate,:admissionDate,:exitDate)",
    "parameters": [
      { "name": "firstName", "value": { "stringValue": "juan" } },
      { "name": "lastName", "value": { "stringValue": "perez" } },
      { "name": "ssn", "value": { "stringValue": "123456789" } },
      { "name": "bed", "value": { "stringValue": "abc12" } },
      { "name": "age", "value": { "longValue": 1 } },
      { "name": "sex", "value": { "longValue": 1 } },
      { "name": "status", "value": { "longValue": 1 } },
      { "name": "createdDate", "value": { "stringValue": "2020-04-29" } },
      { "name": "updatedDate", "value": { "stringValue": "2020-04-29" } },
      { "name": "admissionDate", "value": { "stringValue": "2020-04-29" } },
      { "name": "exitDate", "value": { "stringValue": "2020-04-29" } }
    ]
}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  SELECT RECORDS
&lt;/h3&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;--location&lt;/span&gt; &lt;span class="nt"&gt;--request&lt;/span&gt; POST &lt;span class="s1"&gt;'https://host/DEV/aurora'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;--header&lt;/span&gt; &lt;span class="s1"&gt;'Content-Type: application/json'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;--data-raw&lt;/span&gt; &lt;span class="s1"&gt;' {
    "sql": "SELECT * FROM patient LIMIT 1",
    "parameters": []
}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  UPDATE RECORD
&lt;/h3&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;--location&lt;/span&gt; &lt;span class="nt"&gt;--request&lt;/span&gt; POST &lt;span class="s1"&gt;'https://host/DEV/aurora'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;--header&lt;/span&gt; &lt;span class="s1"&gt;'Content-Type: application/json'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;--data-raw&lt;/span&gt; &lt;span class="s1"&gt;' {
    "sql": "UPDATE patient SET firstName=:firstName,lastName=:lastName,ssn=:ssn,bed=:bed,age=:age,sex=:sex,status=:status,updatedDate=:updatedDate WHERE patientId = :patientId",
    "parameters": [
        { "name": "patientId", "value": { "longValue": 1 } },
      { "name": "firstName", "value": { "stringValue": "Juan" } },
      { "name": "lastName", "value": { "stringValue": "Perez" } },
      { "name": "ssn", "value": { "stringValue": "987654321" } },
      { "name": "bed", "value": { "stringValue": "abc12" } },
      { "name": "age", "value": { "longValue": 30 } },
      { "name": "sex", "value": { "longValue": 1 } },
      { "name": "status", "value": { "longValue": 20 } },
      { "name": "updatedDate", "value": { "stringValue": "2020-04-30" } }
    ]
}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  Send Notifications
&lt;/h3&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;--location&lt;/span&gt; &lt;span class="nt"&gt;--request&lt;/span&gt; POST &lt;span class="s1"&gt;'https://w1dms5jz5f.execute-api.us-west-2.amazonaws.com/DEV/twilio'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;--header&lt;/span&gt; &lt;span class="s1"&gt;'Content-Type: application/json'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;--data-raw&lt;/span&gt; &lt;span class="s1"&gt;'{"familyMembers":[{"famillyId":4,"firstName":"Marco","lastName":"Martinez","relationship":1,"email":"markwinap@gmail.com","mobile":"","createdDate":"2020-05-01","updatedDate":"2020-05-01","patientId":4},{"famillyId":5,"firstName":"oswaldo","lastName":"Martinnez","relationship":1,"email":"","mobile":"","createdDate":"2020-05-01","updatedDate":"2020-05-01","patientId":4},{"famillyId":6,"firstName":"Simple","lastName":"test","relationship":3,"email":"test@test.com","mobile":"+524494382517","createdDate":"2020-05-01","updatedDate":"2020-05-01","patientId":4}],"selectedPatient":{"patientId":4,"firstName":"Chucho","lastName":"Gonzalez","name":"Chucho Gonzalez","ssn":"4561","bed":"TTT3","age":20,"sex":0,"status":1,"createdDate":"2020-04-29","updatedDate":"2020-04-30","admissionDate":"2020-04-29","exitDate":"2020-04-29"},"note":"Patient is feeling a lot better"}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  Cognito
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Identity Pool
&lt;/h3&gt;

&lt;p&gt;Id:&lt;br&gt;
us-west-2:a2eb48fc-6f49-49a1-b111-fd3482f80043&lt;br&gt;
ARN&lt;br&gt;
arn:aws:cognito-identity:us-west-2:843132870052:identitypool/us-west-2:a2eb48fc-6f49-49a1-b111-fd3482f80043&lt;/p&gt;

&lt;h3&gt;
  
  
  User Pool
&lt;/h3&gt;

&lt;p&gt;Id:&lt;br&gt;
us-west-2_suNGk8GOZ&lt;br&gt;
ARN:&lt;br&gt;
arn:aws:cognito-idp:us-west-2:843132870052:userpool/us-west-2_suNGk8GOZ&lt;/p&gt;

&lt;p&gt;App Clients&lt;br&gt;
WebClient&lt;br&gt;
App Id:&lt;br&gt;
5u2cgop5aghadug1do59rp8s5o&lt;br&gt;
AppClient&lt;br&gt;
App Id:&lt;br&gt;
7pqjad5dlqbiqnfp7aqqdluork&lt;/p&gt;

</description>
      <category>twiliohackathon</category>
      <category>mexico</category>
    </item>
    <item>
      <title>Finally touching back-end stuff</title>
      <dc:creator>Marco David Martinez</dc:creator>
      <pubDate>Wed, 29 Apr 2020 15:15:35 +0000</pubDate>
      <link>https://forem.com/markwinap/finally-touching-back-end-stuff-2l98</link>
      <guid>https://forem.com/markwinap/finally-touching-back-end-stuff-2l98</guid>
      <description>&lt;p&gt;Yesterday night finally crossed the line of having a nice portal (zombie mode) and a portal pushing and pulling data from the cloud. On my first post i described the overall picture of my project and based on that, i decided to host my back-end on AWS.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nWQKycmw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ubjllvnvry0k4osn2cdn.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nWQKycmw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ubjllvnvry0k4osn2cdn.PNG" alt="MyBackend"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Basic stuff. API Gateway for my rest endpoints, lambdas for my server-less Node.js functions and RDS the relational database using Aurora server-less. I chose a relational DB instead of non-relational (DynamoDB) primarily for others to host their DB using other services and secondly for relating patient tables with family members.&lt;/p&gt;

&lt;p&gt;Also I finally updated my README file :P&lt;/p&gt;

&lt;h1&gt;
  
  
  Twilio-Hackathon-COVID-19-Communications
&lt;/h1&gt;

&lt;h2&gt;
  
  
  LAMBDA
&lt;/h2&gt;

&lt;p&gt;covid19-rds-service&lt;/p&gt;

&lt;h2&gt;
  
  
  RDS
&lt;/h2&gt;

&lt;p&gt;NAME: covid19&lt;br&gt;
Engine: Aurora (MySQL) Serverless&lt;/p&gt;

&lt;h3&gt;
  
  
  Patient TABLE SCHEDMA
&lt;/h3&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;patient&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="n"&gt;patientId&lt;/span&gt; &lt;span class="nb"&gt;INT&lt;/span&gt; &lt;span class="n"&gt;AUTO_INCREMENT&lt;/span&gt; &lt;span class="k"&gt;PRIMARY&lt;/span&gt; &lt;span class="k"&gt;KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;firstName&lt;/span&gt; &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;DEFAULT&lt;/span&gt; &lt;span class="s1"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;lastName&lt;/span&gt; &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;DEFAULT&lt;/span&gt; &lt;span class="s1"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;ssn&lt;/span&gt; &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;DEFAULT&lt;/span&gt; &lt;span class="s1"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;bed&lt;/span&gt; &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;DEFAULT&lt;/span&gt; &lt;span class="s1"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;age&lt;/span&gt; &lt;span class="nb"&gt;TINYINT&lt;/span&gt; &lt;span class="k"&gt;DEFAULT&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;sex&lt;/span&gt; &lt;span class="nb"&gt;TINYINT&lt;/span&gt; &lt;span class="k"&gt;DEFAULT&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;status&lt;/span&gt; &lt;span class="nb"&gt;TINYINT&lt;/span&gt; &lt;span class="k"&gt;DEFAULT&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;createdDate&lt;/span&gt; &lt;span class="nb"&gt;DATE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;updatedDate&lt;/span&gt; &lt;span class="nb"&gt;DATE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;admissionDate&lt;/span&gt; &lt;span class="nb"&gt;DATE&lt;/span&gt; &lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;exitDate&lt;/span&gt; &lt;span class="nb"&gt;DATE&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  Patient TABLE SCHEDMA
&lt;/h3&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;familly&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="n"&gt;famillyId&lt;/span&gt; &lt;span class="nb"&gt;INT&lt;/span&gt; &lt;span class="n"&gt;AUTO_INCREMENT&lt;/span&gt; &lt;span class="k"&gt;PRIMARY&lt;/span&gt; &lt;span class="k"&gt;KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;firstName&lt;/span&gt; &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;DEFAULT&lt;/span&gt; &lt;span class="s1"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;lastName&lt;/span&gt; &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="k"&gt;DEFAULT&lt;/span&gt; &lt;span class="s1"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;relationship&lt;/span&gt; &lt;span class="nb"&gt;TINYINT&lt;/span&gt;  &lt;span class="k"&gt;DEFAULT&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;email&lt;/span&gt; &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;40&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="n"&gt;mobile&lt;/span&gt; &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;40&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="n"&gt;createdDate&lt;/span&gt; &lt;span class="nb"&gt;DATE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;updatedDate&lt;/span&gt; &lt;span class="nb"&gt;DATE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;patientId&lt;/span&gt; &lt;span class="nb"&gt;INT&lt;/span&gt; &lt;span class="k"&gt;DEFAULT&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  PatientNotes TABLE SCHEDMA
&lt;/h3&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;notes&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="n"&gt;noteId&lt;/span&gt; &lt;span class="nb"&gt;INT&lt;/span&gt; &lt;span class="n"&gt;AUTO_INCREMENT&lt;/span&gt; &lt;span class="k"&gt;PRIMARY&lt;/span&gt; &lt;span class="k"&gt;KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;createdDate&lt;/span&gt; &lt;span class="nb"&gt;DATE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;updatedDate&lt;/span&gt; &lt;span class="nb"&gt;DATE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;patientId&lt;/span&gt; &lt;span class="nb"&gt;INT&lt;/span&gt; &lt;span class="k"&gt;DEFAULT&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="nb"&gt;TINYINT&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;DEFAULT&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;note&lt;/span&gt; &lt;span class="nb"&gt;TEXT&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  API GATEWAY
&lt;/h2&gt;

&lt;h3&gt;
  
  
  INSERT RECORD
&lt;/h3&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;--location&lt;/span&gt; &lt;span class="nt"&gt;--request&lt;/span&gt; POST &lt;span class="s1"&gt;'https://host.com/DEV/aurora'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;--header&lt;/span&gt; &lt;span class="s1"&gt;'Content-Type: application/json'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;--data-raw&lt;/span&gt; &lt;span class="s1"&gt;' {
    "sql":
      "INSERT INTO patient (firstName,lastName,ssn,bed,age,sex,status,createdDate,updatedDate,admissionDate,exitDate) values (:firstName,:lastName,:ssn,:bed,:age,:sex,:status,:createdDate,:updatedDate,:admissionDate,:exitDate)",
    "parameters": [
      { "name": "firstName", "value": { "stringValue": "juan" } },
      { "name": "lastName", "value": { "stringValue": "perez" } },
      { "name": "ssn", "value": { "stringValue": "123456789" } },
      { "name": "bed", "value": { "stringValue": "abc12" } },
      { "name": "age", "value": { "longValue": 1 } },
      { "name": "sex", "value": { "longValue": 1 } },
      { "name": "status", "value": { "longValue": 1 } },
      { "name": "createdDate", "value": { "stringValue": "2020-04-29" } },
      { "name": "updatedDate", "value": { "stringValue": "2020-04-29" } },
      { "name": "admissionDate", "value": { "stringValue": "2020-04-29" } },
      { "name": "exitDate", "value": { "stringValue": "2020-04-29" } }
    ]
}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  SELECT RECORDS
&lt;/h3&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;--location&lt;/span&gt; &lt;span class="nt"&gt;--request&lt;/span&gt; POST &lt;span class="s1"&gt;'https://host/DEV/aurora'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;--header&lt;/span&gt; &lt;span class="s1"&gt;'Content-Type: application/json'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;--data-raw&lt;/span&gt; &lt;span class="s1"&gt;' {
    "sql": "SELECT * FROM patient LIMIT 1",
    "parameters": []
}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  UPDATE RECORD
&lt;/h3&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;--location&lt;/span&gt; &lt;span class="nt"&gt;--request&lt;/span&gt; POST &lt;span class="s1"&gt;'https://host/DEV/aurora'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;--header&lt;/span&gt; &lt;span class="s1"&gt;'Content-Type: application/json'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;--data-raw&lt;/span&gt; &lt;span class="s1"&gt;' {
    "sql": "UPDATE patient SET firstName=:firstName,lastName=:lastName,ssn=:ssn,bed=:bed,age=:age,sex=:sex,status=:status,updatedDate=:updatedDate WHERE patientId = :patientId",
    "parameters": [
        { "name": "patientId", "value": { "longValue": 1 } },
      { "name": "firstName", "value": { "stringValue": "Juan" } },
      { "name": "lastName", "value": { "stringValue": "Perez" } },
      { "name": "ssn", "value": { "stringValue": "987654321" } },
      { "name": "bed", "value": { "stringValue": "abc12" } },
      { "name": "age", "value": { "longValue": 30 } },
      { "name": "sex", "value": { "longValue": 1 } },
      { "name": "status", "value": { "longValue": 20 } },
      { "name": "updatedDate", "value": { "stringValue": "2020-04-30" } }
    ]
}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



</description>
      <category>twiliohackathon</category>
      <category>mexico</category>
    </item>
    <item>
      <title>Its always a good idea to keep your project simple and under scope.</title>
      <dc:creator>Marco David Martinez</dc:creator>
      <pubDate>Tue, 28 Apr 2020 13:18:04 +0000</pubDate>
      <link>https://forem.com/markwinap/tts-always-a-good-idea-to-keep-your-project-simple-and-under-scope-5e13</link>
      <guid>https://forem.com/markwinap/tts-always-a-good-idea-to-keep-your-project-simple-and-under-scope-5e13</guid>
      <description>&lt;p&gt;Yesterday i hit the wall at 100MPH, the wall of complexity and frustration. The worst part is that is all my fault. I more or less narrow my faults in the following points.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Started my project 2 days ago.&lt;/li&gt;
&lt;li&gt;Over scope my project (take a look at my first post detailing the project structure)&lt;/li&gt;
&lt;li&gt;Spent a ton of time creating the web portal components&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thankfully is see the light at the end of the tunnel. Today i will start working on connecting the front end and back end (DB + server-less functions + Twilio ) Tomorrow, hopefully i will have time to complete the security and connect the remaining services.&lt;/p&gt;

</description>
      <category>twiliohackathon</category>
      <category>mexico</category>
    </item>
    <item>
      <title>Portal progress, still a long way to go!</title>
      <dc:creator>Marco David Martinez</dc:creator>
      <pubDate>Sun, 26 Apr 2020 23:21:24 +0000</pubDate>
      <link>https://forem.com/markwinap/portal-progress-still-a-long-way-to-go-12fa</link>
      <guid>https://forem.com/markwinap/portal-progress-still-a-long-way-to-go-12fa</guid>
      <description>&lt;p&gt;Today i was able to make good progress on the portal side. I created a portal for adding COVID-19 patients, family members and the skeleton for my patient search.&lt;/p&gt;

&lt;p&gt;The stress is killing me and i need time off from this project. But tomorrow i will resume my activities and hopefully start working on the back-end,&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--82GxHsi4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/3pfs2m81waf18o8wy079.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--82GxHsi4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/3pfs2m81waf18o8wy079.PNG" alt="Portal"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZZHr-DYF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/mjq8lka5vhk8013ww5n0.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZZHr-DYF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/mjq8lka5vhk8013ww5n0.PNG" alt="Portal"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pxr6hzZY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/a1on0djjuaty48u8h72f.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pxr6hzZY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/a1on0djjuaty48u8h72f.PNG" alt="Portal"&gt;&lt;/a&gt;&lt;br&gt;
Repo&lt;br&gt;
&lt;a href="https://github.com/markwinap/Twilio-Hackathon-COVID-19-Communications"&gt;https://github.com/markwinap/Twilio-Hackathon-COVID-19-Communications&lt;/a&gt;&lt;/p&gt;

</description>
      <category>twiliohackathon</category>
      <category>mexico</category>
    </item>
    <item>
      <title>My Hackathon Project - Better Late Than Never</title>
      <dc:creator>Marco David Martinez</dc:creator>
      <pubDate>Sun, 26 Apr 2020 01:41:52 +0000</pubDate>
      <link>https://forem.com/markwinap/my-hackathon-project-better-late-than-never-39fn</link>
      <guid>https://forem.com/markwinap/my-hackathon-project-better-late-than-never-39fn</guid>
      <description>&lt;p&gt;I fins interesting that now that we are forced to stay at home (global pandemic) it is extremely hard to find time and to get things done. But i now added a tone of post-its to my computer to slap my face (stay focus) and get things done. I only have at the most 15 hours to complete this project (full time job + sleep + eat + home tasks) &lt;/p&gt;

&lt;p&gt;You can find attached my project in a simple diagram with a simple overview of the user flow, the data to capture and the services i want to use.&lt;/p&gt;

&lt;p&gt;So guys wish me luck.&lt;/p&gt;

</description>
      <category>twiliohackathon</category>
      <category>mexico</category>
    </item>
  </channel>
</rss>
