Search in sources :

Example 11 with Identifier

use of org.hl7.fhir.r4b.model.Identifier in project beneficiary-fhir-data by CMSgov.

the class OutpatientClaimTransformerV2Test method shouldHaveCareTeamMembers.

/**
 * Testing all of these in one test, just because there isn't a distinct identifier really for
 * each
 */
@Test
public void shouldHaveCareTeamMembers() {
    // First member
    CareTeamComponent member1 = TransformerTestUtilsV2.findCareTeamBySequence(1, eob.getCareTeam());
    CareTeamComponent compare1 = TransformerTestUtilsV2.createNpiCareTeamMember(1, "2222222222", "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 = TransformerTestUtilsV2.createNpiCareTeamMember(2, "3333333333", "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimCareTeamRole", "operating", "Operating");
    assertTrue(compare2.equalsDeep(member2));
    // Third member
    CareTeamComponent member3 = TransformerTestUtilsV2.findCareTeamBySequence(3, eob.getCareTeam());
    CareTeamComponent compare3 = TransformerTestUtilsV2.createNpiCareTeamMember(3, "4444", "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimCareTeamRole", "otheroperating", "Other Operating");
    assertTrue(compare3.equalsDeep(member3));
    // Fourth member
    CareTeamComponent member4 = TransformerTestUtilsV2.findCareTeamBySequence(4, eob.getCareTeam());
    CareTeamComponent compare4 = TransformerTestUtilsV2.createNpiCareTeamMember(4, "345345345", "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimCareTeamRole", "performing", "Performing provider");
    assertTrue(compare4.equalsDeep(member4));
}
Also used : CareTeamComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.CareTeamComponent) Test(org.junit.jupiter.api.Test)

Example 12 with Identifier

use of org.hl7.fhir.r4b.model.Identifier in project beneficiary-fhir-data by CMSgov.

the class CoverageTransformerV2Test method verifyPayor.

private static void verifyPayor() {
    List<Reference> payers = coverage.getPayor();
    assertNotNull(payers);
    assertEquals(1, payers.size());
    Coverage compare = new Coverage();
    compare.addPayor().setIdentifier(new Identifier().setValue("Centers for Medicare and Medicaid Services"));
    assertTrue(compare.getPayor().get(0).equalsDeep(coverage.getPayor().get(0)));
}
Also used : Identifier(org.hl7.fhir.r4.model.Identifier) Reference(org.hl7.fhir.r4.model.Reference) Coverage(org.hl7.fhir.r4.model.Coverage)

Example 13 with Identifier

use of org.hl7.fhir.r4b.model.Identifier 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 Identifier

use of org.hl7.fhir.r4b.model.Identifier in project beneficiary-fhir-data by CMSgov.

the class InpatientClaimTransformerV2Test method shouldHaveCareTeamMembers.

/**
 * Testing all of these in one test, just because there isn't a distinct identifier really for
 * each
 */
@Test
public void shouldHaveCareTeamMembers() {
    // First member
    CareTeamComponent member1 = TransformerTestUtilsV2.findCareTeamBySequence(1, eob.getCareTeam());
    CareTeamComponent compare1 = TransformerTestUtilsV2.createNpiCareTeamMember(1, "161999999", "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 = TransformerTestUtilsV2.createNpiCareTeamMember(2, "3333444555", "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimCareTeamRole", "operating", "Operating");
    assertTrue(compare2.equalsDeep(member2));
    // Third member
    CareTeamComponent member3 = TransformerTestUtilsV2.findCareTeamBySequence(3, eob.getCareTeam());
    CareTeamComponent compare3 = TransformerTestUtilsV2.createNpiCareTeamMember(3, "161943433", "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimCareTeamRole", "otheroperating", "Other Operating");
    assertTrue(compare3.equalsDeep(member3));
    // Fourth member
    CareTeamComponent member4 = TransformerTestUtilsV2.findCareTeamBySequence(4, eob.getCareTeam());
    CareTeamComponent compare4 = TransformerTestUtilsV2.createNpiCareTeamMember(4, "345345345", "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimCareTeamRole", "performing", "Performing provider");
    assertTrue(compare4.equalsDeep(member4));
}
Also used : CareTeamComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.CareTeamComponent) Test(org.junit.jupiter.api.Test)

Example 15 with Identifier

use of org.hl7.fhir.r4b.model.Identifier in project beneficiary-fhir-data by CMSgov.

the class BeneficiaryTransformerV2Test method shouldIncludeMedicareExtensionIdentifierCurrent.

@Test
public void shouldIncludeMedicareExtensionIdentifierCurrent() {
    Identifier mcId = TransformerTestUtilsV2.findIdentifierBySystem("http://hl7.org/fhir/sid/us-mbi", patient.getIdentifier());
    Extension extension = new Extension("https://bluebutton.cms.gov/resources/codesystem/identifier-currency", new Coding("https://bluebutton.cms.gov/resources/codesystem/identifier-currency", "current", "Current"));
    Period period = new Period();
    try {
        Date start = (new SimpleDateFormat("yyyy-MM-dd")).parse("2020-07-30");
        period.setStart(start, TemporalPrecisionEnum.DAY);
    } catch (Exception e) {
    }
    Identifier compare = new Identifier();
    compare.setValue("3456789").setSystem("http://hl7.org/fhir/sid/us-mbi").setPeriod(period).getType().addCoding().setCode("MC").setSystem("http://terminology.hl7.org/CodeSystem/v2-0203").setDisplay("Patient's Medicare number").addExtension(extension);
    assertTrue(compare.equalsDeep(mcId));
}
Also used : Extension(org.hl7.fhir.r4.model.Extension) Identifier(org.hl7.fhir.r4.model.Identifier) Coding(org.hl7.fhir.r4.model.Coding) Period(org.hl7.fhir.r4.model.Period) SimpleDateFormat(java.text.SimpleDateFormat) Date(java.util.Date) Test(org.junit.jupiter.api.Test)

Aggregations

Identifier (org.hl7.fhir.r4.model.Identifier)212 Complex (org.hl7.fhir.r4.utils.formats.Turtle.Complex)143 Complex (org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)125 Complex (org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)116 Test (org.junit.Test)90 Test (org.junit.jupiter.api.Test)84 CodeableConcept (org.hl7.fhir.r4.model.CodeableConcept)66 ArrayList (java.util.ArrayList)62 Reference (org.hl7.fhir.r4.model.Reference)57 Identifier (org.hl7.fhir.dstu3.model.Identifier)55 Patient (org.hl7.fhir.r4.model.Patient)55 Coding (org.hl7.fhir.r4.model.Coding)49 IBaseResource (org.hl7.fhir.instance.model.api.IBaseResource)41 Practitioner (org.hl7.fhir.r4.model.Practitioner)41 Date (java.util.Date)40 List (java.util.List)40 Resource (org.hl7.fhir.r4.model.Resource)37 BundleEntryComponent (org.hl7.fhir.r4.model.Bundle.BundleEntryComponent)36 InvalidRequestException (ca.uhn.fhir.rest.server.exceptions.InvalidRequestException)34 Collectors (java.util.stream.Collectors)31