/** * 患者数据。 * * author: Sand * since: 2016/11/18 */ "use strict"; var wlyyDb = require('./database/wlyy.db'); exports.isPatientCode = function (code, handler) { var sql = "select count(*) c from wlyy_patient where code = '" + code + "'"; wlyyDb.execQuery({ "sql": sql, "args": [], "handler": handler }); }; exports.getPatientOpenid = function (code, handler) { var sql = "select openid from wlyy_patient where code = ? "; wlyyDb.execQuery({ "sql": sql, "args": [code], "handler": handler }); }; exports.getPatientDoctorConsult = function (patient, doctor, handler) { var sql = "select * from wlyy_consult_team where patient = ? and doctor = ? and status = 0 and del = '1' "; wlyyDb.execQuery({ "sql": sql, "args": [patient, doctor], "handler": handler }); };