|
|
|
@ -29,12 +29,12 @@ public class PatientAction extends BaseAction { |
|
|
|
|
*/ |
|
|
|
|
@Action("getHisInfoByPatientId") |
|
|
|
|
public Result getHisInfoByPatientId(String patientId) { |
|
|
|
|
log.info("[患者]根据patientId查询信息 patientId={}", patientId); |
|
|
|
|
patientId = getDecodeString(patientId); |
|
|
|
|
log.info("[患者]根据patientId查询HIS信息 patientId={}", patientId); |
|
|
|
|
if (patientId == null) { |
|
|
|
|
return Result.error(ResultEnum.PARAM_IS_BLANK); |
|
|
|
|
} |
|
|
|
|
try { |
|
|
|
|
patientId = getDecodeString(patientId); |
|
|
|
|
JsonResult jsonResult = new HisPatientDao().selectPatientInfo(patientId, "999"); |
|
|
|
|
if (!jsonResult.success()) { |
|
|
|
|
return Result.error(jsonResult.getMessage()); |
|
|
|
@ -59,12 +59,13 @@ public class PatientAction extends BaseAction { |
|
|
|
|
*/ |
|
|
|
|
@Action("getInfoByPatientId") |
|
|
|
|
public Result getInfoByPatientId(String patientId) { |
|
|
|
|
patientId = getDecodeString(patientId); |
|
|
|
|
log.info("[患者]根据patientId查询信息 patientId={}", patientId); |
|
|
|
|
if (patientId == null) { |
|
|
|
|
return Result.error(ResultEnum.PARAM_IS_BLANK); |
|
|
|
|
} |
|
|
|
|
List<Patient> patients = new PatientDao().selectListByPatientId(patientId); |
|
|
|
|
if (patients.size() == 0) { |
|
|
|
|
if (patients.isEmpty()) { |
|
|
|
|
return Result.error(ResultEnum.DATA_NOT_FOUND); |
|
|
|
|
} |
|
|
|
|
Patient patient = patients.get(0); |
|
|
|
@ -112,15 +113,16 @@ public class PatientAction extends BaseAction { |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* [患者] 「外部对接」-根据openId查询患者信息 |
|
|
|
|
* |
|
|
|
|
* @param openid openId |
|
|
|
|
* @param organizeName 组织机构代码 |
|
|
|
|
* @return 返回患者信息 |
|
|
|
|
*/ |
|
|
|
|
@Action("getPatientsByOpenid") |
|
|
|
|
public Result getPatientsByOpenid(String openid,String organizeName) { |
|
|
|
|
log.info("[外部患者信息对接]根据openid查询信息 openid={},organizeName-{}", openid,organizeName); |
|
|
|
|
public Result getPatientsByOpenid(String openid, String organizeName) { |
|
|
|
|
log.info("[外部患者信息对接]根据openid查询信息 openid={},organizeName-{}", openid, organizeName); |
|
|
|
|
organizeName = AesHelper.deCode(organizeName); |
|
|
|
|
if(organizeName==null){ |
|
|
|
|
if (organizeName == null) { |
|
|
|
|
return Result.error(ResultEnum.PERMISSION_NO_ACCESS); |
|
|
|
|
} |
|
|
|
|
if (openid == null) { |
|
|
|
@ -132,16 +134,17 @@ public class PatientAction extends BaseAction { |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* [患者] 「外部对接」-根据openId加密版查询患者信息 |
|
|
|
|
* |
|
|
|
|
* @param enParams 加密openId |
|
|
|
|
* @param organizeName 组织机构代码 |
|
|
|
|
* @return 返回患者信息 |
|
|
|
|
*/ |
|
|
|
|
@Action("getPatientsByEncOpenid") |
|
|
|
|
public Result getPatientsByEncOpenid(String enParams,String organizeName) { |
|
|
|
|
public Result getPatientsByEncOpenid(String enParams, String organizeName) { |
|
|
|
|
String openid = AesHelper.deCode(enParams); |
|
|
|
|
log.info("[外部患者信息对接]根据openid查询信息 openid={},organizeName-{},emParams-{}", openid,organizeName,enParams); |
|
|
|
|
log.info("[外部患者信息对接]根据openid查询信息 openid={},organizeName-{},emParams-{}", openid, organizeName, enParams); |
|
|
|
|
organizeName = AesHelper.deCode(organizeName); |
|
|
|
|
if(organizeName==null){ |
|
|
|
|
if (organizeName == null) { |
|
|
|
|
return Result.error(ResultEnum.PERMISSION_NO_ACCESS); |
|
|
|
|
} |
|
|
|
|
if (openid == null) { |
|
|
|
|