feat:梅州三院,提交添加患者最后一次退回日志提交时间

master
wyb 1 month ago
parent 0ad043fbe9
commit 122117505d

@ -29,6 +29,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
@ -87,6 +88,7 @@ public class MzsyBusinessServiceImpl implements MzsyBusinessService {
nodeLogAddDTO.setCreater(submitName+"("+submitNo+")");
nodeLogAddDTO.setCreaterName(submitName+"("+submitNo+")");
hospitalSubmitNodeServiceApi.addLog(nodeLogAddDTO);
updateBackLogSubmitTime(patientIds.get(0));
meiZhouSyRpc.archiveAndRecall(archiveRequest(patientIds.get(0),"EMR"));
return new MessageResponse(ResultCode.SUCCESS.getCode(), success());
} catch (BaseException baseException) {
@ -105,6 +107,7 @@ public class MzsyBusinessServiceImpl implements MzsyBusinessService {
}
@Override
public MessageResponse nurseSubmitHandle(Message message) {
try {
@ -151,6 +154,15 @@ public class MzsyBusinessServiceImpl implements MzsyBusinessService {
}
}
private void updateBackLogSubmitTime(String patientId) {
Long id = tBasicMapper.getLastBackLogId(patientId);
if(id != null){
String time = Func.formatDateTime(LocalDateTime.now());
tBasicMapper.updateBackLogSubmitTime(id,time);
}
}
private void verifyPatientIds(List<String> patientIds) {
if (Func.isEmpty(patientIds)) {
throw new BaseException("系统无此患者!");

@ -165,4 +165,7 @@ public interface TBasicMapper {
String getPatientIdBySdRyIndex(@Param("sdRyIndex")String sdRyIndex);
Long getLastBackLogId(@Param("patientId") String patientId);
int updateBackLogSubmitTime(@Param("id") Long id,@Param("time") String time);
}

@ -48,6 +48,11 @@
`ward_name`=#{wardCodeName}
where patient_id=#{patientId}
</update>
<update id="updateBackLogSubmitTime">
update docus_medicalrecord.cqc_back_info_log
set second_submit_time = #{time}
where id= #{id}
</update>
<select id="getPatientIdsByInpatientNoAndTimes" resultType="java.lang.String">
@ -178,5 +183,13 @@
WHERE
sdry_index=#{sdRyIndex}
</select>
<select id="getLastBackLogId" resultType="java.lang.Long">
select id
from
docus_medicalrecord.cqc_back_info_log
where patient_id = #{patientId}
order by create_time desc
limit 1
</select>
</mapper>

Loading…
Cancel
Save