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 solutions

  1. RXNT EHR
  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.

Example.

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.

Authentication 

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 {

   @Throws(IOException::class)

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

       val originalRequest: Request = chain.request()

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

           "Authorization",

           Credentials.basic(

              CLINIC_USER_ID_DOSESPOT,  ENCRYPTED_CLINIC_USER_ID           )

       )

       val newRequest: Request = builder.build()

       return chain.proceed(newRequest)

   }

}).addInterceptor(HttpLoggingInterceptor().apply {

   level =

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

}).build()

val gson = GsonBuilder()

   .setLenient()

   .create();

private val retrofit = Retrofit.Builder()

   .baseUrl(DOSESPOT_BASE_URL)

   .client(okHttpClient)

   .addConverterFactory(GsonConverterFactory.create(gson))

   .build()

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

   return retrofit.create(service)

}

@FormUrlEncoded

@POST("/endpoint")

fun getDoseSpotToken(

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

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

   @Field("Password") title: String?

): Call<DoseSpotTokenResponseModel>?

val call = BasicAuthClient<RepositoryInterface>().create(RepositoryInterface::class.java)

   .getDoseSpotToken(

       PASSWORD,

      PATIENT_USER_ID_DOSESPOT,

      encryptedUserId

   )

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

})

   .addInterceptor(

       OAuthInterceptor(

           "Bearer ", DOSE_SPOT_ACCESS_TOKEN        

       )).build()

val gson = GsonBuilder()

   .setLenient()

   .create()

private val retrofit = Retrofit.Builder()

   .baseUrl(DOSESPOT_BASE_URL)

   .client(client)

   .addConverterFactory(GsonConverterFactory.create(gson))

   .build()

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

   return retrofit.create(service)

}

@FormUrlEncoded

@POST("/endpoint")

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(RepositoryInterface::class.java)

   .getDoseProfileId(

      first_name,

       last_name,

       dateOfBirth.toString(),

       gender,

       address1,

       city,

       state,

       zipCode,

       primaryPhone,

       primaryPhoneType,

       true,

       height,

       1,

       weight?.toInt(),

       1

   )

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) {

                              PATIENT_DOSESPOT_ID=response.body()?.id.toString().trim()

               

                     

       } 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 
coma

Conclusion

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.

Kshitija Patil

Kshitija is an Android Developer having 3.5+ years of experience in Android Application Development and experience in providing Analysis, Design, Development, Testing, Maintenance & Enhancements. She always looks forward to learning new stuff.

Get in touch for a detailed discussion.

Hear From Our 100+ Customers
coma

Mindbowser helped us build an awesome iOS app to bring balance to people’s lives.

author
ADDIE WOOTTEN
CEO, SMILINGMIND
coma

We had very close go live timeline and MindBowser team got us live a month before.

author
Shaz Khan
CEO, BuyNow WorldWide
coma

They were a very responsive team! Extremely easy to communicate and work with!

author
Kristen M.
Founder & CEO, TotTech
coma

We’ve had very little-to-no hiccups at all—it’s been a really pleasurable experience.

author
Chacko Thomas
Co-Founder, TEAM8s
coma

Mindbowser is one of the reasons that our app is successful. These guys have been a great team.

author
Dave Dubier
Founder & CEO, MangoMirror
coma

Mindbowser was very helpful with explaining the development process and started quickly on the project.

author
Hieu Le
Executive Director of Product Development, Innovation Lab
coma

The greatest benefit we got from Mindbowser is the expertise. Their team has developed apps in all different industries with all types of social proofs.

author
Alex Gobel
Co-Founder, Vesica
coma

Mindbowser is professional, efficient and thorough. 

author
MacKenzie R
Consultant at XPRIZE
coma

Very committed, they create beautiful apps and are very benevolent. They have brilliant Ideas.

author
Laurie Mastrogiani
Founder, S.T.A.R.S of Wellness
coma

MindBowser was great; they listened to us a lot and helped us hone in on the actual idea of the app.” “They had put together fantastic wireframes for us.

author
Bennet Gillogly
Co-Founder, Flat Earth
coma

They're very tech-savvy, yet humble.

author
Uma Nidmarty
CEO, GS Advisorate, Inc.
coma

Ayush was responsive and paired me with the best team member possible, to complete my complex vision and project. Could not be happier.

author
Katie Taylor
Founder, Child Life On Call
coma

As a founder of a budding start-up, it has been a great experience working with Mindbower Inc under Ayush's leadership for our online digital platform design and development activity.

author
Radhika Kotwal
Founder of Courtyardly
coma

The team from Mindbowser stayed on task, asked the right questions, and completed the required tasks in a timely fashion! Strong work team!

author
Michael Wright
Chief Executive Officer, SDOH2Health LLC
coma

They are focused, patient and; they are innovative. Please give them a shot if you are looking for someone to partner with, you can go along with Mindbowser.

author
David Cain
CEO, thirty2give
coma

We are a small non-profit on a budget and they were able to deliver their work at our prescribed budgets. Their team always met their objectives and I'm very happy with the end result. Thank you, Mindbowser team!!

author
Bart Mendel
Founder, Mindworks
coma

Mindbowser was easy to work with and hit the ground running, immediately feeling like part of our team.

author
George Hodulik
CEO, Stealth Startup, Ex-Google