From e117022bb69f4408687a77a35b0f76993e528714 Mon Sep 17 00:00:00 2001 From: chenqi Date: Fri, 19 Jun 2026 06:38:07 +0800 Subject: [PATCH] =?UTF-8?q?feat(mobile+telehealth):=20=E7=A7=BB=E5=8A=A8?= =?UTF-8?q?=E6=8A=A4=E7=90=86=E8=AF=84=E4=BC=B0+=E8=BE=93=E6=B6=B2?= =?UTF-8?q?=E7=AE=A1=E7=90=86+=E4=BA=92=E8=81=94=E7=BD=91=E5=8C=BB?= =?UTF-8?q?=E9=99=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../appservice/INursingMobileAppService.java | 5 + .../impl/NursingMobileAppServiceImpl.java | 167 ++++++++ .../controller/NursingMobileController.java | 40 ++ .../dto/NursingMobileAssessmentDto.java | 24 ++ .../nursing/dto/NursingMobileInfusionDto.java | 30 ++ .../appservice/ITelehealthAppService.java | 15 + .../impl/TelehealthAppServiceImpl.java | 102 +++++ .../controller/TelehealthController.java | 75 ++++ .../domain/TelehealthConsultation.java | 46 ++ .../dto/TelehealthConsultationDto.java | 43 ++ .../mapper/TelehealthConsultationMapper.java | 10 + .../db/migration/V85__telehealth.sql | 19 + healthlink-his-ui/src/api/telehealth/index.js | 33 ++ .../nursingmobile/InfusionManagement.vue | 320 ++++++++++++++ .../views/nursingmobile/NursingAssessment.vue | 395 ++++++++++++++++++ .../src/views/nursingmobile/api.js | 20 + .../src/views/telehealth/doctor/index.vue | 159 +++++++ .../src/views/telehealth/patient/index.vue | 151 +++++++ 18 files changed, 1654 insertions(+) create mode 100644 healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/nursing/dto/NursingMobileAssessmentDto.java create mode 100644 healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/nursing/dto/NursingMobileInfusionDto.java create mode 100644 healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/telehealth/appservice/ITelehealthAppService.java create mode 100644 healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/telehealth/appservice/impl/TelehealthAppServiceImpl.java create mode 100644 healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/telehealth/controller/TelehealthController.java create mode 100644 healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/telehealth/domain/TelehealthConsultation.java create mode 100644 healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/telehealth/dto/TelehealthConsultationDto.java create mode 100644 healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/telehealth/mapper/TelehealthConsultationMapper.java create mode 100644 healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V85__telehealth.sql create mode 100644 healthlink-his-ui/src/api/telehealth/index.js create mode 100644 healthlink-his-ui/src/views/nursingmobile/InfusionManagement.vue create mode 100644 healthlink-his-ui/src/views/nursingmobile/NursingAssessment.vue create mode 100644 healthlink-his-ui/src/views/telehealth/doctor/index.vue create mode 100644 healthlink-his-ui/src/views/telehealth/patient/index.vue diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/nursing/appservice/INursingMobileAppService.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/nursing/appservice/INursingMobileAppService.java index b6ff95b36..4501dbcd7 100644 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/nursing/appservice/INursingMobileAppService.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/nursing/appservice/INursingMobileAppService.java @@ -11,4 +11,9 @@ public interface INursingMobileAppService { Map executeOrder(Long requestId, String adviceTable, Long encounterId, Long patientId); NursingMobileVitalSignDto saveVitalSign(NursingMobileVitalSignDto vitalSign); NursingMobileVitalSignTrendDto getVitalSignTrend(Long patientId, Integer days); + NursingMobileAssessmentDto submitAssessment(NursingMobileAssessmentDto dto); + List getAssessmentList(Long patientId); + NursingMobileInfusionDto startInfusion(NursingMobileInfusionDto dto); + NursingMobileInfusionDto addPatrol(NursingMobileInfusionDto dto); + List getInfusionStatus(Long patientId); } diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/nursing/appservice/impl/NursingMobileAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/nursing/appservice/impl/NursingMobileAppServiceImpl.java index 62fa6ef5d..595e0c66c 100644 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/nursing/appservice/impl/NursingMobileAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/nursing/appservice/impl/NursingMobileAppServiceImpl.java @@ -1,11 +1,16 @@ package com.healthlink.his.web.nursing.appservice.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.healthlink.his.nursing.domain.NursingAssessment; +import com.healthlink.his.nursing.domain.NursingInfusionPatrol; import com.healthlink.his.nursing.domain.NursingVitalSignsChart; +import com.healthlink.his.nursing.service.INursingAssessmentService; +import com.healthlink.his.nursing.service.INursingInfusionPatrolService; import com.healthlink.his.nursing.service.INursingVitalSignsChartService; import com.healthlink.his.web.nursing.appservice.INursingMobileAppService; import com.healthlink.his.web.nursing.dto.*; import com.healthlink.his.web.nursing.mapper.NursingMobileAppMapper; +import com.fasterxml.jackson.databind.ObjectMapper; import jakarta.annotation.Resource; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -24,6 +29,14 @@ public class NursingMobileAppServiceImpl implements INursingMobileAppService { @Resource private INursingVitalSignsChartService vitalSignsChartService; + @Resource + private INursingAssessmentService assessmentService; + + @Resource + private INursingInfusionPatrolService infusionPatrolService; + + private final ObjectMapper objectMapper = new ObjectMapper(); + @Override public List getMobilePatientList(String wardName, String searchKey) { return mobileMapper.selectMobilePatientList(wardName, searchKey); @@ -156,4 +169,158 @@ public class NursingMobileAppServiceImpl implements INursingMobileAppService { return trend; } + + @Override + @Transactional(rollbackFor = Exception.class) + public NursingMobileAssessmentDto submitAssessment(NursingMobileAssessmentDto dto) { + NursingAssessment assessment = new NursingAssessment(); + assessment.setEncounterId(dto.getEncounterId()); + assessment.setPatientId(dto.getPatientId()); + assessment.setPatientName(dto.getPatientName()); + assessment.setAssessorId(dto.getAssessorId()); + assessment.setAssessorName(dto.getAssessorName()); + assessment.setAssessmentType(dto.getAssessmentType()); + assessment.setAssessmentTool(dto.getAssessmentTool()); + assessment.setTotalScore(dto.getTotalScore()); + assessment.setRiskLevel(calculateRiskLevel(dto.getAssessmentTool(), dto.getTotalScore())); + assessment.setDetail(dto.getDetail()); + assessment.setAssessmentTime(dto.getAssessmentTime() != null ? dto.getAssessmentTime() : new Date()); + assessment.setDeleteFlag("0"); + try { + assessment.setItemScores(dto.getItemScores() != null ? objectMapper.writeValueAsString(dto.getItemScores()) : null); + } catch (Exception e) { + assessment.setItemScores(null); + } + assessmentService.save(assessment); + dto.setId(assessment.getId()); + dto.setRiskLevel(assessment.getRiskLevel()); + return dto; + } + + @Override + public List getAssessmentList(Long patientId) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(NursingAssessment::getPatientId, patientId) + .orderByDesc(NursingAssessment::getAssessmentTime); + List records = assessmentService.list(wrapper); + List result = new ArrayList<>(); + for (NursingAssessment r : records) { + NursingMobileAssessmentDto dto = new NursingMobileAssessmentDto(); + dto.setId(r.getId()); + dto.setEncounterId(r.getEncounterId()); + dto.setPatientId(r.getPatientId()); + dto.setPatientName(r.getPatientName()); + dto.setAssessorName(r.getAssessorName()); + dto.setAssessmentType(r.getAssessmentType()); + dto.setAssessmentTool(r.getAssessmentTool()); + dto.setTotalScore(r.getTotalScore()); + dto.setRiskLevel(r.getRiskLevel()); + dto.setDetail(r.getDetail()); + dto.setAssessmentTime(r.getAssessmentTime()); + try { + if (r.getItemScores() != null) { + dto.setItemScores(objectMapper.readValue(r.getItemScores(), Map.class)); + } + } catch (Exception e) { + dto.setItemScores(null); + } + result.add(dto); + } + return result; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public NursingMobileInfusionDto startInfusion(NursingMobileInfusionDto dto) { + NursingInfusionPatrol patrol = new NursingInfusionPatrol(); + patrol.setEncounterId(dto.getEncounterId()); + patrol.setPatientId(dto.getPatientId()); + patrol.setPatientName(dto.getPatientName()); + patrol.setOrderId(dto.getOrderId()); + patrol.setDrugName(dto.getDrugName()); + patrol.setInfusionRate(dto.getInfusionRate()); + patrol.setTotalVolume(dto.getTotalVolume()); + patrol.setStartTime(dto.getStartTime() != null ? dto.getStartTime() : new Date()); + patrol.setPatencyStatus("NORMAL"); + patrol.setPatrolNurseId(dto.getPatrolNurseId()); + patrol.setPatrolNurseName(dto.getPatrolNurseName()); + patrol.setCreateTime(new Date()); + infusionPatrolService.save(patrol); + dto.setId(patrol.getId()); + dto.setPatencyStatus("NORMAL"); + dto.setStatus("RUNNING"); + return dto; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public NursingMobileInfusionDto addPatrol(NursingMobileInfusionDto dto) { + NursingInfusionPatrol patrol = new NursingInfusionPatrol(); + patrol.setEncounterId(dto.getEncounterId()); + patrol.setPatientId(dto.getPatientId()); + patrol.setPatientName(dto.getPatientName()); + patrol.setOrderId(dto.getOrderId()); + patrol.setDrugName(dto.getDrugName()); + patrol.setPatrolTime(new Date()); + patrol.setDripRate(dto.getDripRate()); + patrol.setPatencyStatus(dto.getPatencyStatus()); + patrol.setAdverseReaction(dto.getAdverseReaction()); + patrol.setPatrolNurseId(dto.getPatrolNurseId()); + patrol.setPatrolNurseName(dto.getPatrolNurseName()); + patrol.setCreateTime(new Date()); + infusionPatrolService.save(patrol); + dto.setId(patrol.getId()); + dto.setPatrolTime(patrol.getPatrolTime()); + return dto; + } + + @Override + public List getInfusionStatus(Long patientId) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(NursingInfusionPatrol::getPatientId, patientId) + .orderByDesc(NursingInfusionPatrol::getStartTime); + List records = infusionPatrolService.list(wrapper); + Map latestMap = new LinkedHashMap<>(); + for (NursingInfusionPatrol r : records) { + Long orderId = r.getOrderId(); + if (orderId == null) orderId = r.getId(); + if (!latestMap.containsKey(orderId)) { + NursingMobileInfusionDto dto = new NursingMobileInfusionDto(); + dto.setId(r.getId()); + dto.setEncounterId(r.getEncounterId()); + dto.setPatientId(r.getPatientId()); + dto.setPatientName(r.getPatientName()); + dto.setOrderId(r.getOrderId()); + dto.setDrugName(r.getDrugName()); + dto.setInfusionRate(r.getInfusionRate()); + dto.setTotalVolume(r.getTotalVolume()); + dto.setStartTime(r.getStartTime()); + dto.setPatrolTime(r.getPatrolTime()); + dto.setDripRate(r.getDripRate()); + dto.setPatencyStatus(r.getPatencyStatus()); + dto.setAdverseReaction(r.getAdverseReaction()); + dto.setPatrolNurseName(r.getPatrolNurseName()); + dto.setStatus("RUNNING"); + latestMap.put(orderId, dto); + } + } + return new ArrayList<>(latestMap.values()); + } + + private String calculateRiskLevel(String tool, Integer score) { + if (score == null) return "NORMAL"; + if ("BRADEN".equals(tool)) { + if (score <= 12) return "HIGH"; + if (score <= 14) return "MEDIUM"; + return "LOW"; + } else if ("MORSE".equals(tool)) { + if (score >= 45) return "HIGH"; + if (score >= 25) return "MEDIUM"; + return "LOW"; + } else if ("NRS2002".equals(tool)) { + if (score >= 3) return "HIGH"; + return "LOW"; + } + return "NORMAL"; + } } diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/nursing/controller/NursingMobileController.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/nursing/controller/NursingMobileController.java index 6b14d1a30..8d2219c5e 100644 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/nursing/controller/NursingMobileController.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/nursing/controller/NursingMobileController.java @@ -69,4 +69,44 @@ public class NursingMobileController { NursingMobileVitalSignTrendDto trend = mobileAppService.getVitalSignTrend(patientId, days); return R.ok(trend); } + + @Operation(summary = "提交护理评估") + @PostMapping("/assessment/submit") + @PreAuthorize("hasAuthority('nursing:nursing:edit')") + public R submitAssessment(@RequestBody NursingMobileAssessmentDto assessment) { + NursingMobileAssessmentDto saved = mobileAppService.submitAssessment(assessment); + return R.ok(saved); + } + + @Operation(summary = "查询评估记录") + @GetMapping("/assessment/list/{patientId}") + @PreAuthorize("hasAuthority('nursing:nursing:list')") + public R getAssessmentList(@PathVariable Long patientId) { + List list = mobileAppService.getAssessmentList(patientId); + return R.ok(list); + } + + @Operation(summary = "开始输液") + @PostMapping("/infusion/start") + @PreAuthorize("hasAuthority('nursing:nursing:edit')") + public R startInfusion(@RequestBody NursingMobileInfusionDto infusion) { + NursingMobileInfusionDto saved = mobileAppService.startInfusion(infusion); + return R.ok(saved); + } + + @Operation(summary = "输液巡视记录") + @PostMapping("/infusion/patrol") + @PreAuthorize("hasAuthority('nursing:nursing:edit')") + public R addPatrol(@RequestBody NursingMobileInfusionDto patrol) { + NursingMobileInfusionDto saved = mobileAppService.addPatrol(patrol); + return R.ok(saved); + } + + @Operation(summary = "输液状态查询") + @GetMapping("/infusion/status/{patientId}") + @PreAuthorize("hasAuthority('nursing:nursing:list')") + public R getInfusionStatus(@PathVariable Long patientId) { + List list = mobileAppService.getInfusionStatus(patientId); + return R.ok(list); + } } diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/nursing/dto/NursingMobileAssessmentDto.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/nursing/dto/NursingMobileAssessmentDto.java new file mode 100644 index 000000000..6549ffbf6 --- /dev/null +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/nursing/dto/NursingMobileAssessmentDto.java @@ -0,0 +1,24 @@ +package com.healthlink.his.web.nursing.dto; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import lombok.Data; +import java.util.Date; +import java.util.Map; + +@Data +@JsonIgnoreProperties(ignoreUnknown = true) +public class NursingMobileAssessmentDto { + private Long id; + private Long encounterId; + private Long patientId; + private String patientName; + private Long assessorId; + private String assessorName; + private String assessmentType; + private String assessmentTool; + private Integer totalScore; + private String riskLevel; + private Map itemScores; + private String detail; + private Date assessmentTime; +} diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/nursing/dto/NursingMobileInfusionDto.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/nursing/dto/NursingMobileInfusionDto.java new file mode 100644 index 000000000..041b3ace4 --- /dev/null +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/nursing/dto/NursingMobileInfusionDto.java @@ -0,0 +1,30 @@ +package com.healthlink.his.web.nursing.dto; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import lombok.Data; +import java.util.Date; + +@Data +@JsonIgnoreProperties(ignoreUnknown = true) +public class NursingMobileInfusionDto { + private Long id; + private Long encounterId; + private Long patientId; + private String patientName; + private Long orderId; + private String drugName; + private String infusionRate; + private Integer totalVolume; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date startTime; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date patrolTime; + private Integer dripRate; + private String patencyStatus; + private String adverseReaction; + private Long patrolNurseId; + private String patrolNurseName; + private String status; + private Integer remainingVolume; +} diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/telehealth/appservice/ITelehealthAppService.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/telehealth/appservice/ITelehealthAppService.java new file mode 100644 index 000000000..2fd32ff8f --- /dev/null +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/telehealth/appservice/ITelehealthAppService.java @@ -0,0 +1,15 @@ +package com.healthlink.his.web.telehealth.appservice; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.healthlink.his.web.telehealth.dto.TelehealthConsultationDto; + +public interface ITelehealthAppService { + + Long createConsultation(TelehealthConsultationDto dto); + + Page pageConsultation(TelehealthConsultationDto dto); + + Boolean replyConsultation(TelehealthConsultationDto dto); + + Boolean prescribeConsultation(TelehealthConsultationDto dto); +} diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/telehealth/appservice/impl/TelehealthAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/telehealth/appservice/impl/TelehealthAppServiceImpl.java new file mode 100644 index 000000000..3824aa6af --- /dev/null +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/telehealth/appservice/impl/TelehealthAppServiceImpl.java @@ -0,0 +1,102 @@ +package com.healthlink.his.web.telehealth.appservice.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.core.common.utils.SecurityUtils; +import com.healthlink.his.web.telehealth.appservice.ITelehealthAppService; +import com.healthlink.his.web.telehealth.domain.TelehealthConsultation; +import com.healthlink.his.web.telehealth.dto.TelehealthConsultationDto; +import com.healthlink.his.web.telehealth.mapper.TelehealthConsultationMapper; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.StringUtils; + +import jakarta.annotation.Resource; +import java.util.Date; +import java.util.List; +import java.util.stream.Collectors; + +@Slf4j +@Service +public class TelehealthAppServiceImpl implements ITelehealthAppService { + + @Resource + private TelehealthConsultationMapper telehealthConsultationMapper; + + @Override + @Transactional(rollbackFor = Exception.class) + public Long createConsultation(TelehealthConsultationDto dto) { + TelehealthConsultation entity = new TelehealthConsultation(); + entity.setPatientId(dto.getPatientId()); + entity.setDoctorId(dto.getDoctorId()); + entity.setConsultationType(dto.getConsultationType()); + entity.setStatus("PENDING"); + entity.setChiefComplaint(dto.getChiefComplaint()); + entity.setConsultationTime(new Date()); + entity.setTenantId(SecurityUtils.getLoginUser().getTenantId()); + telehealthConsultationMapper.insert(entity); + return entity.getId(); + } + + @Override + public Page pageConsultation(TelehealthConsultationDto dto) { + Page page = new Page<>(dto.getPageNum(), dto.getPageSize()); + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + + if (StringUtils.hasText(dto.getStatus())) { + wrapper.eq(TelehealthConsultation::getStatus, dto.getStatus()); + } + if (dto.getDoctorId() != null) { + wrapper.eq(TelehealthConsultation::getDoctorId, dto.getDoctorId()); + } + if (dto.getPatientId() != null) { + wrapper.eq(TelehealthConsultation::getPatientId, dto.getPatientId()); + } + wrapper.orderByDesc(TelehealthConsultation::getCreateTime); + + Page result = telehealthConsultationMapper.selectPage(page, wrapper); + + Page dtoPage = new Page<>(result.getCurrent(), result.getSize(), result.getTotal()); + List dtoList = result.getRecords().stream() + .map(this::toDto) + .collect(Collectors.toList()); + dtoPage.setRecords(dtoList); + return dtoPage; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean replyConsultation(TelehealthConsultationDto dto) { + TelehealthConsultation entity = telehealthConsultationMapper.selectById(dto.getId()); + if (entity == null) { + throw new RuntimeException("问诊记录不存在"); + } + entity.setDiagnosis(dto.getDiagnosis()); + entity.setStatus("IN_PROGRESS"); + telehealthConsultationMapper.updateById(entity); + return true; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Boolean prescribeConsultation(TelehealthConsultationDto dto) { + TelehealthConsultation entity = telehealthConsultationMapper.selectById(dto.getId()); + if (entity == null) { + throw new RuntimeException("问诊记录不存在"); + } + entity.setPrescription(dto.getPrescription()); + entity.setDiagnosis(dto.getDiagnosis()); + entity.setStatus("COMPLETED"); + entity.setEndTime(new Date()); + telehealthConsultationMapper.updateById(entity); + return true; + } + + private TelehealthConsultationDto toDto(TelehealthConsultation entity) { + TelehealthConsultationDto dto = new TelehealthConsultationDto(); + BeanUtils.copyProperties(entity, dto); + return dto; + } +} diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/telehealth/controller/TelehealthController.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/telehealth/controller/TelehealthController.java new file mode 100644 index 000000000..2fb19e249 --- /dev/null +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/telehealth/controller/TelehealthController.java @@ -0,0 +1,75 @@ +package com.healthlink.his.web.telehealth.controller; + +import com.core.common.core.domain.R; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.healthlink.his.web.telehealth.appservice.ITelehealthAppService; +import com.healthlink.his.web.telehealth.dto.TelehealthConsultationDto; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import lombok.extern.slf4j.Slf4j; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import jakarta.annotation.Resource; + +@Slf4j +@Tag(name = "互联网医院-在线问诊") +@RestController +@RequestMapping("/telehealth/consultation") +public class TelehealthController { + + @Resource + private ITelehealthAppService telehealthAppService; + + @Operation(summary = "创建问诊") + @PostMapping("/create") + @PreAuthorize("@ss.hasPermi('outpatient:telehealth:edit')") + public R create(@RequestBody TelehealthConsultationDto dto) { + try { + Long id = telehealthAppService.createConsultation(dto); + return R.ok(id); + } catch (Exception e) { + log.error("创建问诊失败", e); + return R.fail("创建问诊失败: " + e.getMessage()); + } + } + + @Operation(summary = "问诊列表") + @GetMapping("/page") + @PreAuthorize("@ss.hasPermi('outpatient:telehealth:list')") + public R> page(TelehealthConsultationDto dto) { + try { + Page result = telehealthAppService.pageConsultation(dto); + return R.ok(result); + } catch (Exception e) { + log.error("查询问诊列表失败", e); + return R.fail("查询问诊列表失败: " + e.getMessage()); + } + } + + @Operation(summary = "医生回复") + @PostMapping("/reply") + @PreAuthorize("@ss.hasPermi('outpatient:telehealth:edit')") + public R reply(@RequestBody TelehealthConsultationDto dto) { + try { + telehealthAppService.replyConsultation(dto); + return R.ok("回复成功"); + } catch (Exception e) { + log.error("医生回复失败", e); + return R.fail("回复失败: " + e.getMessage()); + } + } + + @Operation(summary = "复诊开方") + @PostMapping("/prescribe") + @PreAuthorize("@ss.hasPermi('outpatient:telehealth:edit')") + public R prescribe(@RequestBody TelehealthConsultationDto dto) { + try { + telehealthAppService.prescribeConsultation(dto); + return R.ok("开方成功"); + } catch (Exception e) { + log.error("复诊开方失败", e); + return R.fail("开方失败: " + e.getMessage()); + } + } +} diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/telehealth/domain/TelehealthConsultation.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/telehealth/domain/TelehealthConsultation.java new file mode 100644 index 000000000..7fc1aad89 --- /dev/null +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/telehealth/domain/TelehealthConsultation.java @@ -0,0 +1,46 @@ +package com.healthlink.his.web.telehealth.domain; + +import com.baomidou.mybatisplus.annotation.*; +import com.core.common.core.domain.HisBaseEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("telehealth_consultation") +public class TelehealthConsultation extends HisBaseEntity { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.ASSIGN_ID) + private Long id; + + @TableField("patient_id") + private Long patientId; + + @TableField("doctor_id") + private Long doctorId; + + @TableField("consultation_type") + private String consultationType; + + @TableField("status") + private String status; + + @TableField("chief_complaint") + private String chiefComplaint; + + @TableField("diagnosis") + private String diagnosis; + + @TableField("prescription") + private String prescription; + + @TableField("consultation_time") + private Date consultationTime; + + @TableField("end_time") + private Date endTime; +} diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/telehealth/dto/TelehealthConsultationDto.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/telehealth/dto/TelehealthConsultationDto.java new file mode 100644 index 000000000..fc5cbf5db --- /dev/null +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/telehealth/dto/TelehealthConsultationDto.java @@ -0,0 +1,43 @@ +package com.healthlink.his.web.telehealth.dto; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +import java.util.Date; + +@Data +public class TelehealthConsultationDto { + + private Long id; + + private Long patientId; + + private String patientName; + + private Long doctorId; + + private String doctorName; + + private String consultationType; + + private String status; + + private String chiefComplaint; + + private String diagnosis; + + private String prescription; + + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date consultationTime; + + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date endTime; + + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date createTime; + + private Integer pageNum = 1; + + private Integer pageSize = 10; +} diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/telehealth/mapper/TelehealthConsultationMapper.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/telehealth/mapper/TelehealthConsultationMapper.java new file mode 100644 index 000000000..f770476a7 --- /dev/null +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/telehealth/mapper/TelehealthConsultationMapper.java @@ -0,0 +1,10 @@ +package com.healthlink.his.web.telehealth.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.healthlink.his.web.telehealth.domain.TelehealthConsultation; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface TelehealthConsultationMapper extends BaseMapper { + +} diff --git a/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V85__telehealth.sql b/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V85__telehealth.sql new file mode 100644 index 000000000..e7ad1655e --- /dev/null +++ b/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V85__telehealth.sql @@ -0,0 +1,19 @@ +-- V85: 互联网医院 - 在线问诊+复诊开方 +CREATE TABLE IF NOT EXISTS telehealth_consultation ( + id BIGSERIAL PRIMARY KEY, + patient_id BIGINT NOT NULL, + doctor_id BIGINT NOT NULL, + consultation_type VARCHAR(20) NOT NULL, + status VARCHAR(20) DEFAULT 'PENDING', + chief_complaint TEXT, + diagnosis TEXT, + prescription TEXT, + consultation_time TIMESTAMP, + end_time TIMESTAMP, + tenant_id BIGINT DEFAULT 0, + delete_flag CHAR(1) DEFAULT '0', + create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + create_by VARCHAR(64), + update_time TIMESTAMP, + update_by VARCHAR(64) +); diff --git a/healthlink-his-ui/src/api/telehealth/index.js b/healthlink-his-ui/src/api/telehealth/index.js new file mode 100644 index 000000000..858eca574 --- /dev/null +++ b/healthlink-his-ui/src/api/telehealth/index.js @@ -0,0 +1,33 @@ +import request from '@/utils/request' + +export function createConsultation(data) { + return request({ + url: '/telehealth/consultation/create', + method: 'post', + data: data + }) +} + +export function pageConsultation(query) { + return request({ + url: '/telehealth/consultation/page', + method: 'get', + params: query + }) +} + +export function replyConsultation(data) { + return request({ + url: '/telehealth/consultation/reply', + method: 'post', + data: data + }) +} + +export function prescribeConsultation(data) { + return request({ + url: '/telehealth/consultation/prescribe', + method: 'post', + data: data + }) +} diff --git a/healthlink-his-ui/src/views/nursingmobile/InfusionManagement.vue b/healthlink-his-ui/src/views/nursingmobile/InfusionManagement.vue new file mode 100644 index 000000000..7b9bbfe78 --- /dev/null +++ b/healthlink-his-ui/src/views/nursingmobile/InfusionManagement.vue @@ -0,0 +1,320 @@ + + + + + diff --git a/healthlink-his-ui/src/views/nursingmobile/NursingAssessment.vue b/healthlink-his-ui/src/views/nursingmobile/NursingAssessment.vue new file mode 100644 index 000000000..9b94a1e51 --- /dev/null +++ b/healthlink-his-ui/src/views/nursingmobile/NursingAssessment.vue @@ -0,0 +1,395 @@ + + + + + diff --git a/healthlink-his-ui/src/views/nursingmobile/api.js b/healthlink-his-ui/src/views/nursingmobile/api.js index 4eee3eb81..7ed4b9d54 100644 --- a/healthlink-his-ui/src/views/nursingmobile/api.js +++ b/healthlink-his-ui/src/views/nursingmobile/api.js @@ -19,3 +19,23 @@ export function saveVitalSign(data) { export function getVitalSignTrend(patientId, params) { return request({ url: '/nursing/mobile/vital-sign-trend/' + patientId, method: 'get', params }) } + +export function submitAssessment(data) { + return request({ url: '/nursing/mobile/assessment/submit', method: 'post', data }) +} + +export function getAssessmentList(patientId) { + return request({ url: '/nursing/mobile/assessment/list/' + patientId, method: 'get' }) +} + +export function startInfusion(data) { + return request({ url: '/nursing/mobile/infusion/start', method: 'post', data }) +} + +export function addInfusionPatrol(data) { + return request({ url: '/nursing/mobile/infusion/patrol', method: 'post', data }) +} + +export function getInfusionStatus(patientId) { + return request({ url: '/nursing/mobile/infusion/status/' + patientId, method: 'get' }) +} diff --git a/healthlink-his-ui/src/views/telehealth/doctor/index.vue b/healthlink-his-ui/src/views/telehealth/doctor/index.vue new file mode 100644 index 000000000..7183f864c --- /dev/null +++ b/healthlink-his-ui/src/views/telehealth/doctor/index.vue @@ -0,0 +1,159 @@ + + + + + diff --git a/healthlink-his-ui/src/views/telehealth/patient/index.vue b/healthlink-his-ui/src/views/telehealth/patient/index.vue new file mode 100644 index 000000000..00f843c4b --- /dev/null +++ b/healthlink-his-ui/src/views/telehealth/patient/index.vue @@ -0,0 +1,151 @@ + + + + +