|  | @ -5,6 +5,7 @@ import com.alibaba.fastjson.serializer.SerializerFeature;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.entity.address.*;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.entity.demographic.DemographicInfo;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.entity.dict.SystemDict;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.entity.doctor.archive.ArchiveInfo;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.entity.doctor.profile.Doctor;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.entity.login.LoginLog;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.entity.patient.Patient;
 | 
	
	
		
			
				|  | @ -16,8 +17,10 @@ import com.yihu.wlyy.entity.patient.vo.PatientArchivesDto;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.entity.patient.vo.PatientVO;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.entity.security.Token;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.repository.address.*;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.repository.archive.PatientArchiveInfoDao;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.repository.demographic.TblBasicDao;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.repository.dict.SystemDictDao;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.repository.doctor.DoctorDao;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.repository.patient.PatientDao;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.repository.patient.PatientInvitationLogDao;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.repository.patient.SignFamilyDao;
 | 
	
	
		
			
				|  | @ -31,6 +34,7 @@ import com.yihu.wlyy.service.common.account.TokenService;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.service.common.login.LoginLogService;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.service.third.jw.JwArchivesService;
 | 
	
		
			
				|  |  | import com.yihu.wlyy.util.*;
 | 
	
		
			
				|  |  | import io.swagger.models.auth.In;
 | 
	
		
			
				|  |  | import org.apache.commons.collections.map.HashedMap;
 | 
	
		
			
				|  |  | import org.apache.commons.lang3.StringUtils;
 | 
	
		
			
				|  |  | import org.json.JSONObject;
 | 
	
	
		
			
				|  | @ -95,6 +99,10 @@ public class PatientInfoService extends BaseService {
 | 
	
		
			
				|  |  |     SocialSecurityInfoDao socialSecurityInfoDao;
 | 
	
		
			
				|  |  |     @Autowired
 | 
	
		
			
				|  |  |     CountryDao countryDao;
 | 
	
		
			
				|  |  |     @Autowired
 | 
	
		
			
				|  |  |     DoctorDao doctorDao;
 | 
	
		
			
				|  |  |     @Autowired
 | 
	
		
			
				|  |  |     PatientArchiveInfoDao patientArchiveInfoDao;
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 患者更换手机号
 | 
	
		
			
				|  |  |      *
 | 
	
	
		
			
				|  | @ -412,6 +420,52 @@ public class PatientInfoService extends BaseService {
 | 
	
		
			
				|  |  |         info.setGrsfen("8");
 | 
	
		
			
				|  |  |         info.setGzztai("01");
 | 
	
		
			
				|  |  |         socialSecurityInfoDao.save(info);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         //保存建档信息到服务器数据库
 | 
	
		
			
				|  |  |         Doctor doctorObj = doctorDao.findByCode(doctorCode);
 | 
	
		
			
				|  |  |         ArchiveInfo archiveInfo = new ArchiveInfo();
 | 
	
		
			
				|  |  |         archiveInfo.setCode(getCode());
 | 
	
		
			
				|  |  |         archiveInfo.setArchiveCode(response);
 | 
	
		
			
				|  |  |         archiveInfo.setSickName(p.getName());
 | 
	
		
			
				|  |  |         archiveInfo.setDoctorCode(doctorCode);
 | 
	
		
			
				|  |  |         if (doctorObj!=null){
 | 
	
		
			
				|  |  |             archiveInfo.setArchiveOperatorName(doctorObj.getName());
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         archiveInfo.setArchiveTime(DateUtil.getStringDateShort());
 | 
	
		
			
				|  |  |         int isSign = signFamilyDao.hasSingStatus(p.getIdcard());
 | 
	
		
			
				|  |  |         if (isSign>0){
 | 
	
		
			
				|  |  |             archiveInfo.setSignStatus(1);
 | 
	
		
			
				|  |  |         }else{
 | 
	
		
			
				|  |  |             archiveInfo.setSignStatus(0);
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         archiveInfo.setArchiveStatus(3);
 | 
	
		
			
				|  |  |         archiveInfo.setSickSex(p.getSex());
 | 
	
		
			
				|  |  |         archiveInfo.setBirthday(brithday);
 | 
	
		
			
				|  |  |         archiveInfo.setJwZoneCode(jwCountryCode);
 | 
	
		
			
				|  |  |         archiveInfo.setIdentityType(1);
 | 
	
		
			
				|  |  |         archiveInfo.setIdentityCardNo(p.getIdcard());
 | 
	
		
			
				|  |  |         archiveInfo.setHomePhone(p.getMobile());
 | 
	
		
			
				|  |  |         archiveInfo.setHomeAddress(adress);
 | 
	
		
			
				|  |  |         archiveInfo.setOrgId("0");
 | 
	
		
			
				|  |  |         archiveInfo.setResidence(1);
 | 
	
		
			
				|  |  |         archiveInfo.setNational(nation);
 | 
	
		
			
				|  |  |         archiveInfo.setOrigo("350200");
 | 
	
		
			
				|  |  |         archiveInfo.setBlood(Integer.valueOf(blood));
 | 
	
		
			
				|  |  |         archiveInfo.setBloodRh(1);
 | 
	
		
			
				|  |  |         archiveInfo.setMarriage(Integer.valueOf(marry));
 | 
	
		
			
				|  |  |         archiveInfo.setInsurCardNo(p.getSsc());
 | 
	
		
			
				|  |  |         //补充参数
 | 
	
		
			
				|  |  |         archiveInfo.setAllergic("0");
 | 
	
		
			
				|  |  |         archiveInfo.setPast("0");
 | 
	
		
			
				|  |  |         archiveInfo.setGenetic(0);
 | 
	
		
			
				|  |  |         archiveInfo.setFamilyNone(0);
 | 
	
		
			
				|  |  |         archiveInfo.setFamilyFather("0");
 | 
	
		
			
				|  |  |         archiveInfo.setFamilyMother("0");
 | 
	
		
			
				|  |  |         archiveInfo.setFamilyBrothers("0");
 | 
	
		
			
				|  |  |         archiveInfo.setFamilyChildren("0");
 | 
	
		
			
				|  |  |         archiveInfo.setDisability("1");
 | 
	
		
			
				|  |  |         patientArchiveInfoDao.save(archiveInfo);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         return 1;
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  |     public int createProfile(String archiveJson) throws Exception{
 | 
	
	
		
			
				|  | @ -419,6 +473,8 @@ public class PatientInfoService extends BaseService {
 | 
	
		
			
				|  |  |         PatientArchivesDto archive = (PatientArchivesDto) net.sf.json.JSONObject.toBean(j,PatientArchivesDto.class);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         Patient p = patientDao.findByCode(archive.getPatient());
 | 
	
		
			
				|  |  |         ArchiveInfo archiveInfo = new ArchiveInfo();
 | 
	
		
			
				|  |  |         Doctor doctorObj = doctorDao.findByCode(archive.getDoctorCode());
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         com.alibaba.fastjson.JSONObject json = new com.alibaba.fastjson.JSONObject();
 | 
	
		
			
				|  |  |         json.put("ARCHIVE_TIME", DateUtil.getStringDateShort());//建档时间
 | 
	
	
		
			
				|  | @ -440,6 +496,36 @@ public class PatientInfoService extends BaseService {
 | 
	
		
			
				|  |  |         json.put("MARRIAGE",archive.getMarry());//婚姻状况【10.未婚 20.已婚 30.丧偶 40.离婚 90.未说明的婚姻状况】
 | 
	
		
			
				|  |  |         json.put("INSUR_CARD_NO",p.getSsc());//医保卡号
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         //保存建档记录信息
 | 
	
		
			
				|  |  |         archiveInfo.setSickName(p.getName());
 | 
	
		
			
				|  |  |         archiveInfo.setDoctorCode(archive.getDoctorCode());
 | 
	
		
			
				|  |  |         if (doctorObj!=null){
 | 
	
		
			
				|  |  |             archiveInfo.setArchiveOperatorName(doctorObj.getName());
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         archiveInfo.setArchiveTime(DateUtil.getStringDateShort());
 | 
	
		
			
				|  |  |         int isSign = signFamilyDao.hasSingStatus(p.getIdcard());
 | 
	
		
			
				|  |  |         if (isSign>0){
 | 
	
		
			
				|  |  |             archiveInfo.setSignStatus(1);
 | 
	
		
			
				|  |  |         }else{
 | 
	
		
			
				|  |  |             archiveInfo.setSignStatus(0);
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         archiveInfo.setArchiveStatus(3);
 | 
	
		
			
				|  |  |         archiveInfo.setSickSex(p.getSex());
 | 
	
		
			
				|  |  |         archiveInfo.setBirthday(archive.getBrithday());
 | 
	
		
			
				|  |  |         archiveInfo.setJwZoneCode(archive.getJwCountryCode());
 | 
	
		
			
				|  |  |         archiveInfo.setIdentityType(1);
 | 
	
		
			
				|  |  |         archiveInfo.setIdentityCardNo(p.getIdcard());
 | 
	
		
			
				|  |  |         archiveInfo.setHomePhone(p.getMobile());
 | 
	
		
			
				|  |  |         archiveInfo.setHomeAddress(archive.getAdress());
 | 
	
		
			
				|  |  |         archiveInfo.setOrgId("0");
 | 
	
		
			
				|  |  |         archiveInfo.setResidence(1);
 | 
	
		
			
				|  |  |         archiveInfo.setNational(archive.getAdress());
 | 
	
		
			
				|  |  |         archiveInfo.setOrigo("350200");
 | 
	
		
			
				|  |  |         archiveInfo.setBlood(Integer.valueOf(archive.getBlood()));
 | 
	
		
			
				|  |  |         archiveInfo.setBloodRh(1);
 | 
	
		
			
				|  |  |         archiveInfo.setMarriage(Integer.valueOf(archive.getMarry()));
 | 
	
		
			
				|  |  |         archiveInfo.setInsurCardNo(p.getSsc());
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         //补充参数
 | 
	
		
			
				|  |  |         json.put("ALLERGIC_WITHOUT","1");//药物过敏史--无【0不勾选 1勾选】(同一类别,新增时,默认勾选)",
 | 
	
	
		
			
				|  | @ -447,55 +533,77 @@ public class PatientInfoService extends BaseService {
 | 
	
		
			
				|  |  |         json.put("TRANSFUSION","0");//   "TRANSFUSION":"既往史--输血--【0 无 1 有】(同一类别,新增时,默认选无)",
 | 
	
		
			
				|  |  |         json.put("EXPOSE_WITHOUT","1");//"EXPOSE_WITHOUT":"暴露史--无【0不勾选 1勾选】(同一类别,新增时,默认勾选)",
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         archiveInfo.setAllergic("0");
 | 
	
		
			
				|  |  |         archiveInfo.setPast("0");
 | 
	
		
			
				|  |  |         archiveInfo.setGenetic(0);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         //教育程度
 | 
	
		
			
				|  |  |         if(StringUtils.isNotBlank(archive.getEducation())){
 | 
	
		
			
				|  |  |             json.put("EDUCATION",archive.getEducation()+"");//文化程度
 | 
	
		
			
				|  |  |             archiveInfo.setEducation(Integer.valueOf(archive.getEducation()));
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         //职业
 | 
	
		
			
				|  |  |         if(StringUtils.isNotBlank(archive.getOccupation())){
 | 
	
		
			
				|  |  |             json.put("OCCUPATION",archive.getOccupation()+"");//职业
 | 
	
		
			
				|  |  |             archiveInfo.setOccupation(Integer.valueOf(archive.getOccupation()));
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         //支付方式
 | 
	
		
			
				|  |  |         if(StringUtils.isNotBlank(archive.getPayment())){
 | 
	
		
			
				|  |  |             json.put("MEDICAL_EXPENSES",archive.getPayment()+"");//支付方式
 | 
	
		
			
				|  |  |             archiveInfo.setMedicalExpenses(Integer.getInteger(archive.getPayment()));
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         //药物过敏史
 | 
	
		
			
				|  |  |         if(StringUtils.isNotBlank(archive.getDrugAllergys())){
 | 
	
		
			
				|  |  |             String allergicStr = "";
 | 
	
		
			
				|  |  |             json.put("ALLERGIC_WITHOUT","0");//药物过敏历史
 | 
	
		
			
				|  |  |             String as[] = archive.getDrugAllergys().split(",");
 | 
	
		
			
				|  |  |             for(String str : as){
 | 
	
		
			
				|  |  |                 if("1".equals(str)){
 | 
	
		
			
				|  |  |                     json.put("ALLERGIC_PENICILLIN","1");//药物过敏史--青霉素
 | 
	
		
			
				|  |  |                     allergicStr +="1,";
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 if("2".equals(str)){
 | 
	
		
			
				|  |  |                     json.put("ALLERGIC_SULFANILAMIDE","1");//药物过敏史--磺胺
 | 
	
		
			
				|  |  |                     allergicStr +="2,";
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 if("3".equals(str)){
 | 
	
		
			
				|  |  |                     json.put("ALLERGIC_STREPTOMYCIN","1");//药物过敏史--链霉素
 | 
	
		
			
				|  |  |                     allergicStr +="3,";
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 if("4".equals(str)){
 | 
	
		
			
				|  |  |                     json.put("ALLERGIC_OTHER","1");//药物过敏史--其它
 | 
	
		
			
				|  |  |                     allergicStr +="4,";
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             if (allergicStr.length()>1){
 | 
	
		
			
				|  |  |                 allergicStr = allergicStr.substring(0,allergicStr.length()-1);
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             archiveInfo.setAllergic(allergicStr);
 | 
	
		
			
				|  |  |         }else{
 | 
	
		
			
				|  |  |             json.put("ALLERGIC_WITHOUT","1");//药物过敏历史
 | 
	
		
			
				|  |  |             archiveInfo.setAllergic("0");
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         //既往史
 | 
	
		
			
				|  |  |         if(StringUtils.isNotBlank(archive.getPastHistorys())){
 | 
	
		
			
				|  |  |             String pastStr = "";
 | 
	
		
			
				|  |  |             json.put("PAST_NONE","0");//既往史
 | 
	
		
			
				|  |  |             String phs[] = archive.getPastHistorys().split(",");
 | 
	
		
			
				|  |  |             String dates[] = archive.getPastHistoryDate().split(",");
 | 
	
		
			
				|  |  |             for(int i=0 ;i<phs.length ; i++){
 | 
	
		
			
				|  |  |                 if("1".equals(phs[i])){
 | 
	
		
			
				|  |  |                     json.put("PAST_HYPERTENSION","1");//既往史--疾病--高血压【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                     pastStr +="1,";
 | 
	
		
			
				|  |  |                     if(!"0".equals(dates[i])){
 | 
	
		
			
				|  |  |                         json.put("PAST_HYPERTENSION_DATE",dates[i]);//既往史--疾病--高血压日期
 | 
	
		
			
				|  |  |                         archiveInfo.setPastHypertensionDate(dates[i]);
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                 }else if("2".equals(phs[i])){
 | 
	
		
			
				|  |  |                     json.put("PAST_DIABETES","1");//既往史--疾病--糖尿病【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                     pastStr +="2,";
 | 
	
		
			
				|  |  |                     if(!"0".equals(dates[i])){
 | 
	
		
			
				|  |  |                         json.put("PAST_DIABETES_DATE",dates[i]);//既往史--疾病--糖尿病日期
 | 
	
		
			
				|  |  |                         archiveInfo.setPastDiabetesDate(dates[i]);
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  | //                if("3".equals(phs[i])){
 | 
	
	
		
			
				|  | @ -506,57 +614,80 @@ public class PatientInfoService extends BaseService {
 | 
	
		
			
				|  |  | //                }
 | 
	
		
			
				|  |  |                 else if("4".equals(phs[i])){
 | 
	
		
			
				|  |  |                     json.put("PAST_OTHER","1");//既往史--疾病--其它【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                     pastStr +="4,";
 | 
	
		
			
				|  |  |                     if(!"0".equals(dates[i])){
 | 
	
		
			
				|  |  |                         json.put("PAST_OTHER_CONTENT_DATE",dates[i]);//既往史--疾病--高血压日期
 | 
	
		
			
				|  |  |                         archiveInfo.setPastOtherContentDate(dates[i]);
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             if (pastStr.length()>1){
 | 
	
		
			
				|  |  |                 pastStr = pastStr.substring(0,pastStr.length()-1);
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             archiveInfo.setPast(pastStr);
 | 
	
		
			
				|  |  |         }else{
 | 
	
		
			
				|  |  |             json.put("PAST_NONE","1");//既往史
 | 
	
		
			
				|  |  |             archiveInfo.setPast("0");
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         //遗传病史
 | 
	
		
			
				|  |  |         if(StringUtils.isNotBlank(archive.getGeneticFlag())){
 | 
	
		
			
				|  |  |             json.put("GENETIC","1");//遗传病史【0 无 1 有】
 | 
	
		
			
				|  |  |             json.put("GENETIC_DISEASENAME",archive.getGeneticContent());//疾病名称
 | 
	
		
			
				|  |  |             archiveInfo.setGenetic(0);
 | 
	
		
			
				|  |  |             archiveInfo.setGeneticDiseaseName(archive.getGeneticContent());
 | 
	
		
			
				|  |  |         }else{
 | 
	
		
			
				|  |  |             json.put("GENETIC","0");//遗传病史【0 无 1 有】
 | 
	
		
			
				|  |  |             archiveInfo.setGenetic(0);
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         //残疾
 | 
	
		
			
				|  |  |         if(StringUtils.isNotBlank(archive.getDisabilitys())){
 | 
	
		
			
				|  |  |             String disabilityStr = "";
 | 
	
		
			
				|  |  |             String ds[] = archive.getDisabilitys().split(",");
 | 
	
		
			
				|  |  |             for(String d :ds){
 | 
	
		
			
				|  |  |                 if("1".equals(d)){
 | 
	
		
			
				|  |  |                     json.put("DISABILITY_WITHOUT","1");//有无残疾--无残疾【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                     disabilityStr +="1,";
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 if("2".equals(d)){
 | 
	
		
			
				|  |  |                     json.put("DISABILITY_EYES","1");//有无残疾--视力残疾【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                     json.put("DISABILITY_WITHOUT","0");//有无残疾--无残疾【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                     disabilityStr +="2,";
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 if("3".equals(d)){
 | 
	
		
			
				|  |  |                     json.put("DISABILITY_EAR","1");//有无残疾--听力残疾【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                     json.put("DISABILITY_WITHOUT","0");//有无残疾--无残疾【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                     disabilityStr +="3,";
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 if("4".equals(d)){
 | 
	
		
			
				|  |  |                     json.put("DISABILITY_SPEECH","1");//有无残疾--言语残疾【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                     json.put("DISABILITY_WITHOUT","0");//有无残疾--无残疾【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                     disabilityStr +="4,";
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 if("5".equals(d)){
 | 
	
		
			
				|  |  |                     json.put("DISABILITY_LIMB","1");//有无残疾--肢体残疾【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                     json.put("DISABILITY_WITHOUT","0");//有无残疾--无残疾【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                     disabilityStr +="5,";
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 if("6".equals(d)){
 | 
	
		
			
				|  |  |                     json.put("DISABILITY_INTELLECTUAL","1");//有无残疾--智力残疾【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                     json.put("DISABILITY_WITHOUT","0");//有无残疾--无残疾【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                     disabilityStr +="6,";
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 if("7".equals(d)){
 | 
	
		
			
				|  |  |                     json.put("DISABILITY_OTHER","1");//有无残疾--其它残疾【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                     json.put("DISABILITY_WITHOUT","0");//有无残疾--无残疾【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                     disabilityStr +="7,";
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             if (disabilityStr.length()>1){
 | 
	
		
			
				|  |  |                 disabilityStr = disabilityStr.substring(0,disabilityStr.length()-1);
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             archiveInfo.setDisability(disabilityStr);
 | 
	
		
			
				|  |  |         }else{
 | 
	
		
			
				|  |  |             json.put("DISABILITY_WITHOUT","1");//  "DISABILITY_WITHOUT":"有无残疾--无残疾【0不勾选 1勾选】(同一类别,新增时,默认勾选)",
 | 
	
		
			
				|  |  |             archiveInfo.setDisability("1");
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         //家族史
 | 
	
	
		
			
				|  | @ -564,134 +695,202 @@ public class PatientInfoService extends BaseService {
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             //父亲
 | 
	
		
			
				|  |  |             if(StringUtils.isNotBlank(archive.getFamilyFatherHistorys())){
 | 
	
		
			
				|  |  |                 String fatherStr ="";
 | 
	
		
			
				|  |  |                 json.put("FAMILY_FATHER_NONE","0");//家族史--父亲--无【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                 String fhs[] = archive.getFamilyFatherHistorys().split(",");
 | 
	
		
			
				|  |  |                 for(String fh : fhs){
 | 
	
		
			
				|  |  |                     if("1".equals(fh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_FATHER_HYPERTENSION","1");//家族史--父亲--高血压【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         fatherStr += "1,";
 | 
	
		
			
				|  |  |                     } else if("2".equals(fh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_FATHER_DIABETES","1");//家族史--父亲--糖尿病【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         fatherStr += "2,";
 | 
	
		
			
				|  |  |                     } else if("3".equals(fh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_FATHER_CORONARY","1");//家族史--父亲--冠心病【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         fatherStr += "3,";
 | 
	
		
			
				|  |  |                     } else if("4".equals(fh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_FATHER_ALLERGY","1");//家族史--父亲--慢性阻塞性肺疾病【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         fatherStr += "4,";
 | 
	
		
			
				|  |  |                     } else if("5".equals(fh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_FATHER_MALIGNANT","1");//家族史--父亲--恶性肿瘤【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         fatherStr += "5,";
 | 
	
		
			
				|  |  |                     } else if("6".equals(fh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_FATHER_STROKE","1");//家族史--父亲--脑卒中【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         fatherStr += "6,";
 | 
	
		
			
				|  |  |                     } else if("7".equals(fh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_FATHER_SCHIZOPHRENIA","1");//家族史--父亲--重性精神疾病【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         fatherStr += "7,";
 | 
	
		
			
				|  |  |                     } else if("8".equals(fh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_FATHER_TB","1");//家族史--父亲--结核病【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         fatherStr += "8,";
 | 
	
		
			
				|  |  |                     } else if("9".equals(fh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_FATHER_HEPATITIS","1");//家族史--父亲--肝炎【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         fatherStr += "9,";
 | 
	
		
			
				|  |  |                     } else if("10".equals(fh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_FATHER_CONGENITAL","1");//家族史--父亲--先天畸形【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         fatherStr += "10,";
 | 
	
		
			
				|  |  |                     } else if("11".equals(fh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_FATHER_OTHER","1");//家族史--父亲--其它【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         fatherStr += "11,";
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 if (fatherStr.length()>1){
 | 
	
		
			
				|  |  |                     fatherStr = fatherStr.substring(0,fatherStr.length()-1);
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 archiveInfo.setFamilyFather(fatherStr);
 | 
	
		
			
				|  |  |             }else{
 | 
	
		
			
				|  |  |                 json.put("FAMILY_FATHER_NONE","1");//家族史--父亲--无【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                 archiveInfo.setFamilyFather("0");
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             //母亲
 | 
	
		
			
				|  |  |             if(StringUtils.isNotBlank(archive.getFamilyMotherHistorys())){
 | 
	
		
			
				|  |  |                 String motherStr = "";
 | 
	
		
			
				|  |  |                 json.put("FAMILY_MOTHER_NONE","0");//家族史--母亲--无【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                 String mhs[] = archive.getFamilyMotherHistorys().split(",");
 | 
	
		
			
				|  |  |                 for(String mh : mhs){
 | 
	
		
			
				|  |  |                     if("1".equals(mh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_MOTHER_HYPERTENSION","1");//家族史--母亲--高血压【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         motherStr += "1,";
 | 
	
		
			
				|  |  |                     } else if("2".equals(mh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_MOTHER_DIABETES","1");//家族史--母亲--糖尿病【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         motherStr += "2,";
 | 
	
		
			
				|  |  |                     } else if("3".equals(mh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_MOTHER_CORONARY","1");//家族史--母亲--冠心病【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         motherStr += "3,";
 | 
	
		
			
				|  |  |                     } else if("4".equals(mh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_MOTHER_ALLERGY","1");//家族史--母亲--慢性阻塞性肺疾病【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         motherStr += "4,";
 | 
	
		
			
				|  |  |                     } else if("5".equals(mh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_MOTHER_MALIGNANT","1");//家族史--母亲--恶性肿瘤【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         motherStr += "5,";
 | 
	
		
			
				|  |  |                     } else if("6".equals(mh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_MOTHER_STROKE","1");//家族史--母亲--脑卒中【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         motherStr += "6,";
 | 
	
		
			
				|  |  |                     } else if("7".equals(mh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_MOTHER_SCHIZOPHRENIA","1");//家族史--母亲--重性精神疾病【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         motherStr += "7,";
 | 
	
		
			
				|  |  |                     } else if("8".equals(mh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_MOTHER_TB","1");//家族史--母亲--结核病【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         motherStr += "8,";
 | 
	
		
			
				|  |  |                     } else if("9".equals(mh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_MOTHER_HEPATITIS","1");//家族史--母亲--肝炎【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         motherStr += "9,";
 | 
	
		
			
				|  |  |                     } else if("10".equals(mh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_MOTHER_CONGENITAL","1");//家族史--母亲--先天畸形【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         motherStr += "10,";
 | 
	
		
			
				|  |  |                     } else if("11".equals(mh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_MOTHER_OTHER","1");//家族史--母亲--其它【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         motherStr += "11,";
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 if (motherStr.length()>1){
 | 
	
		
			
				|  |  |                     motherStr = motherStr.substring(0,motherStr.length()-1);
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 archiveInfo.setFamilyMother(motherStr);
 | 
	
		
			
				|  |  |             }else{
 | 
	
		
			
				|  |  |                 json.put("FAMILY_MOTHER_NONE","1");//家族史--母亲--无【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                 archiveInfo.setFamilyMother("0");
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             //兄妹
 | 
	
		
			
				|  |  |             if(StringUtils.isNotBlank(archive.getFamilyBrotherHistorys())){
 | 
	
		
			
				|  |  |                 String brotherStr = "";
 | 
	
		
			
				|  |  |                 json.put("FAMILY_BROTHERS_NONE","0");//家族史--兄弟姐妹--无【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                 String bhs[] = archive.getFamilyBrotherHistorys().split(",");
 | 
	
		
			
				|  |  |                 for(String bh : bhs){
 | 
	
		
			
				|  |  |                     if("1".equals(bh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_BROTHERS_HYPERTENSION","1");//家族史--兄弟姐妹--高血压【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         brotherStr += "1,";
 | 
	
		
			
				|  |  |                     } else if("2".equals(bh)){
 | 
	
		
			
				|  |  |                         json.put("AMILY_BROTHERS_DIABETES","1");//家族史--兄弟姐妹--糖尿病【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         brotherStr += "2,";
 | 
	
		
			
				|  |  |                     } else if("3".equals(bh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_BROTHERS_CORONARY","1");//家族史--兄弟姐妹--冠心病【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         brotherStr += "3,";
 | 
	
		
			
				|  |  |                     } else if("4".equals(bh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_BROTHERS_ALLERGY","1");//家族史--兄弟姐妹--慢性阻塞性肺疾病【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         brotherStr += "4,";
 | 
	
		
			
				|  |  |                     } else if("5".equals(bh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_BROTHERS_MALIGNANT","1");//家族史--兄弟姐妹--恶性肿瘤【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         brotherStr += "5,";
 | 
	
		
			
				|  |  |                     } else if("6".equals(bh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_BROTHERS_STROKE","1");//家族史--兄弟姐妹--脑卒中【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         brotherStr += "6,";
 | 
	
		
			
				|  |  |                     } else if("7".equals(bh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_BROTHERS_SCHIZOPHRENIA","1");//家族史--兄弟姐妹--重性精神疾病【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         brotherStr += "7,";
 | 
	
		
			
				|  |  |                     } else if("8".equals(bh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_BROTHERS_TB","1");//家族史--兄弟姐妹--结核病【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         brotherStr += "8,";
 | 
	
		
			
				|  |  |                     } else if("9".equals(bh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_BROTHERS_HEPATITIS","1");//家族史--兄弟姐妹--肝炎【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         brotherStr += "9,";
 | 
	
		
			
				|  |  |                     } else if("10".equals(bh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_BROTHERS_CONGENITAL","1");//家族史--兄弟姐妹--先天畸形【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         brotherStr += "10,";
 | 
	
		
			
				|  |  |                     } else if("11".equals(bh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_BROTHERS_OTHER","1");//家族史--兄弟姐妹--其它【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         brotherStr += "11,";
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 if (brotherStr.length()>1){
 | 
	
		
			
				|  |  |                     brotherStr = brotherStr.substring(0,brotherStr.length()-1);
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 archiveInfo.setFamilyBrothers(brotherStr);
 | 
	
		
			
				|  |  |             }else{
 | 
	
		
			
				|  |  |                 json.put("FAMILY_BROTHERS_NONE","1");//家族史--兄弟姐妹--无【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                 archiveInfo.setFamilyBrothers("0");
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             //子女
 | 
	
		
			
				|  |  |             if(StringUtils.isNotBlank(archive.getFamilyBrotherHistorys())){
 | 
	
		
			
				|  |  |                 String chidrenStr = "";
 | 
	
		
			
				|  |  |                 json.put("FAMILY_CHILDREN_NONE","0");//家族史--兄弟姐妹--无【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                 String bhs[] = archive.getFamilyBrotherHistorys().split(",");
 | 
	
		
			
				|  |  |                 for(String bh : bhs){
 | 
	
		
			
				|  |  |                     if("1".equals(bh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_CHILDREN_HYPERTENSION","1");//家族史--子女--高血压【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         chidrenStr += "1,";
 | 
	
		
			
				|  |  |                     } else if("2".equals(bh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_CHILDREN_DIABETES","1");//家族史--子女--糖尿病【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         chidrenStr += "2,";
 | 
	
		
			
				|  |  |                     } else if("3".equals(bh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_CHILDREN_CORONARY","1");//家族史--子女--冠心病【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         chidrenStr += "3,";
 | 
	
		
			
				|  |  |                     } else if("4".equals(bh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_CHILDREN_ALLERGY","1");//家族史--子女--慢性阻塞性肺疾病【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         chidrenStr += "4,";
 | 
	
		
			
				|  |  |                     } else if("5".equals(bh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_CHILDREN_MALIGNANT","1");//家族史--子女--恶性肿瘤【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         chidrenStr += "5,";
 | 
	
		
			
				|  |  |                     } else if("6".equals(bh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_CHILDREN_STROKE","1");//家族史--子女--脑卒中【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         chidrenStr += "6,";
 | 
	
		
			
				|  |  |                     } else if("7".equals(bh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_CHILDREN_SCHIZOPHRENIA","1");//家族史--子女--重性精神疾病【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         chidrenStr += "7,";
 | 
	
		
			
				|  |  |                     } else if("8".equals(bh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_BROTHERS_TB","1");//家族史--子女--结核病【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         chidrenStr += "8,";
 | 
	
		
			
				|  |  |                     } else if("9".equals(bh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_CHILDREN_HEPATITIS","1");//家族史--子女--肝炎【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         chidrenStr += "9,";
 | 
	
		
			
				|  |  |                     } else if("10".equals(bh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_CHILDREN_CONGENITAL","1");//家族史--子女--先天畸形【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         chidrenStr += "10,";
 | 
	
		
			
				|  |  |                     } else if("11".equals(bh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_CHILDREN_OTHER","1");//家族史--子女--其它【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         chidrenStr += "11,";
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 if (chidrenStr.length()>1){
 | 
	
		
			
				|  |  |                     chidrenStr = chidrenStr.substring(0,chidrenStr.length()-1);
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 archiveInfo.setFamilyChildren(chidrenStr);
 | 
	
		
			
				|  |  |             }else{
 | 
	
		
			
				|  |  |                 json.put("FAMILY_CHILDREN_NONE","1");//家族史--子女--无【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                 archiveInfo.setFamilyChildren("0");
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         }else{
 | 
	
	
		
			
				|  | @ -699,6 +898,11 @@ public class PatientInfoService extends BaseService {
 | 
	
		
			
				|  |  |             json.put("FAMILY_MOTHER_NONE","1");// "FAMILY_MOTHER_NONE":"家族史--母亲--无【0不勾选 1勾选】(同一类别,新增时,默认勾选)",
 | 
	
		
			
				|  |  |             json.put("FAMILY_BROTHERS_NONE","1");//  "FAMILY_BROTHERS_NONE":"家族史--兄弟姐妹--无【0不勾选 1勾选】(同一类别,新增时,默认勾选)",
 | 
	
		
			
				|  |  |             json.put("FAMILY_CHILDREN_NONE","1");//  "FAMILY_CHILDREN_NONE":"家族史--子女--无【0不勾选 1勾选】(同一类别,新增时,默认勾选)",
 | 
	
		
			
				|  |  |             archiveInfo.setFamilyNone(0);
 | 
	
		
			
				|  |  |             archiveInfo.setFamilyFather("0");
 | 
	
		
			
				|  |  |             archiveInfo.setFamilyMother("0");
 | 
	
		
			
				|  |  |             archiveInfo.setFamilyBrothers("0");
 | 
	
		
			
				|  |  |             archiveInfo.setFamilyChildren("0");
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         json.put("SURGERY","0");// "SURGERY":"既往史--手术--【0 无 1 有】(同一类别,新增时,默认选无)",
 | 
	
	
		
			
				|  | @ -721,12 +925,19 @@ public class PatientInfoService extends BaseService {
 | 
	
		
			
				|  |  |         info.setGzztai("01");
 | 
	
		
			
				|  |  |         socialSecurityInfoDao.save(info);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         //保存建档记录信息到服务器数据库
 | 
	
		
			
				|  |  |         archiveInfo.setCode(getCode());
 | 
	
		
			
				|  |  |         archiveInfo.setArchiveCode(response);
 | 
	
		
			
				|  |  |         patientArchiveInfoDao.save(archiveInfo);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         return 1;
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     public int createProfile(PatientArchivesDto archive) throws Exception{
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         Patient p = patientDao.findByCode(archive.getPatient());
 | 
	
		
			
				|  |  |         ArchiveInfo archiveInfo = new ArchiveInfo();
 | 
	
		
			
				|  |  |         Doctor doctorObj = doctorDao.findByCode(archive.getDoctorCode());
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         com.alibaba.fastjson.JSONObject json = new com.alibaba.fastjson.JSONObject();
 | 
	
		
			
				|  |  |         json.put("ARCHIVE_TIME", DateUtil.getStringDateShort());//建档时间
 | 
	
	
		
			
				|  | @ -748,6 +959,35 @@ public class PatientInfoService extends BaseService {
 | 
	
		
			
				|  |  |         json.put("MARRIAGE",archive.getMarry());//婚姻状况【10.未婚 20.已婚 30.丧偶 40.离婚 90.未说明的婚姻状况】
 | 
	
		
			
				|  |  |         json.put("INSUR_CARD_NO",p.getSsc());//医保卡号
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         //保存建档记录信息
 | 
	
		
			
				|  |  |         archiveInfo.setSickName(p.getName());
 | 
	
		
			
				|  |  |         archiveInfo.setDoctorCode(archive.getDoctorCode());
 | 
	
		
			
				|  |  |         if (doctorObj!=null){
 | 
	
		
			
				|  |  |             archiveInfo.setArchiveOperatorName(doctorObj.getName());
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         archiveInfo.setArchiveTime(DateUtil.getStringDateShort());
 | 
	
		
			
				|  |  |         int isSign = signFamilyDao.hasSingStatus(p.getIdcard());
 | 
	
		
			
				|  |  |         if (isSign>0){
 | 
	
		
			
				|  |  |             archiveInfo.setSignStatus(1);
 | 
	
		
			
				|  |  |         }else{
 | 
	
		
			
				|  |  |             archiveInfo.setSignStatus(0);
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         archiveInfo.setArchiveStatus(3);
 | 
	
		
			
				|  |  |         archiveInfo.setSickSex(p.getSex());
 | 
	
		
			
				|  |  |         archiveInfo.setBirthday(archive.getBrithday());
 | 
	
		
			
				|  |  |         archiveInfo.setJwZoneCode(archive.getJwCountryCode());
 | 
	
		
			
				|  |  |         archiveInfo.setIdentityType(1);
 | 
	
		
			
				|  |  |         archiveInfo.setIdentityCardNo(p.getIdcard());
 | 
	
		
			
				|  |  |         archiveInfo.setHomePhone(p.getMobile());
 | 
	
		
			
				|  |  |         archiveInfo.setHomeAddress(archive.getAdress());
 | 
	
		
			
				|  |  |         archiveInfo.setOrgId("0");
 | 
	
		
			
				|  |  |         archiveInfo.setResidence(1);
 | 
	
		
			
				|  |  |         archiveInfo.setNational(archive.getAdress());
 | 
	
		
			
				|  |  |         archiveInfo.setOrigo("350200");
 | 
	
		
			
				|  |  |         archiveInfo.setBlood(Integer.valueOf(archive.getBlood()));
 | 
	
		
			
				|  |  |         archiveInfo.setBloodRh(1);
 | 
	
		
			
				|  |  |         archiveInfo.setMarriage(Integer.valueOf(archive.getMarry()));
 | 
	
		
			
				|  |  |         archiveInfo.setInsurCardNo(p.getSsc());
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         //补充参数
 | 
	
		
			
				|  |  |         json.put("ALLERGIC_WITHOUT","1");//药物过敏史--无【0不勾选 1勾选】(同一类别,新增时,默认勾选)",
 | 
	
	
		
			
				|  | @ -755,55 +995,77 @@ public class PatientInfoService extends BaseService {
 | 
	
		
			
				|  |  |         json.put("TRANSFUSION","0");//   "TRANSFUSION":"既往史--输血--【0 无 1 有】(同一类别,新增时,默认选无)",
 | 
	
		
			
				|  |  |         json.put("EXPOSE_WITHOUT","1");//"EXPOSE_WITHOUT":"暴露史--无【0不勾选 1勾选】(同一类别,新增时,默认勾选)",
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         archiveInfo.setAllergic("0");
 | 
	
		
			
				|  |  |         archiveInfo.setPast("0");
 | 
	
		
			
				|  |  |         archiveInfo.setGenetic(0);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         //教育程度
 | 
	
		
			
				|  |  |         if(StringUtils.isNotBlank(archive.getEducation())){
 | 
	
		
			
				|  |  |             json.put("EDUCATION",archive.getEducation()+"");//文化程度
 | 
	
		
			
				|  |  |             archiveInfo.setEducation(Integer.valueOf(archive.getEducation()));
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         //职业
 | 
	
		
			
				|  |  |         if(StringUtils.isNotBlank(archive.getOccupation())){
 | 
	
		
			
				|  |  |             json.put("OCCUPATION",archive.getOccupation()+"");//职业
 | 
	
		
			
				|  |  |             archiveInfo.setOccupation(Integer.valueOf(archive.getOccupation()));
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         //支付方式
 | 
	
		
			
				|  |  |         if(StringUtils.isNotBlank(archive.getPayment())){
 | 
	
		
			
				|  |  |             json.put("MEDICAL_EXPENSES",archive.getPayment()+"");//支付方式
 | 
	
		
			
				|  |  |             archiveInfo.setMedicalExpenses(Integer.getInteger(archive.getPayment()));
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         //药物过敏史
 | 
	
		
			
				|  |  |         if(StringUtils.isNotBlank(archive.getDrugAllergys())){
 | 
	
		
			
				|  |  |             String allergicStr = "";
 | 
	
		
			
				|  |  |             json.put("ALLERGIC_WITHOUT","0");//药物过敏历史
 | 
	
		
			
				|  |  |             String as[] = archive.getDrugAllergys().split(",");
 | 
	
		
			
				|  |  |             for(String str : as){
 | 
	
		
			
				|  |  |                 if("1".equals(str)){
 | 
	
		
			
				|  |  |                     json.put("ALLERGIC_PENICILLIN","1");//药物过敏史--青霉素
 | 
	
		
			
				|  |  |                     allergicStr +="1,";
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 if("2".equals(str)){
 | 
	
		
			
				|  |  |                     json.put("ALLERGIC_SULFANILAMIDE","1");//药物过敏史--磺胺
 | 
	
		
			
				|  |  |                     allergicStr +="2,";
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 if("3".equals(str)){
 | 
	
		
			
				|  |  |                     json.put("ALLERGIC_STREPTOMYCIN","1");//药物过敏史--链霉素
 | 
	
		
			
				|  |  |                     allergicStr +="3,";
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 if("4".equals(str)){
 | 
	
		
			
				|  |  |                     json.put("ALLERGIC_OTHER","1");//药物过敏史--其它
 | 
	
		
			
				|  |  |                     allergicStr +="4,";
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             if (allergicStr.length()>1){
 | 
	
		
			
				|  |  |                 allergicStr = allergicStr.substring(0,allergicStr.length()-1);
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             archiveInfo.setAllergic(allergicStr);
 | 
	
		
			
				|  |  |         }else{
 | 
	
		
			
				|  |  |             json.put("ALLERGIC_WITHOUT","1");//药物过敏历史
 | 
	
		
			
				|  |  |             archiveInfo.setAllergic("0");
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         //既往史
 | 
	
		
			
				|  |  |         if(StringUtils.isNotBlank(archive.getPastHistorys())){
 | 
	
		
			
				|  |  |             String pastStr = "";
 | 
	
		
			
				|  |  |             json.put("PAST_NONE","0");//既往史
 | 
	
		
			
				|  |  |             String phs[] = archive.getPastHistorys().split(",");
 | 
	
		
			
				|  |  |             String dates[] = archive.getPastHistoryDate().split(",");
 | 
	
		
			
				|  |  |             for(int i=0 ;i<phs.length ; i++){
 | 
	
		
			
				|  |  |                 if("1".equals(phs[i])){
 | 
	
		
			
				|  |  |                     json.put("PAST_HYPERTENSION","1");//既往史--疾病--高血压【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                     pastStr +="1,";
 | 
	
		
			
				|  |  |                     if(!"0".equals(dates[i])){
 | 
	
		
			
				|  |  |                         json.put("PAST_HYPERTENSION_DATE",dates[i]);//既往史--疾病--高血压日期
 | 
	
		
			
				|  |  |                         archiveInfo.setPastHypertensionDate(dates[i]);
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                 }else if("2".equals(phs[i])){
 | 
	
		
			
				|  |  |                     json.put("PAST_DIABETES","1");//既往史--疾病--糖尿病【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                     pastStr +="2,";
 | 
	
		
			
				|  |  |                     if(!"0".equals(dates[i])){
 | 
	
		
			
				|  |  |                         json.put("PAST_DIABETES_DATE",dates[i]);//既往史--疾病--糖尿病日期
 | 
	
		
			
				|  |  |                         archiveInfo.setPastDiabetesDate(dates[i]);
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  | //                if("3".equals(phs[i])){
 | 
	
	
		
			
				|  | @ -814,58 +1076,81 @@ public class PatientInfoService extends BaseService {
 | 
	
		
			
				|  |  | //                }
 | 
	
		
			
				|  |  |                 else if("4".equals(phs[i])){
 | 
	
		
			
				|  |  |                     json.put("PAST_OTHER","1");//既往史--疾病--其它【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                     pastStr +="4,";
 | 
	
		
			
				|  |  |                     if(!"0".equals(dates[i])){
 | 
	
		
			
				|  |  |                         json.put("PAST_OTHER_CONTENT_DATE",dates[i]);//既往史--疾病--高血压日期
 | 
	
		
			
				|  |  |                         archiveInfo.setPastOtherContentDate(dates[i]);
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             if (pastStr.length()>1){
 | 
	
		
			
				|  |  |                 pastStr = pastStr.substring(0,pastStr.length()-1);
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             archiveInfo.setPast(pastStr);
 | 
	
		
			
				|  |  |         }else{
 | 
	
		
			
				|  |  |             json.put("PAST_NONE","1");//既往史
 | 
	
		
			
				|  |  |             archiveInfo.setPast("0");
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         //遗传病史
 | 
	
		
			
				|  |  |         if(StringUtils.isNotBlank(archive.getGeneticFlag())){
 | 
	
		
			
				|  |  |             json.put("GENETIC","1");//遗传病史【0 无 1 有】
 | 
	
		
			
				|  |  |             json.put("GENETIC_DISEASENAME",archive.getGeneticContent());//疾病名称
 | 
	
		
			
				|  |  |             archiveInfo.setGenetic(0);
 | 
	
		
			
				|  |  |             archiveInfo.setGeneticDiseaseName(archive.getGeneticContent());
 | 
	
		
			
				|  |  |         }else{
 | 
	
		
			
				|  |  |             json.put("GENETIC","0");//遗传病史【0 无 1 有】
 | 
	
		
			
				|  |  |             archiveInfo.setGenetic(0);
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         //残疾
 | 
	
		
			
				|  |  |         if(StringUtils.isNotBlank(archive.getDisabilitys())){
 | 
	
		
			
				|  |  |             String disabilityStr = "";
 | 
	
		
			
				|  |  |             String ds[] = archive.getDisabilitys().split(",");
 | 
	
		
			
				|  |  |             for(String d :ds){
 | 
	
		
			
				|  |  |                 if("1".equals(d)){
 | 
	
		
			
				|  |  |                     json.put("DISABILITY_WITHOUT","1");//有无残疾--无残疾【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                     disabilityStr +="1,";
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 if("2".equals(d)){
 | 
	
		
			
				|  |  |                     json.put("DISABILITY_EYES","1");//有无残疾--视力残疾【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                     json.put("DISABILITY_WITHOUT","0");//有无残疾--无残疾【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                     disabilityStr +="2,";
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 if("3".equals(d)){
 | 
	
		
			
				|  |  |                     json.put("DISABILITY_EAR","1");//有无残疾--听力残疾【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                     json.put("DISABILITY_WITHOUT","0");//有无残疾--无残疾【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                     disabilityStr +="3,";
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 if("4".equals(d)){
 | 
	
		
			
				|  |  |                     json.put("DISABILITY_SPEECH","1");//有无残疾--言语残疾【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                     json.put("DISABILITY_WITHOUT","0");//有无残疾--无残疾【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                     disabilityStr +="4,";
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 if("5".equals(d)){
 | 
	
		
			
				|  |  |                     json.put("DISABILITY_LIMB","1");//有无残疾--肢体残疾【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                     json.put("DISABILITY_WITHOUT","0");//有无残疾--无残疾【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                     disabilityStr +="5,";
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 if("6".equals(d)){
 | 
	
		
			
				|  |  |                     json.put("DISABILITY_INTELLECTUAL","1");//有无残疾--智力残疾【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                     json.put("DISABILITY_WITHOUT","0");//有无残疾--无残疾【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                     disabilityStr +="6,";
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 if("7".equals(d)){
 | 
	
		
			
				|  |  |                     json.put("DISABILITY_OTHER","1");//有无残疾--其它残疾【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                     json.put("DISABILITY_WITHOUT","0");//有无残疾--无残疾【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                     disabilityStr +="7,";
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             if (disabilityStr.length()>1){
 | 
	
		
			
				|  |  |                 disabilityStr = disabilityStr.substring(0,disabilityStr.length()-1);
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             archiveInfo.setDisability(disabilityStr);
 | 
	
		
			
				|  |  |         }else{
 | 
	
		
			
				|  |  |             json.put("DISABILITY_WITHOUT","1");//  "DISABILITY_WITHOUT":"有无残疾--无残疾【0不勾选 1勾选】(同一类别,新增时,默认勾选)",
 | 
	
		
			
				|  |  |             archiveInfo.setDisability("1");
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         //家族史
 | 
	
	
		
			
				|  | @ -873,134 +1158,202 @@ public class PatientInfoService extends BaseService {
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             //父亲
 | 
	
		
			
				|  |  |             if(StringUtils.isNotBlank(archive.getFamilyFatherHistorys())){
 | 
	
		
			
				|  |  |                 String fatherStr ="";
 | 
	
		
			
				|  |  |                 json.put("FAMILY_FATHER_NONE","0");//家族史--父亲--无【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                 String fhs[] = archive.getFamilyFatherHistorys().split(",");
 | 
	
		
			
				|  |  |                 for(String fh : fhs){
 | 
	
		
			
				|  |  |                     if("1".equals(fh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_FATHER_HYPERTENSION","1");//家族史--父亲--高血压【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         fatherStr += "1,";
 | 
	
		
			
				|  |  |                     } else if("2".equals(fh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_FATHER_DIABETES","1");//家族史--父亲--糖尿病【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         fatherStr += "2,";
 | 
	
		
			
				|  |  |                     } else if("3".equals(fh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_FATHER_CORONARY","1");//家族史--父亲--冠心病【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         fatherStr += "3,";
 | 
	
		
			
				|  |  |                     } else if("4".equals(fh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_FATHER_ALLERGY","1");//家族史--父亲--慢性阻塞性肺疾病【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         fatherStr += "4,";
 | 
	
		
			
				|  |  |                     } else if("5".equals(fh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_FATHER_MALIGNANT","1");//家族史--父亲--恶性肿瘤【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         fatherStr += "5,";
 | 
	
		
			
				|  |  |                     } else if("6".equals(fh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_FATHER_STROKE","1");//家族史--父亲--脑卒中【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         fatherStr += "6,";
 | 
	
		
			
				|  |  |                     } else if("7".equals(fh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_FATHER_SCHIZOPHRENIA","1");//家族史--父亲--重性精神疾病【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         fatherStr += "7,";
 | 
	
		
			
				|  |  |                     } else if("8".equals(fh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_FATHER_TB","1");//家族史--父亲--结核病【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         fatherStr += "8,";
 | 
	
		
			
				|  |  |                     } else if("9".equals(fh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_FATHER_HEPATITIS","1");//家族史--父亲--肝炎【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         fatherStr += "9,";
 | 
	
		
			
				|  |  |                     } else if("10".equals(fh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_FATHER_CONGENITAL","1");//家族史--父亲--先天畸形【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         fatherStr += "10,";
 | 
	
		
			
				|  |  |                     } else if("11".equals(fh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_FATHER_OTHER","1");//家族史--父亲--其它【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         fatherStr += "11,";
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 if (fatherStr.length()>1){
 | 
	
		
			
				|  |  |                     fatherStr = fatherStr.substring(0,fatherStr.length()-1);
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 archiveInfo.setFamilyFather(fatherStr);
 | 
	
		
			
				|  |  |             }else{
 | 
	
		
			
				|  |  |                 json.put("FAMILY_FATHER_NONE","1");//家族史--父亲--无【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                 archiveInfo.setFamilyFather("0");
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             //母亲
 | 
	
		
			
				|  |  |             if(StringUtils.isNotBlank(archive.getFamilyMotherHistorys())){
 | 
	
		
			
				|  |  |                 String motherStr = "";
 | 
	
		
			
				|  |  |                 json.put("FAMILY_MOTHER_NONE","0");//家族史--母亲--无【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                 String mhs[] = archive.getFamilyMotherHistorys().split(",");
 | 
	
		
			
				|  |  |                 for(String mh : mhs){
 | 
	
		
			
				|  |  |                     if("1".equals(mh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_MOTHER_HYPERTENSION","1");//家族史--母亲--高血压【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         motherStr += "1,";
 | 
	
		
			
				|  |  |                     } else if("2".equals(mh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_MOTHER_DIABETES","1");//家族史--母亲--糖尿病【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         motherStr += "2,";
 | 
	
		
			
				|  |  |                     } else if("3".equals(mh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_MOTHER_CORONARY","1");//家族史--母亲--冠心病【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         motherStr += "3,";
 | 
	
		
			
				|  |  |                     } else if("4".equals(mh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_MOTHER_ALLERGY","1");//家族史--母亲--慢性阻塞性肺疾病【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         motherStr += "4,";
 | 
	
		
			
				|  |  |                     } else if("5".equals(mh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_MOTHER_MALIGNANT","1");//家族史--母亲--恶性肿瘤【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         motherStr += "5,";
 | 
	
		
			
				|  |  |                     } else if("6".equals(mh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_MOTHER_STROKE","1");//家族史--母亲--脑卒中【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         motherStr += "6,";
 | 
	
		
			
				|  |  |                     } else if("7".equals(mh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_MOTHER_SCHIZOPHRENIA","1");//家族史--母亲--重性精神疾病【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         motherStr += "7,";
 | 
	
		
			
				|  |  |                     } else if("8".equals(mh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_MOTHER_TB","1");//家族史--母亲--结核病【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         motherStr += "8,";
 | 
	
		
			
				|  |  |                     } else if("9".equals(mh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_MOTHER_HEPATITIS","1");//家族史--母亲--肝炎【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         motherStr += "9,";
 | 
	
		
			
				|  |  |                     } else if("10".equals(mh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_MOTHER_CONGENITAL","1");//家族史--母亲--先天畸形【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         motherStr += "10,";
 | 
	
		
			
				|  |  |                     } else if("11".equals(mh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_MOTHER_OTHER","1");//家族史--母亲--其它【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         motherStr += "11,";
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 if (motherStr.length()>1){
 | 
	
		
			
				|  |  |                     motherStr = motherStr.substring(0,motherStr.length()-1);
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 archiveInfo.setFamilyMother(motherStr);
 | 
	
		
			
				|  |  |             }else{
 | 
	
		
			
				|  |  |                 json.put("FAMILY_MOTHER_NONE","1");//家族史--母亲--无【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                 archiveInfo.setFamilyMother("0");
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             //兄妹
 | 
	
		
			
				|  |  |             if(StringUtils.isNotBlank(archive.getFamilyBrotherHistorys())){
 | 
	
		
			
				|  |  |                 String brotherStr = "";
 | 
	
		
			
				|  |  |                 json.put("FAMILY_BROTHERS_NONE","0");//家族史--兄弟姐妹--无【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                 String bhs[] = archive.getFamilyBrotherHistorys().split(",");
 | 
	
		
			
				|  |  |                 for(String bh : bhs){
 | 
	
		
			
				|  |  |                     if("1".equals(bh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_BROTHERS_HYPERTENSION","1");//家族史--兄弟姐妹--高血压【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         brotherStr += "1,";
 | 
	
		
			
				|  |  |                     } else if("2".equals(bh)){
 | 
	
		
			
				|  |  |                         json.put("AMILY_BROTHERS_DIABETES","1");//家族史--兄弟姐妹--糖尿病【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         brotherStr += "2,";
 | 
	
		
			
				|  |  |                     } else if("3".equals(bh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_BROTHERS_CORONARY","1");//家族史--兄弟姐妹--冠心病【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         brotherStr += "3,";
 | 
	
		
			
				|  |  |                     } else if("4".equals(bh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_BROTHERS_ALLERGY","1");//家族史--兄弟姐妹--慢性阻塞性肺疾病【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         brotherStr += "4,";
 | 
	
		
			
				|  |  |                     } else if("5".equals(bh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_BROTHERS_MALIGNANT","1");//家族史--兄弟姐妹--恶性肿瘤【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         brotherStr += "5,";
 | 
	
		
			
				|  |  |                     } else if("6".equals(bh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_BROTHERS_STROKE","1");//家族史--兄弟姐妹--脑卒中【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         brotherStr += "6,";
 | 
	
		
			
				|  |  |                     } else if("7".equals(bh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_BROTHERS_SCHIZOPHRENIA","1");//家族史--兄弟姐妹--重性精神疾病【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         brotherStr += "7,";
 | 
	
		
			
				|  |  |                     } else if("8".equals(bh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_BROTHERS_TB","1");//家族史--兄弟姐妹--结核病【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         brotherStr += "8,";
 | 
	
		
			
				|  |  |                     } else if("9".equals(bh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_BROTHERS_HEPATITIS","1");//家族史--兄弟姐妹--肝炎【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         brotherStr += "9,";
 | 
	
		
			
				|  |  |                     } else if("10".equals(bh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_BROTHERS_CONGENITAL","1");//家族史--兄弟姐妹--先天畸形【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         brotherStr += "10,";
 | 
	
		
			
				|  |  |                     } else if("11".equals(bh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_BROTHERS_OTHER","1");//家族史--兄弟姐妹--其它【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         brotherStr += "11,";
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 if (brotherStr.length()>1){
 | 
	
		
			
				|  |  |                     brotherStr = brotherStr.substring(0,brotherStr.length()-1);
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 archiveInfo.setFamilyBrothers(brotherStr);
 | 
	
		
			
				|  |  |             }else{
 | 
	
		
			
				|  |  |                 json.put("FAMILY_BROTHERS_NONE","1");//家族史--兄弟姐妹--无【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                 archiveInfo.setFamilyBrothers("0");
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             //子女
 | 
	
		
			
				|  |  |             if(StringUtils.isNotBlank(archive.getFamilyBrotherHistorys())){
 | 
	
		
			
				|  |  |                 String chidrenStr = "";
 | 
	
		
			
				|  |  |                 json.put("FAMILY_CHILDREN_NONE","0");//家族史--兄弟姐妹--无【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                 String bhs[] = archive.getFamilyBrotherHistorys().split(",");
 | 
	
		
			
				|  |  |                 for(String bh : bhs){
 | 
	
		
			
				|  |  |                     if("1".equals(bh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_CHILDREN_HYPERTENSION","1");//家族史--子女--高血压【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         chidrenStr += "1,";
 | 
	
		
			
				|  |  |                     } else if("2".equals(bh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_CHILDREN_DIABETES","1");//家族史--子女--糖尿病【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         chidrenStr += "2,";
 | 
	
		
			
				|  |  |                     } else if("3".equals(bh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_CHILDREN_CORONARY","1");//家族史--子女--冠心病【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         chidrenStr += "3,";
 | 
	
		
			
				|  |  |                     } else if("4".equals(bh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_CHILDREN_ALLERGY","1");//家族史--子女--慢性阻塞性肺疾病【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         chidrenStr += "4,";
 | 
	
		
			
				|  |  |                     } else if("5".equals(bh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_CHILDREN_MALIGNANT","1");//家族史--子女--恶性肿瘤【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         chidrenStr += "5,";
 | 
	
		
			
				|  |  |                     } else if("6".equals(bh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_CHILDREN_STROKE","1");//家族史--子女--脑卒中【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         chidrenStr += "6,";
 | 
	
		
			
				|  |  |                     } else if("7".equals(bh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_CHILDREN_SCHIZOPHRENIA","1");//家族史--子女--重性精神疾病【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         chidrenStr += "7,";
 | 
	
		
			
				|  |  |                     } else if("8".equals(bh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_BROTHERS_TB","1");//家族史--子女--结核病【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         chidrenStr += "8,";
 | 
	
		
			
				|  |  |                     } else if("9".equals(bh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_CHILDREN_HEPATITIS","1");//家族史--子女--肝炎【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         chidrenStr += "9,";
 | 
	
		
			
				|  |  |                     } else if("10".equals(bh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_CHILDREN_CONGENITAL","1");//家族史--子女--先天畸形【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         chidrenStr += "10,";
 | 
	
		
			
				|  |  |                     } else if("11".equals(bh)){
 | 
	
		
			
				|  |  |                         json.put("FAMILY_CHILDREN_OTHER","1");//家族史--子女--其它【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                         chidrenStr += "11,";
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 if (chidrenStr.length()>1){
 | 
	
		
			
				|  |  |                     chidrenStr = chidrenStr.substring(0,chidrenStr.length()-1);
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 archiveInfo.setFamilyChildren(chidrenStr);
 | 
	
		
			
				|  |  |             }else{
 | 
	
		
			
				|  |  |                 json.put("FAMILY_CHILDREN_NONE","1");//家族史--子女--无【0不勾选 1勾选】
 | 
	
		
			
				|  |  |                 archiveInfo.setFamilyChildren("0");
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         }else{
 | 
	
	
		
			
				|  | @ -1008,6 +1361,12 @@ public class PatientInfoService extends BaseService {
 | 
	
		
			
				|  |  |             json.put("FAMILY_MOTHER_NONE","1");// "FAMILY_MOTHER_NONE":"家族史--母亲--无【0不勾选 1勾选】(同一类别,新增时,默认勾选)",
 | 
	
		
			
				|  |  |             json.put("FAMILY_BROTHERS_NONE","1");//  "FAMILY_BROTHERS_NONE":"家族史--兄弟姐妹--无【0不勾选 1勾选】(同一类别,新增时,默认勾选)",
 | 
	
		
			
				|  |  |             json.put("FAMILY_CHILDREN_NONE","1");//  "FAMILY_CHILDREN_NONE":"家族史--子女--无【0不勾选 1勾选】(同一类别,新增时,默认勾选)",
 | 
	
		
			
				|  |  |             archiveInfo.setFamilyNone(0);
 | 
	
		
			
				|  |  |             archiveInfo.setFamilyFather("0");
 | 
	
		
			
				|  |  |             archiveInfo.setFamilyMother("0");
 | 
	
		
			
				|  |  |             archiveInfo.setFamilyBrothers("0");
 | 
	
		
			
				|  |  |             archiveInfo.setFamilyChildren("0");
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         json.put("SURGERY","0");// "SURGERY":"既往史--手术--【0 无 1 有】(同一类别,新增时,默认选无)",
 | 
	
	
		
			
				|  | @ -1030,6 +1389,11 @@ public class PatientInfoService extends BaseService {
 | 
	
		
			
				|  |  |         info.setGzztai("01");
 | 
	
		
			
				|  |  |         socialSecurityInfoDao.save(info);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         //保存建档记录信息到服务器数据库
 | 
	
		
			
				|  |  |         archiveInfo.setCode(getCode());
 | 
	
		
			
				|  |  |         archiveInfo.setArchiveCode(response);
 | 
	
		
			
				|  |  |         patientArchiveInfoDao.save(archiveInfo);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         return 1;
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 |