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