Skip to content

[Feat] 메모장 자동 생성 및 약 상세 정보 조회 API 구현 #52

Description

@kangcheolung

📌 Description

약 등록 시 메모 자동 생성 및 약 상세 정보 조회 API를 구현한다.

메모장 자동 생성

  • 직접 등록 플로우에서 프론트가 getAutofill로 받은 memo를 등록 요청에 포함할 수 있도록
    MedicationCreateRequest에 memo 필드를 추가한다.
  • MedicationCommandService.doRegister에서 request.memo()를 Medication 엔티티에 저장한다.

약 상세 정보 조회

  • 약 카드 클릭 시 해당 Medication과 연결된 DrugInfo의 주의사항 / 부작용 / 용법·용량 / 효능·효과를
    반환하는 API를 구현한다.
  • DrugInfo가 없거나 각 항목 데이터가 null인 경우 해당 필드는 null로 반환한다. (프론트에서 버튼 비활성화
    처리)

✅ To-do

3-5 메모장 자동 생성

  • MedicationCreateRequest에 memo 필드 추가
  • MedicationCommandService.doRegister에 memo 저장 로직 추가

3-6 약 상세 정보 조회

  • MedicationDetailResponse DTO 생성
  • MedicationConverter.toDetailResponse 구현
  • MedicationQueryService.getDetail 구현
  • GET /api/medications/{medicationId}/detail 엔드포인트 추가

📒 기타

  • DrugInfo가 연결되지 않은 Medication(OCR 등록 또는 직접 텍스트 입력)은 상세 정보 전체가 null로 반환된다.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions