fix(emr): 修复病程记录权限配置

- 为ProgressNoteController的所有接口添加emr:list/emr:edit权限
- 医生账号现在可以访问病程记录功能
This commit is contained in:
2026-06-21 14:00:12 +08:00
parent f0a71700e4
commit ac7c611261

View File

@@ -52,7 +52,7 @@ public class ProgressNoteController {
* 分页查询病程记录列表
*/
@GetMapping("/page")
@PreAuthorize("hasAuthority('document:progressnote:list')")
@PreAuthorize("hasAuthority('document:progressnote:list') or hasAuthority('emr:list')")
public R<?> getPage(
@RequestParam(value = "patientName", required = false) String patientName,
@RequestParam(value = "noteType", required = false) Integer noteType,
@@ -75,7 +75,7 @@ public class ProgressNoteController {
* 查询病程记录详情
*/
@GetMapping("/detail")
@PreAuthorize("hasAuthority('document:progressnote:list')")
@PreAuthorize("hasAuthority('document:progressnote:list') or hasAuthority('emr:list')")
public R<?> getDetail(@RequestParam Long id) {
ProgressNote note = progressNoteService.getById(id);
if (note == null) return R.fail("病程记录不存在");
@@ -86,7 +86,7 @@ public class ProgressNoteController {
* 新增病程记录
*/
@PostMapping("/add")
@PreAuthorize("hasAuthority('document:progressnote:add')")
@PreAuthorize("hasAuthority('document:progressnote:add') or hasAuthority('emr:edit')")
@Transactional(rollbackFor = Exception.class)
public R<?> add(@RequestBody ProgressNote note) {
note.setSignStatus(0);
@@ -108,7 +108,7 @@ public class ProgressNoteController {
* 修改病程记录(仅未签名可修改)
*/
@PutMapping("/update")
@PreAuthorize("hasAuthority('document:progressnote:edit')")
@PreAuthorize("hasAuthority('document:progressnote:edit') or hasAuthority('emr:edit')")
@Transactional(rollbackFor = Exception.class)
public R<?> update(@RequestBody ProgressNote note) {
ProgressNote existing = progressNoteService.getById(note.getId());
@@ -124,7 +124,7 @@ public class ProgressNoteController {
* 删除病程记录(仅未签名可删除)
*/
@DeleteMapping("/delete")
@PreAuthorize("hasAuthority('document:progressnote:remove')")
@PreAuthorize("hasAuthority('document:progressnote:remove') or hasAuthority('emr:edit')")
@Transactional(rollbackFor = Exception.class)
public R<?> delete(@RequestParam Long id) {
ProgressNote note = progressNoteService.getById(id);
@@ -138,7 +138,7 @@ public class ProgressNoteController {
* 签名病程记录
*/
@PostMapping("/sign")
@PreAuthorize("hasAuthority('document:progressnote:edit')")
@PreAuthorize("hasAuthority('document:progressnote:edit') or hasAuthority('emr:edit')")
@Transactional(rollbackFor = Exception.class)
public R<?> sign(@RequestBody Map<String, Object> params) {
Long id = Long.valueOf(params.get("id").toString());
@@ -158,7 +158,7 @@ public class ProgressNoteController {
* 审核病程记录(上级医师)
*/
@PostMapping("/review")
@PreAuthorize("hasAuthority('document:progressnote:edit')")
@PreAuthorize("hasAuthority('document:progressnote:edit') or hasAuthority('emr:edit')")
@Transactional(rollbackFor = Exception.class)
public R<?> review(@RequestBody Map<String, Object> params) {
Long id = Long.valueOf(params.get("id").toString());
@@ -177,7 +177,7 @@ public class ProgressNoteController {
* 获取时限监控面板
*/
@GetMapping("/monitor")
@PreAuthorize("hasAuthority('document:progressnote:list')")
@PreAuthorize("hasAuthority('document:progressnote:list') or hasAuthority('emr:list')")
public R<?> getMonitor(@RequestParam(required = false) Long encounterId) {
Map<String, Object> result = new HashMap<>();
Date now = new Date();
@@ -225,7 +225,7 @@ public class ProgressNoteController {
* 获取提醒列表
*/
@GetMapping("/reminders")
@PreAuthorize("hasAuthority('document:progressnote:list')")
@PreAuthorize("hasAuthority('document:progressnote:list') or hasAuthority('emr:list')")
public R<?> getReminders(
@RequestParam(value = "status", required = false) Integer status,
@RequestParam(value = "encounterId", required = false) Long encounterId) {
@@ -240,7 +240,7 @@ public class ProgressNoteController {
* 获取病程记录统计
*/
@GetMapping("/stats")
@PreAuthorize("hasAuthority('document:progressnote:list')")
@PreAuthorize("hasAuthority('document:progressnote:list') or hasAuthority('emr:list')")
public R<?> getStats(@RequestParam Long encounterId) {
Map<String, Object> stats = new HashMap<>();
LambdaQueryWrapper<ProgressNote> wrapper = new LambdaQueryWrapper<>();