Skip to content

Commit

Permalink
Merge pull request #90 from RUGSoftEng/askPhysician-Roel-merge
Browse files Browse the repository at this point in the history
Now the patient can view and edit previously asked questions (also hotfix for faq calls)
  • Loading branch information
MarcoGTL authored Jun 12, 2018
2 parents c27c242 + cecdc75 commit ea8f728
Show file tree
Hide file tree
Showing 12 changed files with 496 additions and 104 deletions.
Binary file modified TuberculosisApp/.idea/caches/build_file_checksums.ser
Binary file not shown.
24 changes: 15 additions & 9 deletions TuberculosisApp/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,28 +69,34 @@
</activity>
<activity
android:name=".reminders.AlarmActivity"
android:theme="@style/Theme.AppCompat.Light.NoActionBar">
</activity>
android:theme="@style/Theme.AppCompat.Light.NoActionBar"></activity>
<activity
android:name=".achievements.ActivityAchievements"
android:parentActivityName=".MainActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".MainActivity" />
</activity>
<activity
android:name=".notes.AskPhysician"
android:parentActivityName=".MainActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".MainActivity" />
</activity>

<receiver android:name=".reminders.ReminderHandler" />

<receiver android:name=".reminders.BootCompletedReceiver"
android:exported="true"
android:enabled="true">
<receiver
android:name=".reminders.BootCompletedReceiver"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.QUICKBOOT_POWERON" />

<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</receiver>

<receiver android:name=".reminders.ReminderUpdateReceiver" />

<service
Expand All @@ -109,8 +115,8 @@
android:name=".reminders.ReminderService"
android:enabled="true"
android:exported="true"
android:permission="android.permission.BIND_JOB_SERVICE">
</service>
android:permission="android.permission.BIND_JOB_SERVICE"></service>

</application>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.DELETE;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.Headers;
Expand Down Expand Up @@ -66,9 +67,31 @@ Call<ResponseBody> askPhysician(
@Body QuestionToPhysician note
);

@GET("general/faq")
@GET("general/faqs")
Call<ArrayList<FAQEntry>> retrieveFAQ(
@Query("language") String locale
);

@GET("accounts/patients/{id}/notes")
Call<ArrayList<QuestionToPhysician>> retrieveAskedQuestions(
@Path("id") int patient_id,
@Header("access_token") String access_token
);

@DELETE("accounts/patients/{patient_id}/notes/{note_id}")
Call<ResponseBody> deleteAskedQuestion(
@Path("patient_id") int patient_id,
@Path("note_id") int note_id,
@Header("access_token") String access_token
);

@Headers("Content-Type: application/json")
@POST("accounts/patients/{patient_id}/notes/{note_id}")
Call<ResponseBody> updateAskedQuestion(
@Path("patient_id") int patient_id,
@Path("note_id") int note_id,
@Header("access_token") String access_token,
@Body QuestionToPhysician note
);

}
Loading

0 comments on commit ea8f728

Please sign in to comment.