|  | @ -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));
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |         }
 |