Parcourir la source

Merge branch 'dev' of trick9191/patient-co-management into dev

trick9191 il y a 7 ans
Parent
commit
195a024293

Fichier diff supprimé car celui-ci est trop grand
+ 4 - 2
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/controller/PrescriptionController.java


+ 17 - 6
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/service/prescription/PrescriptionService.java

@ -10,6 +10,7 @@ import com.yihu.wlyy.service.common.model.Result;
import com.yihu.wlyy.service.common.util.AmoutUtils;
import com.yihu.wlyy.service.common.util.CommonUtil;
import com.yihu.wlyy.service.common.util.DateUtil;
import com.yihu.wlyy.service.common.util.StringUtil;
import com.yihu.wlyy.service.dao.*;
import com.yihu.wlyy.service.dao.consult.ConsultTeamDao;
import com.yihu.wlyy.service.dao.prescription.*;
@ -697,15 +698,25 @@ public class PrescriptionService extends ZysoftBaseService{
     * @return
     * @throws Exception
     */
    public String getRecipe(String cardNo,String appointRecipeNo)  throws Exception
    public String getRecipe(String cardNo,String appointRecipeNo,String preCode)  throws Exception
    {
        Patient patient = patientDao.findBySsc(cardNo);
        SignFamily signFamily = signFamilyDao.findByPatient(patient.getCode());
        //
        String[] hospitalMapping = getHospitalMapping(signFamily.getHospital()); //获取机构映射
        String hospital = hospitalMapping[0];
        String licence = hospitalMapping[1];
        String hospital="";
        String licence="";
        if(signFamily!=null){
            String[] hospitalMapping = getHospitalMapping(signFamily.getHospital()); //获取机构映射
            hospital = hospitalMapping[0];
            licence = hospitalMapping[1];
        }else{
            //如果签约过期,重历史处方获取机构数据
            if(StringUtils.isNotBlank(preCode)){
                Prescription p = prescriptionDao.findByCode(preCode);
                String[] hospitalMapping = getHospitalMapping(p.getHospital()); //获取机构映射
                hospital = hospitalMapping[0];
                licence = hospitalMapping[1];
            }
        }
        Map<String,String> header = new HashMap<>();
        header.put("ORGCODE",hospital);

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/consult/ConsultTeamService.java

@ -1233,7 +1233,7 @@ public class ConsultTeamService extends ConsultService {
     */
    public Prescription savePrescription(Prescription prescription,String jwCode,Doctor doctor,Patient p,ConsultTeam ct,String reason) throws Exception{
        //获取智业处方详细
        String response = jwPrescriptionService.getRecipe(jwCode,p.getSsc());
        String response = jwPrescriptionService.getRecipe(jwCode,p.getSsc(),null);
        com.alibaba.fastjson.JSONObject jsonObject = presModeAdapter.modelToSinglePrescription(response);
        //续方主表

+ 2 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionInfoService.java

@ -519,9 +519,9 @@ public class PrescriptionInfoService extends BaseService {
     * @param code
     * @return
     */
    public com.alibaba.fastjson.JSONObject getPrescription(String code,String patient) {
    public com.alibaba.fastjson.JSONObject getPrescription(String code,String patient,String preCode) {
        Patient p = patientDao.findByCode(patient);
        String rs = jwPrescriptionService.getRecipe(code, p.getSsc());
        String rs = jwPrescriptionService.getRecipe(code, p.getSsc(),preCode);
        com.alibaba.fastjson.JSONObject r = presModeAdapter.modelToSinglePrescription(rs);
    
        String rState = presCheckStateObj(code);

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionService.java

@ -744,7 +744,7 @@ public class PrescriptionService extends BaseService {
        }
        if(org.apache.commons.lang.StringUtils.isNotBlank(RECIPE_NO)){
            String response = jwPrescriptionService.getRecipe(RECIPE_NO,patient.getSsc());
            String response = jwPrescriptionService.getRecipe(RECIPE_NO,patient.getSsc(),null);
            com.alibaba.fastjson.JSONObject jsonObject = presModeAdapter.modelToSinglePrescription(response);
            //药品
            com.alibaba.fastjson.JSONArray infos = jsonObject.getJSONArray("prescriptionInfo");

+ 4 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/third/jw/JwPrescriptionService.java

@ -225,11 +225,14 @@ public class JwPrescriptionService {
     * @param cardNo
     * @return
     */
    public String getRecipe(String recipeNo,String cardNo){
    public String getRecipe(String recipeNo,String cardNo,String preCode){
        String url = jwUrl + "/third/prescription/getRecipe";
        List<NameValuePair> params = new ArrayList<>();
        params.add(new BasicNameValuePair("recipeNo", recipeNo));
        params.add(new BasicNameValuePair("cardNo", cardNo));
        if(StringUtils.isNotBlank(preCode)){
            params.add(new BasicNameValuePair("preCode", preCode));
        }
        String response = httpClientUtil.post(url, params, "UTF-8");

+ 3 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/prescription/PrescriptionInfoController.java

@ -527,9 +527,10 @@ public class PrescriptionInfoController extends BaseController {
    @RequestMapping(value = "/getPrescription", method = RequestMethod.GET)
    @ApiOperation(value = "获取长处方详细信息")
    public String getPrescription(@RequestParam(required = true) @ApiParam(name = "code", value = "处方CODE") String code
            ,@RequestParam(required = true) @ApiParam(name = "patient", value = "居民CODE") String  patient) {
            ,@RequestParam(required = true) @ApiParam(name = "patient", value = "居民CODE") String  patient,
                                  @RequestParam(required = false) @ApiParam(name = "preCode", value = "续方CODE")String preCode) {
        try {
            return write(200, "查询成功!", "data", prescriptionInfoService.getPrescription(code,patient));
            return write(200, "查询成功!", "data", prescriptionInfoService.getPrescription(code,patient,preCode));
        } catch (Exception e) {
            error(e);
            return error(-1, "查询失败!");

+ 3 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/prescription/PatientPrescriptionInfoController.java

@ -77,9 +77,10 @@ public class PatientPrescriptionInfoController extends BaseController {
    @RequestMapping(value = "/getPrescription" ,method = RequestMethod.GET)
    @ResponseBody
    @ApiOperation(value = "获取长处方详细信息")
    public String getPrescription(@RequestParam(required = true)@ApiParam(name="code",value="处方CODE")String code){
    public String getPrescription(@RequestParam(required = true)@ApiParam(name="code",value="处方CODE")String code,
                                  @RequestParam(required = false)@ApiParam(name="preCode",value="续方CODE")String preCode){
        try {
            return write(200, "查询成功!", "data", prescriptionInfoService.getPrescription(code,getRepUID()));
            return write(200, "查询成功!", "data", prescriptionInfoService.getPrescription(code,getRepUID(),preCode));
        } catch (Exception e) {
            error(e);
            return error(-1, "查询失败!");

+ 2 - 2
patient-co/patient-co-wlyy/src/main/resources/application-devtest.yml

@ -113,8 +113,8 @@ images:
sign:
  check_upload: http://172.19.103.88:8011/wlyy_service
  #check_upload: 192.168.131.24:8081
  #check_upload: http://172.19.103.88:8011/wlyy_service
  check_upload: localhost:8070/wlyy_service
express: