Skip to content

Commit

Permalink
Match forms to design
Browse files Browse the repository at this point in the history
  • Loading branch information
charmcitygavin committed Aug 9, 2024
1 parent 06bbb44 commit 9838172
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 20 deletions.
80 changes: 64 additions & 16 deletions lib/libs/webforms/ABP8/sections.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { DependencyRule, Section } from "shared-types";
import { DependencyRule, RHFSlotProps, Section } from "shared-types";

const formId = "abp8";

Check failure on line 3 in lib/libs/webforms/ABP8/sections.ts

View workflow job for this annotation

GitHub Actions / lint

'formId' is assigned a value but never used

export enum SectionName {
HIO = "HIO",
Expand Down Expand Up @@ -225,17 +227,12 @@ export function deliverySystemCharactaristics({
conditionalInfo,
programLabel,
}: SectionParams): Section {
return {
title: `Other ${programLabel}-based service delivery system characteristics`,
sectionId: `${createSectionId(programLabel)}-service-delivery`,
subsection: true,
dependency: generateDependency(
conditionalInfo.name,
conditionalInfo.expectedValue,
),
form: [
{
slots: [
const sectionId = `${createSectionId(programLabel)}_delivery-system`;

const otherCoverage: RHFSlotProps[] =
programLabel === SectionName.PCCM
? []
: [
{
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?`,
Expand All @@ -261,7 +258,7 @@ export function deliverySystemCharactaristics({
fields: [
{
rhf: "WrappedGroup",
name: "benefit-service",
name: "benefit-service-group",
props: {
wrapperClassName:
"ml-[0.6rem] pl-4 border-l-4 border-l-primary my-2 space-y-6",
Expand All @@ -271,7 +268,7 @@ export function deliverySystemCharactaristics({
rhf: "Input",
label: "Benefit or service",
labelClassName: "font-bold",
name: "benefit-service",
name: "benefit-or-service",
props: {
className: "w-full",
},
Expand All @@ -289,6 +286,20 @@ export function deliverySystemCharactaristics({
},
],
},
];

return {
title: `Other ${programLabel}-based service delivery system characteristics`,
sectionId,
subsection: true,
dependency: generateDependency(
conditionalInfo.name,
conditionalInfo.expectedValue,
),
form: [
{
slots: [
...otherCoverage,
{
rhf: "Select",
label: `Is ${programLabel} service delivery provided on less than a statewide basis?`,
Expand Down Expand Up @@ -384,9 +395,11 @@ export function participationExclusions({
conditionalInfo,
programLabel,
}: SectionParams): Section {
const sectionId = `${createSectionId(programLabel)}_participation-exclusions`;

return {
title: `${programLabel} participation exclusions`,
sectionId: `${createSectionId(programLabel)}-participation-exclusions`,
sectionId,
subsection: true,
dependency: generateDependency(
conditionalInfo.name,
Expand Down Expand Up @@ -435,6 +448,7 @@ export function participationExclusions({
{
rhf: "Textarea",
label: "Describe",
labelClassName: "font-bold",
name: "other-exclusions",
props: {
className: "min-h-[76px]",
Expand Down Expand Up @@ -539,9 +553,10 @@ export function disenrollment({
conditionalInfo,
programLabel,
}: SectionParams): Section {
const sectionId = `${createSectionId(programLabel)}_disenrollment`;
return {
title: "Disenrollment",
sectionId: "disenrollment",
sectionId: sectionId,
subsection: true,
dependency: generateDependency(
conditionalInfo.name,
Expand Down Expand Up @@ -575,6 +590,13 @@ export function disenrollment({
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",
Expand Down Expand Up @@ -774,6 +796,32 @@ export function assurances({
"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: "assures-payments",
},
{
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: "assures-rural-exception",
slots: [
{
rhf: "Input",
label: "Impacted rural counties",
labelClassName: "font-bold",
name: "rural-counties",
},
{
rhf: "Checkbox",
name: "rural-exception-options",
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 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.",
Expand Down
4 changes: 0 additions & 4 deletions lib/libs/webforms/ABP8/v202401.ts
Original file line number Diff line number Diff line change
Expand Up @@ -467,10 +467,6 @@ export const v202401: FormSchema = {
programLabel: SectionName.PCCM,
title: "Primary care case management (PCCM)",
}),
procurementOrSelection({
conditionalInfo: sectionDependency.PCCM,
programLabel: SectionName.PCCM,
}),
deliverySystemCharactaristics({
conditionalInfo: sectionDependency.PCCM,
programLabel: SectionName.PCCM,
Expand Down

0 comments on commit 9838172

Please sign in to comment.