Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Master #1

Open
wants to merge 48 commits into
base: teambranch
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
779eff9
test message!!!
stvncruickshank Oct 18, 2017
56f7bee
test message!!!
stvncruickshank Oct 18, 2017
662b5f6
commit test message
stvncruickshank Oct 18, 2017
3dc83a1
Added a couple of comments! -SC
stvncruickshank Oct 22, 2017
9393a80
added a few comments! -SC
stvncruickshank Oct 22, 2017
1b61f4c
Added a few comments! -SC
stvncruickshank Oct 22, 2017
830921a
added comments to the medicineList, quiz, and the sort Dialog, MTD
MussieTD Oct 29, 2017
6d52bb1
modified recyclerView. added icon for every listItem, added title row…
cloudedesu Oct 30, 2017
9408ccb
modified fragment_card_back.xml. change somecode in cardBackFragment.…
cloudedesu Oct 31, 2017
532f2ff
Revert "added comments to the medicineList, quiz, and the sort Dialog…
rafiksoufiane Nov 6, 2017
556a4f8
Revert "Added a few comments! -SC"
rafiksoufiane Nov 6, 2017
4fc0b4a
Revert "Revert "Added a few comments! -SC""
rafiksoufiane Nov 6, 2017
ac36ec7
Revert "modified fragment_card_back.xml. change somecode in cardBackF…
MussieTD Nov 6, 2017
82bc827
:confetti_ball: Added .gitattributes
MussieTD Nov 9, 2017
a15b44d
hope this works
MussieTD Nov 10, 2017
9cdf39c
Merge branch 'master' of https://github.com/rafiksoufiane/PharmTech
MussieTD Nov 10, 2017
e3797b5
added color icon and first letter of Generic name for druglist recycl…
cloudedesu Nov 12, 2017
e7ae544
commiting both xianbens changes and stevens
MussieTD Nov 13, 2017
9573293
- Included the "Drug of the day" option in the menu.
wakeupcitizen Nov 14, 2017
f236e8a
- Included the "Drug of the day" option in the menu.
wakeupcitizen Nov 14, 2017
a7cde24
- Included the "Drug of the day" option in the menu.
wakeupcitizen Nov 14, 2017
61d054c
- Included the "Drug of the day" option in the menu.
wakeupcitizen Nov 14, 2017
1f382e9
- Fixed the color on drawable
wakeupcitizen Nov 14, 2017
ad4bbdb
changed the color on icn_play_solid due to complications
MussieTD Nov 15, 2017
99e946c
db change
MussieTD Nov 15, 2017
2fc0e2f
Merge remote-tracking branch 'origin/master'
MussieTD Nov 15, 2017
5a50dbe
db change
MussieTD Nov 15, 2017
762e756
db change
MussieTD Nov 15, 2017
0150649
db change
MussieTD Nov 15, 2017
61a9a62
db change
MussieTD Nov 15, 2017
2647b1d
db change
MussieTD Nov 17, 2017
df4f3a4
db change
MussieTD Nov 17, 2017
a38022b
ab
MussieTD Nov 17, 2017
d736956
ab
MussieTD Nov 17, 2017
8a5d322
added (quiz) Mix and Match Fragment, slightly modified selectQuizFrag…
cloudedesu Nov 19, 2017
121cbc1
updated icons in fragment_medicine_list.xml and fragment_mix_match.xml
cloudedesu Nov 19, 2017
d578224
Merge remote-tracking branch 'origin/master'
MussieTD Nov 20, 2017
7bf5241
medLab
MussieTD Nov 20, 2017
6ad5a1e
added the true/false options and also added the new sounds
MussieTD Nov 20, 2017
bd033d6
adding audio files
MussieTD Nov 20, 2017
f40e059
my bad, accidentally commented out the drug of the day. fixed now
MussieTD Nov 22, 2017
d94b35f
have two forms of the true or false questions, and when the deaSchedu…
MussieTD Nov 27, 2017
cb9389a
Hey all! added a couple classes, xml layouts, etc to create the Legal…
stvncruickshank Nov 28, 2017
e83cfc3
Hey all! added a couple classes, xml layouts, etc to create the Legal…
stvncruickshank Nov 28, 2017
13735b0
updates to audio, cleaned up database
MussieTD Dec 9, 2017
e478ed3
edited names of audio files
MussieTD Dec 9, 2017
6f16ddd
Added Javadoc
rafiksoufiane Dec 10, 2017
59aa844
put in steven's changes to legal and about, checked database and audi…
MussieTD Dec 12, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
17 changes: 17 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Auto detect text files and perform LF normalization
* text=auto

# Custom for Visual Studio
*.cs diff=csharp

# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
Empty file modified .gitignore
100755 → 100644
Empty file.
1 change: 0 additions & 1 deletion .idea/.name

This file was deleted.

32 changes: 19 additions & 13 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .idea/scopes/javadoc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file modified app/.gitignore
100755 → 100644
Empty file.
4 changes: 3 additions & 1 deletion app/build.gradle
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apply plugin: 'com.android.application'

android {
compileSdkVersion 24
buildToolsVersion '25'
buildToolsVersion '26.0.2'

defaultConfig {
applicationId "com.bhcc.app.pharmtech"
Expand All @@ -29,4 +29,6 @@ dependencies {
compile 'com.android.support:design:24.2.0'
compile 'com.github.clans:fab:1.6.4'
compile 'com.android.support:support-v13:24.2.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'

}
Empty file modified app/libs/evo-inflector-1.2.jar
100755 → 100644
Empty file.
Empty file modified app/proguard-rules.pro
100755 → 100644
Empty file.
Empty file.
Empty file modified app/src/main/AndroidManifest.xml
100755 → 100644
Empty file.
Binary file added app/src/main/assets/DRUGS.db
Binary file not shown.
Binary file removed app/src/main/assets/TopDrugs.db
Binary file not shown.
Binary file added app/src/main/ic_launcher-web.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 45 additions & 0 deletions app/src/main/java/com/bhcc/app/pharmtech/AboutFragment.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
package com.bhcc.app.pharmtech;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.util.TypedValue;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;

/**
* Created by steven
* a rather simple fragment which will bring up the ABOUT section of the menu
* i put a test string in there until we figure out what exactly NEEDS to be placed in about
* section
*/

public class AboutFragment extends Fragment {
private LinearLayout linearLayout;
private TextView tvAbout;

@Override
public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
}
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState){
View view = inflater.inflate(R.layout.fragment_about, container, false);
linearLayout = (LinearLayout) view.findViewById(R.id.about_linear_layout);
tvAbout = (TextView) view.findViewById(R.id.about_text_view);
return view;
}
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
tvAbout.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 15);
tvAbout.setPadding(10, 20, 10, 20);
tvAbout.setGravity(Gravity.CENTER_HORIZONTAL);

//linearLayout.addView(tvLegal);
}
}
73 changes: 73 additions & 0 deletions app/src/main/java/com/bhcc/app/pharmtech/DrugOfTheDay.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
package com.bhcc.app.pharmtech;

import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

/**
* Created by soufiane on 11/13/17.
*/

public class DrugOfTheDay extends SQLiteOpenHelper {

public static final String DATABASE_NAME = "DRUGS.db";
public static final String TABLE_NAME = "TopDrugs";
public static final String COL_1 = "GenericName";
public static final String COL_2 = "NAME";


public DrugOfTheDay(Context context) {
super(context, DATABASE_NAME, null, 1);
}

@Override
public void onCreate(SQLiteDatabase db) {
db.execSQL("create table " + TABLE_NAME +" (ID INTEGER PRIMARY KEY AUTOINCREMENT,NAME TEXT,SURNAME TEXT,MARKS INTEGER)");
}

@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
db.execSQL("DROP TABLE IF EXISTS "+TABLE_NAME);
onCreate(db);
}

public boolean insertData(String name,String surname,String marks) {
SQLiteDatabase db = this.getWritableDatabase();
ContentValues contentValues = new ContentValues();
contentValues.put(COL_2,name);
long result = db.insert(TABLE_NAME,null ,contentValues);
if(result == -1)
return false;
else
return true;
}

public Cursor getAllData() {
SQLiteDatabase db = this.getWritableDatabase();
Cursor res = db.rawQuery("select * from "+TABLE_NAME,null);
return res;
}

public Cursor getDrugOfDay() {
SQLiteDatabase db = this.getWritableDatabase();
Cursor res = db.rawQuery("SELECT * FROM TopDrugs WHERE TopDrugs.wasDrugOfDay LIKE 'NO' ORDER BY RANDOM() LIMIT 1",null);
return res;
}

public boolean updateData(String id,String name,String surname,String marks) {
SQLiteDatabase db = this.getWritableDatabase();
ContentValues contentValues = new ContentValues();
contentValues.put(COL_1,id);
contentValues.put(COL_2,name);
db.update(TABLE_NAME, contentValues, "ID = ?",new String[] { id });
return true;
}

public Integer deleteData (String id) {
SQLiteDatabase db = this.getWritableDatabase();
return db.delete(TABLE_NAME, "ID = ?",new String[] {id});
}

}
45 changes: 45 additions & 0 deletions app/src/main/java/com/bhcc/app/pharmtech/LegalFragment.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
package com.bhcc.app.pharmtech;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.util.TypedValue;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;

/**
* Created by steven
* a rather simple fragment which will bring up the LEGAL section of the menu
* i put a test string in there until we figure out what exactly NEEDS to be placed in legal
* section
*/

public class LegalFragment extends Fragment {
private LinearLayout linearLayout;
private TextView tvLegal;

@Override
public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
}
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState){
View view = inflater.inflate(R.layout.fragment_legal, container, false);
linearLayout = (LinearLayout) view.findViewById(R.id.legal_linear_layout);
tvLegal = (TextView) view.findViewById(R.id.legal_text_view);
return view;
}
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
tvLegal.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 15);
tvLegal.setPadding(10, 20, 10, 20);
tvLegal.setGravity(Gravity.CENTER_HORIZONTAL);

//linearLayout.addView(tvLegal);
}
}
3 changes: 2 additions & 1 deletion app/src/main/java/com/bhcc/app/pharmtech/data/MedicineBaseHelper.java
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@

public class MedicineBaseHelper extends SQLiteOpenHelper {

private static String DB_NAME = "TopDrugs.db";
private static String DB_NAME = "DRUGS.db";


private SQLiteDatabase myDataBase;

Expand Down
Empty file.
8 changes: 6 additions & 2 deletions app/src/main/java/com/bhcc/app/pharmtech/data/MedicineLab.java
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
package com.bhcc.app.pharmtech.data;


import com.bhcc.app.pharmtech.data.model.Medicine;
//git test commit
//steven testing git pushing

import android.content.Context;
import android.database.Cursor;
import android.database.SQLException;
import android.database.sqlite.SQLiteDatabase;
import android.util.Log;

import com.bhcc.app.pharmtech.data.model.Medicine;

import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
Expand Down Expand Up @@ -173,6 +175,7 @@ public List<Medicine> getMedicinesWithRawSql(String rawSql, String[] whereArgs)
* To get study topics
* @return List of Study Topics
*/
//This is called by FilterFragment, when getting a list of study topics -sc
public List<String> getStudyTopics() {
MedicineCursorWrapper cursor = rawQueryCrimes(
"SELECT DISTINCT " + MedicineSchema.MedicineTable.Cols.STUDY_TOPIC + " FROM " +
Expand Down Expand Up @@ -237,6 +240,7 @@ private MedicineCursorWrapper rawQueryCrimes(String rawSql, String[] whereArgs)
* @param whereArgs
* @param orderBy
*/
//called by FilterFragment to returned SQL vals
public void updateMedicineLab(String whereClause, String[] whereArgs, String orderBy) {
MedicineCursorWrapper cursor = queryCrimes(whereClause, whereArgs, orderBy);

Expand Down
Empty file.
Empty file.
2 changes: 1 addition & 1 deletion app/src/main/java/com/bhcc/app/pharmtech/data/NoteLab.java
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class NoteLab {
private static NoteLab NoteLab;
private Context mContext;
private SQLiteDatabase mDatabase;
private static String DB_NAME = "TopDrugs.db";
private static String DB_NAME = "DRUGS.db";

/**
*
Expand Down
Empty file modified app/src/main/java/com/bhcc/app/pharmtech/data/NoteSchema.java
100755 → 100644
Empty file.
Empty file.
Empty file modified app/src/main/java/com/bhcc/app/pharmtech/data/model/Note.java
100755 → 100644
Empty file.
Loading