|
@ -455,8 +455,8 @@ public class PatientInfoService extends BaseService {
|
|
|
archiveInfo.setArchiveCode(code);
|
|
|
archiveInfo.setAllergic("0");
|
|
|
archiveInfo.setPast("0");
|
|
|
archiveInfo.setGenetic(0);
|
|
|
archiveInfo.setFamilyNone(0);
|
|
|
archiveInfo.setGenetic("0");
|
|
|
archiveInfo.setFamilyNone("0");
|
|
|
archiveInfo.setFamilyFather("0");
|
|
|
archiveInfo.setFamilyMother("0");
|
|
|
archiveInfo.setFamilyBrothers("0");
|
|
@ -517,10 +517,10 @@ public class PatientInfoService extends BaseService {
|
|
|
archiveDateBase.setOrgId("0");
|
|
|
archiveDateBase.setResidence(1);
|
|
|
archiveDateBase.setNational(archive.getNation());
|
|
|
if (StringUtils.isEmpty(archive.getOrgGo())){
|
|
|
archiveDateBase.setOrigo("350200");
|
|
|
if (StringUtils.isEmpty(archive.getOrgGoStr())){
|
|
|
archiveDateBase.setOrigo("福建省厦门市");
|
|
|
}else{
|
|
|
archiveDateBase.setOrigo(archive.getOrgGo());
|
|
|
archiveDateBase.setOrigo(archive.getOrgGoStr());
|
|
|
}
|
|
|
archiveDateBase.setBlood(Integer.valueOf(archive.getBlood()));
|
|
|
archiveDateBase.setBloodRh(1);
|
|
@ -548,11 +548,11 @@ public class PatientInfoService extends BaseService {
|
|
|
//支付方式
|
|
|
if(StringUtils.isNotBlank(archive.getPayment())){
|
|
|
json.put("MEDICAL_EXPENSES",archive.getPayment()+"");//支付方式
|
|
|
archiveInfo.setMedicalExpenses(Integer.getInteger(archive.getPayment()));
|
|
|
archiveInfo.setMedicalExpenses(Integer.valueOf(archive.getPayment()));
|
|
|
}
|
|
|
|
|
|
//药物过敏史
|
|
|
if(StringUtils.isNotBlank(archive.getDrugAllergys())){
|
|
|
if(StringUtils.isNotBlank(archive.getDrugAllergys()) || StringUtils.isNotBlank(archive.getDrugOtherContent())){
|
|
|
String allergicStr = "";
|
|
|
json.put("ALLERGIC_WITHOUT","0");//药物过敏历史
|
|
|
String as[] = archive.getDrugAllergys().split(",");
|
|
@ -569,11 +569,15 @@ public class PatientInfoService extends BaseService {
|
|
|
json.put("ALLERGIC_STREPTOMYCIN","1");//药物过敏史--链霉素
|
|
|
allergicStr +="3,";
|
|
|
}
|
|
|
if("4".equals(str)){
|
|
|
/*if("4".equals(str)){
|
|
|
json.put("ALLERGIC_OTHER","1");//药物过敏史--其它
|
|
|
allergicStr +="4,";
|
|
|
archiveInfo.setAllergicOtherContent(archive.getDrugOtherContent());
|
|
|
}
|
|
|
}*/
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(archive.getDrugOtherContent())){
|
|
|
json.put("ALLERGIC_OTHER","1");//药物过敏史--其它
|
|
|
archiveInfo.setAllergicOtherContent(archive.getDrugOtherContent());
|
|
|
}
|
|
|
if (allergicStr.length()>1){
|
|
|
allergicStr = allergicStr.substring(0,allergicStr.length()-1);
|
|
@ -584,9 +588,9 @@ public class PatientInfoService extends BaseService {
|
|
|
archiveInfo.setAllergic("0");
|
|
|
}
|
|
|
//既往史
|
|
|
if(StringUtils.isNotBlank(archive.getPastHistorys())){
|
|
|
if(StringUtils.isNotBlank(archive.getPastHistorys()) || StringUtils.isNotBlank(archive.getPastHistoryContent())){
|
|
|
String pastStr = "";
|
|
|
String pastDateStr = "";
|
|
|
String pastDateStr = "0,0";
|
|
|
json.put("PAST_NONE","0");//既往史
|
|
|
String phs[] = archive.getPastHistorys().split(",");
|
|
|
String dates[] = archive.getPastHistoryDate().split(",");
|
|
@ -596,14 +600,15 @@ public class PatientInfoService extends BaseService {
|
|
|
pastStr +="1,";
|
|
|
if(!"0".equals(dates[i])){
|
|
|
json.put("PAST_HYPERTENSION_DATE",dates[i]);//既往史--疾病--高血压日期
|
|
|
pastDateStr += dates[i]+",";
|
|
|
pastDateStr = pastDateStr.replaceFirst("0",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]);//既往史--疾病--糖尿病日期
|
|
|
pastDateStr += dates[i]+",";
|
|
|
pastDateStr = pastDateStr.substring(0,pastDateStr.indexOf(",")+1);
|
|
|
pastDateStr += dates[i];
|
|
|
}
|
|
|
}
|
|
|
// if("3".equals(phs[i])){
|
|
@ -612,7 +617,7 @@ public class PatientInfoService extends BaseService {
|
|
|
// json.put("PAST_HYPERTENSION_DATE",dates[i]);//既往史--疾病--高血压日期
|
|
|
// }
|
|
|
// }
|
|
|
else if("4".equals(phs[i])){
|
|
|
/*else if("4".equals(phs[i])){
|
|
|
json.put("PAST_OTHER","1");//既往史--疾病--其它【0不勾选 1勾选】
|
|
|
pastStr +="4,";
|
|
|
if(!"0".equals(dates[i])){
|
|
@ -620,15 +625,16 @@ public class PatientInfoService extends BaseService {
|
|
|
pastDateStr += dates[i]+",";
|
|
|
}
|
|
|
archiveInfo.setPastOtherContent(archive.getPastHistoryContent());
|
|
|
}
|
|
|
}*/
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(archive.getPastHistoryContent())){
|
|
|
json.put("PAST_OTHER","1");//既往史--疾病--其它【0不勾选 1勾选】
|
|
|
archiveInfo.setPastOtherContent(archive.getPastHistoryContent());
|
|
|
}
|
|
|
if (pastStr.length()>1){
|
|
|
pastStr = pastStr.substring(0,pastStr.length()-1);
|
|
|
}
|
|
|
archiveInfo.setPast(pastStr);
|
|
|
if (pastDateStr.length()>1){
|
|
|
pastDateStr = pastDateStr.substring(0,pastDateStr.length()-1);
|
|
|
}
|
|
|
archiveInfo.setPastDate(pastDateStr);
|
|
|
}else{
|
|
|
json.put("PAST_NONE","1");//既往史
|
|
@ -636,14 +642,28 @@ public class PatientInfoService extends BaseService {
|
|
|
}
|
|
|
|
|
|
//遗传病史
|
|
|
if(StringUtils.isNotBlank(archive.getGeneticFlag())){
|
|
|
/*if(StringUtils.isNotBlank(archive.getGeneticFlag())){
|
|
|
json.put("GENETIC","1");//遗传病史【0 无 1 有】
|
|
|
json.put("GENETIC_DISEASENAME",archive.getGeneticContent());//疾病名称
|
|
|
archiveInfo.setGenetic(1);
|
|
|
archiveInfo.setGenetic("1");
|
|
|
archiveInfo.setGeneticDiseaseName(archive.getGeneticContent());
|
|
|
}else{
|
|
|
json.put("GENETIC","0");//遗传病史【0 无 1 有】
|
|
|
archiveInfo.setGenetic(0);
|
|
|
archiveInfo.setGenetic("0");
|
|
|
}*/
|
|
|
if(StringUtils.isNotBlank(archive.getGeneticFlag())){
|
|
|
if ("1".equals(archive.getGeneticFlag())){
|
|
|
json.put("GENETIC","1");//遗传病史【0 无 1 有】
|
|
|
json.put("GENETIC_DISEASENAME",archive.getGeneticContent());//疾病名称
|
|
|
archiveInfo.setGenetic("1");
|
|
|
archiveInfo.setGeneticDiseaseName(archive.getGeneticContent());
|
|
|
}else{
|
|
|
json.put("GENETIC","0");//遗传病史【0 无 1 有】
|
|
|
archiveInfo.setGenetic("0");
|
|
|
}
|
|
|
}else{
|
|
|
json.put("GENETIC","0");//遗传病史【0 无 1 有】
|
|
|
archiveInfo.setGenetic("0");
|
|
|
}
|
|
|
|
|
|
//残疾
|
|
@ -697,7 +717,7 @@ public class PatientInfoService extends BaseService {
|
|
|
|
|
|
//家族史
|
|
|
if(StringUtils.isNotBlank(archive.getFamilyHistoryFlag())&&"1".equals(archive.getFamilyHistoryFlag())){
|
|
|
archiveInfo.setFamilyNone(1);
|
|
|
archiveInfo.setFamilyNone("1");
|
|
|
//父亲
|
|
|
if(StringUtils.isNotBlank(archive.getFamilyFatherHistorys())){
|
|
|
String fatherStr ="";
|
|
@ -903,7 +923,7 @@ 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.setFamilyNone("0");
|
|
|
archiveInfo.setFamilyFather("0");
|
|
|
archiveInfo.setFamilyMother("0");
|
|
|
archiveInfo.setFamilyBrothers("0");
|
|
@ -990,10 +1010,10 @@ public class PatientInfoService extends BaseService {
|
|
|
archiveDataBase.setOrgId("0");
|
|
|
archiveDataBase.setResidence(1);
|
|
|
archiveDataBase.setNational(archive.getNation());
|
|
|
if (StringUtils.isEmpty(archive.getOrgGo())){
|
|
|
archiveDataBase.setOrigo("350200");
|
|
|
if (StringUtils.isEmpty(archive.getOrgGoStr())){
|
|
|
archiveDataBase.setOrigo("福建省厦门市");
|
|
|
}else {
|
|
|
archiveDataBase.setOrigo(archive.getOrgGo());
|
|
|
archiveDataBase.setOrigo(archive.getOrgGoStr());
|
|
|
}
|
|
|
archiveDataBase.setBlood(Integer.valueOf(archive.getBlood()));
|
|
|
archiveDataBase.setBloodRh(1);
|
|
@ -1024,7 +1044,7 @@ public class PatientInfoService extends BaseService {
|
|
|
|
|
|
//药物过敏史
|
|
|
//if(StringUtils.isNotBlank(archive.getDrugAllergys())){
|
|
|
if (archive.getDrugAllergys()!=null){
|
|
|
if (StringUtils.isNotBlank(archive.getDrugAllergys()) || StringUtils.isNotBlank(archive.getDrugOtherContent())){
|
|
|
String allergicStr = "";
|
|
|
json.put("ALLERGIC_WITHOUT","0");//药物过敏历史
|
|
|
String as[] = archive.getDrugAllergys().split(",");
|
|
@ -1042,11 +1062,16 @@ public class PatientInfoService extends BaseService {
|
|
|
allergicStr +="3,";
|
|
|
}
|
|
|
//if("4".equals(str)){
|
|
|
if (StringUtils.isBlank(str)){
|
|
|
/*if (StringUtils.isNotBlank(str)){
|
|
|
json.put("ALLERGIC_OTHER","1");//药物过敏史--其它
|
|
|
allergicStr +="4,";
|
|
|
archiveInfo.setAllergicOtherContent(archive.getDrugOtherContent());
|
|
|
}
|
|
|
}*/
|
|
|
}
|
|
|
//药物过敏史勾选其他
|
|
|
if (StringUtils.isNotBlank(archive.getDrugOtherContent())){
|
|
|
json.put("ALLERGIC_OTHER","1");//药物过敏史--其它
|
|
|
archiveInfo.setAllergicOtherContent(archive.getDrugOtherContent());
|
|
|
}
|
|
|
if (allergicStr.length()>1){
|
|
|
allergicStr = allergicStr.substring(0,allergicStr.length()-1);
|
|
@ -1058,9 +1083,9 @@ public class PatientInfoService extends BaseService {
|
|
|
}
|
|
|
//既往史
|
|
|
//if(StringUtils.isNotBlank(archive.getPastHistorys())){
|
|
|
if (archive.getPastHistorys() != null){
|
|
|
if (StringUtils.isNotBlank(archive.getPastHistorys()) || StringUtils.isNotBlank(archive.getPastHistoryContent())){
|
|
|
String pastStr = "";
|
|
|
String pastDateStr = "";
|
|
|
String pastDateStr = "0,0";
|
|
|
json.put("PAST_NONE","0");//既往史
|
|
|
String phs[] = archive.getPastHistorys().split(",");
|
|
|
String dates[] = archive.getPastHistoryDate().split(",");
|
|
@ -1070,14 +1095,15 @@ public class PatientInfoService extends BaseService {
|
|
|
pastStr +="1,";
|
|
|
if(!"0".equals(dates[i])){
|
|
|
json.put("PAST_HYPERTENSION_DATE",dates[i]);//既往史--疾病--高血压日期
|
|
|
pastDateStr += dates[i]+",";
|
|
|
pastDateStr = pastDateStr.replaceFirst("0",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]);//既往史--疾病--糖尿病日期
|
|
|
pastDateStr += dates[i]+",";
|
|
|
pastDateStr = pastDateStr.substring(0,pastDateStr.indexOf(",")+1);
|
|
|
pastDateStr += dates[i];
|
|
|
}
|
|
|
}
|
|
|
// if("3".equals(phs[i])){
|
|
@ -1087,7 +1113,7 @@ public class PatientInfoService extends BaseService {
|
|
|
// }
|
|
|
// }
|
|
|
//else if("4".equals(phs[i])){
|
|
|
else if(StringUtils.isBlank(phs[i])){
|
|
|
/*else if(StringUtils.isBlank(phs[i])){
|
|
|
json.put("PAST_OTHER","1");//既往史--疾病--其它【0不勾选 1勾选】
|
|
|
pastStr +="4,";
|
|
|
if(!"0".equals(dates[i])){
|
|
@ -1095,16 +1121,18 @@ public class PatientInfoService extends BaseService {
|
|
|
pastDateStr += dates[i]+",";
|
|
|
}
|
|
|
archiveInfo.setPastOtherContent(archive.getPastHistoryContent());
|
|
|
}
|
|
|
}*/
|
|
|
|
|
|
}
|
|
|
//既往史勾选其他
|
|
|
if (StringUtils.isNotBlank(archive.getPastHistoryContent())){
|
|
|
json.put("PAST_OTHER","1");//既往史--疾病--其它【0不勾选 1勾选】
|
|
|
archiveInfo.setPastOtherContent(archive.getPastHistoryContent());
|
|
|
}
|
|
|
if (pastStr.length()>1){
|
|
|
pastStr = pastStr.substring(0,pastStr.length()-1);
|
|
|
}
|
|
|
archiveInfo.setPast(pastStr);
|
|
|
if (pastDateStr.length()>1){
|
|
|
pastDateStr = pastDateStr.substring(0,pastDateStr.length()-1);
|
|
|
}
|
|
|
archiveInfo.setPastDate(pastDateStr);
|
|
|
}else{
|
|
|
json.put("PAST_NONE","1");//既往史
|
|
@ -1116,15 +1144,15 @@ public class PatientInfoService extends BaseService {
|
|
|
if ("1".equals(archive.getGeneticFlag())){
|
|
|
json.put("GENETIC","1");//遗传病史【0 无 1 有】
|
|
|
json.put("GENETIC_DISEASENAME",archive.getGeneticContent());//疾病名称
|
|
|
archiveInfo.setGenetic(1);
|
|
|
archiveInfo.setGenetic("1");
|
|
|
archiveInfo.setGeneticDiseaseName(archive.getGeneticContent());
|
|
|
}else{
|
|
|
json.put("GENETIC","0");//遗传病史【0 无 1 有】
|
|
|
archiveInfo.setGenetic(0);
|
|
|
archiveInfo.setGenetic("0");
|
|
|
}
|
|
|
}else{
|
|
|
json.put("GENETIC","0");//遗传病史【0 无 1 有】
|
|
|
archiveInfo.setGenetic(0);
|
|
|
archiveInfo.setGenetic("0");
|
|
|
}
|
|
|
|
|
|
//残疾
|
|
@ -1178,7 +1206,7 @@ public class PatientInfoService extends BaseService {
|
|
|
|
|
|
//家族史
|
|
|
if(StringUtils.isNotBlank(archive.getFamilyHistoryFlag())&&"1".equals(archive.getFamilyHistoryFlag())){
|
|
|
archiveInfo.setFamilyNone(1);
|
|
|
archiveInfo.setFamilyNone("1");
|
|
|
//父亲
|
|
|
if(StringUtils.isNotBlank(archive.getFamilyFatherHistorys())){
|
|
|
String fatherStr ="";
|
|
@ -1384,7 +1412,7 @@ 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.setFamilyNone("0");
|
|
|
archiveInfo.setFamilyFather("0");
|
|
|
archiveInfo.setFamilyMother("0");
|
|
|
archiveInfo.setFamilyBrothers("0");
|
|
@ -1610,6 +1638,9 @@ public class PatientInfoService extends BaseService {
|
|
|
rs.put("birthday",bd.substring(0,10));
|
|
|
String ct = (String)rs.get("zoneCode");
|
|
|
Country c = countryDao.findByJwCode(ct);
|
|
|
if (c == null ){
|
|
|
c = countryDao.findByCode(ct);
|
|
|
}
|
|
|
rs.put("zoneCode",c.getName());
|
|
|
String sql ="SELECT " +
|
|
|
" TIMESTAMPDIFF(YEAR,p.birthday,SYSDATE()) age, " +
|