Skip to content
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

[CNFT1-3408] basic add patient api integration #1970

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

adamloup-enquizit
Copy link
Collaborator

@adamloup-enquizit adamloup-enquizit commented Oct 25, 2024

Description

Adds the useAddBasicPatient hook to allow adding a patient with the patient create API using a BasicNewPatientEntry. The API interaction was extracted from useAddExtendedPatientinto useAddPatient so that it could be used by both useAddBasicPatient and useAddExtendedPatient. The extra validation for pending input remains in useAddExtendedPatient.

  • a transformer function was introduced to map a BasicNewPatientEntry to a NewPatient to send as a request to the patient create API
  • The creator function was moved up to the add folder to be used by both basic and extended

Tickets

Checklist before requesting a review

  • PR focuses on a single story
  • Code has been fully tested to meet acceptance criteria
  • PR is reasonably small and reviewable (Generally less than 10 files and 500 changed lines)
  • All new functions/classes/components reasonably small
  • Functions/classes/components focused on one responsibility
  • Code easy to understand and modify (clarity over concise/clever)
  • PRs containing TypeScript follow the Do's and Don'ts
  • PR does not contain hardcoded values (Uses constants)
  • All code is covered by unit or feature tests

@adamloup-enquizit adamloup-enquizit force-pushed the CNFT1-3408-basic-add-patient-api-integration branch from 54f9530 to 79c4052 Compare October 25, 2024 20:48
@adamloup-enquizit adamloup-enquizit marked this pull request as ready for review October 25, 2024 20:58
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.

1 participant