use of gov.cms.bfd.model.rif.HHAClaim in project beneficiary-fhir-data by CMSgov.
the class HHAClaimTransformer method transform.
/**
* @param metricRegistry the {@link MetricRegistry} to use
* @param claim the CCW {@link HHAClaim} to transform
* @param includeTaxNumbers whether or not to include tax numbers in the result (see {@link
* ExplanationOfBenefitResourceProvider#HEADER_NAME_INCLUDE_TAX_NUMBERS}, defaults to <code>
* false</code>)
* @return a FHIR {@link ExplanationOfBenefit} resource that represents the specified {@link
* HHAClaim}
*/
@Trace
static ExplanationOfBenefit transform(MetricRegistry metricRegistry, Object claim, Optional<Boolean> includeTaxNumbers) {
Timer.Context timer = metricRegistry.timer(MetricRegistry.name(HHAClaimTransformer.class.getSimpleName(), "transform")).time();
if (!(claim instanceof HHAClaim))
throw new BadCodeMonkeyException();
ExplanationOfBenefit eob = transformClaim((HHAClaim) claim);
timer.stop();
return eob;
}
use of gov.cms.bfd.model.rif.HHAClaim in project beneficiary-fhir-data by CMSgov.
the class HHAClaimTransformerV2 method transform.
/**
* @param metricRegistry the {@link MetricRegistry} to use
* @param claim the CCW {@link HHAClaim} to transform
* @return a FHIR {@link ExplanationOfBenefit} resource that represents the specified {@link
* HHAClaim}
*/
@Trace
static ExplanationOfBenefit transform(MetricRegistry metricRegistry, Object claim, Optional<Boolean> includeTaxNumbers) {
Timer.Context timer = metricRegistry.timer(MetricRegistry.name(HHAClaimTransformerV2.class.getSimpleName(), "transform")).time();
if (!(claim instanceof HHAClaim)) {
throw new BadCodeMonkeyException();
}
ExplanationOfBenefit eob = transformClaim((HHAClaim) claim);
timer.stop();
return eob;
}
use of gov.cms.bfd.model.rif.HHAClaim in project beneficiary-fhir-data by CMSgov.
the class EndpointJsonResponseComparatorV2IT method eobReadHha.
/**
* @return the results of the {@link
* ExplanationOfBenefitResourceProvider#read(org.hl7.fhir.dstu3.model.IdType)} operation for
* HHA claims
*/
public static String eobReadHha() {
List<Object> loadedRecords = ServerTestUtils.get().loadData(Arrays.asList(StaticRifResourceGroup.SAMPLE_A.getResources()));
IGenericClient fhirClient = createFhirClientAndSetEncoding();
JsonInterceptor jsonInterceptor = createAndRegisterJsonInterceptor(fhirClient);
HHAClaim hhaClaim = loadedRecords.stream().filter(r -> r instanceof HHAClaim).map(r -> (HHAClaim) r).findFirst().get();
fhirClient.read().resource(ExplanationOfBenefit.class).withId(TransformerUtilsV2.buildEobId(ClaimTypeV2.HHA, hhaClaim.getClaimId())).execute();
return jsonInterceptor.getResponse();
}
Aggregations