Пример #1
0
 /// <summary>
 /// 3 获取某种测试的试剂类型列表
 /// </summary>
 /// <param name="testTypeTag">测试类型编号</param>
 /// <returns></returns>
 public List<SimpleRowInfo> HRTestParms(int testTypeTag)
 {
     var condition = new ParadoxCondition.Compare(
         ParadoxCompareOperator.Equal, testTypeTag, 0, 0);
     QueryArgs q = new QueryArgs("HRTestParms", condition, "ProcTag", "ProcID");
     return GetSimpleRowInfos(q);
 }
Пример #2
0
 public HrTestParams GetTestParams(int procTag)
 {
     var condition =
         new ParadoxCondition.Compare(ParadoxCompareOperator.Equal, procTag, 2, 0);
     var sr = _Connection.ExecuteQuery("HRTestParms", condition, false);
     if (sr.Read())
     {
         HrTestParams result = new HrTestParams();
         result.ProcTag = procTag;
         result.ProcID = (string)sr["ProcID"];
         result.Abbrev = (string)sr["Abbrev"];
         return result;
     }
     return null;
 }
Пример #3
0
 internal List<SimpleResult> GetAllDates()
 {
     var condition =
         new ParadoxCondition.Compare(
             ParadoxCompareOperator.Greater, 0, 0, 0);
     var rdr = _Connection.ExecuteQuery("HRRuns", condition, false);
     List<SimpleResult> result = new List<SimpleResult>();
     while (rdr.Read())
     {
         SimpleResult r = new SimpleResult();
         r.CrvSeqNum = rdr.GetInt32(rdr.GetOrdinal("CrvSeqNum"));
         r.PrimId = rdr.GetString(rdr.GetOrdinal("PrimId"));
         r.StartTime = rdr.GetDateTime(rdr.GetOrdinal("StartTime"));
         result.Add(r);
     }
     return result;
     // return GetSimpleRowInfos(q, false);
 }
Пример #4
0
 public PatientInfo GetPatientInfo(string primId)
 {
     var condition =
         new ParadoxCondition.Compare(ParadoxCompareOperator.Equal, primId, 0, 0);
     var sr = _Connection.ExecuteQuery("Patients", condition, false);
     if (sr.Read())
     {
         PatientInfo result = new PatientInfo();
         result.PrimID = (string)sr[0];
         result.Name = sr[1] == DBNull.Value ? "" : (string)sr[1];
         result.Birthdate = sr[2] == DBNull.Value ? "" : (string)sr[2];
         result.Sex = sr[3] == DBNull.Value ? "" : (string)sr[3];
         result.Physician = sr[4] == DBNull.Value ? "" : (string)sr[4];
         result.Diagnosis = sr[5] == DBNull.Value ? "" : (string)sr[5];
         return result;
     }
     return new PatientInfo { PrimID = primId };
 }
Пример #5
0
        private DataTable CreatePatientsTable(List<string> primIDs)
        {
            DataTable patientTable = null;
            foreach (string primID in primIDs)
            {
                var condition = new ParadoxCondition.Compare(
                            ParadoxCompareOperator.Equal, primID, 0, 0);
                var rdr = _Connection.ExecuteQuery("Patients", condition, false);

                // 初始化表
                if (patientTable == null)
                {
                    patientTable = new DataTable("patient");
                    for (int i = 0; i < rdr.FieldCount; i++)
                    {
                        patientTable.Columns.Add(rdr.FieldNames[i], rdr.GetFieldType(i));
                    }
                }

                if (rdr.Read())
                {
                    DataRow row = patientTable.NewRow();

                    for (int i = 0; i < rdr.FieldCount; i++)
                    {
                        row[i] = rdr[i];
                    }

                    patientTable.Rows.Add(row);
                }
                else
                {
                    DataRow row = patientTable.NewRow();
                    row[0] = primID;
                    patientTable.Rows.Add(row);
                }
            }

            return patientTable;
        }