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

add notes and gender to patient bulk upload #6778

Merged
merged 13 commits into from
Oct 26, 2023

Conversation

fzhao99
Copy link
Contributor

@fzhao99 fzhao99 commented Oct 20, 2023

BACKEND PULL REQUEST

Related Issue

  • resolves Add notes and gender to patient bulk upload #6649 by adding gender identity and an address notes column to the patient bulk upload. This will align our individual update with the bulk upload
  • Corresponding static site update here
    • Will hold off on merging this until that PR gets ok'ed (pending a review from Laura)

Changes Proposed

  • Adds the new fields to the PatientUploadRow creation and validation process
  • Refactors the Person model slightly to work better with the two fields

Testing

  • deployed on dev2

Happy Path

Example csv below. Note the

  • Alternate casing for gender identity
  • >500 char string for address notes
    • We have a 500 char cap for address, but guessing this is a smarty limitation since first / last name don't have limitations on char length
    • Happy to cap this at a certain value though in case we want a certain limitation!
last_name,first_name,middle_name,suffix,race,date_of_birth,biological_sex,ethnicity,street,street_2,city,county,state,zip_code,phone_number,phone_number_type,employed_in_healthcare,resident_congregate_setting,role,email,gender_identity,address_notes
Kuphal,Lucienne,Horton,,black or african american,3/12/86,female,hispanic or latino,5945 Rath Manors,,West Murielstead,,AK,99501,410-675-4559,Mobile,No,No,Staff,[email protected],transman,
Lebsack,Devyn,Kyle ,,asian,11/5/69,male,hispanic or latino,263 Windler Canyon,,Marquardtburgh,,AK,99501,410-646-4949,Mobile,No,No,Staff,[email protected],nonbinary,Test note
West,Theodora,Stacy,,asku,3/4/66,female,not hispanic or latino,40405 Lionel Lakes,,New Savannah,,AK,99501,410-754-2890,Landline,No,No,Staff,[email protected],,
MacGyver,Retta,Moreno,,asian,10/7/57,male,hispanic or latino,089 Dayton Rue,,Vacaville,,AK,99501,410-483-5354,Mobile,No,No,Staff,[email protected],Female,
Durgan,Cristobal,,,other,1/20/87,female,hispanic or latino,60556 Jacobs Lights,,Plantation,,AK,99501,410-115-7652,Landline,No,No,Staff,[email protected],,
Gutmann,Garth,Mendez,,asku,10/12/66,male,not hispanic or latino,90074 Timothy Club,,Fort Daisyport,,AK,99501,410-895-2894,Mobile,No,No,Staff,[email protected],,
Hettinger,Albert,,,other,6/13/85,female,hispanic or latino,333 Schinner Highway,,West Zora,,AK,99501,410-392-4738,Mobile,No,No,Staff,[email protected],,"Test note with long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long string longer than 500 char
"
Morissette,Madilyn,Ethel ,,native hawaiian or other pacific islander,2/28/03,male,hispanic or latino,17602 Armand Lock,,Madisenborough,,AK,99501,410-745-5120,Mobile,No,No,Staff,[email protected],Male,Test note again with @ a special ^ char
McDermott,Jovan,Norton,,black or african american,5/18/62,female,not hispanic or latino,214 Lilla Village,,Gislasonland,,AK,99501,410-759-7317,Mobile,No,No,Staff,[email protected],,
Sporer,Rahsaan,,,asku,6/12/40,male,hispanic or latino,838 Waelchi Extensions,,Palm Bay,,AK,99501,410-881-4268,Landline,No,No,Staff,[email protected],,
Screen.Recording.2023-10-23.at.11.27.48.AM.mov

Bad string value for gender identity

Screenshot 2023-10-23 at 11 35 22 AM

Upload without extra columns still works

Screen.Recording.2023-10-23.at.11.51.37.AM.mov

@@ -163,6 +164,56 @@
this.notes = notes;
}

@Builder

Check notice

Code scanning / CodeQL

Use of default toString()

Default toString(): StreetAddress inherits toString() from Object, and so is not suitable for printing. Default toString(): Facility inherits toString() from Object, and so is not suitable for printing. Default toString(): Organization inherits toString() from Object, and so is not suitable for printing.
@fzhao99 fzhao99 force-pushed the bob/6649-add-notes-and-gender-to-patient-bulk-upload branch from 7f3176c to 38a4807 Compare October 20, 2023 17:36
null, // preferredLanguage
null // testResultDeliveryPreference
);
Person.builder()
Copy link
Contributor Author

@fzhao99 fzhao99 Oct 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was super annoying to deal with the multi-param constructor off the person object so I added a new one with the Builder annotation to make it more manageable. Do recognize that we're adding an entirely new constructor to enable this though, so if folks have a better way to work with this large object lmk.

@fzhao99 fzhao99 changed the title Bob/6649 add notes and gender to patient bulk upload add notes and gender to patient bulk upload Oct 20, 2023
@fzhao99 fzhao99 temporarily deployed to dev2 October 23, 2023 15:08 — with GitHub Actions Inactive
@fzhao99 fzhao99 temporarily deployed to dev2 October 23, 2023 15:16 — with GitHub Actions Inactive
@fzhao99 fzhao99 marked this pull request as ready for review October 23, 2023 15:32
@fzhao99 fzhao99 marked this pull request as draft October 23, 2023 15:32
.middleName(extractedData.getMiddleName().getValue())
.lastName(extractedData.getLastName().getValue())
.suffix(extractedData.getSuffix().getValue())
.notes(extractedData.getNotes().getValue())
Copy link
Contributor Author

@fzhao99 fzhao99 Oct 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now since we're not doing any string interpolation this column can either get filled with null (if the columns aren't specified) or the empty string (if the column is specified but there isn't any value for that row.) I left it this way since we're doing the same thing in other places.

lmk if anyone prefers null or "" explicitly though I can go back and clean it up here / in other settings

@fzhao99 fzhao99 marked this pull request as ready for review October 23, 2023 16:05
parseYesNoUnk(extractedData.getResidentCongregateSetting().getValue()),
parseYesNoUnk(extractedData.getEmployedInHealthcare().getValue()),
null, // preferredLanguage
null // testResultDeliveryPreference
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed these explicit nulls by not specifying them in the builder, but lmk if we want to add them back in.

@fzhao99 fzhao99 temporarily deployed to dev2 October 23, 2023 16:32 — with GitHub Actions Inactive
@fzhao99 fzhao99 temporarily deployed to dev2 October 23, 2023 16:40 — with GitHub Actions Inactive
@fzhao99 fzhao99 requested a review from emyl3 October 23, 2023 18:57
@fzhao99 fzhao99 removed the request for review from johanna-skylight October 23, 2023 19:51
@fzhao99 fzhao99 marked this pull request as draft October 23, 2023 19:52
@fzhao99 fzhao99 marked this pull request as ready for review October 23, 2023 20:49
@fzhao99 fzhao99 temporarily deployed to dev2 October 23, 2023 20:56 — with GitHub Actions Inactive
@fzhao99 fzhao99 temporarily deployed to dev2 October 23, 2023 21:12 — with GitHub Actions Inactive
@fzhao99 fzhao99 temporarily deployed to dev2 October 23, 2023 21:12 — with GitHub Actions Inactive
@fzhao99 fzhao99 temporarily deployed to dev2 October 23, 2023 21:30 — with GitHub Actions Inactive
@fzhao99 fzhao99 temporarily deployed to dev2 October 23, 2023 21:41 — with GitHub Actions Inactive
@fzhao99 fzhao99 force-pushed the bob/6649-add-notes-and-gender-to-patient-bulk-upload branch from fb369e0 to 7c2feb5 Compare October 25, 2023 17:16
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

95.2% 95.2% Coverage
0.0% 0.0% Duplication

@fzhao99 fzhao99 requested a review from emyl3 October 25, 2023 17:48
Copy link
Contributor

@BobanL BobanL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! 👍

Copy link
Collaborator

@emyl3 emyl3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your work on this!

@fzhao99 fzhao99 added this pull request to the merge queue Oct 26, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 26, 2023
@fzhao99 fzhao99 added this pull request to the merge queue Oct 26, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 26, 2023
@fzhao99 fzhao99 added this pull request to the merge queue Oct 26, 2023
Merged via the queue into main with commit 086a418 Oct 26, 2023
@fzhao99 fzhao99 deleted the bob/6649-add-notes-and-gender-to-patient-bulk-upload branch October 26, 2023 15:30
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.

Add notes and gender to patient bulk upload
3 participants