Skip to content

Commit

Permalink
Merge branch 'main' into snyk-fix-23f7a2b02bc9d2c7bb4d60ef140d7e3b
Browse files Browse the repository at this point in the history
  • Loading branch information
jessabean committed Dec 18, 2024
2 parents 4a848de + d7285c2 commit 1f3e57c
Show file tree
Hide file tree
Showing 67 changed files with 2,707 additions and 1,516 deletions.
4 changes: 2 additions & 2 deletions .env.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@ TEST_ADMIN_USER_EMAIL=op://mdct_devs/mcr_secrets/CYPRESS_ADMIN_USER_EMAIL
TEST_ADMIN_USER_PASSWORD=op://mdct_devs/mcr_secrets/CYPRESS_ADMIN_USER_PASSWORD # pragma: allowlist secret
TEST_STATE_USER_EMAIL=op://mdct_devs/mcr_secrets/CYPRESS_STATE_USER_EMAIL
TEST_STATE_USER_PASSWORD=op://mdct_devs/mcr_secrets/CYPRESS_STATE_USER_PASSWORD # pragma: allowlist secret
TEST_STATE=MN
TEST_STATE=Minnesota
TEST_STATE=DC
TEST_STATE_NAME="District of Columbia"
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ services/database/local_buckets
tests/test-results/
tests/playwright-report/
tests/playwright/.cache/
tests/playwright/.auth
.auth/
19 changes: 11 additions & 8 deletions services/app-api/forms/mcpar.json
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
},
{
"type": "html",
"content": "See Glossary in Excel Workbook for the definition of BSS entities."
"content": ". See Glossary in Excel Workbook for the definition of BSS entities."
}
]
},
Expand Down Expand Up @@ -595,7 +595,7 @@
"validation": "radio",
"props": {
"label": "B.X.9a Website posting of 5 percent or more ownership control",
"hint": "Does the state posts on its website the names of individuals and entities with 5% or more ownership or control interest in MCOs, PIHPs, PAHPs, PCCMs and PCCM entities and subcontractors? Refer to 42 CFR 438.602(g)(3) and 455.104.",
"hint": "Does the state post on its website the names of individuals and entities with 5% or more ownership or control interest in MCOs, PIHPs, PAHPs, PCCMs and PCCM entities and subcontractors? Refer to 42 CFR 438.602(g)(3) and 455.104.",
"choices": [
{
"id": "fNiPtEub20Soo1W5FcdU3A",
Expand Down Expand Up @@ -637,6 +637,7 @@
},
{
"name": "XIII: Prior Authorization",
"flag": "novMcparRelease",
"path": "/mcpar/state-level-indicators/prior-authorization",
"pageType": "standard",
"verbiage": {
Expand Down Expand Up @@ -677,7 +678,7 @@
},
"props": {
"label": "B.XIII.1a Timeframes for standard prior authorization decisions",
"hint": "Plans must provide notice of their decisions on prior authorization requests as expeditiously as the enrollee’s condition requires and within state established timeframes. For rating periods that start before January 1, 2026, a state’s time frame may not exceed 14 calendar days after receiving the request. For rating periods that start on or after January 1, 2026, a state’s time frame may not exceed 7 calendar days after receiving the request. Does the state set timeframes shorter than these maximum timeframes for standard prior authorization requests?",
"hint": "Plans must provide notice of their decisions on prior authorization requests as expeditiously as the enrollee’s condition requires and within state-established timeframes. For rating periods that start before January 1, 2026, a state’s time frame may not exceed 14 calendar days after receiving the request. For rating periods that start on or after January 1, 2026, a state’s time frame may not exceed 7 calendar days after receiving the request. Does the state set timeframes shorter than these maximum timeframes for standard prior authorization requests?",
"choices": [
{
"id": "2mwADFxQVwjgYKMq5rEMPF8nryi",
Expand All @@ -688,14 +689,14 @@
"label": "Yes",
"children": [
{
"id": "state_timeframesForStandardPriorAuthorizationDecisions-otherText",
"id": "state_stateTimeframeForStandardPriorAuthorizationDecisions",
"type": "number",
"validation": {
"type": "number",
"nested": true,
"mask": "comma-separated",
"decimalPlacesToRoundTo": 2,
"parentFieldName": "state_stateTimeframeForStandardPriorAuthorizationDecisions",
"parentFieldName": "state_timeframesForStandardPriorAuthorizationDecisions",
"parentOptionId": "2nAidFCWvENhYZvzLt3DxJWOqtx"
},
"props": {
Expand Down Expand Up @@ -730,7 +731,7 @@
"label": "Yes",
"children": [
{
"id": "state_timeframesForExpeditedPriorAuthorizationDecisions-otherText",
"id": "state_stateTimeframeForExpeditedPriorAuthorizationDecisions",
"type": "number",
"validation": {
"type": "number",
Expand Down Expand Up @@ -4267,6 +4268,7 @@
},
{
"name": "XIII: Prior Authorization",
"flag": "novMcparRelease",
"path": "/mcpar/plan-level-indicators/prior-authorization",
"pageType": "drawer",
"entityType": "plans",
Expand Down Expand Up @@ -4467,7 +4469,7 @@
"type": "number",
"validation": "number",
"props": {
"label": "D1.XIII.14 Median time to decision for expedited prior authorization requests",
"label": "D1.XIII.14 Median time to decision for expedited prior authorizations",
"hint": "Of the total expedited prior authorization requests, as reported in D1.XIII.4, enter the median number of hours that elapsed between submission of request and decision by the plan. If you choose not to respond prior to June 2026, enter “NR” for not reporting.",
"decimalPlacesToRoundTo": 2
}
Expand All @@ -4488,6 +4490,7 @@
},
{
"name": "XIV: Patient Access API Usage",
"flag": "novMcparRelease",
"path": "/mcpar/plan-level-indicators/patient-access-api",
"pageType": "drawer",
"entityType": "plans",
Expand Down Expand Up @@ -4561,7 +4564,7 @@
"validation": "number",
"props": {
"label": "D1.XIV.2 Number of unique beneficiaries with multiple data transfers",
"hint": "For the previous calendar year, indicate the total number of unique beneficiaries covered by the plan in this program whose data are transferred more than once via the Patient Access API to a health application designated by the beneficiary. Provide program specific numbers. If you choose not to respond prior to June 2026, enter “NR” for not reporting."
"hint": "For the previous calendar year, indicate the total number of unique beneficiaries covered by the plan in this program whose data were transferred more than once via the Patient Access API to a health application designated by the beneficiary. Provide program specific numbers. If you choose not to respond prior to June 2026, enter “NR” for not reporting."
}
}
]
Expand Down
44 changes: 43 additions & 1 deletion services/app-api/forms/naaar.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"basePath": "/naaar",
"version": "NAAAR_2024-08-06",
"entities": {
"plans": { "required": true }
"plans": { "required": true },
"analysisMethods": { "required": true }
},
"routes": [
{
Expand Down Expand Up @@ -262,6 +263,47 @@
}
]
}
},
{
"name": "Analysis methods",
"path": "/naaar/state-and-program-information/analysis-methods",
"pageType": "modalDrawer",
"entityType": "analysisMethods",
"verbiage": {
"intro": {
"section": "I. State and program information",
"subsection": "Analysis methods",
"info": [
{
"type": "p",
"content": "States should use this section of the tab to report on the analyses that the state uses to assess plan compliance with the state's 42 C.F.R. § 438.68 and 42 C.F.R. § 438.206 standards."
}
]
},
"dashboardTitle": "",
"addEntityButtonText": "Add other analysis method",
"editEntityButtonText": "",
"readOnlyEntityButtonText": "",
"tableHeader": "Analysis method <br/> Frequency and plan utilization",
"addEditModalAddTitle": "Analysis method: Add other",
"addEditModalEditTitle": "Analysis method: Edit other",
"deleteEntityButtonAltText": "Delete other analysis method",
"deleteModalTitle": "Are you sure you want to delete this analysis method?",
"deleteModalConfirmButtonText": "Yes, delete method",
"deleteModalWarning": "Are you sure you want to proceed? You will lose all information entered for this analysis method in the NAAAR. The method will remain in previously submitted NAAAR reports if applicable.",
"entityUnfinishedMessage": "Complete the remaining indicators for this access measure by entering details.",
"enterEntityDetailsButtonText": "Enter",
"readOnlyEntityDetailsButtonText": "View",
"drawerTitle": "Analysis method: ",
"drawerInfo": [
{
"type": "p",
"content": "Complete all fields and select the “Save & close” button to save this section."
}
]
},
"modalForm": { "id": "", "fields": [] },
"drawerForm": { "id": "", "fields": [] }
}
]
},
Expand Down
17 changes: 17 additions & 0 deletions services/app-api/utils/constants/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ export const bucketTopics = {

export const formTemplateTableName = process.env.FORM_TEMPLATE_TABLE_NAME!;

// COPY-OVER

export const McparFieldsToCopy = {
root: [
"state_encounterDataValidationEntity",
Expand All @@ -72,6 +74,10 @@ export const McparFieldsToCopy = {
"state_providerTerminationReportingMonitoringMetricsDescription",
"state_ownershipControlDisclosureWebsite",
"state_ownershipControlDisclosureWebsiteLink",
"state_timeframesForStandardPriorAuthorizationDecisions",
"state_stateTimeframeForStandardPriorAuthorizationDecisions",
"state_timeframesForExpeditedPriorAuthorizationDecisions",
"state_stateTimeframeForExpeditedPriorAuthorizationDecisions",
"program_contractTitle",
"program_type",
"program_type-otherText",
Expand Down Expand Up @@ -152,3 +158,14 @@ export const McparFieldsToCopy = {
],
// sanctions are never copied from year to year.
};

// ANALYSIS METHODS (NAAAR)
export const DEFAULT_ANALYSIS_METHODS = [
"Geomapping",
"Plan Provider Directory Review",
"Secret Shopper: Network Participation",
"Secret Shopper: Appointment Availability",
"EVV Data Analysis",
"Review of Grievances Related to Access",
"Encounter Data Analysis",
];
30 changes: 30 additions & 0 deletions services/app-api/utils/formTemplates/formTemplates.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {
compileValidationJsonFromRoutes,
filterByFlag,
flattenReportRoutesArray,
formTemplateForReportType,
generatePCCMTemplate,
Expand Down Expand Up @@ -409,3 +410,32 @@ describe("Test compileValidationJsonFromRoutes", () => {
});
});
});

describe("filterByFlag()", () => {
it("Return whether route is allowed", () => {
const routes: ReportRoute[] = [
{
name: "noFlag",
path: "/noFlag",
},
{
name: "filteredFlag",
path: "/filteredFlag",
flag: "filteredFlag",
},
{
name: "allowedFlag",
path: "/allowedFlag",
flag: "allowedFlag",
},
];
const route1 = filterByFlag(routes[0], "filteredFlag");
expect(route1).toEqual(true);

const route2 = filterByFlag(routes[1], "filteredFlag");
expect(route2).toEqual(false);

const route3 = filterByFlag(routes[2], "filteredFlag");
expect(route3).toEqual(true);
});
});
13 changes: 6 additions & 7 deletions services/app-api/utils/formTemplates/formTemplates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -323,18 +323,17 @@ const makePCCMTemplateModifications = (reportTemplate: ReportJson) => {
programTypeQuestion.props!.disabled = true;
};

export const filterByFlag = (route: ReportRoute, flag: string) => {
return route?.flag !== flag;
};

const handleTemplateForNovMcparRelease = (originalReportTemplate: any) => {
const reportTemplate = structuredClone(originalReportTemplate);
const routesToFilter = [
"/mcpar/state-level-indicators/prior-authorization",
"/mcpar/plan-level-indicators/prior-authorization",
"/mcpar/plan-level-indicators/patient-access-api",
];

for (let route of reportTemplate.routes) {
if (route?.children) {
route.children = route.children.filter(
(childRoute: ReportRoute) => !routesToFilter.includes(childRoute.path)
route.children = route.children.filter((childRoute: ReportRoute) =>
filterByFlag(childRoute, "novMcparRelease")
);
}
}
Expand Down
1 change: 1 addition & 0 deletions services/app-api/utils/types/reports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export interface ReportRouteBase {
name: string;
path: string;
pageType?: string;
flag?: string;
}

export type ReportRouteWithForm =
Expand Down
6 changes: 3 additions & 3 deletions services/database/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"serverless-dynamodb": "^0.2.53"
},
"dependencies": {
"@aws-sdk/client-dynamodb": "^3.679.0",
"@aws-sdk/client-s3": "^3.679.0",
"@aws-sdk/lib-dynamodb": "^3.679.0"
"@aws-sdk/lib-dynamodb": "^3.687.0",
"@aws-sdk/client-dynamodb": "^3.682.0",
"@aws-sdk/client-s3": "^3.687.0"
}
}
Loading

0 comments on commit 1f3e57c

Please sign in to comment.