Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ dependencies {
implementation 'androidx.compose.material3:material3'
implementation platform('androidx.compose:compose-bom:2024.08.00')
implementation platform('androidx.compose:compose-bom:2024.08.00')
implementation 'androidx.activity:activity:1.8.0'


testImplementation 'junit:junit:4.13.2'
Expand Down
47 changes: 18 additions & 29 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,15 @@
<uses-feature
android:name="android.hardware.camera"
android:required="false" />
<uses-permission android:name="android.permission.INTERNET" />
<!-- For reading images -->
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />

<!-- For reading videos -->
<uses-permission android:name="android.permission.INTERNET" /> <!-- For reading images -->
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" /> <!-- For reading videos -->
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
<uses-permission android:name="android.permission.CAMERA" />


<!-- For reading audio -->
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />

<!-- Add WRITE permissions only if necessary -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="28" />
<!-- Add the permission here -->
<uses-permission android:name="android.permission.CAMERA" /> <!-- For reading audio -->
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" /> <!-- Add WRITE permissions only if necessary -->
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="28" /> <!-- Add the permission here -->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />

Expand All @@ -34,9 +28,12 @@
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:usesCleartextTraffic="true"
tools:ignore="ExtraText"
tools:replace="android:allowBackup,android:label"
tools:targetApi="31"
tools:ignore="ExtraText">
tools:targetApi="31">
<activity
android:name=".view.general.PrescriptionActivity"
android:exported="false" />
<activity
android:name=".WelcomeActivity"
android:exported="false" />
Expand All @@ -45,7 +42,7 @@
android:exported="false" />
<activity
android:name=".Training2"
android:exported="false"></activity>
android:exported="false" />
<activity
android:name=".Training"
android:exported="false" />
Expand Down Expand Up @@ -161,7 +158,8 @@
<activity
android:name=".view.general.LoginActivity"
android:exported="false" />
<activity android:name=".view.general.PinCodeActivity"
<activity
android:name=".view.general.PinCodeActivity"
android:exported="false" />
<activity
android:name=".view.general.AddNewPatientActivity"
Expand All @@ -187,35 +185,26 @@
<activity
android:name=".view.general.TasksListActivity"
android:exported="false" />

<activity android:name=".ModulesActivity" />


<activity android:name=".Module1CoursesActivity" />
<activity android:name=".HomecareInductionActivity" />
<activity android:name=".InfectionControlActivity" />
<activity android:name=".SupportingMealtimesActivity" />


<activity android:name=".Module2CoursesActivity" />
<activity android:name=".MedicationTechniqueActivity" />
<activity android:name=".MedicationSafetyActivity" />


<activity android:name=".Module3CoursesActivity" />
<activity android:name=".InspiringLeadershipEIActivity" />
<activity android:name=".EmotionalIntelligenceCommunicationActivity" />
<activity android:name="deakin.gopher.guardian.view.general.NurseRosterActivity" />
<activity android:name=".view.general.NurseRosterActivity" />
<activity android:name=".view.falldetection.FallDetectionActivity" />
<activity android:name=".view.falldetection.FallAlertActivity" />
<activity android:name="deakin.gopher.guardian.view.caretaker.notifications.confirmincident.CallAmbulanceActivity" />

<activity android:name=".view.caretaker.notifications.confirmincident.CallAmbulanceActivity" />
<activity
android:name=".PatientExerciseModules"
android:exported="false"
android:label="Patient Exercise Modules" />


<service
android:name=".model.FirebaseMessagingService"
android:exported="false">
Expand All @@ -228,7 +217,7 @@
android:name="preloaded_fonts"
android:resource="@array/preloaded_fonts" />

<activity android:name=".view.general.DashboardActivity"/>
<activity android:name=".view.general.DashboardActivity" />
</application>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import retrofit2.http.POST
import retrofit2.http.Part
import retrofit2.http.Path
import retrofit2.http.Query

import okhttp3.ResponseBody
interface ApiService {
@POST("auth/register")
fun register(
Expand Down Expand Up @@ -91,4 +91,29 @@ interface ApiService {
@Header("Authorization") token: String,
@Path("id") patientId: String,
): Response<BaseModel>


@GET("patients/{patientId}/prescriptions")
suspend fun getPrescriptionsForPatient(
@Header("Authorization") token: String,
@Path("patientId") patientId: String,
): Response<ResponseBody>

@POST("prescriptions/{id}/discontinue")
suspend fun discontinuePrescription(
@Header("Authorization") token: String,
@Path("id") prescriptionId: String,
): Response<ResponseBody>

@DELETE("prescriptions/{id}")
suspend fun deletePrescription(
@Header("Authorization") token: String,
@Path("id") prescriptionId: String,
): Response<ResponseBody>

@GET("doctors/{doctorId}/patients")
suspend fun getPatientsForDoctor(
@Header("Authorization") token: String,
@Path("doctorId") doctorId: String,
): Response<ResponseBody>
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package deakin.gopher.guardian.view.general

import android.content.Intent
import android.os.Bundle
import android.widget.Button
import androidx.appcompat.app.AppCompatActivity
Expand All @@ -11,10 +12,17 @@ class Homepage4doctor : AppCompatActivity() {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_homepage4doctor)

val prescriptionButton: Button = findViewById(R.id.prescriptionButton)
val signOutButton: Button = findViewById(R.id.signOutButton_doctor)

prescriptionButton.setOnClickListener {
val intent = Intent(this, PrescriptionActivity::class.java)
startActivity(intent)
}

signOutButton.setOnClickListener {
EmailPasswordAuthService.signOut(this)
finish()
}
}
}
}
Loading
Loading