|
@@ -155,58 +155,46 @@ namespace WpfTest1.SQLite
|
|
|
|
|
|
#region Patient表各类操作
|
|
|
//Patient表的插入
|
|
|
- public static void InsertPatientData(string record_id,string idNum,string name, double height, double weight,int base_heartrate,int pregnancy_times,int birth_times,DateTime pregnancy_date,string mobile,string profession,string address,string category,string group_1, string firstLetterPY,string description,DateTime lastRecordDate,Boolean delete_flag, DateTime birth_date)
|
|
|
+ public static void InsertPatientData(string record_id,string name, string gender, double height, double weight,int pregnancy_times,DateTime birth_date,string phone,string address,string history,string diagnosis, string name_py)
|
|
|
{
|
|
|
- string sql = "INSERT INTO Patient(record_id,idNum,name,height,weight,base_heartrate,pregnancy_times,birth_times,pregnancy_date,mobile,profession,address,category,group_1,firstLetterPY,description,lastRecordDate,delete_flag,birth_date)values(@record_id,@idNum,@name,@height,@weight,@base_heartrate,@pregnancy_times,@birth_times,@pregnancy_date,@mobile,@profession,@address,@category,@group_1,@firstLetterPY,@description,@lastRecordDate,@delete_flag,@birth_date)";
|
|
|
+ string sql = "INSERT INTO Patient(p_record_id,p_name,p_gender,p_height,p_weight,p_pregnancy_time,p_birthdate,p_phone,p_address,p_history,p_diagnosis, p_name_py)"+
|
|
|
+ "values(@record_id,@name,@gender,@height,@weight,@pregnancy_times,@birthdate,@phone,@address,@history,@diagnosis,@name_py)";
|
|
|
SQLiteHelper db = new SQLiteHelper(dbPath);
|
|
|
SQLiteParameter[] parameters = new SQLiteParameter[]{
|
|
|
new SQLiteParameter("@record_id",record_id),
|
|
|
- new SQLiteParameter("@idNum",idNum),
|
|
|
new SQLiteParameter("@name",name),
|
|
|
+ new SQLiteParameter("@gender",gender),
|
|
|
new SQLiteParameter("@height",height),
|
|
|
new SQLiteParameter("@weight",weight),
|
|
|
- new SQLiteParameter("@base_heartrate",base_heartrate),
|
|
|
new SQLiteParameter("@pregnancy_times",pregnancy_times),
|
|
|
- new SQLiteParameter("@birth_times",birth_times),
|
|
|
- new SQLiteParameter("@pregnancy_date",pregnancy_date),
|
|
|
- new SQLiteParameter("@mobile",mobile),
|
|
|
- new SQLiteParameter("@profession",profession),
|
|
|
+ new SQLiteParameter("@birthdate",birth_date),
|
|
|
+ new SQLiteParameter("@phone",phone),
|
|
|
new SQLiteParameter("@address",address),
|
|
|
- new SQLiteParameter("@category",category),
|
|
|
- new SQLiteParameter("@group_1",group_1),
|
|
|
- new SQLiteParameter("@firstLetterPY",firstLetterPY),
|
|
|
- new SQLiteParameter("@description",description),
|
|
|
- new SQLiteParameter("@lastRecordDate",lastRecordDate),
|
|
|
- new SQLiteParameter("@delete_flag",delete_flag),
|
|
|
- new SQLiteParameter("@birth_date",birth_date)
|
|
|
+ new SQLiteParameter("@history",history),
|
|
|
+ new SQLiteParameter("@diagnosis",diagnosis),
|
|
|
+ new SQLiteParameter("@name_py",name_py),
|
|
|
};
|
|
|
db.ExecuteNonQuery(sql, parameters);
|
|
|
}
|
|
|
//Patient表的插入 返回自增主键
|
|
|
- public static int InsertPatientAndReturnID(string record_id, string idNum, string name, double height, double weight, int base_heartrate, int pregnancy_times, int birth_times, DateTime pregnancy_date, string mobile, string profession, string address, string category, string group_1, string firstLetterPY, string description, DateTime lastRecordDate, Boolean delete_flag, DateTime birth_date)
|
|
|
+ public static int InsertPatientAndReturnID(string record_id, string name, string gender, double height, double weight, int pregnancy_times, DateTime birth_date, string phone, string address, string history, string diagnosis, string name_py)
|
|
|
{
|
|
|
- string sql = "INSERT INTO Patient(record_id,idNum,name,height,weight,base_heartrate,pregnancy_times,birth_times,pregnancy_date,mobile,profession,address,category,group_1,firstLetterPY,description,lastRecordDate,delete_flag,birth_date)values(@record_id,@idNum,@name,@height,@weight,@base_heartrate,@pregnancy_times,@birth_times,@pregnancy_date,@mobile,@profession,@address,@category,@group_1,@firstLetterPY,@description,@lastRecordDate,@delete_flag,@birth_date);";
|
|
|
+ string sql = "INSERT INTO Patient(p_record_id,p_name,p_gender,p_height,p_weight,p_pregnancy_time,p_birthdate,p_phone,p_address,p_history,p_diagnosis, p_name_py)" +
|
|
|
+ "values(@record_id,@name,@gender,@height,@weight,@pregnancy_times,@birthdate,@phone,@address,@history,@diagnosis,@name_py)";
|
|
|
SQLiteHelper db = new SQLiteHelper(dbPath);
|
|
|
SQLiteParameter[] parameters = new SQLiteParameter[]{
|
|
|
new SQLiteParameter("@record_id",record_id),
|
|
|
- new SQLiteParameter("@idNum",idNum),
|
|
|
new SQLiteParameter("@name",name),
|
|
|
+ new SQLiteParameter("@gender",gender),
|
|
|
new SQLiteParameter("@height",height),
|
|
|
new SQLiteParameter("@weight",weight),
|
|
|
- new SQLiteParameter("@base_heartrate",base_heartrate),
|
|
|
new SQLiteParameter("@pregnancy_times",pregnancy_times),
|
|
|
- new SQLiteParameter("@birth_times",birth_times),
|
|
|
- new SQLiteParameter("@pregnancy_date",pregnancy_date),
|
|
|
- new SQLiteParameter("@mobile",mobile),
|
|
|
- new SQLiteParameter("@profession",profession),
|
|
|
+ new SQLiteParameter("@birthdate",birth_date),
|
|
|
+ new SQLiteParameter("@phone",phone),
|
|
|
new SQLiteParameter("@address",address),
|
|
|
- new SQLiteParameter("@category",category),
|
|
|
- new SQLiteParameter("@group_1",group_1),
|
|
|
- new SQLiteParameter("@firstLetterPY",firstLetterPY),
|
|
|
- new SQLiteParameter("@description",description),
|
|
|
- new SQLiteParameter("@lastRecordDate",lastRecordDate),
|
|
|
- new SQLiteParameter("@delete_flag",delete_flag),
|
|
|
- new SQLiteParameter("@birth_date",birth_date)
|
|
|
+ new SQLiteParameter("@history",history),
|
|
|
+ new SQLiteParameter("@diagnosis",diagnosis),
|
|
|
+ new SQLiteParameter("@name_py",name_py),
|
|
|
};
|
|
|
db.ExecuteNonQuery(sql, parameters);
|
|
|
//Console.WriteLine(db.ExecuteScalar("select last_insert_rowid() from Patient",null).ToString());
|
|
@@ -221,66 +209,59 @@ namespace WpfTest1.SQLite
|
|
|
}
|
|
|
|
|
|
//Patient表的更新 不更新生日
|
|
|
- public static void UpdatePatientData2(string id, string record_id, string idNum, string name, double height, double weight, int base_heartrate, int pregnancy_times, int birth_times, DateTime pregnancy_date, string mobile, string profession, string address, string category, string group_1, string firstLetterPY, string description, Boolean delete_flag)
|
|
|
+ public static void UpdatePatientData2_useless(string record_id, string name, string gender, double height, double weight, int pregnancy_times, DateTime birth_date, string phone, string address, string history, string diagnosis, string name_py)
|
|
|
{
|
|
|
//Boolean a = false;
|
|
|
- string sql = "UPDATE Patient SET record_id=@record_id,idNum=@idNum,name=@name,height=@height,weight=@weight,base_heartrate=@base_heartrate,pregnancy_times=@pregnancy_times,birth_times = @birth_times,pregnancy_date= @pregnancy_date, mobile = @mobile,profession=@profession,address=@address,category=@category,group_1=@group_1,firstLetterPY=@firstLetterPY,description=@description,delete_flag=@delete_flag WHERE id=@id";
|
|
|
+ string sql = "UPDATE Patient SET p_record_id=@record_id,p_name=@name,p_gender=@gender,p_height=@height,p_weight=@weight,p_pregnancy_time=@pregnancy_times,p_birthdate= @birth_date, p_phone = @mobile,p_address=@address,p_history=@history,p_diagnosis=@diagnosis,p_name_py=@name_py WHERE id=@id";
|
|
|
SQLiteHelper db = new SQLiteHelper(dbPath);
|
|
|
SQLiteParameter[] parameters = new SQLiteParameter[]{
|
|
|
new SQLiteParameter("@record_id",record_id),
|
|
|
- new SQLiteParameter("@idNum",idNum),
|
|
|
new SQLiteParameter("@name",name),
|
|
|
+ new SQLiteParameter("@gender",gender),
|
|
|
new SQLiteParameter("@height",height),
|
|
|
new SQLiteParameter("@weight",weight),
|
|
|
- new SQLiteParameter("@base_heartrate",base_heartrate),
|
|
|
new SQLiteParameter("@pregnancy_times",pregnancy_times),
|
|
|
- new SQLiteParameter("@birth_times",birth_times),
|
|
|
- new SQLiteParameter("@pregnancy_date",pregnancy_date),
|
|
|
- new SQLiteParameter("@mobile",mobile),
|
|
|
- new SQLiteParameter("@profession",profession),
|
|
|
+ new SQLiteParameter("@birthdate",birth_date),
|
|
|
+ new SQLiteParameter("@phone",phone),
|
|
|
new SQLiteParameter("@address",address),
|
|
|
- new SQLiteParameter("@category",category),
|
|
|
- new SQLiteParameter("@group_1",group_1),
|
|
|
- new SQLiteParameter("@firstLetterPY",firstLetterPY),
|
|
|
- new SQLiteParameter("@description",description),
|
|
|
- new SQLiteParameter("@delete_flag",delete_flag),
|
|
|
- new SQLiteParameter("@id",id)
|
|
|
+ new SQLiteParameter("@history",history),
|
|
|
+ new SQLiteParameter("@diagnosis",diagnosis),
|
|
|
+ new SQLiteParameter("@name_py",name_py),
|
|
|
};
|
|
|
db.ExecuteNonQuery(sql, parameters);
|
|
|
}
|
|
|
//Patient表的更新
|
|
|
- public static void UpdatePatientData(string id,string record_id ,string idNum, string name, double height, double weight, int base_heartrate, int pregnancy_times, int birth_times,DateTime pregnancy_date, string mobile, string profession, string address, string category, string group_1, string firstLetterPY, string description, Boolean delete_flag, DateTime birth_date)
|
|
|
+ public static void UpdatePatientData(string id, string record_id, string name, string gender, double height, double weight, int pregnancy_times, DateTime birth_date, string phone, string address, string history, string diagnosis, string name_py)
|
|
|
{
|
|
|
//Boolean a = false;
|
|
|
- string sql = "UPDATE Patient SET record_id=@record_id,idNum=@idNum,name=@name,height=@height,weight=@weight,base_heartrate=@base_heartrate,pregnancy_times=@pregnancy_times,birth_times = @birth_times,pregnancy_date= @pregnancy_date, mobile = @mobile,profession=@profession,address=@address,category=@category,group_1=@group_1,firstLetterPY=@firstLetterPY,description=@description,delete_flag=@delete_flag,birth_date=@birth_date WHERE id=@id";
|
|
|
+ string sql = "UPDATE Patient SET p_record_id=@record_id,p_name=@name,p_gender=@gender,p_height=@height,p_weight=@weight,p_pregnancy_time=@pregnancy_times,p_birthdate=@birth_date,p_phone=@phone,p_address=@address,p_history=@history,p_diagnosis=@diagnosis,p_name_py=@name_py WHERE p_id=@id";
|
|
|
SQLiteHelper db = new SQLiteHelper(dbPath);
|
|
|
SQLiteParameter[] parameters = new SQLiteParameter[]{
|
|
|
new SQLiteParameter("@record_id",record_id),
|
|
|
- new SQLiteParameter("@idNum",idNum),
|
|
|
new SQLiteParameter("@name",name),
|
|
|
+ new SQLiteParameter("@gender",gender),
|
|
|
new SQLiteParameter("@height",height),
|
|
|
new SQLiteParameter("@weight",weight),
|
|
|
- new SQLiteParameter("@base_heartrate",base_heartrate),
|
|
|
new SQLiteParameter("@pregnancy_times",pregnancy_times),
|
|
|
- new SQLiteParameter("@birth_times",birth_times),
|
|
|
- new SQLiteParameter("@pregnancy_date",pregnancy_date),
|
|
|
- new SQLiteParameter("@mobile",mobile),
|
|
|
- new SQLiteParameter("@profession",profession),
|
|
|
- new SQLiteParameter("@address",address),
|
|
|
- new SQLiteParameter("@category",category),
|
|
|
- new SQLiteParameter("@group_1",group_1),
|
|
|
- new SQLiteParameter("@firstLetterPY",firstLetterPY),
|
|
|
- new SQLiteParameter("@description",description),
|
|
|
- new SQLiteParameter("@delete_flag",delete_flag),
|
|
|
new SQLiteParameter("@birth_date",birth_date),
|
|
|
- new SQLiteParameter("@id",id)
|
|
|
+ new SQLiteParameter("@phone",phone),
|
|
|
+ new SQLiteParameter("@address",address),
|
|
|
+ new SQLiteParameter("@history",history),
|
|
|
+ new SQLiteParameter("@diagnosis",diagnosis),
|
|
|
+ new SQLiteParameter("@name_py",name_py),
|
|
|
+ new SQLiteParameter("@id",id),
|
|
|
};
|
|
|
+ //System.Console.WriteLine(sql);
|
|
|
db.ExecuteNonQuery(sql, parameters);
|
|
|
}
|
|
|
- //Patient表的仅更新最后测量时间的方法
|
|
|
- public static void UpdatePatientDataWithLastMeasureDate(string id, DateTime lastRecordDate)
|
|
|
+ //Patient表的仅更新最后XX时间的方法
|
|
|
+ //type 为 filter 或 evaluation
|
|
|
+ public static void UpdatePatientDataWithLastFilterDate(string id, string type, DateTime lastRecordDate)
|
|
|
{
|
|
|
- string sql = "UPDATE Patient SET lastRecordDate=@lastRecordDate WHERE id=@id";
|
|
|
+ string colum_select = "p_last_filter_time";
|
|
|
+ if(type == "evaluation")
|
|
|
+ colum_select = "p_last_evaluation_time";
|
|
|
+ string sql = "UPDATE Patient SET " + colum_select + "=@lastRecordDate WHERE p_id=@id";
|
|
|
SQLiteHelper db = new SQLiteHelper(dbPath);
|
|
|
SQLiteParameter[] parameters = new SQLiteParameter[]{
|
|
|
new SQLiteParameter("@lastRecordDate",lastRecordDate),
|
|
@@ -292,7 +273,7 @@ namespace WpfTest1.SQLite
|
|
|
//Patient表记录的删除
|
|
|
public static int DeletePatientItem(string id)
|
|
|
{
|
|
|
- string sql = "UPDATE Patient SET delete_flag=1 WHERE id=@id";
|
|
|
+ string sql = "UPDATE Patient SET p_delete_flag=1 WHERE p_id=@id";
|
|
|
SQLiteHelper db = new SQLiteHelper(dbPath);
|
|
|
SQLiteParameter[] parameters = new SQLiteParameter[]{
|
|
|
new SQLiteParameter("@id",id)
|
|
@@ -304,7 +285,7 @@ namespace WpfTest1.SQLite
|
|
|
/// </summary>
|
|
|
public static List<string> getDeletedPatients()
|
|
|
{
|
|
|
- string sql = "SELECT id FROM Patient WHERE delete_flag = 1";
|
|
|
+ string sql = "SELECT p_id FROM Patient WHERE p_delete_flag = 1";
|
|
|
SQLiteHelper db = new SQLiteHelper(dbPath);
|
|
|
SQLiteParameter[] parameters = new SQLiteParameter[] { };
|
|
|
List<string> result = new List<string>();
|
|
@@ -323,20 +304,19 @@ namespace WpfTest1.SQLite
|
|
|
/// </summary>
|
|
|
public static int realDeleteRecords()
|
|
|
{
|
|
|
- string sql = "DELETE from Patient WHERE delete_flag=1";
|
|
|
+ string sql = "DELETE from Patient WHERE p_delete_flag=1";
|
|
|
SQLiteHelper db = new SQLiteHelper(dbPath);
|
|
|
SQLiteParameter[] parameters = new SQLiteParameter[]{ };
|
|
|
return db.ExecuteNonQuery(sql, parameters);
|
|
|
}
|
|
|
|
|
|
- //检查Patient表是否重复,条件提供身份号和病例号(至少一个)重复返回true,否则返回false
|
|
|
- public static bool checkRepeatPatient(string idnum,string record_id)
|
|
|
+ //检查Patient表是否重复,条件提病例号.重复返回true,否则返回false
|
|
|
+ public static bool checkRepeatPatient(string record_id)
|
|
|
{
|
|
|
- string sql = "SELECT * FROM Patient WHERE (record_id = @record_id OR idNum = @idnum) AND delete_flag = 0";
|
|
|
+ string sql = "SELECT * FROM Patient WHERE p_record_id = @record_id AND p_delete_flag = 0";
|
|
|
SQLiteHelper db = new SQLiteHelper(dbPath);
|
|
|
SQLiteParameter[] parameters = new SQLiteParameter[]{
|
|
|
- new SQLiteParameter("@record_id",record_id),
|
|
|
- new SQLiteParameter("@idnum",idnum)
|
|
|
+ new SQLiteParameter("@record_id",record_id)
|
|
|
};
|
|
|
using (SQLiteDataReader reader = db.ExecuteReader(sql, parameters))
|
|
|
{
|
|
@@ -349,7 +329,7 @@ namespace WpfTest1.SQLite
|
|
|
return false;
|
|
|
}
|
|
|
//通过身份证号、孕次、产次查找Patient
|
|
|
- public static Patient getPatientByIdNum_pregnancy_brith(string idNum,int pregnancy_times, int birth_times)
|
|
|
+ public static Patient getPatientByIdNum_pregnancy_brith_useless(string idNum,int pregnancy_times, int birth_times)
|
|
|
{
|
|
|
string sql = "SELECT * FROM Patient WHERE idNUm = @idNum AND pregnancy_times = @pregnancy_times AND birth_times = @birth_times AND delete_flag = 0 LIMIT 1";
|
|
|
SQLiteHelper db = new SQLiteHelper(dbPath);
|
|
@@ -362,7 +342,7 @@ namespace WpfTest1.SQLite
|
|
|
using (SQLiteDataReader reader = db.ExecuteReader(sql, parameters))
|
|
|
{
|
|
|
while (reader.Read())
|
|
|
- {
|
|
|
+ {/*
|
|
|
Patient temp = new Patient();
|
|
|
temp.id = reader.IsDBNull(0) ? 0 : reader.GetInt32(0);
|
|
|
temp.record_id = reader.IsDBNull(1) ? "" : reader.GetString(1);
|
|
@@ -381,7 +361,7 @@ namespace WpfTest1.SQLite
|
|
|
temp.group_1 = reader.IsDBNull(14) ? "" : reader.GetString(14);
|
|
|
temp.firstLetterPY = reader.IsDBNull(15) ? "" : reader.GetString(15);
|
|
|
temp.description = reader.IsDBNull(16) ? "" : reader.GetString(16);
|
|
|
- return temp;
|
|
|
+ return temp;*/
|
|
|
}
|
|
|
}
|
|
|
return null;
|
|
@@ -390,7 +370,7 @@ namespace WpfTest1.SQLite
|
|
|
//通过id主键查找Patient
|
|
|
public static Patient getPatientById(string id)
|
|
|
{
|
|
|
- string sql = "SELECT * FROM Patient WHERE id = @id AND delete_flag = 0 LIMIT 1";
|
|
|
+ string sql = "SELECT * FROM Patient WHERE p_id = @id AND p_delete_flag = 0 LIMIT 1";
|
|
|
SQLiteHelper db = new SQLiteHelper(dbPath);
|
|
|
SQLiteParameter[] parameters = new SQLiteParameter[]{
|
|
|
new SQLiteParameter("@id",id),
|
|
@@ -400,30 +380,30 @@ namespace WpfTest1.SQLite
|
|
|
while (reader.Read())
|
|
|
{
|
|
|
Patient temp = new Patient();
|
|
|
- temp.id = reader.IsDBNull(0) ? 0 : reader.GetInt32(0);
|
|
|
- temp.record_id = reader.IsDBNull(1) ? "" : reader.GetString(1);
|
|
|
- temp.idNum = reader.IsDBNull(2) ? "" : reader.GetString(2);
|
|
|
- temp.name = reader.IsDBNull(3) ? "" : reader.GetString(3);
|
|
|
- temp.height = reader.IsDBNull(4) ? 0 : reader.GetDouble(4);
|
|
|
- temp.weight = reader.IsDBNull(5) ? 0 : reader.GetDouble(5);
|
|
|
- temp.base_heartrate = reader.IsDBNull(6) ? 0 : reader.GetInt32(6);
|
|
|
- temp.pregnancy_times = reader.IsDBNull(7) ? 0 : reader.GetInt32(7);
|
|
|
- temp.birth_times = reader.IsDBNull(8) ? 0 : reader.GetInt32(8);
|
|
|
- temp.pregnancy_date = reader.IsDBNull(9) ? DateTime.MinValue : reader.GetDateTime(9);
|
|
|
- temp.mobile = reader.IsDBNull(10) ? "" : reader.GetString(10);
|
|
|
- temp.profession = reader.IsDBNull(11) ? "" : reader.GetString(11);
|
|
|
- temp.address = reader.IsDBNull(12) ? "" : reader.GetString(12);
|
|
|
- temp.category = reader.IsDBNull(13) ? "" : reader.GetString(13);
|
|
|
- temp.group_1 = reader.IsDBNull(14) ? "" : reader.GetString(14);
|
|
|
- temp.firstLetterPY = reader.IsDBNull(15) ? "" : reader.GetString(15);
|
|
|
- temp.description = reader.IsDBNull(16) ? "" : reader.GetString(16);
|
|
|
+ temp.p_id = reader.IsDBNull(0) ? 0 : reader.GetInt32(0);
|
|
|
+ temp.p_name = reader.IsDBNull(1) ? "" : reader.GetString(1);
|
|
|
+ temp.p_name_py = reader.IsDBNull(2) ? "" : reader.GetString(2);
|
|
|
+ temp.p_record_id = reader.IsDBNull(3) ? "" : reader.GetString(3);
|
|
|
+ temp.p_gender = reader.IsDBNull(4) ? "" : reader.GetString(4);
|
|
|
+ temp.p_birthdate = reader.IsDBNull(5) ? DateTime.MinValue : reader.GetDateTime(5);
|
|
|
+ temp.p_height = reader.IsDBNull(6) ? 0 : reader.GetDouble(6);
|
|
|
+ temp.p_weight = reader.IsDBNull(7) ? 0 : reader.GetDouble(7);
|
|
|
+ temp.p_pregnancy_time = reader.IsDBNull(8) ? 0 : reader.GetInt32(8);
|
|
|
+ temp.p_phone = reader.IsDBNull(9) ? "" : reader.GetString(9);
|
|
|
+ temp.p_address = reader.IsDBNull(10) ? "" : reader.GetString(10);
|
|
|
+ temp.p_history = reader.IsDBNull(11) ? "" : reader.GetString(11);
|
|
|
+ temp.p_diagnosis = reader.IsDBNull(12) ? "" : reader.GetString(12);
|
|
|
+ temp.doc_id = reader.IsDBNull(13) ? 0 : reader.GetInt32(13);
|
|
|
+ temp.p_last_filter_time = reader.IsDBNull(14) ? DateTime.MinValue : reader.GetDateTime(14);
|
|
|
+ temp.p_last_evaluation_time = reader.IsDBNull(15) ? DateTime.MinValue : reader.GetDateTime(15);
|
|
|
+ temp.p_delete_flag = reader.IsDBNull(16) ? false : reader.GetBoolean(16); ;
|
|
|
return temp;
|
|
|
}
|
|
|
}
|
|
|
return null;
|
|
|
}
|
|
|
//根据拼音获取patient记录
|
|
|
- public static void getPatientByPY(string py)
|
|
|
+ public static void getPatientByPY_useless(string py)
|
|
|
{
|
|
|
//查询从20条起的50条记录
|
|
|
string sql = "SELECT * FROM Patient WHERE firstLetterPY like\'%" + py + "%\' AND delete_flag=0";
|
|
@@ -437,7 +417,7 @@ namespace WpfTest1.SQLite
|
|
|
}
|
|
|
}
|
|
|
//根据姓名获取patient记录
|
|
|
- public static void getPatientByName(string name)
|
|
|
+ public static void getPatientByName_useless(string name)
|
|
|
{
|
|
|
string sql = "SELECT * FROM Patient WHERE name like\'%" + name+ "%\' AND delete_flag=0";
|
|
|
Console.WriteLine(sql);
|
|
@@ -452,7 +432,7 @@ namespace WpfTest1.SQLite
|
|
|
}
|
|
|
}
|
|
|
//根据condition获取patient记录
|
|
|
- public static DataView getPatientByCondition(string condition)
|
|
|
+ public static DataView getPatientByCondition_useless(string condition)
|
|
|
{
|
|
|
/*
|
|
|
*
|
|
@@ -490,7 +470,7 @@ namespace WpfTest1.SQLite
|
|
|
}
|
|
|
|
|
|
//获取Patient表的用户所有分类和所有用户组
|
|
|
- public static List<string> getCategory(string taskType="category")
|
|
|
+ public static List<string> getCategory_useless(string taskType="category")
|
|
|
{
|
|
|
string sql = "SELECT " + taskType + " FROM Patient WHERE delete_flag = 0 group by " + taskType;
|
|
|
List<string> result = new List<string>();
|