const Diagnostic = require("../models/diagnostic");

exports.getDiagnostic = (req, res, next) => {
	Diagnostic.find()
    .then((diagnostics) => {
      res.status(200).json(diagnostics);
    })
    .catch((err) => {
      console.log(err);
    });

};

exports.getDiagnosticlist = (req, res, next) => {
	Diagnostic.find({}, { _id: 1, name: 1, code: 1 })
    .then((diagnostics) => {
      res.status(200).json({diagnosticslist:diagnostics});
    })
    .catch((err) => {
      console.log(err);
    });

};
