예제 #1
0
 // get entries for VSA dropdown
 public static List<VSAs> GetVSAs()
 {
     using (emsDBDataContext db = new emsDBDataContext())
     {
         var q = from c in db.VSAs
                 where c.Active == true
                 select c;
         return q.ToList();
     }
 }
예제 #2
0
 //get entries for Symptom Relief dropdown
 public static List<SymptomReliefs> GetSymptomReliefs()
 {
     using (emsDBDataContext db = new emsDBDataContext())
     {
         var q = from c in db.SymptomReliefs
                 where c.Active == true
                 select c;
         return q.ToList();
     }
 }
예제 #3
0
 // get entries for IV Attempts dropdown
 public static List<IVAttempts> GetIVAttempts()
 {
     using (emsDBDataContext db = new emsDBDataContext())
     {
         var q = from c in db.IVAttempts
                 where c.Active == true
                 select c;
         return q.ToList();
     }
 }
예제 #4
0
 public static Entry GetEntry(int ID)
 {
     using (emsDBDataContext db = new emsDBDataContext())
     {
         var q = (from e in db.Entries
                 where e.ID == ID
                 select e).SingleOrDefault();
         return q;
     }
 }
예제 #5
0
 public static ReportResults GetSuddenCariacArrest(DateTime start, DateTime end)
 {
     using (emsDBDataContext db = new emsDBDataContext())
     {
         int limit = 6 * 60; // in seconds
         ReportResults results = new ReportResults();
         results.NumberOnTime = db.EntryDetails.Where(c => c.Date >= start && c.Date <= end && c.CTAS_raw == 1 && c.VSA_raw > 1 && c.TDiff <= limit).Count();
         results.NumberOfCalls = db.EntryDetails.Where(c => c.Date >= start && c.Date <= end && c.CTAS_raw == 1 && c.VSA_raw > 1).Count();
         return results;
     }
 }
예제 #6
0
 public static ReportResults GetCTAS(int CTAS, int minutes, DateTime start, DateTime end)
 {
     using (emsDBDataContext db = new emsDBDataContext())
     {
         int limit = minutes * 60; // in seconds
         ReportResults results = new ReportResults();
         results.NumberOnTime = db.EntryDetails.Where(c => c.Date >= start && c.Date <= end && c.CTAS_raw == CTAS && c.TDiff <= limit).Count();
         results.NumberOfCalls = db.EntryDetails.Where(c => c.Date >= start && c.Date <= end && c.CTAS_raw == CTAS).Count();
         return results;
     }
 }