lrf402788946 vor 4 Jahren
Ursprung
Commit
a499ac892c
2 geänderte Dateien mit 3 neuen und 1 gelöschten Zeilen
  1. 1 0
      app/model/patient.js
  2. 2 1
      app/service/patient.js

+ 1 - 0
app/model/patient.js

@@ -10,6 +10,7 @@ const Emrinfo = new Schema({
   doctorname: { type: String, required: false, maxLength: 200 }, // 医生名称
   title: { type: String, required: false }, // 标题
   content: { type: String, required: false }, // 病历内容
+  img: { type: String }, // 病例图片
 });
 Emrinfo.index({ mobile: 1 });
 

+ 2 - 1
app/service/patient.js

@@ -203,13 +203,14 @@ class PatientService extends CrudService {
 
     // TODO: 保存数据
     const emr = patient.emrs.id(id);
-    const { indate, outdate, title, content, doctorid, doctorname } = data;
+    const { indate, outdate, title, content, doctorid, doctorname, img } = data;
     emr.indate = indate;
     emr.outdate = outdate;
     emr.title = title;
     emr.content = content;
     emr.doctorid = doctorid;
     emr.doctorname = doctorname;
+    emr.img = img;
     return await patient.save();
   }