DoseSpot: The Innovative E-Prescribing Solution for Healthcare Providers

Have you ever heard about E-Prescription?? No. Then you are on the right page to know about it.

E-Prescription is where you get a medical prescription right on your device just by online consulting with the doctor. Isn’t that much easier ? But for that, we will introduce you to the platforms working for these kinds of services. 

E-Prescribing Software sSolutions

  2. Rcopia
  3. Surescripts E-Prescribing
  4. DoseSpot

And one of them which we worked on is the DoseSpot platform

What is DoseSpot?

DoseSpot is an integration that allows e-Prescribing services. DoseSpot is a platform for medical healthcare services or in-practice management and is designed affordably for IT HealthCare industries. Through this, we can send the prescription to the patient.

Features of DoseSpot

  • UI is easy to use
  • Prescribe medication electronically
  • Preview saved medication history
  • Notifications for prescription Status

How DoseSpot Work?

The below image is just a brief idea about how DoseSpot works.Dosespot

  • Embedded DoseSpot within DoseSpot app
  • This is an IFrame/Web control
  • Get into DoseSpot Login Page
  • Fetch the Patient List
  • Patient Details
  • Coverage Details
  • Add prescription
  • Medication History
  • Add prescription for the patient–approve send and patient receives the prescription

DoseSpot Implementation on Patient Side(Android)

As we had a brief introduction about DoseSpot, let’s check the implementation on the patient side. This guide is intended for developers as a detailed reference for the behavior of the RESTful APIs provided by the DoseSpot App. The purpose and usage of each operation, request and response details, and examples can be found in this document.

To implement DoseSpot on the patient side we need to create the profile while using DoseSpot Apis.

In order to grant access from your DoseSpot Staging environment to the RESTful API. This is enabled at the clinic level, so if you need to use multiple Staging clinics be sure to make that clear to your Integration Specialist. 

After we create an account on DoseSpot through the admin console they provide us the clinic Id.

Under clinic Id, we need to create a clinician to get the clinician Id. Once we get the clinic Id from the console they provide us with the patient Id.


For Create Patient – 12XXXX

For Physician – 13XXXX

Clinic_id – 11XXX

Clinical Key :- xxxxxxxxxxxxxxxxxxxxx

To create a patient on an android platform we use the APIs provided by the DoseSpot.

The endpoints shown for each operation in this guide should be appended to the base URL.

Note: The production base URL is different and will be provided after passing the Surescripts certification in the staging environment.


Every RESTful API request in DoseSpot needs to be authenticated.  To authenticate, you must create an access token using Basic Authentication. Before creating an access token, the following parameters are required

  • ClinicId
  • ClinicKey
  • UserId
  • Encrypted ClinicId
  • Encrypted UserId

To create  Encrypted ClinicId, and Encrypted UserId DoseSpot provide the required format accordingly. After we create this ids we can access the DoseSpot token

Creating an Access Token Perform an HTTP POST 

To create the token a BasicAuth header must be used in this request. Username must be set to ClinicId and Password to Encrypted ClinicId.

The body of this request must use the x-www-form-urlencoded content type and the following key-value pairs: Key Value grant_type password Username UserId Password Encrypted UserId Note: Use the exact string “password” without quotation marks.

Each time a token is needed, new Encrypted ClinicId and Encrypted UserId values must be generated. In the Staging environment, tokens are currently set to expire after 10 minutes.

Using retrofit we can have an example of the access token :

var okHttpClient = OkHttpClient().newBuilder().addInterceptor(object : Interceptor {


   override fun intercept(chain: Interceptor.Chain): Response {

       val originalRequest: Request = chain.request()

       val builder: Request.Builder = originalRequest.newBuilder().header(





       val newRequest: Request =

       return chain.proceed(newRequest)


}).addInterceptor(HttpLoggingInterceptor().apply {

   level =

       if (BuildConfig.DEBUG) HttpLoggingInterceptor.Level.BODY else HttpLoggingInterceptor.Level.NONE


val gson = GsonBuilder()



private val retrofit = Retrofit.Builder()





fun create(service: Class<T>): T {

   return retrofit.create(service)




fun getDoseSpotToken(

   @Field("grant_type") grant_type: String?,

   @Field("Username") Username: Int?,

   @Field("Password") title: String?

): Call<DoseSpotTokenResponseModel>?

val call = BasicAuthClient<RepositoryInterface>().create(






call?.enqueue(object : Callback<DoseSpotTokenResponseModel> {

   override fun onFailure(call: Call<DoseSpotTokenResponseModel>, t: Throwable) {


       log.v(tags, toString())


   override fun onResponse(

       call: Call<DoseSpotTokenResponseModel>,

       response: Response<DoseSpotTokenResponseModel>

   ) {

       if (response.isSuccessful) {

           response.body()?.let {

            val DOSE_SPOT_ACCESS_TOKENit.access_token



       } else {

            log.v(tags, "else-${response.errorBody().toString()}")




From the above part we can now use DoseSpot access token for other apis of DoseSpot

Create Profile of Patient 

Now to create a patient profile on DoseSpot we need to follow the instruction given by DoseSpot for the apis

private val client = OkHttpClient.Builder().addInterceptor(HttpLoggingInterceptor().apply {

   level =

       if (BuildConfig.DEBUG) HttpLoggingInterceptor.Level.BODY else HttpLoggingInterceptor.Level.NONE




           "Bearer ", DOSE_SPOT_ACCESS_TOKEN        


val gson = GsonBuilder()



private val retrofit = Retrofit.Builder()





fun create(service: Class<T>): T {

   return retrofit.create(service)




fun getDoseProfileId(

   @Field("FirstName") firstName: String?,

   @Field("LastName") lastName: String?,

   @Field("DateOfBirth") dateOfBirth: String,

   @Field("Gender") gender: Int,

   @Field("Address1") address1: String?,

   @Field("City") city: String?,

   @Field("State") state: String?,

   @Field("ZipCode") zipCode: String?,

   @Field("PrimaryPhone") primaryPhone: String?,

   @Field("PrimaryPhoneType") primaryPhoneType: Int?,

   @Field("Active") active: Boolean?,

   @Field("Height") height: Int?,

   @Field("HeightMetric") heightMetric: Int?,

   @Field("Weight") weight: Int?,

   @Field("WeightMetric") weightMetric: Int?,

): Call<DoseSpotProfileIDResponseModel>?

val call = AuthClient<RepositoryInterface>().create(


















call?.enqueue(object : Callback<DoseSpotProfileIDResponseModel?> {

   override fun onResponse(

       call: Call<DoseSpotProfileIDResponseModel?>,

       response: Response<DoseSpotProfileIDResponseModel?>

   ) {


       if (response.isSuccessful) {

           logE(Tags, "dosespot id-" + response.body()?.id)

           if (response.body()?.id != -1 && response.body()?.id != null) {




       } else {

 log.v(Tags, "error" + dosespot_profile_error)




   override fun onFailure(call: Call<DoseSpotProfileIDResponseModel?>, t: Throwable) {


       log.v(Tags, "failure" + t.message)



Thus we got a successful response from dosespot to create a profile. Now physicians can send the prescription to the patient directly through a physician login portal 


In this blog, we saw what is DoseSpot, Features of DoseSpot and its Implementation. This completes the guide to the implementation of DoseSpot on the Android platform.

Keep Reading

Leave your competitors behind! Become an EPIC integration pro, and boost your team's efficiency.

Register Here
  • Service
  • Career
  • Let's create something together!

  • We’re looking for the best. Are you in?