Skip to content

Commit

Permalink
Merge pull request #23 from VPatient/lifeActivityFormsUpdate
Browse files Browse the repository at this point in the history
deleted debug statements
  • Loading branch information
Tzesh committed Mar 29, 2023
2 parents 2f3804a + f67df0b commit 6ad2cb4
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions routes/patient/lifeactivity/lifeactivity.js
Expand Up @@ -16,18 +16,12 @@ router.get("", auth, verifyPatient, async(req, res) => {
// get records with given patient id
const records = await LifeActivityRecordModel.find({ patient: patient._id });

console.log(records);

// get questions with records
const questions = await LifeActivityQuestionModel.find({ _id: { $in: records.map(record => record.question) } });

console.log(questions);

// get forms with questions
const forms = await LifeActivityFormModel.find({ _id: { $in: questions.map(question => question.form) } });

console.log(forms);

const formattedData = forms.map(form => {
return {
"form_title": form.name,
Expand Down

0 comments on commit 6ad2cb4

Please sign in to comment.