Added DTOs and polling by date#129
Conversation
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Those are not fillable as far as I can see.
There was a problem hiding this comment.
Okay, cool. I see some that are marked pre-filled, so wanted to double check.
app/DTOs/EnrollmentFormDTO.php
Outdated
There was a problem hiding this comment.
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.
jugglingdev
left a comment
There was a problem hiding this comment.
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!
|
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
|
@jugglingdev I've added encryption and cleaned up the DTOs and a few other things - see commit above for details. |
jugglingdev
left a comment
There was a problem hiding this comment.
Thank you for updating the PdfFillFields, too!
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.