use of org.hl7.fhir.r4.model.ExplanationOfBenefit in project beneficiary-fhir-data by CMSgov.
the class DMEClaimTransformer method transform.
/**
* @param metricRegistry the {@link MetricRegistry} to use
* @param claim the CCW {@link DMEClaim} 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
* DMEClaim}
*/
@Trace
static ExplanationOfBenefit transform(MetricRegistry metricRegistry, Object claim, Optional<Boolean> includeTaxNumbers) {
Timer.Context timer = metricRegistry.timer(MetricRegistry.name(DMEClaimTransformer.class.getSimpleName(), "transform")).time();
if (!(claim instanceof DMEClaim))
throw new BadCodeMonkeyException();
ExplanationOfBenefit eob = transformClaim((DMEClaim) claim, includeTaxNumbers);
timer.stop();
return eob;
}
use of org.hl7.fhir.r4.model.ExplanationOfBenefit in project beneficiary-fhir-data by CMSgov.
the class CarrierClaimTransformer method transform.
/**
* @param metricRegistry the {@link MetricRegistry} to use
* @param claim the CCW {@link CarrierClaim} 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
* CarrierClaim}
*/
@Trace
static ExplanationOfBenefit transform(MetricRegistry metricRegistry, Object claim, Optional<Boolean> includeTaxNumbers) {
Timer.Context timer = metricRegistry.timer(MetricRegistry.name(CarrierClaimTransformer.class.getSimpleName(), "transform")).time();
if (!(claim instanceof CarrierClaim))
throw new BadCodeMonkeyException();
ExplanationOfBenefit eob = transformClaim((CarrierClaim) claim, includeTaxNumbers);
timer.stop();
return eob;
}
use of org.hl7.fhir.r4.model.ExplanationOfBenefit in project beneficiary-fhir-data by CMSgov.
the class DMEClaimTransformerV2Test method before.
@BeforeEach
public void before() {
claim = generateClaim();
ExplanationOfBenefit genEob = DMEClaimTransformerV2.transform(new MetricRegistry(), claim, Optional.empty());
IParser parser = fhirContext.newJsonParser();
String json = parser.encodeResourceToString(genEob);
eob = parser.parseResource(ExplanationOfBenefit.class, json);
}
use of org.hl7.fhir.r4.model.ExplanationOfBenefit in project beneficiary-fhir-data by CMSgov.
the class DMEClaimTransformerV2Test method serializeSampleARecord.
/**
* Serializes the EOB and prints to the command line
*
* @throws FHIRException
*/
@Disabled
@Test
public void serializeSampleARecord() throws FHIRException {
ExplanationOfBenefit eob = DMEClaimTransformerV2.transform(new MetricRegistry(), generateClaim(), Optional.of(false));
System.out.println(fhirContext.newJsonParser().encodeResourceToString(eob));
}
use of org.hl7.fhir.r4.model.ExplanationOfBenefit in project beneficiary-fhir-data by CMSgov.
the class CarrierClaimTransformerV2Test method serializeSampleARecord.
/**
* Serializes the EOB and prints to the command line
*
* @throws FHIRException
*/
@Disabled
@Test
public void serializeSampleARecord() throws FHIRException {
ExplanationOfBenefit eob = CarrierClaimTransformerV2.transform(new MetricRegistry(), generateClaim(), Optional.of(false));
System.out.println(fhirContext.newJsonParser().encodeResourceToString(eob));
}
Aggregations