department-of-veterans-affairs / va.gov-team

Public resources for building on and in support of VA.gov. Visit complete Knowledge Hub:
https://depo-platform-documentation.scrollhelp.site/index.html
283 stars 204 forks source link

Add logic to route to type of facility page depending on CC eligibility #1864

Closed jbalboni closed 5 years ago

jbalboni commented 5 years ago

We need to write the logic to determine when the type of facility page shows up. That page only shows up if someone is eligible for CC.

This decision would happen after the user chose their type of care. We need to check:

  1. The user chose a type of care eligible for CC (these types have a ccId in the types of care constant)
  2. The user has an H, G, or N code returned from the community care eligibility api. We can use mock data for this call, pasted below.

Additionally, we need to do a similar check when a user is going back from a page right after the type of facility page.

Example CC eligibility data:

eligibilities : {
  eligibility : [ {
    vceCode : X,
    vceDescription : Not Eligible,
    vceEffectiveDate : 2017-10-08T23:35:12-05:00
  } ]
}
narin commented 5 years ago

Linked below is the swagger for this existing service. Could be helpful to determine what an API response would look like from vets-api once it is implemented.

https://coderepo.mobilehealth.va.gov/projects/VDMS/repos/mobile-cce-service/browse/src/main/resources/swagger.json?at=Release%2F1.0