Skip to content

Commit

Permalink
Revert ab2d 6276 2 (#422)
Browse files Browse the repository at this point in the history
 Revert Post request to BFD
  • Loading branch information
smirnovaae authored Jan 14, 2025
1 parent 5654a3a commit f1f4160
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
16 changes: 11 additions & 5 deletions ab2d-bfd/src/main/java/gov/cms/ab2d/bfd/client/BFDSearchImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
import java.io.IOException;
import java.io.InputStream;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.List;

@Component
@Slf4j
Expand Down Expand Up @@ -65,15 +63,23 @@ public IBaseBundle searchEOB(long patientId, OffsetDateTime since, OffsetDateTim
}

HttpGet request = new HttpGet(url.toString());
log.info("Executing BFD Search Request " + request);
// No active profiles means use JSON
if (environment.getActiveProfiles().length == 0) {
request.addHeader("Accept", "application/fhir+json;q=1.0, application/json+fhir;q=0.9");
}

request.addHeader(HttpHeaders.ACCEPT, "gzip");
request.addHeader(HttpHeaders.ACCEPT_CHARSET, "utf-8");
request.addHeader(BFDClient.BFD_HDR_BULK_CLIENTID, contractNum);
request.addHeader(BFDClient.BFD_HDR_BULK_JOBID, bulkJobId);
log.info("Executing BFD Search Request " + request);
byte[] responseBytes = getEOBSFromBFD(patientId, request);

return parseBundle(version, responseBytes);
}

/**
Method exists to track connection to BFD for New Relic
Method exists to track connection to BFD for New Relic
*/
@Trace
private byte[] getEOBSFromBFD(long patientId, HttpGet request) throws IOException {
Expand All @@ -99,4 +105,4 @@ private byte[] getEOBSFromBFD(long patientId, HttpGet request) throws IOExceptio
private IBaseBundle parseBundle(FhirVersion version, byte[] responseBytes) {
return version.getJsonParser().parseResource(version.getBundleClass(), new ByteArrayInputStream(responseBytes));
}
}
}
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ ext {

// AB2D libraries
fhirVersion='2.1.0'
bfdVersion='2.5.0'
bfdVersion='2.6.0'
aggregatorVersion='2.0.1'
filtersVersion='2.1.0'
eventClientVersion='3.2.1'
Expand Down

0 comments on commit f1f4160

Please sign in to comment.