-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
42 changed files
with
210 additions
and
88 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
chpl/chpl-api/src/main/java/gov/healthit/chpl/web/controller/CqmController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package gov.healthit.chpl.web.controller; | ||
|
||
import java.util.List; | ||
|
||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RequestMethod; | ||
import org.springframework.web.bind.annotation.ResponseBody; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
import gov.healthit.chpl.cqm.CQMCriterionAllVersions; | ||
import gov.healthit.chpl.cqm.CqmManager; | ||
import gov.healthit.chpl.util.SwaggerSecurityRequirement; | ||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.security.SecurityRequirement; | ||
import io.swagger.v3.oas.annotations.tags.Tag; | ||
|
||
@Tag(name = "cqms", description = "Endpoints related to Clinical Quality Measures.") | ||
@RestController | ||
@RequestMapping("/cqms") | ||
public class CqmController { | ||
private CqmManager cqmManager; | ||
|
||
@Autowired | ||
public CqmController(CqmManager cqmManager) { | ||
this.cqmManager = cqmManager; | ||
} | ||
|
||
@Operation(summary = "Retrieve all Clinical Quality Measures. ", | ||
description = "Returns all of the Clinical Quality Measures that are currently in the CHPL.", | ||
security = { | ||
@SecurityRequirement(name = SwaggerSecurityRequirement.API_KEY) | ||
}) | ||
@RequestMapping(value = "", method = RequestMethod.GET, produces = "application/json; charset=utf-8") | ||
public @ResponseBody List<CQMCriterionAllVersions> getAllCqms() { | ||
return cqmManager.getAllCqms(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ov/healthit/chpl/domain/CQMCriterion.java → ...a/gov/healthit/chpl/cqm/CQMCriterion.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package gov.healthit.chpl.domain; | ||
package gov.healthit.chpl.cqm; | ||
|
||
import java.io.Serializable; | ||
|
||
|
34 changes: 34 additions & 0 deletions
34
chpl/chpl-service/src/main/java/gov/healthit/chpl/cqm/CQMCriterionAllVersions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package gov.healthit.chpl.cqm; | ||
|
||
import java.io.Serializable; | ||
import java.util.List; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Data | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
public class CQMCriterionAllVersions implements Serializable, Comparable<CQMCriterionAllVersions> { | ||
private static final long serialVersionUID = -4748525240792675076L; | ||
|
||
private String cmsId; | ||
private String nqfNumber; | ||
private String domain; | ||
|
||
//Note that the description is for the highest-numbered version. Other versions may have different descriptions. | ||
private String description; | ||
|
||
//Note that the title is for the highest-numbered version. Other versions may have different titles. | ||
private String title; | ||
|
||
private List<String> versions; | ||
|
||
@Override | ||
public int compareTo(CQMCriterionAllVersions other) { | ||
return this.getCmsId().compareTo(other.getCmsId()); | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...t/chpl/domain/CQMResultCertification.java → ...thit/chpl/cqm/CQMResultCertification.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package gov.healthit.chpl.domain; | ||
package gov.healthit.chpl.cqm; | ||
|
||
import java.io.Serializable; | ||
|
||
|
5 changes: 2 additions & 3 deletions
5
...a/gov/healthit/chpl/dto/CQMResultDTO.java → ...a/gov/healthit/chpl/cqm/CQMResultDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ealthit/chpl/domain/CQMResultDetails.java → ...v/healthit/chpl/cqm/CQMResultDetails.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
chpl/chpl-service/src/main/java/gov/healthit/chpl/cqm/CqmManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package gov.healthit.chpl.cqm; | ||
|
||
import java.util.List; | ||
|
||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Component | ||
public class CqmManager { | ||
|
||
private CqmCriterionService cqmCriterionService; | ||
|
||
@Autowired | ||
public CqmManager(CqmCriterionService cqmCriterionService) { | ||
this.cqmCriterionService = cqmCriterionService; | ||
} | ||
|
||
public List<CQMCriterionAllVersions> getAllCqms() { | ||
List<CQMCriterionAllVersions> allCqms = cqmCriterionService.getAllCmsCqmsWithAllVersions(); | ||
allCqms.stream().sorted(); | ||
List<CQMCriterion> nqfCqms = cqmCriterionService.getAllNqfCqms(); | ||
nqfCqms.stream() | ||
.forEach(nqfCqm -> { | ||
allCqms.add(CQMCriterionAllVersions.builder() | ||
.cmsId(null) | ||
.description(nqfCqm.getDescription()) | ||
.domain(nqfCqm.getCqmDomain()) | ||
.nqfNumber(nqfCqm.getNqfNumber()) | ||
.title(nqfCqm.getTitle()) | ||
.versions(List.of()) | ||
.build()); | ||
}); | ||
return allCqms; | ||
} | ||
} |
8 changes: 4 additions & 4 deletions
8
...ov/healthit/chpl/dao/CQMCriterionDAO.java → ...ealthit/chpl/cqm/dao/CQMCriterionDAO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...ealthit/chpl/dao/CQMResultDetailsDAO.java → ...hit/chpl/cqm/dao/CQMResultDetailsDAO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...ntity/listing/CQMResultDetailsEntity.java → ...pl/cqm/entity/CQMResultDetailsEntity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../chpl/entity/listing/CQMResultEntity.java → ...thit/chpl/cqm/entity/CQMResultEntity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.