diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/anesthesia/appservice/IAnesthesiaAppService.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/anesthesia/appservice/IAnesthesiaAppService.java index 82d18de16..172eeb054 100644 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/anesthesia/appservice/IAnesthesiaAppService.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/anesthesia/appservice/IAnesthesiaAppService.java @@ -5,6 +5,7 @@ import com.healthlink.his.anesthesia.domain.AnesSummary; import com.healthlink.his.anesthesia.domain.AnesthesiaFollowup; import com.healthlink.his.anesthesia.domain.AnesthesiaIoRecord; import com.healthlink.his.anesthesia.domain.AnesthesiaMedication; +import com.healthlink.his.anesthesia.domain.AnesthesiaPostopFollowup; import com.healthlink.his.anesthesia.domain.AnesthesiaRecord; import com.healthlink.his.anesthesia.domain.AnesthesiaVitalSign; import com.healthlink.his.anesthesia.dto.AnesthesiaIoSummaryDto; @@ -45,4 +46,8 @@ public interface IAnesthesiaAppService { AnesSummary saveSummary(AnesSummary summary); AnesSummary getSummary(Long recordId); + + AnesthesiaPostopFollowup recordFollowup(AnesthesiaPostopFollowup followup); + + List getFollowups(Long encounterId); } diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/anesthesia/appservice/impl/AnesthesiaAppServiceImpl.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/anesthesia/appservice/impl/AnesthesiaAppServiceImpl.java index fc8c23b37..c14af9551 100644 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/anesthesia/appservice/impl/AnesthesiaAppServiceImpl.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/anesthesia/appservice/impl/AnesthesiaAppServiceImpl.java @@ -5,6 +5,7 @@ import com.healthlink.his.anesthesia.domain.AnesSummary; import com.healthlink.his.anesthesia.domain.AnesthesiaFollowup; import com.healthlink.his.anesthesia.domain.AnesthesiaIoRecord; import com.healthlink.his.anesthesia.domain.AnesthesiaMedication; +import com.healthlink.his.anesthesia.domain.AnesthesiaPostopFollowup; import com.healthlink.his.anesthesia.domain.AnesthesiaRecord; import com.healthlink.his.anesthesia.domain.AnesthesiaVitalSign; import com.healthlink.his.anesthesia.dto.AnesthesiaIoSummaryDto; @@ -13,10 +14,12 @@ import com.healthlink.his.anesthesia.service.IAnesAsaAssessmentService; import com.healthlink.his.anesthesia.service.IAnesSummaryService; import com.healthlink.his.anesthesia.service.IAnesthesiaFollowupService; import com.healthlink.his.anesthesia.service.IAnesthesiaIoRecordService; +import com.healthlink.his.anesthesia.service.IAnesthesiaPostopFollowupService; import com.healthlink.his.anesthesia.service.IAnesthesiaMedicationService; import com.healthlink.his.anesthesia.service.IAnesthesiaRecordService; import com.healthlink.his.anesthesia.service.IAnesthesiaVitalSignService; import com.healthlink.his.web.anesthesia.appservice.IAnesthesiaAppService; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import jakarta.annotation.Resource; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -49,6 +52,9 @@ public class AnesthesiaAppServiceImpl implements IAnesthesiaAppService { @Resource private IAnesSummaryService anesSummaryService; + @Resource + private IAnesthesiaPostopFollowupService anesthesiaPostopFollowupService; + @Override @Transactional public AnesthesiaRecord createRecord(AnesthesiaRecord record) { @@ -185,4 +191,24 @@ public class AnesthesiaAppServiceImpl implements IAnesthesiaAppService { public AnesSummary getSummary(Long recordId) { return anesSummaryService.selectByRecordId(recordId); } + + @Override + @Transactional(rollbackFor = Exception.class) + public AnesthesiaPostopFollowup recordFollowup(AnesthesiaPostopFollowup followup) { + if (followup.getId() != null) { + anesthesiaPostopFollowupService.updateById(followup); + } else { + followup.setStatus(0); + anesthesiaPostopFollowupService.save(followup); + } + return followup; + } + + @Override + public List getFollowups(Long encounterId) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(AnesthesiaPostopFollowup::getEncounterId, encounterId) + .orderByDesc(AnesthesiaPostopFollowup::getFollowupTime); + return anesthesiaPostopFollowupService.list(wrapper); + } } diff --git a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/anesthesia/controller/AnesthesiaController.java b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/anesthesia/controller/AnesthesiaController.java index 4afe91fd7..9369b7d83 100644 --- a/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/anesthesia/controller/AnesthesiaController.java +++ b/healthlink-his-server/healthlink-his-application/src/main/java/com/healthlink/his/web/anesthesia/controller/AnesthesiaController.java @@ -6,6 +6,7 @@ import com.healthlink.his.anesthesia.domain.AnesSummary; import com.healthlink.his.anesthesia.domain.AnesthesiaFollowup; import com.healthlink.his.anesthesia.domain.AnesthesiaIoRecord; import com.healthlink.his.anesthesia.domain.AnesthesiaMedication; +import com.healthlink.his.anesthesia.domain.AnesthesiaPostopFollowup; import com.healthlink.his.anesthesia.domain.AnesthesiaRecord; import com.healthlink.his.anesthesia.domain.AnesthesiaVitalSign; import com.healthlink.his.anesthesia.dto.AnesthesiaIoSummaryDto; @@ -179,4 +180,18 @@ public class AnesthesiaController { public R getSummary(@PathVariable Long recordId) { return R.ok(anesthesiaAppService.getSummary(recordId)); } + + @PostMapping("/postop-followup") + @Operation(summary = "记录术后随访") + @PreAuthorize("@ss.hasPermi('inpatient:anesthesia:edit')") + public R recordFollowup(@RequestBody AnesthesiaPostopFollowup followup) { + return R.ok(anesthesiaAppService.recordFollowup(followup)); + } + + @GetMapping("/postop-followup/{encounterId}") + @Operation(summary = "查询术后随访列表") + @PreAuthorize("@ss.hasPermi('inpatient:anesthesia:list')") + public R> getPostopFollowups(@PathVariable Long encounterId) { + return R.ok(anesthesiaAppService.getFollowups(encounterId)); + } } diff --git a/healthlink-his-ui/src/api/anesthesia/index.js b/healthlink-his-ui/src/api/anesthesia/index.js index 3c529d7d0..52daecca2 100644 --- a/healthlink-his-ui/src/api/anesthesia/index.js +++ b/healthlink-his-ui/src/api/anesthesia/index.js @@ -7,3 +7,5 @@ export function getVitalSigns(recordId) { return request({ url: '/api/v1/anesthe export function getMedications(recordId) { return request({ url: '/api/v1/anesthesia/medication/' + recordId, method: 'get' }) } export function getIoSummary(recordId) { return request({ url: '/api/v1/anesthesia/io-summary/' + recordId, method: 'get' }) } export function completeRecord(id) { return request({ url: '/api/v1/anesthesia/complete/' + id, method: 'put' }) } +export function recordPostopFollowup(data) { return request({ url: '/api/v1/anesthesia/postop-followup', method: 'post', data }) } +export function getPostopFollowups(encounterId) { return request({ url: '/api/v1/anesthesia/postop-followup/' + encounterId, method: 'get' }) } diff --git a/healthlink-his-ui/src/views/inpatientDoctor/PostopFollowup.vue b/healthlink-his-ui/src/views/inpatientDoctor/PostopFollowup.vue new file mode 100644 index 000000000..c34921d80 --- /dev/null +++ b/healthlink-his-ui/src/views/inpatientDoctor/PostopFollowup.vue @@ -0,0 +1,281 @@ + + + + +