Skip to content

Commit

Permalink
Ab2d-6276/logging for post request (#417)
Browse files Browse the repository at this point in the history
* wip

* Added logging for HttpPost request to bfd

* Added logging for HttpPost request to bfd
  • Loading branch information
smirnovaae authored Dec 13, 2024
1 parent 18a8852 commit a44b6ee
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,16 +156,16 @@ public IBaseBundle requestPartDEnrolleesFromServer(FhirVersion version, String c
var monthCriterion = new TokenClientParam("_has:Coverage.extension")
.exactly()
.systemAndIdentifier(monthParameter, contractNumber);

return bfdClientVersions.getClient(version).search()
var request = bfdClientVersions.getClient(version).search()
.forResource(version.getPatientClass())
.where(monthCriterion)
.withAdditionalHeader(BFDClient.BFD_HDR_BULK_CLIENTID, contractNumber)
.withAdditionalHeader(BFDClient.BFD_HDR_BULK_JOBID, getJobId())
.withAdditionalHeader(INCLUDE_IDENTIFIERS_HEADER, MBI_HEADER_VALUE)
.count(contractToBenePageSize)
.usingStyle(SearchStyleEnum.POST)
.returnBundle(version.getBundleClass())
.usingStyle(SearchStyleEnum.POST);
log.info("Executing request to get Part D Enrollees " + request);
return request.returnBundle(version.getBundleClass())
.encodedJson()
.execute();
}
Expand All @@ -184,17 +184,17 @@ public IBaseBundle requestPartDEnrolleesFromServer(FhirVersion version, String c
var yearCriterion = new TokenClientParam("_has:Coverage.rfrncyr")
.exactly()
.systemAndIdentifier(YEAR_URL_PREFIX, createYearParameter(year));

return bfdClientVersions.getClient(version).search()
var request = bfdClientVersions.getClient(version).search()
.forResource(version.getPatientClass())
.where(monthCriterion)
.and(yearCriterion)
.withAdditionalHeader(BFDClient.BFD_HDR_BULK_CLIENTID, contractNumber)
.withAdditionalHeader(BFDClient.BFD_HDR_BULK_JOBID, getJobId())
.withAdditionalHeader(INCLUDE_IDENTIFIERS_HEADER, MBI_HEADER_VALUE)
.count(contractToBenePageSize)
.usingStyle(SearchStyleEnum.POST)
.returnBundle(version.getBundleClass())
.usingStyle(SearchStyleEnum.POST);
log.info("Executing request to get Part D Enrollees " + request);
return request.returnBundle(version.getBundleClass())
.encodedJson()
.execute();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ public IBaseBundle searchEOB(long patientId, OffsetDateTime since, OffsetDateTim
params.add(new BasicNameValuePair("_count", "" + pageSize));
}
request.setEntity(new UrlEncodedFormEntity(params));
log.info("Executing BFD Search Request " + request);

byte[] responseBytes = getEOBSFromBFD(patientId, request);

Expand Down
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.4.0'
bfdVersion='2.4.1'
aggregatorVersion='2.0.0'
filtersVersion='2.1.0'
eventClientVersion='3.2.0'
Expand Down

0 comments on commit a44b6ee

Please sign in to comment.