Skip to content

[Feat] 약물노트 복용중/복용완료 상태 필터링 기능 - #66

Merged
kangcheolung merged 3 commits into
developfrom
feature/65
Jul 10, 2026
Merged

[Feat] 약물노트 복용중/복용완료 상태 필터링 기능#66
kangcheolung merged 3 commits into
developfrom
feature/65

Conversation

@kangcheolung

@kangcheolung kangcheolung commented Jul 10, 2026

Copy link
Copy Markdown
Member

🔍️작업 내용

✨ 상세 설명

약물노트 목록/검색 API에 isActive 필터 파라미터 추가

  • GET /api/medications/notes, GET /api/medications/notes/searchisActive 쿼리 파라미터 추가
  • isActive=true → 복용중인 약만 반환
  • isActive=false → 복용 완료된 약만 반환
  • 미전달 → 기존과 동일하게 전체(활성+비활성) 반환
  • 그룹화(toNoteGroupResponses) 로직은 변경 없이 재사용

🛠️추후 리팩토링 및 고도화 계획

  • 없음

📸 스크린샷 (선택)

💬 리뷰 요구사항

  • isActive=true/false/미전달 방식이 프론트 연동에 충분한지 확인 부탁

Summary by CodeRabbit

  • 새 기능
    • 약물노트 목록 조회 시 복용 상태(복용 중/복용 완료)로 필터링할 수 있습니다.
    • 약물노트 검색에서도 복용 상태 필터를 선택적으로 적용할 수 있습니다.
    • 상태를 지정하지 않으면 기존처럼 모든 약물노트를 조회합니다.

kangcheolung and others added 3 commits July 10, 2026 20:16
null이면 전체, true/false면 해당 상태만 조회

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…터 추가

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
isActive=true(복용중) / isActive=false(복용완료) / 미전달(전체)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: b11d944b-4033-4e36-9cc8-1d78d0feb73c

📥 Commits

Reviewing files that changed from the base of the PR and between b16b308 and 1df3b00.

📒 Files selected for processing (3)
  • src/main/java/com/piuda/callcare/domain/medication/controller/MedicationController.java
  • src/main/java/com/piuda/callcare/domain/medication/repository/MedicationRepository.java
  • src/main/java/com/piuda/callcare/domain/medication/service/query/MedicationQueryService.java

📝 Walkthrough

Walkthrough

약물노트 목록 조회와 검색 API가 선택적 isActive 필터를 지원하도록 변경되었습니다. 컨트롤러와 서비스가 필터를 저장소로 전달하며, 저장소 쿼리는 미전달 시 전체를 조회하고 전달 시 활성 상태를 적용합니다.

Changes

약물노트 상태 필터링

Layer / File(s) Summary
API와 서비스 필터 전달
src/main/java/com/piuda/callcare/domain/medication/controller/MedicationController.java, src/main/java/com/piuda/callcare/domain/medication/service/query/MedicationQueryService.java
목록 및 검색 엔드포인트와 서비스 메서드에 nullable Boolean isActive가 추가되고 저장소 호출로 전달됩니다.
저장소 상태 조건 적용
src/main/java/com/piuda/callcare/domain/medication/repository/MedicationRepository.java
목록 조회와 키워드 검색 쿼리에 isActive 선택 조건이 추가되었습니다. 미전달 시 전체 상태를 조회합니다.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Client
  participant MedicationController
  participant MedicationQueryService
  participant MedicationRepository
  Client->>MedicationController: isActive 포함 약물노트 요청
  MedicationController->>MedicationQueryService: isActive 전달
  MedicationQueryService->>MedicationRepository: 상태 조건 포함 조회
  MedicationRepository-->>MedicationQueryService: 약물노트 목록 반환
  MedicationQueryService-->>MedicationController: 그룹화된 응답 반환
  MedicationController-->>Client: 약물노트 응답
Loading

Possibly related PRs

  • PIUDAProject/Backend#60: 약물노트 목록 및 검색의 기존 컨트롤러→서비스→저장소 흐름과 직접 연결됩니다.

Suggested labels: 🐞 Fix, ✨ Feature

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목이 약물노트의 복용중/복용완료 상태 필터링 추가라는 핵심 변경을 정확히 요약합니다.
Linked Issues check ✅ Passed 컨트롤러·서비스·리포지토리에 nullable isActive 파라미터가 추가되고 Swagger도 갱신되어, 이슈 요구사항과 일치합니다.
Out of Scope Changes check ✅ Passed 요구사항 밖의 필드 추가나 별도 기능 확장은 보이지 않으며, 상태 필터링 범위 안에서만 변경됐습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/65

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@kangcheolung
kangcheolung merged commit 328b8d5 into develop Jul 10, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feat] 약물노트 복용중/복용완료 상태 필터링 기능

1 participant