Skip to content

Commit

Permalink
woops
Browse files Browse the repository at this point in the history
  • Loading branch information
fzhao99 committed Aug 13, 2024
1 parent dad5f24 commit db63133
Showing 1 changed file with 28 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -536,22 +536,34 @@ private Bundle convertRowToFhirBundle(TestResultRow row, UUID orgId) {
testResultDate,
dateResultReleased);

return fhirConverter.createFhirBundle(
CreateFhirBundleProps.builder()
.patient(patient)
.testingLab(testingLabOrg)
.orderingFacility(orderingFacility)
.practitioner(practitioner)
.device(device)
.specimen(specimen)
.resultObservations(resultObservation)
.aoeObservations(aoeObservations)
.serviceRequest(serviceRequest)
.diagnosticReport(diagnosticReport)
.currentDate(dateGenerator.newDate())
.gitProperties(gitProperties)
.processingId(processingModeCode)
.build());
var bundle =
fhirConverter.createFhirBundle(
CreateFhirBundleProps.builder()
.patient(patient)
.testingLab(testingLabOrg)
.orderingFacility(orderingFacility)
.practitioner(practitioner)
.device(device)
.specimen(specimen)
.resultObservations(resultObservation)
.aoeObservations(aoeObservations)
.serviceRequest(serviceRequest)
.diagnosticReport(diagnosticReport)
.currentDate(dateGenerator.newDate())
.gitProperties(gitProperties)
.processingId(processingModeCode)
.build());

IParser parser = ctx.newJsonParser();

// Indent the output
parser.setPrettyPrint(true);

// Serialize it
String serialized = parser.encodeResourceToString(bundle);
log.warn("CONVERTED BUNDLE: " + serialized);

return bundle;
}

private Bundle convertConditionAgnosticRowToFhirBundle(ConditionAgnosticResultRow row) {
Expand Down

0 comments on commit db63133

Please sign in to comment.