Patient Encounter Notification Application
This is outdated tutorial. We do not support Clojure SDK anymore.
In this tutorial, we will create a simple application written on Clojure programming language using Aidbox Clojure SDK and Aidbox.cloud or Aidboxone as a backend.
All source code available on Github Aidbox/app-mailgun-clj
Problem statement
We have a Encounter included Patient, date and location of visit.
We want to send an Email to a patient with a notification of the upcoming visit. In this email we want to show the Patient information, time and location of the visit. These notifications should be sent the day before the visit.
Architecture
Aidbox as backend which will store all Encounters. .....
Clojure application with Aidbox Clojure SDK as a connector between our application and backend.
For sending Emails we will use MailGun service as the easiest way to send emails instead SMPT.

Get started
Firstly, you need to install local Aidbox. See the full instruction on how to install Aidbox locally and how to use Rest API
In this sample application, we use Clojure CLI. See Getting Started for details on how to install the tools.
Enable Aidbox SDK
In this sample app we will use Clojure Cli - command line tools for running REPL and Clojure apps. In deps.end file need specify aidbox-sdk as a reference to git.
And then require aidbox-sdk in the main mailgun.core file
Connect your app with Aidbox
For connecting your application with Aidbox, you need call aidbox/call method send them information about the location of Aidbox and your application.
How it works?
When you call aidbox/start method, aidbox-sdk try to connect to Aidbox with given env.box.host , env.app.id and env.app.secret credentials and then, if the connection is successful, register your app in Aidbox. After that, aidbox/sdk create local web server running on env.app.port port, in our case is 8989.
Aidbox Jobs
Last updated: