diff --git a/eslint.config.mjs b/eslint.config.mjs index 0ba8b92501..9cd55b3b2f 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -42,6 +42,7 @@ export default tseslint.config( rules: { "@typescript-eslint/no-empty-interface": "off", "react/react-in-jsx-scope": "off", + "react/jsx-no-useless-fragment": ["error", { allowExpressions: true }], "react-hooks/rules-of-hooks": "error", "react-hooks/exhaustive-deps": "warn", "@typescript-eslint/no-explicit-any": "off", diff --git a/lib/libs/webforms/ABP1/v202402.ts b/lib/libs/webforms/ABP1/v202402.ts index 420f95c072..0107adb18c 100644 --- a/lib/libs/webforms/ABP1/v202402.ts +++ b/lib/libs/webforms/ABP1/v202402.ts @@ -49,7 +49,7 @@ export const v202402: FormSchema = { label: "Eligibility group", labelClassName: "font-bold", props: { - className: "w-[300px]", + className: "w-[229px]", options: [ { label: "Adult", @@ -283,7 +283,7 @@ export const v202402: FormSchema = { required: "* Required", }, props: { - className: "w-[300px]", + className: "w-[229px]", options: [ { label: "Mandatory", diff --git a/lib/libs/webforms/ABP8/index.ts b/lib/libs/webforms/ABP8/index.ts new file mode 100644 index 0000000000..e5cf77f4fe --- /dev/null +++ b/lib/libs/webforms/ABP8/index.ts @@ -0,0 +1 @@ +export * from "./v202401"; diff --git a/lib/libs/webforms/ABP8/sections/v202401.ts b/lib/libs/webforms/ABP8/sections/v202401.ts new file mode 100644 index 0000000000..155592e7ff --- /dev/null +++ b/lib/libs/webforms/ABP8/sections/v202401.ts @@ -0,0 +1,1073 @@ +import { DependencyRule, RHFOption, RHFSlotProps, Section } from "shared-types"; + +export enum SectionName { + HIO = "HIO", + MCO = "MCO", + PAHP = "PAHP", + PCCM = "PCCM", + PCCMEntity = "PCCM entity", + PIHP = "PIHP", +} + +// Parameters needed to generate a section + +export interface SectionDependencyInfo { + name: string; + expectedValue: string; +} + +interface SectionParams { + conditionalInfo: SectionDependencyInfo; + programLabel: string; + title?: string; +} + +// Helper functions ----------------------------------------------------------- + +// Generate IDs for components +export function createSectionId(programLabel: string): string { + return programLabel.toLowerCase().replace(" ", "-"); +} + +// Generate the DependencyRule to show sections +export function generateDependency({ + name, + expectedValue, +}: { + name: string; + expectedValue: string; +}): DependencyRule { + return { + conditions: [ + { + name, + type: "expectedValue", + expectedValue, + }, + ], + effect: { type: "show" }, + }; +} + +// Section generators --------------------------------------------------------- + +export function managedCare({ + conditionalInfo, + programLabel, + title, +}: SectionParams): Section { + return { + title: title || `${programLabel}`, + sectionId: createSectionId(programLabel), + dependency: generateDependency({ + name: conditionalInfo.name, + expectedValue: conditionalInfo.expectedValue, + }), + form: [ + { + slots: [ + { + rhf: "Select", + label: + "Is the managed care delivery system the same as an already approved managed care program?", + labelClassName: "font-bold", + name: "same-as-approved-program", + rules: { + required: "* Required", + }, + props: { + className: "w-[125px]", + options: [ + { label: "Yes", value: "yes" }, + { label: "No", value: "no" }, + ], + }, + }, + { + rhf: "Checkbox", + label: "The existing managed care program operates under:", + labelClassName: "font-bold", + name: "existing-managed-care-program", + rules: { + required: "* Required", + }, + props: { + options: [ + { + label: "Section 1915(a) voluntary managed care program", + value: "1915a", + slots: [ + { + rhf: "DatePicker", + label: "Date program approved by CMS", + labelClassName: "font-bold", + name: "1915a-date-approved", + rules: { + required: "* Required", + }, + }, + { + rhf: "Input", + label: "Program name", + labelClassName: "font-bold", + name: "1915a-program-name", + props: { + className: "w-full", + }, + rules: { + required: "* Required", + }, + }, + ], + }, + { + label: "Section 1915(b) managed care waiver", + value: "1915b", + slots: [ + { + rhf: "DatePicker", + label: "Date program approved by CMS", + labelClassName: "font-bold", + name: "1915b-date-approved", + rules: { + required: "* Required", + }, + }, + { + rhf: "Input", + label: "Program name", + labelClassName: "font-bold", + name: "1915b-program-name", + props: { + className: "w-full", + }, + rules: { + required: "* Required", + }, + }, + ], + }, + { + label: + "Section 1932(a) mandatory managed care state plan amendment", + value: "1932a", + slots: [ + { + rhf: "DatePicker", + label: "Date program approved by CMS", + labelClassName: "font-bold", + name: "1932a-date-approved", + rules: { + required: "* Required", + }, + }, + { + rhf: "Input", + label: "Program name", + labelClassName: "font-bold", + name: "1932a-program-name", + props: { + className: "w-full", + }, + rules: { + required: "* Required", + }, + }, + ], + }, + { + label: "Section 1115 demonstration", + value: "1115", + slots: [ + { + rhf: "DatePicker", + label: "Date program approved by CMS", + labelClassName: "font-bold", + name: "1115-date-approved", + rules: { + required: "* Required", + }, + }, + { + rhf: "Input", + label: "Program name", + labelClassName: "font-bold", + name: "1115-program-name", + props: { + className: "w-full", + }, + rules: { + required: "* Required", + }, + }, + ], + }, + { + label: `${ + programLabel === SectionName.HIO || + programLabel === SectionName.MCO + ? "An" + : "A" + } ${programLabel} consistent with applicable managed care requirements (42 CFR Part 438, 42 CFR Part 440, and Sections 1903(m), 1932, and 1937 of the Social Security Act)`, + value: "consistent-with-requirements", + }, + ], + }, + }, + ], + }, + ], + }; +} + +// "[Program] procurement or selection" +export function procurementOrSelection({ + conditionalInfo, + programLabel, +}: SectionParams): Section { + return { + title: `${programLabel} procurement or selection`, + sectionId: `${createSectionId(programLabel)}-procurement`, + subsection: true, + dependency: generateDependency({ + name: conditionalInfo.name, + expectedValue: conditionalInfo.expectedValue, + }), + form: [ + { + slots: [ + { + rhf: "Checkbox", + name: "procurement-requirments", + rules: { + required: "* Required", + }, + props: { + options: [ + { + label: + "The state assures all applicable requirements of 45 CFR 75.326 for procurement of contracts will be met.", + value: "assures-requirements", + }, + ], + }, + }, + ], + }, + ], + }; +} + +// "Other [program]-based service delivery system characteristics" +export function deliverySystemCharactaristics({ + conditionalInfo, + programLabel, +}: SectionParams): Section { + const sectionId = `${createSectionId(programLabel)}_delivery-system`; + + // This part of the section does not appear in PCCM + const otherCoverage: RHFSlotProps[] = + programLabel === SectionName.PCCM || programLabel === SectionName.PCCMEntity + ? [] + : [ + { + rhf: "Select", + label: `Will one or more ABP benefits or services be provided through a type of coverage other than the ${programLabel}, such as another managed care plan or fee-for service delivery system?`, + labelClassName: "font-bold", + name: "abp-benefits-provided", + rules: { + required: "* Required", + }, + props: { + className: "w-[125px]", + options: [ + { label: "Yes", value: "yes" }, + { label: "No", value: "no" }, + ], + }, + }, + { + rhf: "FieldGroup", + name: "benefit-service", + label: `Which benefit or service will be provided by a type of coverage other than the ${programLabel}?`, + labelClassName: "font-bold", + props: { + appendText: "Add benefit or service", + removeText: "Remove", + }, + fields: [ + { + rhf: "WrappedGroup", + name: "benefit-service-group", + props: { + wrapperClassName: + "ml-[0.6rem] pl-4 border-l-4 border-l-primary my-2 space-y-6", + }, + fields: [ + { + rhf: "Input", + label: "Benefit or service", + labelClassName: "font-bold", + name: "benefit-or-service", + rules: { + required: "* Required", + }, + props: { + className: "w-full", + }, + }, + { + rhf: "Textarea", + label: "How it will be provided", + labelClassName: "font-bold", + name: "how-provided", + rules: { + required: "* Required", + }, + props: { + className: "min-h-[76px]", + }, + }, + ], + }, + ], + }, + ]; + + const PCCMEntityFunctions: RHFSlotProps[] = + programLabel === SectionName.PCCMEntity + ? [ + { + rhf: "Checkbox", + description: + "In addition to PCCM services, which function(s) will the entity provide, as defined at 42 CFR 438.2?", + descriptionClassName: "font-bold", + descriptionAbove: true, + name: "delivery-system-characteristics", + rules: { + required: "* Required", + }, + props: { + options: [ + { + label: + "Provision of intensive telephonic or face-to-face case management, including operation of a nurse triage advice line", + value: "intensive-case-management", + }, + { + label: "Development of enrollee care plans", + value: "care-plans", + }, + { + label: + "Execution of contracts with and/or oversight responsibilities for the activities of FFS providers in the FFS program", + value: "ffs-provider-contracts", + }, + { + label: + "Provision of payments to FFS providers on behalf of the state", + value: "ffs-provider-payments", + }, + { + label: + "Provision of enrollee outreach and education activities", + value: "enrollee-outreach", + }, + { + label: "Operation of a customer service call center", + value: "customer-service", + }, + { + label: + "Review of provider claims, utilization, and practice patterns to conduct provider profiling and/or practice improvement", + value: "provider-claims-review", + }, + { + label: + "Implementation of quality improvement activities, including administering enrollee satisfaction surveys or collecting data necessary for performance measurement of providers", + value: "quality-improvement", + }, + { + label: + "Coordination with behavioral health systems/providers", + value: "behavioral-health-coordination", + }, + { + label: + "Coordination with long-term services and support systems/providers", + value: "ltss-coordination", + }, + { + label: "Other", + value: "other", + slots: [ + { + rhf: "Textarea", + label: "Describe", + labelClassName: "font-bold", + name: "other-description", + rules: { + required: "* Required", + }, + }, + ], + }, + ], + }, + }, + ] + : []; + + return { + title: `Other ${programLabel}-based service delivery system characteristics`, + sectionId, + subsection: true, + dependency: generateDependency({ + name: conditionalInfo.name, + expectedValue: conditionalInfo.expectedValue, + }), + form: [ + { + slots: [ + ...otherCoverage, + ...PCCMEntityFunctions, + { + rhf: "Select", + label: `Is ${programLabel} service delivery provided on less than a statewide basis?`, + labelClassName: "font-bold", + name: "service-delivery", + rules: { + required: "* Required", + }, + props: { + className: "w-[125px]", + options: [ + { label: "Yes", value: "yes" }, + { label: "No", value: "no" }, + ], + }, + }, + { + rhf: "Radio", + label: `What is the limited geographic area where ${programLabel} service delivery is available?`, + labelClassName: "font-bold", + name: "geographic-area", + rules: { + required: "* Required", + }, + props: { + options: [ + { + label: "Only in designated counties", + value: "counties", + slots: [ + { + rhf: "Input", + label: "Counties", + labelClassName: "font-bold", + name: "counties", + rules: { + required: "* Required", + }, + props: { + className: "w-full", + }, + }, + ], + }, + { + label: "Only in designated regions", + value: "regions", + slots: [ + { + rhf: "Input", + label: "Regions and makeup of each", + labelClassName: "font-bold", + name: "regions", + rules: { + required: "* Required", + }, + props: { + className: "w-full", + }, + }, + ], + }, + { + label: "Only in designated cities and municipalities", + value: "cities", + slots: [ + { + rhf: "Input", + label: "Cities and municipalities", + labelClassName: "font-bold", + name: "cities", + rules: { + required: "* Required", + }, + props: { + className: "w-full", + }, + }, + ], + }, + { + label: + "In some other geographic area (must not be smaller than a zip code)", + value: "other-geographic-area", + slots: [ + { + rhf: "Input", + label: "Geographic area", + labelClassName: "font-bold", + name: "geographic", + rules: { + required: "* Required", + }, + props: { + className: "w-full", + }, + }, + ], + }, + ], + }, + }, + ], + }, + ], + }; +} + +// "[Program] participation exclusions" +export function participationExclusions({ + conditionalInfo, + programLabel, +}: SectionParams): Section { + const sectionId = `${createSectionId(programLabel)}_participation-exclusions`; + + return { + title: `${programLabel} participation exclusions`, + sectionId, + subsection: true, + dependency: generateDependency({ + name: conditionalInfo.name, + expectedValue: conditionalInfo.expectedValue, + }), + form: [ + { + slots: [ + { + rhf: "Select", + label: `Are individuals excluded from ${programLabel} participation in the ABP?`, + labelClassName: "font-bold", + name: "participation-exclusions", + rules: { + required: "* Required", + }, + props: { + className: "w-[125px]", + options: [ + { label: "Yes", value: "yes" }, + { label: "No", value: "no" }, + ], + }, + }, + { + rhf: "Checkbox", + label: "Excluded individuals", + labelClassName: "font-bold", + name: "excluded-individuals", + rules: { + required: "* Required", + }, + props: { + options: [ + { + label: "Individuals with other medical insurance", + value: "other-insurance", + }, + { + label: "Individuals eligible for less than three months", + value: "less-than-three-months", + }, + { + label: + "Individuals in a retroactive period of Medicaid eligibility", + value: "retroactive-period", + }, + { + label: "Other", + value: "other", + slots: [ + { + rhf: "Textarea", + label: "Describe", + labelClassName: "font-bold", + name: "other-exclusions", + rules: { + required: "* Required", + }, + props: { + className: "min-h-[76px]", + }, + }, + ], + }, + ], + }, + }, + ], + }, + ], + }; +} + +// "General [program] participation requirements" +export function participationRequirements({ + conditionalInfo, + programLabel, +}: SectionParams): Section { + return { + title: `General ${programLabel} participation requirements`, + sectionId: `${createSectionId(programLabel)}-participation-requirements`, + subsection: true, + dependency: generateDependency({ + name: conditionalInfo.name, + expectedValue: conditionalInfo.expectedValue, + }), + form: [ + { + slots: [ + { + rhf: "Radio", + label: "Participation in managed care", + labelClassName: "font-bold", + name: "participation-in-managed-care", + rules: { + required: "* Required", + }, + props: { + options: [ + { + label: "Mandatory", + value: "mandatory", + slots: [ + { + rhf: "Textarea", + label: `Method of enrollment in ${programLabel}s`, + name: "mandatory-enrollment-method", + labelClassName: "font-bold", + rules: { + required: "* Required", + }, + props: { + className: "min-h-[133px]", + }, + }, + ], + }, + { + label: + "Voluntary, using the below method for effectuating enrollment", + value: "voluntary", + slots: [ + { + rhf: "Radio", + name: "voluntary-enrollment-method", + rules: { + required: "* Required", + }, + props: { + options: [ + { + label: `Affirmative selection of ${programLabel}`, + value: "affirmative-selection", + }, + { + label: `State enrolls individual in ${programLabel} (passive enrollment) and permits disenrollment`, + value: "passive-enrollment", + }, + { + label: "Other", + value: "other", + slots: [ + { + rhf: "Input", + label: "Describe", + labelClassName: "font-bold", + name: "other-voluntary-enrollment-method", + formItemClassName: "w-full", + rules: { + required: "* Required", + }, + }, + ], + }, + ], + }, + }, + ], + }, + ], + }, + }, + ], + }, + ], + }; +} + +// "Disenrollment" +export function disenrollment({ + conditionalInfo, + programLabel, +}: SectionParams): Section { + const sectionId = `${createSectionId(programLabel)}_disenrollment`; + return { + title: "Disenrollment", + sectionId: sectionId, + subsection: true, + dependency: generateDependency({ + name: conditionalInfo.name, + expectedValue: conditionalInfo.expectedValue, + }), + form: [ + { + description: + "Complete the below based on whether mandatory and/or voluntary enrollment are applicable to your program (see definitions in 42 CFR 438.54(b)).", + descriptionClassName: "font-normal", + slots: [ + { + rhf: "Select", + label: "Will the state limit disenrollment for managed care?", + labelClassName: "font-bold", + name: "limit-disenrollment", + rules: { + required: "* Required", + }, + props: { + className: "w-[125px]", + options: [ + { label: "Yes", value: "yes" }, + { label: "No", value: "no" }, + ], + }, + }, + { + rhf: "Input", + label: + "Length of time the disenrollment limitation will apply (up to 12 months)", + labelClassName: "font-bold", + name: "disenrollment-limit-length", + props: { + className: "w-full", + }, + rules: { + pattern: { + value: /^(?:1[0-2]|[1-9])$/, + message: "Must be a positive integer value up to 12", + }, + required: "* Required", + }, + }, + { + rhf: "Checkbox", + name: "assures-beneficiary-requests", + rules: { + required: "* Required", + }, + props: { + options: [ + { + label: + "The state assures that beneficiary requests for disenrollment (with and without cause) will be permitted in accordance with 42 CFR 438.56.", + value: "assures-requests", + }, + ], + }, + }, + { + rhf: "Textarea", + label: + "What is the state’s process for notifying Medicaid beneficiaries of their right to disenroll without cause during the 90 days following the date of their initial enrollment into the MCO/HIO/PAHP/PIHP/PCCM/PCCM entity (e.g., state-generated correspondence, enrollment packet), in accordance with federal requirements including 42 CFR 438.10 and 438.56?", + labelClassName: "font-bold", + name: "disenrollment-notification", + rules: { + required: "* Required", + }, + props: { + className: "min-h-[114px]", + }, + }, + { + rhf: "Textarea", + label: + "Additional circumstances of cause for disenrollment (optional)", + labelClassName: "font-bold", + name: "additional-disenrollment-cause", + props: { + className: "min-h-[114px]", + }, + }, + { + rhf: "Checkbox", + name: "disenrollment-options", + rules: { + required: "* Required", + }, + props: { + options: [ + { + label: + "The state limits disenrollment and assures it meets the requirements of 42 CFR 438.56(c).", + value: "limits-disenrollment", + }, + { + label: + "After the initial 90-day enrollment or notice period described in 42 CFR 438.56(c)(2)(i), enrollees may request MCO/HIO/PIHP/PAHP/PCCM/PCCM entity disenrollment every set number of months.", + value: "request-disenrollment", + slots: [ + { + rhf: "Input", + label: "Number of months", + labelClassName: "font-bold", + name: "disenrollment-number-months", + rules: { + pattern: { + value: /^[1-9]\d*$/, + message: "Must be a positive integer value", + }, + required: "* Required", + }, + props: { + icon: "months", + iconRight: true, + }, + }, + ], + }, + { + label: + "Enrollees submit disenrollment requests to the state or its agent.", + value: "submit-requests", + }, + { + label: + "Enrollees submit disenrollment requests to the MCO/HIO/PIHP/PAHP/PCCM/PCCM entity. The managed care plan may approve the request but may not disapprove it.", + value: `submit-requests-to-${createSectionId(programLabel)}`, + }, + { + label: + "The MCO/HIO/PIHP/PAHP/PCCM/PCCM entity may not approve or disapprove requests and must refer all disenrollment requests received to the state.", + value: `${createSectionId(programLabel)}-refers-requests`, + }, + ...(programLabel === SectionName.PCCM || + programLabel === SectionName.PCCMEntity + ? [] + : [ + { + label: + "Enrollees must seek redress through the MCO/HIO/PIHP/PAHP grievance process before the state will make a determination on the disenrollment request.", + value: "seek-redress", + }, + ]), + ], + }, + }, + { + rhf: "Textarea", + label: + "Describe the “for cause” reasons, if any, that an enrollee may request disenrollment, in addition to those listed in 42 CFR 438.56(d)(2)).", + labelClassName: "font-bold", + name: "for-cause-reasons", + rules: { + required: "* Required", + }, + props: { + className: "min-h-[76px]", + }, + }, + { + rhf: "Textarea", + label: + "Describe the processes in place to ensure disenrollments are effective no later than the first day of the second month following the month in which the enrollee requests disenrollment or the MCO/PIHP/PAHP/PCCM/PCCM entity refers the request to the state.", + labelClassName: "font-bold", + name: "disenrollment-processes", + rules: { + required: "* Required", + }, + props: { + className: "min-h-[76px]", + }, + }, + { + rhf: "Checkbox", + name: "disenrollment-request", + rules: { + required: "* Required", + }, + props: { + options: [ + { + label: + "The state does not limit disenrollment, and enrollees in MCOs/HIOs/PIHPs/PAHPs/PCCMs/PCCM entities are allowed to disenroll without cause at any time. The disenrollment is effective no later than the first day of the second month following the month in which the enrollee requests disenrollment or the MCO/PIHP/PAHP/PCCM/PCCM entity refers the request to the state.", + value: "state-does-not-limit-disenrollment", + }, + { + label: + "The state allows MCOs/PIHPs/PAHPs/PCCMs/PCCM entities to request disenrollment of enrollees.", + value: "state-allows-disenrollment", + slots: [ + { + rhf: "Checkbox", + name: "disenrollment-request-options", + rules: { + required: "* Required", + }, + props: { + options: [ + { + label: + "The MCO/PIHP/PAHP/PCCM/PCCM entity can request disenrollment of an enrollee for certain reasons. \n \n In accordance with 42 CFR 438.56(b), the MCO/PIHP/PAHP/PCCM/PCCM entity may not request disenrollment because of an adverse change in the enrollee's health status or because of the enrollee's utilization of medical services, diminished mental capacity, or uncooperative or disruptive behavior resulting from his or her special needs (except when his or her continued enrollment in the MCO/PIHP/PAHP/PCCM/PCCM entity seriously impairs the entity's ability to furnish services to either this particular enrollee or other enrollees).", + + value: "can-request-disenrollment", + optionlabelClassName: "whitespace-pre-line", + slots: [ + { + rhf: "Textarea", + label: "List and describe the reasons.", + labelClassName: "font-bold", + name: "disenrollment-request-reasons", + rules: { + required: "* Required", + }, + }, + ], + }, + { + label: + "The state reviews and approves all requests for enrollee transfers or disenrollments initiated by MCOs/PIHPs/PAHPs/PCCMs/PCCM entities.", + value: "state-reviews-requests", + }, + { + label: + "If a reassignment is approved, the state notifies the enrollee in a direct and timely manner of the desire of the MCO/PIHP/PAHP/PCCM/PCCM entity to remove the enrollee from its membership or from the PCCM’s caseload.", + value: "state-notifies-enrollee", + }, + { + label: + "The enrollee remains an enrollee of the MCO/PIHP/PAHP/PCCM/PCCM entity until another MCO/PIHP/PAHP/PCCM/PCCM entity is chosen or assigned.", + value: "enrollee-remains", + }, + ], + }, + }, + ], + }, + ], + }, + }, + ], + }, + ], + }; +} + +// "Additional information: [program]" +export function additionalInfo({ + conditionalInfo, + programLabel, +}: SectionParams): Section { + return { + title: `Additional information: ${programLabel}`, + sectionId: `additional-info-${createSectionId(programLabel)}`, + subsection: true, + dependency: generateDependency({ + name: conditionalInfo.name, + expectedValue: conditionalInfo.expectedValue, + }), + form: [ + { + slots: [ + { + rhf: "Textarea", + label: + "Additional details about this service delivery system (optional)", + labelClassName: "font-bold", + name: "additional-details", + props: { + className: "min-h-[114px]", + }, + }, + ], + }, + ], + }; +} + +// "[Program] payments" +export function payments({ + conditionalInfo, + programLabel, +}: SectionParams): Section { + const pccmEntityPayment: RHFOption[] = + programLabel === SectionName.PCCMEntity + ? [ + { + label: + "Shared savings, incentive payments, and/or financial rewards (see 42 CFR 438.310(c)(2))", + value: "shared-savings", + }, + ] + : []; + + return { + title: `${programLabel} payments`, + sectionId: `${createSectionId(programLabel)}-payments`, + subsection: true, + dependency: generateDependency({ + name: conditionalInfo.name, + expectedValue: conditionalInfo.expectedValue, + }), + form: [ + { + slots: [ + { + rhf: "Checkbox", + label: "How is payment for services handled?", + labelClassName: "font-bold", + name: `${createSectionId(programLabel)}-payment`, + rules: { + required: "* Required", + }, + props: { + options: [ + { + label: "Case management fee", + value: "case-management-fee", + }, + ...pccmEntityPayment, + { + label: "Other", + value: "other", + slots: [ + { + rhf: "Textarea", + label: "Describe", + labelClassName: "font-bold", + name: "other-payment", + rules: { + required: "* Required", + }, + }, + ], + }, + ], + }, + }, + ], + }, + ], + }; +} diff --git a/lib/libs/webforms/ABP8/v202401.ts b/lib/libs/webforms/ABP8/v202401.ts new file mode 100644 index 0000000000..f9dfc3d705 --- /dev/null +++ b/lib/libs/webforms/ABP8/v202401.ts @@ -0,0 +1,1146 @@ +import { FormSchema } from "shared-types"; +import { + additionalInfo, + createSectionId, + deliverySystemCharactaristics, + disenrollment, + generateDependency, + managedCare, + participationExclusions, + participationRequirements, + payments, + procurementOrSelection, + SectionDependencyInfo, + SectionName, +} from "./sections/v202401"; + +const formId = "abp8"; + +// Section dependency values, used for sections and sub-sections -------------- + +const deliverySystemsFormName = `${formId}_delivery-systems_managed-care-delivery-systems`; + +const sectionDependency: Record = { + HIO: { + name: deliverySystemsFormName, + expectedValue: createSectionId(SectionName.HIO), + }, + MCO: { + name: deliverySystemsFormName, + expectedValue: createSectionId(SectionName.MCO), + }, + PAHP: { + name: deliverySystemsFormName, + expectedValue: createSectionId(SectionName.PAHP), + }, + PCCM: { + name: deliverySystemsFormName, + expectedValue: createSectionId(SectionName.PCCM), + }, + PCCMEntity: { + name: deliverySystemsFormName, + expectedValue: createSectionId(SectionName.PCCMEntity), + }, + PIHP: { + name: deliverySystemsFormName, + expectedValue: createSectionId(SectionName.PIHP), + }, +}; + +// Form schema ---------------------------------------------------------------- + +export const v202401: FormSchema = { + header: "ABP 8: Service delivery systems", + formId, + sections: [ + { + title: "Delivery systems", + sectionId: "delivery-systems", + form: [ + { + description: + "Provide detail about the type of delivery system(s) the state/territory will use for the Alternative Benefit Plan's (ABP’s) benchmark benefit package or benchmark-equivalent benefit package, including any variation by the participants' geographic area.", + descriptionClassName: "font-normal", + slots: [ + { + rhf: "Checkbox", + label: "Managed care delivery systems", + name: "managed-care-delivery-systems", + labelClassName: "font-bold", + rules: { + required: "* Required", + }, + props: { + options: [ + { + label: "Managed care organization (MCO)", + value: "mco", + }, + { + label: + "Health insuring organization (HIO) (California only)", + value: "hio", + }, + { + label: "Prepaid inpatient health plan (PIHP)", + value: "pihp", + }, + { + label: "Prepaid ambulatory health plan (PAHP)", + value: "pahp", + }, + { + label: "Primary care case management (PCCM)", + value: "pccm", + }, + { + label: "Primary care case management entity (PCCM entity)", + value: "pccm-entity", + }, + ], + }, + }, + ], + }, + ], + }, + { + title: "Managed care options", + sectionId: "managed-care-options", + dependency: { + conditions: [ + { + name: deliverySystemsFormName, + type: "valueExists", + }, + ], + effect: { type: "show" }, + }, + form: [ + { + slots: [ + { + rhf: "Checkbox", + name: "state-territory-complicance", + rules: { + required: "* Required", + }, + props: { + options: [ + { + label: + "The state/territory certifies it will comply with all applicable Medicaid laws and regulations, including but not limited to Sections 1903(m), 1905(t), and 1932 of the Act and 42 CFR Part 438 in providing managed care services through this ABP.", + value: "certifies-compliance", + }, + ], + }, + }, + { + rhf: "Textarea", + label: + "Describe the implementation plan for the ABP under managed care, including member, stakeholder, and provider outreach efforts.", + name: "implementation-plan", + labelClassName: "font-bold", + rules: { + required: "* Required", + }, + props: { + className: "min-h-[114px]", + }, + }, + ], + }, + ], + }, + { + title: "Enrollment process", + sectionId: "enrollment-process", + subsection: true, + dependency: { + conditions: [ + { + name: deliverySystemsFormName, + type: "valueExists", + }, + ], + effect: { type: "show" }, + }, + form: [ + { + description: + "Complete the below based on whether voluntary and/or mandatory enrollment are applicable to your program (definitions in 42 CFR 438.54(b)).", + descriptionClassName: "font-normal", + slots: [ + { + rhf: "TextDisplay", + text: "Voluntary enrollment (42 CFR 438.54(c))", + name: "voluntary-enrollment-textdisplay", + props: { className: "text-black font-bold" }, + }, + { + rhf: "Textarea", + label: + "How does the state fulfill its obligations to provide information as specified in 42 CFR 438.10(c)(4), 42 CFR 438.10(e), and 42 CFR 438.54(c)(3)?", + labelClassName: "font-bold", + name: "voluntary-enrollment-info", + rules: { + required: "* Required", + }, + props: { + className: "min-h-[114px]", + }, + }, + { + rhf: "TextDisplay", + text: "States with voluntary enrollment must have an enrollment choice period or a passive enrollment process where the state enrolls the potential enrollee into a managed care plan, PCCM, or PCCM entity and simultaneously provides a period of time for the enrollee to make an active choice of delivery system.", + name: "states-with-voluntary-enrollment", + }, + { + rhf: "Checkbox", + label: + "Which of the following will apply to the managed care program?", + labelClassName: "font-bold", + name: "voluntary-enrollment-options", + rules: { + required: "* Required", + }, + props: { + options: [ + { + label: + "The state provides an enrollment choice period, as described in 42 CFR 438.54(c)(1)(i) and 42 CFR 438.54(c)(2)(i), during which individuals who are subject to voluntary enrollment may make an active choice to enroll in the managed care program or will otherwise continue to receive covered services through the fee-for-service (FFS) delivery system.", + value: "enrollment-choice-period", + slots: [ + { + rhf: "Input", + label: "Length of enrollment choice period", + name: "enrollment-choice-period-length", + labelClassName: "font-bold", + rules: { + required: "* Required", + }, + props: { + className: "w-full", + }, + }, + ], + }, + { + label: + "The state uses a passive enrollment process, as described in 42 CFR 438.54(c)(1)(ii) and 438.54 (c)(2)(ii), for individuals who are subject to voluntary enrollment.", + value: "passive-enrollment", + slots: [ + { + rhf: "Textarea", + label: + "Describe the method used for passive enrollment and how the method and the state’s provision of information meet all the requirements of 42 CFR 438.54(c)(4), (5), (6), (7), and (8).", + labelClassName: "font-bold", + name: "passive-enrollment-method", + rules: { + required: "* Required", + }, + props: { + className: "min-h-[114px]", + }, + }, + { + rhf: "Input", + label: + "How much time will the enrollee have to disenroll from the plan and return to the FFS delivery system?", + labelClassName: "font-bold", + name: "disenroll-time", + rules: { + required: "* Required", + }, + props: { + className: "w-full", + }, + }, + ], + }, + ], + }, + }, + { + rhf: "TextDisplay", + text: "Mandatory enrollment (42 CFR 438.54(d))", + name: "mandatory-enrollment-textdisplay", + props: { className: "text-black font-bold" }, + }, + { + rhf: "Textarea", + label: + "How will the state fulfill its obligations to provide information as specified in 42 CFR 438.10(c)(4), 42 CFR 438.10(e), and 42 CFR 438.54(d)(3)?", + labelClassName: "font-bold", + name: "mandatory-enrollment-info", + rules: { + required: "* Required", + }, + props: { + className: "min-h-[114px]", + }, + }, + { + rhf: "Checkbox", + name: "mandatory-enrollment-options", + rules: { + required: "* Required", + }, + props: { + options: [ + { + label: + "The state provides an enrollment choice period, as described in 42 CFR 438.54(d)(2)(i), during which individuals who are subject to mandatory enrollment may make an active choice to select a managed care plan or will otherwise be enrolled in a plan selected by the state’s default enrollment process.", + value: "enrollment-choice-period", + slots: [ + { + rhf: "Input", + label: "Length of enrollment choice period", + name: "enrollment-choice-period-length", + labelClassName: "font-bold", + rules: { + required: "* Required", + }, + props: { + className: "w-full", + }, + }, + ], + }, + { + label: + "The state uses a default enrollment process, as described in 42 CFR 438.54(d)(5), for individuals who are subject to mandatory enrollment.", + value: "default-enrollment", + slots: [ + { + rhf: "Textarea", + label: + "Describe the method used for default enrollment and how it meets all the requirements of 42 CFR 438.54(d)(4), (5), (7), and (8).", + labelClassName: "font-bold", + name: "default-enrollment-method", + rules: { + required: "* Required", + }, + props: { + className: "min-h-[114px]", + }, + }, + ], + }, + { + label: + "The state uses a passive enrollment process, as described in 42 CFR 438.54(d)(2), for individuals who are subject to mandatory enrollment.", + value: "passive-enrollment", + slots: [ + { + rhf: "Textarea", + label: + "Describe the method used for passive enrollment and how it meets all of the requirements of 42 CFR 438.54(d)(4), (6), (7), and (8).", + labelClassName: "font-bold", + name: "passive-enrollment-method", + rules: { + required: "* Required", + }, + props: { + className: "min-h-[114px]", + }, + }, + ], + }, + ], + }, + }, + ], + }, + ], + }, + + // MCO -------------------------------------------------------------------- + + managedCare({ + conditionalInfo: sectionDependency.MCO, + programLabel: SectionName.MCO, + title: "Managed care organizations (MCOs)", + }), + procurementOrSelection({ + programLabel: SectionName.MCO, + conditionalInfo: sectionDependency.MCO, + }), + deliverySystemCharactaristics({ + programLabel: SectionName.MCO, + conditionalInfo: sectionDependency.MCO, + }), + participationExclusions({ + programLabel: SectionName.MCO, + conditionalInfo: sectionDependency.MCO, + }), + participationRequirements({ + programLabel: SectionName.MCO, + conditionalInfo: sectionDependency.MCO, + }), + disenrollment({ + programLabel: SectionName.MCO, + conditionalInfo: sectionDependency.MCO, + }), + { + title: "Assurances", + sectionId: `${createSectionId(SectionName.MCO)}-assurances`, + subsection: true, + dependency: generateDependency({ + name: sectionDependency.MCO.name, + expectedValue: sectionDependency.MCO.expectedValue, + }), + form: [ + { + slots: [ + { + rhf: "Checkbox", + name: "assurances", + rules: { + required: "* Required", + }, + props: { + options: [ + { + label: + "The state assures all applicable managed care requirements of 42 CFR 438 and 42 CFR 449.385 will be met.", + value: "managed-care-requirements-met", + }, + { + label: + "The state assures all applicable requirements of 42 CFR 438.4, 438.5, 438.6, 438.7, 438.8, and 438.74 for payments under any risk contracts will be met.", + value: "risk-contracts-payments-requirements-met", + }, + { + label: + "The state plan program applies the rural exception to choice requirements of 42 CFR 438.52(a) for MCOs in accordance with 42 CFR 438.52(b).", + value: "rural-exception-applied", + slots: [ + { + rhf: "Input", + label: "Impacted rural counties", + labelClassName: "font-bold", + name: "rural-counties", + rules: { + required: "* Required", + }, + }, + { + rhf: "Checkbox", + name: "rural-exception-options", + rules: { + required: "* Required", + }, + props: { + options: [ + { + label: + "This provision is not applicable to this ABP state plan amendment (SPA).", + value: "not-applicable", + }, + ], + }, + }, + ], + }, + { + label: + "The state assures that, per the choice requirements in 42 CFR 438.52, Medicaid beneficiaries with mandatory enrollment in an MCO will have a choice between at least two MCOs unless the area is considered rural as defined in 42 CFR 438.52(b)(3).", + value: "mco-choice-requirements-met", + }, + { + label: + "The state assures that beneficiary requests for disenrollment (with and without cause) will be permitted in accordance with 42 CFR 438.56.", + value: "disenrollment-requests-permitted", + }, + { + label: + "The state assures the limitations on Medicaid beneficiaries to change between primary care providers will be no more restrictive than the limitations on disenrollment described at 438.56(c).", + value: "provider-change-limitations", + }, + { + label: + "If the state plan so specifies in accordance with 42 CFR 438.56(g), the state assures that the contract provides for automatic reenrollment for a beneficiary who is disenrolled solely because they lose Medicaid eligibility for a period of two months or less.", + value: "automatic-reenrollment", + }, + { + label: + "The state assures all applicable requirements of 42 CFR 438.66(a), (b), and (c) regarding a monitoring system and using data to improve the performance of its managed care program will be met.", + value: "monitoring-system-requirements-met", + }, + { + label: + "The state assures all applicable requirements of 42 CFR 438.66(d) regarding readiness assessment will be met.", + value: "readiness-assessment-requirements-met", + }, + { + label: + "The state assures all applicable requirements of 42 CFR 438.66(e) regarding reporting to CMS about the managed care program will be met.", + value: "cms-reporting-requirements-met", + }, + { + label: + "The state assures it meets all applicable requirements of 42 CFR 438.71 regarding the development and implementation of a beneficiary support system both prior to and after beneficiary enrollment in an MCO/HIO/PIHP/PAHP/PCCM/PCCM entity.", + value: "beneficiary-support-system-requirements-met", + }, + { + label: + "The state assures it appropriately identifies individuals in the mandatory exempt groups identified in 42 CFR 440.315.", + value: "mandatory-exempt-groups-identified", + }, + { + label: + "The state assures all the applicable requirements of 42 CFR regarding freedom of choice for family planning services and supplies defined in Section 1905(a)(4)(C) will be met.", + value: "family-planning-freedom-of-choice-met", + }, + ], + }, + }, + ], + }, + ], + }, + additionalInfo({ + programLabel: SectionName.MCO, + conditionalInfo: sectionDependency.MCO, + }), + + // HIO -------------------------------------------------------------------- + + managedCare({ + conditionalInfo: sectionDependency.HIO, + title: "Health insuring organizations (HIOs)", + programLabel: SectionName.HIO, + }), + procurementOrSelection({ + programLabel: SectionName.HIO, + conditionalInfo: sectionDependency.HIO, + }), + deliverySystemCharactaristics({ + programLabel: SectionName.HIO, + conditionalInfo: sectionDependency.HIO, + }), + participationExclusions({ + programLabel: SectionName.HIO, + conditionalInfo: sectionDependency.HIO, + }), + participationRequirements({ + programLabel: SectionName.HIO, + conditionalInfo: sectionDependency.HIO, + }), + disenrollment({ + programLabel: SectionName.HIO, + conditionalInfo: sectionDependency.HIO, + }), + { + title: "Assurances", + sectionId: `${createSectionId(SectionName.HIO)}-assurances`, + subsection: true, + dependency: generateDependency({ + name: sectionDependency.HIO.name, + expectedValue: sectionDependency.HIO.expectedValue, + }), + form: [ + { + slots: [ + { + rhf: "Checkbox", + name: "assurances", + rules: { + required: "* Required", + }, + props: { + options: [ + { + label: + "The state assures all applicable managed care requirements of 42 CFR 438 and 42 CFR 449.385 will be met.", + value: "managed-care-requirements-met", + }, + { + label: + "The state assures all applicable requirements of 42 CFR 438.4, 438.5, 438.6, 438.7, 438.8, and 438.74 for payments under any risk contracts will be met.", + value: "risk-contracts-payments-requirements-met", + }, + { + label: + "The state assures that, per the requirements at 438.52(c), Medicaid beneficiaries enrolled in an HIO will have a choice between at least two primary care providers within the entity.", + value: "hio-choice-requirements-met", + }, + { + label: + "The state assures that beneficiary requests for disenrollment (with and without cause) will be permitted in accordance with 42 CFR 438.56.", + value: "disenrollment-requests-permitted", + }, + { + label: + "The state assures the limitations on Medicaid beneficiaries to change between primary care providers will be no more restrictive than the limitations on disenrollment described at 438.56(c).", + value: "provider-change-limitations", + }, + { + label: + "If the state plan so specifies in accordance with 42 CFR 438.56(g), the state assures that the contract provides for automatic reenrollment for a beneficiary who is disenrolled solely because they lose Medicaid eligibility for a period of two months or less.", + value: "automatic-reenrollment", + }, + { + label: + "The state assures all applicable requirements of 42 CFR 438.66(a), (b), and (c) regarding a monitoring system and using data to improve the performance of its managed care program will be met.", + value: "monitoring-system-requirements-met", + }, + { + label: + "The state assures all applicable requirements of 42 CFR 438.66(d) regarding readiness assessment will be met.", + value: "readiness-assessment-requirements-met", + }, + { + label: + "The state assures all applicable requirements of 42 CFR 438.66(e) regarding reporting to CMS about the managed care program will be met.", + value: "cms-reporting-requirements-met", + }, + { + label: + "The state assures it meets all applicable requirements of 42 CFR 438.71 regarding the development and implementation of a beneficiary support system both prior to and after beneficiary enrollment in MCO/HIO/PIHP/PAHP/PCCM/PCCM entity.", + value: "beneficiary-support-system-requirements-met", + }, + { + label: + "The state assures it appropriately identifies individuals in the mandatory exempt groups identified in 42 CFR 440.315.", + value: "mandatory-exempt-groups-identified", + }, + { + label: + "The state assures all the applicable requirements of 42 CFR regarding freedom of choice for family planning services and supplies defined in Section 1905(a)(4)(C) will be met.", + value: "family-planning-freedom-of-choice-met", + }, + ], + }, + }, + ], + }, + ], + }, + additionalInfo({ + programLabel: SectionName.HIO, + conditionalInfo: sectionDependency.HIO, + }), + + // PIHP ------------------------------------------------------------------- + + managedCare({ + conditionalInfo: sectionDependency.PIHP, + title: "Prepaid inpatient health plans (PIHPs)", + programLabel: SectionName.PIHP, + }), + procurementOrSelection({ + conditionalInfo: sectionDependency.PIHP, + programLabel: SectionName.PIHP, + }), + deliverySystemCharactaristics({ + conditionalInfo: sectionDependency.PIHP, + programLabel: SectionName.PIHP, + }), + participationExclusions({ + conditionalInfo: sectionDependency.PIHP, + programLabel: SectionName.PIHP, + }), + participationRequirements({ + conditionalInfo: sectionDependency.PIHP, + programLabel: SectionName.PIHP, + }), + disenrollment({ + conditionalInfo: sectionDependency.PIHP, + programLabel: SectionName.PIHP, + }), + { + title: "Assurances", + sectionId: `${createSectionId(SectionName.PIHP)}-assurances`, + subsection: true, + dependency: generateDependency({ + name: sectionDependency.PIHP.name, + expectedValue: sectionDependency.PIHP.expectedValue, + }), + form: [ + { + slots: [ + { + rhf: "Checkbox", + name: "assurances", + rules: { + required: "* Required", + }, + props: { + options: [ + { + label: + "The state assures all applicable managed care requirements of 42 CFR 438 and 42 CFR 449.385 will be met.", + value: "managed-care-requirements-met", + }, + { + label: + "The state assures all applicable requirements of 42 CFR 438.2 payments under any non-risk contracts will be met.", + value: "non-risk-payments-requirements-met", + }, + { + label: + "The state assures all applicable requirements of 42 CFR 438.4, 438.5, 438.6, 438.7, 438.8, and 438.74 for payments under any risk contracts will be met.", + value: "risk-contracts-payments-requirements-met", + }, + { + label: + "The state plan program applies the rural exception to choice requirements of 42 CFR 438.52(a) for PIHPs in accordance with 42 CFR 438.52(b).", + value: "assures-rural-exception", + slots: [ + { + rhf: "Input", + label: "Impacted rural counties", + labelClassName: "font-bold", + name: "rural-counties", + rules: { + required: "* Required", + }, + }, + { + rhf: "Checkbox", + name: "rural-exception-options", + rules: { + required: "* Required", + }, + props: { + options: [ + { + label: + "This provision is not applicable to this ABP state plan amendment (SPA).", + value: "not-applicable", + }, + ], + }, + }, + ], + }, + { + label: + "The state assures that, per the choice requirements in 42 CFR 438.52, Medicaid beneficiaries with mandatory enrollment in a PIHP will have a choice between at least two PIHPs unless the area is considered rural as defined in 42 CFR 438.52(b)(3).", + value: "choice-requirements-met", + }, + { + label: + "The state assures that beneficiary requests for disenrollment (with and without cause) will be permitted in accordance with 42 CFR 438.56.", + value: "disenrollment-requests-permitted", + }, + { + label: + "The state assures the limitations on Medicaid beneficiaries to change between primary care providers will be no more restrictive than the limitations on disenrollment described at 438.56(c).", + value: "provider-change-limitations", + }, + { + label: + "If the state plan so specifies in accordance with 42 CFR 438.56(g), the state assures that the contract provides for automatic reenrollment for a beneficiary who is disenrolled solely because they lose Medicaid eligibility for a period of two months or less.", + value: "automatic-reenrollment", + }, + { + label: + "The state assures all applicable requirements of 42 CFR 438.66(a), (b), and (c) regarding a monitoring system and using data to improve the performance of its managed care program will be met.", + value: "monitoring-system-requirements-met", + }, + { + label: + "The state assures all applicable requirements of 42 CFR 438.66(d) regarding readiness assessment will be met.", + value: "readiness-assessment-requirements-met", + }, + { + label: + "The state assures all applicable requirements of 42 CFR 438.66(e) regarding reporting to CMS about the managed care program will be met.", + value: "cms-reporting-requirements-met", + }, + { + label: + "The state assures it meets all applicable requirements of 42 CFR 438.71 regarding the development and implementation of a beneficiary support system both prior to and after beneficiary enrollment in MCO/HIO/PIHP/PAHP/PCCM/PCCM entity.", + value: "beneficiary-support-system-requirements-met", + }, + { + label: + "The state assures it appropriately identifies individuals in the mandatory exempt groups identified in 42 CFR 440.315.", + value: "mandatory-exempt-groups-identified", + }, + { + label: + "The state assures all the applicable requirements of 42 CFR regarding freedom of choice for family planning services and supplies defined in Section 1905(a)(4)(C) will be met.", + value: "family-planning-freedom-of-choice-met", + }, + { + label: + "The state assures all the applicable requirements of Section 1905(t) of the Act for PCCMs and PCCM contracts (including for PCCM entities) will be met.", + value: "pccm-requirements-met", + }, + ], + }, + }, + ], + }, + ], + }, + additionalInfo({ + conditionalInfo: sectionDependency.PIHP, + programLabel: SectionName.PIHP, + }), + + // PAHP ------------------------------------------------------------------- + + managedCare({ + conditionalInfo: sectionDependency.PAHP, + programLabel: SectionName.PAHP, + title: "Prepaid ambulatory health plans (PAHPs)", + }), + procurementOrSelection({ + conditionalInfo: sectionDependency.PAHP, + programLabel: SectionName.PAHP, + }), + deliverySystemCharactaristics({ + conditionalInfo: sectionDependency.PAHP, + programLabel: SectionName.PAHP, + }), + participationExclusions({ + conditionalInfo: sectionDependency.PAHP, + programLabel: SectionName.PAHP, + }), + participationRequirements({ + conditionalInfo: sectionDependency.PAHP, + programLabel: SectionName.PAHP, + }), + disenrollment({ + conditionalInfo: sectionDependency.PAHP, + programLabel: SectionName.PAHP, + }), + { + title: "Assurances", + sectionId: `${createSectionId(SectionName.PAHP)}-assurances`, + subsection: true, + dependency: generateDependency({ + name: sectionDependency.PAHP.name, + expectedValue: sectionDependency.PAHP.expectedValue, + }), + form: [ + { + slots: [ + { + rhf: "Checkbox", + name: "assurances", + rules: { + required: "* Required", + }, + props: { + options: [ + { + label: + "The state assures all applicable managed care requirements of 42 CFR 438 and 42 CFR 449.385 will be met.", + value: "managed-care-requirements-met", + }, + { + label: + "The state assures all applicable requirements of 42 CFR 438.2 payments under any non-risk contracts will be met.", + value: "non-risk-payments-requirements-met", + }, + { + label: + "The state assures all applicable requirements of 42 CFR 438.4, 438.5, 438.6, 438.7, 438.8, and 438.74 for payments under any risk contracts will be met.", + value: "risk-contracts-payments-requirements-met", + }, + { + label: + "The state plan program applies the rural exception to choice requirements of 42 CFR 438.52(a) for PAHPs in accordance with 42 CFR 438.52(b).", + value: "assures-rural-exception", + slots: [ + { + rhf: "Input", + label: "Impacted rural counties", + labelClassName: "font-bold", + name: "rural-counties", + rules: { + required: "* Required", + }, + }, + { + rhf: "Checkbox", + name: "rural-exception-options", + rules: { + required: "* Required", + }, + props: { + options: [ + { + label: + "This provision is not applicable to this ABP state plan amendment (SPA).", + value: "not-applicable", + }, + ], + }, + }, + ], + }, + { + label: + "The state assures that, per the choice requirements in 42 CFR 438.52, Medicaid beneficiaries with mandatory enrollment in an PAHP will have a choice between at least two PAHPs unless the area is considered rural as defined in 42 CFR 438.52(b)(3).", + value: "choice-requirements-met", + }, + { + label: + "The state assures that beneficiary requests for disenrollment (with and without cause) will be permitted in accordance with 42 CFR 438.56.", + value: "disenrollment-requests-permitted", + }, + { + label: + "The state assures the limitations on Medicaid beneficiaries to change between primary care providers will be no more restrictive than the limitations on disenrollment described at 438.56(c).", + value: "provider-change-limitations", + }, + { + label: + "If the state plan so specifies in accordance with 42 CFR 438.56(g), the state assures that the contract provides for automatic reenrollment for a beneficiary who is disenrolled solely because they lose Medicaid eligibility for a period of two months or less.", + value: "automatic-reenrollment", + }, + { + label: + "The state assures all applicable requirements of 42 CFR 438.66(a), (b), and (c) regarding a monitoring system and using data to improve the performance of its managed care program will be met.", + value: "monitoring-system-requirements-met", + }, + { + label: + "The state assures all applicable requirements of 42 CFR 438.66(d) regarding readiness assessment will be met.", + value: "readiness-assessment-requirements-met", + }, + { + label: + "The state assures all applicable requirements of 42 CFR 438.66(e) regarding reporting to CMS about the managed care program will be met.", + value: "cms-reporting-requirements-met", + }, + { + label: + "The state assures it meets all applicable requirements of 42 CFR 438.71 regarding the development and implementation of a beneficiary support system both prior to and after beneficiary enrollment in MCO/HIO/PIHP/PAHP/PCCM/PCCM entity.", + value: "beneficiary-support-system-requirements-met", + }, + { + label: + "The state assures it appropriately identifies individuals in the mandatory exempt groups identified in 42 CFR 440.315.", + value: "mandatory-exempt-groups-identified", + }, + { + label: + "The state assures all the applicable requirements of 42 CFR regarding freedom of choice for family planning services and supplies defined in Section 1905(a)(4)(C) will be met.", + value: "family-planning-freedom-of-choice-met", + }, + { + label: + "The state assures all the applicable requirements of Section 1905(t) of the Act for PCCMs and PCCM contracts (including for PCCM entities) will be met.", + value: "pccm-requirements-met", + }, + ], + }, + }, + ], + }, + ], + }, + additionalInfo({ + conditionalInfo: sectionDependency.PAHP, + programLabel: SectionName.PAHP, + }), + + // PCCM ------------------------------------------------------------------- + + managedCare({ + conditionalInfo: sectionDependency.PCCM, + programLabel: SectionName.PCCM, + title: "Primary care case management (PCCM)", + }), + deliverySystemCharactaristics({ + conditionalInfo: sectionDependency.PCCM, + programLabel: SectionName.PCCM, + }), + payments({ + conditionalInfo: sectionDependency.PCCM, + programLabel: SectionName.PCCM, + }), + disenrollment({ + conditionalInfo: sectionDependency.PCCM, + programLabel: SectionName.PCCM, + }), + { + title: "Assurances", + sectionId: `${createSectionId(SectionName.PCCM)}-assurances`, + subsection: true, + dependency: generateDependency({ + name: sectionDependency.PCCM.name, + expectedValue: sectionDependency.PCCM.expectedValue, + }), + form: [ + { + slots: [ + { + rhf: "Checkbox", + name: "assurances", + rules: { + required: "* Required", + }, + props: { + options: [ + { + label: + "The state assures all applicable managed care requirements of 42 CFR 438 and 42 CFR 449.385 will be met.", + value: "managed-care-requirements-met", + }, + { + label: + "The state assures that, per the choice requirements in 42 CFR 438.52, Medicaid beneficiaries with mandatory enrollment in a PCCM system will have a choice of at least two primary care case managers employed by or contracted with the state.", + value: "non-risk-payments-requirements-met", + }, + { + label: + "The state assures that beneficiary requests for disenrollment (with and without cause) will be permitted in accordance with 42 CFR 438.56.", + value: "disenrollment-requests-permitted", + }, + { + label: + "If the state plan so specifies in accordance with 42 CFR 438.56(g), the state assures that the contract provides for automatic reenrollment for a beneficiary who is disenrolled solely because they lose Medicaid eligibility for a period of two months or less.", + value: "automatic-reenrollment", + }, + { + label: + "The state assures it meets all applicable requirements of 42 CFR 438.71 regarding the development and implementation of a beneficiary support system both prior to and after beneficiary enrollment in MCO/HIO/PIHP/PAHP/PCCM/PCCM entity.", + value: "beneficiary-support-system-requirements-met", + }, + { + label: + "The state assures it appropriately identifies individuals in the mandatory exempt groups identified in 42 CFR 440.315.", + value: "mandatory-exempt-groups-identified", + }, + { + label: + "The state assures all the applicable requirements of 42 CFR regarding freedom of choice for family planning services and supplies defined in Section 1905(a)(4)(C) will be met.", + value: "family-planning-freedom-of-choice-met", + }, + { + label: + "The state assures all the applicable requirements of Section 1905(t) of the Act for PCCMs and PCCM contracts (including for PCCM entities) will be met.", + value: "pccm-requirements-met", + }, + ], + }, + }, + ], + }, + ], + }, + additionalInfo({ + conditionalInfo: sectionDependency.PCCM, + programLabel: SectionName.PCCM, + }), + + // PCCM entity ------------------------------------------------------------ + + managedCare({ + conditionalInfo: sectionDependency.PCCMEntity, + programLabel: SectionName.PCCMEntity, + title: "PCCM entity", + }), + deliverySystemCharactaristics({ + conditionalInfo: sectionDependency.PCCMEntity, + programLabel: SectionName.PCCMEntity, + }), + payments({ + conditionalInfo: sectionDependency.PCCMEntity, + programLabel: SectionName.PCCMEntity, + }), + disenrollment({ + conditionalInfo: sectionDependency.PCCMEntity, + programLabel: SectionName.PCCMEntity, + }), + { + title: "Assurances", + sectionId: `${createSectionId(SectionName.PCCMEntity)}-assurances`, + subsection: true, + dependency: generateDependency({ + name: sectionDependency.PCCMEntity.name, + expectedValue: sectionDependency.PCCMEntity.expectedValue, + }), + form: [ + { + slots: [ + { + rhf: "Checkbox", + name: "assurances", + rules: { + required: "* Required", + }, + props: { + options: [ + { + label: + "The state assures that all the applicable requirements of the ABP for the state’s option to limit freedom of choice by requiring beneficiaries to receive their benefits through managed care entities will be met.", + value: "freedom-of-choice-requirements-met", + }, + { + label: + "The state assures all applicable managed care requirements of 42 CFR 438 and 42 CFR 449.385 will be met.", + value: "managed-care-requirements-met", + }, + { + label: + "The state assures that, per the choice requirements in 42 CFR 438.52, Medicaid beneficiaries with mandatory enrollment in a PCCM entity may be limited to a single PCCM entity and will have a choice of at least two PCCMs employed by or contracted with the PCCM entity.", + value: "choice-requirements-met", + }, + { + label: + "The state assures that beneficiary requests for disenrollment (with and without cause) will be permitted in accordance with 42 CFR 438.56.", + value: "disenrollment-requests-permitted", + }, + { + label: + "If the state plan so specifies in accordance with 42 CFR 438.56(g), the state assures that the contract provides for automatic reenrollment for a beneficiary who is disenrolled solely because they lose Medicaid eligibility for a period of two months or less.", + value: "automatic-reenrollment", + }, + { + label: + "The state assures all applicable requirements of 42 CFR 438.66(a), (b), and (c) regarding a monitoring system and using data to improve the performance of its managed care program will be met.", + value: "monitoring-system-requirements-met", + }, + { + label: + "The state assures all applicable requirements of 42 CFR 438.66(d) regarding readiness assessment will be met.", + value: "readiness-assessment-requirements-met", + }, + { + label: + "The state assures all applicable requirements of 42 CFR 438.66(e) regarding reporting to CMS about the managed care program will be met.", + value: "cms-reporting-requirements-met", + }, + { + label: + "The state assures it meets all applicable requirements of 42 CFR 438.71 regarding the development and implementation of a beneficiary support system both prior to and after beneficiary enrollment in MCO/PIHP/PAHP/PCCM/PCCM entity.", + value: "beneficiary-support-system-requirements-met", + }, + { + label: + "The state assures it appropriately identifies individuals in the mandatory exempt groups identified in 42 CFR 440.315.", + value: "mandatory-exempt-groups-identified", + }, + { + label: + "The state assures all the applicable requirements of Section 1905(t) of the Act for PCCMs and PCCM contracts (including for PCCM entities) will be met.", + value: "pccm-requirements-met", + }, + { + label: + "The state assures all the applicable requirements of 42 CFR regarding freedom of choice for family planning services and supplies defined in Section 1905(a)(4)(C) will be met.", + value: "family-planning-freedom-of-choice-met", + }, + ], + }, + }, + ], + }, + ], + }, + additionalInfo({ + conditionalInfo: sectionDependency.PCCMEntity, + programLabel: SectionName.PCCMEntity, + }), + ], +}; diff --git a/lib/libs/webforms/CS3/index.ts b/lib/libs/webforms/CS3/index.ts new file mode 100644 index 0000000000..e5cf77f4fe --- /dev/null +++ b/lib/libs/webforms/CS3/index.ts @@ -0,0 +1 @@ +export * from "./v202401"; diff --git a/lib/libs/webforms/CS3/v202401.ts b/lib/libs/webforms/CS3/v202401.ts new file mode 100644 index 0000000000..2c80ce7fcd --- /dev/null +++ b/lib/libs/webforms/CS3/v202401.ts @@ -0,0 +1,147 @@ +import { FormSchema } from "shared-types"; + +export const v202401: FormSchema = { + header: "CS 3: Eligibility for Medicaid expansion program", + subheader: "42 CFR 457.320(a)(2) and (3)", + formId: "cs3", + sections: [ + { + title: "Income standards", + sectionId: "income-standards", + form: [ + { + description: + "Income eligibility for children under the Medicaid expansion is determined in accordance with the following income standards:", + descriptionClassName: "text-base", + slots: [ + { + name: "inc-standards", + rhf: "WrappedGroup", + label: "Age and household income ranges", + description: + "There should be no overlaps in or gaps between ages.", + descriptionAbove: true, + labelClassName: "font-bold", + fields: [ + { + rhf: "FieldArray", + name: "age-and-house-inc-range", + + props: { + appendText: "Add range", + }, + fields: [ + { + rhf: "Select", + name: "from-age", + labelClassName: "text-black font-bold", + label: "From age", + formItemClassName: "w-[125px]", + rules: { + required: "* Required", + }, + props: { + options: [ + { value: "0", label: "0" }, + { value: "1", label: "1" }, + { value: "2", label: "2" }, + { value: "3", label: "3" }, + { value: "4", label: "4" }, + { value: "5", label: "5" }, + { value: "6", label: "6" }, + { value: "7", label: "7" }, + { value: "8", label: "8" }, + { value: "9", label: "9" }, + { value: "10", label: "10" }, + { value: "11", label: "11" }, + { value: "12", label: "12" }, + { value: "13", label: "13" }, + { value: "14", label: "14" }, + { value: "15", label: "15" }, + { value: "16", label: "16" }, + { value: "17", label: "17" }, + { value: "18", label: "18" }, + { value: "19", label: "19" }, + ], + }, + }, + { + rhf: "Select", + name: "to-age", + labelClassName: "text-black font-bold", + label: "To age", + formItemClassName: "w-[125px]", + rules: { + required: "* Required", + }, + props: { + options: [ + { value: "0", label: "0" }, + { value: "1", label: "1" }, + { value: "2", label: "2" }, + { value: "3", label: "3" }, + { value: "4", label: "4" }, + { value: "5", label: "5" }, + { value: "6", label: "6" }, + { value: "7", label: "7" }, + { value: "8", label: "8" }, + { value: "9", label: "9" }, + { value: "10", label: "10" }, + { value: "11", label: "11" }, + { value: "12", label: "12" }, + { value: "13", label: "13" }, + { value: "14", label: "14" }, + { value: "15", label: "15" }, + { value: "16", label: "16" }, + { value: "17", label: "17" }, + { value: "18", label: "18" }, + { value: "19", label: "19" }, + ], + }, + }, + { + rhf: "Input", + name: "above", + labelClassName: "text-black font-bold", + label: "Above", + formItemClassName: "w-[159px]", + props: { + icon: "% FPL", + iconRight: true, + }, + rules: { + pattern: { + value: /^[0-9]\d*$/, + message: "Must be a positive integer value", + }, + required: "* Required", + }, + }, + { + rhf: "Input", + name: "up-to-and-including", + labelClassName: "text-black font-bold", + label: "Up to and including", + formItemClassName: "w-[159px]", + rules: { + pattern: { + value: /^[0-9]\d*$/, + message: "Must be a positive integer value", + }, + required: "* Required", + }, + props: { + icon: "% FPL", + iconRight: true, + }, + }, + ], + }, + ], + }, + ], + }, + ], + }, + ], +}; diff --git a/lib/libs/webforms/index.ts b/lib/libs/webforms/index.ts index a574d396e1..c6e343ae97 100644 --- a/lib/libs/webforms/index.ts +++ b/lib/libs/webforms/index.ts @@ -8,9 +8,11 @@ import * as ABP4 from "./ABP4"; import * as ABP5 from "./ABP5"; import * as ABP6 from "./ABP6"; import * as ABP7 from "./ABP7"; +import * as ABP8 from "./ABP8"; import * as ABP9 from "./ABP9"; import * as ABP10 from "./ABP10"; import * as ABP11 from "./ABP11"; +import * as CS3 from "./CS3"; import * as G2A from "./G2A"; import * as G1 from "./G1"; import * as G2B from "./G2B"; @@ -50,6 +52,9 @@ export const webformVersions: Record> = { ABP7: { v202401: ABP7.v202401, }, + ABP8: { + v202401: ABP8.v202401, + }, ABP9: { v202401: ABP9.v202401, }, @@ -59,6 +64,9 @@ export const webformVersions: Record> = { ABP11: { v202401: ABP11.v202401, }, + CS3: { + v202401: CS3.v202401, + }, G1: { v202401: G1.v202401, }, diff --git a/lib/local-constructs/clamav-scanning/package-lock.json b/lib/local-constructs/clamav-scanning/package-lock.json index d8d704d608..eff2aae376 100644 --- a/lib/local-constructs/clamav-scanning/package-lock.json +++ b/lib/local-constructs/clamav-scanning/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@aws-sdk/client-s3": "^3.614.0", "@types/mime-types": "^2.1.4", - "file-type": "^19.1.1", + "file-type": "^19.3.0", "mime-types": "^2.1.35", "pino": "^9.3.1" }, @@ -2142,12 +2142,12 @@ } }, "node_modules/file-type": { - "version": "19.1.1", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-19.1.1.tgz", - "integrity": "sha512-FF4rVPjylL7HkybFBpnBfcnpdi4MGNSFuk4s4VvTdt1wm9tVMdGmtBhvXyz+nh8565FJ5qDUMIPXR+WHLrfHew==", + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-19.3.0.tgz", + "integrity": "sha512-mROwiKLZf/Kwa/2Rol+OOZQn1eyTkPB3ZTwC0ExY6OLFCbgxHYZvBm7xI77NvfZFMKBsmuXfmLJnD4eEftEhrA==", "license": "MIT", "dependencies": { - "strtok3": "^7.1.0", + "strtok3": "^8.0.0", "token-types": "^6.0.0", "uint8array-extras": "^1.3.0" }, @@ -2205,9 +2205,9 @@ } }, "node_modules/peek-readable": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-5.1.3.tgz", - "integrity": "sha512-kCsc9HwH5RgVA3H3VqkWFyGQwsxUxLdiSX1d5nqAm7hnMFjNFX1VhBLmJoUY0hZNc8gmDNgBkLjfhiWPsziXWA==", + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-5.1.4.tgz", + "integrity": "sha512-E7mY2VmKqw9jYuXrSWGHFuPCW2SLQenzXLF3amGaY6lXXg4/b3gj5HVM7h8ZjCO/nZS9ICs0Cz285+32FvNd/A==", "license": "MIT", "engines": { "node": ">=14.16" @@ -2352,13 +2352,13 @@ "license": "MIT" }, "node_modules/strtok3": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-7.1.1.tgz", - "integrity": "sha512-mKX8HA/cdBqMKUr0MMZAFssCkIGoZeSCMXgnt79yKxNFguMLVFgRe6wB+fsL0NmoHDbeyZXczy7vEPSoo3rkzg==", + "version": "8.0.5", + "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-8.0.5.tgz", + "integrity": "sha512-yybH4XOcYsQLSiPCRSqCdC6Nz6mtceq84y1RtBPfPSM2yKjeQKQDZGvQ2JwcT9jlCX1Eb5Gu0OqRhCfhOFhRvQ==", "license": "MIT", "dependencies": { "@tokenizer/token": "^0.3.0", - "peek-readable": "^5.1.3" + "peek-readable": "^5.1.4" }, "engines": { "node": ">=16" diff --git a/lib/local-constructs/clamav-scanning/package.json b/lib/local-constructs/clamav-scanning/package.json index 0c40f8446d..8a5e7ffaf8 100644 --- a/lib/local-constructs/clamav-scanning/package.json +++ b/lib/local-constructs/clamav-scanning/package.json @@ -21,7 +21,7 @@ "dependencies": { "@aws-sdk/client-s3": "^3.614.0", "@types/mime-types": "^2.1.4", - "file-type": "^19.1.1", + "file-type": "^19.3.0", "mime-types": "^2.1.35", "pino": "^9.3.1" } diff --git a/lib/stacks/auth.ts b/lib/stacks/auth.ts index 252e247b4f..3f32a96e49 100644 --- a/lib/stacks/auth.ts +++ b/lib/stacks/auth.ts @@ -95,6 +95,7 @@ export class Auth extends cdk.NestedStack { customAttributes: { state: new cdk.aws_cognito.StringAttribute({ mutable: true }), "cms-roles": new cdk.aws_cognito.StringAttribute({ mutable: true }), + "username": new cdk.aws_cognito.StringAttribute({ mutable: true }), }, }); let userPoolIdentityProviderOidc: diff --git a/react-app/src/components/Banner/banner.tsx b/react-app/src/components/Banner/banner.tsx new file mode 100644 index 0000000000..48adf4c858 --- /dev/null +++ b/react-app/src/components/Banner/banner.tsx @@ -0,0 +1,81 @@ +import { useEffect, useState } from "react"; +import { Alert, AlertVariant } from "../Alert"; +import { Check, X } from "lucide-react"; +import { useLocation } from "react-router-dom"; +import { Observer } from "@/utils/basic-observable"; + +export type Banner = { + header: string; + body: string; + variant?: AlertVariant; + pathnameToDisplayOn: string; +}; + +class BannerObserver extends Observer { + create = (data: Banner) => { + this.publish(data); + this.observed = { ...data }; + }; + + dismiss = () => { + this.publish(null); + this.observed = null; + }; +} + +const bannerState = new BannerObserver(); + +export const banner = (newBanner: Banner) => { + return bannerState.create(newBanner); +}; + +export const Banner = () => { + const [activeBanner, setActiveBanner] = useState(null); + const { pathname } = useLocation(); + + const onClose = () => { + bannerState.dismiss(); + }; + + useEffect(() => { + const unsubscribe = bannerState.subscribe((banner) => { + if (banner) { + setActiveBanner(banner); + } else { + setActiveBanner(null); + } + }); + + return unsubscribe; + }, []); + + useEffect(() => { + if (activeBanner && activeBanner.pathnameToDisplayOn !== pathname) { + onClose(); + } + }, [pathname, activeBanner]); + + if (activeBanner && activeBanner.pathnameToDisplayOn === pathname) { + return ( + +
+ +
+

+ {activeBanner.header} +

+

{activeBanner.body}

+
+ +
+
+ ); + } + + return null; +}; diff --git a/react-app/src/components/Banner/index.ts b/react-app/src/components/Banner/index.ts new file mode 100644 index 0000000000..b545097ef0 --- /dev/null +++ b/react-app/src/components/Banner/index.ts @@ -0,0 +1 @@ +export * from "./banner"; diff --git a/react-app/src/components/ConfirmationDialog/ConfirmationDialog.tsx b/react-app/src/components/ConfirmationDialog/ConfirmationDialog.tsx index 0464d5ed38..e2b97d0c6c 100644 --- a/react-app/src/components/ConfirmationDialog/ConfirmationDialog.tsx +++ b/react-app/src/components/ConfirmationDialog/ConfirmationDialog.tsx @@ -53,6 +53,7 @@ export function ConfirmationDialog({ className={cn({ "flex-col sm:flex-row-reverse sm:justify-start": areButtonsReversed, })} + data-testid="dialog-footer" > {acceptButtonVisible && ( - - - - )} - {children} - - ); -}; diff --git a/react-app/src/components/Context/index.ts b/react-app/src/components/Context/index.ts index d5fcda16ea..bba969cc93 100644 --- a/react-app/src/components/Context/index.ts +++ b/react-app/src/components/Context/index.ts @@ -1,3 +1 @@ export * from "./userContext"; -export * from "./alertContext"; -export * from "./alertContext"; diff --git a/react-app/src/components/Form/content/ContentWrappers.tsx b/react-app/src/components/Form/content/ContentWrappers.tsx index f252a8c370..0e21a05a02 100644 --- a/react-app/src/components/Form/content/ContentWrappers.tsx +++ b/react-app/src/components/Form/content/ContentWrappers.tsx @@ -1,4 +1,4 @@ -import { ReactElement, ReactNode, useMemo } from "react"; +import { ReactElement, ReactNode } from "react"; import { Info } from "lucide-react"; import { Alert, @@ -6,7 +6,6 @@ import { PackageSection, SectionCard, } from "@/components"; -import { useFormContext } from "react-hook-form"; import { TEPackageSection } from "@/features/package-actions/lib/modules/temporary-extension/legacy-components"; import clsx from "clsx"; @@ -116,17 +115,3 @@ export const PreSubmitNotice = ({ )} ); - -export const ErrorBanner = () => { - const form = useFormContext(); - const errorLen = useMemo( - () => Object.keys(form.formState.errors).length, - [form.formState.errors], - ); - - return errorLen !== 0 ? ( - - Missing or malformed information. Please see errors above. - - ) : null; -}; diff --git a/react-app/src/components/Layout/index.tsx b/react-app/src/components/Layout/index.tsx index 0ea97a796f..db99cc4720 100644 --- a/react-app/src/components/Layout/index.tsx +++ b/react-app/src/components/Layout/index.tsx @@ -12,7 +12,7 @@ import { useUserContext } from "../Context"; import * as DropdownMenu from "@radix-ui/react-dropdown-menu"; import config from "@/config"; import { useNavigate } from "../Routing"; -import { AlertProvider, UserPrompt } from "@/components"; +import { SimplePageContainer, UserPrompt, Banner } from "@/components"; import { isFaqPage, isProd } from "@/utils"; const useGetLinks = () => { @@ -150,9 +150,10 @@ export const Layout = () => {
- - - + + + +