use of org.hl7.fhir.r4.model.Claim in project beneficiary-fhir-data by CMSgov.
the class CarrierClaimTransformerV2Test method shouldHaveSupportingInfoListForClaimReceivedDate.
@Test
public void shouldHaveSupportingInfoListForClaimReceivedDate() {
SupportingInformationComponent sic = TransformerTestUtilsV2.findSupportingInfoByCode("clmrecvddate", eob.getSupportingInfo());
SupportingInformationComponent compare = TransformerTestUtilsV2.createSupportingInfo(// We don't care what the sequence number is here
sic.getSequence(), // Category
Arrays.asList(new Coding("http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBSupportingInfoType", "clmrecvddate", "Claim Received Date"), new Coding("https://bluebutton.cms.gov/resources/codesystem/information", "https://bluebutton.cms.gov/resources/variables/nch_wkly_proc_dt", "NCH Weekly Claim Processing Date")));
compare.setTiming(new DateType("1999-11-06"));
assertTrue(compare.equalsDeep(sic));
}
use of org.hl7.fhir.r4.model.Claim in project beneficiary-fhir-data by CMSgov.
the class CarrierClaimTransformerV2Test method shouldHaveExtensionsWithCarrierAssignedClaim.
@Test
public void shouldHaveExtensionsWithCarrierAssignedClaim() {
Extension ex = TransformerTestUtilsV2.findExtensionByUrl("https://bluebutton.cms.gov/resources/variables/asgmntcd", eob.getExtension());
Coding coding = new Coding().setSystem("https://bluebutton.cms.gov/resources/variables/asgmntcd").setDisplay("Assigned claim").setCode("A");
Extension compare = new Extension("https://bluebutton.cms.gov/resources/variables/asgmntcd", coding);
assertTrue(compare.equalsDeep(ex));
}
use of org.hl7.fhir.r4.model.Claim in project beneficiary-fhir-data by CMSgov.
the class CarrierClaimTransformerV2Test method before.
@BeforeEach
public void before() {
claim = generateClaim();
ExplanationOfBenefit genEob = CarrierClaimTransformerV2.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.Claim in project beneficiary-fhir-data by CMSgov.
the class InpatientClaimTransformerV2Test method generateClaim.
/**
* Generates the Claim object to be used in multiple tests
*
* @return
* @throws FHIRException
*/
public InpatientClaim generateClaim() throws FHIRException {
List<Object> parsedRecords = ServerTestUtils.parseData(Arrays.asList(StaticRifResourceGroup.SAMPLE_A.getResources()));
InpatientClaim claim = parsedRecords.stream().filter(r -> r instanceof InpatientClaim).map(r -> (InpatientClaim) r).findFirst().get();
claim.setLastUpdated(Instant.now());
return claim;
}
use of org.hl7.fhir.r4.model.Claim in project beneficiary-fhir-data by CMSgov.
the class InpatientClaimTransformerV2Test method shouldContainNchNearLineRecIdentCdExt.
@Test
public void shouldContainNchNearLineRecIdentCdExt() {
Extension ex = TransformerTestUtilsV2.findExtensionByUrl("https://bluebutton.cms.gov/resources/variables/nch_near_line_rec_ident_cd", eob.getExtension());
Extension compare = new Extension("https://bluebutton.cms.gov/resources/variables/nch_near_line_rec_ident_cd", new Coding("https://bluebutton.cms.gov/resources/variables/nch_near_line_rec_ident_cd", "V", "Part A institutional claim record (inpatient [IP], skilled nursing facility" + " [SNF], hospice [HOS], or home health agency [HHA])"));
assertTrue(compare.equalsDeep(ex));
}
Aggregations