|
@ -199,7 +199,7 @@ public class EntranceService {
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public List<WlyyPrescriptionVO> BS16017ReturnObj(String REGISTER_SN,String PAT_NO,String ADM_NO,boolean demoFlag) throws Exception {
|
|
|
public Map<String,WlyyPrescriptionVO> BS16017ReturnObj(String REGISTER_SN,String PAT_NO,String ADM_NO,boolean demoFlag) throws Exception {
|
|
|
String fid=BS16017;
|
|
|
String resp = "";
|
|
|
if (demoFlag) {
|
|
@ -234,7 +234,7 @@ public class EntranceService {
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public List<WlyyPrescriptionVO> convertWlyyPrescriptionVOInBodyRow(String obj)throws Exception{
|
|
|
public Map<String,WlyyPrescriptionVO> convertWlyyPrescriptionVOInBodyRow(String obj)throws Exception{
|
|
|
net.sf.json.JSONObject jsonObject= net.sf.json.JSONObject.fromObject(obj);
|
|
|
JSONArray jsonArray=new JSONArray();
|
|
|
if(null!=jsonObject&&"1".equals(jsonObject.get("code").toString())){
|
|
@ -242,6 +242,8 @@ public class EntranceService {
|
|
|
if(null!=jsonObjectMgsInfo) {
|
|
|
//处方实体
|
|
|
WlyyPrescriptionVO wlyyPrescriptionVO=new WlyyPrescriptionVO();
|
|
|
Map<String, WlyyPrescriptionVO> wlyyPrescriptionVOMap = new HashMap<>();
|
|
|
Map<String, String> wlyyPrescriptionDiagnosisVOHashMap = new HashMap<>();
|
|
|
//诊断list
|
|
|
List<WlyyPrescriptionDiagnosisVO> wlyyPrescriptionDiagnosisVOS = new ArrayList<>();
|
|
|
//药品实体list
|
|
@ -258,10 +260,10 @@ public class EntranceService {
|
|
|
WlyyPrescriptionDiagnosisVO wlyyPrescriptionDiagnosisVO;
|
|
|
if (null != jsonObjectBody.get("YP_FLAG")) {
|
|
|
//是否为药品:0否,1是
|
|
|
Integer ypFlag = (Integer) jsonObjectBody.get("YP_FLAG");
|
|
|
String ypFlag =jsonObjectBody.get("YP_FLAG").toString();
|
|
|
Set<String> stringSet = new HashSet<>();
|
|
|
Map<String, WlyyPrescriptionVO> wlyyPrescriptionVOMap = new HashMap<>();
|
|
|
if (1 == ypFlag) {
|
|
|
|
|
|
if ("1".equals(ypFlag) ) {
|
|
|
String realOrder = null != jsonObjectBody.get("real_order") ? jsonObjectBody.get("real_order").toString() : "";
|
|
|
if (!(null != stringSet && stringSet.contains(realOrder))) {
|
|
|
wlyyPrescriptionVO = initWlyyPrescriptionVo(new WlyyPrescriptionVO(), jsonObjectBody, realOrder);
|
|
@ -273,30 +275,34 @@ public class EntranceService {
|
|
|
String[] diagFour = jsonObjectBody.get("diag_four").toString().toString().split("&");
|
|
|
String[] diagFive = jsonObjectBody.get("diag_five").toString().toString().split("&");
|
|
|
|
|
|
if (null != icdName && icdName.length > 1) {
|
|
|
if (null != icdName && icdName.length > 1&&!wlyyPrescriptionDiagnosisVOHashMap.containsKey(icdName[1].toString())) {
|
|
|
//主诊断
|
|
|
wlyyPrescriptionDiagnosisVO = initWlyyPrescriptionDiagnosisVO(realOrder, icdName[0].toString(), icdName[1].toString(), 1);
|
|
|
wlyyPrescriptionDiagnosisVOS.add(wlyyPrescriptionDiagnosisVO);
|
|
|
wlyyPrescriptionDiagnosisVOHashMap.put(icdName[1].toString(), icdName[0].toString());
|
|
|
}
|
|
|
if (null != diagTwo && diagTwo.length > 1) {
|
|
|
if (null != diagTwo && diagTwo.length > 1&&!wlyyPrescriptionDiagnosisVOHashMap.containsKey(diagTwo[1].toString())) {
|
|
|
//第二诊断
|
|
|
wlyyPrescriptionDiagnosisVO = initWlyyPrescriptionDiagnosisVO(realOrder, diagTwo[0].toString(), diagTwo[1].toString(), 2);
|
|
|
wlyyPrescriptionDiagnosisVOS.add(wlyyPrescriptionDiagnosisVO);
|
|
|
wlyyPrescriptionDiagnosisVOHashMap.put(icdName[1].toString(), icdName[0].toString());
|
|
|
}
|
|
|
if (null != diagThree && diagThree.length > 1) {
|
|
|
if (null != diagThree && diagThree.length > 1&&!wlyyPrescriptionDiagnosisVOHashMap.containsKey(diagThree[1].toString())) {
|
|
|
//第三诊断
|
|
|
wlyyPrescriptionDiagnosisVO = initWlyyPrescriptionDiagnosisVO(realOrder, diagThree[0].toString(), diagThree[1].toString(), 2);
|
|
|
wlyyPrescriptionDiagnosisVOS.add(wlyyPrescriptionDiagnosisVO);
|
|
|
}
|
|
|
if (null != diagFour && diagFour.length > 1) {
|
|
|
if (null != diagFour && diagFour.length > 1&&!wlyyPrescriptionDiagnosisVOHashMap.containsKey(diagFour[1].toString())) {
|
|
|
//第四诊断
|
|
|
wlyyPrescriptionDiagnosisVO = initWlyyPrescriptionDiagnosisVO(realOrder, diagFour[0].toString(), diagFour[1].toString(), 2);
|
|
|
wlyyPrescriptionDiagnosisVOS.add(wlyyPrescriptionDiagnosisVO);
|
|
|
wlyyPrescriptionDiagnosisVOHashMap.put(icdName[1].toString(), icdName[0].toString());
|
|
|
}
|
|
|
if (null != diagFive && diagFive.length > 1) {
|
|
|
if (null != diagFive && diagFive.length > 1&&!wlyyPrescriptionDiagnosisVOHashMap.containsKey(diagFive[1].toString())) {
|
|
|
//第五诊断
|
|
|
wlyyPrescriptionDiagnosisVO = initWlyyPrescriptionDiagnosisVO(realOrder, diagFive[0].toString(), diagFive[1].toString(), 2);
|
|
|
wlyyPrescriptionDiagnosisVOS.add(wlyyPrescriptionDiagnosisVO);
|
|
|
wlyyPrescriptionDiagnosisVOHashMap.put(icdName[1].toString(), icdName[0].toString());
|
|
|
}
|
|
|
|
|
|
} else {
|
|
@ -329,7 +335,7 @@ public class EntranceService {
|
|
|
wlyyPrescriptionVO.setInfoVOs(wlyyPrescriptionInfoVOS);
|
|
|
|
|
|
}
|
|
|
return null;
|
|
|
return wlyyPrescriptionVOMap;
|
|
|
}else {
|
|
|
return null;
|
|
|
}
|