Skip to content

Commit

Permalink
Merge pull request #77 from MeasureAuthoringTool/MAT-7279/updateMeasu…
Browse files Browse the repository at this point in the history
…reTypeOptionsInUI

MAT-7279 updated the measure type options
  • Loading branch information
sb-prateekkeerthi authored Jul 8, 2024
2 parents 08b1bd7 + 496f82c commit cccde3a
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 32 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<dependency>
<groupId>gov.cms.madie</groupId>
<artifactId>madie-java-models</artifactId>
<version>0.6.40-SNAPSHOT</version>
<version>0.6.42-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>gov.cms.madie.packaging</groupId>
Expand Down Expand Up @@ -389,4 +389,4 @@
</plugin>
</plugins>
</reporting>
</project>
</project>
19 changes: 9 additions & 10 deletions src/main/java/gov/cms/madie/util/MadieConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,14 @@ interface Scoring {
}

interface MeasureType {
String APPROPRIATE_USE_PROCESS = "APPROPRIATE";
String COST_OR_RESOURCE_USE = "RESOURCE";
String EFFICIENCY = "EFFICIENCY";
String INTERMEDIATE_CLINICAL_OUTCOME = "INTERM-OM";
String OUTCOME = "OUTCOME";
String PATIENT_ENGAGEMENT_OR_EXPERIENCE = "EXPERIENCE";
String PATIENT_REPORTED_OUTCOME = "PRO-PM";
String PERFORMANCE = "PERFORMANCE";
String PROCESS = "PROCESS";
String STRUCTURE = "STRUCTURE";
String APPROPRIATE_USE_PROCESS = "Appropriate Use Process";
String RESOURCE_USE = "Resource Use";
String EFFICIENCY = "Efficiency";
String INTERMEDIATE_CLINICAL_OUTCOME = "Intermediate Clinical Outcome";
String OUTCOME = "Outcome";
String EXPERIENCE = "Experience";
String PATIENT_REPORTED_OUTCOME_PERFORMANCE = "Patient Reported Outcome Performance";
String PROCESS = "Process";
String STRUCTURE = "Structure";
}
}
8 changes: 3 additions & 5 deletions src/main/java/gov/cms/madie/util/MappingUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,14 @@ public static String getScoringAbbr(String scoring) {
public static String getMeasureTypeId(BaseConfigurationTypes baseConfigurationType) {
return switch (baseConfigurationType) {
case APPROPRIATE_USE_PROCESS -> MadieConstants.MeasureType.APPROPRIATE_USE_PROCESS;
case COST_OR_RESOURCE_USE -> MadieConstants.MeasureType.COST_OR_RESOURCE_USE;
case RESOURCE_USE -> MadieConstants.MeasureType.RESOURCE_USE;
case EFFICIENCY -> MadieConstants.MeasureType.EFFICIENCY;
case INTERMEDIATE_CLINICAL_OUTCOME -> MadieConstants.MeasureType
.INTERMEDIATE_CLINICAL_OUTCOME;
case OUTCOME -> MadieConstants.MeasureType.OUTCOME;
case PATIENT_ENGAGEMENT_OR_EXPERIENCE -> MadieConstants.MeasureType
.PATIENT_ENGAGEMENT_OR_EXPERIENCE;
case EXPERIENCE -> MadieConstants.MeasureType.EXPERIENCE;
case PATIENT_REPORTED_OUTCOME_PERFORMANCE -> MadieConstants.MeasureType
.PATIENT_REPORTED_OUTCOME;
case PERFORMANCE -> MadieConstants.MeasureType.PERFORMANCE;
.PATIENT_REPORTED_OUTCOME_PERFORMANCE;
case PROCESS -> MadieConstants.MeasureType.PROCESS;
case STRUCTURE -> MadieConstants.MeasureType.STRUCTURE;
default -> throw new PackagingException(
Expand Down
6 changes: 3 additions & 3 deletions src/test/java/gov/cms/madie/services/MeasureMapperTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -544,12 +544,12 @@ void testBaseConfigurationTypesToTypesTypesEmpty() {
void testBaseConfigurationTypesToTypesTypes() {
TypesType output =
measureMapper.baseConfigurationTypesToTypesTypes(
List.of(BaseConfigurationTypes.PERFORMANCE, BaseConfigurationTypes.OUTCOME));
List.of(BaseConfigurationTypes.RESOURCE_USE, BaseConfigurationTypes.OUTCOME));
assertThat(output, is(notNullValue()));
assertThat(output.getType(), is(notNullValue()));
assertThat(
output.getType().get(0).getValue(), is(BaseConfigurationTypes.PERFORMANCE.toString()));
assertThat(output.getType().get(0).getId(), is(MadieConstants.MeasureType.PERFORMANCE));
output.getType().get(0).getValue(), is(BaseConfigurationTypes.RESOURCE_USE.toString()));
assertThat(output.getType().get(0).getId(), is(MadieConstants.MeasureType.RESOURCE_USE));
assertThat(output.getType().get(1).getValue(), is(BaseConfigurationTypes.OUTCOME.toString()));
assertThat(output.getType().get(1).getId(), is(MadieConstants.MeasureType.OUTCOME));
}
Expand Down
18 changes: 6 additions & 12 deletions src/test/java/gov/cms/madie/util/MappingUtilTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ void getMeasureTypeIdAppropriate() {

@Test
void getMeasureTypeIdResource() {
String output = MappingUtil.getMeasureTypeId(BaseConfigurationTypes.COST_OR_RESOURCE_USE);
assertThat(output, is(equalTo(MadieConstants.MeasureType.COST_OR_RESOURCE_USE)));
String output = MappingUtil.getMeasureTypeId(BaseConfigurationTypes.RESOURCE_USE);
assertThat(output, is(equalTo(MadieConstants.MeasureType.RESOURCE_USE)));
}

@Test
Expand All @@ -78,22 +78,16 @@ void getMeasureTypeIdOutcome() {

@Test
void getMeasureTypeIdExperience() {
String output =
MappingUtil.getMeasureTypeId(BaseConfigurationTypes.PATIENT_ENGAGEMENT_OR_EXPERIENCE);
assertThat(output, is(equalTo(MadieConstants.MeasureType.PATIENT_ENGAGEMENT_OR_EXPERIENCE)));
String output = MappingUtil.getMeasureTypeId(BaseConfigurationTypes.EXPERIENCE);
assertThat(output, is(equalTo(MadieConstants.MeasureType.EXPERIENCE)));
}

@Test
void getMeasureTypeIdProPm() {
String output =
MappingUtil.getMeasureTypeId(BaseConfigurationTypes.PATIENT_REPORTED_OUTCOME_PERFORMANCE);
assertThat(output, is(equalTo(MadieConstants.MeasureType.PATIENT_REPORTED_OUTCOME)));
}

@Test
void getMeasureTypeIdPerformance() {
String output = MappingUtil.getMeasureTypeId(BaseConfigurationTypes.PERFORMANCE);
assertThat(output, is(equalTo(MadieConstants.MeasureType.PERFORMANCE)));
assertThat(
output, is(equalTo(MadieConstants.MeasureType.PATIENT_REPORTED_OUTCOME_PERFORMANCE)));
}

@Test
Expand Down

0 comments on commit cccde3a

Please sign in to comment.