From 09734354d15d8c0ec964a0a65817d2e4f48486de Mon Sep 17 00:00:00 2001 From: Vivek Singh Date: Tue, 21 May 2024 18:06:21 +0530 Subject: [PATCH] avniproject/avni-webapp#1203 - split report card contract into request and response. save report card with standard report card input form metadata --- .../batch/zip/BundleZipFileImporter.java | 7 +- .../mapper/dashboard/DashboardMapper.java | 5 +- .../mapper/dashboard/ReportCardMapper.java | 37 +++--- .../org/avni/server/service/CardService.java | 47 ++++---- .../avni/server/service/DashboardService.java | 5 +- .../server/service/OrganisationService.java | 3 +- .../avni/server/web/ReportCardController.java | 16 +-- .../web/contract/ReportCardContract.java | 78 +++++++++++++ .../web/request/DashboardSectionContract.java | 9 +- .../server/web/request/ReportCardRequest.java | 44 ++++++++ .../ReportCardResponse.java} | 105 +++--------------- 11 files changed, 205 insertions(+), 151 deletions(-) create mode 100644 avni-server-api/src/main/java/org/avni/server/web/contract/ReportCardContract.java create mode 100644 avni-server-api/src/main/java/org/avni/server/web/request/ReportCardRequest.java rename avni-server-api/src/main/java/org/avni/server/web/{request/CardContract.java => response/ReportCardResponse.java} (50%) diff --git a/avni-server-api/src/main/java/org/avni/server/importer/batch/zip/BundleZipFileImporter.java b/avni-server-api/src/main/java/org/avni/server/importer/batch/zip/BundleZipFileImporter.java index 20584e3b0..2ef74dc0d 100644 --- a/avni-server-api/src/main/java/org/avni/server/importer/batch/zip/BundleZipFileImporter.java +++ b/avni-server-api/src/main/java/org/avni/server/importer/batch/zip/BundleZipFileImporter.java @@ -21,6 +21,7 @@ import org.avni.server.service.accessControl.GroupPrivilegeService; import org.avni.server.service.application.MenuItemService; import org.avni.server.util.ObjectMapperSingleton; +import org.avni.server.web.contract.ReportCardContract; import org.avni.server.web.contract.GroupDashboardBundleContract; import org.avni.server.web.request.*; import org.avni.server.web.request.application.ChecklistDetailRequest; @@ -382,9 +383,9 @@ private void deployFile(String fileName, String fileData, List list = ds.getDashboardSectionCardMappings().stream() + List list = ds.getDashboardSectionCardMappings().stream() .map(mapping -> { - CardContract cardContract = reportCardMapper.fromEntity(mapping.getCard()); + ReportCardContract cardContract = reportCardMapper.fromEntity(mapping.getCard()); cardContract.setDisplayOrder(mapping.getDisplayOrder()); return cardContract; }) diff --git a/avni-server-api/src/main/java/org/avni/server/mapper/dashboard/ReportCardMapper.java b/avni-server-api/src/main/java/org/avni/server/mapper/dashboard/ReportCardMapper.java index 26b5eca3c..07ff7fa0b 100644 --- a/avni-server-api/src/main/java/org/avni/server/mapper/dashboard/ReportCardMapper.java +++ b/avni-server-api/src/main/java/org/avni/server/mapper/dashboard/ReportCardMapper.java @@ -4,9 +4,10 @@ import org.avni.server.service.CardService; import org.avni.server.web.contract.EncounterTypeContract; import org.avni.server.web.contract.ProgramContract; -import org.avni.server.web.request.CardContract; +import org.avni.server.web.contract.ReportCardContract; import org.avni.server.web.request.StandardReportCardTypeContract; import org.avni.server.web.request.SubjectTypeContract; +import org.avni.server.web.response.ReportCardResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @@ -21,23 +22,23 @@ public ReportCardMapper(CardService reportCardService) { this.reportCardService = reportCardService; } - public CardContract fromEntity(ReportCard card) { - CardContract cardContract = new CardContract(); - cardContract.setId(card.getId()); - cardContract.setUuid(card.getUuid()); - cardContract.setVoided(card.isVoided()); - cardContract.setName(card.getName()); - cardContract.setQuery(card.getQuery()); - cardContract.setDescription(card.getDescription()); - cardContract.setColor(card.getColour()); + public ReportCardResponse fromEntity(ReportCard card) { + ReportCardResponse response = new ReportCardResponse(); + response.setId(card.getId()); + response.setUuid(card.getUuid()); + response.setVoided(card.isVoided()); + response.setName(card.getName()); + response.setQuery(card.getQuery()); + response.setDescription(card.getDescription()); + response.setColor(card.getColour()); if (card.getStandardReportCardType() != null) - cardContract.setStandardReportCardType(StandardReportCardTypeContract.fromEntity(card.getStandardReportCardType())); - cardContract.setIconFileS3Key(card.getIconFileS3Key()); - cardContract.setNested(card.isNested()); - cardContract.setCount(card.getCountOfCards()); - cardContract.setStandardReportCardInputSubjectTypes(reportCardService.getStandardReportCardInputSubjectTypes(card).stream().map(SubjectTypeContract::createBasic).collect(Collectors.toList())); - cardContract.setStandardReportCardInputPrograms(reportCardService.getStandardReportCardInputPrograms(card).stream().map(ProgramContract::createBasic).collect(Collectors.toList())); - cardContract.setStandardReportCardInputEncounterTypes(reportCardService.getStandardReportCardInputEncounterTypes(card).stream().map(EncounterTypeContract::createBasic).collect(Collectors.toList())); - return cardContract; + response.setStandardReportCardType(StandardReportCardTypeContract.fromEntity(card.getStandardReportCardType())); + response.setIconFileS3Key(card.getIconFileS3Key()); + response.setNested(card.isNested()); + response.setCount(card.getCountOfCards()); + response.setStandardReportCardInputSubjectTypes(reportCardService.getStandardReportCardInputSubjectTypes(card).stream().map(SubjectTypeContract::createBasic).collect(Collectors.toList())); + response.setStandardReportCardInputPrograms(reportCardService.getStandardReportCardInputPrograms(card).stream().map(ProgramContract::createBasic).collect(Collectors.toList())); + response.setStandardReportCardInputEncounterTypes(reportCardService.getStandardReportCardInputEncounterTypes(card).stream().map(EncounterTypeContract::createBasic).collect(Collectors.toList())); + return response; } } diff --git a/avni-server-api/src/main/java/org/avni/server/service/CardService.java b/avni-server-api/src/main/java/org/avni/server/service/CardService.java index 0f3b2da15..59e39e8fa 100644 --- a/avni-server-api/src/main/java/org/avni/server/service/CardService.java +++ b/avni-server-api/src/main/java/org/avni/server/service/CardService.java @@ -2,15 +2,14 @@ import org.avni.server.dao.*; import org.avni.server.domain.*; -import org.avni.server.mapper.dashboard.ReportCardMapper; import org.avni.server.util.BadRequestError; -import org.avni.server.web.request.CardContract; +import org.avni.server.web.contract.ReportCardContract; +import org.avni.server.web.request.ReportCardRequest; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.joda.time.DateTime; import java.util.List; -import java.util.stream.Collectors; @Service public class CardService implements NonScopeAwareService { @@ -29,26 +28,26 @@ public CardService(CardRepository cardRepository, StandardReportCardTypeReposito this.encounterTypeRepository = encounterTypeRepository; } - public ReportCard saveCard(CardContract cardContract) { - assertNoExistingCardWithName(cardContract.getName()); + public ReportCard saveCard(org.avni.server.web.request.ReportCardRequest reportCardRequest) { + assertNoExistingCardWithName(reportCardRequest.getName()); ReportCard card = new ReportCard(); card.assignUUID(); - buildCard(cardContract, card); + buildCard(reportCardRequest, card); cardRepository.save(card); return card; } - public void uploadCard(CardContract cardContract) { - ReportCard card = cardRepository.findByUuid(cardContract.getUuid()); + public void uploadCard(ReportCardRequest reportCardRequest) { + ReportCard card = cardRepository.findByUuid(reportCardRequest.getUuid()); if (card == null) { card = new ReportCard(); - card.setUuid(cardContract.getUuid()); + card.setUuid(reportCardRequest.getUuid()); } - buildCard(cardContract, card); + buildCard(reportCardRequest, card); cardRepository.save(card); } - public ReportCard editCard(CardContract newCard, Long cardId) { + public ReportCard editCard(ReportCardRequest newCard, Long cardId) { ReportCard existingCard = cardRepository.findOne(cardId); assertNewNameIsUnique(newCard.getName(), existingCard.getName()); buildCard(newCard, existingCard); @@ -64,14 +63,14 @@ public List getAll() { return cardRepository.findAll(); } - private void buildCard(CardContract cardContract, ReportCard card) { - card.setName(cardContract.getName()); - card.setColour(cardContract.getColor()); - card.setDescription(cardContract.getDescription()); - card.setQuery(cardContract.getQuery()); - card.setVoided(cardContract.isVoided()); - card.setIconFileS3Key(cardContract.getIconFileS3Key()); - Long standardReportCardTypeId = cardContract.getStandardReportCardTypeId(); + private void buildCard(ReportCardRequest reportCardRequest, ReportCard card) { + card.setName(reportCardRequest.getName()); + card.setColour(reportCardRequest.getColor()); + card.setDescription(reportCardRequest.getDescription()); + card.setQuery(reportCardRequest.getQuery()); + card.setVoided(reportCardRequest.isVoided()); + card.setIconFileS3Key(reportCardRequest.getIconFileS3Key()); + Long standardReportCardTypeId = reportCardRequest.getStandardReportCardTypeId(); if (standardReportCardTypeId != null) { StandardReportCardType type = standardReportCardTypeRepository.findById(standardReportCardTypeId).orElse(null); @@ -82,12 +81,16 @@ private void buildCard(CardContract cardContract, ReportCard card) { } else { card.setStandardReportCardType(null); } - card.setNested(cardContract.isNested()); - if (cardContract.getCount() < ReportCard.INT_CONSTANT_DEFAULT_COUNT_OF_CARDS || cardContract.getCount() > ReportCard.INT_CONSTANT_MAX_COUNT_OF_CARDS) { + card.setNested(reportCardRequest.isNested()); + if (reportCardRequest.getCount() < ReportCard.INT_CONSTANT_DEFAULT_COUNT_OF_CARDS || reportCardRequest.getCount() > ReportCard.INT_CONSTANT_MAX_COUNT_OF_CARDS) { throw new BadRequestError(String.format("Nested ReportCard count should have minmum value of %d and maximum value of %d", ReportCard.INT_CONSTANT_DEFAULT_COUNT_OF_CARDS, ReportCard.INT_CONSTANT_MAX_COUNT_OF_CARDS)); } - card.setCountOfCards(cardContract.getCount()); + card.setCountOfCards(reportCardRequest.getCount()); + + card.setStandardReportCardInputSubjectTypes(reportCardRequest.getStandardReportCardInputSubjectTypes()); + card.setStandardReportCardInputPrograms(reportCardRequest.getStandardReportCardInputPrograms()); + card.setStandardReportCardInputEncounterTypes(reportCardRequest.getStandardReportCardInputEncounterTypes()); } private void assertNewNameIsUnique(String newName, String oldName) { diff --git a/avni-server-api/src/main/java/org/avni/server/service/DashboardService.java b/avni-server-api/src/main/java/org/avni/server/service/DashboardService.java index 36b2dbbe7..250e80313 100644 --- a/avni-server-api/src/main/java/org/avni/server/service/DashboardService.java +++ b/avni-server-api/src/main/java/org/avni/server/service/DashboardService.java @@ -5,6 +5,7 @@ import org.avni.server.domain.app.dashboard.DashboardFilter; import org.avni.server.mapper.dashboard.DashboardMapper; import org.avni.server.util.BadRequestError; +import org.avni.server.web.contract.ReportCardContract; import org.avni.server.web.request.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -130,9 +131,9 @@ private void setDashboardSections(DashboardRequest dashboardRequest, Dashboard d section.setDisplayOrder(sectionContract.getDisplayOrder()); section = dashboardSectionRepository.save(section); - List cardContracts = sectionContract.getCards(); + List cardContracts = sectionContract.getCards(); Set updatedMappings = new HashSet<>(); - for (CardContract cardContract : cardContracts) { + for (ReportCardContract cardContract : cardContracts) { DashboardSectionCardMapping mapping = dashboardSectionCardMappingRepository.findByCardIdAndDashboardSectionAndIsVoidedFalse(cardContract.getId(), section); if (mapping == null) { mapping = new DashboardSectionCardMapping(); diff --git a/avni-server-api/src/main/java/org/avni/server/service/OrganisationService.java b/avni-server-api/src/main/java/org/avni/server/service/OrganisationService.java index af23c3c4a..504244d8c 100644 --- a/avni-server-api/src/main/java/org/avni/server/service/OrganisationService.java +++ b/avni-server-api/src/main/java/org/avni/server/service/OrganisationService.java @@ -28,6 +28,7 @@ import org.avni.server.util.ObjectMapperSingleton; import org.avni.server.util.S; import org.avni.server.util.S3File; +import org.avni.server.web.contract.ReportCardContract; import org.avni.server.web.contract.GroupDashboardBundleContract; import org.avni.server.web.request.*; import org.avni.server.web.request.application.ChecklistDetailRequest; @@ -550,7 +551,7 @@ public void addReportCardIcons(ZipOutputStream zos) throws IOException { } public void addReportCards(ZipOutputStream zos) throws IOException { - List cardContracts = cardService.getAll().stream().map(reportCardMapper::fromEntity).collect(Collectors.toList()); + List cardContracts = cardService.getAll().stream().map(reportCardMapper::fromEntity).collect(Collectors.toList()); if (!cardContracts.isEmpty()) { addFileToZip(zos, "reportCard.json", cardContracts); } diff --git a/avni-server-api/src/main/java/org/avni/server/web/ReportCardController.java b/avni-server-api/src/main/java/org/avni/server/web/ReportCardController.java index 14b52bb20..02883f2c4 100644 --- a/avni-server-api/src/main/java/org/avni/server/web/ReportCardController.java +++ b/avni-server-api/src/main/java/org/avni/server/web/ReportCardController.java @@ -6,7 +6,9 @@ import org.avni.server.mapper.dashboard.ReportCardMapper; import org.avni.server.service.CardService; import org.avni.server.service.accessControl.AccessControlService; -import org.avni.server.web.request.CardContract; +import org.avni.server.web.contract.ReportCardContract; +import org.avni.server.web.request.ReportCardRequest; +import org.avni.server.web.response.ReportCardResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; @@ -33,7 +35,7 @@ public ReportCardController(CardRepository cardRepository, CardService cardServi @GetMapping(value = "/web/reportCard") @ResponseBody - public List getAll() { + public List getAll() { return cardRepository.findAllByIsVoidedFalseOrderByName() .stream().map(reportCardMapper::fromEntity) .collect(Collectors.toList()); @@ -41,7 +43,7 @@ public List getAll() { @GetMapping(value = "/web/reportCard/{id}") @ResponseBody - public ResponseEntity getById(@PathVariable Long id) { + public ResponseEntity getById(@PathVariable Long id) { Optional card = cardRepository.findById(id); return card.map(c -> ResponseEntity.ok(reportCardMapper.fromEntity(c))) .orElseGet(() -> ResponseEntity.notFound().build()); @@ -50,22 +52,22 @@ public ResponseEntity getById(@PathVariable Long id) { @PostMapping(value = "/web/reportCard") @ResponseBody @Transactional - public ResponseEntity newCard(@RequestBody CardContract cardContract) { + public ResponseEntity newCard(@RequestBody ReportCardRequest cardRequest) { accessControlService.checkPrivilege(PrivilegeType.EditOfflineDashboardAndReportCard); - ReportCard card = cardService.saveCard(cardContract); + ReportCard card = cardService.saveCard(cardRequest); return ResponseEntity.ok(reportCardMapper.fromEntity(card)); } @PutMapping(value = "/web/reportCard/{id}") @ResponseBody @Transactional - public ResponseEntity editCard(@PathVariable Long id, @RequestBody CardContract cardContract) { + public ResponseEntity editCard(@PathVariable Long id, @RequestBody ReportCardRequest request) { accessControlService.checkPrivilege(PrivilegeType.EditOfflineDashboardAndReportCard); Optional card = cardRepository.findById(id); if (!card.isPresent()) { return ResponseEntity.notFound().build(); } - ReportCard savedCard = cardService.editCard(cardContract, id); + ReportCard savedCard = cardService.editCard(request, id); return ResponseEntity.ok(reportCardMapper.fromEntity(savedCard)); } diff --git a/avni-server-api/src/main/java/org/avni/server/web/contract/ReportCardContract.java b/avni-server-api/src/main/java/org/avni/server/web/contract/ReportCardContract.java new file mode 100644 index 000000000..6a90779b1 --- /dev/null +++ b/avni-server-api/src/main/java/org/avni/server/web/contract/ReportCardContract.java @@ -0,0 +1,78 @@ +package org.avni.server.web.contract; + +import org.avni.server.web.request.CHSRequest; + +public class ReportCardContract extends CHSRequest { + private String name; + private String query; + private String description; + private String color; + private Double displayOrder; + private String iconFileS3Key; + private boolean nested; + private int count; + + public Double getDisplayOrder() { + return displayOrder; + } + + public void setDisplayOrder(Double displayOrder) { + this.displayOrder = displayOrder; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getQuery() { + return query; + } + + public void setQuery(String query) { + this.query = query; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getColor() { + return color; + } + + public void setColor(String color) { + this.color = color; + } + + public String getIconFileS3Key() { + return iconFileS3Key; + } + + public void setIconFileS3Key(String iconFileS3Key) { + this.iconFileS3Key = iconFileS3Key; + } + + public boolean isNested() { + return nested; + } + + public void setNested(boolean nested) { + this.nested = nested; + } + + public int getCount() { + return count; + } + + public void setCount(int count) { + this.count = count; + } +} diff --git a/avni-server-api/src/main/java/org/avni/server/web/request/DashboardSectionContract.java b/avni-server-api/src/main/java/org/avni/server/web/request/DashboardSectionContract.java index 79e4b5521..3815e0ac1 100644 --- a/avni-server-api/src/main/java/org/avni/server/web/request/DashboardSectionContract.java +++ b/avni-server-api/src/main/java/org/avni/server/web/request/DashboardSectionContract.java @@ -1,10 +1,9 @@ package org.avni.server.web.request; -import org.avni.server.domain.DashboardSection; +import org.avni.server.web.contract.ReportCardContract; import java.util.ArrayList; import java.util.List; -import java.util.stream.Collectors; public class DashboardSectionContract extends CHSRequest { private String name; @@ -12,7 +11,7 @@ public class DashboardSectionContract extends CHSRequest { private String viewType; private Double displayOrder; private String dashboardUUID; - private List cards = new ArrayList<>(); + private List cards = new ArrayList<>(); private List dashboardSectionCardMappings = new ArrayList<>(); public String getName() { @@ -31,11 +30,11 @@ public void setDescription(String description) { this.description = description; } - public List getCards() { + public List getCards() { return cards; } - public void setCards(List cards) { + public void setCards(List cards) { this.cards = cards; } diff --git a/avni-server-api/src/main/java/org/avni/server/web/request/ReportCardRequest.java b/avni-server-api/src/main/java/org/avni/server/web/request/ReportCardRequest.java new file mode 100644 index 000000000..72a674f32 --- /dev/null +++ b/avni-server-api/src/main/java/org/avni/server/web/request/ReportCardRequest.java @@ -0,0 +1,44 @@ +package org.avni.server.web.request; + +import org.avni.server.web.contract.ReportCardContract; + +import java.util.List; + +public class ReportCardRequest extends ReportCardContract { + private Long standardReportCardTypeId; + private List standardReportCardInputSubjectTypes; + private List standardReportCardInputPrograms; + private List standardReportCardInputEncounterTypes; + + public Long getStandardReportCardTypeId() { + return standardReportCardTypeId; + } + + public void setStandardReportCardTypeId(Long standardReportCardTypeId) { + this.standardReportCardTypeId = standardReportCardTypeId; + } + + public List getStandardReportCardInputSubjectTypes() { + return standardReportCardInputSubjectTypes; + } + + public void setStandardReportCardInputSubjectTypes(List standardReportCardInputSubjectTypes) { + this.standardReportCardInputSubjectTypes = standardReportCardInputSubjectTypes; + } + + public List getStandardReportCardInputPrograms() { + return standardReportCardInputPrograms; + } + + public void setStandardReportCardInputPrograms(List standardReportCardInputPrograms) { + this.standardReportCardInputPrograms = standardReportCardInputPrograms; + } + + public List getStandardReportCardInputEncounterTypes() { + return standardReportCardInputEncounterTypes; + } + + public void setStandardReportCardInputEncounterTypes(List standardReportCardInputEncounterTypes) { + this.standardReportCardInputEncounterTypes = standardReportCardInputEncounterTypes; + } +} diff --git a/avni-server-api/src/main/java/org/avni/server/web/request/CardContract.java b/avni-server-api/src/main/java/org/avni/server/web/response/ReportCardResponse.java similarity index 50% rename from avni-server-api/src/main/java/org/avni/server/web/request/CardContract.java rename to avni-server-api/src/main/java/org/avni/server/web/response/ReportCardResponse.java index a3bde53fe..787347ad5 100644 --- a/avni-server-api/src/main/java/org/avni/server/web/request/CardContract.java +++ b/avni-server-api/src/main/java/org/avni/server/web/response/ReportCardResponse.java @@ -1,106 +1,21 @@ -package org.avni.server.web.request; +package org.avni.server.web.response; import org.avni.server.web.contract.EncounterTypeContract; import org.avni.server.web.contract.ProgramContract; +import org.avni.server.web.contract.ReportCardContract; +import org.avni.server.web.request.StandardReportCardTypeContract; +import org.avni.server.web.request.SubjectTypeContract; import java.util.ArrayList; import java.util.List; -public class CardContract extends CHSRequest { - private String name; - private String query; - private String description; - private String color; - private Double displayOrder; - private Long standardReportCardTypeId; +public class ReportCardResponse extends ReportCardContract { private StandardReportCardTypeContract standardReportCardType; - private String iconFileS3Key; - private boolean nested; - private int count; + private List standardReportCardInputSubjectTypes = new ArrayList<>(); private List standardReportCardInputPrograms = new ArrayList<>(); private List standardReportCardInputEncounterTypes = new ArrayList<>(); - public Long getStandardReportCardTypeId() { - return standardReportCardTypeId; - } - - public void setStandardReportCardTypeId(Long standardReportCardTypeId) { - this.standardReportCardTypeId = standardReportCardTypeId; - } - - public Double getDisplayOrder() { - return displayOrder; - } - - public void setDisplayOrder(Double displayOrder) { - this.displayOrder = displayOrder; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getQuery() { - return query; - } - - public void setQuery(String query) { - this.query = query; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public String getColor() { - return color; - } - - public void setColor(String color) { - this.color = color; - } - - public String getIconFileS3Key() { - return iconFileS3Key; - } - - public void setIconFileS3Key(String iconFileS3Key) { - this.iconFileS3Key = iconFileS3Key; - } - - public boolean isNested() { - return nested; - } - - public void setNested(boolean nested) { - this.nested = nested; - } - - public int getCount() { - return count; - } - - public void setCount(int count) { - this.count = count; - } - - public StandardReportCardTypeContract getStandardReportCardType() { - return standardReportCardType; - } - - public void setStandardReportCardType(StandardReportCardTypeContract standardReportCardType) { - this.standardReportCardType = standardReportCardType; - } - public List getStandardReportCardInputSubjectTypes() { return standardReportCardInputSubjectTypes; } @@ -124,4 +39,12 @@ public List getStandardReportCardInputEncounterTypes() { public void setStandardReportCardInputEncounterTypes(List standardReportCardInputEncounterTypes) { this.standardReportCardInputEncounterTypes = standardReportCardInputEncounterTypes; } + + public StandardReportCardTypeContract getStandardReportCardType() { + return standardReportCardType; + } + + public void setStandardReportCardType(StandardReportCardTypeContract standardReportCardType) { + this.standardReportCardType = standardReportCardType; + } }