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.
And one of them which we worked on is the DoseSpot platform
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.
The below image is just a brief idea about how DoseSpot works.
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.
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
To create Encrypted ClinicId, and Encrypted UserId DoseSpot provide the required format accordingly. After we create this ids we can access the DoseSpot token
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_TOKEN= it.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
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
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.
Free eBook On Telemedicine Platform Development
Download NowMindbowser has truly been foundational in my journey from concept to design and onto that final launch phase.
CEO, KickSnap
We had very close go live timeline and MindBowser team got us live a month before.
CEO, BuyNow WorldWide
If you want a team of great developers, I recommend them for the next project.
Founder, Teach Reach
Mindbowser built both iOS and Android apps for Mindworks, that have stood the test of time. 5 years later they still function quite beautifully. Their team always met their objectives and I'm very happy with the end result. Thank you!
Founder, Mindworks
Our CISO was extremely impressed by Mindbowser’s work. It is pretty rare to see this kind of clean security report so early in the company’s journey. Huge Thank you for the disciplined approach here.
Founder, TrestleIQ
Mindbowser has delivered a much better quality product than our previous tech vendors. Our product is stable and passed Well Architected Framework Review from AWS.
CEO, PurpleAnt
The flexibility and capacity of the Mindbower staff has been impressive.
CEO, ProofPilot
I am happy to share that we got USD 10k in cloud credits courtesy of our friends at Mindbowser. Thank you Pravin and Ayush, this means a lot to us.
CTO, Shortlist
Mindbowser is one of the reasons that our app is successful. These guys have been a great team.
Founder & CEO, MangoMirror
Kudos for all your hard work and diligence on the Telehealth platform project. You made it possible.
CEO, ThriveHealth
Mindbowser helped us build an awesome iOS app to bring balance to people’s lives.
CEO, SMILINGMIND
They were a very responsive team! Extremely easy to communicate and work with!
Founder & CEO, TotTech
We’ve had very little-to-no hiccups at all—it’s been a really pleasurable experience.
Co-Founder, TEAM8s
Mindbowser was very helpful with explaining the development process and started quickly on the project.
Executive Director of Product Development, Innovation Lab
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.
Co-Founder, Vesica
Mindbowser is professional, efficient and thorough.
Consultant, XPRIZE
Very committed, they create beautiful apps and are very benevolent. They have brilliant Ideas.
Founder, S.T.A.R.S of Wellness
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.
Co-Founder, Flat Earth
Ayush was responsive and paired me with the best team member possible, to complete my complex vision and project. Could not be happier.
Founder, Child Life On Call
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.
Founder, Courtyardly
The team from Mindbowser stayed on task, asked the right questions, and completed the required tasks in a timely fashion! Strong work team!
CEO, SDOH2Health LLC
Mindbowser was easy to work with and hit the ground running, immediately feeling like part of our team.
CEO, Stealth Startup
Mindbowser was an excellent partner in developing my fitness app. They were patient, attentive, & understood my business needs. The end product exceeded my expectations. Thrilled to share it globally.
Owner, Phalanx
Mindbowser's expertise in tech, process & mobile development made them our choice for our app. The team was dedicated to the process & delivered high-quality features on time. They also gave valuable industry advice. Highly recommend them for app development...
Co-Founder, Fox&Fork
We cannot express enough how pleased we are with the entire Mindbowser team. From our first call, they focused on our vision and ensured things were handled as per requirement. Communication was so easy and flexible to our schedule. I’m...
Founder, SafeZone Safety Systems