Health Quiz
Building a full stack health quiz app with just 4 Function calls, using eka-care’s web SDK
What are we building
An AI based health quiz app, which can be built with just 4 fns
. where the UI is all yours and on the backend side all it takes is just 4 functions i.e,
- to start the quiz,
- generate relevant questions,
- submitting the quiz result
- generating the likelihood of developing the disease
in this app we will be using @eka-care/eka-care-core
from NPM and Next.js to make a clean health assessment app with the SDK.
final product
choosing the disease
answering questions
quiz result
Create a Next.js App
Install the Eka Care SDK
Understanding SDK Initialization
The SDK can be initialized on both FE and BE. But for this app we will be initializing the SDK on FE read more about initializing the SDK here
Setting Up Backend Auth.
If you decide to use this on a client side app, head to this repo and you will have a deployed running backend in 1 click, check the readme.md
Now Let’s Build a Clean Health Assessment UI
Time to create our main assessment component! and Leverage eka-care’s SDK
Replace pages/index.js
with:
What We Just Built
Congratulations! You’ve just created a complete health assessment application using the Eka Care SDK. Where most LOC was just React and UI part while the whole logic of auth, refresh, starting, continuing and submitting got abstracted in just 4 fns
that we called with a simple async await. Here’s what our app includes:
Key SDK Methods Demonstrated
- Initialize SDK - Create SDK instance with frontend configuration
- Init Assessment - Start a new health assessment workflow
- Start Assessment - Begin the assessment and get first questions
- Continue Assessment - Submit responses and get next questions
- Submit Assessment - Complete the assessment and get results
Next Steps
From here, you could extend this app by:
- Integrating with the appointments module to book consultations
- Adding medication search functionality
- Building a patient management dashboard
The Eka Care SDK makes it incredibly easy to build comprehensive healthcare applications - this app just scratches the surface of what’s possible!
Live app and Github repo