医生接诊相关操作
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
package com.openhis.web.doctorstation.appservice;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.web.doctorstation.dto.PatientInfoDto;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
/**
|
||||
* 医生站-电子病历 应用Service
|
||||
* 医生站-主页面 应用Service
|
||||
*/
|
||||
public interface IDoctorStationMainAppService {
|
||||
|
||||
@@ -20,4 +22,28 @@ public interface IDoctorStationMainAppService {
|
||||
IPage<PatientInfoDto> getPatientInfo(PatientInfoDto patientInfoDto, String searchKey, Integer pageNo,
|
||||
Integer pageSize);
|
||||
|
||||
/**
|
||||
* 医生接诊
|
||||
*
|
||||
* @param encounterId 就诊id
|
||||
* @return 结果
|
||||
*/
|
||||
R<?> receiveEncounter(Long encounterId);
|
||||
|
||||
/**
|
||||
* 患者暂离
|
||||
*
|
||||
* @param encounterId 就诊id
|
||||
* @return 结果
|
||||
*/
|
||||
R<?> leaveEncounter(Long encounterId);
|
||||
|
||||
/**
|
||||
* 就诊完成
|
||||
*
|
||||
* @param encounterId 就诊id
|
||||
* @return 结果
|
||||
*/
|
||||
R<?> completeEncounter(Long encounterId);
|
||||
|
||||
}
|
||||
|
||||
@@ -5,26 +5,25 @@ import java.util.HashSet;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import com.openhis.web.doctorstation.appservice.IDoctorStationMainAppService;
|
||||
import com.openhis.web.doctorstation.mapper.DoctorStationMainAppMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.core.common.core.domain.R;
|
||||
import com.core.common.utils.AgeCalculatorUtil;
|
||||
import com.openhis.common.enums.AdministrativeGender;
|
||||
import com.openhis.common.enums.ClinicalStatus;
|
||||
import com.openhis.common.enums.EncounterStatus;
|
||||
import com.openhis.common.enums.ParticipantType;
|
||||
import com.openhis.administration.domain.Encounter;
|
||||
import com.openhis.administration.mapper.EncounterMapper;
|
||||
import com.openhis.common.enums.*;
|
||||
import com.openhis.common.utils.EnumUtils;
|
||||
import com.openhis.common.utils.HisQueryUtils;
|
||||
import com.openhis.web.doctorstation.appservice.IDoctorStationEmrAppService;
|
||||
import com.openhis.web.doctorstation.appservice.IDoctorStationMainAppService;
|
||||
import com.openhis.web.doctorstation.dto.PatientInfoDto;
|
||||
import com.openhis.web.doctorstation.mapper.DoctorStationEmrAppMapper;
|
||||
import com.openhis.web.doctorstation.mapper.DoctorStationMainAppMapper;
|
||||
|
||||
/**
|
||||
* 医生站-电子病历 应用实现类
|
||||
* 医生站-主页面 应用实现类
|
||||
*/
|
||||
@Service
|
||||
public class DoctorStationMainAppServiceImpl implements IDoctorStationMainAppService {
|
||||
@@ -32,6 +31,9 @@ public class DoctorStationMainAppServiceImpl implements IDoctorStationMainAppSer
|
||||
@Resource
|
||||
DoctorStationMainAppMapper doctorStationMainAppMapper;
|
||||
|
||||
@Resource
|
||||
EncounterMapper encounterMapper;
|
||||
|
||||
/**
|
||||
* 查询就诊患者信息
|
||||
*
|
||||
@@ -60,4 +62,49 @@ public class DoctorStationMainAppServiceImpl implements IDoctorStationMainAppSer
|
||||
return patientInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 医生接诊
|
||||
*
|
||||
* @param encounterId 就诊id
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public R<?> receiveEncounter(Long encounterId) {
|
||||
int update = encounterMapper.update(null,
|
||||
new LambdaUpdateWrapper<Encounter>().eq(Encounter::getId, encounterId)
|
||||
.set(Encounter::getStatusEnum, EncounterStatus.IN_PROGRESS.getValue())
|
||||
.set(Encounter::getSubjectStatusEnum, EncounterSubjectStatus.RECEIVING_CARE.getValue()));
|
||||
return update > 0 ? R.ok() : R.fail();
|
||||
}
|
||||
|
||||
/**
|
||||
* 患者暂离
|
||||
*
|
||||
* @param encounterId 就诊id
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public R<?> leaveEncounter(Long encounterId) {
|
||||
int update = encounterMapper.update(null,
|
||||
new LambdaUpdateWrapper<Encounter>().eq(Encounter::getId, encounterId)
|
||||
.set(Encounter::getStatusEnum, EncounterStatus.ON_HOLD.getValue())
|
||||
.set(Encounter::getSubjectStatusEnum, EncounterSubjectStatus.ON_LEAVE.getValue()));
|
||||
return update > 0 ? R.ok() : R.fail();
|
||||
}
|
||||
|
||||
/**
|
||||
* 就诊完成
|
||||
*
|
||||
* @param encounterId 就诊id
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public R<?> completeEncounter(Long encounterId) {
|
||||
int update = encounterMapper.update(null,
|
||||
new LambdaUpdateWrapper<Encounter>().eq(Encounter::getId, encounterId)
|
||||
.set(Encounter::getStatusEnum, EncounterStatus.DISCHARGED.getValue())
|
||||
.set(Encounter::getSubjectStatusEnum, EncounterSubjectStatus.DEPARTED.getValue()));
|
||||
return update > 0 ? R.ok() : R.fail();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,14 +3,13 @@
|
||||
*/
|
||||
package com.openhis.web.doctorstation.controller;
|
||||
|
||||
import com.openhis.web.doctorstation.appservice.IDoctorStationMainAppService;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.openhis.web.doctorstation.appservice.IDoctorStationEmrAppService;
|
||||
import com.openhis.web.doctorstation.appservice.IDoctorStationMainAppService;
|
||||
import com.openhis.web.doctorstation.dto.DoctorStationInitDto;
|
||||
import com.openhis.web.doctorstation.dto.PatientInfoDto;
|
||||
|
||||
@@ -55,4 +54,37 @@ public class DoctorStationMainController {
|
||||
return R.ok(iDoctorStationMainAppService.getPatientInfo(patientInfoDto, searchKey, pageNo, pageSize));
|
||||
}
|
||||
|
||||
/**
|
||||
* 医生接诊
|
||||
*
|
||||
* @param encounterId 就诊id
|
||||
* @return 结果
|
||||
*/
|
||||
@GetMapping(value = "/receive-encounter")
|
||||
public R<?> receiveEncounter(@RequestParam Long encounterId) {
|
||||
return iDoctorStationMainAppService.receiveEncounter(encounterId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 患者暂离
|
||||
*
|
||||
* @param encounterId 就诊id
|
||||
* @return 结果
|
||||
*/
|
||||
@GetMapping(value = "/leave-encounter")
|
||||
public R<?> leaveEncounter(@RequestParam Long encounterId) {
|
||||
return iDoctorStationMainAppService.leaveEncounter(encounterId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 就诊完成
|
||||
*
|
||||
* @param encounterId 就诊id
|
||||
* @return 结果
|
||||
*/
|
||||
@GetMapping(value = "/complete-encounter")
|
||||
public R<?> completeEncounter(@RequestParam Long encounterId) {
|
||||
return iDoctorStationMainAppService.completeEncounter(encounterId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.openhis.web.doctorstation.dto.PatientInfoDto;
|
||||
|
||||
/**
|
||||
* 医生站-电子病历 应用Mapper
|
||||
* 医生站-主页面 应用Mapper
|
||||
*/
|
||||
@Repository
|
||||
public interface DoctorStationMainAppMapper {
|
||||
|
||||
Reference in New Issue
Block a user