From 61633fab6ac0c41cbf044b152ef209a6705fadbc Mon Sep 17 00:00:00 2001
From: Anna Smirnova <132938234+smirnovaae@users.noreply.github.com>
Date: Tue, 19 Sep 2023 17:13:09 -0700
Subject: [PATCH 1/4] Bump AB2D-Libs versions (#1285)
---
pom.xml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/pom.xml b/pom.xml
index eb99e1ddc..01101c011 100644
--- a/pom.xml
+++ b/pom.xml
@@ -44,10 +44,10 @@
1.11.8
- 2.0.9
+ 2.0.10
1.1.11
- 1.2.11
- 1.8.5
+ 1.2.12
+ 1.8.6
1.1.9
1.1.4
From 562b372a2efff35f0c3778f3378f1308dd7c1dac Mon Sep 17 00:00:00 2001
From: Anna Smirnova <132938234+smirnovaae@users.noreply.github.com>
Date: Wed, 20 Sep 2023 18:51:03 -0700
Subject: [PATCH 2/4] Ab2 d 5637/change text (#1284)
* AB2D-5637 Enhance sandbox documentation based on connectathon feedback
* AB2D-5637 Enhance sandbox documentation based on connectathon feedback
* AB2D-5637 Enhance sandbox documentation based on connectathon feedback
---
.../main/java/gov/cms/ab2d/api/controller/common/ApiText.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/api/src/main/java/gov/cms/ab2d/api/controller/common/ApiText.java b/api/src/main/java/gov/cms/ab2d/api/controller/common/ApiText.java
index aacdfadc4..6df20f5ff 100644
--- a/api/src/main/java/gov/cms/ab2d/api/controller/common/ApiText.java
+++ b/api/src/main/java/gov/cms/ab2d/api/controller/common/ApiText.java
@@ -10,7 +10,7 @@ public class ApiText {
public static final String BULK_RESPONSE = "Absolute URL of an endpoint for subsequent status requests (polling location)";
public static final String RUNNING_JOBIDS = "URLs of currently running jobs. To cancel one of those jobs, invoke the Status DELETE call.";
public static final String BULK_SINCE = "Beginning time of query. Returns all records \"since\" this time. At this time, it must be after " + SINCE_EARLIEST_DATE;
- public static final String BULK_SINCE_DEFAULT = " If no value is provided, it will default to the last time a successful job was requested if it exists. This rule is NOT applied to sandbox contract matching Z0***.";
+ public static final String BULK_SINCE_DEFAULT = " If no value is provided, it will default to the last time a successful job was requested if it exists. The earliest accepted date is 2020-02-13T00:00:00.000-05:00";
public static final String BULK_RESPONSE_LONG = "Absolute URL of an endpoint for subsequent status requests (polling location)";
public static final String EXPORT_STARTED = "Export request has started";
public static final String MAX_JOBS = "Too many jobs are currently running. Either wait for currently running jobs to finish or cancel some/all of those jobs.";
From f000d04c093d8b4c6486eeec73592302817a728c Mon Sep 17 00:00:00 2001
From: Anna Smirnova <132938234+smirnovaae@users.noreply.github.com>
Date: Wed, 20 Sep 2023 21:16:25 -0700
Subject: [PATCH 3/4] AB2D/update libs version (#1286)
* Bump AB2D-Libs versions
* Bump AB2D-Libs versions
* bump eventClientVersion
* bump filtersVersion
* address PR comments
* address PR comments
* Revert some changes in versions
* bump snapshot versions
* fix
* fix
* fix
* fix e2e test
* fix e2e test
* temporary fix
* temporary fix
* temporary fix
---------
Co-authored-by: Sadibhatla <121067659+Sadibhatla@users.noreply.github.com>
---
.../java/gov/cms/ab2d/e2etest/TestRunner.java | 8 +++++---
pom.xml | 2 +-
settings.xml | 16 ++++++++--------
3 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/e2e-test/src/test/java/gov/cms/ab2d/e2etest/TestRunner.java b/e2e-test/src/test/java/gov/cms/ab2d/e2etest/TestRunner.java
index 4f65ce420..0e1e90772 100644
--- a/e2e-test/src/test/java/gov/cms/ab2d/e2etest/TestRunner.java
+++ b/e2e-test/src/test/java/gov/cms/ab2d/e2etest/TestRunner.java
@@ -404,7 +404,9 @@ private void checkMetadata(OffsetDateTime since, JSONObject jsonObject) throws J
private void checkEOBExtensions(JSONObject jsonObject, FhirVersion version) throws JSONException {
switch (version) {
case STU3:
- checkEOBExtensionsSTU3(jsonObject);
+ //ToDo: Temporary fix for Humana.
+ // Uncomment and fix.
+ // checkEOBExtensionsSTU3(jsonObject);
break;
case R4:
checkEOBExtensionsR4(jsonObject);
@@ -418,7 +420,7 @@ private void checkEOBExtensionsSTU3(JSONObject jsonObject) throws JSONException
final JSONArray extensions = jsonObject.getJSONArray("extension");
assertNotNull(extensions);
- assertEquals(1, extensions.length());
+ assertEquals(11, extensions.length());
// Assume first extension is MBI object
JSONObject idObj = extensions.getJSONObject(0);
@@ -438,7 +440,7 @@ private void checkEOBExtensionsSTU3(JSONObject jsonObject) throws JSONException
assertFalse(StringUtils.isBlank(mbi));
JSONArray extensionsArray = valueIdentifier.getJSONArray("extension");
- assertEquals(1, extensionsArray.length());
+ assertEquals(11, extensionsArray.length());
JSONObject currencyExtension = extensionsArray.getJSONObject(0);
assertEquals(CURRENCY_IDENTIFIER, currencyExtension.getString("url"));
diff --git a/pom.xml b/pom.xml
index 01101c011..82ec766bf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -47,7 +47,7 @@
2.0.10
1.1.11
1.2.12
- 1.8.6
+ 1.8.7
1.1.9
1.1.4
diff --git a/settings.xml b/settings.xml
index c1edd64bf..dc3433717 100644
--- a/settings.xml
+++ b/settings.xml
@@ -22,14 +22,14 @@
false
central
- ab2d-maven-cache
- ${repository_url}/ab2d-maven-repo/
+ ab2d-maven-virtual
+ ${repository_url}/ab2d-maven-virtual
snapshots
- ab2d-maven
- ${repository_url}/ab2d-main/
+ ab2d-maven-virtual
+ ${repository_url}/ab2d-maven-virtual
@@ -38,14 +38,14 @@
false
central
- ab2d-maven-cache
- ${repository_url}/ab2d-maven-repo
+ ab2d-maven-virtual
+ ${repository_url}/ab2d-maven-virtual
snapshots
- ab2d-maven
- ${repository_url}/ab2d-main
+ ab2d-maven-virtual
+ ${repository_url}/ab2d-maven-virtual
artifactory
From da7c00563a446264c80e6a2e89c7df5dc24ddd25 Mon Sep 17 00:00:00 2001
From: Anna Smirnova <132938234+smirnovaae@users.noreply.github.com>
Date: Wed, 11 Oct 2023 17:37:00 -0700
Subject: [PATCH 4/4] AB2D-5777/Fix_e2e (#1290)
* AB2D-5777 Update e2e tests to support extensions
---
.../java/gov/cms/ab2d/e2etest/TestRunner.java | 48 ++++++++-----------
1 file changed, 20 insertions(+), 28 deletions(-)
diff --git a/e2e-test/src/test/java/gov/cms/ab2d/e2etest/TestRunner.java b/e2e-test/src/test/java/gov/cms/ab2d/e2etest/TestRunner.java
index 0e1e90772..5c6ab5d75 100644
--- a/e2e-test/src/test/java/gov/cms/ab2d/e2etest/TestRunner.java
+++ b/e2e-test/src/test/java/gov/cms/ab2d/e2etest/TestRunner.java
@@ -109,10 +109,6 @@ class TestRunner {
private final Set acceptableIdStrings = Set.of("carrier", "dme", "hha", "hospice", "inpatient", "outpatient", "snf");
- // Define default test contract
- private String testContractV1 = "Z0000";
- private String testContractV2 = "Z0000";
-
// Get all methods annotated with @Test and run them. This will only be called from TestLaucher when running against
// an external environment, the regular tests that run as part of a build will be called like they normally would
// during a build.
@@ -120,7 +116,7 @@ public void runTests(String testContract) throws InvocationTargetException, Ille
if (testContract != null && !testContract.isEmpty()) {
log.info("Running test with contract: " + testContract);
}
- final Class annotation = Test.class;
+ final Class annotation = Test.class;
final Class> klass = this.getClass();
final List allMethods = new ArrayList<>(Arrays.asList(klass.getDeclaredMethods()));
for (final Method method : allMethods) {
@@ -253,7 +249,7 @@ private HttpResponse pollForStatusResponse(String statusUrl) throws Inte
List xProgressList = statusResponse.headers().map().get("x-progress");
if (xProgressList != null && !xProgressList.isEmpty()) {
String xProgress = xProgressList.iterator().next();
- int xProgressValue = Integer.valueOf(xProgress.substring(0, xProgress.indexOf('%')));
+ int xProgressValue = Integer.parseInt(xProgress.substring(0, xProgress.indexOf('%')));
if (xProgressValue > 0 && xProgressValue < 100) {
statusesBetween0And100.add(xProgressValue);
}
@@ -403,27 +399,23 @@ private void checkMetadata(OffsetDateTime since, JSONObject jsonObject) throws J
private void checkEOBExtensions(JSONObject jsonObject, FhirVersion version) throws JSONException {
switch (version) {
- case STU3:
- //ToDo: Temporary fix for Humana.
- // Uncomment and fix.
- // checkEOBExtensionsSTU3(jsonObject);
- break;
- case R4:
- checkEOBExtensionsR4(jsonObject);
- break;
- default:
- break;
+ case STU3 -> checkEOBExtensionsSTU3(jsonObject);
+ case R4 -> checkEOBExtensionsR4(jsonObject);
+ default -> {
+ }
}
}
private void checkEOBExtensionsSTU3(JSONObject jsonObject) throws JSONException {
-
final JSONArray extensions = jsonObject.getJSONArray("extension");
assertNotNull(extensions);
- assertEquals(11, extensions.length());
- // Assume first extension is MBI object
- JSONObject idObj = extensions.getJSONObject(0);
+ List possibleNumberOfExtensions = Arrays.asList(11, 21, 22, 23 ,24);
+
+ assertTrue(possibleNumberOfExtensions.contains(extensions.length())) ;
+
+ // Assume last extension is MBI object
+ JSONObject idObj = extensions.getJSONObject(extensions.length()-1);
assertNotNull(idObj);
// Unwrap identifier
@@ -440,7 +432,7 @@ private void checkEOBExtensionsSTU3(JSONObject jsonObject) throws JSONException
assertFalse(StringUtils.isBlank(mbi));
JSONArray extensionsArray = valueIdentifier.getJSONArray("extension");
- assertEquals(11, extensionsArray.length());
+ assertEquals(1, extensionsArray.length());
JSONObject currencyExtension = extensionsArray.getJSONObject(0);
assertEquals(CURRENCY_IDENTIFIER, currencyExtension.getString("url"));
@@ -477,11 +469,10 @@ private boolean validFields(JSONObject jsonObject) {
if (!allowedFields.contains(val)) {
if (disallowedFields.contains(val)) {
log.info("********** API outputted invalid field '" + val + "'");
- return false;
} else {
log.info("********** API outputted unknown field '" + val + "'");
- return false;
}
+ return false;
}
} catch (JSONException e) {
e.printStackTrace();
@@ -513,7 +504,7 @@ private Pair performStatusRequests(List contentLocati
List retryAfterList = statusResponse.headers().map().get("retry-after");
assertEquals(retryAfterList.iterator().next(), String.valueOf(DELAY));
List xProgressList = statusResponse.headers().map().get("x-progress");
- assertTrue(xProgressList.iterator().next().matches("\\d+\\% complete"));
+ assertTrue(xProgressList.iterator().next().matches("\\d+% complete"));
HttpResponse retryStatusResponse = apiClient.statusRequest(contentLocationList.iterator().next());
@@ -627,6 +618,7 @@ void testClientCannotDownloadOtherClientsJob(FhirVersion version, String contrac
APIClient secondAPIClient = createSecondClient();
+ assertNotNull(downloadDetails);
HttpResponse downloadResponse = secondAPIClient.fileDownloadRequest(downloadDetails.getFirst());
assertEquals(403, downloadResponse.statusCode());
}
@@ -821,7 +813,10 @@ void testHealthEndPoint() throws IOException, InterruptedException {
* @return the stream of arguments
*/
private Stream getVersionAndContract() {
+ // Define default test contract
+ String testContractV1 = "Z0000";
if (v2Enabled()) {
+ String testContractV2 = "Z0000";
return Stream.of(arguments(STU3, testContractV1), arguments(R4, testContractV2));
} else {
return Stream.of(arguments(STU3, testContractV1));
@@ -843,9 +838,6 @@ static Stream getVersion() {
private static boolean v2Enabled() {
String v2Enabled = System.getenv("AB2D_V2_ENABLED");
- if (v2Enabled != null && v2Enabled.equalsIgnoreCase("true")) {
- return true;
- }
- return false;
+ return v2Enabled != null && v2Enabled.equalsIgnoreCase("true");
}
}