title: Multiple Queries Express/Mongodb
body: <p>I am using Express/Ejs/Node/Mongodb
  I have multiple models Im querying through and three different data sets to do stuff with.
  I need to have a function that calculates the average pain level on symptoms &amp; counts the bodyparts most logged.
  I don't know how to simplify my route below and attach these functions to them and send them back to the front end to do something with.
  Also any good reads on this particular problem.</p>
  <p><strong>My route looks like this</strong></p>
  <pre><code>app.get('/dashboard', isLoggedIn, (req, res) =&gt;{
      let thirtyDays = moment().subtract(30, 'd').format('YYYY-MM-DD')
      SymptomModel.find({postedBy : req.user._id, created: {$gte: `${thirtyDays}`} }, function(error, results){
          if(error){
              console.log('Error: ', error)
          } else {
              console.log('Found all symptoms from past 30da: ', results)
          }
      })
  
      TreatmentModel.find({postedBy : req.user._id, created: {$gte: `${thirtyDays}`} }, function(error, results){
          if(error){
              console.log('Error: ', error)
          } else {
              console.log('Found all Treatments from past 30da:', results)
          }
      })
  
      DoctorModel.find({postedBy : req.user._id, created: {$gte: `${thirtyDays}`} }, function(error, results){
          if(error){
              console.log('Error: ', error)
          } else {
              console.log('Found all Doctors from past 30da: ', results)
          }
      })
      res.render('dashboard.ejs', {
          user: req.user.firstName,
          data: `I would be for the last 30 days from ${now}`,
          test: &quot;I need this to be the data&quot;
  
      })
  });
  
  </code></pre>