Repository navigation
[Feat] 약물노트 조회/검색/수정/삭제 기능 구현 #60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
639c9fa
feat: Medication 엔티티에 update 메서드 추가
kangcheolung 07ce022
feat: 약물노트 조회/검색/수정용 DTO 추가
kangcheolung cbc0611
feat: MedicationConverter에 toNoteItemResponse 추가
kangcheolung 49f17f1
feat: 약물노트 목록/검색 쿼리 및 스케줄 삭제 메서드 추가
kangcheolung e118f29
feat: MedicationCommandService에 약 수정/삭제 기능 추가
kangcheolung 546d744
feat: MedicationQueryService에 약물노트 목록/검색 기능 추가
kangcheolung 394158e
feat: MedicationController에 약물노트 목록/검색/수정/삭제 엔드포인트 추가
kangcheolung 0abff88
fix: 코드 리뷰 지적 사항 반영
kangcheolung File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
src/main/java/com/piuda/callcare/domain/medication/dto/request/MedicationUpdateRequest.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| package com.piuda.callcare.domain.medication.dto.request; | ||
|
|
||
| import io.swagger.v3.oas.annotations.media.Schema; | ||
| import jakarta.validation.constraints.Min; | ||
|
|
||
| import java.time.LocalDate; | ||
|
|
||
| @Schema(description = "약 수정 요청 — null 필드는 변경하지 않음") | ||
| public record MedicationUpdateRequest( | ||
|
|
||
| @Schema(description = "약 이름 (null이면 변경 안 함)") | ||
| String drugName, | ||
|
|
||
| @Schema(description = "1회 복용량 (null이면 변경 안 함)") | ||
| String dosagePerTime, | ||
|
|
||
| @Schema(description = "1일 복용 횟수 (null이면 변경 안 함, 변경 시 스케줄 재생성)") | ||
| @Min(1) Integer timesPerDay, | ||
|
|
||
| @Schema(description = "총 복용 일수 (null이면 변경 안 함)") | ||
| @Min(1) Integer totalDays, | ||
|
|
||
| @Schema(description = "복용 시작일 (null이면 변경 안 함)") | ||
| LocalDate startDate, | ||
|
|
||
| @Schema(description = "병원명 (null이면 변경 안 함)") | ||
| String hospitalName, | ||
|
|
||
| @Schema(description = "메모 (null이면 변경 안 함)") | ||
| String memo | ||
| ) {} |
19 changes: 19 additions & 0 deletions
19
...n/java/com/piuda/callcare/domain/medication/dto/response/MedicationNoteGroupResponse.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| package com.piuda.callcare.domain.medication.dto.response; | ||
|
|
||
| import io.swagger.v3.oas.annotations.media.Schema; | ||
|
|
||
| import java.time.LocalDate; | ||
| import java.util.List; | ||
|
|
||
| @Schema(description = "약물노트 그룹 카드 — 복용 시작일 + 병원 기준 묶음") | ||
| public record MedicationNoteGroupResponse( | ||
|
|
||
| @Schema(description = "복용 시작일 (그룹 키)") | ||
| LocalDate startDate, | ||
|
|
||
| @Schema(description = "병원명 (없으면 null)") | ||
| String hospitalName, | ||
|
|
||
| @Schema(description = "그룹 내 약 리스트") | ||
| List<MedicationNoteItemResponse> medications | ||
| ) {} |
39 changes: 39 additions & 0 deletions
39
...in/java/com/piuda/callcare/domain/medication/dto/response/MedicationNoteItemResponse.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| package com.piuda.callcare.domain.medication.dto.response; | ||
|
|
||
| import io.swagger.v3.oas.annotations.media.Schema; | ||
|
|
||
| import java.time.LocalDate; | ||
|
|
||
| @Schema(description = "약물노트 그룹 카드 내 약 단건") | ||
| public record MedicationNoteItemResponse( | ||
|
|
||
| @Schema(description = "약 ID") | ||
| Long medicationId, | ||
|
|
||
| @Schema(description = "약 이름") | ||
| String drugName, | ||
|
|
||
| @Schema(description = "약 종류 (없으면 null)") | ||
| String drugType, | ||
|
|
||
| @Schema(description = "약 이미지 URL (없으면 null)") | ||
| String imageUrl, | ||
|
|
||
| @Schema(description = "1일 복용 횟수") | ||
| Integer timesPerDay, | ||
|
|
||
| @Schema(description = "1회 복용량 (예: 1정, 5ml)") | ||
| String dosagePerTime, | ||
|
|
||
| @Schema(description = "복용 시작일") | ||
| LocalDate startDate, | ||
|
|
||
| @Schema(description = "복용 종료일 (없으면 null)") | ||
| LocalDate endDate, | ||
|
|
||
| @Schema(description = "총 복용 일수 (없으면 null)") | ||
| Integer totalDays, | ||
|
|
||
| @Schema(description = "복용 중 여부 — false면 종료된 약, 프론트에서 재등록 버튼 노출에 사용") | ||
| Boolean isActive | ||
| ) {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.