|
@ -4,13 +4,11 @@ import com.alibaba.fastjson.JSONArray;
|
|
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
|
|
import com.fasterxml.jackson.core.type.TypeReference;
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
import com.yihu.jw.entity.specialist.SpecialistArticleDO;
|
|
|
import com.yihu.jw.entity.specialist.SpecialistConsultDO;
|
|
|
import com.yihu.jw.entity.specialist.SpecialistDO;
|
|
|
import com.yihu.jw.entity.specialist.SpecialistPatientRelationDO;
|
|
|
import com.yihu.jw.restmodel.common.Envelop;
|
|
|
import com.yihu.jw.restmodel.common.EnvelopRestController;
|
|
|
import com.yihu.jw.restmodel.specialist.AssistantVO;
|
|
|
import com.yihu.jw.restmodel.specialist.PatientLabelVO;
|
|
|
import com.yihu.jw.restmodel.specialist.PatientRelationVO;
|
|
|
import com.yihu.jw.restmodel.specialist.SpecialistPatientRelationVO;
|
|
|
import com.yihu.jw.rm.archives.PatientArchivesMapping;
|
|
@ -38,20 +36,6 @@ public class SpecialistController extends EnvelopRestController {
|
|
|
@Autowired
|
|
|
private Tracer tracer;
|
|
|
|
|
|
@PostMapping(value = SpecialistMapping.specialist.createSpecialists)
|
|
|
@ApiOperation(value = "创建专科医生")
|
|
|
public Envelop<Boolean> createSpecialists(@ApiParam(name = "specialists", value = "专科医生实体")
|
|
|
@RequestParam(value = "code", required = false)String specialists){
|
|
|
try {
|
|
|
List<SpecialistDO> infos = new ObjectMapper().readValue(specialists, new TypeReference<List<SpecialistDO>>(){});
|
|
|
return specialistService.createSpecialists(infos);
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
tracer.getCurrentSpan().logEvent(e.getMessage());
|
|
|
return Envelop.getError(e.getMessage());
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@PostMapping(value = SpecialistMapping.specialist.createSpecialistRelation)
|
|
|
@ApiOperation(value = "创建专科医生与患者匹配关系")
|
|
|
public Envelop<Boolean> createSpecialistPatientRelation(@ApiParam(name = "specialistPatientRelation", value = "实体JSON")
|
|
@ -66,34 +50,6 @@ public class SpecialistController extends EnvelopRestController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@PostMapping(value = SpecialistMapping.specialist.createConsult)
|
|
|
@ApiOperation(value = "创建专科医生咨询")
|
|
|
public Envelop<Boolean> createSpscialistConsult(@ApiParam(name = "specialistConsult", value = "专科医生咨询实体JSON")
|
|
|
@RequestParam(value = "specialistConsult", required = false)String specialistConsult){
|
|
|
try {
|
|
|
SpecialistConsultDO ps = toEntity(specialistConsult, SpecialistConsultDO.class);
|
|
|
return specialistService.createSpscialistConsult(ps);
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
tracer.getCurrentSpan().logEvent(e.getMessage());
|
|
|
return Envelop.getError(e.getMessage());
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@PostMapping(value = SpecialistMapping.specialist.createArticle)
|
|
|
@ApiOperation(value = "创建专科医生健康文章")
|
|
|
public Envelop<Boolean> createSpecialistArticle(@ApiParam(name = "specialistArticle", value = "专科医生健康文章JSON")
|
|
|
@RequestParam(value = "specialistArticle", required = false)String specialistArticle){
|
|
|
try {
|
|
|
SpecialistArticleDO ps = toEntity(specialistArticle, SpecialistArticleDO.class);
|
|
|
return specialistService.createSpecialistArticle(ps);
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
tracer.getCurrentSpan().logEvent(e.getMessage());
|
|
|
return Envelop.getError(e.getMessage());
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = SpecialistMapping.specialist.findSpecialistPatientRelation)
|
|
|
@ApiOperation(value = "获取专科医生关系列表")
|
|
|
public Envelop<SpecialistPatientRelationVO> findSpecialistPatientRelation(@ApiParam(name = "doctor", value = "专科医生ID")
|
|
@ -135,7 +91,7 @@ public class SpecialistController extends EnvelopRestController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = SpecialistMapping.specialist.saveHealthAssistant)
|
|
|
@PostMapping(value = SpecialistMapping.specialist.saveHealthAssistant)
|
|
|
@ApiOperation(value = "保存配置居民计管师居民")
|
|
|
public Envelop<Boolean> saveHealthAssistant(@ApiParam(name = "json", value = "计管师居民实体") @RequestParam(required = true)String json){
|
|
|
try {
|
|
@ -162,4 +118,104 @@ public class SpecialistController extends EnvelopRestController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = SpecialistMapping.specialist.getPatientByLabel)
|
|
|
@ApiOperation(value = "根据标签获取居民信息")
|
|
|
public Envelop<PatientLabelVO> getPatientByLabel(@ApiParam(name = "doctor", value = "医生") @RequestParam(required = true)String doctor,
|
|
|
@ApiParam(name = "labelType", value = "标签类型") @RequestParam(required = true)String labelType,
|
|
|
@ApiParam(name = "labelCode", value = "标签code") @RequestParam(required = true)String labelCode,
|
|
|
@ApiParam(name = "page", value = "第几页,1开始") @RequestParam(required = true)Integer page,
|
|
|
@ApiParam(name = "size", value = "每页大小") @RequestParam(required = true)Integer size){
|
|
|
try {
|
|
|
return specialistService.getPatientByLabel(doctor,labelType,labelCode,page,size);
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
tracer.getCurrentSpan().logEvent(e.getMessage());
|
|
|
return Envelop.getError(e.getMessage());
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
@GetMapping(value = SpecialistMapping.specialist.getLabelpatientCount)
|
|
|
@ApiOperation(value = "根据标签获取居民数量")
|
|
|
public Envelop<Long> getLabelpatientCount(@ApiParam(name = "doctor", value = "医生") @RequestParam(required = true)String doctor,
|
|
|
@ApiParam(name = "labelType", value = "标签类型") @RequestParam(required = true)String labelType,
|
|
|
@ApiParam(name = "labelCode", value = "标签code") @RequestParam(required = true)String labelCode) {
|
|
|
try {
|
|
|
return specialistService.getLabelpatientCount(doctor,labelType,labelCode);
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
tracer.getCurrentSpan().logEvent(e.getMessage());
|
|
|
return Envelop.getError(e.getMessage());
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = SpecialistMapping.specialist.getAssistantPatientCount)
|
|
|
@ApiOperation(value = "根据计管获取居民数量")
|
|
|
public Envelop<Long> getAssistantPatientCount(@ApiParam(name = "doctor", value = "计管师医生") @RequestParam(required = true)String doctor) {
|
|
|
try {
|
|
|
return specialistService.getAssistantPatientCount(doctor);
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
tracer.getCurrentSpan().logEvent(e.getMessage());
|
|
|
return Envelop.getError(e.getMessage());
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = SpecialistMapping.specialist.getDoctorPatientByName)
|
|
|
@ApiOperation(value = "搜索专科医生居民")
|
|
|
public Envelop<PatientRelationVO> getDoctorPatientByName(@ApiParam(name = "doctor", value = "医生code") @RequestParam(required = true)String doctor,
|
|
|
@ApiParam(name = "name", value = "居民姓名模糊") @RequestParam(required = false)String nameKey,
|
|
|
@ApiParam(name = "page", value = "第几页,1开始") @RequestParam(required = true)Integer page,
|
|
|
@ApiParam(name = "size", value = "每页大小") @RequestParam(required = true)Integer size) {
|
|
|
try {
|
|
|
return specialistService.getDoctorPatientByName(doctor,nameKey,page,size);
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
tracer.getCurrentSpan().logEvent(e.getMessage());
|
|
|
return Envelop.getError(e.getMessage());
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
// @PostMapping(value = SpecialistMapping.specialist.createArticle)
|
|
|
// @ApiOperation(value = "创建专科医生健康文章")
|
|
|
// public Envelop<Boolean> createSpecialistArticle(@ApiParam(name = "specialistArticle", value = "专科医生健康文章JSON")
|
|
|
// @RequestParam(value = "specialistArticle", required = false)String specialistArticle){
|
|
|
// try {
|
|
|
// SpecialistArticleDO ps = toEntity(specialistArticle, SpecialistArticleDO.class);
|
|
|
// return specialistService.createSpecialistArticle(ps);
|
|
|
// }catch (Exception e){
|
|
|
// e.printStackTrace();
|
|
|
// tracer.getCurrentSpan().logEvent(e.getMessage());
|
|
|
// return Envelop.getError(e.getMessage());
|
|
|
// }
|
|
|
// }
|
|
|
|
|
|
// @PostMapping(value = SpecialistMapping.specialist.createConsult)
|
|
|
// @ApiOperation(value = "创建专科医生咨询")
|
|
|
// public Envelop<Boolean> createSpscialistConsult(@ApiParam(name = "specialistConsult", value = "专科医生咨询实体JSON")
|
|
|
// @RequestParam(value = "specialistConsult", required = false)String specialistConsult){
|
|
|
// try {
|
|
|
// SpecialistConsultDO ps = toEntity(specialistConsult, SpecialistConsultDO.class);
|
|
|
// return specialistService.createSpscialistConsult(ps);
|
|
|
// }catch (Exception e){
|
|
|
// e.printStackTrace();
|
|
|
// tracer.getCurrentSpan().logEvent(e.getMessage());
|
|
|
// return Envelop.getError(e.getMessage());
|
|
|
// }
|
|
|
// }
|
|
|
|
|
|
// @PostMapping(value = SpecialistMapping.specialist.createSpecialists)
|
|
|
// @ApiOperation(value = "创建专科医生")
|
|
|
// public Envelop<Boolean> createSpecialists(@ApiParam(name = "specialists", value = "专科医生实体")
|
|
|
// @RequestParam(value = "code", required = false)String specialists){
|
|
|
// try {
|
|
|
// List<SpecialistDO> infos = new ObjectMapper().readValue(specialists, new TypeReference<List<SpecialistDO>>(){});
|
|
|
// return specialistService.createSpecialists(infos);
|
|
|
// }catch (Exception e){
|
|
|
// e.printStackTrace();
|
|
|
// tracer.getCurrentSpan().logEvent(e.getMessage());
|
|
|
// return Envelop.getError(e.getMessage());
|
|
|
// }
|
|
|
// }
|
|
|
}
|