Merge branch 'master' of https://codeup.aliyun.com/61c0318acd8b75daa5a125f7/medical/openhis
This commit is contained in:
@@ -95,11 +95,15 @@ public class IWesternMedicineDispenseAppServiceImpl implements IWesternMedicineD
|
|||||||
|
|
||||||
// 查询条件设定
|
// 查询条件设定
|
||||||
String condition = encounterInfoSearchParam.getCondition();
|
String condition = encounterInfoSearchParam.getCondition();
|
||||||
|
encounterInfoSearchParam.setCondition(null);
|
||||||
if (StringUtils.isNotEmpty(condition)){
|
if (StringUtils.isNotEmpty(condition)){
|
||||||
Pattern pattern = Pattern.compile(".*\\d.*");
|
Pattern pattern = Pattern.compile(".*\\d.*");
|
||||||
Matcher matcher = pattern.matcher(encounterInfoSearchParam.getCondition());
|
Matcher matcher = pattern.matcher(condition);
|
||||||
encounterInfoSearchParam.setIdCard(matcher.find() ? condition:"");
|
if (matcher.find()){
|
||||||
encounterInfoSearchParam.setPatientName(!matcher.find() ? condition:"");
|
encounterInfoSearchParam.setIdCard(condition);
|
||||||
|
} else{
|
||||||
|
encounterInfoSearchParam.setPatientName(condition);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 构建查询条件
|
// 构建查询条件
|
||||||
@@ -110,6 +114,12 @@ public class IWesternMedicineDispenseAppServiceImpl implements IWesternMedicineD
|
|||||||
Page<EncounterInfoPageDto> encounterInfoPageDto = westernMedicineDispenseMapper.selectEncounterInfoListPage(
|
Page<EncounterInfoPageDto> encounterInfoPageDto = westernMedicineDispenseMapper.selectEncounterInfoListPage(
|
||||||
new Page<>(pageNo, pageSize), queryWrapper);
|
new Page<>(pageNo, pageSize), queryWrapper);
|
||||||
|
|
||||||
|
// 个别项目设定
|
||||||
|
encounterInfoPageDto.getRecords().forEach(prescriptionPatientInfoDto -> {
|
||||||
|
// 性别
|
||||||
|
prescriptionPatientInfoDto.setGenderEnum_enumText(EnumUtils.getInfoByValue(AdministrativeGender.class,
|
||||||
|
prescriptionPatientInfoDto.getGenderEnum()));
|
||||||
|
});
|
||||||
return R.ok(encounterInfoPageDto);
|
return R.ok(encounterInfoPageDto);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -130,7 +140,7 @@ public class IWesternMedicineDispenseAppServiceImpl implements IWesternMedicineD
|
|||||||
prescriptionPatientInfoDto.setGenderEnum_enumText(EnumUtils.getInfoByValue(AdministrativeGender.class,
|
prescriptionPatientInfoDto.setGenderEnum_enumText(EnumUtils.getInfoByValue(AdministrativeGender.class,
|
||||||
prescriptionPatientInfoDto.getGenderEnum()));
|
prescriptionPatientInfoDto.getGenderEnum()));
|
||||||
// 合同类型
|
// 合同类型
|
||||||
if (StringUtils.isNull(prescriptionPatientInfoDto.getCategoryEnum())){
|
if (StringUtils.isNotNull(prescriptionPatientInfoDto.getCategoryEnum())){
|
||||||
prescriptionPatientInfoDto.setCategoryEnum_enumText(EnumUtils.getInfoByValue(FinCategory.class,
|
prescriptionPatientInfoDto.setCategoryEnum_enumText(EnumUtils.getInfoByValue(FinCategory.class,
|
||||||
prescriptionPatientInfoDto.getCategoryEnum()));
|
prescriptionPatientInfoDto.getCategoryEnum()));
|
||||||
}
|
}
|
||||||
@@ -139,9 +149,9 @@ public class IWesternMedicineDispenseAppServiceImpl implements IWesternMedicineD
|
|||||||
selectPrescriptionMedicineInfoList(encounterId);
|
selectPrescriptionMedicineInfoList(encounterId);
|
||||||
// 计算合计金额
|
// 计算合计金额
|
||||||
if(!prescriptionMedicineInfoList.isEmpty()) {
|
if(!prescriptionMedicineInfoList.isEmpty()) {
|
||||||
BigDecimal totalPrice = new BigDecimal(0);
|
double totalPrice = 0d;
|
||||||
for (PrescriptionMedicineInfoDto item : prescriptionMedicineInfoList) {
|
for (PrescriptionMedicineInfoDto item : prescriptionMedicineInfoList) {
|
||||||
totalPrice.add(item.getTotalPrice());
|
totalPrice += item.getTotalPrice().doubleValue();
|
||||||
}
|
}
|
||||||
prescriptionPatientInfoDto.setTotalPrice(totalPrice);
|
prescriptionPatientInfoDto.setTotalPrice(totalPrice);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,10 +3,7 @@ package com.openhis.web.pharmacymanage.controller;
|
|||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
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.core.common.core.domain.R;
|
||||||
import com.openhis.web.pharmacymanage.appservice.IWesternMedicineDispenseAppService;
|
import com.openhis.web.pharmacymanage.appservice.IWesternMedicineDispenseAppService;
|
||||||
@@ -74,7 +71,7 @@ public class WesternMedicineDispenseController {
|
|||||||
*
|
*
|
||||||
* @param prescriptionNo 处方号
|
* @param prescriptionNo 处方号
|
||||||
*/
|
*/
|
||||||
@GetMapping("/medicine-dispense")
|
@PutMapping("/medicine-dispense")
|
||||||
public R<?> medicineDispense(@RequestParam(value = "prescriptionNo") String prescriptionNo) {
|
public R<?> medicineDispense(@RequestParam(value = "prescriptionNo") String prescriptionNo) {
|
||||||
return iWesternMedicineDispenseService.medicineDispense(prescriptionNo);
|
return iWesternMedicineDispenseService.medicineDispense(prescriptionNo);
|
||||||
}
|
}
|
||||||
@@ -85,9 +82,10 @@ public class WesternMedicineDispenseController {
|
|||||||
* @param prescriptionNo 处方号
|
* @param prescriptionNo 处方号
|
||||||
* @param notPerformedReasonEnum 未发药原因
|
* @param notPerformedReasonEnum 未发药原因
|
||||||
*/
|
*/
|
||||||
@GetMapping("/medicine-cancel")
|
@PutMapping("/medicine-cancel")
|
||||||
public R<?> medicineCancel(@RequestParam(value = "prescriptionNo") String prescriptionNo,
|
public R<?> medicineCancel(@RequestParam(value = "prescriptionNo") String prescriptionNo,
|
||||||
@RequestParam(value = "prescriptionNo") Integer notPerformedReasonEnum) {
|
@RequestParam(value = "notPerformedReasonEnum") Integer notPerformedReasonEnum) {
|
||||||
return iWesternMedicineDispenseService.medicineCancel(prescriptionNo, notPerformedReasonEnum);
|
//return iWesternMedicineDispenseService.medicineCancel(prescriptionNo, notPerformedReasonEnum);
|
||||||
|
return R.ok();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5,6 +5,8 @@ package com.openhis.web.pharmacymanage.dto;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@@ -26,6 +28,7 @@ public class PageInitDto {
|
|||||||
@Data
|
@Data
|
||||||
public static class DepartmentOption {
|
public static class DepartmentOption {
|
||||||
|
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long value;
|
private Long value;
|
||||||
private String label;
|
private String label;
|
||||||
|
|
||||||
|
|||||||
@@ -24,11 +24,14 @@ public class PrescriptionMedicineInfoDto implements Serializable {
|
|||||||
/** 科室 */
|
/** 科室 */
|
||||||
private String departmentName;
|
private String departmentName;
|
||||||
|
|
||||||
|
/** 开单医生 */
|
||||||
|
private String doctorName;
|
||||||
|
|
||||||
/** 项目类型 */
|
/** 项目类型 */
|
||||||
private String itemType;
|
private String itemType;
|
||||||
|
|
||||||
/** 开单医生 */
|
/** 诊断名称 */
|
||||||
private String doctorName;
|
private String conditionName;
|
||||||
|
|
||||||
/** 处方号 */
|
/** 处方号 */
|
||||||
private String prescriptionNo;
|
private String prescriptionNo;
|
||||||
|
|||||||
@@ -49,5 +49,5 @@ public class PrescriptionPatientInfoDto implements Serializable {
|
|||||||
private String encounterDate;
|
private String encounterDate;
|
||||||
|
|
||||||
/** 总金额 */
|
/** 总金额 */
|
||||||
private BigDecimal totalPrice;
|
private double totalPrice;
|
||||||
}
|
}
|
||||||
@@ -75,8 +75,10 @@
|
|||||||
<select id="selectPrescriptionMedicineInfoList" resultType="com.openhis.web.pharmacymanage.dto.PrescriptionMedicineInfoDto">
|
<select id="selectPrescriptionMedicineInfoList" resultType="com.openhis.web.pharmacymanage.dto.PrescriptionMedicineInfoDto">
|
||||||
SELECT
|
SELECT
|
||||||
DISTINCT
|
DISTINCT
|
||||||
T7.name AS department_name,
|
T8.name AS department_name,
|
||||||
T8.name AS doctor_name,
|
T9.name AS doctor_name,
|
||||||
|
'西药开药' AS item_type,
|
||||||
|
T7.name AS condition_name,
|
||||||
T2.prescription_no,
|
T2.prescription_no,
|
||||||
T4.name AS medicine_name,
|
T4.name AS medicine_name,
|
||||||
T3.total_volume,
|
T3.total_volume,
|
||||||
@@ -105,10 +107,13 @@
|
|||||||
ON T1.med_req_id = T5.service_id
|
ON T1.med_req_id = T5.service_id
|
||||||
INNER JOIN adm_encounter AS T6
|
INNER JOIN adm_encounter AS T6
|
||||||
ON T1.encounter_id = T6.id
|
ON T1.encounter_id = T6.id
|
||||||
LEFT OUTER JOIN adm_organization AS T7
|
INNER JOIN cli_condition_definition AS T7
|
||||||
ON T6.organization_id = T7.id
|
ON T2.condition_id = T7.id
|
||||||
LEFT OUTER JOIN adm_practitioner AS T8
|
LEFT OUTER JOIN adm_organization AS T8
|
||||||
ON T1.practitioner_id = T8.id
|
ON T6.organization_id = T8.id
|
||||||
|
LEFT OUTER JOIN adm_practitioner AS T9
|
||||||
|
ON T1.practitioner_id = T9.id
|
||||||
|
|
||||||
WHERE
|
WHERE
|
||||||
T1.encounter_id = #{encounterId}
|
T1.encounter_id = #{encounterId}
|
||||||
AND T1.status_enum = 2
|
AND T1.status_enum = 2
|
||||||
|
|||||||
Reference in New Issue
Block a user