-
Notifications
You must be signed in to change notification settings - Fork 18
Added DTOs and polling by date #129
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
Merged
jugglingdev
merged 2 commits into
Open-SGF:main
from
nomedis:participant_polling_with_dto_and_datefilter
Mar 11, 2026
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| <?php | ||
|
|
||
| namespace App\DTOs; | ||
|
|
||
| readonly class AssessmentDTO implements PdfArrayable | ||
| { | ||
| public function __construct( | ||
| public readonly string $fullName, | ||
| public readonly string $dob, | ||
| public readonly string $eligibilityMissouriResident, | ||
| public readonly string $eligibilityChildUnder18, | ||
| public readonly string $financialEligibility, | ||
| public readonly string $financialDriversLicence, | ||
| public readonly string $financialUtilityBill, | ||
| public readonly string $financialWrittenEmployerStatement, | ||
| public readonly string $financialSsBenefitsStatement, | ||
| public readonly string $financialNoEmploymentIncome, | ||
| public readonly string $financialUnemploymentCompensation, | ||
| public readonly string $financialOther, | ||
| public readonly ?string $financialOtherDescription, | ||
| public readonly string $povertyMonthlyIncome, | ||
| public readonly string $povertyHouseholdMembers, | ||
| public readonly string $povertyPercentageFpl, | ||
| ) {} | ||
|
|
||
| public function toPdfArray(): array { | ||
| return [ | ||
| 'participant_full_name' => $this->fullName, | ||
| 'participant_dob' => $this->dob, | ||
| 'eligibility_missouri_resident' => $this->eligibilityMissouriResident, | ||
| 'eligibility_child_under_18' => $this->eligibilityChildUnder18, | ||
| 'financial_assessment_eligibility' => $this->financialEligibility, | ||
| 'financial_assessment_drivers_licence' => $this->financialDriversLicence, | ||
| 'financial_assessment_utility_bill' => $this->financialUtilityBill, | ||
| 'financial_assessment_written_employer_statement' => $this->financialWrittenEmployerStatement, | ||
| 'financial_assessment_ss_benefits_statement' => $this->financialSsBenefitsStatement, | ||
| 'financial_assessment_no_employment_income' => $this->financialNoEmploymentIncome, | ||
| 'financial_assessment_unemployment_compensation' => $this->financialUnemploymentCompensation, | ||
| 'financial_assessment_other' => $this->financialOther, | ||
| 'financial_assessment_other_description' => $this->financialOtherDescription, | ||
| 'poverty_level_monthly_income' => $this->povertyMonthlyIncome, | ||
| 'poverty_level_number_of_household_members' => $this->povertyHouseholdMembers, | ||
| 'poverty_level_percentage_fpl' => $this->povertyPercentageFpl | ||
| ]; | ||
| } | ||
| } | ||
| ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| <?php | ||
|
|
||
| namespace App\DTOs; | ||
|
|
||
| class ChildDTO | ||
| { | ||
| public function __construct( | ||
| public readonly string $name, | ||
| public readonly string $age, | ||
| public readonly string $dob, | ||
| ) {} | ||
| } | ||
| ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| <?php | ||
|
|
||
| namespace App\DTOs; | ||
|
|
||
| readonly class ContactInfoDTO implements PdfArrayable | ||
| { | ||
| public function __construct( | ||
| public readonly string $titleRegion, | ||
| public readonly string $fullName, | ||
| public readonly string $enteredDate, | ||
| public readonly string $address, | ||
| public readonly string $employer, | ||
| public readonly string $tshirtSize, | ||
| public readonly string $phone, | ||
| public readonly string $workPhone, | ||
| public readonly string $otherPhone, | ||
| public readonly string $email, | ||
| public readonly string $caseworkerName, | ||
| public readonly string $caseworkerPhone, | ||
| public readonly string $monthlyChildSupport, | ||
| public readonly string $maritalStatus, | ||
| public readonly string $ethnicity, | ||
| public readonly string $contactWithChildren, | ||
| public readonly string $childrenCustody, | ||
| public readonly string $childrenVisitation, | ||
| public readonly string $childrenPhone, | ||
| ) {} | ||
|
|
||
| public function toPdfArray(): array | ||
| { | ||
| return [ | ||
| 'title_region' => $this->titleRegion, | ||
| 'full_name' => $this->fullName, | ||
| 'entered_date' => $this->enteredDate, | ||
| 'address' => $this->address, | ||
| 'employer' => $this->employer, | ||
| 'tshirt_size' => $this->tshirtSize, | ||
| 'phone' => $this->phone, | ||
| 'work_phone' => $this->workPhone, | ||
| 'other_phone' => $this->otherPhone, | ||
| 'email' => $this->email, | ||
| 'case_worker_name' => $this->caseworkerName, | ||
| 'case_worker_phone' => $this->caseworkerPhone, | ||
| 'monthly_child_support' => $this->monthlyChildSupport, | ||
| 'marital_status' => $this->maritalStatus, | ||
| 'ethnicity' => $this->ethnicity, | ||
| 'contact_with_children' => $this->contactWithChildren, | ||
| 'children_custody' => $this->childrenCustody, | ||
| 'children_visitation' => $this->childrenVisitation, | ||
| 'children_phone' => $this->childrenPhone, | ||
| ]; | ||
| } | ||
| } | ||
| ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| <?php | ||
|
|
||
| namespace App\DTOs; | ||
|
|
||
| readonly class DisclosureDTO implements PdfArrayable | ||
| { | ||
| public function __construct( | ||
| public readonly string $fullName, | ||
| public readonly string $phone, | ||
| public readonly string $dob, | ||
| public readonly string $address, | ||
| public readonly string $email, | ||
| public readonly string $authorizeDys, | ||
| public readonly string $authorizeMhd, | ||
| public readonly string $authorizeDfas, | ||
| public readonly string $authorizeMmac, | ||
| public readonly string $authorizeOther, | ||
| public readonly ?string $authorizeDiscloserFormOther, | ||
| public readonly string $authorizeCd, | ||
| public readonly string $authorizeDls, | ||
| public readonly string $discloseToAttorney, | ||
| public readonly string $discloseToLegislator, | ||
| public readonly string $discloseToEmployer, | ||
| public readonly string $discloseToGovernorsStaff, | ||
| public readonly string $purposeContinuityOfServicesCare, | ||
| public readonly string $purposeLegalConsultationRepresentation, | ||
| public readonly string $purposeComplaintInvestigationResolution, | ||
| public readonly string $purposeBackgroundInvestigation, | ||
| public readonly string $purposeLegalProceedings, | ||
| public readonly string $purposeTreatmentPlanning, | ||
| public readonly string $purposeAtConsumersRequest, | ||
| public readonly string $purposeToShareOrRefer, | ||
| public readonly string $purposeOther, | ||
| public readonly string $licensureInformation, | ||
| public readonly string $disclosureMedical, | ||
| public readonly string $hotlineInvestigations, | ||
| public readonly string $homeStudies, | ||
| public readonly string $eligibilityDeterminations, | ||
| public readonly string $substanceAbuseTreatment, | ||
| public readonly string $clientEmploymentRecords, | ||
| public readonly string $acceptTextMessages, | ||
| ) {} | ||
|
|
||
| public function toPdfArray(): array { | ||
| return [ | ||
| 'authorize_full_name' => $this->fullName, | ||
| 'authorize_dys' => $this->authorizeDys, | ||
| 'authorize_mhd' => $this->authorizeMhd, | ||
| 'authorize_dfas' => $this->authorizeDfas, | ||
| 'authorize_mmac' => $this->authorizeMmac, | ||
| 'authorize_other' => $this->authorizeOther, | ||
| 'authorize_discloser_form_other' => $this->authorizeDiscloserFormOther, | ||
| 'authorize_cd' => $this->authorizeCd, | ||
| 'authorize_dls' => $this->authorizeDls, | ||
| 'disclose_full_name' => $this->fullName, | ||
| 'disclose_phone' => $this->phone, | ||
| 'disclose_dob' => $this->dob, | ||
| 'disclose_address' => $this->address, | ||
| 'disclose_email' => $this->email, | ||
| 'disclose_to_attorney' => $this->discloseToAttorney, | ||
| 'disclose_to_legislator' => $this->discloseToLegislator, | ||
| 'disclose_to_employer' => $this->discloseToEmployer, | ||
| 'disclose_to_governors_staff' => $this->discloseToGovernorsStaff, | ||
| 'disclosure_purpose_continuity_of_services_care' => $this->purposeContinuityOfServicesCare, | ||
| 'disclosure_purpose_legal_consultation_representation' => $this->purposeLegalConsultationRepresentation, | ||
| 'disclosure_purpose_complaint_investigation_resolution' => $this->purposeComplaintInvestigationResolution, | ||
| 'disclosure_purpose_background_investigation' => $this->purposeBackgroundInvestigation, | ||
| 'disclosure_purpose_legal_proceedings' => $this->purposeLegalProceedings, | ||
| 'disclosure_purpose_treatment_planning' => $this->purposeTreatmentPlanning, | ||
| 'disclosure_purpose_at_consumers_request' => $this->purposeAtConsumersRequest, | ||
| 'disclosure_purpose_to_share_or_refer' => $this->purposeToShareOrRefer, | ||
| 'disclosure_licensure_information' => $this->licensureInformation, | ||
| 'disclosure_medical' => $this->disclosureMedical, | ||
| 'disclose_hotline_investigations' => $this->hotlineInvestigations, | ||
| 'disclosure_home_studies' => $this->homeStudies, | ||
| 'disclosure_eligibility_determinations' => $this->eligibilityDeterminations, | ||
| 'disclosure_substance_abuse_treatment' => $this->substanceAbuseTreatment, | ||
| 'disclosure_client_employment_records' => $this->clientEmploymentRecords, | ||
| 'accept_text_messages' => $this->acceptTextMessages | ||
| ]; | ||
| } | ||
| } | ||
| ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| <?php | ||
|
|
||
| namespace App\DTOs; | ||
|
|
||
| readonly class ParticipantUpdateData | ||
| { | ||
| /** | ||
| * @param ChildDTO[] $children | ||
| */ | ||
| public function __construct( | ||
| // Meta (not PDF fields, used for file generation) | ||
| public readonly int $id, | ||
| public readonly string $firstName, | ||
| public readonly string $lastName, | ||
|
|
||
| // Enrollment form data | ||
| public readonly ContactInfoDTO $contactInfo, | ||
| public readonly array $children, | ||
| public readonly DisclosureDTO $disclosure, | ||
| public readonly AssessmentDTO $assessment, | ||
| public readonly SurveyDTO $survey, | ||
| public readonly ServicePlanDTO $servicePlan | ||
| ) {} | ||
|
|
||
| /** | ||
| * This is for the email generation | ||
| */ | ||
| public function fullName(): string { | ||
| return $this->firstName . ' ' . $this->lastName; | ||
| } | ||
|
|
||
| public function toPdfArray(): array { | ||
|
|
||
| $children = []; | ||
|
|
||
| foreach ($this->children as $index => $child) { | ||
| $adjusted_index = $index + 1; | ||
| $children['child_name_' . $adjusted_index] = $child->name; | ||
| $children['child_age_' . $adjusted_index] = $child->age; | ||
| $children['child_dob_' . $adjusted_index] = $child->dob; | ||
|
|
||
| } | ||
|
|
||
| $arrays = [ | ||
| $this->contactInfo->toPdfArray(), | ||
| $children, | ||
| $this->disclosure->toPdfArray(), | ||
| $this->assessment->toPdfArray(), | ||
| $this->survey->toPdfArray(), | ||
| $this->servicePlan->toPdfArray() | ||
| ]; | ||
|
|
||
| return array_merge(...$arrays); | ||
| } | ||
| } | ||
| ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| <?php | ||
| namespace App\DTOs; | ||
|
|
||
| interface PdfArrayable { | ||
| public function toPdfArray(): array; | ||
| } | ||
| ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| <?php | ||
|
|
||
| namespace App\DTOs; | ||
|
|
||
| readonly class ServicePlanDTO implements PdfArrayable | ||
| { | ||
| public function __construct( | ||
| public readonly string $participantFullName, | ||
| public readonly string $clientNumber, | ||
| public readonly string $goal, // service_plan_goal | ||
| public readonly string $serviceIdentified, | ||
| public readonly string $strategies_1, | ||
| public readonly string $personResponsible_1, | ||
| public readonly string $timeline_1, | ||
| public readonly string $measureOfSuccess_1, | ||
| public readonly string $strategies_2, | ||
| public readonly string $personResponsible_2, | ||
| public readonly string $timeline_2, | ||
| public readonly string $measureOfSuccess_2, | ||
| public readonly string $strategies_3, | ||
| public readonly string $personResponsible_3, | ||
| public readonly string $timeline_3, | ||
| public readonly string $measureOfSuccess_3, | ||
| ) {} | ||
|
|
||
| public function toPdfArray(): array { | ||
| return [ | ||
| 'service_plan_participant_full_name' => $this->participantFullName, | ||
| 'service_plan_client_number' => $this->clientNumber, | ||
| 'service_plan_goal' => $this->goal, | ||
| 'service_plan_service_identified' => $this->serviceIdentified, | ||
| 'service_plan_strategies_1' => $this->strategies_1, | ||
| 'service_plan_person_responsible_1' => $this->personResponsible_1, | ||
| 'service_plan_timeline_1' => $this->timeline_1, | ||
| 'service_plan_measure_of_success_1' => $this->measureOfSuccess_1, | ||
| 'service_plan_strategies_2' => $this->strategies_2, | ||
| 'service_plan_person_responsible_2' => $this->personResponsible_2, | ||
| 'service_plan_timeline_2' => $this->timeline_2, | ||
| 'service_plan_measure_of_success_2' => $this->measureOfSuccess_2, | ||
| 'service_plan_strategies_3' => $this->strategies_3, | ||
| 'service_plan_person_responsible_3' => $this->personResponsible_3, | ||
| 'service_plan_timeline_3' => $this->timeline_3, | ||
| 'service_plan_measure_of_success_3' => $this->measureOfSuccess_3 | ||
| ]; | ||
| } | ||
| } | ||
| ?> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.