Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deleted debug statements #23

Merged
merged 1 commit into from
Mar 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions routes/patient/lifeactivity/lifeactivity.js
Original file line number Diff line number Diff line change
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