| 
					
				 | 
			
			
				@ -4438,6 +4438,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "room.outpatient_id AS \"id\"," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "room.patient_id AS \"patient_id\"," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "room.patient_name AS \"name\"," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "outpatient.patient_name AS \"outPatientName\"," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "outpatient.patient AS \"outPatient\"," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "patient.sex AS \"sex\"," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "patient.idcard AS \"idcard\"," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "patient.photo AS \"photo\"," + 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -4527,6 +4529,20 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            //根据身份证计算年龄 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            for (Map<String, Object> outpatient : list) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                String idcard = (String) outpatient.get("idcard"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                int patientAge = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                int patientSex = 3; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                if (null!=outpatient.get("outPatient")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                   BasePatientDO basePatientDO = basePatientDao.findById(outpatient.get("outPatient").toString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                   if (null!=basePatientDO){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                       if (StringUtils.isNotBlank(basePatientDO.getIdcard())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                           patientAge = DateUtil.getAgeForIdcard(basePatientDO.getIdcard()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                           outpatient.put("patientAge", DateUtil.getAgeForIdcard(basePatientDO.getIdcard())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                       patientSex =basePatientDO.getSex(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                   } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                outpatient.put("patientAge", patientAge); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                outpatient.put("patientSex", patientSex); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                outpatient.put("age", DateUtil.getAgeForIdcard(idcard)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -8905,7 +8921,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public MixEnvelop prescriptionManage(String keyWord,String doctorId,String startTime,String endTime,String checkStatus,Integer page,Integer pageSize){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String sql = " select p.create_time as \"createTime\"," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " p.patient_name as \"patientName\"," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " p.idcard as \"idcard\"," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " o.idcard as \"idcard\"," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " o.card_no as \"cardNo\"," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " p.check_status as \"checkStatus\"," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " p.id as \"id\"," + 
			 |