├── .idea
├── .name
├── copyright
│ └── profiles_settings.xml
├── scopes
│ └── scope_settings.xml
├── encodings.xml
├── vcs.xml
├── libraries
│ ├── Parse_1_5_0.xml
│ ├── appcompat_v7_19_0_1.xml
│ └── support_v4_19_0_1.xml
├── modules.xml
├── misc.xml
├── gradle.xml
└── compiler.xml
├── app
├── .gitignore
├── libs
│ ├── Parse-1.5.0-javadoc
│ │ ├── package-list
│ │ ├── resources
│ │ │ └── inherit.gif
│ │ ├── index.html
│ │ ├── style.css
│ │ ├── allclasses-noframe.html
│ │ ├── allclasses-frame.html
│ │ └── com
│ │ │ └── parse
│ │ │ ├── class-use
│ │ │ ├── Parse.html
│ │ │ ├── ParsePush.html
│ │ │ ├── ParseCloud.html
│ │ │ ├── PushService.html
│ │ │ ├── ParseAnalytics.html
│ │ │ ├── ParseImageView.html
│ │ │ ├── ParseQueryAdapter.html
│ │ │ ├── ParseTwitterUtils.html
│ │ │ ├── ParseFacebookUtils.html
│ │ │ └── ParseAnonymousUtils.html
│ │ │ └── package-frame.html
│ ├── Parse-1.5.0.jar.properties
│ └── Parse-1.5.0.jar
├── src
│ └── main
│ │ ├── res
│ │ ├── drawable-hdpi
│ │ │ └── ic_launcher.png
│ │ ├── drawable-mdpi
│ │ │ └── ic_launcher.png
│ │ ├── drawable-xhdpi
│ │ │ └── ic_launcher.png
│ │ ├── drawable-xxhdpi
│ │ │ └── ic_launcher.png
│ │ ├── values
│ │ │ ├── styles.xml
│ │ │ ├── dimens.xml
│ │ │ ├── strings_activity_login.xml
│ │ │ └── strings.xml
│ │ ├── anim
│ │ │ ├── activity_open_translate.xml
│ │ │ ├── activity_close_translate.xml
│ │ │ ├── activity_in.xml
│ │ │ ├── activity_out.xml
│ │ │ ├── old_activity_in.xml
│ │ │ ├── old_activity_out.xml
│ │ │ ├── activity_close_scale.xml
│ │ │ └── activity_open_scale.xml
│ │ ├── drawable
│ │ │ └── oval.xml
│ │ ├── values-w820dp
│ │ │ └── dimens.xml
│ │ ├── menu
│ │ │ ├── enter_email.xml
│ │ │ ├── enter_name.xml
│ │ │ ├── main.xml
│ │ │ ├── display_doc.xml
│ │ │ ├── doctor_home.xml
│ │ │ ├── display_patient.xml
│ │ │ ├── enter_password.xml
│ │ │ ├── enter_user_type.xml
│ │ │ ├── patient_home.xml
│ │ │ ├── patient_home2.xml
│ │ │ ├── display_message.xml
│ │ │ ├── doctor_home_page.xml
│ │ │ ├── enter_hospital_det.xml
│ │ │ ├── enter_speciality.xml
│ │ │ ├── make_appointment.xml
│ │ │ ├── write_presciption.xml
│ │ │ ├── patient_prescriptions.xml
│ │ │ └── display_patient_appointments.xml
│ │ └── layout
│ │ │ ├── activity_display_message.xml
│ │ │ ├── activity_doctor_home.xml
│ │ │ ├── activity_patient_prescriptions.xml
│ │ │ ├── activity_display_patient_appointments.xml
│ │ │ ├── rowlayout.xml
│ │ │ ├── search_activity.xml
│ │ │ ├── activity_patient_home2.xml
│ │ │ ├── activity_write_presciption.xml
│ │ │ ├── activity_patient_home.xml
│ │ │ ├── activity_enter_speciality.xml
│ │ │ ├── activity_enter_email.xml
│ │ │ ├── activity_enter_password.xml
│ │ │ ├── activity_main.xml
│ │ │ ├── activity_enter_name.xml
│ │ │ ├── activity_enter_hospital_det.xml
│ │ │ ├── activity_make_appointment.xml
│ │ │ ├── activity_enter_user_type.xml
│ │ │ ├── activity_display_patient.xml
│ │ │ └── activity_display_doc.xml
│ │ ├── java
│ │ └── com
│ │ │ └── example
│ │ │ └── docapp
│ │ │ └── app
│ │ │ ├── DoctorInfo
│ │ │ └── Doctor.java
│ │ │ ├── Patient_home2.java
│ │ │ ├── EnterSpeciality.java
│ │ │ ├── EnterHospitalDet.java
│ │ │ ├── EnterEmail.java
│ │ │ ├── WritePresciption.java
│ │ │ ├── EnterPassword.java
│ │ │ ├── MakeAppointment.java
│ │ │ ├── EnterName.java
│ │ │ ├── DisplayPatient.java
│ │ │ ├── DisplayDoc.java
│ │ │ ├── PatientPrescriptions.java
│ │ │ └── DisplayPatientAppointments.java
│ │ └── AndroidManifest.xml
├── proguard-rules.txt
├── build.gradle
└── app.iml
├── settings.gradle
├── .gitignore
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── DOCAPP.iml
├── gradle.properties
├── README.md
├── gradlew.bat
└── gradlew
/.idea/.name:
--------------------------------------------------------------------------------
1 | DOCAPP
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/app/libs/Parse-1.5.0-javadoc/package-list:
--------------------------------------------------------------------------------
1 | com.parse
2 |
--------------------------------------------------------------------------------
/app/libs/Parse-1.5.0.jar.properties:
--------------------------------------------------------------------------------
1 | doc=Parse-1.5.0-javadoc
2 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .gradle
2 | /local.properties
3 | /.idea/workspace.xml
4 | .DS_Store
5 |
--------------------------------------------------------------------------------
/app/libs/Parse-1.5.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coder46/DOCAPP/HEAD/app/libs/Parse-1.5.0.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coder46/DOCAPP/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coder46/DOCAPP/HEAD/app/src/main/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coder46/DOCAPP/HEAD/app/src/main/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coder46/DOCAPP/HEAD/app/src/main/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coder46/DOCAPP/HEAD/app/src/main/res/drawable-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/libs/Parse-1.5.0-javadoc/resources/inherit.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coder46/DOCAPP/HEAD/app/libs/Parse-1.5.0-javadoc/resources/inherit.gif
--------------------------------------------------------------------------------
/.idea/scopes/scope_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
7 |
--------------------------------------------------------------------------------
/.idea/libraries/Parse_1_5_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Wed Apr 10 15:27:10 PDT 2013
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=http\://services.gradle.org/distributions/gradle-1.10-all.zip
7 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/activity_open_translate.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/activity_close_translate.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/activity_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/activity_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/old_activity_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/oval.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/old_activity_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
9 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/libraries/appcompat_v7_19_0_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/enter_email.xml:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/enter_name.xml:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/main.xml:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/display_doc.xml:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/doctor_home.xml:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/display_patient.xml:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/enter_password.xml:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/enter_user_type.xml:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/patient_home.xml:
--------------------------------------------------------------------------------
1 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/patient_home2.xml:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/display_message.xml:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/doctor_home_page.xml:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/enter_hospital_det.xml:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/enter_speciality.xml:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/make_appointment.xml:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/write_presciption.xml:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/patient_prescriptions.xml:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/display_patient_appointments.xml:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/.idea/libraries/support_v4_19_0_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/docapp/app/DoctorInfo/Doctor.java:
--------------------------------------------------------------------------------
1 | package com.example.docapp.app.DoctorInfo;
2 | import com.parse.ParseObject;
3 | import com.parse.ParseClassName;
4 | /**
5 | * Created by faisal on 23/5/14.
6 | */
7 | @ParseClassName("Doctor")
8 | public class Doctor extends ParseObject{
9 | public Doctor(){
10 |
11 | }
12 |
13 | public String getFname(){
14 | return getString("Fname");
15 |
16 | }
17 |
18 | public String getLname(){
19 | return getString("Lname");
20 |
21 | }
22 |
23 | public String getDoctorId(){
24 | return getString("doctor_id");
25 | }
26 |
27 |
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/DOCAPP.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/app/proguard-rules.txt:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /home/faisal/android-studio/sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the ProGuard
5 | # include property in project.properties.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
--------------------------------------------------------------------------------
/app/src/main/res/values/strings_activity_login.xml:
--------------------------------------------------------------------------------
1 |
2 | Sign in
3 |
4 |
5 | Email
6 | Password (optional)
7 | Sign in or register
8 | Sign in
9 |
10 | This email address is invalid
11 | This password is too short
12 | This password is incorrect
13 | This field is required
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/activity_close_scale.xml:
--------------------------------------------------------------------------------
1 |
2 | Scale Down Animation for old activity <-->
3 | http://blog.quentinrousseau.fr/index.php/2013/06/activity-transition-animations-like-the-vine-android-application/<-->
4 |
5 |
12 |
13 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_display_message.xml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_doctor_home.xml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/app/src/main/res/anim/activity_open_scale.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Closing transition animations
4 | Scale up animation for new activity
5 | http://blog.quentinrousseau.fr/index.php/2013/06/activity-transition-animations-like-the-vine-android-application/
6 | <-->
7 |
8 |
9 |
16 |
17 |
20 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_patient_prescriptions.xml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_display_patient_appointments.xml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/rowlayout.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
14 |
15 |
16 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Settings specified in this file will override any Gradle settings
5 | # configured through the IDE.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | DOCAPP
2 | ======
3 |
4 | This Android app was built during AngelHack Dubai.
5 |
6 | The main aim of the app was to make it easier to connect Patients and Doctors.
7 |
8 | Goals of the app are:
9 |
10 | 1) Searching doctors using any one or a combination of the following parameters:- Disease/Condition,Specialty, Location, Insurance company
11 |
12 | 2) Enable patients to book appointments with doctors
13 |
14 | 3) Doctor can write prescriptions directly through the app
15 |
16 | 4) Patients can view prescriptions
17 |
18 | 5) Doctors have a view called "Today's Schedule" through which they can view their appointments for that day and manage patients
19 |
20 | 6) Similarly Patients too have a view called "My Appointments" where they can view all the appointments which they have booked.
21 |
22 | (All the above features have been implemented)
23 |
24 | Some additional feature I have thought of:
25 |
26 | 7) Add a doctor rating system. Not something like out of 5 stars. Instead patients can "Like" a doctor. So it'll be number of likes.
27 |
28 | 8) Allow the patient to see his/her medical history with the doctor. Test reports, vaccines taken, diagnosis, etc will be part of the history.
29 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/search_activity.xml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
14 |
15 |
23 |
24 |
25 |
26 |
32 |
33 |
34 |
38 |
39 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_patient_home2.xml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
14 |
15 |
23 |
24 |
25 |
26 |
32 |
33 |
34 |
38 |
39 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | DOCAPP
5 | Hello world!
6 | Settings
7 | Sign In
8 | DisplayMessageActivity
9 | DoctorHomePage
10 | EnterName
11 | EnterEmail
12 | EnterUserType
13 | EnterPassword
14 | DoctorHome
15 | PatientHome
16 | Patient_home2
17 | DisplayDoc
18 | MakeAppointment
19 | DisplayPatientAppointments
20 | PatientPrescriptions
21 | DisplayPatient
22 | WritePresciption
23 | EnterSpeciality
24 | EnterHospitalDet
25 |
26 |
27 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_write_presciption.xml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
23 |
24 |
36 |
37 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/docapp/app/Patient_home2.java:
--------------------------------------------------------------------------------
1 | package com.example.docapp.app;
2 |
3 | import android.support.v7.app.ActionBarActivity;
4 | import android.os.Bundle;
5 | import android.view.Menu;
6 | import android.view.MenuItem;
7 | import android.widget.EditText;
8 | import android.widget.ListView;
9 |
10 | import com.example.docapp.app.DoctorInfo.Doctor;
11 | import com.parse.ParseObject;
12 |
13 |
14 | public class Patient_home2 extends ActionBarActivity {
15 |
16 | EditText TaskInput;
17 | ListView mListView;
18 |
19 | @Override
20 | protected void onCreate(Bundle savedInstanceState) {
21 | super.onCreate(savedInstanceState);
22 | ParseObject.registerSubclass(Doctor.class);
23 |
24 | TaskInput = (EditText) findViewById(R.id.search_input);
25 | mListView = (ListView) findViewById(R.id.search_list);
26 | setContentView(R.layout.activity_patient_home2);
27 | }
28 |
29 |
30 | @Override
31 | public boolean onCreateOptionsMenu(Menu menu) {
32 |
33 | // Inflate the menu; this adds items to the action bar if it is present.
34 | getMenuInflater().inflate(R.menu.patient_home2, menu);
35 | return true;
36 | }
37 |
38 | @Override
39 | public boolean onOptionsItemSelected(MenuItem item) {
40 | // Handle action bar item clicks here. The action bar will
41 | // automatically handle clicks on the Home/Up button, so long
42 | // as you specify a parent activity in AndroidManifest.xml.
43 | int id = item.getItemId();
44 | if (id == R.id.action_settings) {
45 | return true;
46 | }
47 | return super.onOptionsItemSelected(item);
48 | }
49 |
50 | }
51 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/docapp/app/EnterSpeciality.java:
--------------------------------------------------------------------------------
1 | package com.example.docapp.app;
2 |
3 | import android.content.Intent;
4 | import android.support.v7.app.ActionBarActivity;
5 | import android.os.Bundle;
6 | import android.view.Menu;
7 | import android.view.MenuItem;
8 | import android.view.View;
9 | import android.widget.EditText;
10 |
11 | import com.parse.ParseUser;
12 |
13 |
14 | public class EnterSpeciality extends ActionBarActivity {
15 |
16 | EditText t1;
17 | @Override
18 | protected void onCreate(Bundle savedInstanceState) {
19 | super.onCreate(savedInstanceState);
20 | setContentView(R.layout.activity_enter_speciality);
21 | t1 = (EditText) findViewById(R.id.editText);
22 |
23 | }
24 |
25 | public void sendSpec(View view)
26 | {
27 | ParseUser curuser = ParseUser.getCurrentUser();
28 | curuser.put("Speciality", t1.getText().toString());
29 | curuser.saveEventually();
30 | Intent intent = new Intent(this, EnterHospitalDet.class);
31 | startActivity(intent);
32 |
33 | }
34 |
35 | @Override
36 | public boolean onCreateOptionsMenu(Menu menu) {
37 |
38 | // Inflate the menu; this adds items to the action bar if it is present.
39 | getMenuInflater().inflate(R.menu.enter_speciality, menu);
40 | return true;
41 | }
42 |
43 | @Override
44 | public boolean onOptionsItemSelected(MenuItem item) {
45 | // Handle action bar item clicks here. The action bar will
46 | // automatically handle clicks on the Home/Up button, so long
47 | // as you specify a parent activity in AndroidManifest.xml.
48 | int id = item.getItemId();
49 | if (id == R.id.action_settings) {
50 | return true;
51 | }
52 | return super.onOptionsItemSelected(item);
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_patient_home.xml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
16 |
17 |
25 |
26 |
27 |
28 |
34 |
35 |
36 |
43 |
44 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/docapp/app/EnterHospitalDet.java:
--------------------------------------------------------------------------------
1 | package com.example.docapp.app;
2 |
3 | import android.content.Context;
4 | import android.content.Intent;
5 | import android.support.v7.app.ActionBarActivity;
6 | import android.os.Bundle;
7 | import android.view.Menu;
8 | import android.view.MenuItem;
9 | import android.view.View;
10 | import android.widget.EditText;
11 | import android.widget.Toast;
12 |
13 | import com.parse.ParseObject;
14 | import com.parse.ParseUser;
15 |
16 |
17 | public class EnterHospitalDet extends ActionBarActivity {
18 |
19 | EditText t1,t2;
20 | @Override
21 | protected void onCreate(Bundle savedInstanceState) {
22 | super.onCreate(savedInstanceState);
23 | setContentView(R.layout.activity_enter_hospital_det);
24 | t1 = (EditText) findViewById(R.id.editText);
25 | t2 = (EditText) findViewById(R.id.editText2);
26 | }
27 |
28 | public void sendData(View view)
29 | {
30 | ParseUser curuser = ParseUser.getCurrentUser();
31 | curuser.put("Hospital",t1.getText().toString());
32 | curuser.saveEventually();
33 |
34 | Context context = getApplicationContext();
35 | CharSequence text = "Added Hospital";
36 | int duration = Toast.LENGTH_SHORT;
37 |
38 | Toast toast = Toast.makeText(context, text, duration);
39 | toast.show();
40 |
41 | //Intent intent = new Intent(this, MainActivity.class);
42 | //startActivity(intent);
43 |
44 |
45 | }
46 |
47 | @Override
48 | public boolean onCreateOptionsMenu(Menu menu) {
49 |
50 | // Inflate the menu; this adds items to the action bar if it is present.
51 | getMenuInflater().inflate(R.menu.enter_hospital_det, menu);
52 | return true;
53 | }
54 |
55 | @Override
56 | public boolean onOptionsItemSelected(MenuItem item) {
57 | // Handle action bar item clicks here. The action bar will
58 | // automatically handle clicks on the Home/Up button, so long
59 | // as you specify a parent activity in AndroidManifest.xml.
60 | int id = item.getItemId();
61 | if (id == R.id.action_settings) {
62 | return true;
63 | }
64 | return super.onOptionsItemSelected(item);
65 | }
66 |
67 | }
68 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/docapp/app/EnterEmail.java:
--------------------------------------------------------------------------------
1 | package com.example.docapp.app;
2 |
3 | import android.content.Intent;
4 | import android.support.v4.app.NavUtils;
5 | import android.support.v7.app.ActionBarActivity;
6 | import android.os.Bundle;
7 | import android.view.Menu;
8 | import android.view.MenuItem;
9 | import android.view.View;
10 | import android.view.Window;
11 | import android.view.WindowManager;
12 | import android.widget.EditText;
13 |
14 |
15 | public class EnterEmail extends ActionBarActivity {
16 |
17 | @Override
18 | protected void onCreate(Bundle savedInstanceState) {
19 | super.onCreate(savedInstanceState);
20 | this.requestWindowFeature(Window.FEATURE_NO_TITLE);
21 | this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
22 | setContentView(R.layout.activity_enter_email);
23 | //overridePendingTransition(R.anim.activity_in,R.anim.old_activity_out);
24 | }
25 |
26 |
27 | /*@Override
28 | protected void onPause()
29 | {
30 | super.onPause();
31 | overridePendingTransition(R.anim.old_activity_in,R.anim.activity_out);
32 | }*/
33 |
34 | @Override
35 | public boolean onCreateOptionsMenu(Menu menu) {
36 |
37 | // Inflate the menu; this adds items to the action bar if it is present.
38 | getMenuInflater().inflate(R.menu.enter_email, menu);
39 | return true;
40 | }
41 |
42 | @Override
43 | public boolean onOptionsItemSelected(MenuItem item) {
44 | // Handle action bar item clicks here. The action bar will
45 | // automatically handle clicks on the Home/Up button, so long
46 | // as you specify a parent activity in AndroidManifest.xml.
47 | int id = item.getItemId();
48 | if (id == R.id.action_settings) {
49 | return true;
50 | }
51 | switch (item.getItemId()) {
52 | // Respond to the action bar's Up/Home button
53 | case android.R.id.home:
54 | NavUtils.navigateUpFromSameTask(this);
55 | return true;
56 | }
57 | return super.onOptionsItemSelected(item);
58 | }
59 |
60 | public void moveToName(View view) {
61 | EditText editText = (EditText)findViewById(R.id.editText);
62 | Intent intent = new Intent(this, EnterName.class);
63 | String message = editText.getText().toString();
64 | intent.putExtra(MainActivity.EXTRA_EMAIL, message);
65 | startActivity(intent);
66 | }
67 |
68 | }
69 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/docapp/app/WritePresciption.java:
--------------------------------------------------------------------------------
1 | package com.example.docapp.app;
2 |
3 | import android.content.Context;
4 | import android.content.Intent;
5 | import android.support.v7.app.ActionBarActivity;
6 | import android.os.Bundle;
7 | import android.util.Log;
8 | import android.view.Menu;
9 | import android.view.MenuItem;
10 | import android.view.View;
11 | import android.widget.EditText;
12 | import android.widget.Toast;
13 |
14 | import com.parse.ParseObject;
15 | import com.parse.ParseUser;
16 |
17 |
18 | public class WritePresciption extends ActionBarActivity {
19 |
20 | String pid;
21 | EditText pres;
22 | @Override
23 | protected void onCreate(Bundle savedInstanceState) {
24 | super.onCreate(savedInstanceState);
25 | setContentView(R.layout.activity_write_presciption);
26 | Intent intent = getIntent();
27 | pid = intent.getStringExtra(DisplayPatient.EXTRA_pid);
28 | if(pid == null)
29 | {
30 | Log.d("posts","Caugth you");
31 | }
32 | else {
33 | Log.d("posts", pid);
34 | }
35 | pres = (EditText) findViewById(R.id.editText);
36 |
37 |
38 | }
39 |
40 | public void sendPres(View view)
41 | {
42 | ParseUser curuser = ParseUser.getCurrentUser();
43 | ParseObject prescr = new ParseObject("Prescriptions");
44 | prescr.put("patientId",pid);
45 | prescr.put("docId",curuser.getObjectId());
46 | prescr.put("medicines", pres.getText().toString());
47 | prescr.saveEventually();
48 | Context context = getApplicationContext();
49 | CharSequence text = "Sent Prescription!";
50 | int duration = Toast.LENGTH_SHORT;
51 |
52 | Toast toast = Toast.makeText(context, text, duration);
53 | toast.show();
54 | }
55 |
56 | @Override
57 | public boolean onCreateOptionsMenu(Menu menu) {
58 |
59 | // Inflate the menu; this adds items to the action bar if it is present.
60 | getMenuInflater().inflate(R.menu.write_presciption, menu);
61 | return true;
62 | }
63 |
64 | @Override
65 | public boolean onOptionsItemSelected(MenuItem item) {
66 | // Handle action bar item clicks here. The action bar will
67 | // automatically handle clicks on the Home/Up button, so long
68 | // as you specify a parent activity in AndroidManifest.xml.
69 | int id = item.getItemId();
70 | if (id == R.id.action_settings) {
71 | return true;
72 | }
73 | return super.onOptionsItemSelected(item);
74 | }
75 |
76 | }
77 |
--------------------------------------------------------------------------------
/app/libs/Parse-1.5.0-javadoc/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Generated Documentation (Untitled)
7 |
8 |
53 |
55 |
56 |
69 |
70 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/docapp/app/EnterPassword.java:
--------------------------------------------------------------------------------
1 | package com.example.docapp.app;
2 |
3 | import android.content.Intent;
4 | import android.support.v7.app.ActionBarActivity;
5 | import android.os.Bundle;
6 | import android.util.Log;
7 | import android.view.Menu;
8 | import android.view.MenuItem;
9 | import android.view.View;
10 | import android.view.Window;
11 | import android.view.WindowManager;
12 | import android.widget.EditText;
13 |
14 |
15 | public class EnterPassword extends ActionBarActivity {
16 |
17 | String EMAIL;
18 | String FNAME;
19 | String LNAME;
20 | @Override
21 | protected void onCreate(Bundle savedInstanceState) {
22 | super.onCreate(savedInstanceState);
23 |
24 | Intent intent = getIntent();
25 | EMAIL = intent.getStringExtra(MainActivity.EXTRA_EMAIL);
26 |
27 | FNAME = intent.getStringExtra(MainActivity.EXTRA_FNAME);
28 |
29 | LNAME = intent.getStringExtra(MainActivity.EXTRA_LNAME);
30 |
31 | this.requestWindowFeature(Window.FEATURE_NO_TITLE);
32 | this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
33 | setContentView(R.layout.activity_enter_password);
34 | overridePendingTransition(R.anim.activity_in,R.anim.old_activity_out);
35 |
36 | }
37 |
38 |
39 | @Override
40 | public boolean onCreateOptionsMenu(Menu menu) {
41 |
42 | // Inflate the menu; this adds items to the action bar if it is present.
43 | getMenuInflater().inflate(R.menu.enter_password, menu);
44 | return true;
45 | }
46 |
47 | @Override
48 | public boolean onOptionsItemSelected(MenuItem item) {
49 | // Handle action bar item clicks here. The action bar will
50 | // automatically handle clicks on the Home/Up button, so long
51 | // as you specify a parent activity in AndroidManifest.xml.
52 | int id = item.getItemId();
53 | if (id == R.id.action_settings) {
54 | return true;
55 | }
56 | return super.onOptionsItemSelected(item);
57 | }
58 |
59 | public void moveToUserType(View view)
60 | {
61 | Intent intent = new Intent(this, EnterUserType.class);
62 | EditText pass = (EditText) findViewById(R.id.editText);
63 | intent.putExtra( MainActivity.EXTRA_PASS, pass.getText().toString());
64 | intent.putExtra(MainActivity.EXTRA_EMAIL, EMAIL);
65 | intent.putExtra(MainActivity.EXTRA_FNAME, FNAME);
66 | intent.putExtra(MainActivity.EXTRA_LNAME, LNAME);
67 |
68 | Log.e("ERROR", "email "+EMAIL);
69 | Log.e("ERROR", "fname "+FNAME);
70 | Log.e("ERROR", "lname "+LNAME);
71 |
72 | startActivity(intent);
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/docapp/app/MakeAppointment.java:
--------------------------------------------------------------------------------
1 | package com.example.docapp.app;
2 |
3 | import android.content.Context;
4 | import android.content.Intent;
5 | import android.support.v7.app.ActionBarActivity;
6 | import android.os.Bundle;
7 | import android.view.Menu;
8 | import android.view.MenuItem;
9 | import android.view.View;
10 | import android.widget.EditText;
11 | import android.widget.Toast;
12 |
13 | import com.parse.ParseObject;
14 |
15 |
16 | public class MakeAppointment extends ActionBarActivity {
17 |
18 | public String docId;
19 | public String curId;
20 |
21 | EditText t1,t2,t3;
22 |
23 |
24 | @Override
25 | protected void onCreate(Bundle savedInstanceState) {
26 | super.onCreate(savedInstanceState);
27 | setContentView(R.layout.activity_make_appointment);
28 |
29 | Intent intent = getIntent();
30 | docId = intent.getStringExtra(DisplayDoc.EXTRA_docId);
31 | curId = intent.getStringExtra(DisplayDoc.EXTRA_curId);
32 |
33 | t1 = (EditText) findViewById(R.id.editText);
34 | t2 = (EditText) findViewById(R.id.editText2);
35 | t3 = (EditText) findViewById(R.id.editText3);
36 |
37 |
38 |
39 |
40 |
41 | }
42 |
43 | public void confirmAppointment(View view)
44 | {
45 | ParseObject appointment = new ParseObject("Appointments");
46 | appointment.put("docId", docId);
47 | appointment.put("patientId", curId);
48 | appointment.put("reason",t1.getText().toString());
49 | appointment.put("date", t2.getText().toString());
50 | appointment.put("time", t3.getText().toString());
51 | appointment.saveEventually();
52 | Context context = getApplicationContext();
53 | int duration = Toast.LENGTH_LONG;
54 | Toast toast2 = Toast.makeText(context, "BOOKED!!", duration);
55 | toast2.show();
56 | Intent intent = new Intent(this, PatientHome.class);
57 | startActivity(intent);
58 | }
59 |
60 | @Override
61 | public boolean onCreateOptionsMenu(Menu menu) {
62 |
63 | // Inflate the menu; this adds items to the action bar if it is present.
64 | getMenuInflater().inflate(R.menu.make_appointment, menu);
65 | return true;
66 | }
67 |
68 | @Override
69 | public boolean onOptionsItemSelected(MenuItem item) {
70 | // Handle action bar item clicks here. The action bar will
71 | // automatically handle clicks on the Home/Up button, so long
72 | // as you specify a parent activity in AndroidManifest.xml.
73 | int id = item.getItemId();
74 | if (id == R.id.action_settings) {
75 | return true;
76 | }
77 | return super.onOptionsItemSelected(item);
78 | }
79 |
80 | }
81 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_enter_speciality.xml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
24 |
25 |
36 |
37 |
48 |
49 |
50 |
66 |
67 |
68 |
69 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_enter_email.xml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
25 |
26 |
37 |
38 |
49 |
50 |
51 |
67 |
68 |
69 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_enter_password.xml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
24 |
25 |
38 |
39 |
55 |
56 |
67 |
68 |
69 |
70 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/docapp/app/EnterName.java:
--------------------------------------------------------------------------------
1 | package com.example.docapp.app;
2 |
3 | import android.content.Intent;
4 | import android.support.v4.app.NavUtils;
5 | import android.support.v7.app.ActionBarActivity;
6 | import android.os.Bundle;
7 | import android.util.Log;
8 | import android.view.Menu;
9 | import android.view.MenuItem;
10 | import android.view.View;
11 | import android.view.Window;
12 | import android.view.WindowManager;
13 | import android.widget.EditText;
14 |
15 | import java.net.FileNameMap;
16 |
17 |
18 | public class EnterName extends ActionBarActivity {
19 | String EMAIL;
20 |
21 | @Override
22 | protected void onCreate(Bundle savedInstanceState) {
23 | super.onCreate(savedInstanceState);
24 | Intent intent = getIntent();
25 | EMAIL = intent.getStringExtra(MainActivity.EXTRA_EMAIL);
26 | this.requestWindowFeature(Window.FEATURE_NO_TITLE);
27 | this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
28 | setContentView(R.layout.activity_enter_name);
29 | overridePendingTransition(R.anim.activity_in,R.anim.old_activity_out);
30 |
31 |
32 |
33 | }
34 |
35 | /*@Override
36 | protected void onPause()
37 | {
38 | super.onPause();
39 | overridePendingTransition(R.anim.old_activity_in,R.anim.activity_out);
40 | }*/
41 |
42 |
43 | @Override
44 | public boolean onCreateOptionsMenu(Menu menu) {
45 |
46 | // Inflate the menu; this adds items to the action bar if it is present.
47 | getMenuInflater().inflate(R.menu.enter_name, menu);
48 | return true;
49 | }
50 |
51 | @Override
52 | public boolean onOptionsItemSelected(MenuItem item) {
53 | // Handle action bar item clicks here. The action bar will
54 | // automatically handle clicks on the Home/Up button, so long
55 | // as you specify a parent activity in AndroidManifest.xml.
56 | int id = item.getItemId();
57 | if (id == R.id.action_settings) {
58 | return true;
59 | }
60 | switch (item.getItemId()) {
61 | // Respond to the action bar's Up/Home button
62 | case android.R.id.home:
63 | NavUtils.navigateUpFromSameTask(this);
64 | return true;
65 | }
66 | return super.onOptionsItemSelected(item);
67 | }
68 |
69 | public void moveToPassword(View view)
70 | {
71 | Intent intent = new Intent(this, EnterPassword.class);
72 | intent.putExtra(MainActivity.EXTRA_EMAIL, EMAIL);
73 |
74 | Log.e("ERROR", EMAIL);
75 |
76 | EditText Fname = (EditText)findViewById(R.id.editText);
77 | intent.putExtra(MainActivity.EXTRA_FNAME, Fname.getText().toString());
78 |
79 | EditText Lname = (EditText)findViewById(R.id.editText2);
80 | intent.putExtra(MainActivity.EXTRA_LNAME, Lname.getText().toString());
81 |
82 |
83 | startActivity(intent);
84 | }
85 |
86 |
87 | }
88 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
27 |
28 |
43 |
44 |
60 |
61 |
71 |
72 |
73 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_enter_name.xml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
25 |
26 |
42 |
43 |
54 |
55 |
63 |
64 |
72 |
73 |
74 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/docapp/app/DisplayPatient.java:
--------------------------------------------------------------------------------
1 | package com.example.docapp.app;
2 |
3 | import android.content.Intent;
4 | import android.support.v7.app.ActionBarActivity;
5 | import android.os.Bundle;
6 | import android.util.Log;
7 | import android.view.Menu;
8 | import android.view.MenuItem;
9 | import android.view.View;
10 | import android.widget.TextView;
11 |
12 | import com.example.docapp.app.DoctorInfo.Doctor;
13 | import com.parse.FindCallback;
14 | import com.parse.ParseException;
15 | import com.parse.ParseObject;
16 | import com.parse.ParseQuery;
17 | import com.parse.ParseUser;
18 |
19 | import java.util.List;
20 |
21 |
22 | public class DisplayPatient extends ActionBarActivity {
23 |
24 | public final static String EXTRA_pid = "com.example.docapp.pid";
25 | String pid;
26 | TextView t4,t5,t6;
27 | @Override
28 | protected void onCreate(Bundle savedInstanceState) {
29 | super.onCreate(savedInstanceState);
30 | setContentView(R.layout.activity_display_patient);
31 | Intent intent = getIntent();
32 | pid = intent.getStringExtra(DoctorHome.EXTRA_patientid2);
33 | if (pid == null)
34 | {
35 | Log.d("posts","caught you !!");
36 | }
37 | t4 = (TextView) findViewById(R.id.textView4);
38 | t5 = (TextView) findViewById(R.id.textView5);
39 | t6 = (TextView) findViewById(R.id.textView6);
40 |
41 | //Log.e("posts",pid);
42 | ParseQuery userQ = ParseUser.getQuery();
43 | userQ.whereEqualTo("objectId",pid);
44 | final String[] response = new String[1];
45 | userQ.findInBackground(new FindCallback() {
46 | public void done(List results, ParseException e) {
47 | // results has the list of users with a hometown team with a winning record
48 | Log.d("posts","results are "+String.valueOf(results.size()));
49 | for (ParseObject result : results) {
50 |
51 | t4.setText(pid);
52 | t5.setText(result.getString("Fname"));
53 | t6.setText(result.getString("Lname"));
54 | }
55 |
56 |
57 | }
58 | });
59 |
60 |
61 | }
62 |
63 | public void goToPresciption(View view)
64 | {
65 | Intent intent = new Intent(this, WritePresciption.class);
66 | intent.putExtra(DisplayPatient.EXTRA_pid, pid);
67 | //intent.putExtra(DisplayDoc.EXTRA_curId, cid);
68 |
69 | startActivity(intent);
70 | }
71 |
72 |
73 | @Override
74 | public boolean onCreateOptionsMenu(Menu menu) {
75 |
76 | // Inflate the menu; this adds items to the action bar if it is present.
77 | getMenuInflater().inflate(R.menu.display_patient, menu);
78 | return true;
79 | }
80 |
81 | @Override
82 | public boolean onOptionsItemSelected(MenuItem item) {
83 | // Handle action bar item clicks here. The action bar will
84 | // automatically handle clicks on the Home/Up button, so long
85 | // as you specify a parent activity in AndroidManifest.xml.
86 | int id = item.getItemId();
87 | if (id == R.id.action_settings) {
88 | return true;
89 | }
90 | return super.onOptionsItemSelected(item);
91 | }
92 |
93 | }
94 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_enter_hospital_det.xml:
--------------------------------------------------------------------------------
1 |
10 |
23 |
24 |
36 |
37 |
48 |
49 |
50 |
67 |
68 |
78 |
79 |
80 |
81 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_make_appointment.xml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
22 |
23 |
31 |
32 |
41 |
42 |
51 |
52 |
61 |
62 |
71 |
72 |
85 |
86 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_enter_user_type.xml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
23 |
24 |
25 |
33 |
43 |
44 |
55 |
56 |
57 |
69 |
70 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'android'
2 |
3 | android {
4 | compileSdkVersion 19
5 | buildToolsVersion "19.0.3"
6 |
7 | defaultConfig {
8 | minSdkVersion 8
9 | targetSdkVersion 19
10 | versionCode 1
11 | versionName "1.0"
12 | }
13 | buildTypes {
14 | release {
15 | runProguard false
16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
17 | }
18 | }
19 | }
20 |
21 | dependencies {
22 | compile 'com.android.support:appcompat-v7:+'
23 |
24 | // You must install or update the Google Repository through the SDK manager to use this dependency.
25 | // The Google Repository (separate from the corresponding library) can be found in the Extras category.
26 | // compile 'com.google.android.gms:play-services:4.0.30'
27 | // You must install or update the Google Repository through the SDK manager to use this dependency.
28 | // The Google Repository (separate from the corresponding library) can be found in the Extras category.
29 | //
30 | // You must install or update the Google Repository through the SDK manager to use this dependency.
31 | // The Google Repository (separate from the corresponding library) can be found in the Extras category.
32 | //
33 | // You must install or update the Google Repository through the SDK manager to use this dependency.
34 | // The Google Repository (separate from the corresponding library) can be found in the Extras category.
35 | //
36 | // You must install or update the Google Repository through the SDK manager to use this dependency.
37 | // The Google Repository (separate from the corresponding library) can be found in the Extras category.
38 | //
39 | // You must install or update the Google Repository through the SDK manager to use this dependency.
40 | // The Google Repository (separate from the corresponding library) can be found in the Extras category.
41 | //
42 | // You must install or update the Google Repository through the SDK manager to use this dependency.
43 | // The Google Repository (separate from the corresponding library) can be found in the Extras category.
44 | //
45 | // You must install or update the Google Repository through the SDK manager to use this dependency.
46 | // The Google Repository (separate from the corresponding library) can be found in the Extras category.
47 | //
48 | // You must install or update the Google Repository through the SDK manager to use this dependency.
49 | // The Google Repository (separate from the corresponding library) can be found in the Extras category.
50 | //
51 | // You must install or update the Google Repository through the SDK manager to use this dependency.
52 | // The Google Repository (separate from the corresponding library) can be found in the Extras category.
53 | //
54 | // You must install or update the Google Repository through the SDK manager to use this dependency.
55 | // The Google Repository (separate from the corresponding library) can be found in the Extras category.
56 | //
57 | // You must install or update the Google Repository through the SDK manager to use this dependency.
58 | // The Google Repository (separate from the corresponding library) can be found in the Extras category.
59 | //
60 | // You must install or update the Google Repository through the SDK manager to use this dependency.
61 | // The Google Repository (separate from the corresponding library) can be found in the Extras category.
62 | //
63 | // You must install or update the Google Repository through the SDK manager to use this dependency.
64 | // The Google Repository (separate from the corresponding library) can be found in the Extras category.
65 | //
66 | compile fileTree(dir: 'libs', include: ['*.jar'])
67 | }
68 |
--------------------------------------------------------------------------------
/app/libs/Parse-1.5.0-javadoc/style.css:
--------------------------------------------------------------------------------
1 | /* Javadoc style sheet for Parse, by Christophe TAUZIET */
2 |
3 | html, body, frame {
4 | background-color: #FFFFFF;
5 | color:#000000;
6 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
7 | margin: 0px;
8 | padding: 10px;
9 |
10 | }
11 |
12 | h1, h2, h3 {
13 | color: #555555;
14 | }
15 |
16 | h1 {
17 | font-size: 145%;
18 | }
19 |
20 | a:link {
21 | line-height: 14px;
22 | font-weight: bold;
23 | text-decoration: none;
24 | color: #444444;
25 | }
26 | a:visited {
27 | color: #777777;
28 | text-decoration: none;
29 | font-weight: bold;
30 | }
31 | a:hover {
32 | border-bottom: 2px solid #666666;
33 | }
34 | hr{
35 | display: none;
36 | }
37 |
38 | table:nth-child(4) {
39 | margin: -20px 0 0 -20px;
40 | }
41 |
42 | /* Table colors */
43 | .TableHeadingColor {
44 | padding: 5px 0px;
45 | background-color: #1789BA;
46 | background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #1789BA), color-stop(100%, #0A67A0));
47 | background-image: -webkit-linear-gradient(#1789BA, #0A67A0);
48 | background-image: -moz-linear-gradient(#1789BA, #0A67A0);
49 | background-image: -o-linear-gradient(#1789BA, #0A67A0);
50 | background-image: -ms-linear-gradient(#1789BA, #0A67A0);
51 | background-image: linear-gradient(#1789BA, #0A67A0);
52 | -moz-box-shadow: rgba(255, 255, 255, 0.2) 0 1px 0px 0 inset, rgba(255, 255, 255, 0.2) 0 1px 0px 0;
53 | -webkit-box-shadow: rgba(255, 255, 255, 0.2) 0 1px 0px 0 inset, rgba(255, 255, 255, 0.2) 0 1px 0px 0;
54 | -o-box-shadow: rgba(255, 255, 255, 0.2) 0 1px 0px 0 inset, rgba(255, 255, 255, 0.2) 0 1px 0px 0;
55 | box-shadow: rgba(255, 255, 255, 0.2) 0 1px 0px 0 inset, rgba(255, 255, 255, 0.2) 0 1px 0px 0;
56 | color: white;
57 | text-shadow: rgba(0, 0, 0, 0.6) 0 -1px 0;
58 | font-size: 20px;
59 | text-align: center;
60 | font-weight: 200;
61 | }
62 |
63 | .TableHeadingColor b {
64 | font-weight: 200;
65 | }
66 |
67 | .TableHeadingColor th {
68 | padding-left: 15px;
69 | }
70 |
71 | .TableHeadingColor a:link, .TableHeadingColor a:visited {
72 | color: #bbbbbb;
73 | }
74 | .TableHeadingColor a:hover {
75 | border: none;
76 | background-color:#666666;
77 | }
78 | .TableSubHeadingColor {
79 | background: #EEEEEE;
80 | color:#000000;
81 | }
82 | .TableRowColor {
83 | background: #FFFFFF;
84 | color:#000000;
85 | }
86 | .FrameTitleFont {
87 | font-size: 100%;
88 | color: #000000;
89 | }
90 | .FrameHeadingFont {
91 | font-size: 90%;
92 | color:#000000;
93 | }
94 | .FrameItemFont {
95 | font-size: 90%;
96 | color:#000000;
97 | }
98 |
99 | .NavBarCell1 {
100 | padding: 10px 10px 10px 20px;
101 | background-color: #1789BA;
102 | background-image: -webkit-linear-gradient(#1789BA, #0A67A0);
103 | background-image: -moz-linear-gradient(#1789BA, #0A67A0);
104 | background-image: -o-linear-gradient(#1789BA, #0A67A0);
105 | background-image: -ms-linear-gradient(#1789BA, #0A67A0);
106 | background-image: linear-gradient(#1789BA, #0A67A0);
107 | -moz-box-shadow: rgba(255, 255, 255, 0.2) 0 1px 0px 0 inset, rgba(255, 255, 255, 0.2) 0 1px 0px 0;
108 | -webkit-box-shadow: rgba(255, 255, 255, 0.2) 0 1px 0px 0 inset, rgba(255, 255, 255, 0.2) 0 1px 0px 0;
109 | -o-box-shadow: rgba(255, 255, 255, 0.2) 0 1px 0px 0 inset, rgba(255, 255, 255, 0.2) 0 1px 0px 0;
110 | box-shadow: rgba(255, 255, 255, 0.2) 0 1px 0px 0 inset, rgba(255, 255, 255, 0.2) 0 1px 0px 0;
111 | border: 1px solid #363636;
112 | color: white;
113 | text-shadow: rgba(0, 0, 0, 0.6) 0 -1px 0;
114 | font-size: 20px;
115 | }
116 |
117 | .NavBarCell1 a:hover {
118 | border: none;
119 | }
120 | .NavBarCell1Rev {
121 | background-color: #0A67A0;
122 | background-image: -webkit-linear-gradient(#0A67A0, #1789BA);
123 | background-image: -moz-linear-gradient(#0A67A0, #1789BA);
124 | background-image: -o-linear-gradient(#0A67A0, #1789BA);
125 | background-image: -ms-linear-gradient(#0A67A0, #1789BA);
126 | background-image: linear-gradient(#0A67A0, #1789BA);
127 | border: 1px solid #363636;
128 | padding: 10px 10px 10px 10px;
129 | }
130 | .NavBarFont1, .NavBarFont1Rev {
131 | color:#FFFFFF;
132 | }
133 | .NavBarCell2, .NavBarCell3 {
134 | background-color:#FFFFFF;
135 | color:#000000;
136 | }
--------------------------------------------------------------------------------
/app/libs/Parse-1.5.0-javadoc/allclasses-noframe.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | All Classes
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | All Classes
18 |
19 |
20 |
101 |
102 |
103 |
104 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_display_patient.xml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
22 |
23 |
35 |
36 |
45 |
46 |
58 |
59 |
70 |
71 |
81 |
82 |
91 |
92 |
101 |
102 |
103 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_display_doc.xml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
19 |
20 |
29 |
30 |
38 |
39 |
47 |
48 |
60 |
61 |
70 |
71 |
82 |
83 |
92 |
93 |
102 |
103 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/docapp/app/DisplayDoc.java:
--------------------------------------------------------------------------------
1 | package com.example.docapp.app;
2 |
3 | import android.content.Intent;
4 | import android.support.v7.app.ActionBarActivity;
5 | import android.os.Bundle;
6 | import android.util.Log;
7 | import android.view.Menu;
8 | import android.view.MenuItem;
9 | import android.view.View;
10 | import android.widget.TextView;
11 |
12 | import com.parse.FindCallback;
13 | import com.parse.ParseException;
14 | import com.parse.ParseObject;
15 | import com.parse.ParseQuery;
16 | import com.parse.ParseUser;
17 |
18 | import java.util.List;
19 |
20 |
21 | public class DisplayDoc extends ActionBarActivity {
22 |
23 | public String docId;
24 | public String docName;
25 | public String fname2;
26 | public String lname2;
27 | public String email;
28 | public String Spec;
29 |
30 | public final static String EXTRA_docId = "com.example.myfirstapp.DOCID";
31 | public final static String EXTRA_curId = "com.example.myfirstapp.CURID";
32 |
33 | TextView t1,t2,t3,t4;
34 | @Override
35 | protected void onCreate(Bundle savedInstanceState) {
36 | super.onCreate(savedInstanceState);
37 | setContentView(R.layout.activity_display_doc);
38 |
39 | Intent intent = getIntent();
40 | docName = intent.getStringExtra(PatientHome.EXTRA_selectedDoc);
41 |
42 | ParseQuery userQuery = ParseUser.getQuery();
43 | userQuery.whereEqualTo("userType", "Doctor");
44 | userQuery.whereEqualTo("Fname",docName.split(" ")[0].trim());
45 | userQuery.whereEqualTo("Lname",docName.split(" ")[1].trim());
46 | //userQuery.whereEqualTo("Speciality", sInput.trim());
47 | //userQuery.whereEqualTo("Speciality", "Orthopedic");
48 | t1 = (TextView) findViewById(R.id.textView);
49 | t2 = (TextView) findViewById(R.id.textView2);
50 | t3 = (TextView) findViewById(R.id.textView3);
51 | t4 = (TextView) findViewById(R.id.textView4);
52 |
53 | userQuery.findInBackground(new FindCallback() {
54 | public void done(List results, ParseException e) {
55 | // results has the list of users with a hometown team with a winning record
56 | int i = 0;
57 | Log.d("post", "inside parse " + String.valueOf(results.size()));
58 | for (ParseObject result : results) {
59 | Log.d("post", "found");
60 | // This does not require a network access.
61 | //ParseObject user = result.getParseObject("userType");
62 | docId = result.getObjectId();
63 | fname2 = result.getString("Fname");
64 | lname2 = result.getString("Lname");
65 | email = result.getString("email");
66 | Spec = result.getString("Speciality");
67 |
68 | t1.setText(docId);
69 | t2.setText(fname2+" "+lname2);
70 | t3.setText(email);
71 | t4.setText(Spec);
72 | //where.add(fname+" "+lname);
73 | //values[i]=fname+" "+lname;
74 | //i++;
75 | //adapter.setNotifyOnChange(true);
76 | //adapter.add(fname2 + " " + lname2);
77 |
78 | Log.d("post", "retrieved a related post " + docId + " " + fname2+" "+lname2+" "+email+" "+Spec);
79 | }
80 | }
81 | });
82 |
83 |
84 |
85 |
86 |
87 | }
88 |
89 | public void makeAppointment(View view)
90 | {
91 |
92 | ParseUser cuser = ParseUser.getCurrentUser();
93 | String cid=cuser.getObjectId();
94 | Intent intent = new Intent(this, MakeAppointment.class);
95 | intent.putExtra(DisplayDoc.EXTRA_docId, docId);
96 | intent.putExtra(DisplayDoc.EXTRA_curId, cid);
97 |
98 | startActivity(intent);
99 | }
100 |
101 | @Override
102 | public boolean onCreateOptionsMenu(Menu menu) {
103 |
104 | // Inflate the menu; this adds items to the action bar if it is present.
105 | getMenuInflater().inflate(R.menu.display_doc, menu);
106 | return true;
107 | }
108 |
109 |
110 | @Override
111 | public boolean onOptionsItemSelected(MenuItem item) {
112 | // Handle action bar item clicks here. The action bar will
113 | // automatically handle clicks on the Home/Up button, so long
114 | // as you specify a parent activity in AndroidManifest.xml.
115 | int id = item.getItemId();
116 | if (id == R.id.action_settings) {
117 | return true;
118 | }
119 | return super.onOptionsItemSelected(item);
120 | }
121 |
122 | }
123 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
11 |
12 |
17 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
29 | android:parentActivityName="com.example.docapp.app.MainActivity" >
30 |
33 |
34 |
37 | android:parentActivityName="com.example.docapp.app.EnterEmail" >
38 |
41 |
42 |
45 | android:parentActivityName="com.example.docapp.app.EnterName" >
46 |
49 |
50 |
53 |
54 |
57 |
58 |
61 |
62 |
65 |
66 |
69 |
70 |
73 |
74 |
77 |
78 |
81 |
82 |
85 |
86 |
89 |
90 |
93 |
94 |
97 |
98 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
--------------------------------------------------------------------------------
/app/libs/Parse-1.5.0-javadoc/allclasses-frame.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | All Classes
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | All Classes
18 |
19 |
20 |
101 |
102 |
103 |
104 |
--------------------------------------------------------------------------------
/app/app.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/docapp/app/PatientPrescriptions.java:
--------------------------------------------------------------------------------
1 | package com.example.docapp.app;
2 |
3 | import android.app.ListActivity;
4 | import android.support.v7.app.ActionBarActivity;
5 | import android.os.Bundle;
6 | import android.util.Log;
7 | import android.view.Menu;
8 | import android.view.MenuItem;
9 | import android.view.View;
10 | import android.widget.AdapterView;
11 | import android.widget.ArrayAdapter;
12 | import android.widget.ListView;
13 |
14 | import com.parse.FindCallback;
15 | import com.parse.ParseException;
16 | import com.parse.ParseObject;
17 | import com.parse.ParseQuery;
18 | import com.parse.ParseUser;
19 |
20 | import java.text.DateFormat;
21 | import java.text.Format;
22 | import java.text.SimpleDateFormat;
23 | import java.util.ArrayList;
24 | import java.util.Date;
25 | import java.util.List;
26 |
27 |
28 | public class PatientPrescriptions extends ListActivity implements AdapterView.OnItemClickListener {
29 |
30 | ListView mlistview;
31 | ArrayAdapter adapter;
32 | ArrayList entries;
33 | @Override
34 | protected void onCreate(Bundle savedInstanceState) {
35 | super.onCreate(savedInstanceState);
36 | setContentView(R.layout.activity_patient_prescriptions);
37 | mlistview = (ListView)findViewById(android.R.id.list);
38 |
39 | entries = new ArrayList();
40 |
41 | adapter = new ArrayAdapter(this,
42 | android.R.layout.simple_list_item_1, entries);
43 |
44 | mlistview.setAdapter(adapter);
45 | mlistview.setOnItemClickListener(this);
46 | updateData();
47 | }
48 |
49 |
50 | public void updateData(){
51 |
52 | ParseUser cuser = ParseUser.getCurrentUser();
53 |
54 | final String[] response = new String[5];
55 | final Date[] date = new Date[1];
56 | final Format formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
57 | DateFormat df = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss");
58 | ParseQuery oQuery = ParseQuery.getQuery("Prescriptions");
59 | oQuery.whereEqualTo("patientId", cuser.getObjectId());
60 | oQuery.findInBackground(new FindCallback() {
61 | public void done(List results, ParseException e) {
62 | // results has the list of users with a hometown team with a winning record
63 | int i = 0;
64 | for (ParseObject result : results) {
65 | // This does not require a network access.
66 | response[0] = result.getString("medicines");
67 | date[0] = result.getCreatedAt();
68 | //response[2] = result.getString("date");
69 | response[2] = result.getString("docId");
70 | ParseQuery userQuery = ParseUser.getQuery();
71 | userQuery.whereEqualTo("objectId", response[2]);
72 | userQuery.findInBackground(new FindCallback() {
73 | public void done(List results, ParseException e) {
74 | // results has the list of users with a hometown team with a winning record
75 | int i=0;
76 | for (ParseObject result : results) {
77 | // This does not require a network access.
78 | //ParseObject user = result.getParseObject("userType");
79 | String fname = result.getString("Fname");
80 | String lname = result.getString("Lname");
81 |
82 | //where.add(fname+" "+lname);
83 | //values[i]=fname+" "+lname;
84 | //i++;
85 | response[3]=fname+" "+lname;
86 | adapter.setNotifyOnChange(true);
87 | adapter.add(response[3] + " Prescribed : " + response[0] + " at " + formatter.format(date[0]));
88 | Log.d("post", "retrieved a related post " + fname + " " + lname);
89 | }
90 | }
91 | });
92 | //ParseObject user = result.getParseObject("userType");
93 |
94 |
95 | //where.add(fname+" "+lname);
96 | //values[i]=fname+" "+lname;
97 | //i++;
98 | //adapter.setNotifyOnChange(true);
99 | //adapter.add("Appointment "+"with "+response[4]+);
100 |
101 | //Log.d("post", "retrieved a related post " + fname + " " + lname);
102 | }
103 | }
104 | });
105 |
106 |
107 | }
108 |
109 | @Override
110 | public boolean onCreateOptionsMenu(Menu menu) {
111 |
112 | // Inflate the menu; this adds items to the action bar if it is present.
113 | getMenuInflater().inflate(R.menu.patient_prescriptions, menu);
114 | return true;
115 | }
116 |
117 | @Override
118 | public boolean onOptionsItemSelected(MenuItem item) {
119 | // Handle action bar item clicks here. The action bar will
120 | // automatically handle clicks on the Home/Up button, so long
121 | // as you specify a parent activity in AndroidManifest.xml.
122 | int id = item.getItemId();
123 | if (id == R.id.action_settings) {
124 | return true;
125 | }
126 | return super.onOptionsItemSelected(item);
127 | }
128 |
129 | @Override
130 | public void onItemClick(AdapterView> adapterView, View view, int i, long l) {
131 |
132 | }
133 | }
134 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # For Cygwin, ensure paths are in UNIX format before anything is touched.
46 | if $cygwin ; then
47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
48 | fi
49 |
50 | # Attempt to set APP_HOME
51 | # Resolve links: $0 may be a link
52 | PRG="$0"
53 | # Need this for relative symlinks.
54 | while [ -h "$PRG" ] ; do
55 | ls=`ls -ld "$PRG"`
56 | link=`expr "$ls" : '.*-> \(.*\)$'`
57 | if expr "$link" : '/.*' > /dev/null; then
58 | PRG="$link"
59 | else
60 | PRG=`dirname "$PRG"`"/$link"
61 | fi
62 | done
63 | SAVED="`pwd`"
64 | cd "`dirname \"$PRG\"`/" >&-
65 | APP_HOME="`pwd -P`"
66 | cd "$SAVED" >&-
67 |
68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
69 |
70 | # Determine the Java command to use to start the JVM.
71 | if [ -n "$JAVA_HOME" ] ; then
72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
73 | # IBM's JDK on AIX uses strange locations for the executables
74 | JAVACMD="$JAVA_HOME/jre/sh/java"
75 | else
76 | JAVACMD="$JAVA_HOME/bin/java"
77 | fi
78 | if [ ! -x "$JAVACMD" ] ; then
79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
80 |
81 | Please set the JAVA_HOME variable in your environment to match the
82 | location of your Java installation."
83 | fi
84 | else
85 | JAVACMD="java"
86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
87 |
88 | Please set the JAVA_HOME variable in your environment to match the
89 | location of your Java installation."
90 | fi
91 |
92 | # Increase the maximum file descriptors if we can.
93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
94 | MAX_FD_LIMIT=`ulimit -H -n`
95 | if [ $? -eq 0 ] ; then
96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
97 | MAX_FD="$MAX_FD_LIMIT"
98 | fi
99 | ulimit -n $MAX_FD
100 | if [ $? -ne 0 ] ; then
101 | warn "Could not set maximum file descriptor limit: $MAX_FD"
102 | fi
103 | else
104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
105 | fi
106 | fi
107 |
108 | # For Darwin, add options to specify how the application appears in the dock
109 | if $darwin; then
110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
111 | fi
112 |
113 | # For Cygwin, switch paths to Windows format before running java
114 | if $cygwin ; then
115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
158 | function splitJvmOpts() {
159 | JVM_OPTS=("$@")
160 | }
161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
163 |
164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
165 |
--------------------------------------------------------------------------------
/app/libs/Parse-1.5.0-javadoc/com/parse/class-use/Parse.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Uses of Class com.parse.Parse
7 |
8 |
9 |
10 |
11 |
12 |
20 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 | |
35 |
36 |
47 | |
48 |
49 |
50 | |
51 |
52 |
53 |
54 | |
55 | PREV
56 | NEXT |
57 |
58 | FRAMES
59 | NO FRAMES
60 |
67 |
70 |
71 |
72 | |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 | Uses of Class
com.parse.Parse
82 |
83 | No usage of com.parse.Parse
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 | |
94 |
95 |
106 | |
107 |
108 |
109 | |
110 |
111 |
112 |
113 | |
114 | PREV
115 | NEXT |
116 |
117 | FRAMES
118 | NO FRAMES
119 |
126 |
129 |
130 |
131 | |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
--------------------------------------------------------------------------------
/app/libs/Parse-1.5.0-javadoc/com/parse/class-use/ParsePush.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Uses of Class com.parse.ParsePush
7 |
8 |
9 |
10 |
11 |
12 |
20 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 | |
35 |
36 |
47 | |
48 |
49 |
50 | |
51 |
52 |
53 |
54 | |
55 | PREV
56 | NEXT |
57 |
58 | FRAMES
59 | NO FRAMES
60 |
67 |
70 |
71 |
72 | |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 | Uses of Class
com.parse.ParsePush
82 |
83 | No usage of com.parse.ParsePush
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 | |
94 |
95 |
106 | |
107 |
108 |
109 | |
110 |
111 |
112 |
113 | |
114 | PREV
115 | NEXT |
116 |
117 | FRAMES
118 | NO FRAMES
119 |
126 |
129 |
130 |
131 | |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
--------------------------------------------------------------------------------
/app/libs/Parse-1.5.0-javadoc/com/parse/class-use/ParseCloud.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Uses of Class com.parse.ParseCloud
7 |
8 |
9 |
10 |
11 |
12 |
20 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 | |
35 |
36 |
47 | |
48 |
49 |
50 | |
51 |
52 |
53 |
54 | |
55 | PREV
56 | NEXT |
57 |
58 | FRAMES
59 | NO FRAMES
60 |
67 |
70 |
71 |
72 | |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 | Uses of Class
com.parse.ParseCloud
82 |
83 | No usage of com.parse.ParseCloud
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 | |
94 |
95 |
106 | |
107 |
108 |
109 | |
110 |
111 |
112 |
113 | |
114 | PREV
115 | NEXT |
116 |
117 | FRAMES
118 | NO FRAMES
119 |
126 |
129 |
130 |
131 | |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
--------------------------------------------------------------------------------
/app/libs/Parse-1.5.0-javadoc/com/parse/class-use/PushService.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Uses of Class com.parse.PushService
7 |
8 |
9 |
10 |
11 |
12 |
20 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 | |
35 |
36 |
47 | |
48 |
49 |
50 | |
51 |
52 |
53 |
54 | |
55 | PREV
56 | NEXT |
57 |
58 | FRAMES
59 | NO FRAMES
60 |
67 |
70 |
71 |
72 | |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 | Uses of Class
com.parse.PushService
82 |
83 | No usage of com.parse.PushService
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 | |
94 |
95 |
106 | |
107 |
108 |
109 | |
110 |
111 |
112 |
113 | |
114 | PREV
115 | NEXT |
116 |
117 | FRAMES
118 | NO FRAMES
119 |
126 |
129 |
130 |
131 | |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
--------------------------------------------------------------------------------
/app/libs/Parse-1.5.0-javadoc/com/parse/package-frame.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | com.parse
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | com.parse
18 |
29 |
30 |
31 |
104 |
105 |
106 |
115 |
116 |
117 |
118 |
119 |
120 | Exceptions
121 |
122 |
123 | ParseException |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 | Annotation Types
132 |
133 |
134 | ParseClassName |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
--------------------------------------------------------------------------------
/app/libs/Parse-1.5.0-javadoc/com/parse/class-use/ParseAnalytics.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Uses of Class com.parse.ParseAnalytics
7 |
8 |
9 |
10 |
11 |
12 |
20 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 | |
35 |
36 |
47 | |
48 |
49 |
50 | |
51 |
52 |
53 |
54 | |
55 | PREV
56 | NEXT |
57 |
58 | FRAMES
59 | NO FRAMES
60 |
67 |
70 |
71 |
72 | |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 | Uses of Class
com.parse.ParseAnalytics
82 |
83 | No usage of com.parse.ParseAnalytics
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 | |
94 |
95 |
106 | |
107 |
108 |
109 | |
110 |
111 |
112 |
113 | |
114 | PREV
115 | NEXT |
116 |
117 | FRAMES
118 | NO FRAMES
119 |
126 |
129 |
130 |
131 | |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
--------------------------------------------------------------------------------
/app/libs/Parse-1.5.0-javadoc/com/parse/class-use/ParseImageView.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Uses of Class com.parse.ParseImageView
7 |
8 |
9 |
10 |
11 |
12 |
20 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 | |
35 |
36 |
47 | |
48 |
49 |
50 | |
51 |
52 |
53 |
54 | |
55 | PREV
56 | NEXT |
57 |
58 | FRAMES
59 | NO FRAMES
60 |
67 |
70 |
71 |
72 | |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 | Uses of Class
com.parse.ParseImageView
82 |
83 | No usage of com.parse.ParseImageView
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 | |
94 |
95 |
106 | |
107 |
108 |
109 | |
110 |
111 |
112 |
113 | |
114 | PREV
115 | NEXT |
116 |
117 | FRAMES
118 | NO FRAMES
119 |
126 |
129 |
130 |
131 | |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
--------------------------------------------------------------------------------
/app/libs/Parse-1.5.0-javadoc/com/parse/class-use/ParseQueryAdapter.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Uses of Class com.parse.ParseQueryAdapter
7 |
8 |
9 |
10 |
11 |
12 |
20 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 | |
35 |
36 |
47 | |
48 |
49 |
50 | |
51 |
52 |
53 |
54 | |
55 | PREV
56 | NEXT |
57 |
58 | FRAMES
59 | NO FRAMES
60 |
67 |
70 |
71 |
72 | |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 | Uses of Class
com.parse.ParseQueryAdapter
82 |
83 | No usage of com.parse.ParseQueryAdapter
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 | |
94 |
95 |
106 | |
107 |
108 |
109 | |
110 |
111 |
112 |
113 | |
114 | PREV
115 | NEXT |
116 |
117 | FRAMES
118 | NO FRAMES
119 |
126 |
129 |
130 |
131 | |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
--------------------------------------------------------------------------------
/app/libs/Parse-1.5.0-javadoc/com/parse/class-use/ParseTwitterUtils.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Uses of Class com.parse.ParseTwitterUtils
7 |
8 |
9 |
10 |
11 |
12 |
20 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 | |
35 |
36 |
47 | |
48 |
49 |
50 | |
51 |
52 |
53 |
54 | |
55 | PREV
56 | NEXT |
57 |
58 | FRAMES
59 | NO FRAMES
60 |
67 |
70 |
71 |
72 | |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 | Uses of Class
com.parse.ParseTwitterUtils
82 |
83 | No usage of com.parse.ParseTwitterUtils
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 | |
94 |
95 |
106 | |
107 |
108 |
109 | |
110 |
111 |
112 |
113 | |
114 | PREV
115 | NEXT |
116 |
117 | FRAMES
118 | NO FRAMES
119 |
126 |
129 |
130 |
131 | |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
--------------------------------------------------------------------------------
/app/libs/Parse-1.5.0-javadoc/com/parse/class-use/ParseFacebookUtils.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Uses of Class com.parse.ParseFacebookUtils
7 |
8 |
9 |
10 |
11 |
12 |
20 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 | |
35 |
36 |
47 | |
48 |
49 |
50 | |
51 |
52 |
53 |
54 | |
55 | PREV
56 | NEXT |
57 |
58 | FRAMES
59 | NO FRAMES
60 |
67 |
70 |
71 |
72 | |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 | Uses of Class
com.parse.ParseFacebookUtils
82 |
83 | No usage of com.parse.ParseFacebookUtils
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 | |
94 |
95 |
106 | |
107 |
108 |
109 | |
110 |
111 |
112 |
113 | |
114 | PREV
115 | NEXT |
116 |
117 | FRAMES
118 | NO FRAMES
119 |
126 |
129 |
130 |
131 | |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
--------------------------------------------------------------------------------
/app/libs/Parse-1.5.0-javadoc/com/parse/class-use/ParseAnonymousUtils.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Uses of Class com.parse.ParseAnonymousUtils
7 |
8 |
9 |
10 |
11 |
12 |
20 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 | |
35 |
36 |
47 | |
48 |
49 |
50 | |
51 |
52 |
53 |
54 | |
55 | PREV
56 | NEXT |
57 |
58 | FRAMES
59 | NO FRAMES
60 |
67 |
70 |
71 |
72 | |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 | Uses of Class
com.parse.ParseAnonymousUtils
82 |
83 | No usage of com.parse.ParseAnonymousUtils
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 | |
94 |
95 |
106 | |
107 |
108 |
109 | |
110 |
111 |
112 |
113 | |
114 | PREV
115 | NEXT |
116 |
117 | FRAMES
118 | NO FRAMES
119 |
126 |
129 |
130 |
131 | |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
--------------------------------------------------------------------------------
/app/src/main/java/com/example/docapp/app/DisplayPatientAppointments.java:
--------------------------------------------------------------------------------
1 | package com.example.docapp.app;
2 |
3 | import android.app.ListActivity;
4 | import android.content.Intent;
5 | import android.support.v7.app.ActionBarActivity;
6 | import android.os.Bundle;
7 | import android.util.Log;
8 | import android.view.Menu;
9 | import android.view.MenuItem;
10 | import android.view.View;
11 | import android.widget.AdapterView;
12 | import android.widget.ArrayAdapter;
13 | import android.widget.ListView;
14 | import android.widget.TextView;
15 | import android.widget.Toast;
16 |
17 | import com.parse.FindCallback;
18 | import com.parse.ParseException;
19 | import com.parse.ParseObject;
20 | import com.parse.ParseQuery;
21 | import com.parse.ParseUser;
22 |
23 | import java.util.ArrayList;
24 | import java.util.List;
25 |
26 |
27 | public class DisplayPatientAppointments extends ListActivity implements AdapterView.OnItemClickListener {
28 |
29 | ListView mlistview;
30 | ArrayAdapter adapter;
31 | ArrayList entries;
32 |
33 | @Override
34 | protected void onCreate(Bundle savedInstanceState) {
35 | super.onCreate(savedInstanceState);
36 | setContentView(R.layout.activity_display_patient_appointments);
37 | mlistview = (ListView)findViewById(android.R.id.list);
38 |
39 | entries = new ArrayList();
40 |
41 | adapter = new ArrayAdapter(this,
42 | android.R.layout.simple_list_item_1, entries);
43 |
44 | mlistview.setAdapter(adapter);
45 | mlistview.setOnItemClickListener(this);
46 | updateData();
47 | }
48 |
49 | public void updateData(){
50 |
51 | ParseUser cuser = ParseUser.getCurrentUser();
52 |
53 | final String[] response = new String[5];
54 | ParseQuery oQuery = ParseQuery.getQuery("Appointments");
55 | oQuery.whereEqualTo("patientId", cuser.getObjectId());
56 | oQuery.findInBackground(new FindCallback() {
57 | public void done(List results, ParseException e) {
58 | // results has the list of users with a hometown team with a winning record
59 | int i = 0;
60 | for (ParseObject result : results) {
61 | // This does not require a network access.
62 | response[0] = result.getString("reason");
63 | response[1] = result.getString("time");
64 | response[2] = result.getString("date");
65 | response[3] = result.getString("docId");
66 | ParseQuery userQuery = ParseUser.getQuery();
67 | userQuery.whereEqualTo("objectId", response[3]);
68 | userQuery.findInBackground(new FindCallback() {
69 | public void done(List results, ParseException e) {
70 | // results has the list of users with a hometown team with a winning record
71 | int i=0;
72 | for (ParseObject result : results) {
73 | // This does not require a network access.
74 | //ParseObject user = result.getParseObject("userType");
75 | String fname = result.getString("Fname");
76 | String lname = result.getString("Lname");
77 |
78 | //where.add(fname+" "+lname);
79 | //values[i]=fname+" "+lname;
80 | //i++;
81 | response[4]=fname+lname;
82 | adapter.setNotifyOnChange(true);
83 | adapter.add("Appointment "+"with "+response[4]+" at "+response[1]+" on "+response[2]);
84 | Log.d("post", "retrieved a related post "+fname+" "+lname);
85 | }
86 | }
87 | });
88 | //ParseObject user = result.getParseObject("userType");
89 |
90 |
91 | //where.add(fname+" "+lname);
92 | //values[i]=fname+" "+lname;
93 | //i++;
94 | //adapter.setNotifyOnChange(true);
95 | //adapter.add("Appointment "+"with "+response[4]+);
96 |
97 | //Log.d("post", "retrieved a related post " + fname + " " + lname);
98 | }
99 | }
100 | });
101 |
102 |
103 | }
104 |
105 | @Override
106 | public void onItemClick(AdapterView> adapterView, View view, int i, long l) {
107 | String res;
108 | String res2 = adapter.getItem(i);
109 | TextView taskDescription = (TextView) view.findViewById(android.R.id.list);
110 | //res = taskDescription.getText().toString();
111 | Toast.makeText(this, res2 + " selected", Toast.LENGTH_LONG).show();
112 |
113 | //Intent intent = new Intent(this, DisplayDoc.class);
114 | //intent.putExtra(PatientHome.EXTRA_selectedDoc, res2);
115 | //startActivity(intent);
116 |
117 | }
118 |
119 | @Override
120 | public boolean onCreateOptionsMenu(Menu menu) {
121 |
122 | // Inflate the menu; this adds items to the action bar if it is present.
123 | getMenuInflater().inflate(R.menu.display_patient_appointments, menu);
124 | return true;
125 | }
126 |
127 | @Override
128 | public boolean onOptionsItemSelected(MenuItem item) {
129 | // Handle action bar item clicks here. The action bar will
130 | // automatically handle clicks on the Home/Up button, so long
131 | // as you specify a parent activity in AndroidManifest.xml.
132 | int id = item.getItemId();
133 | if (id == R.id.action_settings) {
134 | return true;
135 | }
136 | return super.onOptionsItemSelected(item);
137 | }
138 |
139 | }
140 |
--------------------------------------------------------------------------------