Procházet zdrojové kódy

管理端长处方代码提交

huangwenjie před 7 roky
rodič
revize
7bb8a2b177

+ 23 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/BaseController.java

@ -233,6 +233,28 @@ public class BaseController {
			return error(-1, "服务器异常,请稍候再试!");
		}
	}
	
	/**
	 * 返回接口处理结果
	 *
	 *
	 * @param code 结果码,成功为200
	 * @param msg 结果提示信息
	 * @param value 结果数据
	 * @return
	 */
	public String write(int code, String msg, String key, com.alibaba.fastjson.JSONObject value) {
		try {
			com.alibaba.fastjson.JSONObject json = new com.alibaba.fastjson.JSONObject();
			json.put("status", code);
			json.put("msg", msg);
			json.put(key, value);
			return json.toJSONString();
		} catch (Exception e) {
			error(e);
			return error(-1, "服务器异常,请稍候再试!");
		}
	}
	/**
	 * 返回接口处理结果
@ -378,6 +400,7 @@ public class BaseController {
			map.put("status", code);
			map.put("msg", msg);
			map.put(key, value);
			System.out.println(mapper.writeValueAsString(map));
			return mapper.writeValueAsString(map);
		} catch (Exception e) {
			error(e);

+ 6 - 5
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/manager/datastatic/PrescriptionStaticController.java

@ -68,12 +68,13 @@ public class PrescriptionStaticController extends BaseController {
			return error(-1, "操作失败!");
		}
	}
	
	@RequestMapping(value = "/getinfo", method = RequestMethod.GET)
	@ApiOperation(value = "续方详情")
	public String getContinuedPrescriptionAsDoctor(@RequestParam(required = true) @ApiParam(value = "续方CODE", name = "code") String code) {
	@ResponseBody
	@RequestMapping(value = "getinfo/{code}",method = RequestMethod.GET)
	public String getContinuedPrescriptionAsDoctor(
			@PathVariable(value = "code") String code) {
		try {
			return write(200, "查询成功!", "data", prescriptionService.getContinuedPrescriptionAsDoctor(code));
			com.alibaba.fastjson.JSONObject result = prescriptionService.getContinuedPrescriptionAsDoctor(code);
			return write(200,"操作成功!","data",result);
		} catch (Exception e) {
			error(e);
			return error(-1, "查询失败!");

+ 4 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/entity/prescription/PrescriptionDiagnosis.java

@ -3,12 +3,16 @@ package com.yihu.wlyy.entity.prescription;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.wlyy.entity.IdEntity;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
 * @author huangwenjie
 * @date 2017/12/20 14:57
 */
@Entity
@Table(name = "wlyy_prescription_diagnosis")
public class PrescriptionDiagnosis  extends IdEntity {
	
	private String code;

+ 5 - 2
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/prescription/PrescriptionService.java

@ -3,6 +3,7 @@ package com.yihu.wlyy.service.prescription;
import com.yihu.wlyy.entity.prescription.*;
import com.yihu.wlyy.repository.PatientDao;
import com.yihu.wlyy.repository.prescription.*;
import com.yihu.wlyy.util.DateUtil;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -42,7 +43,7 @@ public class PrescriptionService {
	PatientDao patientDao;
	
	@Autowired
	private PrescriptionDiagnosisDao prescriptionDiagnosisDao;
	PrescriptionDiagnosisDao prescriptionDiagnosisDao;
	
	public List<PrescriptionVO> getPrescriptionList(String hospital,
	                                                String disease,
@ -276,7 +277,10 @@ public class PrescriptionService {
		PrescriptionReviewed reviewed = prescriptionReviewedDao.findByPrescriptionCode(code);
		List<PrescriptionAdjust> prescriptionAdjusts = prescriptionAdjustDao.findByPrescriptionCodeOrderByIdDesc(code);
		com.alibaba.fastjson.JSONObject rs = new com.alibaba.fastjson.JSONObject();
		prescription.setStatusName("");
		rs.put("prescription", prescription);
		rs.put("createTime", DateUtil.dateToStrLong(prescription.getCreateTime()));
		rs.put("reviewedTime",DateUtil.dateToStrLong(reviewed.getCreateTime()));
		rs.put("prescriptionInfo", prescriptionInfos);
		rs.put("reviewed", reviewed);
//        if(prescription!=null&&StringUtils.isNotBlank(prescription.getDoctor())){
@ -296,7 +300,6 @@ public class PrescriptionService {
		} else {
			rs.put("prescriptionAdjust", "");
		}
		
		return rs;
	}
}

+ 32 - 29
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/prescription/prescription_info.jsp

@ -33,18 +33,18 @@
        <div class="m-form-group" style="border-top: solid 1px #ccc;">
            <label class="label_title fd-label">续方居民:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
                <input readonly id="patientName" class="fd-input" type="text"   />
            </div>
            <label class="label_title fd-label">医保卡号:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text"  class="min-length-6 validate-special-char" />
                <input readonly id="ssc" class="fd-input" type="text"  />
            </div>
        </div>
        <div class="m-form-group" style="">
            <label class="label_title fd-label">身份证号</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text"  class="ajax min-length-2 validate-special-char"  />
                <input readonly id="idcard" class="fd-input" type="text"   />
            </div>
        </div>
@ -55,9 +55,9 @@
            <label class="label_title fd-label">临床诊断</label>
        </div>
        <div class="m-form-group" style="border-top: solid 1px #ccc;">
            <label class="label_title fd-label">续方居民:</label>
            <label class="label_title fd-label">诊断结果:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
                <input readonly id="diagnosisinfo" class="fd-input" type="text"   />
            </div>
        </div>
@ -66,20 +66,23 @@
        <div style="margin-left:10px;">
            <label class="label_title fd-label">RP.</label>
        </div>
        <div class="m-form-group" style="border-top: solid 1px #ccc;">
            <label class="label_title fd-label">药品名称1 </label>
            <label class="label_title fd-label"> 用法:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
            </div>
            <label class="label_title fd-label">总量:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
            </div>
            <label class="label_title fd-label">规格:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
            </div>
        <div id="prescriptionInfo_div" class="m-form-group" style="border-top: solid 1px #ccc;">
            <%--<label class="label_title fd-label">药品名称1 </label>--%>
            <%--<div class="l-text-wrapper m-form-control">--%>
                <%--<input readonly value="" class="fd-input" type="text"   />--%>
            <%--</div>--%>
            <%--<label class="label_title fd-label"> 用法:</label>--%>
            <%--<div class="l-text-wrapper m-form-control">--%>
                <%--<input class="fd-input" type="text"   />--%>
            <%--</div>--%>
            <%--<label class="label_title fd-label">总量:</label>--%>
            <%--<div class="l-text-wrapper m-form-control">--%>
                <%--<input class="fd-input" type="text"  />--%>
            <%--</div>--%>
            <%--<label class="label_title fd-label">规格:</label>--%>
            <%--<div class="l-text-wrapper m-form-control">--%>
                <%--<input class="fd-input" type="text"   />--%>
            <%--</div>--%>
        </div>
@ -89,11 +92,11 @@
        <div class="m-form-group" style="border-top: solid 1px #ccc;">
            <label class="label_title fd-label">续方状态:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
                <input id="prescriptionStatueName" readonly class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
            </div>
            <label class="label_title fd-label">续方说明:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
                <input id="reason" readonly class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
            </div>
        </div>
@ -104,28 +107,28 @@
        <div class="m-form-group" style="border-top: solid 1px #ccc;">
            <label class="label_title fd-label">申请时间:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
                <input id="createTime" readonly class="fd-input" type="text"  />
            </div>
            <label class="label_title fd-label">审核医生:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text"  class="min-length-6 validate-special-char" />
                <input id="doctorName" readonly class="fd-input" type="text"   />
            </div>
        </div>
        <div style="margin-left:10px;">
        <div class="m-form-group" style="">
            <label class="label_title fd-label">审核机构:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text"  class="ajax min-length-2 validate-special-char"  />
                <input id="hospitalName" readonly class="fd-input" type="text" />
            </div>
            <label class="label_title fd-label">审核医生:</label>
            <label class="label_title fd-label">审核时间:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text"  class="ajax min-length-2 validate-special-char"  />
                <input id="reviewedTime" readonly class="fd-input" type="text"  />
            </div>
        </div>
        <div style="margin-left:10px;">
        <div  class="m-form-group" style="">
            <label class="label_title fd-label">结果:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text"  class="ajax min-length-2 validate-special-char"  />
                <input id="presult" readonly class="fd-input" type="text"  />
            </div>
        </div>
    </div>

+ 78 - 34
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/prescription/prescription_info_js.jsp

@ -18,52 +18,96 @@
            rolesInfo = {
                init: function () {
                    _this = this;
                    var id = $("#code").val();
                    var code = $("#code").val();
                    //id不为空,初始化数据
                    if (isNoEmpty(id)) {
                    if (isNoEmpty(code)) {
                        $.ajax({
                            url: ctx + "/admin/static/prescription/getinfo",
                            url: ctx + "/admin/static/prescription/getinfo/"+code,
                            method: "get",
                            dataType: "json",
                            data: {id: id},
                            async: false,
                            success: function (result) {
                                alert(result.toString())
                                if (result.status == '200') {
                                    var data = result.data;
                                    if(data.type==1){
                                        _this.$type.val("手机号变更");
                                    }else if(data.type==2){
                                        _this.$type.val("重置密码");
                                    }else{
                                        _this.$type.val("其他");
                                    }
                                    _this.$name.val(data.name);
                                    if(data.identity==1){
                                        _this.$identity.val("患者")
                                    }else{
                                        _this.$identity.val("医生")
                                    //续方居民姓名
                                    var patientName = data.prescription.patientName;
                                    $('#patientName').val(patientName);
                                    //居民社保卡
                                    var ssc = data.patient.ssc;
                                    $('#ssc').val(ssc);
                                    //身份证号
                                    var idcard = data.patient.idcard;
                                    $('#idcard').val(idcard);
                                    //诊断
                                    var diagnosisinfo = "";
                                    var diagnosis = data.diagnosis;
                                    if(diagnosis.length > 0){
                                        for (var i=0;i<diagnosis.length;i++)
                                        {
                                            if(i != 0){
                                                diagnosisinfo = diagnosisinfo +"/"
                                            }
                                            diagnosisinfo = diagnosisinfo + diagnosis[i].healthProblemName;
                                        }
                                    }
                                    _this.$phone.val(data.phone);
                                    _this.$idcard.val(data.idcard);
                                    _this.$createTime.val(data.createTime);
                                    _this.$description.val(data.description);
                                    if (isNoEmpty(data.result)) {
                                        _this.$result.val(data.result);
                                        $("#dealResult").show();
                                        $("#deal").hide();
                                    $('#diagnosisinfo').val(diagnosisinfo);
                                    //药品信息
                                    var prescriptionInfo =  data.prescriptionInfo;
                                    if(prescriptionInfo.length >0){
                                        var prescriptionInfoStr = "";
                                        for (var i=0;i<prescriptionInfo.length;i++)
                                        {
                                            var str = "&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp药品信息:"+prescriptionInfo[i].drugName+"&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp用法:"+prescriptionInfo[i].usageName+"&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp每次 "+prescriptionInfo[i].physicDose+prescriptionInfo[i].drugNumUnitName+prescriptionInfo[i].drugRateName;
                                            str += "&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp总量:"+prescriptionInfo[i].physicAmountUnit+prescriptionInfo[i].physicAmountUnitName;
                                            str += "&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp规格:"+prescriptionInfo[i].drugFormat;
                                            prescriptionInfoStr += "<a style=\"margin-left:10px;\">"+str+"</a><br>";
//                                            prescriptionInfoStr += "<div class=\"l-text-wrapper m-form-control\"><input readonly value=\""+str+"\" class=\"fd-input\" type=\"text\"   /></div>";
//
//                                            prescriptionInfoStr += "<label class=\"label_title fd-label\">用法:</label>";
//                                            prescriptionInfoStr += "<div class=\"l-text-wrapper m-form-control\"><input readonly value=\""+prescriptionInfo[i].usageName+" 每次 "+prescriptionInfo[i].physicDose+prescriptionInfo[i].drugNumUnitName+prescriptionInfo[i].drugRateName+"\" class=\"fd-input\" type=\"text\"   /></div>";
//
//                                            prescriptionInfoStr += "<label class=\"label_title fd-label\">总量:</label>";
//                                            prescriptionInfoStr += "<div class=\"l-text-wrapper m-form-control\"><input readonly value=\""+prescriptionInfo[i].physicAmountUnit+prescriptionInfo[i].physicAmountUnitName+"\" class=\"fd-input\" type=\"text\"   /></div>";
//
//                                            prescriptionInfoStr += "<label class=\"label_title fd-label\">规格:</label>";
//                                            prescriptionInfoStr += "<div class=\"l-text-wrapper m-form-control\"><input readonly value=\""+prescriptionInfo[i].drugFormat+"\" class=\"fd-input\" type=\"text\"   /></div><br>";
                                        }
                                    }
                                    $('#prescriptionInfo_div').html(prescriptionInfoStr)
                                    if(data.images){
                                        var arr = data.images.split(',');
                                        var html="";
                                        for(var i=0;i<arr.length;i++){
                                            html += '<img src="'+data.imgUrlDomain+arr[i]+'" alt="."/>';
                                        }
                                        _this.$image.html(html);
                                    //续方状态
                                    var prescriptionStatueName = data.prescription.statusName;
                                    $('#prescriptionStatueName').val(prescriptionStatueName)
                                    //续方说明
                                    var reason = data.prescription.reason;
                                    $('#reason').val(reason)
                                    //申请时间
                                    var createTime = data.createTime;
                                    $('#createTime').val(createTime);
                                    //审核医生
                                    var doctorName = data.prescription.doctorName;
                                    $('#doctorName').val(doctorName);
                                    //审核机构
                                    var hospitalName = data.prescription.hospitalName;
                                    $('#hospitalName').val(hospitalName);
                                    //审核时间
                                    var reviewedTime = data.reviewedTime;
                                    $('#reviewedTime').val(reviewedTime);
                                    //审核结果
                                    var status = data.prescription.status;
                                    if(status > 1){
                                        $('#presult').val("审核通过")
                                    }else{
                                        var html='<span class="no-img">没有上传图片</span>';
                                        _this.$image.html(html);
                                        $('#presult').val("审核未通过")
                                    }
                                }else{
                                    $.Notice.error(result.msg);
                                }