Skip to content

Commit

Permalink
feat: QPPA-9735 update default allowedPrograms
Browse files Browse the repository at this point in the history
  • Loading branch information
ckawell committed Jan 14, 2025
1 parent c771650 commit 0ffad5f
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 11 deletions.
24 changes: 24 additions & 0 deletions scripts/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -392,3 +392,27 @@ export const QUALITY_DEFAULT_VALUES = {
isSevenPointCapRemoved: false,
sevenPointCapRemoved: []
};

export const QUALITY_DEFAULT_PROGRAMS = [
'mips',
'pcf',
];

export const COST_DEFAULT_PROGRAMS = [
'mips',
'app1',
];

export const IA_DEFAULT_PROGRAMS = [
'mips',
'app1',
'appPlus',
'pcf',
];

export const PI_DEFAULT_PROGRAMS = [
'mips',
'app1',
'appPlus',
'pcf',
];
18 changes: 7 additions & 11 deletions scripts/measures/lib/measures-lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,21 @@ import { info, warning } from '../../logger';
import { MeasuresChange } from '../lib/validate-change-requests';
import { DataValidationError } from '../../errors';
import {
COST_DEFAULT_PROGRAMS,
COST_DEFAULT_VALUES,
COST_MEASURES_ORDER,
IA_DEFAULT_PROGRAMS,
IA_DEFAULT_VALUES,
IA_MEASURES_ORDER,
PI_DEFAULT_PROGRAMS,
PI_DEFAULT_VALUES,
PI_MEASURES_ORDER,
QCDR_MEASURES_ORDER,
QUALITY_DEFAULT_PROGRAMS,
QUALITY_DEFAULT_VALUES,
QUALITY_MEASURES_ORDER
} from '../../constants';

const QUALITY_DEFAULT_PROGRAMS = [
'mips',
'pcf',
];

const COST_DEFAULT_PROGRAMS = [
'mips',
'app1',
];

/**
* Adds the change file csv to the array in changes.meta.json.
* This allows us to track which files are new and which have already been ingested.
Expand Down Expand Up @@ -132,6 +126,7 @@ export function addMeasure(change: MeasuresChange, measuresJson: any) {
measuresJson.splice(index + 1, 0, orderFields({
...IA_DEFAULT_VALUES,
...change,
allowedPrograms: IA_DEFAULT_PROGRAMS,
}));
break;
}
Expand All @@ -140,7 +135,8 @@ export function addMeasure(change: MeasuresChange, measuresJson: any) {
measuresJson.splice(index + 1, 0, orderFields({
...PI_DEFAULT_VALUES,
...change,
preprod
preprod,
allowedPrograms: PI_DEFAULT_PROGRAMS,
}));
break;
}
Expand Down

0 comments on commit 0ffad5f

Please sign in to comment.