Skip to content

Added DTOs and polling by date#129

Merged
jugglingdev merged 2 commits intoOpen-SGF:mainfrom
nomedis:participant_polling_with_dto_and_datefilter
Mar 11, 2026
Merged

Added DTOs and polling by date#129
jugglingdev merged 2 commits intoOpen-SGF:mainfrom
nomedis:participant_polling_with_dto_and_datefilter

Conversation

@nomedis
Copy link
Copy Markdown
Contributor

@nomedis nomedis commented Feb 23, 2026

Replaced the rather tedious mapping from Neon-json to associative array to standard object to associative array (via config.php) with some simple DTOs.

Also added functionality to only get participantIds that have been update on or after (>=) a specified date. The function checks the fields entered_date and updated_date (WHERE with OR) in the tables persons, persons_applications_children, persons_applications, persons_assessment_worksheet, persons_introductory_survey, and persons_service_plan.

The fields release to attorney/legistlator/employer/Governor's staff in the disclosure form still have issues. Neon has the checkbox values (whether or not the box is checked), but no obvious value for the text field for who the information should be disclosed to. We, on the other hand, seem to have both (Josh would have to confirm).

Also, we don't seem to have the survey delivery checkboxes at the end of the disclosure form. Haven't checked if Neon has those yet.

Lastly, Neon returns '403 Forbidden' at irregular intervals. Haven't figured out what triggers it. Could be late night/early morning issue due to maintenance.

Replaced the rather tedious mapping from Neon-json to associative array to standard object to associative array (via config.php) with some simple DTOs.

Also added functionality to only get participantIds that have been update on or after (>=) a specified date. The function checks the fields entered_date and updated_date (WHERE with OR) in the tables persons, persons_applications_children, persons_applications, persons_assessment_worksheet, persons_introductory_survey, and persons_service_plan.

The fields release to attorney/legistlator/employer/Governor's staff in the disclosure form still have issues. Neon has the checkbox values (whether or not the box is checked), but no obvious value for the text field for who the information should be disclosed to. We, on the other hand, seem to have both (Josh would have to confirm).

Also, we don't seem to have the survey delivery checkboxes at the end of the disclosure form. Haven't checked if Neon has those yet.

Lastly, Neon returns '403 Forbidden' at irregular intervals. Haven't figured out what triggers it. Could be late night/early morning issue due to maintenance.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Since DSS and FSD are checked by default, could we have our own fields for those that we default to true? Or are those fields not fillable in the PDF?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Those are not fillable as far as I can see.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Okay, cool. I see some that are marked pre-filled, so wanted to double check.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we rename this file and class to ContactInfoDTO or something similar? This is to clarify that the enrollment form includes the contact info, children info, disclosure, survey, assessment, and service plan.

Copy link
Copy Markdown
Contributor

@jugglingdev jugglingdev left a comment

Choose a reason for hiding this comment

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

Only requested change is for the Enrollment DTO to be updated to ContactInfoDTO since the Enrollment form is really the umbrella terms that includes all pages of the form. Thank you!

@nomedis
Copy link
Copy Markdown
Contributor Author

nomedis commented Feb 24, 2026

That's no problem. But are you sure? The EnrollmentDTO currently includes the contact form and the rest of the DTOs. So, it is closer to the umbrella than the single contact info form.

- Added ShouldBeEncrypted-interface to GenerateParticipantJob and removed the calls to the Neon APIs, the job now receives the data through the queue
- Split EnrollmentDTO into ContactInfoDTO and a container class for the DTOs called ParticipantUpdateData. The container holds the DTOs and does the flattening for the pdf generation. It also has a fullName-function for generating the full name for the email body
- Added interface PdfArrayable to the DTOs
- Switched to camel case in the DTOs
- The ParticipantUpdateData-container is now passed to the job at dispatch in PollNeonParticipants, so there is one less call to Neon APIs
- The NeonDTOTransformer is now a static class with static functions
- Added type to the generate-function in PdfIntakeFormService
- Added some logging to the getTodaysParticipantIds-function in NeonApiService
- Updated intak-form.blade to use the fullName-function in ParticipantUpdatedData
@nomedis
Copy link
Copy Markdown
Contributor Author

nomedis commented Mar 8, 2026

@jugglingdev I've added encryption and cleaned up the DTOs and a few other things - see commit above for details.

Copy link
Copy Markdown
Contributor

@jugglingdev jugglingdev 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 updating the PdfFillFields, too!

@jugglingdev jugglingdev merged commit 84f20fd into Open-SGF:main Mar 11, 2026
3 checks passed
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.

2 participants