Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…nt from an unused QR code (#109) * Basic patient registration form structure * Able to query db for medical data inputs * Add ability to add multiple allergies, conditions, etc to be sent to server * Remove eslint error for importing React * Add propTypes and JSDOC comments * Add propTypes declaration at bottom of file * Fix linter warnings * Replace New Patient icon * Rename accordion sections to better match Figma * Use mantine form for form validation for almost all sections * Hide selected conditions from showing up in medical data search * Properly conditionally render empty and all options selected display * Move selected options to be shown below the input field * Switch to TextInput to properly display Loader * Properly modify form data by using useForm API" * Able to successfully send form data to server and database * Resolve bugs due to dead code restructuring * Utilize notifications from Mantine to notify which accordion sections have errors * Display an error message when receiving an error from server * Simplify form validation logic * Simplify conditional logic and close dropdown after selecting option * Add some basic error handling for searching medical data * Merge branch 'dev' into issue-97 * Add error handling for duplicate id situation * Update route to enable patientId to be extracted for patient registation * Partially working form submission when changing sections * Update expected request structure to reflect structure of client side form * Update tests for new changes * Form submission when changing sections working * Format files * Prevent opening accordion from triggering server requests if previously collapsed * Remove additional patient registration request * Refactor to reduce nesting of conditional logic * Redirect user after submitting form to dashboard * Adjust CSS of register form * Tweak CSS styling * Refactor accordion into own component * Restyle accordion CSS * Refactor error message function * Rename patient registration component * Basic stories set up * Format file * Replace loader component with loader in button * Update routes to handle invalid patient IDs * Add new error messages for patient ID issues * Add validation and error handling for bad request format for uuid fields * Update link for new patient to send to root * Launch Prisma Studio with everything else * Allow Select inputs to be searchable when typing * Properly conditionally show a single toast when completing Basic Information * Add Hospitals list to seeds * Resolve console warning when handling null openedSection * Allow user to go back to previous sections without triggering a validation error * Add physician seed values * Add endpoint to list hospitals * Add a route to query for a physician of a specific hospital * Update conditional for error/success notifications * Basic functioning hospital search * Basic working physician search * Allow clicking on input to open options dropdown again * Replace placeholder healthcare choices input fields with searchable ones * Format and lint files * Refactor to move combobox into its own component * Disable PCP input field when hospital is not selected yet * Write tests for listing all hospitals route * Create a route that queries for all physicians in the database * Update tests * Update form to query db for all physicians * Install Mantine dates for datepicker component * Utilize Mantine DateInput to have better UX for entering DOB * Install react imask for input masking with Mantine * Utilize masking to make entering phone numbers easier * Utilize InputBase component to properly display validation error of phone number * Fix linting and regex errors * Prevent form from submitting when pressing enter * Allow contact phone to be empty when submitting form * Trim user inputted strings and convert empty strings into null for db * Add a patient GET /:id route and update tests * Initilize form with existing values from backend * Ignore eslint warning about adding form to dependency array * Add explanation for disabling eslint warning for useeffect * Properly initialize medical information data section of form * Add a safeguard for accessing the registration form when not logged in initially * Simplify middleName processing with optional chaining * Update medical information to display inital values without affecting what will be sent to server * Move healthcare choice api calls to its own file * Make physician and hospital input fields into reusable components * Properly load healthcare choices for preexisting patient * Include email field for contact data * Update schema for field changes * Simplify passing in data to the database * Update tests due to schema changes * Modify update route so existing contact information is updated rather than creating a new contact everytime * Allow for nullable healthcare choices * Update form initialization to handle empty edge cases * Properly disconnect patient and hospital and physician tables if necessary * Resolve bug with changing healthcare choices from intial values * Properly allow querying for a physician first, last and full name * Update tests to handle edge cases regarding empty strings and undefined * Add edge case of removing hospital and physician from a patient record * Resolve issue of causing an input to go from defined to undefined * Reduce redundancy of conditional register or update patient Since the component now checks first if a patient already exists, that takes care of the conditional check for register or update * Prevent form data loss from refetching and add guard statement for physician * Format files * Refactor form submission logic for registering and updating * Resolve bug that removed all form values when transforming data * Resolved submitPatient bugs * Refactor api calls to a separate file * Refactor to move medical data api calls to separate file * Keep track of the section opened so refreshing page reopens it * Refactor and organize registration form components * Update import routing * Reduce restrictions on which fields are required beyond basic info * Add a Modal to inform user of unvisited sections before continuing * Prevent creating a new contact if all fields are not filled out * Refactor Search related components to be more DRY * Clean up files * When opening the registration form properly mark opened section as visited * Properly handle throwing a duplicate patient error * Properly extract the relevant fields from preexisting contact data * Disconnect existing contact if all fields are empty * Format files * Resolve CSS bug that misaligned items on smaller screens * Remove console log * Wrap search functions in useDebounced To reduce the number of API calls, api calls for a search query are debounced * Adjust styling of pills and conditional logic of combobox options * Remove unnecessary horizontal scroll bar and add gap between bottom of page * Update GET patient/:id to also allow first responders --------- Co-authored-by: Francis Li <mail@francisli.com>
- Loading branch information