All files / react-app/src/features/selection-flow options.tsx

93.75% Statements 15/16
75% Branches 3/4
100% Functions 2/2
93.75% Lines 15/16

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236        4x                         4x                         4x 1x   1x                                               1x                                     4x 3x   3x 1x                                               2x                                     4x                                                       4x                                       4x                                                               4x                                                                
import { OptionData } from "@/features/selection-flow/plan-types";
import { useFeatureFlag } from "@/hooks/useFeatureFlag";
import { ORIGIN, SPA_SUBMISSION_ORIGIN, WAIVER_SUBMISSION_ORIGIN } from "@/utils";
 
export const AUTHORITY_OPTIONS: OptionData[] = [
  {
    title: "State Plan Amendment (SPA)",
    description: "Submit a new Medicaid or CHIP State Plan Amendment",
    to: "/new-submission/spa",
  },
  {
    title: "Waiver Action",
    description: "Submit Waivers, Amendments, Renewals, and Temporary Extensions",
    to: "/new-submission/waiver",
  },
];
 
export const SPA_OPTIONS: OptionData[] = [
  {
    title: "Medicaid SPA",
    description: "Submit a new Medicaid State Plan Amendment",
    to: "/new-submission/spa/medicaid",
  },
  {
    title: "CHIP SPA",
    description: "Submit a new CHIP State Plan Amendment",
    to: "/new-submission/spa/chip",
  },
];
 
export const useMedSpaOptions = (): OptionData[] => {
  const useMMDLCard = useFeatureFlag("MED_SPA_CARD");
 
  Iif (useMMDLCard) {
    return [
      {
        title: "Medicaid Eligibility, Enrollment, Administration, and Health Homes",
        description: "Redirects to the MACPro System",
        to: "/new-submission/spa/medicaid/landing/medicaid-eligibility",
      },
      {
        title: "Medicaid Alternative Benefits Plans (ABP), and Medicaid Premiums and Cost Sharing",
        description: "Redirects to MMDL submission system",
        to: "/new-submission/spa/medicaid/landing/medicaid-abp",
      },
      {
        title: "All Other Medicaid SPA Submissions",
        description: "Create a new Medicaid State Plan Amendment",
        to: {
          pathname: "/new-submission/spa/medicaid/create",
          search: new URLSearchParams({
            [ORIGIN]: SPA_SUBMISSION_ORIGIN,
          }).toString(),
        },
      },
    ];
  }
  return [
    {
      title: "Medicaid Eligibility, Enrollment, Administration, and Health Homes",
      description: "Redirects to the MACPro System",
      to: "/new-submission/spa/medicaid/landing/medicaid-eligibility",
    },
    {
      title: "All Other Medicaid SPA Submissions",
      description: "Create a new Medicaid State Plan Amendment",
      to: {
        pathname: "/new-submission/spa/medicaid/create",
        search: new URLSearchParams({
          [ORIGIN]: SPA_SUBMISSION_ORIGIN,
        }).toString(),
      },
    },
  ];
};
 
export const useChipSpaOptions = (): OptionData[] => {
  const useChipForm = useFeatureFlag("CHIP_SPA_SUBMISSION");
 
  if (useChipForm) {
    return [
      {
        title: "CHIP Eligibility SPA Submissions",
        description: "Create a new CHIP Eligibility State Plan Amendment",
        to: {
          pathname: "/new-submission/spa/chip/create/chip-details",
          search: new URLSearchParams({
            [ORIGIN]: SPA_SUBMISSION_ORIGIN,
          }).toString(),
        },
      },
      {
        title: "All Other CHIP SPA Submissions",
        description: "Create a new CHIP State Plan Amendment",
        to: {
          pathname: "/new-submission/spa/chip/create",
          search: new URLSearchParams({
            [ORIGIN]: SPA_SUBMISSION_ORIGIN,
          }).toString(),
        },
      },
    ];
  }
 
  return [
    {
      title: "CHIP Eligibility",
      description: "Redirects to MMDL submission system",
      to: "/new-submission/spa/chip/landing/chip-eligibility",
    },
    {
      title: "All Other CHIP SPA Submissions",
      description: "Create a new CHIP State Plan Amendment",
      to: {
        pathname: "/new-submission/spa/chip/create",
        search: new URLSearchParams({
          [ORIGIN]: SPA_SUBMISSION_ORIGIN,
        }).toString(),
      },
    },
  ];
};
 
export const WAIVER_OPTIONS: OptionData[] = [
  {
    title: "Request Temporary Extension",
    description: "Submit for 1915(b) or 1915(c)",
    to: {
      pathname: "/new-submission/waiver/temporary-extensions",
      search: new URLSearchParams({
        [ORIGIN]: WAIVER_SUBMISSION_ORIGIN,
      }).toString(),
    },
  },
  {
    title: "1915(b) Waiver Actions",
    description: "Submit 1915(b) Waivers, Amendments, and Renewals",
    to: "/new-submission/waiver/b",
  },
  {
    title: "1915(c) Appendix K Amendment",
    description: "Create a 1915(c) Appendix K Amendment",
    to: {
      pathname: "/new-submission/waiver/app-k",
      search: new URLSearchParams({
        [ORIGIN]: WAIVER_SUBMISSION_ORIGIN,
      }).toString(),
    },
  },
];
 
export const B_WAIVER_OPTIONS: OptionData[] = [
  {
    title: "1915(b)(4) FFS Selective Contracting Waivers",
    description: "Submit 1915(b)(4) FFS Selective Contracting Waivers, Amendments, and Renewals",
    to: "/new-submission/waiver/b/b4",
  },
  {
    title: "1915(b) Comprehensive (Capitated) Waiver Authority",
    description: (
      <>
        Submit 1915(b) Comprehensive (Capitated) Waivers, Amendments and Renewals <br />
        <b>
          <em>Not applicable for 1915(b)(4) FFS Selective Contracting Waiver actions</em>
        </b>
      </>
    ),
    to: "/new-submission/waiver/b/capitated",
  },
];
 
export const B4_WAIVER_OPTIONS: OptionData[] = [
  {
    title: "1915(b)(4) FFS Selective Contracting New Initial Waiver",
    description: "Create a new 1915(b)(4) FFS Selective Contracting Initial Waiver",
    to: {
      pathname: "/new-submission/waiver/b/b4/initial/create",
      search: new URLSearchParams({
        [ORIGIN]: WAIVER_SUBMISSION_ORIGIN,
      }).toString(),
    },
  },
  {
    title: "1915(b)(4) FFS Selective Contracting Renewal Waiver",
    description: "Renew an existing 1915(b)(4) FFS Selective Contracting Waiver",
    to: {
      pathname: "/new-submission/waiver/b/b4/renewal/create",
      search: new URLSearchParams({
        [ORIGIN]: WAIVER_SUBMISSION_ORIGIN,
      }).toString(),
    },
  },
  {
    title: "1915(b)(4) FFS Selective Contracting Waiver Amendment",
    description: "Amend an existing 1915(b)(4) FFS Selective Contracting Waiver",
    to: {
      pathname: "/new-submission/waiver/b/b4/amendment/create",
      search: new URLSearchParams({
        [ORIGIN]: WAIVER_SUBMISSION_ORIGIN,
      }).toString(),
    },
  },
];
export const BCAP_WAIVER_OPTIONS: OptionData[] = [
  {
    title: "1915(b) Comprehensive (Capitated) New Initial Waiver",
    description: "Create a new 1915(b) Comprehensive (Capitated) Initial Waiver",
    to: {
      pathname: "/new-submission/waiver/b/capitated/initial/create",
      search: new URLSearchParams({
        [ORIGIN]: WAIVER_SUBMISSION_ORIGIN,
      }).toString(),
    },
  },
  {
    title: "1915(b) Comprehensive (Capitated) Renewal Waiver",
    description: "Renew an existing 1915(b) Comprehensive (Capitated) Waiver",
    to: {
      pathname: "/new-submission/waiver/b/capitated/renewal/create",
      search: new URLSearchParams({
        [ORIGIN]: WAIVER_SUBMISSION_ORIGIN,
      }).toString(),
    },
  },
  {
    title: "1915(b) Comprehensive (Capitated) Waiver Amendment ",
    description: "Amend an existing 1915(b) Comprehensive (Capitated) Waiver",
    to: {
      pathname: "/new-submission/waiver/b/capitated/amendment/create",
      search: new URLSearchParams({
        [ORIGIN]: WAIVER_SUBMISSION_ORIGIN,
      }).toString(),
    },
  },
];