From e967a6fd1f1c3cde3d40c0e456756604eefe0670 Mon Sep 17 00:00:00 2001 From: Sahil Malhotra <88040167+smalho01@users.noreply.github.com> Date: Thu, 3 Mar 2022 11:52:59 -0500 Subject: [PATCH] Revert "Fork Auto Sync" --- .github/workflows/docker-cd.yml | 1 - Dockerfile | 22 ++++---- Dockerfile.dev | 26 ++++----- dockerRunnerDev.sh | 40 +++++++------- .../src/main/java/org/cdshooks/Coding.java | 19 ------- .../src/main/java/org/cdshooks/Source.java | 16 ++---- .../java/org/hl7/davinci/r4/CardTypes.java | 44 --------------- .../java/org/hl7/davinci/r4/Utilities.java | 4 +- server/build.gradle | 2 - .../cdshooks/services/crd/CdsService.java | 19 +++---- .../cdshooks/services/crd/CdsServiceRems.java | 3 +- .../endpoint/components/CardBuilder.java | 53 ++++++++----------- .../endpoint/components/PrefetchHydrator.java | 9 +--- .../cdshooks/components/CardBuilderTest.java | 3 +- 14 files changed, 80 insertions(+), 181 deletions(-) delete mode 100644 resources/src/main/java/org/cdshooks/Coding.java delete mode 100644 resources/src/main/java/org/hl7/davinci/r4/CardTypes.java diff --git a/.github/workflows/docker-cd.yml b/.github/workflows/docker-cd.yml index 25dbea383..837d3d44f 100644 --- a/.github/workflows/docker-cd.yml +++ b/.github/workflows/docker-cd.yml @@ -25,4 +25,3 @@ jobs: context: . push: true tags: codexrems/crd:REMSvlatest - diff --git a/Dockerfile b/Dockerfile index 9bd65922a..6b6f77374 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,12 @@ FROM gradle:6.9.0-jdk11 - # Copy app files to container - COPY --chown=gradle:gradle . /CRD/ - # Set working directory so that all subsequent command runs in this folder - WORKDIR /CRD/server/ - # Embed CDS Library - RUN gradle embedCdsLibrary - # Expose port to access the app - RUN gradle build - EXPOSE 8090 - # Command to run our app - CMD gradle bootRun +# Copy app files to container +COPY --chown=gradle:gradle . /CRD/ +# Set working directory so that all subsequent command runs in this folder +WORKDIR /CRD +# Embed CDS Library +RUN gradle embedCdsLibrary +# Expose port to access the app +RUN gradle build +EXPOSE 8090 +# Command to run our app +CMD gradle bootRun \ No newline at end of file diff --git a/Dockerfile.dev b/Dockerfile.dev index bc3dd7528..4f3f4a708 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -1,14 +1,14 @@ # Base image - FROM gradle:6.9.0-jdk11 - # Copy app files to container - COPY --chown=gradle:gradle . /CRD/ - # Set working directory so that all subsequent command runs in this folder - WORKDIR /CRD - # Embed CDS Library - # RUN gradle embedCdsLibrary - RUN gradle build - # Expose port to access the app - EXPOSE 8090 - EXPOSE 8091 - # Command to run our app - CMD ./dockerRunnerDev.sh +FROM gradle:6.9.0-jdk11 +# Copy app files to container +COPY --chown=gradle:gradle . /CRD/ +# Set working directory so that all subsequent command runs in this folder +WORKDIR /CRD +# Embed CDS Library +# RUN gradle embedCdsLibrary +RUN gradle build +# Expose port to access the app +EXPOSE 8090 +EXPOSE 8091 +# Command to run our app +CMD ./dockerRunnerDev.sh diff --git a/dockerRunnerDev.sh b/dockerRunnerDev.sh index d7a91d233..a605a6e87 100755 --- a/dockerRunnerDev.sh +++ b/dockerRunnerDev.sh @@ -1,28 +1,28 @@ #!/bin/bash # Handle closing application on signal interrupt (ctrl + c) - trap 'kill $CONTINUOUS_BUILD_PID $SERVER_PID; gradle --stop; exit' INT +trap 'kill $CONTINUOUS_BUILD_PID $SERVER_PID; gradle --stop; exit' INT - mkdir logs - # Reset log file content for new application boot - echo "*** Logs for 'gradle installBootDist --continuous' ***" > ./logs/builder.log - echo "*** Logs for 'gradle bootRun' ***" > ./logs/runner.log +mkdir logs +# Reset log file content for new application boot +echo "*** Logs for 'gradle installBootDist --continuous' ***" > ./logs/builder.log +echo "*** Logs for 'gradle bootRun' ***" > ./logs/runner.log - # Print that the application is starting in watch mode - echo "starting application in watch mode..." +# Print that the application is starting in watch mode +echo "starting application in watch mode..." - # Start the continious build listener process - echo "starting continuous build listener..." - gradle build --continuous 2>&1 | tee ./logs/builder.log & CONTINUOUS_BUILD_PID=$! +# Start the continious build listener process +echo "starting continuous build listener..." +gradle build --continuous 2>&1 | tee ./logs/builder.log & CONTINUOUS_BUILD_PID=$! - # Start server process once initial build finishes - ( while ! grep -m1 'BUILD SUCCESSFUL' < ./logs/builder.log; do - sleep 1 - done - echo "starting crd server in debug mode..." - gradle bootRun -Pdebug 2>&1 | tee ./logs/runner.log ) & SERVER_PID=$! +# Start server process once initial build finishes +( while ! grep -m1 'BUILD SUCCESSFUL' < ./logs/builder.log; do + sleep 1 +done +echo "starting crd server in debug mode..." +gradle bootRun -Pdebug | tee ./logs/runner.log ) & SERVER_PID=$! - # Handle application background process exiting - wait $CONTINUOUS_BUILD_PID $SERVER_PID - EXIT_CODE=$? - echo "application exited with exit code $EXIT_CODE..." +# Handle application background process exiting +wait $CONTINUOUS_BUILD_PID $SERVER_PID +EXIT_CODE=$? +echo "application exited with exit code $EXIT_CODE..." \ No newline at end of file diff --git a/resources/src/main/java/org/cdshooks/Coding.java b/resources/src/main/java/org/cdshooks/Coding.java deleted file mode 100644 index ddb4848a1..000000000 --- a/resources/src/main/java/org/cdshooks/Coding.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.cdshooks; - -public class Coding { - - private String code; - - private String system = null; - - private String display = null; - - public String getCode() { return code; } - public void setCode(String code) { this.code = code; } - - public String getSystem() { return system; } - public void setSystem(String system) { this.system = system; } - - public String getDisplay() { return display; } - public void setDisplay(String display) { this.display = display; } -} diff --git a/resources/src/main/java/org/cdshooks/Source.java b/resources/src/main/java/org/cdshooks/Source.java index 22b63acd6..05b138906 100755 --- a/resources/src/main/java/org/cdshooks/Source.java +++ b/resources/src/main/java/org/cdshooks/Source.java @@ -5,15 +5,13 @@ public class Source { private String url = null; - private String icon = null; - - private Coding topic = null; - public String getLabel() { return label; } - public void setLabel(String label) { this.label = label; } + public void setLabel(String label) { + this.label = label; + } public String getUrl() { return url; @@ -22,12 +20,4 @@ public String getUrl() { public void setUrl(String url) { this.url = url; } - - public String getIcon() { return icon; } - - public void setIcon(String icon) { this.icon = icon; } - - public Coding getTopic() { return topic; } - - public void setTopic(Coding topic) { this.topic = topic; } } diff --git a/resources/src/main/java/org/hl7/davinci/r4/CardTypes.java b/resources/src/main/java/org/hl7/davinci/r4/CardTypes.java deleted file mode 100644 index 85aaaf67c..000000000 --- a/resources/src/main/java/org/hl7/davinci/r4/CardTypes.java +++ /dev/null @@ -1,44 +0,0 @@ -package org.hl7.davinci.r4; - -import org.cdshooks.Coding; - -public enum CardTypes { - COVERAGE("coverage", "Coverage"), - PRIOR_AUTH("prior-auth", "Prior Authorization"), - DTR_CLIN("dtr-clin", "DTR Clin"), - DTR_ADMIN("dtr-admin", "DTR Admin"), - CLAIM("claim", "Claim"), - INSURANCE("insurance", "Insurance"), - LIMITS("limits", "Limits"), - NETWORK("network", "Network"), - APPROPRIATE_USE("appropriate-use", "Appropriate Use"), - COST("cost", "Cost"), - THERAPY_ALTERNATIVES_OPT("therapy-alternatives-opt", "Therapy Alternatives Opt"), - THERAPY_ALTERNATIVES_REG("therapy-alternatives-req", "Therapy Alternatives Req"), - CLINICAL_REMINDER("clinical-reminder", "Clinical Reminder"), - DUPLICATE_THERAPY("duplicate-therapy", "Duplicate Therapy"), - CONTRAINDICATION("contraindication", "Contraindication"), - GUIDELINE("guideline", "Guideline"), - OFF_GUIDELINE("off-guideline", "Off Guideline"); - - private String code; - private String display; - private static String codeSystem = "http://hl7.org/fhir/us/davinci-crd/CodeSystem/cardType"; - - CardTypes(String code, String display) { - this.code = code; - this.display = display; - } - - public String getCode() { return code; } - public String getDisplay() { return display; } - public String getCodeSystem() { return codeSystem; } - - public Coding getCoding() { - Coding coding = new Coding(); - coding.setSystem(codeSystem); - coding.setCode(code); - coding.setDisplay(display); - return coding; - } -} diff --git a/resources/src/main/java/org/hl7/davinci/r4/Utilities.java b/resources/src/main/java/org/hl7/davinci/r4/Utilities.java index e8b26d862..e1821bc71 100644 --- a/resources/src/main/java/org/hl7/davinci/r4/Utilities.java +++ b/resources/src/main/java/org/hl7/davinci/r4/Utilities.java @@ -171,9 +171,7 @@ public static List getPayors(List coverages) { for (Coverage coverage: coverages){ for (Reference ref: coverage.getPayor()){ Organization organization = (Organization) ref.getResource(); - if (organization != null) { - payors.add(organization); - } + payors.add(organization); } } return payors; diff --git a/server/build.gradle b/server/build.gradle index e09a96bff..00c860cdc 100644 --- a/server/build.gradle +++ b/server/build.gradle @@ -28,10 +28,8 @@ bootRun { if (project.hasProperty('debug')) { jvmArgs=["-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=0.0.0.0:8091"] } - } - dependencies { developmentOnly("org.springframework.boot:spring-boot-devtools") diff --git a/server/src/main/java/org/hl7/davinci/endpoint/cdshooks/services/crd/CdsService.java b/server/src/main/java/org/hl7/davinci/endpoint/cdshooks/services/crd/CdsService.java index d784bae08..66c8de4f6 100755 --- a/server/src/main/java/org/hl7/davinci/endpoint/cdshooks/services/crd/CdsService.java +++ b/server/src/main/java/org/hl7/davinci/endpoint/cdshooks/services/crd/CdsService.java @@ -14,7 +14,6 @@ import org.hl7.davinci.endpoint.database.RequestService; import org.hl7.davinci.endpoint.files.FileStore; import org.hl7.davinci.endpoint.rules.CoverageRequirementRuleResult; -import org.hl7.davinci.r4.CardTypes; import org.hl7.davinci.r4.crdhook.DiscoveryExtension; import org.hl7.davinci.r4.crdhook.orderselect.OrderSelectRequest; import org.hl7.davinci.endpoint.database.FhirResourceRepository; @@ -86,7 +85,7 @@ public CdsResponse handleRequest(@Valid @RequestBody requestTypeT request, URL a requestLog.advanceTimeline(requestService); } catch (RequestIncompleteException e) { logger.warn(e.getMessage() + "; summary card sent to client"); - response.addCard(CardBuilder.summaryCard(CardTypes.COVERAGE, e.getMessage())); + response.addCard(CardBuilder.summaryCard(e.getMessage())); requestLog.setCardListFromCards(response.getCards()); requestLog.setResults(e.getMessage()); requestService.edit(requestLog); @@ -134,12 +133,7 @@ public CdsResponse handleRequest(@Valid @RequestBody requestTypeT request, URL a || StringUtils.isNotEmpty(coverageRequirements.getQuestionnaireDispenseUri()) || StringUtils.isNotEmpty(coverageRequirements.getQuestionnaireAdditionalUri())) { List smartAppLinks = createQuestionnaireLinks(request, applicationBaseUrl, lookupResult, results); - - if (coverageRequirements.isPriorAuthRequired()) { - response.addCard(CardBuilder.transform(CardTypes.PRIOR_AUTH, results, smartAppLinks)); - } else if (coverageRequirements.isDocumentationRequired()) { - response.addCard(CardBuilder.transform(CardTypes.DTR_CLIN, results, smartAppLinks)); - } + response.addCard(CardBuilder.transform(results, smartAppLinks)); // add a card for an alternative therapy if there is one if (results.getAlternativeTherapy().getApplies() && hookConfiguration.getAlternativeTherapy()) { @@ -152,12 +146,12 @@ public CdsResponse handleRequest(@Valid @RequestBody requestTypeT request, URL a } } else { logger.warn("Unspecified Questionnaire URI; summary card sent to client"); - response.addCard(CardBuilder.transform(CardTypes.COVERAGE, results)); + response.addCard(CardBuilder.transform(results)); } } else { // no prior auth or documentation required logger.info("Add the no doc or prior auth required card"); - Card card = CardBuilder.transform(CardTypes.COVERAGE, results); + Card card = CardBuilder.transform(results); card.addSuggestionsItem(CardBuilder.createSuggestionWithNote(card, results.getRequest(), fhirComponents, "Save Update To EHR", "Update original " + results.getRequest().fhirType() + " to add note", true)); @@ -180,9 +174,9 @@ public CdsResponse handleRequest(@Valid @RequestBody requestTypeT request, URL a if (!foundApplicableRule) { String msg = "No documentation rules found"; logger.warn(msg + "; summary card sent to client"); - response.addCard(CardBuilder.summaryCard(CardTypes.COVERAGE, msg)); + response.addCard(CardBuilder.summaryCard(msg)); } - CardBuilder.errorCardIfNonePresent(CardTypes.COVERAGE, response); + CardBuilder.errorCardIfNonePresent(response); } // Adding card to requestLog @@ -257,6 +251,7 @@ protected Object evaluateStatement(String statement, Context context) { } + // Implement these in child class public abstract List createCqlExecutionContexts(requestTypeT request, FileStore fileStore, String baseUrl) throws RequestIncompleteException; diff --git a/server/src/main/java/org/hl7/davinci/endpoint/cdshooks/services/crd/CdsServiceRems.java b/server/src/main/java/org/hl7/davinci/endpoint/cdshooks/services/crd/CdsServiceRems.java index 9a550fd98..738373737 100644 --- a/server/src/main/java/org/hl7/davinci/endpoint/cdshooks/services/crd/CdsServiceRems.java +++ b/server/src/main/java/org/hl7/davinci/endpoint/cdshooks/services/crd/CdsServiceRems.java @@ -1,7 +1,6 @@ package org.hl7.davinci.endpoint.cdshooks.services.crd; import org.cdshooks.Card; -import org.hl7.davinci.r4.CardTypes; import org.cdshooks.CdsRequest; import org.cdshooks.CdsResponse; import org.cdshooks.Hook; @@ -62,7 +61,7 @@ public CdsResponse handleRequest(@Valid @RequestBody requestTypeT request, URL a CdsResponse response = new CdsResponse(); List medications = getMedications(request); for (Coding medication : medications) { - Card card = CardBuilder.summaryCard(CardTypes.COVERAGE, ""); + Card card = CardBuilder.summaryCard(""); if (isRemsDrug(medication)) { card.setSummary(String.format("%s has REMS", medication.getDisplay())); } else { diff --git a/server/src/main/java/org/hl7/davinci/endpoint/components/CardBuilder.java b/server/src/main/java/org/hl7/davinci/endpoint/components/CardBuilder.java index 6001a813e..e67ff6f42 100644 --- a/server/src/main/java/org/hl7/davinci/endpoint/components/CardBuilder.java +++ b/server/src/main/java/org/hl7/davinci/endpoint/components/CardBuilder.java @@ -3,12 +3,10 @@ import java.util.*; import org.cdshooks.*; -import org.cdshooks.Coding; import org.hl7.davinci.FhirComponentsT; import org.hl7.davinci.endpoint.cdshooks.services.crd.r4.FhirRequestProcessor; import org.hl7.davinci.endpoint.database.FhirResource; import org.hl7.davinci.endpoint.database.FhirResourceRepository; -import org.hl7.davinci.r4.CardTypes; import org.hl7.davinci.r4.Utilities; import org.hl7.fhir.instance.model.api.IBase; import org.hl7.fhir.instance.model.api.IBaseResource; @@ -79,12 +77,11 @@ public CqlResultsForCard setRequest(IBaseResource request) { /** * Transforms a result from the database into a card. * - * @param cardType * @param cqlResults * @return card with appropriate information */ - public static Card transform(CardTypes cardType, CqlResultsForCard cqlResults, Boolean addLink) { - Card card = baseCard(cardType); + public static Card transform(CqlResultsForCard cqlResults, Boolean addLink) { + Card card = baseCard(); if (addLink) { Link link = new Link(); @@ -103,24 +100,22 @@ public static Card transform(CardTypes cardType, CqlResultsForCard cqlResults, B /** * Transforms a result from the database into a card, defaults to adding the link. * - * @param cardType * @param cqlResults * @return card with appropriate information */ - public static Card transform(CardTypes cardType, CqlResultsForCard cqlResults) { - return transform(cardType, cqlResults, true); + public static Card transform(CqlResultsForCard cqlResults) { + return transform(cqlResults, true); } /** * Transforms a result from the database into a card. * - * @param cardType * @param cqlResults * @param smartAppLaunchLink smart app launch Link * @return card with appropriate information */ - public static Card transform(CardTypes cardType, CqlResultsForCard cqlResults, Link smartAppLaunchLink) { - Card card = transform(cardType, cqlResults); + public static Card transform(CqlResultsForCard cqlResults, Link smartAppLaunchLink) { + Card card = transform(cqlResults); List links = new ArrayList(card.getLinks()); links.add(smartAppLaunchLink); card.setLinks(links); @@ -130,13 +125,12 @@ public static Card transform(CardTypes cardType, CqlResultsForCard cqlResults, L /** * Tranform the CQL results for card * then add a list of smart app launch links to the card - * @param cardType * @param cqlResults The CQL results * @param smartAppLaunchLinks a list of links * @return card to be returned */ - public static Card transform(CardTypes cardType, CqlResultsForCard cqlResults, List smartAppLaunchLinks) { - Card card = transform(cardType, cqlResults); + public static Card transform(CqlResultsForCard cqlResults, List smartAppLaunchLinks) { + Card card = transform(cqlResults); List links = new ArrayList(card.getLinks()); links.addAll(smartAppLaunchLinks); card.setLinks(links); @@ -146,12 +140,11 @@ public static Card transform(CardTypes cardType, CqlResultsForCard cqlResults, L /** * Creates a card with a summary but also has all of the necessary fields populated to be valid. * - * @param cardType * @param summary The desired summary for the card * @return valid card */ - public static Card summaryCard(CardTypes cardType, String summary) { - Card card = baseCard(cardType); + public static Card summaryCard(String summary) { + Card card = baseCard(); card.setSummary(summary); return card; } @@ -159,7 +152,7 @@ public static Card summaryCard(CardTypes cardType, String summary) { public static Card alternativeTherapyCard(AlternativeTherapy alternativeTherapy, IBaseResource resource, FhirComponentsT fhirComponents) { logger.info("Build Alternative Therapy Card: " + alternativeTherapy.toString()); - Card card = baseCard(CardTypes.THERAPY_ALTERNATIVES_OPT); + Card card = baseCard(); card.setSummary("Alternative Therapy Suggested"); card.setDetail(alternativeTherapy.getDisplay() + " (" + alternativeTherapy.getCode() + ") should be used instead."); @@ -204,7 +197,7 @@ public static Card alternativeTherapyCard(AlternativeTherapy alternativeTherapy, public static Card drugInteractionCard(DrugInteraction drugInteraction) { logger.info("Build Drug Interaction Card: " + drugInteraction.getSummary()); - Card card = baseCard(CardTypes.CONTRAINDICATION); + Card card = baseCard(); card.setSummary(drugInteraction.getSummary()); card.setDetail(drugInteraction.getDetail()); card.setIndicator(Card.IndicatorEnum.WARNING); @@ -222,7 +215,7 @@ public static Card priorAuthCard(CqlResultsForCard cqlResults, FhirResourceRepository fhirResourceRepository) { logger.info("Build Prior Auth Card"); - Card card = transform(CardTypes.PRIOR_AUTH, cqlResults, false); + Card card = transform(cqlResults, false); // create the ClaimResponse ClaimResponse claimResponse = Utilities.createClaimResponse(priorAuthId, patientId, payerId, providerId, applicationFhirPath); @@ -318,25 +311,19 @@ public static Suggestion createSuggestionWithNote(Card card, return requestWithNoteSuggestion; } - private static Source createSource(CardTypes cardType) { - Source source = new Source(); - source.setLabel("Da Vinci CRD Reference Implementation"); - source.setTopic(cardType.getCoding()); - return source; - } - /** * Creates an error card and adds it to the response if the response that is passed in does not * contain any cards. * - * @param cardType * @param response The response to check and add cards to */ - public static void errorCardIfNonePresent(CardTypes cardType, CdsResponse response) { + public static void errorCardIfNonePresent(CdsResponse response) { if (response.getCards() == null || response.getCards().size() == 0) { Card card = new Card(); card.setIndicator(Card.IndicatorEnum.WARNING); - card.setSource(createSource(cardType)); + Source source = new Source(); + source.setLabel("Da Vinci CRD Reference Implementation"); + card.setSource(source); String msg = "Unable to process hook request from provided information."; card.setSummary(msg); response.addCard(card); @@ -344,10 +331,12 @@ public static void errorCardIfNonePresent(CardTypes cardType, CdsResponse respon } } - private static Card baseCard(CardTypes cardType) { + private static Card baseCard() { Card card = new Card(); card.setIndicator(Card.IndicatorEnum.INFO); - card.setSource(createSource(cardType)); + Source source = new Source(); + source.setLabel("Da Vinci CRD Reference Implementation"); + card.setSource(source); return card; } } diff --git a/server/src/main/java/org/hl7/davinci/endpoint/components/PrefetchHydrator.java b/server/src/main/java/org/hl7/davinci/endpoint/components/PrefetchHydrator.java index 3ddc3512b..d72538e9a 100644 --- a/server/src/main/java/org/hl7/davinci/endpoint/components/PrefetchHydrator.java +++ b/server/src/main/java/org/hl7/davinci/endpoint/components/PrefetchHydrator.java @@ -141,12 +141,7 @@ public void hydrate() { } private IBaseResource executeFhirQuery(String query, String token) { - // remove the trailing '/' if there is one - String fhirBase = cdsRequest.getFhirServer(); - if (fhirBase != null && fhirBase.endsWith("/")) { - fhirBase = fhirBase.substring(0, fhirBase.length() - 1); - } - String fullUrl = fhirBase + "/" + query; + String fullUrl = cdsRequest.getFhirServer() + query; // TODO: Once our provider fhir server is up, switch the fetch to use the hapi client instead // cdsRequest.getOauth(); // FhirContext ctx = FhirContext.forR4(); @@ -165,7 +160,7 @@ private IBaseResource executeFhirQuery(String query, String token) { } HttpEntity entity = new HttpEntity<>("", headers); try { - logger.info("Fetching: " + fullUrl); + logger.debug("Fetching: " + fullUrl); ResponseEntity response = restTemplate.exchange(fullUrl, HttpMethod.GET, entity, String.class); return fhirComponents.getJsonParser().parseResource(response.getBody()); diff --git a/server/src/test/java/org/hl7/davinci/endpoint/cdshooks/components/CardBuilderTest.java b/server/src/test/java/org/hl7/davinci/endpoint/cdshooks/components/CardBuilderTest.java index 5fd37bfcb..726b2d35e 100644 --- a/server/src/test/java/org/hl7/davinci/endpoint/cdshooks/components/CardBuilderTest.java +++ b/server/src/test/java/org/hl7/davinci/endpoint/cdshooks/components/CardBuilderTest.java @@ -7,7 +7,6 @@ import org.hl7.davinci.endpoint.components.CardBuilder; import org.hl7.davinci.endpoint.components.CardBuilder.CqlResultsForCard; import org.cdshooks.Card; -import org.hl7.davinci.r4.CardTypes; import org.junit.jupiter.api.Test; public class CardBuilderTest { @@ -21,7 +20,7 @@ public void testRulesWithNoAuthNeeded() { coverageRequirements.setInfoLink("http://some.link"); coverageRequirements.setSummary("The summary!"); cardResults.setCoverageRequirements(coverageRequirements); - Card card = CardBuilder.transform(CardTypes.COVERAGE, cardResults); + Card card = CardBuilder.transform(cardResults); assertEquals("The summary!", card.getSummary()); assertEquals("Some details.", card.getDetail()); assertEquals("http://some.link", card.getLinks().get(0).getUrl());