Skip to content

Commit

Permalink
Merge pull request #654 from Enterprise-CMCS/master
Browse files Browse the repository at this point in the history
Release to val
  • Loading branch information
daniel-belcher authored Jul 18, 2024
2 parents daf4e8c + fd5b7c0 commit 555a0a9
Show file tree
Hide file tree
Showing 34 changed files with 1,403 additions and 252 deletions.
19 changes: 13 additions & 6 deletions src/packages/shared-types/forms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,16 @@ export type RHFSlotProps = {
rhf: K;
props?: RHFComponentMap[K];
text?: K extends "TextDisplay" ? RHFTextField : never;
fields?: K extends "FieldArray"
fields?: K extends "FieldArray" | "FieldGroup" | "WrappedGroup"
? RHFSlotProps[]
: K extends "FieldGroup"
? RHFSlotProps[]
: never;
: never;
};
}[keyof RHFComponentMap];

export type RHFTextField =
| Array<
| {
text: string;
text?: string;
type?: RHFTextItemType;
link?: string;
listType?: "ordered" | "unordered";
Expand Down Expand Up @@ -89,14 +87,16 @@ export type RHFOption = {
optionlabelClassName?: string;
};

export type SortFuncs = "noSort" | "reverseSort";

export type RHFComponentMap = {
Input: InputProps & {
label?: string;
description?: string;
};
Textarea: TextareaProps;
Switch: SwitchProps;
Select: SelectProps & { sort?: "ascending" | "descending" };
Select: SelectProps & { customSort?: SortFuncs };
Multiselect: MultiselectProps;
Radio: RadioProps & {
options: RHFOption[];
Expand All @@ -111,12 +111,15 @@ export type RHFComponentMap = {
};
FieldArray: {
appendText?: string;
fieldArrayClassName?: string;
};
FieldGroup: {
appendText?: string;
removeText?: string;
fieldArrayClassName?: string;
};
TextDisplay: { className?: string };
WrappedGroup: { wrapperClassName?: string };
};

export type FormGroup = {
Expand Down Expand Up @@ -145,10 +148,13 @@ export type FieldArrayProps<
TFieldArrayName extends FieldArrayPath<T> = FieldArrayPath<T>,
> = {
control: Control<T, unknown>;
rhf: keyof RHFComponentMap;
name: TFieldArrayName;
fields: RHFSlotProps[];
parentId?: string;
appendText?: string;
removeText?: string;
fieldArrayClassName?: string;
};

export type FieldGroupProps<
Expand All @@ -160,6 +166,7 @@ export type FieldGroupProps<
fields: RHFSlotProps[];
appendText?: string;
removeText?: string;
fieldArrayClassName?: string;
parentId?: string;
};

Expand Down
1 change: 0 additions & 1 deletion src/services/api/webforms/ABP1/v202401.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ export const v202401: FormSchema = {
},
label: "Eligibility group",
props: {
sort: "ascending",
className: "min-w-[300px]",
options: [
{
Expand Down
1 change: 0 additions & 1 deletion src/services/api/webforms/ABP1/v202402.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ export const v202402: FormSchema = {
label: "Eligibility group",
labelClassName: "font-bold",
props: {
sort: "ascending",
className: "w-[300px]",
options: [
{
Expand Down
12 changes: 6 additions & 6 deletions src/services/api/webforms/ABP2A/v202401.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const v202401: FormSchema = {
{
text: "The state/territory has fully aligned its EHB-defined Alternative Benefit Plan (ABP) benefits with its approved Medicaid state plan.",
type: "default",
classname: "font-bold block py-1",
classname: "font-bold block pb-1",
},
{
text: "Therefore, the state/territory meets the requirements for voluntary choice of benefit package for individuals exempt from mandatory participation in a Section 1937 ABP.",
Expand Down Expand Up @@ -109,7 +109,7 @@ export const v202401: FormSchema = {
{
text: "Once an individual is identified, the state/territory assures it will effectively inform the individual:",
type: "default",
classname: "block py-1",
classname: "block pb-1",
},
{
text: "A. That enrollment in the specified ABP is voluntary",
Expand All @@ -134,7 +134,7 @@ export const v202401: FormSchema = {
{
text: "The state/territory assures it will inform the individual of:",
type: "default",
classname: "block py-1",
classname: "block pb-1",
},
{
text: "A. The benefits available as ABP coverage defined using Section 1937 requirements as compared to ABP coverage defined as the state/territory's approved Medicaid state plan and not subject to Section 1937 requirements",
Expand Down Expand Up @@ -268,7 +268,7 @@ export const v202401: FormSchema = {
{
text: "The state/territory assures it will document in the exempt individual's eligibility file that the individual:",
type: "default",
classname: "block py-1",
classname: "block pb-1",
},
{
text: "A. Was informed in accordance with this section prior to enrollment",
Expand All @@ -281,7 +281,7 @@ export const v202401: FormSchema = {
classname: "block py-1",
},
{
text: " C. Chose to enroll in ABP coverage subject to Section 1937 requirements or defined as the state/territory's approved Medicaid state plan not subject to Section 1937 requirements",
text: "C. Chose to enroll in ABP coverage subject to Section 1937 requirements or defined as the state/territory's approved Medicaid state plan not subject to Section 1937 requirements",
},
],
value:
Expand Down Expand Up @@ -339,7 +339,7 @@ export const v202401: FormSchema = {
descriptionClassName: "font-bold text-black",
description:
"What documentation will be maintained in the eligibility file?",
formItemClassName: "border-b-4",
formItemClassName: "pb-6 border-b-[1px] border-[#AEB0B5]",
rules: {
required: "* Required",
},
Expand Down
12 changes: 6 additions & 6 deletions src/services/api/webforms/ABP2B/v202401.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const v202401: FormSchema = {
{
text: "Effectively inform individuals who voluntarily enroll:",
type: "default",
classname: "block py-1",
classname: "block pb-1",
},
{
text: "A. That enrollment is voluntary",
Expand All @@ -57,7 +57,7 @@ export const v202401: FormSchema = {
{
text: "C. What the process is for disenrolling",
type: "default",
classname: "block py-1",
classname: "block pt-1",
},
],
value:
Expand All @@ -68,7 +68,7 @@ export const v202401: FormSchema = {
{
text: "Inform individuals of:",
type: "default",
classname: "block py-1",
classname: "block pb-1",
},
{
text: "A. The benefits available under the ABP",
Expand All @@ -78,7 +78,7 @@ export const v202401: FormSchema = {
{
text: "B. The costs of the different benefit packages and a comparison of how the ABP differs from the approved Medicaid state/territory plan",
type: "default",
classname: "block py-1",
classname: "block pt-1",
},
],
value:
Expand Down Expand Up @@ -192,7 +192,7 @@ export const v202401: FormSchema = {
{
text: "The state/territory assures it will document in the exempt individual's eligibility file that the individual:",
type: "default",
classname: "block py-1",
classname: "block pb-1",
},
{
text: "A. Was informed in accordance with this section prior to enrollment",
Expand Down Expand Up @@ -263,7 +263,7 @@ export const v202401: FormSchema = {
descriptionClassName: "font-bold text-black",
description:
"What documentation will be maintained in the eligibility file?",
formItemClassName: "border-b-4",
formItemClassName: "pb-6 border-b-[1px] border-[#AEB0B5]",
rules: {
required: "* Required",
},
Expand Down
2 changes: 1 addition & 1 deletion src/services/api/webforms/ABP2C/v202401.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const v202401: FormSchema = {
styledLabel: [
{
text: "The state/territory assures it will appropriately identify any individuals in the eligibility groups who:",
classname: "block py-1",
classname: "block pb-1",
},
{
text: "A. Are exempt from mandatory enrollment in an ABP",
Expand Down
22 changes: 11 additions & 11 deletions src/services/api/webforms/ABP3_1/v202401.ts
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ export const v202401: FormSchema = {
rhf: "Select",
name: "is-geo-area",
label: "State/territory",
labelClassName: "mt-3 pr-4 font-bold",
labelClassName: "font-bold",
formItemClassName: "flex-row",
props: {
className: "w-[256px]",
Expand Down Expand Up @@ -607,7 +607,7 @@ export const v202401: FormSchema = {
rhf: "Select",
name: "ambulatory-patient-services-state-territory",
label: "From state/territory",
labelClassName: "p-3 font-bold",
labelClassName: "font-bold",
formItemClassName: "flex-row",
props: {
className: "w-[256px]",
Expand Down Expand Up @@ -720,7 +720,7 @@ export const v202401: FormSchema = {
rhf: "Select",
name: "emergency-services-state-territory",
label: "From state/territory",
labelClassName: "p-3 font-bold",
labelClassName: "font-bold",
formItemClassName: "flex-row",
rules: {
required: "* Required",
Expand Down Expand Up @@ -836,7 +836,7 @@ export const v202401: FormSchema = {
rhf: "Select",
name: "hospital-state-territory",
label: "From state/territory",
labelClassName: "p-3 font-bold",
labelClassName: "font-bold",
formItemClassName: "flex-row",
rules: {
required: "* Required",
Expand Down Expand Up @@ -952,7 +952,7 @@ export const v202401: FormSchema = {
rhf: "Select",
name: "maternity-and-newborn-care-state-territory",
label: "From state/territory",
labelClassName: "p-3 font-bold",
labelClassName: "font-bold",
formItemClassName: "flex-row",
rules: {
required: "* Required",
Expand Down Expand Up @@ -1070,7 +1070,7 @@ export const v202401: FormSchema = {
rhf: "Select",
name: "mental-health-and-substance-use-disorders-state-territory",
label: "From state/territory",
labelClassName: "p-3 font-bold",
labelClassName: "font-bold",
formItemClassName: "flex-row",
rules: {
required: "* Required",
Expand Down Expand Up @@ -1186,7 +1186,7 @@ export const v202401: FormSchema = {
rhf: "Select",
name: "prescription-drugs-state-territory",
label: "From state/territory",
labelClassName: "p-3 font-bold",
labelClassName: "font-bold",
formItemClassName: "flex-row",
rules: {
required: "* Required",
Expand Down Expand Up @@ -1304,7 +1304,7 @@ export const v202401: FormSchema = {
rhf: "Select",
name: "rehab-and-habilitative-services-and-devices-state-territory",
label: "From state/territory",
labelClassName: "p-3 font-bold",
labelClassName: "font-bold",
formItemClassName: "flex-row",
rules: {
required: "* Required",
Expand Down Expand Up @@ -1420,7 +1420,7 @@ export const v202401: FormSchema = {
rhf: "Select",
name: "laboratory-services-state-territory",
label: "From state/territory",
labelClassName: "p-3 font-bold",
labelClassName: "font-bold",
formItemClassName: "flex-row",
rules: {
required: "* Required",
Expand Down Expand Up @@ -1538,7 +1538,7 @@ export const v202401: FormSchema = {
rhf: "Select",
name: "prevent-and-well-services-and-chronic-disease-management-state-territory",
label: "From state/territory",
labelClassName: "p-3 font-bold",
labelClassName: "font-bold",
formItemClassName: "flex-row",
rules: {
required: "* Required",
Expand Down Expand Up @@ -1656,7 +1656,7 @@ export const v202401: FormSchema = {
rhf: "Select",
name: "pediatric-services-including-oral-and-vision-care-state-territory",
label: "From state/territory",
labelClassName: "p-3 font-bold",
labelClassName: "font-bold",
formItemClassName: "flex-row",
rules: {
required: "* Required",
Expand Down
15 changes: 3 additions & 12 deletions src/services/api/webforms/ABP7/v202401.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,28 +34,19 @@ export const v202401: FormSchema = {
},
{
rhf: "Checkbox",
name: "notice-to-individual-includes-description",
name: "epsdt-services",
rules: { required: "* Required" },
props: {
options: [
{
label:
"The state/territory assures that the notice to an individual includes a description of the method for ensuring access to EPSDT services (42 CFR 440.345).",
value: "true",
value: "notice-to-individual-includes-description",
},
],
},
},
{
rhf: "Checkbox",
name: "provided-to-individuals-under-21",
rules: { required: "* Required" },
props: {
options: [
{
label:
"The state/territory assures EPSDT services will be provided to individuals under age 21 who are covered under the state/territory plan under Section 1902(a)(10)(A) of the Act.",
value: "true",
value: "provided-to-individuals-under-21",
},
],
},
Expand Down
1 change: 1 addition & 0 deletions src/services/api/webforms/G2A/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./v202401";
Loading

0 comments on commit 555a0a9

Please sign in to comment.