Browse Source

Merge branch 'dev' of huangwenjie/patient-co-management into dev

yeshijie 7 years ago
parent
commit
66e4ee1b98
15 changed files with 563 additions and 212 deletions
  1. 0 2
      common/common-entity/src/main/java/com/yihu/wlyy/entity/patient/prescription/PrescriptionAdjust.java
  2. 0 2
      common/common-entity/src/main/java/com/yihu/wlyy/entity/patient/prescription/PrescriptionReviewed.java
  3. 15 0
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/manager/datastatic/PrescriptionStaticController.java
  4. 80 0
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/entity/prescription/PrescriptionAdjust.java
  5. 85 0
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/entity/prescription/PrescriptionDiagnosis.java
  6. 66 66
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/entity/prescription/PrescriptionInfo.java
  7. 170 0
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/entity/prescription/PrescriptionReviewed.java
  8. 18 0
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/repository/prescription/PrescriptionAdjustDao.java
  9. 18 0
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/repository/prescription/PrescriptionDiagnosisDao.java
  10. 24 0
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/repository/prescription/PrescriptionInfoDao.java
  11. 21 0
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/repository/prescription/PrescriptionReviewedDao.java
  12. 2 2
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/manager/user/UserService.java
  13. 59 7
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/prescription/PrescriptionService.java
  14. 1 111
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/prescription/prescription_info.jsp
  15. 4 22
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/prescription/prescription_info_js.jsp

+ 0 - 2
common/common-entity/src/main/java/com/yihu/wlyy/entity/patient/prescription/PrescriptionAdjust.java

@ -1,9 +1,7 @@
package com.yihu.wlyy.entity.patient.prescription;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.wlyy.entity.IdEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

+ 0 - 2
common/common-entity/src/main/java/com/yihu/wlyy/entity/patient/prescription/PrescriptionReviewed.java

@ -3,10 +3,8 @@ package com.yihu.wlyy.entity.patient.prescription;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.wlyy.entity.IdEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;
/**

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

@ -3,6 +3,8 @@ package com.yihu.wlyy.controller.manager.datastatic;
import com.yihu.wlyy.controller.BaseController;
import com.yihu.wlyy.entity.prescription.PrescriptionVO;
import com.yihu.wlyy.service.prescription.PrescriptionService;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import jxl.Workbook;
import jxl.write.*;
import org.springframework.beans.factory.annotation.Autowired;
@ -34,11 +36,13 @@ public class PrescriptionStaticController extends BaseController {
	
	@RequestMapping(value = "infoInit/{code}",method = RequestMethod.GET)
	public String infoInit(@PathVariable(value = "code") String code){
		request.setAttribute("code",code);
		return "prescription/prescription_info";
	}
	
	@RequestMapping(value = "orderInit/{code}",method = RequestMethod.GET)
	public String orderInit(@PathVariable(value = "code") String code){
		request.setAttribute("code",code);
		return "prescription/prescription_order";
	}
	
@ -65,6 +69,17 @@ public class PrescriptionStaticController extends BaseController {
		}
	}
	
	@RequestMapping(value = "/getinfo", method = RequestMethod.GET)
	@ApiOperation(value = "续方详情")
	public String getContinuedPrescriptionAsDoctor(@RequestParam(required = true) @ApiParam(value = "续方CODE", name = "code") String code) {
		try {
			return write(200, "查询成功!", "data", prescriptionService.getContinuedPrescriptionAsDoctor(code));
		} catch (Exception e) {
			error(e);
			return error(-1, "查询失败!");
		}
	}
	
	//导出设备报表
	@RequestMapping(value="toExcel",method = RequestMethod.POST,produces = "application/json;charset=UTF-8" )
	public void exportList(

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

@ -0,0 +1,80 @@
package com.yihu.wlyy.entity.prescription;
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:50
 */
@Entity
@Table(name = "wlyy_prescription_adjust")
public class PrescriptionAdjust extends IdEntity {
	
	private String code;                    //业务主键
	private String prescriptionCode;// 处方code
	private Date createTime;               //调整时间
	private String reason;                      //调整原因
	private String userCode;    //调整用户code
	private String userName;    //调整用户名称
	private String userType;// 1医生 2患者
	
	public String getCode() {
		return code;
	}
	
	public void setCode(String code) {
		this.code = code;
	}
	
	public String getPrescriptionCode() {
		return prescriptionCode;
	}
	
	public void setPrescriptionCode(String prescriptionCode) {
		this.prescriptionCode = prescriptionCode;
	}
	
	public Date getCreateTime() {
		return createTime;
	}
	
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
	public String getReason() {
		return reason;
	}
	
	public void setReason(String reason) {
		this.reason = reason;
	}
	
	public String getUserCode() {
		return userCode;
	}
	
	public void setUserCode(String userCode) {
		this.userCode = userCode;
	}
	
	public String getUserName() {
		return userName;
	}
	
	public void setUserName(String userName) {
		this.userName = userName;
	}
	
	public String getUserType() {
		return userType;
	}
	
	public void setUserType(String userType) {
		this.userType = userType;
	}
}

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

@ -0,0 +1,85 @@
package com.yihu.wlyy.entity.prescription;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.wlyy.entity.IdEntity;
import java.util.Date;
/**
 * @author huangwenjie
 * @date 2017/12/20 14:57
 */
public class PrescriptionDiagnosis  extends IdEntity {
	
	private String code;
	private String prescriptionCode;
	private String name;
	private Integer type;//1主诊断 2次诊断
	private Date createTime;
	private Date updateTime;
	private String healthProblem;
	private String healthProblemName;
	
	public String getHealthProblem() {
		return healthProblem;
	}
	public void setHealthProblem(String healthProblem) {
		this.healthProblem = healthProblem;
	}
	
	public String getHealthProblemName() {
		return healthProblemName;
	}
	
	public void setHealthProblemName(String healthProblemName) {
		this.healthProblemName = healthProblemName;
	}
	
	public String getCode() {
		return code;
	}
	
	public void setCode(String code) {
		this.code = code;
	}
	
	public String getPrescriptionCode() {
		return prescriptionCode;
	}
	
	public void setPrescriptionCode(String prescriptionCode) {
		this.prescriptionCode = prescriptionCode;
	}
	
	public String getName() {
		return name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
	public Date getCreateTime() {
		return createTime;
	}
	
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
	public Date getUpdateTime() {
		return updateTime;
	}
	
	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
	
	public Integer getType() {
		return type;
	}
	
	public void setType(Integer type) {
		this.type = type;
	}
}

+ 66 - 66
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/entity/prescription/PrescriptionInfo.java

@ -48,275 +48,275 @@ public class PrescriptionInfo extends IdEntity{
    private String physicSkinTest;//注射地点名称
    private String physicSkinTestName;//皮试类型名称
    private String remark;//备注
    
    @Column(name = "code",unique = true , nullable=false)
    public String getCode() {
        return code;
    }
    
    public void setCode(String code) {
        this.code = code;
    }
    
    @Column(name = "prescription_code")
    public String getPrescriptionCode() {
        return prescriptionCode;
    }
    
    public void setPrescriptionCode(String prescriptionCode) {
        this.prescriptionCode = prescriptionCode;
    }
    
    @Column(name = "drug_code")
    public String getDrugCode() {
        return drugCode;
    }
    
    public void setDrugCode(String drugCode) {
        this.drugCode = drugCode;
    }
    
    @Column(name = "drug_name")
    public String getDrugName() {
        return drugName;
    }
    
    public void setDrugName(String drugName) {
        this.drugName = drugName;
    }
    
    public String getDrugRate() {
        return drugRate;
    }
    
    public void setDrugRate(String drugRate) {
        this.drugRate = drugRate;
    }
    
    public String getDrugFormat() {
        return drugFormat;
    }
    
    public void setDrugFormat(String drugFormat) {
        this.drugFormat = drugFormat;
    }
    
    public Integer getNum() {
        return num;
    }
    
    public void setNum(Integer num) {
        this.num = num;
    }
    
    public Integer getIsRefrigerate() {
        return isRefrigerate;
    }
    
    public void setIsRefrigerate(Integer isRefrigerate) {
        this.isRefrigerate = isRefrigerate;
    }
    
    public String getDirection() {
        return direction;
    }
    
    public void setDirection(String direction) {
        this.direction = direction;
    }
    
    public Integer getPrice() {
        return price;
    }
    
    public void setPrice(Integer price) {
        this.price = price;
    }
    
    public Integer getDel() {
        return del;
    }
    
    public void setDel(Integer del) {
        this.del = del;
    }
    
    public String getJwSubCode() {
        return jwSubCode;
    }
    
    public void setJwSubCode(String jwSubCode) {
        this.jwSubCode = jwSubCode;
    }
    
    public String getDrugNumUnit() {
        return drugNumUnit;
    }
    
    public void setDrugNumUnit(String drugNumUnit) {
        this.drugNumUnit = drugNumUnit;
    }
    
    public String getDrugNumUnitName() {
        return drugNumUnitName;
    }
    
    public void setDrugNumUnitName(String drugNumUnitName) {
        this.drugNumUnitName = drugNumUnitName;
    }
    
    public Integer getCost() {
        return cost;
    }
    
    public void setCost(Integer cost) {
        this.cost = cost;
    }
    
    public Integer getCharge() {
        return charge;
    }
    
    public void setCharge(Integer charge) {
        this.charge = charge;
    }
    
    @Column(name = "bind_flag")
    public String getBindFlag() {
        return bindFlag;
    }
    
    public void setBindFlag(String bindFlag) {
        this.bindFlag = bindFlag;
    }
    
    @Column(name = "day_count")
    public Integer getDayCount() {
        return dayCount;
    }
    
    public void setDayCount(Integer dayCount) {
        this.dayCount = dayCount;
    }
    
    public String getDrugUsage() {
        return drugUsage;
    }
    
    public void setDrugUsage(String drugUsage) {
        this.drugUsage = drugUsage;
    }
    
    @Column(name = "usage_name")
    public String getUsageName() {
        return usageName;
    }
    
    public void setUsageName(String usageName) {
        this.usageName = usageName;
    }
    
    @Column(name = "physic_dose")
    public String getPhysicDose() {
        return physicDose;
    }
    
    public void setPhysicDose(String physicDose) {
        this.physicDose = physicDose;
    }
    
    public String getPhysicDoseUnit() {
        return physicDoseUnit;
    }
    
    public void setPhysicDoseUnit(String physicDoseUnit) {
        this.physicDoseUnit = physicDoseUnit;
    }
    
    public String getPhysicDoseUnitName() {
        return physicDoseUnitName;
    }
    
    public void setPhysicDoseUnitName(String physicDoseUnitName) {
        this.physicDoseUnitName = physicDoseUnitName;
    }
    
    public String getPhysicAmount() {
        return physicAmount;
    }
    
    public void setPhysicAmount(String physicAmount) {
        this.physicAmount = physicAmount;
    }
    
    public String getPhysicAmountUnit() {
        return physicAmountUnit;
    }
    
    public void setPhysicAmountUnit(String physicAmountUnit) {
        this.physicAmountUnit = physicAmountUnit;
    }
    
    public String getPhysicAmountUnitName() {
        return physicAmountUnitName;
    }
    
    public void setPhysicAmountUnitName(String physicAmountUnitName) {
        this.physicAmountUnitName = physicAmountUnitName;
    }
    
    public String getPhysicInjectPlace() {
        return physicInjectPlace;
    }
    
    public void setPhysicInjectPlace(String physicInjectPlace) {
        this.physicInjectPlace = physicInjectPlace;
    }
    
    public String getPhysicInjectPlaceName() {
        return physicInjectPlaceName;
    }
    
    public void setPhysicInjectPlaceName(String physicInjectPlaceName) {
        this.physicInjectPlaceName = physicInjectPlaceName;
    }
    
    public String getPhysicSkinTest() {
        return physicSkinTest;
    }
    
    public void setPhysicSkinTest(String physicSkinTest) {
        this.physicSkinTest = physicSkinTest;
    }
    
    public String getPhysicSkinTestName() {
        return physicSkinTestName;
    }
    
    public void setPhysicSkinTestName(String physicSkinTestName) {
        this.physicSkinTestName = physicSkinTestName;
    }
    
    public String getRemark() {
        return remark;
    }
    
    public void setRemark(String remark) {
        this.remark = remark;
    }
    
    public String getDrugRateName() {
        return drugRateName;
    }
    
    public void setDrugRateName(String drugRateName) {
        this.drugRateName = drugRateName;
    }
    
    public String getSubjectClass() {
        return subjectClass;
    }
    
    public void setSubjectClass(String subjectClass) {
        this.subjectClass = subjectClass;
    }

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

@ -0,0 +1,170 @@
package com.yihu.wlyy.entity.prescription;
/**
 * @author huangwenjie
 * @date 2017/12/20 14:48
 */
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.wlyy.entity.IdEntity;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
@Entity
@Table(name = "wlyy_prescription_reviewed")
public class PrescriptionReviewed extends IdEntity {
	//状态枚举
	public enum PrescriptionReviewedStatus {
		
		del("删除", -2),
		reviewed_fail("审核失败", -1),
		reviewed_wait("待审核", 0),
		reviewed_success("审核成功", 1);
		
		private String name;
		private int value;
		
		PrescriptionReviewedStatus(String name, int value) {
			this.name = name;
			this.value = value;
		}
		
		public String getName() {
			return name;
		}
		
		public void setName(String name) {
			this.name = name;
		}
		
		public int getValue() {
			return value;
		}
		
		public void setValue(int value) {
			this.value = value;
		}
	}
	
	private String code;                    //业务流程
	private String prescriptionCode;      //处方code 关联表wlyy_prescription code
	private Date createTime;               //审核时间
	private String hospital;                  //医院 关联 dm_hospital code
	private String hospitalName;              //医院 关联 dm_hospital name
	private String dept;                       //科室code
	private String deptName;                   //科室名称
	private String doctor;                  //审核医生
	private String doctorName;                  //审核医生名称
	private Integer status;               //  1审核通过1 0待审核  -1  审核不通过   -2无效审核
	private String reason;                  //审核不通过原因
	private String remark;                  //备注
	private Date reviewedTime;           //审核时间
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
	public Date getReviewedTime() {
		return reviewedTime;
	}
	
	public void setReviewedTime(Date reviewedTime) {
		this.reviewedTime = reviewedTime;
	}
	
	public String getCode() {
		return code;
	}
	
	public void setCode(String code) {
		this.code = code;
	}
	
	public String getPrescriptionCode() {
		return prescriptionCode;
	}
	
	public void setPrescriptionCode(String prescriptionCode) {
		this.prescriptionCode = prescriptionCode;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
	public Date getCreateTime() {
		return createTime;
	}
	
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
	public String getHospital() {
		return hospital;
	}
	
	public void setHospital(String hospital) {
		this.hospital = hospital;
	}
	
	public String getHospitalName() {
		return hospitalName;
	}
	
	public void setHospitalName(String hospitalName) {
		this.hospitalName = hospitalName;
	}
	
	public String getDept() {
		return dept;
	}
	
	public void setDept(String dept) {
		this.dept = dept;
	}
	
	public String getDeptName() {
		return deptName;
	}
	
	public void setDeptName(String deptName) {
		this.deptName = deptName;
	}
	
	public String getDoctor() {
		return doctor;
	}
	
	public void setDoctor(String doctor) {
		this.doctor = doctor;
	}
	
	public String getDoctorName() {
		return doctorName;
	}
	
	public void setDoctorName(String doctorName) {
		this.doctorName = doctorName;
	}
	
	public Integer getStatus() {
		return status;
	}
	
	public void setStatus(Integer status) {
		this.status = status;
	}
	
	public String getReason() {
		return reason;
	}
	
	public void setReason(String reason) {
		this.reason = reason;
	}
	
	public String getRemark() {
		return remark;
	}
	
	public void setRemark(String remark) {
		this.remark = remark;
	}
}

+ 18 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/repository/prescription/PrescriptionAdjustDao.java

@ -0,0 +1,18 @@
package com.yihu.wlyy.repository.prescription;
import com.yihu.wlyy.entity.prescription.PrescriptionAdjust;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
/**
 * @author huangwenjie
 * @date 2017/12/20 14:55
 */
public interface PrescriptionAdjustDao extends PagingAndSortingRepository<PrescriptionAdjust, Long>,JpaSpecificationExecutor<PrescriptionAdjust> {
	
	List<PrescriptionAdjust> findByPrescriptionCode(String code);
	
	List<PrescriptionAdjust> findByPrescriptionCodeOrderByIdDesc(String code);
}

+ 18 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/repository/prescription/PrescriptionDiagnosisDao.java

@ -0,0 +1,18 @@
package com.yihu.wlyy.repository.prescription;
import com.yihu.wlyy.entity.prescription.PrescriptionDiagnosis;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
/**
 * @author huangwenjie
 * @date 2017/12/20 14:57
 */
public interface PrescriptionDiagnosisDao extends PagingAndSortingRepository<PrescriptionDiagnosis, Long>, JpaSpecificationExecutor<PrescriptionDiagnosis> {
	
	@Query("select p from PrescriptionDiagnosis p where p.prescriptionCode=?1 ")
	List<PrescriptionDiagnosis> findByPrescriptionCode(String prescriptionCode);
}

+ 24 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/repository/prescription/PrescriptionInfoDao.java

@ -0,0 +1,24 @@
package com.yihu.wlyy.repository.prescription;
import com.yihu.wlyy.entity.prescription.PrescriptionInfo;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
/**
 * @author huangwenjie
 * @date 2017/12/20 14:52
 */
public interface PrescriptionInfoDao extends PagingAndSortingRepository<PrescriptionInfo, Long>, JpaSpecificationExecutor<PrescriptionInfo> {
	@Query("from PrescriptionInfo p where p.prescriptionCode=?1 and p.del=1")
	List<PrescriptionInfo> findByPrescriptionCode(String prescriptionCode);
	
	
	@Modifying
	@Query("update PrescriptionInfo p set p.cost=?2 where p.drugCode=?1 and p.prescriptionCode=?3 and p.del=1")
	void updateStatus(String code,Integer cost,String prescriptionCode);
	
}

+ 21 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/repository/prescription/PrescriptionReviewedDao.java

@ -0,0 +1,21 @@
package com.yihu.wlyy.repository.prescription;
import com.yihu.wlyy.entity.prescription.PrescriptionReviewed;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
/**
 * @author huangwenjie
 * @date 2017/12/20 14:53
 */
public interface PrescriptionReviewedDao extends PagingAndSortingRepository<PrescriptionReviewed, Long>, JpaSpecificationExecutor<PrescriptionReviewed> {
	
	@Query(value = "select p from PrescriptionReviewed p where p.prescriptionCode=?1 order by p.reviewedTime desc")
	PrescriptionReviewed findByPrescriptionCode(String prescriptionCode);
	
	@Query("select p from PrescriptionReviewed p where p.prescriptionCode=?1 and p.status=?2")
	List<PrescriptionReviewed> findByPrescriptionCodeAndStatus(String prescriptionCode, Integer status);
}

+ 2 - 2
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/manager/user/UserService.java

@ -196,8 +196,8 @@ public class UserService extends BaseJpaService<User,UserDao> {
            String[] codes = code.split(",");
            List<ManageDictEntry> manageDictEntries = manageDictEntryDao.findByDictIdAndCodes(dictId, codes);
            if (null != manageDictEntries && manageDictEntries.size() > 0) {
                return manageDictEntries.get(0).getValue();
//                return "http://localhost:8180/admin/main";
//                return manageDictEntries.get(0).getValue();
                return "http://localhost:8180/admin/main";
            }
        }
        return null;

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

@ -1,10 +1,8 @@
package com.yihu.wlyy.service.prescription;
import com.yihu.wlyy.entity.prescription.PrescriptionPayVO;
import com.yihu.wlyy.entity.prescription.PrescriptionVO;
import com.yihu.wlyy.repository.prescription.PrescriptionDao;
import com.yihu.wlyy.service.BaseService;
import com.yihu.wlyy.vo.SignPayVO;
import com.yihu.wlyy.entity.prescription.*;
import com.yihu.wlyy.repository.PatientDao;
import com.yihu.wlyy.repository.prescription.*;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -21,12 +19,30 @@ import java.util.List;
 * @date 2017/12/8 09:00
 */
@Service
public class PrescriptionService extends BaseService {
public class PrescriptionService {
	
	private static Logger logger = LoggerFactory.getLogger(PrescriptionService.class);
	
	@Autowired
	JdbcTemplate jdbcTemplate;
	
	private static Logger logger = LoggerFactory.getLogger(PrescriptionService.class);
	@Autowired
	PrescriptionDao prescriptionDao;
	
	@Autowired
	PrescriptionInfoDao prescriptionInfoDao;
	
	@Autowired
	PrescriptionReviewedDao prescriptionReviewedDao;
	@Autowired
	PrescriptionAdjustDao prescriptionAdjustDao;
	
	@Autowired
	PatientDao patientDao;
	
	@Autowired
	private PrescriptionDiagnosisDao prescriptionDiagnosisDao;
	
	public List<PrescriptionVO> getPrescriptionList(String hospital,
	                                                String disease,
@ -247,4 +263,40 @@ public class PrescriptionService extends BaseService {
		list =  jdbcTemplate.query(sql,new BeanPropertyRowMapper(PrescriptionPayVO.class));
		return list ;
	}
	
	/**
	 * 获取续方信息
	 *
	 * @param code
	 * @return
	 */
	public com.alibaba.fastjson.JSONObject getContinuedPrescriptionAsDoctor(String code) {
		Prescription prescription = prescriptionDao.findByCode(code);
		List<PrescriptionInfo> prescriptionInfos = prescriptionInfoDao.findByPrescriptionCode(code);
		PrescriptionReviewed reviewed = prescriptionReviewedDao.findByPrescriptionCode(code);
		List<PrescriptionAdjust> prescriptionAdjusts = prescriptionAdjustDao.findByPrescriptionCodeOrderByIdDesc(code);
		com.alibaba.fastjson.JSONObject rs = new com.alibaba.fastjson.JSONObject();
		rs.put("prescription", prescription);
		rs.put("prescriptionInfo", prescriptionInfos);
		rs.put("reviewed", reviewed);
//        if(prescription!=null&&StringUtils.isNotBlank(prescription.getDoctor())){
//            rs.put("doctor",doctorDao.findByCode(prescription.getDoctor()));
//        }else{
//            rs.put("doctor","");
//        }
		if (prescription != null && StringUtils.isNotBlank(prescription.getPatient())) {
			rs.put("patient", patientDao.findByCode(prescription.getPatient()));
		} else {
			rs.put("patient", "");
		}
		rs.put("diagnosis", prescriptionDiagnosisDao.findByPrescriptionCode(code));
		
		if (prescriptionAdjusts != null && prescriptionAdjusts.size() > 0) {
			rs.put("prescriptionAdjust", prescriptionAdjusts.get(0));
		} else {
			rs.put("prescriptionAdjust", "");
		}
		
		return rs;
	}
}

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

@ -14,28 +14,6 @@
        font-size: 12px;
        font-weight: bold!important;
    }
    .fd-input{
        width: 150px;
        border: none;
        font-size: 12px;
        height: 30px;
        margin-bottom: 5px;
    }
    .fd-padl{
        margin-left: 24px;
    }
    .fd-autoh{
        height: auto;
    }
    .fd-pd{
        padding: 35px 35px 10px 35px;
    }
    .fd-group{
        display: -webkit-box;
        display: -moz-box;
        display: -ms-flexbox;
        display: flex;
    }
    .fd-img img{
        width: 100px;
        height: 100px;
@ -44,99 +22,11 @@
    .fd-img img:last-child{
        margin-right: 0px;
    }
    .fd-file{
        font-size: 12px;
        font-weight: bold;
        padding-left: 35px;
        padding-right: 10px;
        display: -webkit-box;
        -webkit-box-align: center;
        display: -moz-box;
        -moz-box-align: center;
        display: -ms-flexbox;
        -ms-flex-align: center;
        display: flex;
        align-items: center;
    }
    .no-img{
        display: -webkit-box;
        -webkit-box-align: center;
        display: -moz-box;
        -moz-box-align: center;
        display: -ms-flexbox;
        -ms-flex-align: center;
        display: flex;
        align-items: center;
    }
    .fd-bttn{
        width: 100px;
        height: 35px;
        display: block;
        margin:40px auto 0px;
        background-color: #b9c8d2;
        color: #fff;
        line-height: 35px;
        text-align: center;
    }
    .ad-padd{
        height: 280px;
        width: 100%;
        padding: 10px;
        border: solid 1px #dcdcdc;
        border-radius: 2px;
        font-size: 12px;
    }
    .ad-padd::-webkit-input-placeholder{
        color:#ccc;
    }
    .ad-padd::-moz-placeholder{
        color:#ccc;
    }
    .ad-padd:-moz-placeholder{
        color:#ccc;
    }
    .ad-padd:-ms-input-placeholder{
        color:#ccc;
    }
    .ad-result{
        margin: 20px 35px 0px 35px;
        border-top: solid 1px #ccc;
        padding-top:10px ;
    }
    .ad-label{
        text-align: left!important;
        padding-left: 0px!important;
        font-weight: bold!important;
    }
    .ad-pd{
        padding-top: 35px;
    }
</style>
<body>
<div id="div_roles_info_form" class="m-form-inline f-mt20" data-role-form>
    <div id="detail">
        <%--<div style="margin-left:10px;">--%>
            <%--<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>--%>
            <%--<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="min-length-6 validate-special-char" />--%>
            <%--</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"  />--%>
            <%--</div>--%>
        <%--</div>--%>
        <input type="hidden" id="code" value='${code}'/>
        <div style="margin-left:10px;">
            <label class="label_title fd-label">居民信息</label>
        </div>

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

@ -12,40 +12,22 @@
            /* *************************** 函数定义 ******************************* */
            function pageInit() {
                rolesInfo.init();
                $('#image').on('click','img',function(){
                    var imgSrc = $(this).attr('src');
                    var html = '<img src="'+imgSrc+'" alt="."/>';
                    var imgView =  $('#fd-img-view', parent.document);
                    imgView.find('.fd-img-show').html(html);
                    imgView.show();
                })
            }
            /* *************************** 模块初始化 ***************************** */
            rolesInfo = {
                dealDialog:null,
                $type: $("#type"),//申诉类型
                $name: $("#name"),//姓名
                $identity:$("#identity"),//身份
                $phone:$("#phone"),//联系方式
                $createTime:$("#createTime"),//时间
                $idcard:$("#idcard"),//身份证
                $description:$("#description"),//申诉详情
                $result:$("#result1"),//处理结果
                $btndeal: $("#deal"),//处理按钮
                $btnclose: $("#close"),//关闭按钮
                $image:$("#image"),
                init: function () {
                    _this = this;
                    var id = $("#id").val();
                    var id = $("#code").val();
                    //id不为空,初始化数据
                    if (isNoEmpty(id)) {
                        $.ajax({
                            url: ctx + "/admin/appeal/getAppealById",
                            method: "post",
                            url: ctx + "/admin/static/prescription/getinfo",
                            method: "get",
                            dataType: "json",
                            data: {id: id},
                            success: function (result) {
                                alert(result.toString())
                                if (result.status == '200') {
                                    var data = result.data;
                                    if(data.type==1){