Skip to content

Commit

Permalink
Add Jefferson Parish to experiment groups (#709)
Browse files Browse the repository at this point in the history
* Add Jefferson specific WIC and ECE logic
  • Loading branch information
spokenbird committed Apr 23, 2024
1 parent 65acfe3 commit 375813e
Show file tree
Hide file tree
Showing 18 changed files with 254 additions and 58 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package org.ladocuploader.app.submission.conditions;

import static org.ladocuploader.app.submission.actions.SetExperimentGroups.ExperimentGroup.APPLY;
import static org.ladocuploader.app.utils.SubmissionUtilities.ECE_CUTOFF_DATE;
import static org.ladocuploader.app.utils.SubmissionUtilities.hasChildBornAfterCutoff;
import static org.ladocuploader.app.utils.SubmissionUtilities.hasHouseholdPregnancy;
import static org.ladocuploader.app.utils.SubmissionUtilities.inExperimentGroup;
import static org.ladocuploader.app.utils.SubmissionUtilities.isJeffersonParish;
import static org.ladocuploader.app.utils.SubmissionUtilities.isOrleansParish;

import formflow.library.config.submission.Condition;
import formflow.library.data.Submission;
import org.springframework.stereotype.Component;

@Component
public class EligibleForEceApplyJefferson implements Condition {

@Override
public Boolean run(Submission submission) {
return isJeffersonParish(submission)
&& inExperimentGroup(APPLY.name(), submission)
&& (hasChildBornAfterCutoff(submission, ECE_CUTOFF_DATE) || hasHouseholdPregnancy(submission));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import static org.ladocuploader.app.utils.SubmissionUtilities.*;

@Component
public class EligibleForEceApply implements Condition {
public class EligibleForEceApplyNola implements Condition {

@Override
public Boolean run(Submission submission) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package org.ladocuploader.app.submission.conditions;

import static org.ladocuploader.app.submission.actions.SetExperimentGroups.ExperimentGroup.LINK;
import static org.ladocuploader.app.utils.SubmissionUtilities.ECE_CUTOFF_DATE;
import static org.ladocuploader.app.utils.SubmissionUtilities.hasChildBornAfterCutoff;
import static org.ladocuploader.app.utils.SubmissionUtilities.hasHouseholdPregnancy;
import static org.ladocuploader.app.utils.SubmissionUtilities.inExperimentGroup;
import static org.ladocuploader.app.utils.SubmissionUtilities.isJeffersonParish;
import static org.ladocuploader.app.utils.SubmissionUtilities.isOrleansParish;

import formflow.library.config.submission.Condition;
import formflow.library.data.Submission;
import org.springframework.stereotype.Component;

@Component
public class EligibleForEceLinksJefferson implements Condition {

@Override
public Boolean run(Submission submission) {
return isJeffersonParish(submission)
&& inExperimentGroup(LINK.name(), submission)
&& (hasChildBornAfterCutoff(submission, ECE_CUTOFF_DATE) || hasHouseholdPregnancy(submission));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import static org.ladocuploader.app.utils.SubmissionUtilities.*;

@Component
public class EligibleForEceLinks implements Condition {
public class EligibleForEceLinksNola implements Condition {

@Override
public Boolean run(Submission submission) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import formflow.library.data.Submission;
import org.springframework.stereotype.Component;

import static org.ladocuploader.app.utils.SubmissionUtilities.isJeffersonParish;
import static org.ladocuploader.app.utils.SubmissionUtilities.isOrleansParish;

@Component
Expand All @@ -19,6 +20,6 @@ public InterestedInWicEce(InterestedInECE interestedInECE, InterestedInWIC inter

@Override
public Boolean run(Submission submission) {
return isOrleansParish(submission) && (interestedInECE.run(submission) || interestedInWIC.run(submission));
return isOrleansParish(submission) || isJeffersonParish(submission) && (interestedInECE.run(submission) || interestedInWIC.run(submission));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import static formflow.library.inputs.FieldNameMarkers.DYNAMIC_FIELD_MARKER;
import static java.util.Collections.emptyList;
import static org.ladocuploader.app.data.enums.Parish.JEFFERSON;
import static org.ladocuploader.app.data.enums.Parish.ORLEANS;

public class SubmissionUtilities {
Expand Down Expand Up @@ -103,6 +104,10 @@ public static String formatMoney(Double value) {
public static boolean isOrleansParish(Submission submission) {
return ORLEANS.name().equals(submission.getInputData().get("parish"));
}

public static boolean isJeffersonParish(Submission submission) {
return JEFFERSON.name().equals(submission.getInputData().get("parish"));
}

public static boolean isEligibleForExperiment(Submission submission) {
return hasHouseholdPregnancy(submission) || hasChildBornAfterCutoff(submission, ECE_CUTOFF_DATE);
Expand Down
52 changes: 38 additions & 14 deletions src/main/resources/flows-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -405,22 +405,31 @@ flow:
- name: expensesChildSupportAmount
condition: HasChildSupportExpenses
- name: nolaEceLinks
condition: EligibleForEceLinks
condition: EligibleForEceLinksNola
- name: nolaApplyStart
condition: EligibleForEceApplyNola
- name: jeffersonEceLinks
condition: EligibleForEceLinksJefferson
- name: jeffersonApplyStart
condition: EligibleForEceApplyJefferson
# this needs to come after other conditions since it will apply first if it comes before county checks
- name: wicLinks
condition: EligibleForWicLinks
- name: nolaApplyStart
condition: EligibleForEceApply
- name: wicApply
condition: EligibleForWicApply
- name: finalSignPost
expensesChildSupportAmount:
nextScreens:
- name: nolaEceLinks
condition: EligibleForEceLinks
condition: EligibleForEceLinksNola
- name: wicLinks
condition: EligibleForWicLinks
- name: jeffersonApplyStart
condition: EligibleForEceApplyJefferson
- name: jeffersonEceLinks
condition: EligibleForEceLinksJefferson
- name: nolaApplyStart
condition: EligibleForEceApply
condition: EligibleForEceApplyNola
- name: wicApply
condition: EligibleForWicApply
- name: finalSignPost
Expand All @@ -429,6 +438,11 @@ flow:
- name: wicLinks
condition: EligibleForWicLinks
- name: finalSignPost
jeffersonEceLinks:
nextScreens:
- name: wicLinks
condition: EligibleForWicLinks
- name: finalSignPost
wicLinks:
nextScreens:
- name: finalSignPost
Expand All @@ -439,30 +453,40 @@ flow:
- name: wicApply
condition: EligibleForWicApply
- name: finalSignPost
jeffersonApplyStart:
nextScreens:
- name: jeffersonApplyQuestions
condition: InterestedInECE
- name: wicApply
condition: EligibleForWicApply
- name: finalSignPost
nolaApplyQuestions:
nextScreens:
- name: nolaApplyIEP
nolaApplyIEP:
- name: eceApplyIEP
jeffersonApplyQuestions:
nextScreens:
- name: eceApplyIEP
eceApplyIEP:
nextScreens:
- name: nolaApplyHouseholdAdultsWork
nolaApplyHouseholdAdultsWork:
- name: eceApplyHouseholdAdultsWork
eceApplyHouseholdAdultsWork:
nextScreens:
- name: wicApply
condition: EligibleForWicApply
- name: nolaApplyThankYou
- name: applyThankYou
condition: InterestedInWicEce
- name: finalSignPost
wicApply:
nextScreens:
- name: nolaApplyThankYou
- name: applyThankYou
condition: InterestedInWicEce
- name: outsideNolaApplyThankYou
- name: outsideAreasApplyThankYou
condition: InterestedInWIC
- name: finalSignPost
nolaApplyThankYou:
applyThankYou:
nextScreens:
- name: finalSignPost
outsideNolaApplyThankYou:
outsideAreasApplyThankYou:
nextScreens:
- name: finalSignPost
finalSignPost:
Expand Down
26 changes: 17 additions & 9 deletions src/main/resources/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1108,14 +1108,16 @@ nola-apply-questions.title=ECE questions
nola-apply-questions.header=Great! We just have 2 quick questions to help NOLA-PS figure out which programs you qualify for.
nola-apply-questions.subheader=These questions are about the legal guardian(s) of the child(ren) you want childcare for.

nola-apply-household-working.title=Household adults work
nola-apply-household-working.header=How many of the child\u2019s legal guardians (who live in your household) are either working, in school, in a training program, or seeking work?
nola-apply-household.all-of-them=All of them
nola-apply-household.some-of-them=Some of them
nola-apply-household.none-of-them=None of them
jefferson-apply-questions.header=Great! We just have 2 quick questions to help Jefferson Early Childhood Network figure out which programs you qualify for.

nola-apply-iep.title=IEP
nola-apply-iep.header=Do any of the child\u2019s legal guardians (who live in your household) have a disability?
ece-apply-household-working.title=Household adults work
ece-apply-household-working.header=How many of the child\u2019s legal guardians (who live in your household) are either working, in school, in a training program, or seeking work?
ece-apply-household.all-of-them=All of them
ece-apply-household.some-of-them=Some of them
ece-apply-household.none-of-them=None of them

ece-apply-iep.title=IEP
ece-apply-iep.header=Do any of the child\u2019s legal guardians (who live in your household) have a disability?

nola-apply-ece-confirmation.title=ECE confirmation
nola-apply-ece-confirmation.header=Can we share your SNAP data with NOLA P.S.?
Expand All @@ -1140,7 +1142,12 @@ nola-ece.if-youre-approved=If you\u2019re approved for SNAP, you\u2019re also el
nola-ece.subheader=These programs can:<ul class="list--bulleted"> <li>Provide free childcare and education for children from birth through age 4</li> <li>Provide free pre-K in public or private school for 4-year-olds</li></ul>
nola-ece-links.at-the-end-of-this-app=At the end of this application, we\u2019ll show you a clickable link to the NOLA Public Schools application (enrollnolaps.com).
nola-ece-links.are-you-interested=Are you interested in free childcare or pre-K?
nola-ece-go-to-application=Go to the ECE application
ece-go-to-application=Go to the ECE application

jefferson-ece.subheader=These programs can:<ul class="list--bulleted"> <li>Provide free childcare and education for children from birth through age 4</li> <li>Provide pre-K in Head Start, child care centers, public schools, or parochial schools for 4-year-olds</li></ul>
jefferson-ece.would-you-like=Would you like us to send your information to the Jefferson Early Childhood Network to help complete your free childcare application?
jefferson-ece.would-you-like-help=The Jefferson Early Childhood Network would contact you to finish the application.
jefferson-ece-links.at-the-end-of-this-app=At the end of this application, we'll show you a clickable link to the Jefferson Parish Early Childhood application (www.jeffersonchild.com)

wic-links.title=WIC link
wic.if-youre-approved=If you\u2019re approved for SNAP, you\u2019re also eligible for WIC.
Expand All @@ -1159,8 +1166,9 @@ nola-ece-apply.would-you-like=Would you like us to send your information to New
nola-ece-apply.would-you-like-help=NOLA-PS would contact you to finish the application.
nola-ece-apply.yes-start-app=Yes, start my free childcare app

ece-notice-confirmation=<b>Free Childcare or Pre-K: You are required to finish your application with the New Orleans Public Schools.</b> You will receive a text from NOLA-PS within one week, with a link to finish your application and list the childcare and pre-K programs you would like to apply to. <br/><br/>While you wait, you can go to <a target="_blank" href="nola.explore.avela.org">nola.explore.avela.org</a> to find programs you like!
nola-ece-notice-confirmation=<b>Free Childcare or Pre-K: You are required to finish your application with the New Orleans Public Schools.</b> You will receive a text from NOLA-PS within one week, with a link to finish your application and list the childcare and pre-K programs you would like to apply to. <br/><br/>While you wait, you can go to <a target="_blank" href="https://nola.explore.avela.org">nola.explore.avela.org</a> to find programs you like!
wic-notice-confirmation=<b>WIC: You are required to finish your application with the Louisiana Department of Health.</b> You will be contacted by a WIC clinic staff member to schedule an appointment to complete the final steps.<br/><br/>You can also call a local WIC clinic directly to schedule an in-person appointment. <a target="_blank" href="https://louisianawic.org/search-tool/">Visit this map</a> to find a clinic near you.
jefferson-ece-notice-confirmation=<b>Free Childcare or Pre-K: You are required to finish your application with the Jefferson Early Childhood Network.</b> You will receive a call from the Jefferson Early Childhood Network within one week to assist you in finishing your application and provide you with a list of childcare and/or Pre-K programs you may qualify for.<br/><br/> While you wait, you can visit <a target="_blank" href="https://www.jeffersonchild.com">www.jeffersonchild.com</a> to explore your options. Please call <a href="tel:504-349-8921">504-349-8921</a> if you have any additional questions.
confirmation-what-to-expect-after=What to expect after
confirmation-for-snap=<b>For SNAP</b>
confirmation-for-snap-questions=<b>For SNAP questions</b>
Expand Down
18 changes: 9 additions & 9 deletions src/main/resources/messages_es.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1106,14 +1106,14 @@ nola-apply-questions.title=Preguntas sobre la educación de la primera infancia
nola-apply-questions.header=¡Muy bien! Necesitamos que responda dos preguntas rápidas para ayudar a las Escuelas Públicas de Nueva Orleans (Nueva Orleans Public Schools, NOLA-PS) a determinar para qué programas es elegible.
nola-apply-questions.subheader=Las preguntas son acerca de los tutores legales de los niños para los que requiere cuidado infantil.

nola-apply-household-working.title=Empleo de los miembros del hogar
nola-apply-household-working.header=¿Cuántos de los tutores legales de los niños (que viven en su hogar) tienen o están buscando empleo o asisten a la escuela o a un programa de capacitación?
nola-apply-household.all-of-them=Todos
nola-apply-household.some-of-them=Algunos de ellos
nola-apply-household.none-of-them=Ninguno de ellos
ece-apply-household-working.title=Empleo de los miembros del hogar
ece-apply-household-working.header=¿Cuántos de los tutores legales de los niños (que viven en su hogar) tienen o están buscando empleo o asisten a la escuela o a un programa de capacitación?
ece-apply-household.all-of-them=Todos
ece-apply-household.some-of-them=Algunos de ellos
ece-apply-household.none-of-them=Ninguno de ellos

nola-apply-iep.title=Programa Educativo Individualizado (Individualized Education Plan, IEP)
nola-apply-iep.header=¿Alguno de los tutores legales de los niños (que viven en su hogar) posee alguna discapacidad?
ece-apply-iep.title=Programa Educativo Individualizado (Individualized Education Plan, IEP)
ece-apply-iep.header=¿Alguno de los tutores legales de los niños (que viven en su hogar) posee alguna discapacidad?

nola-apply-ece-confirmation.title=Confirmación de la ECE
nola-apply-ece-confirmation.header=¿Podemos compartir sus datos del SNAP con NOLA-PS?
Expand All @@ -1138,7 +1138,7 @@ nola-ece.if-youre-approved=Si cumple los requisitos del SNAP, significa que tamb
nola-ece.subheader=Estos programas ofrecen lo siguiente:<ul class="list--bulleted"> <li>Cuidado infantil y educación gratuitos para niños desde el nacimiento hasta los cuatro años.</li> <li>Educación preescolar gratuita en escuelas públicas o privadas para niños de cuatro años.</li></ul>
nola-ece-links.at-the-end-of-this-app=Al final de esta solicitud, le proporcionaremos un enlace mediante el que podrá acceder a la solicitud de las Escuelas Públicas de NOLA (enrollnolaps.com).
nola-ece-links.are-you-interested=¿Está interesado en recibir los servicios de cuidado infantil o educación preescolar gratuitos?
nola-ece-go-to-application=Ir a la solicitud de la ECE
ece-go-to-application=Ir a la solicitud de la ECE

wic-links.title=Enlace del WIC
wic.if-youre-approved=Si se aprueba su solicitud del SNAP, significa que también es elegible para el WIC.
Expand All @@ -1157,7 +1157,7 @@ nola-ece-apply.would-you-like=¿Desea que enviemos su información a las Escuela
nola-ece-apply.would-you-like-help=NOLA-PS se comunicarán con usted para completar la solicitud.
nola-ece-apply.yes-start-app=Sí, comenzar mi solicitud para recibir cuidado infantil gratuito.

ece-notice-confirmation=<b>Servicios de cuidado infantil o educación preescolar gratuitos: es necesario que complete su solicitud con las Escuelas Públicas de NOLA.</b> Recibirá un mensaje de texto de NOLA-PS dentro de una semana con un enlace para completar su solicitud y elaborar una lista de los programas de cuidado infantil y educación preescolar que le gustaría solicitar. <br/><br/>Mientras espera, puede visitar el sitio web <a target="_blank" href="nola.explore.avela.org">nola.explore.avela.org</a> para encontrar programas que le gusten.
nola-notice-confirmation=<b>Servicios de cuidado infantil o educación preescolar gratuitos: es necesario que complete su solicitud con las Escuelas Públicas de NOLA.</b> Recibirá un mensaje de texto de NOLA-PS dentro de una semana con un enlace para completar su solicitud y elaborar una lista de los programas de cuidado infantil y educación preescolar que le gustaría solicitar. <br/><br/>Mientras espera, puede visitar el sitio web <a target="_blank" href="nola.explore.avela.org">nola.explore.avela.org</a> para encontrar programas que le gusten.
wic-notice-confirmation=<b>WIC: es necesario que complete la solicitud del Departamento de Salud de Luisiana.</b> Un miembro del personal de las clínicas del WIC se comunicará con usted para programar una cita para completar los pasos finales.<br/><br/>También puede comunicarse con una clínica local del WIC para programar directamente una cita presencial. <a target="_blank" href="https://louisianawic.org/search-tool/">Consulte este mapa</a> para encontrar una clínica cerca suyo.
confirmation-what-to-expect-after=¿Qué esperar después?
confirmation-for-snap=<b>Para el SNAP</b>
Expand Down
Loading

0 comments on commit 375813e

Please sign in to comment.