Search in sources :

Example 11 with Reference

use of io.adminshell.aas.v3.model.Reference in project beneficiary-fhir-data by CMSgov.

the class HospiceClaimTransformerV2Test method shouldSetInsurer.

@Test
public void shouldSetInsurer() throws Exception {
    Reference expected = eob.getInsurer();
    assertNotNull(expected);
    Reference compare = new Reference();
    compare.getIdentifier().setValue("CMS");
    assertTrue(compare.equalsDeep(expected));
}
Also used : Reference(org.hl7.fhir.r4.model.Reference) Test(org.junit.jupiter.api.Test)

Example 12 with Reference

use of io.adminshell.aas.v3.model.Reference in project beneficiary-fhir-data by CMSgov.

the class HospiceClaimTransformerV2Test method shouldReferenceCoverageInInsurance.

/**
 * Insurance
 */
@Test
public void shouldReferenceCoverageInInsurance() {
    // Only one insurance object
    assertEquals(1, eob.getInsurance().size());
    InsuranceComponent insurance = eob.getInsuranceFirstRep();
    InsuranceComponent compare = new InsuranceComponent().setCoverage(new Reference().setReference("Coverage/part-a-567834"));
    assertTrue(compare.equalsDeep(insurance));
}
Also used : Reference(org.hl7.fhir.r4.model.Reference) InsuranceComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.InsuranceComponent) Test(org.junit.jupiter.api.Test)

Example 13 with Reference

use of io.adminshell.aas.v3.model.Reference in project beneficiary-fhir-data by CMSgov.

the class HospiceClaimTransformerV2Test method shouldHaveCareTeamMembers.

@Test
public void shouldHaveCareTeamMembers() {
    // First member
    CareTeamComponent member1 = TransformerTestUtilsV2.findCareTeamBySequence(1, eob.getCareTeam());
    CareTeamComponent compare1 = TransformerTestUtilsV2.createNpiCareTeamMember(1, "8888888888", "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimCareTeamRole", "attending", "Attending");
    assertTrue(compare1.equalsDeep(member1));
    // Second member
    CareTeamComponent member2 = TransformerTestUtilsV2.findCareTeamBySequence(2, eob.getCareTeam());
    CareTeamComponent compare2 = new CareTeamComponent().setSequence(2).setProvider(new Reference().setIdentifier(TransformerTestUtilsV2.createIdentifier(null, "0", "http://terminology.hl7.org/CodeSystem/v2-0203", "UPIN", "Medicare/CMS (formerly HCFA)'s Universal Physician Identification numbers"))).setRole(new CodeableConcept().setCoding(Arrays.asList(new Coding("http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimCareTeamRole", "performing", "Performing provider"))));
    assertTrue(compare2.equalsDeep(member2));
    // // Third member
    CareTeamComponent member3 = TransformerTestUtilsV2.findCareTeamBySequence(3, eob.getCareTeam());
    CareTeamComponent compare3 = new CareTeamComponent().setSequence(3).setProvider(new Reference().setIdentifier(TransformerTestUtilsV2.createIdentifier(null, "345345345", "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBIdentifierType", "npi", "National Provider Identifier"))).setRole(new CodeableConcept().setCoding(Arrays.asList(new Coding("http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimCareTeamRole", "performing", "Performing provider"))));
    assertTrue(compare3.equalsDeep(member3));
}
Also used : Coding(org.hl7.fhir.r4.model.Coding) Reference(org.hl7.fhir.r4.model.Reference) CareTeamComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.CareTeamComponent) CodeableConcept(org.hl7.fhir.r4.model.CodeableConcept) Test(org.junit.jupiter.api.Test)

Example 14 with Reference

use of io.adminshell.aas.v3.model.Reference in project beneficiary-fhir-data by CMSgov.

the class CarrierClaimTransformerV2Test method shouldHaveSupportingInfoListForClaimReceivedDate2.

@Test
public void shouldHaveSupportingInfoListForClaimReceivedDate2() {
    SupportingInformationComponent sic = TransformerTestUtilsV2.findSupportingInfoByCode("info", eob.getSupportingInfo());
    SupportingInformationComponent compare = TransformerTestUtilsV2.createSupportingInfo(// We don't care what the sequence number is here
    sic.getSequence(), // Category
    Arrays.asList(new Coding("http://terminology.hl7.org/CodeSystem/claiminformationcategory", "info", "Information"), new Coding("https://bluebutton.cms.gov/resources/codesystem/information", "https://bluebutton.cms.gov/resources/variables/line_hct_hgb_rslt_num", "Hematocrit / Hemoglobin Test Results")));
    compare.setValue(new Reference("#line-observation-6"));
    assertTrue(compare.equalsDeep(sic));
}
Also used : SupportingInformationComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.SupportingInformationComponent) Coding(org.hl7.fhir.r4.model.Coding) Reference(org.hl7.fhir.r4.model.Reference) Test(org.junit.jupiter.api.Test)

Example 15 with Reference

use of io.adminshell.aas.v3.model.Reference in project beneficiary-fhir-data by CMSgov.

the class TransformerUtilsTest method createReferenceForIdentifierTypeTest.

/**
 * Verifies that {@link
 * gov.cms.bfd.server.war.stu3.providers.TransformerUtils#createIdentifierReference
 * (gov.cms.bfd.server.war.stu3.providers.IdentifierType, String)} sets {@link Reference)}
 * correctly.
 */
@Test
public void createReferenceForIdentifierTypeTest() {
    String identifierValue = "identifierValue";
    IdentifierType identifierType = IdentifierType.NPI;
    Reference reference = TransformerUtils.createIdentifierReference(identifierType, identifierValue);
    assertEquals(identifierType.getSystem(), reference.getIdentifier().getSystem());
    assertEquals(identifierValue, reference.getIdentifier().getValue());
    assertEquals(identifierType.getCode(), reference.getIdentifier().getType().getCoding().get(0).getCode());
    assertEquals(identifierType.getDisplay(), reference.getIdentifier().getType().getCoding().get(0).getDisplay());
    assertEquals(identifierType.getSystem(), reference.getIdentifier().getType().getCoding().get(0).getSystem());
}
Also used : Reference(org.hl7.fhir.dstu3.model.Reference) IdentifierType(gov.cms.bfd.server.war.commons.IdentifierType) Test(org.junit.jupiter.api.Test)

Aggregations

Reference (org.hl7.fhir.r4.model.Reference)363 Test (org.junit.Test)218 Reference (org.hl7.fhir.dstu3.model.Reference)156 Reference (io.adminshell.aas.v3.model.Reference)118 ArrayList (java.util.ArrayList)105 DefaultReference (io.adminshell.aas.v3.model.impl.DefaultReference)85 CodeableConcept (org.hl7.fhir.r4.model.CodeableConcept)72 Coding (org.hl7.fhir.r4.model.Coding)68 List (java.util.List)57 Test (org.junit.jupiter.api.Test)57 Resource (org.hl7.fhir.r4.model.Resource)54 Identifier (org.hl7.fhir.r4.model.Identifier)49 Date (java.util.Date)48 BundleEntryComponent (org.hl7.fhir.r4.model.Bundle.BundleEntryComponent)46 SubmodelElement (io.adminshell.aas.v3.model.SubmodelElement)45 Collectors (java.util.stream.Collectors)40 MessageBusException (de.fraunhofer.iosb.ilt.faaast.service.exception.MessageBusException)38 Encounter (org.hl7.fhir.r4.model.Encounter)38 StatusException (com.prosysopc.ua.StatusException)36 Submodel (io.adminshell.aas.v3.model.Submodel)36