Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spikes: Element Ids, Clear actions #116

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open
330 changes: 321 additions & 9 deletions services/app-api/forms/defaultMeasures.ts

Large diffs are not rendered by default.

41 changes: 39 additions & 2 deletions services/app-api/forms/pomMeasures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,25 +68,45 @@ export const pomMeasureTemplates = {
elements: [
{
type: ElementType.ButtonLink,
id: "return-button",
label: "Return to Required Measures Dashboard",
to: "req-measure-result",
},
{
type: ElementType.Header,
id: "measure-header",
text: "{measureName}",
},
{
type: ElementType.Accordion,
id: "measure-instructions",
label: "Instructions",
value:
"[Optional instructional content that could support the user in completing this page]",
},
{
type: ElementType.SubHeader,
id: "measure-details-subheader",
text: "Measure Details",
},
{
type: ElementType.ReportingRadio,
label: "Is the state reporting on this measure?",
id: "measure-reporting-radio",
value: [
{
label: "Yes, the state is reporting on this measure",
value: "yes",
},
{
label: "No, CMS is reporting this measure on the state's behalf",
value: "no",
},
],
},
{
type: ElementType.Radio,
id: "measure-audited-radio",
label: "Did you follow the 2026 Technical Specifications?",
value: [
{ label: "Yes", value: "yes" },
Expand All @@ -96,6 +116,7 @@ export const pomMeasureTemplates = {
checkedChildren: [
{
type: ElementType.TextAreaField,
id: "measure-following-tech-specs-no-explain",
label: "Please explain the variance.",
},
],
Expand All @@ -104,6 +125,7 @@ export const pomMeasureTemplates = {
},
{
type: ElementType.Radio,
id: "measure-audited-radio",
label: "Were the reported measure results audited or validated?",
value: [
{ label: "No", value: "no" },
Expand All @@ -113,6 +135,7 @@ export const pomMeasureTemplates = {
checkedChildren: [
{
type: ElementType.TextAreaField,
id: "measure-audited-entity",
label:
"Enter the name of the entity that conducted the audit or validation.",
},
Expand All @@ -122,13 +145,14 @@ export const pomMeasureTemplates = {
},
{
type: ElementType.TextAreaField,
id: "measure-context-text",
helperText:
"If applicable, add any notes or comments to provide context to the reported measure result",
label: "Additonal notes/comments (optional)",
},
{
type: ElementType.Radio,
formKey: "delivery-method-radio",
id: "delivery-method-radio",
label: "Which delivery systems were used to report this measure?",
value: [
{ label: "Fee-for-Service (FFS)", value: DeliverySystem.FFS },
Expand All @@ -144,10 +168,12 @@ export const pomMeasureTemplates = {
},
{
type: ElementType.SubHeader,
id: "quality-measures-subheader",
text: "Quality Measures",
},
{
type: ElementType.QualityMeasureTable,
id: "quality-measure-table",
measureDisplay: "quality",
},
],
Expand All @@ -160,25 +186,30 @@ export const pomMeasureTemplates = {
elements: [
{
type: ElementType.ButtonLink,
id: "return-button",
label: "Return to Required Measures Dashboard",
to: "req-measure-result",
},
{
type: ElementType.Header,
id: "measure-header",
text: "{measureName}",
},
{
type: ElementType.Accordion,
id: "measure-instructions",
label: "Instructions",
value:
"[Optional instructional content that could support the user in completing this page]",
},
{
type: ElementType.SubHeader,
id: "measure-details-subheader",
text: "Measure Details",
},
{
type: ElementType.Radio,
id: "measure-reporting-radio",
label: "Did you follow the 2026 Technical Specifications?",
value: [
{ label: "Yes", value: "yes" },
Expand All @@ -188,6 +219,7 @@ export const pomMeasureTemplates = {
checkedChildren: [
{
type: ElementType.TextAreaField,
id: "measure-following-tech-specs-no-explain",
label: "Please explain the variance.",
},
],
Expand All @@ -196,6 +228,7 @@ export const pomMeasureTemplates = {
},
{
type: ElementType.Radio,
id: "measure-audited-radio",
label: "Were the reported measure results audited or validated?",
value: [
{ label: "No", value: "no" },
Expand All @@ -205,6 +238,7 @@ export const pomMeasureTemplates = {
checkedChildren: [
{
type: ElementType.TextAreaField,
id: "measure-audited-entity",
label:
"Enter the name of the entity that conducted the audit or validation.",
},
Expand All @@ -214,13 +248,14 @@ export const pomMeasureTemplates = {
},
{
type: ElementType.TextAreaField,
id: "measure-context-text",
helperText:
"If applicable, add any notes or comments to provide context to the reported measure result",
label: "Additonal notes/comments (optional)",
},
{
type: ElementType.Radio,
formKey: "delivery-method-radio",
id: "delivery-method-radio",
label: "Which delivery systems were used to report this measure?",
value: [
{ label: "Fee-for-Service (FFS)", value: DeliverySystem.FFS },
Expand All @@ -236,10 +271,12 @@ export const pomMeasureTemplates = {
},
{
type: ElementType.SubHeader,
id: "quality-measures-subheader",
text: "Quality Measures",
},
{
type: ElementType.QualityMeasureTable,
id: "quality-measure-table",
measureDisplay: "quality",
},
],
Expand Down
43 changes: 13 additions & 30 deletions services/app-api/forms/qms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,19 @@ export const qmsReportTemplate: ReportTemplate = {
elements: [
{
type: ElementType.Header,
id: "general-info-header",
text: "General Information",
},
{
id: "contact-name",
type: ElementType.Textbox,
label: "Contact name",
helperText:
"Enter person's name or a position title for CMS to contact with questions about this report.",
},
{
type: ElementType.Textbox,
id: "contact-email",
label: "Contact email address",
helperText:
"Enter email address. Department or program-wide email addresses ok.",
Expand All @@ -56,49 +59,22 @@ export const qmsReportTemplate: ReportTemplate = {
elements: [
{
type: ElementType.Header,
id: "required-header",
text: "Required Measure Results",
},
{
type: ElementType.Accordion,
id: "required-instructions",
label: "Instructions",
value: "I am an accordion",
},
{
type: ElementType.MeasureTable,
id: "required-measures",
measureDisplay: "required",
},
],
},
{
id: "req-measure-result-modal",
title: "Select measure",
sidebar: true,
type: PageType.Modal,
elements: [
{
type: ElementType.Header,
text: "Select measure",
},
{
type: ElementType.Paragraph,
text: "Select the correct version of the quality measure.",
},
{
type: ElementType.Radio,
label: "Which quality measure will be reported?",
value: [
{
label: "{Measure name version 1}",
value: "measure-1",
},
{
label: "{Measure name version 2}",
value: "measure-2",
},
],
},
],
},
{
id: "optional-measure-result",
title: "Optional Measure Results",
Expand All @@ -107,15 +83,18 @@ export const qmsReportTemplate: ReportTemplate = {
elements: [
{
type: ElementType.Header,
id: "optional-header",
text: "Optional Measure Results",
},
{
type: ElementType.Accordion,
id: "optional-instructions",
label: "Instructions",
value: "I am an accordion",
},
{
type: ElementType.MeasureTable,
id: "optional-measures",
measureDisplay: "optional",
},
],
Expand All @@ -129,20 +108,24 @@ export const qmsReportTemplate: ReportTemplate = {
elements: [
{
type: ElementType.Header,
id: "review-header",
text: "Review & Submit",
},
{
type: ElementType.Paragraph,
id: "review-text",
title: "Ready to Submit?",
text: "Double check that everything in your QMS Report is accurate. You will be able to make edits after submitting if you contact your [CMS representative] to unlock your report while it is in “Submitted” status.",
},
{
type: ElementType.Paragraph,
id: "review-compliance",
title: "Compliance review",
text: "Your Project Officer will review your report and may contact you and unlock your report for editing if there are corrections to be made.",
},
{
type: ElementType.StatusTable,
id: "review-status",
to: "review-submit",
},
],
Expand Down
3 changes: 1 addition & 2 deletions services/app-api/handlers/reports/buildReport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ export const buildReport = async (
);

return pages.map((page) => {
// TODO: make reusable. This will be used on the optional page when adding a measure.
page.cmit = measure.cmit;
page.cmitId = measure.uid;
page.id += measure.cmit; // TODO this will need some logic if a measure is substituted
page.stratified = measure.stratified;
page.required = measure.required;
Expand All @@ -69,7 +69,6 @@ export const buildReport = async (
findAndReplace(element, measure.uid)
),
];
// TODO: let the parent know what it relates to
return page;
});
});
Expand Down
Loading
Loading