<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Warren Mulubi's Tech blogs]]></title><description><![CDATA[Just a young guy with love for tech.]]></description><link>https://mulubi.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Sun, 06 Sep 2026 10:37:41 GMT</lastBuildDate><atom:link href="https://mulubi.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Building the Hospital Phone Calling Bot: A Technical Deep Dive]]></title><description><![CDATA[Introduction
In today's rapidly evolving healthcare landscape, technology is reshaping patient care and communication. One such innovation is the Hospital Phone Calling Bot, a project designed to streamline healthcare processes and enhance patient en...]]></description><link>https://mulubi.hashnode.dev/building-the-hospital-phone-calling-bot-a-technical-deep-dive</link><guid isPermaLink="true">https://mulubi.hashnode.dev/building-the-hospital-phone-calling-bot-a-technical-deep-dive</guid><category><![CDATA[Flask Framework]]></category><category><![CDATA[SQL]]></category><category><![CDATA[bots]]></category><category><![CDATA[Python]]></category><dc:creator><![CDATA[Warren Wice]]></dc:creator><pubDate>Fri, 22 Sep 2023 09:00:29 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1695372246523/ab46fd1d-47e8-4883-af12-6e2be2e55ca3.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h3 id="heading-introduction"><strong>Introduction</strong></h3>
<p>In today's rapidly evolving healthcare landscape, technology is reshaping patient care and communication. One such innovation is the Hospital Phone Calling Bot, a project designed to streamline healthcare processes and enhance patient engagement. In this technical deep dive, we'll explore the inner workings of this bot, backed by Flask, Twilio, and SQL databases. Along the way, we'll delve into code snippets and explanations to unravel the magic behind this transformative healthcare solution.</p>
<h3 id="heading-setting-the-foundation-flask-and-twilio-integration"><strong>Setting the Foundation: Flask and Twilio Integration</strong></h3>
<p>To build our Hospital Phone Calling Bot, we leverage Flask, a Python web framework, and Twilio, a cloud communications platform. Flask provides the foundation for our server, allowing us to handle incoming calls and SMS messages seamlessly. Twilio acts as the bridge between our application and the telephone network, enabling automated phone call interactions.</p>
<pre><code class="lang-python"><span class="hljs-comment"># Flask and Twilio Integration</span>
<span class="hljs-keyword">from</span> flask <span class="hljs-keyword">import</span> Flask, request, jsonify
<span class="hljs-keyword">from</span> twilio.twiml.voice_response <span class="hljs-keyword">import</span> VoiceResponse
<span class="hljs-keyword">from</span> twilio.twiml.messaging_response <span class="hljs-keyword">import</span> MessagingResponse

app = Flask(__name__)

<span class="hljs-comment"># Twilio authentication credentials</span>
twilio_account_sid = <span class="hljs-string">'your_account_sid'</span>
twilio_auth_token = <span class="hljs-string">'your_auth_token'</span>
</code></pre>
<h3 id="heading-collecting-user-input-the-ltgathergt-verb"><strong>Collecting User Input: The &lt;Gather&gt; Verb</strong></h3>
<p>User interaction is at the heart of our Hospital Phone Calling Bot. We utilize the Twilio verb to collect user input during phone calls. For example, when patients receive a call, they can confirm appointments or update medication records by simply pressing a key.</p>
<pre><code class="lang-python"><span class="hljs-comment"># Collecting User Input with &lt;Gather&gt;</span>
<span class="hljs-keyword">with</span> response.gather(numDigits=<span class="hljs-number">1</span>, action=<span class="hljs-string">'/handle-user-input'</span>, method=<span class="hljs-string">'POST'</span>) <span class="hljs-keyword">as</span> gather:
    gather.say(<span class="hljs-string">'Welcome to the Hospital Phone Bot. Press 1 to confirm your appointment or 2 to update it.'</span>)
</code></pre>
<h3 id="heading-processing-user-input-handling-callbacks"><strong>Processing User Input: Handling Callbacks</strong></h3>
<p>Once the user provides input, our Flask application processes it through callback routes. For instance, when a patient presses '1' to confirm an appointment, the /handle-user-input route handles the request and responds accordingly.</p>
<pre><code class="lang-python"><span class="hljs-comment"># Handling User Input Callback</span>
<span class="hljs-meta">@app.route('/handle-user-input', methods=['POST'])</span>
<span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">handle_user_input</span>():</span>
    user_choice = request.form[<span class="hljs-string">'Digits'</span>]
    <span class="hljs-comment"># Process user choice and provide appropriate responses</span>
    <span class="hljs-keyword">if</span> user_choice == <span class="hljs-string">'1'</span>:
        response = <span class="hljs-string">'Appointment confirmed. Thank you!'</span>
    <span class="hljs-keyword">elif</span> user_choice == <span class="hljs-string">'2'</span>:
        response = <span class="hljs-string">'Updating appointment. Please provide details.'</span>
    <span class="hljs-keyword">else</span>:
        response = <span class="hljs-string">'Invalid choice. Please try again.'</span>
    <span class="hljs-keyword">return</span> str(VoiceResponse().say(response))
</code></pre>
<h3 id="heading-database-integration-storing-time-punches">Database Integration: Storing Time Punches</h3>
<p>Our Hospital Phone Calling Bot goes beyond interactions; it records time punches for efficient healthcare management. We use SQLAlchemy to interface with an SQL database, allowing us to store and retrieve time punch data seamlessly.</p>
<pre><code class="lang-python"><span class="hljs-comment"># Time Punch Model with SQLAlchemy</span>
<span class="hljs-keyword">from</span> datetime <span class="hljs-keyword">import</span> datetime
<span class="hljs-keyword">from</span> flask_sqlalchemy <span class="hljs-keyword">import</span> SQLAlchemy

db = SQLAlchemy()

<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">TimePunch</span>(<span class="hljs-params">db.Model</span>):</span>
    id = db.Column(db.Integer, primary_key=<span class="hljs-literal">True</span>)
    user_id = db.Column(db.Integer, db.ForeignKey(<span class="hljs-string">'user.id'</span>), nullable=<span class="hljs-literal">False</span>)
    punch_time = db.Column(db.DateTime, default=datetime.utcnow, nullable=<span class="hljs-literal">False</span>)
    <span class="hljs-comment"># Additional fields as needed</span>
</code></pre>
<h3 id="heading-conclusion"><strong>Conclusion:</strong></h3>
<p>The Hospital Phone Calling Bot project demonstrates the power of technology in healthcare transformation. With Flask, Twilio, and SQL databases at its core, it streamlines patient interactions, records time punches, and promises to reshape the future of healthcare communication. As I embark on this journey, remember that the code behind this project is a work in progress. In the spirit of collaboration, I look forward to potentially open-sourcing this initiative, inviting developers from around the world to join me in redefining the healthcare experience.</p>
<p><em>Stay tuned for more technical insights and future developments. Together, we'll continue to innovate and improve patient care.</em></p>
]]></content:encoded></item><item><title><![CDATA[Unveiling Faster Internet Speeds: A Deep Dive into Network Optimization]]></title><description><![CDATA[Hello, Hashnode community!
I'm thrilled to share an exciting journey that recently took me on a voyage through the intricacies of network optimization, specifically geared toward supercharging internet speeds. In a world where seamless connectivity i...]]></description><link>https://mulubi.hashnode.dev/unveiling-faster-internet-speeds-a-deep-dive-into-network-optimization</link><guid isPermaLink="true">https://mulubi.hashnode.dev/unveiling-faster-internet-speeds-a-deep-dive-into-network-optimization</guid><category><![CDATA[networking]]></category><category><![CDATA[infrastructure]]></category><category><![CDATA[Fortigate]]></category><category><![CDATA[firewall]]></category><dc:creator><![CDATA[Warren Wice]]></dc:creator><pubDate>Wed, 23 Aug 2023 09:34:42 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1692782620246/7fc74e24-2a1c-431d-ba04-6becf7cefde6.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<hr />
<p><em>Hello, Hashnode community!</em></p>
<p>I'm thrilled to share an exciting journey that recently took me on a voyage through the intricacies of network optimization, specifically geared toward supercharging internet speeds. In a world where seamless connectivity is the backbone of productivity, exploring the potential of our subscribed bandwidth is an exhilarating quest. Join me as I unravel the experiment and its intriguing revelations.</p>
<p><strong>The Study: Enhancing Internet Speeds through Load Balancing Configuration in Fortigate Firewall: A Case Study</strong></p>
<p>In a recent scientific endeavor, I delved deep into harnessing the latent capabilities of the Fortigate firewall to optimize internet speeds. The challenge was straightforward yet significant: my internet speeds were underperforming despite subscribing to a 20mbps bandwidth from the primary provider and 1mbps from the secondary provider.</p>
<p><strong>The Experiment: Navigating the Technical Terrain</strong></p>
<p>Central to the experiment was the manipulation of load-balancing parameters within the Fortigate firewall's SD-WAN rules. The goal was evident: shift the balance in favor of the primary service provider while maintaining a secondary failover. By carefully tuning session weights, ingress spillover thresholds, and volume weights, I sought to tap into the untapped potential of the network.</p>
<p><strong>The Outcomes: A Glance at Transformation</strong></p>
<p>The results were astounding. By recalibrating the load balance towards the primary provider, download speeds experienced a significant leap. What began as a modest 10.09mbps surged to an impressive 17.81mbps through a series of tests. This stark improvement underscores the potency of strategic load-balancing configurations.</p>
<p><strong>The Insights: Lessons for Future Endeavors</strong></p>
<p>This immersive journey yielded invaluable insights:</p>
<ul>
<li><p><strong>Progressive Refinements:</strong> Making gradual adjustments to load balancing parameters provides a nuanced understanding of their impact.</p>
</li>
<li><p><strong>Deciphering Upload Speeds:</strong> While download speeds flourished, upload speeds demonstrated a range of behaviors, reminding us of the multifaceted nature of network performance.</p>
</li>
<li><p><strong>Continuous Monitoring:</strong> Regularly assessing network performance empowers us to adapt configurations in real time to evolving conditions.</p>
</li>
</ul>
<p><strong>The Path Forward: Cultivating Seeds of Progress</strong></p>
<p>This experiment serves as a launching pad for further exploration. The conclusions drawn and recommendations offered form the bedrock for future research and practical implementations in similar networking landscapes.</p>
<p><em>For an in-depth dive into the technicalities and outcomes, I invite you to explore the full paper</em> <a target="_blank" href="https://drive.google.com/file/d/1rswKFKB2iddKpC0nfdsGyQpsyyzW5Del/view?usp=sharing"><strong>here.</strong></a></p>
<p>As we navigate the ever-evolving technology landscape, let's channel its potential to foster superior connectivity, productivity, and innovation. Feel free to engage, share your thoughts, and explore the full paper. Your insights are incredibly valuable.</p>
<p><em>Stay connected, stay curious!</em></p>
<p>Yours truly,</p>
<p>Warren Mulubi</p>
<hr />
]]></content:encoded></item></channel></rss>