From 10343cb5deaecc2bf3023317a4c142ba84ec3b72 Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期一, 09 十一月 2026 15:30:55 +0800
Subject: [PATCH] feat: 统一档案随访周期 followupPeriod

---
 smartor/src/main/java/com/smartor/service/IPatMedInhospService.java |  114 ++++++++-------------------------------------------------
 1 files changed, 16 insertions(+), 98 deletions(-)

diff --git a/smartor/src/main/java/com/smartor/service/IPatMedInhospService.java b/smartor/src/main/java/com/smartor/service/IPatMedInhospService.java
index 2ef4a0d..0f37fa5 100644
--- a/smartor/src/main/java/com/smartor/service/IPatMedInhospService.java
+++ b/smartor/src/main/java/com/smartor/service/IPatMedInhospService.java
@@ -1,16 +1,12 @@
 package com.smartor.service;
 
-import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.common.core.page.TableDataInfo;
 import com.ruoyi.common.core.service.dto.PatMedReq;
 import com.ruoyi.common.core.service.dto.PatMedRes;
 import com.smartor.domain.*;
 import com.ruoyi.inhospvisit.domain.PatMedInhospDTO;
-import org.springframework.web.bind.annotation.RequestBody;
-
+import com.smartor.domain.DTO.ManualVisitDTO;
 import java.util.List;
 import java.util.Map;
-
 import com.ruoyi.inhospvisit.domain.PatMedInhospVO;
 import com.ruoyi.inhospvisit.domain.PatMedInhosp;
 import com.ruoyi.common.core.domain.entity.PatArchive;
@@ -23,13 +19,6 @@
  * @date 2023-03-04
  */
 public interface IPatMedInhospService {
-    /**
-     * 鏌ヨ鎮h�呬綇闄㈣褰�
-     *
-     * @param inhospid 鎮h�呬綇闄㈣褰曚富閿�
-     * @return 鎮h�呬綇闄㈣褰�
-     */
-    public PatMedInhosp selectPatMedInhospByInhospid(Long inhospid);
 
     public List<PatMedInhosp> selectPatMedInhosp(PatMedInhosp patMedInhosp);
 
@@ -53,8 +42,6 @@
 
     public PatMedInhosp getDeptCodeByPatId(PatMedInhosp patMedInhosp);
 
-    public PatMedRes selectPatMedInhospListCount(PatMedReq patMedReq);
-
     /**
      * 鏂板鎮h�呬綇闄㈣褰�
      *
@@ -70,40 +57,6 @@
      * @return 缁撴灉
      */
     public int updatePatMedInhosp(PatMedInhosp patMedInhosp);
-
-    /**
-     * 鎵归噺鍒犻櫎鎮h�呬綇闄㈣褰�
-     *
-     * @param inhospids 闇�瑕佸垹闄ょ殑鎮h�呬綇闄㈣褰曚富閿泦鍚�
-     * @return 缁撴灉
-     */
-    public int deletePatMedInhospByInhospids(Long[] inhospids);
-
-    /**
-     * 鍒犻櫎鎮h�呬綇闄㈣褰曚俊鎭�
-     *
-     * @param inhospid 鎮h�呬綇闄㈣褰曚富閿�
-     * @return 缁撴灉
-     */
-    public int deletePatMedInhospByInhospid(Long inhospid);
-
-    public int deletePatMedInhospByInhospno(String inhospno);
-
-    /**
-     * 澶勭悊浠巋is鍙栨潵鐨勫嚭闄㈡暟鎹�
-     *
-     * @param
-     * @return 缁撴灉
-     */
-    public int dealOutHospInfo(String config);
-
-    /**
-     * 澶勭悊浠巋is鍙栨潵鐨勫嚭闄㈡暟鎹� 浠诲姟缁勭敓鎴�
-     *
-     * @param
-     * @return 缁撴灉
-     */
-    public int dealOutHospInfoBySchedule(String config);
 
     /**
      * 鑾峰彇鍑洪櫌锛屼綇闄紝闂ㄨ瘖鏈嶅姟浜烘
@@ -122,64 +75,29 @@
     public List<PatMedInhosp> getDocAndPat(PatMedInhosp patMedInhosp);
 
     /**
-     * 澶勭悊浠巋is鍙栨潵鐨勬墜鏈俊鎭�
+     * 涓存椂鏂规硶锛屽鐞哾iagcheckFlag = 0鐨勬暟鎹紝閲嶆柊鐢熸垚闅忚浠诲姟
      *
      * @param
      * @return 缁撴灉
      */
-    public void addOperationSubTask(String config);
+    public void dealIcd10Subtask(PatMedInhosp patMedInhospVo, String config);
+
+    /**
+     * 浜哄伐闅忚锛氬垹闄ゆ偅鑰呭嚭闄㈣褰曞搴旂殑鏈畬鎴愰殢璁夸换鍔★紝骞舵寜鎸囧畾浠诲姟閲嶆柊鐢熸垚
+     *
+     * @param manualVisitDTO 鎮h�卲atid闆嗗悎鍙婁汉宸ラ殢璁夸换鍔askid
+     * @return 澶勭悊缁撴灉
+     */
+    public Map<String, Object> addManualVisit(ManualVisitDTO manualVisitDTO);
 
     public ServiceSubtask boxedServiceSubtask(ServiceTask serviceTask, PatMedInhosp patMedInhosp1, PatArchive patArchive, String config, Integer type);
 
-    // ==========================================================================
-    // 鍑哄叆闄㈤殢璁挎ā鍧楀寲锛堢涓�鎵癸級鈥斺�� 渚� VisitTaskCreateApiBridge / OtherVisitApiBridge 澶嶇敤鐨勮繃娓″叆鍙�
-    //
-    // 鈿狅笍 杩� 3 涓柟娉曟槸<b>鍒绘剰鏂板</b>鐨勮繃娓℃湡鍏ュ彛锛堢函杞彂锛岄浂涓氬姟閫昏緫锛夛紝
-    //    涓嶆槸璇姞銆佷篃涓嶈"椤烘墜鍒犳帀"锛�
-    //      路 runOperationVisit(config)              鈥斺�� 璁� OtherVisitApiBridge 鏈変釜"闅忚鑳藉姏"褰㈢姸鐨勫叆鍙�
-    //      路 persistSubtask(subtask)                鈥斺�� 璁� VisitTaskCreateApiBridge 鏈夊敮涓�鐨勮惤搴撳叆鍙�
-    //      路 selectPendingDeptPatientsForVisit()    鈥斺�� 璁� PatMedInhospController 鍒囧埌鏂板叆鍙e悗
-    //                                                  浠嶈兘鎶婂垪琛ㄤ氦缁欓櫌澶�/闂ㄨ瘖鍚堝苟
-    //    鐢� sql/_probe/verify_step16_service_restore.py 涓� audit_worktree_changes.py 鐧昏鎶婂叧銆�
-    // ==========================================================================
-
     /**
-     * 銆愯繃娓℃湡鐢ㄣ�戞墜鏈殢璁挎壂鎻忋��
-     * <p>
-     * 涓� {@link #addOperationSubTask(String)} <b>瀹屽叏绛変环</b>锛堟湰鏂规硶灏辨槸杞彂鍒板畠锛夛紝
-     * 瀛樺湪鐨勫敮涓�鐞嗙敱鏄粰 {@code OtherVisitApiBridge} 涓�涓�"鐪嬭捣鏉ュ睘浜庨殢璁胯兘鍔�"鐨勫叆鍙o紝
-     * 璁╂墜鏈殢璁垮皢鏉ユ惉鍘� {@code ruoyi-othervisit} 鏃跺彧鎹㈠疄鐜版柟銆�
-     * <p>
-     * 娉ㄦ剰锛歿@code addOperationSubTask} <b>涓嶈兘鍒�</b> 鈥斺�� 瀹冭
-     * {@code PatMedInhospController#addOperationSubTask}锛圲RL 涓嶅彉锛夌洿鎺ヨ皟鐢ㄣ��
+     * 鎸変换鍔¢厤缃殑鍙戦�佹柟寮忥紙preachform_desc锛夊垵濮嬪寲瀛愪换鍔″彂閫佹柟寮忔槑缁嗐��
      *
-     * @param config {@code sys_config: visit.early.day}
-     * @return 澶勭悊鐨勬墜鏈褰曟暟
+     * @param serviceSubtask 瀛愪换鍔�
+     * @param sendstate      鍙戦�佹柟寮忔槑缁嗗垵濮嬬姸鎬侊紝涓虹┖鏃堕粯璁� 1
+     * @return 澶勭悊鏉℃暟
      */
-    int runOperationVisit(String config);
-
-    /**
-     * 銆愯繃娓℃湡鐢ㄣ�戞妸銆岀瀹ょ淮搴︽湭澶勭悊鐨勫湪闄㈡偅鑰呫�嶅垪琛ㄨ鍑烘潵銆�
-     * <p>
-     * 渚� {@code PatMedInhospController#dealOutHospInfo}锛圲RL 涓嶅彉锛夊湪鍒囨崲鍒版柊鍏ュ彛鍚�
-     * 浠嶈兘鎶婂垪琛ㄤ氦缁� {@code IPatMedOuthospService} 鍋�"闄㈠闂ㄨ瘖 + 鍦ㄩ櫌"鍚堝苟銆�
-     * <p>
-     * 鏉′欢涓庡師 {@code dealOutHospInfo} 鐨勭涓�娈垫煡璇�<b>瀹屽叏涓�鑷�</b>锛�
-     * {@code deptcheck_flag='0'} + {@code inhospstate='1'} + {@code fuflag='1'}銆�
-     * 瀹炵幇鏄函杞彂锛坽@code selectPatMedInhospList}锛夛紝闆堕�昏緫鏀瑰姩銆�
-     *
-     * @return 绉戝缁村害鏈鐞嗙殑鍦ㄩ櫌鎮h��
-     */
-    List<PatMedInhosp> selectPendingDeptPatientsForVisit();
-
-    /**
-     * 銆愯繃娓℃湡鐢ㄣ�戞妸涓�鏉″凡缁勮濂界殑瀛愪换鍔¤惤搴撱��
-     * <p>
-     * 鍗曠嫭鎶藉嚭鏉ョ殑鐞嗙敱锛氳 {@code VisitTaskCreateApiBridge} 鏈変竴涓彲鎺х殑鍐欏叆鍙o紝
-     * 渚夸簬"鎼縼鍓嶅悗閫愯绛変环"鐨勬帰閽堟瘮瀵癸紱灏嗘潵銆岄殢璁夸换鍔″垱寤烘ā鍧椼�嶆帴绠℃椂鏇挎崲瀹炵幇鏂广��
-     *
-     * @param serviceSubtask 宸茬粍瑁呭ソ鐨勫瓙浠诲姟锛堣皟鐢ㄦ柟璐熻矗濉叏瀛楁锛�
-     * @return true = 钀藉簱鎴愬姛
-     */
-    boolean persistSubtask(ServiceSubtask serviceSubtask);
+    public Integer addServiceSubtaskPreachform(ServiceSubtask serviceSubtask, String sendstate);
 }

--
Gitblit v1.9.3