forked from chpladmin/chpl-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add endpoints to support the SVAP Power BI report
OCD-4717
- Loading branch information
Showing
9 changed files
with
375 additions
and
32 deletions.
There are no files selected for viewing
75 changes: 75 additions & 0 deletions
75
chpl/chpl-api/src/main/java/gov/healthit/chpl/web/controller/SvapReportController.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,75 @@ | ||
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.report.ReportDataManager; | ||
import gov.healthit.chpl.report.common.CertificationCriterionWithOrder; | ||
import gov.healthit.chpl.report.criteriaattribute.SvapListingReport; | ||
import gov.healthit.chpl.report.svap.CriteriaWithAnySvap; | ||
import gov.healthit.chpl.report.svap.CriteriaWithSvap; | ||
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; | ||
import lombok.extern.log4j.Log4j2; | ||
|
||
@Log4j2 | ||
@Tag(name = "report-data/svaps", description = "Allows retrieval of data used by SVAP report.") | ||
@RestController | ||
@RequestMapping("/report-data/svaps") | ||
public class SvapReportController { | ||
|
||
private ReportDataManager reportDataManager; | ||
|
||
@Autowired | ||
public SvapReportController(ReportDataManager reportDataManager) { | ||
this.reportDataManager = reportDataManager; | ||
} | ||
|
||
@Operation(summary = "", | ||
description = "", | ||
security = { | ||
@SecurityRequirement(name = SwaggerSecurityRequirement.API_KEY) | ||
}) | ||
@RequestMapping(value = "/criteria-with-any-svap-counts", method = RequestMethod.GET, produces = "application/json; charset=utf-8") | ||
public @ResponseBody List<CriteriaWithAnySvap> getCriteriaWithAnySvap() { | ||
return reportDataManager.getSvapReportService().getCriteriaWithAnySvap(); | ||
} | ||
|
||
@Operation(summary = "", | ||
description = "", | ||
security = { | ||
@SecurityRequirement(name = SwaggerSecurityRequirement.API_KEY) | ||
}) | ||
@RequestMapping(value = "/criteria-with-svap-counts", method = RequestMethod.GET, produces = "application/json; charset=utf-8") | ||
public @ResponseBody List<CriteriaWithSvap> getTestToolReports() { | ||
return reportDataManager.getSvapReportService().getCriteriaWithSvap(); | ||
} | ||
|
||
@Operation(summary = "", | ||
description = "", | ||
security = { | ||
@SecurityRequirement(name = SwaggerSecurityRequirement.API_KEY) | ||
}) | ||
@RequestMapping(value = "/listings", method = RequestMethod.GET, produces = "application/json; charset=utf-8") | ||
public @ResponseBody List<SvapListingReport> getSvapListingReports() { | ||
return reportDataManager.getSvapReportService().getSvapListingReports(); | ||
} | ||
|
||
@Operation(summary = "", | ||
description = "", | ||
security = { | ||
@SecurityRequirement(name = SwaggerSecurityRequirement.API_KEY) | ||
}) | ||
@RequestMapping(value = "/criteria", method = RequestMethod.GET, produces = "application/json; charset=utf-8") | ||
public @ResponseBody List<CertificationCriterionWithOrder> getCertificationCriteria() { | ||
return reportDataManager.getSvapReportService().getCertificationCriteria(); | ||
} | ||
|
||
} |
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
28 changes: 28 additions & 0 deletions
28
...ervice/src/main/java/gov/healthit/chpl/report/common/CertificationCriterionWithOrder.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,28 @@ | ||
package gov.healthit.chpl.report.common; | ||
|
||
import gov.healthit.chpl.certificationCriteria.CertificationCriterion; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.experimental.SuperBuilder; | ||
|
||
@SuperBuilder | ||
@Data | ||
@EqualsAndHashCode(callSuper = false) | ||
public class CertificationCriterionWithOrder extends CertificationCriterion { | ||
private static final long serialVersionUID = -859127653800126456L; | ||
|
||
private Long order; | ||
|
||
public CertificationCriterionWithOrder(CertificationCriterion cc) { | ||
this.setId(cc.getId()); | ||
this.setNumber(cc.getNumber()); | ||
this.setTitle(cc.getTitle()); | ||
this.setDescription(cc.getDescription()); | ||
this.setCertificationEdition(cc.getCertificationEdition()); | ||
this.setCertificationEditionId(cc.getCertificationEditionId()); | ||
this.setStartDay(cc.getStartDay()); | ||
this.setEndDay(cc.getEndDay()); | ||
this.setRule(cc.getRule()); | ||
this.setCompanionGuideLink(cc.getCompanionGuideLink()); | ||
} | ||
} |
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
14 changes: 14 additions & 0 deletions
14
chpl/chpl-service/src/main/java/gov/healthit/chpl/report/svap/CriteriaWithAnySvap.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,14 @@ | ||
package gov.healthit.chpl.report.svap; | ||
|
||
import gov.healthit.chpl.certificationCriteria.CertificationCriterion; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
|
||
@Data | ||
@Builder | ||
public class CriteriaWithAnySvap { | ||
private CertificationCriterion certificationCriterion; | ||
private Long activeListingCountAttestingToCriteria; | ||
private Long activeListingCountAttestingToCriteriaAndAnySvap; | ||
private Integer sortOrder; | ||
} |
15 changes: 15 additions & 0 deletions
15
chpl/chpl-service/src/main/java/gov/healthit/chpl/report/svap/CriteriaWithSvap.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,15 @@ | ||
package gov.healthit.chpl.report.svap; | ||
|
||
import gov.healthit.chpl.certificationCriteria.CertificationCriterion; | ||
import gov.healthit.chpl.svap.domain.Svap; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
|
||
@Builder | ||
@Data | ||
public class CriteriaWithSvap { | ||
private CertificationCriterion certificationCriterion; | ||
private Svap svap; | ||
private Long activeListingCountAttestingToSvap; | ||
private Integer sortOrder; | ||
} |
12 changes: 12 additions & 0 deletions
12
chpl/chpl-service/src/main/java/gov/healthit/chpl/report/svap/CriterionCount.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,12 @@ | ||
package gov.healthit.chpl.report.svap; | ||
|
||
import gov.healthit.chpl.certificationCriteria.CertificationCriterion; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
|
||
@Builder | ||
@Data | ||
public class CriterionCount { | ||
private CertificationCriterion criterion; | ||
private Long count; | ||
} |
Oops, something went wrong.