use of org.hl7.fhir.dstu2.model.Coding in project beneficiary-fhir-data by CMSgov.
the class BeneficiaryTransformerV2Test method shouldHaveRaceExtension.
/**
* Top level Extension(s)
*/
@Test
public void shouldHaveRaceExtension() {
assertNotNull(beneficiary.getRace());
Extension ex = TransformerTestUtilsV2.findExtensionByUrl("https://bluebutton.cms.gov/resources/variables/race", patient.getExtension());
Extension compare = new Extension("https://bluebutton.cms.gov/resources/variables/race", new Coding("https://bluebutton.cms.gov/resources/variables/race", "1", "White"));
assertTrue(compare.equalsDeep(ex));
}
use of org.hl7.fhir.dstu2.model.Coding 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));
}
use of org.hl7.fhir.dstu2.model.Coding in project beneficiary-fhir-data by CMSgov.
the class BeneficiaryTransformerV2Test method verifyDualResourceExtension.
/**
* helper function to verify that {@link
* gov.cms.bfd.server.war.r4.providers.BeneficiaryTransformerV2} correctly handles patient Part D
* attributee.
*/
private void verifyDualResourceExtension(String dualId) {
String uri = "https://bluebutton.cms.gov/resources/variables/" + dualId;
Extension ex = TransformerTestUtilsV2.findExtensionByUrl(uri, patient.getExtension());
assertNotNull(ex);
Extension compare = new Extension(uri, new Coding(uri, "**", "Enrolled in Medicare A and/or B, but no Part D enrollment data for the beneficiary. (This status was indicated as 'XX' for 2006-2009)"));
assertTrue(compare.equalsDeep(ex));
}
use of org.hl7.fhir.dstu2.model.Coding in project beneficiary-fhir-data by CMSgov.
the class CarrierClaimTransformerV2Test method shouldHaveClmPassThruClaimSubmittedChargeFinancial.
@Test
public void shouldHaveClmPassThruClaimSubmittedChargeFinancial() {
BenefitComponent benefit = TransformerTestUtilsV2.findFinancial("https://bluebutton.cms.gov/resources/variables/nch_carr_clm_sbmtd_chrg_amt", eob.getBenefitBalanceFirstRep().getFinancial());
BenefitComponent compare = new BenefitComponent().setType(new CodeableConcept().setCoding(Arrays.asList(new Coding("https://bluebutton.cms.gov/resources/codesystem/benefit-balance", "https://bluebutton.cms.gov/resources/variables/nch_carr_clm_sbmtd_chrg_amt", "NCH Carrier Claim Submitted Charge Amount (sum of all line-level submitted charges)")))).setUsed(new Money().setValueElement(new DecimalType("245.04")).setCurrency(TransformerConstants.CODED_MONEY_USD));
assertTrue(compare.equalsDeep(benefit));
}
use of org.hl7.fhir.dstu2.model.Coding in project beneficiary-fhir-data by CMSgov.
the class CarrierClaimTransformerV2Test method shouldHaveLineItemEligibleAdjudication.
@Test
public void shouldHaveLineItemEligibleAdjudication() {
AdjudicationComponent adjudication = TransformerTestUtilsV2.findAdjudicationByCategory("eligible", eob.getItemFirstRep().getAdjudication());
AdjudicationComponent compare = new AdjudicationComponent().setCategory(new CodeableConcept().setCoding(Arrays.asList(new Coding("http://terminology.hl7.org/CodeSystem/adjudication", "eligible", "Eligible Amount"), new Coding("https://bluebutton.cms.gov/resources/codesystem/adjudication", "https://bluebutton.cms.gov/resources/variables/line_alowd_chrg_amt", "Line Allowed Charge Amount")))).setAmount(new Money().setValue(75).setCurrency(TransformerConstants.CODED_MONEY_USD));
assertTrue(compare.equalsDeep(adjudication));
}
Aggregations