use of gov.cms.bfd.model.rif.OutpatientClaim in project beneficiary-fhir-data by CMSgov.
the class EndpointJsonResponseComparatorIT method eobReadOutpatient.
/**
* @return the results of the {@link
* ExplanationOfBenefitResourceProvider#read(org.hl7.fhir.dstu3.model.IdType)} operation for
* Outpatient claims
*/
public static String eobReadOutpatient() {
List<Object> loadedRecords = ServerTestUtils.get().loadData(Arrays.asList(StaticRifResourceGroup.SAMPLE_A.getResources()));
IGenericClient fhirClient = createFhirClientAndSetEncoding();
JsonInterceptor jsonInterceptor = createAndRegisterJsonInterceptor(fhirClient);
OutpatientClaim outClaim = loadedRecords.stream().filter(r -> r instanceof OutpatientClaim).map(r -> (OutpatientClaim) r).findFirst().get();
fhirClient.read().resource(ExplanationOfBenefit.class).withId(TransformerUtils.buildEobId(ClaimType.OUTPATIENT, outClaim.getClaimId())).execute();
return jsonInterceptor.getResponse();
}
Aggregations