Search in sources :

Example 11 with Extension

use of org.hl7.fhir.r4.model.Extension in project beneficiary-fhir-data by CMSgov.

the class OutpatientClaimTransformerV2Test method shouldHaveLineItemProductOrServiceExtension.

@Test
public void shouldHaveLineItemProductOrServiceExtension() {
    assertNotNull(eob.getItemFirstRep().getProductOrService());
    assertEquals(1, eob.getItemFirstRep().getProductOrService().getExtension().size());
    Extension ex = TransformerTestUtilsV2.findExtensionByUrl("http://hl7.org/fhir/sid/ndc", eob.getItemFirstRep().getProductOrService().getExtension());
    Extension compare = new Extension("http://hl7.org/fhir/sid/ndc", new Coding("http://hl7.org/fhir/sid/ndc", "987654321", null));
    assertTrue(compare.equalsDeep(ex));
}
Also used : Extension(org.hl7.fhir.r4.model.Extension) Coding(org.hl7.fhir.r4.model.Coding) Test(org.junit.jupiter.api.Test)

Example 12 with Extension

use of org.hl7.fhir.r4.model.Extension in project beneficiary-fhir-data by CMSgov.

the class DMEClaimTransformerV2Test method shouldHaveLineItemLocationCodeableConcept.

@Test
public void shouldHaveLineItemLocationCodeableConcept() {
    CodeableConcept location = eob.getItemFirstRep().getLocationCodeableConcept();
    CodeableConcept compare = new CodeableConcept().setCoding(Arrays.asList(new Coding("https://bluebutton.cms.gov/resources/variables/line_place_of_srvc_cd", "12", "Home. Location, other than a hospital or other facility, where the patient receives care in a private residence.")));
    compare.setExtension(Arrays.asList(new Extension("https://bluebutton.cms.gov/resources/variables/prvdr_state_cd", new Coding("https://bluebutton.cms.gov/resources/variables/prvdr_state_cd", "MO", null))));
    assertTrue(compare.equalsDeep(location));
}
Also used : Extension(org.hl7.fhir.r4.model.Extension) Coding(org.hl7.fhir.r4.model.Coding) CodeableConcept(org.hl7.fhir.r4.model.CodeableConcept) Test(org.junit.jupiter.api.Test)

Example 13 with Extension

use of org.hl7.fhir.r4.model.Extension in project beneficiary-fhir-data by CMSgov.

the class DMEClaimTransformerV2Test method shouldHaveLineItemAdjudicationLineNchPmtAmt.

@Test
public void shouldHaveLineItemAdjudicationLineNchPmtAmt() {
    AdjudicationComponent adjudication = TransformerTestUtilsV2.findAdjudicationByCategory("https://bluebutton.cms.gov/resources/variables/line_nch_pmt_amt", eob.getItemFirstRep().getAdjudication());
    AdjudicationComponent compare = new AdjudicationComponent().setCategory(new CodeableConcept().setCoding(Arrays.asList(new Coding("http://terminology.hl7.org/CodeSystem/adjudication", "benefit", "Benefit Amount"), new Coding("https://bluebutton.cms.gov/resources/codesystem/adjudication", "https://bluebutton.cms.gov/resources/variables/line_nch_pmt_amt", "Line NCH Medicare Payment Amount"))));
    compare.setExtension(Arrays.asList(new Extension("https://bluebutton.cms.gov/resources/variables/line_pmt_80_100_cd", new Coding("https://bluebutton.cms.gov/resources/variables/line_pmt_80_100_cd", "0", "80%"))));
    compare.setAmount(new Money().setValue(123.45).setCurrency(TransformerConstants.CODED_MONEY_USD));
    assertTrue(compare.equalsDeep(adjudication));
}
Also used : Extension(org.hl7.fhir.r4.model.Extension) Money(org.hl7.fhir.r4.model.Money) Coding(org.hl7.fhir.r4.model.Coding) AdjudicationComponent(org.hl7.fhir.r4.model.ExplanationOfBenefit.AdjudicationComponent) CodeableConcept(org.hl7.fhir.r4.model.CodeableConcept) Test(org.junit.jupiter.api.Test)

Example 14 with Extension

use of org.hl7.fhir.r4.model.Extension 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));
}
Also used : Extension(org.hl7.fhir.r4.model.Extension) Coding(org.hl7.fhir.r4.model.Coding) Test(org.junit.jupiter.api.Test)

Example 15 with Extension

use of org.hl7.fhir.r4.model.Extension in project beneficiary-fhir-data by CMSgov.

the class CarrierClaimTransformerV2Test method shouldHaveLineItemProductOrServiceCoding.

@Test
public void shouldHaveLineItemProductOrServiceCoding() {
    CodeableConcept pos = eob.getItemFirstRep().getProductOrService();
    CodeableConcept compare = new CodeableConcept().setCoding(Arrays.asList(new Coding("https://bluebutton.cms.gov/resources/codesystem/hcpcs", "92999", null)));
    compare.setExtension(Arrays.asList(new Extension("http://hl7.org/fhir/sid/ndc", new Coding("http://hl7.org/fhir/sid/ndc", "49035044700", null))));
    assertTrue(compare.equalsDeep(pos));
}
Also used : Extension(org.hl7.fhir.r4.model.Extension) Coding(org.hl7.fhir.r4.model.Coding) CodeableConcept(org.hl7.fhir.r4.model.CodeableConcept) Test(org.junit.jupiter.api.Test)

Aggregations

Extension (org.hl7.fhir.r4.model.Extension)154 ArrayList (java.util.ArrayList)104 Coding (org.hl7.fhir.r4.model.Coding)69 Test (org.junit.jupiter.api.Test)69 Extension (org.hl7.fhir.dstu3.model.Extension)67 FHIRException (org.hl7.fhir.exceptions.FHIRException)55 StructureDefinition (org.hl7.fhir.r5.model.StructureDefinition)46 ElementDefinition (org.hl7.fhir.r5.model.ElementDefinition)42 Extension (org.hl7.fhir.r5.model.Extension)41 XhtmlNode (org.hl7.fhir.utilities.xhtml.XhtmlNode)39 Test (org.junit.Test)36 Cell (org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator.Cell)35 List (java.util.List)34 CodeableConcept (org.hl7.fhir.r4.model.CodeableConcept)34 Date (java.util.Date)30 Coding (org.hl7.fhir.dstu3.model.Coding)29 Piece (org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator.Piece)27 Row (org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator.Row)27 Reference (org.hl7.fhir.dstu3.model.Reference)26 Patient (org.hl7.fhir.r4.model.Patient)26