Search in sources :

Example 1 with FissClaim

use of gov.cms.mpsm.rda.v1.fiss.FissClaim in project beneficiary-fhir-data by CMSgov.

the class RandomFissClaimGeneratorTest method randomClaim.

@Test
public void randomClaim() throws InvalidProtocolBufferException {
    final Clock july1 = Clock.fixed(Instant.ofEpochMilli(1625172944844L), ZoneOffset.UTC);
    final RandomFissClaimGenerator generator = new RandomFissClaimGenerator(1, true, july1);
    final FissClaim claim = generator.randomClaim();
    final String json = JsonFormat.printer().print(claim);
    assertEquals("{\n" + "  \"dcn\": \"9845557\",\n" + "  \"hicNo\": \"904843533707\",\n" + "  \"currStatusEnum\": \"CLAIM_STATUS_ROUTING\",\n" + "  \"currLoc1Enum\": \"PROCESSING_TYPE_OFFLINE\",\n" + "  \"currLoc2Enum\": \"CURRENT_LOCATION_2_POST_PAY_7563\",\n" + "  \"totalChargeAmount\": \"8.83\",\n" + "  \"recdDtCymd\": \"2021-03-03\",\n" + "  \"currTranDtCymd\": \"2021-05-14\",\n" + "  \"admDiagCode\": \"mszx\",\n" + "  \"principleDiag\": \"xf\",\n" + "  \"npiNumber\": \"7690551274\",\n" + "  \"mbi\": \"8f242z2sssv\",\n" + "  \"fedTaxNb\": \"2289329600\",\n" + "  \"fissProcCodes\": [{\n" + "    \"procCd\": \"xf\",\n" + "    \"procFlag\": \"rrt\",\n" + "    \"procDt\": \"2021-06-27\"\n" + "  }, {\n" + "    \"procCd\": \"mq\",\n" + "    \"procFlag\": \"zc\",\n" + "    \"procDt\": \"2021-04-28\"\n" + "  }, {\n" + "    \"procCd\": \"tg\",\n" + "    \"procFlag\": \"nhgr\",\n" + "    \"procDt\": \"2021-05-02\"\n" + "  }, {\n" + "    \"procCd\": \"jsrfsz\",\n" + "    \"procFlag\": \"m\",\n" + "    \"procDt\": \"2021-04-13\"\n" + "  }],\n" + "  \"medaProvId\": \"c6vcs2xqbzp5w\",\n" + "  \"pracLocAddr1\": \"b2fz5qbm7h08gdsb9b66k2v3fs2wf24p5mxp3k0bth5s2vgfx1njn3q6ftzx2266s0g4rqqx9qp24pb3rhw165ttc3cdnq42\",\n" + "  \"pracLocAddr2\": \"3tkjz1hgc8hrc5p47khhhn0466frjsg26038pgrm3s4wb7qhvqh3c96zdpt8521vrb9sdtkrmm3q85tsrxk06k06xrsz5gm0xt8\",\n" + "  \"pracLocCity\": \"1fhkgs713\",\n" + "  \"pracLocState\": \"kh\",\n" + "  \"pracLocZip\": \"42516\",\n" + "  \"fissDiagCodes\": [{\n" + "    \"diagCd2\": \"vvss\",\n" + "    \"bitFlags\": \"x\",\n" + "    \"diagPoaIndUnrecognized\": \"w\"\n" + "  }, {\n" + "    \"diagCd2\": \"k\",\n" + "    \"diagPoaIndEnum\": \"DIAGNOSIS_PRESENT_ON_ADMISSION_INDICATOR_UNREPORTED\",\n" + "    \"bitFlags\": \"dfzp\"\n" + "  }, {\n" + "    \"diagCd2\": \"jmpph\",\n" + "    \"diagPoaIndEnum\": \"DIAGNOSIS_PRESENT_ON_ADMISSION_INDICATOR_UNKNOWN\",\n" + "    \"bitFlags\": \"czrx\"\n" + "  }],\n" + "  \"stmtCovFromCymd\": \"2021-03-19\",\n" + "  \"stmtCovToCymd\": \"2021-04-05\",\n" + "  \"lobCdEnum\": \"BILL_FACILITY_TYPE_INTERMEDIATE_CASE\",\n" + "  \"servTypeCdForSpecialFacilitiesEnum\": \"BILL_CLASSIFICATION_FOR_SPECIAL_FACILITIES_AMBULATORY_SURGICAL_CENTER_SERVICES_TO_HOSPITAL_OUTPATIENTS\",\n" + "  \"freqCdEnum\": \"BILL_FREQUENCY_ADJUSTMENT_CLAIM_J\",\n" + "  \"billTypCd\": \"ghq\",\n" + "  \"fissPayers\": [{\n" + "    \"insuredPayer\": {\n" + "      \"payersIdEnum\": \"PAYERS_CODE_AUTO_NO_FAULT\",\n" + "      \"payersName\": \"zqcmbgjzxbnb\",\n" + "      \"relIndEnum\": \"RELEASE_OF_INFORMATION_SIGNED_STATEMENT_IS_RESTRICTED_OR_LIMITED\",\n" + "      \"assignIndUnrecognized\": \"w\",\n" + "      \"providerNumber\": \"gbjjdrsgv\",\n" + "      \"adjDcnIcn\": \"gdjqqqtzssmznctfdpkqbzz\",\n" + "      \"priorPmt\": \"1324.59\",\n" + "      \"estAmtDue\": \"6135.37\",\n" + "      \"insuredRelUnrecognized\": \"62\",\n" + "      \"insuredName\": \"rsffktghppzpnqdgpndhj\",\n" + "      \"insuredSsnHic\": \"trwhkgxcxhppmk\",\n" + "      \"insuredGroupName\": \"xtkfpdbgmmbzvwfft\",\n" + "      \"insuredGroupNbr\": \"rnfjkpcjhhxbkzmdc\",\n" + "      \"treatAuthCd\": \"w030h\",\n" + "      \"insuredSexUnrecognized\": \"c\",\n" + "      \"insuredRelX12Unrecognized\": \"17\",\n" + "      \"insuredDob\": \"2021-03-13\",\n" + "      \"insuredDobText\": \"03132021\"\n" + "    }\n" + "  }, {\n" + "    \"insuredPayer\": {\n" + "      \"payersIdUnrecognized\": \"b\",\n" + "      \"payersName\": \"cqmtdnvxrxjwxzdmxgrfdgxm\",\n" + "      \"relIndUnrecognized\": \"r\",\n" + "      \"assignIndUnrecognized\": \"q\",\n" + "      \"providerNumber\": \"bdwpjwndfxpg\",\n" + "      \"adjDcnIcn\": \"hcnxgqjpgmbtcghnkcxcjdp\",\n" + "      \"priorPmt\": \"60.42\",\n" + "      \"estAmtDue\": \"80548.05\",\n" + "      \"insuredRelEnum\": \"PATIENT_RELATIONSHIP_CODE_NIECE_OR_NEPHEW\",\n" + "      \"insuredName\": \"ccsndjqfjtsjsdqzgjxd\",\n" + "      \"insuredSsnHic\": \"bstzvjchbpvgg\",\n" + "      \"insuredGroupName\": \"mp\",\n" + "      \"insuredGroupNbr\": \"cttnqzbpqrm\",\n" + "      \"treatAuthCd\": \"2b49d5nh8m6vsfpfd8\",\n" + "      \"insuredSexEnum\": \"BENEFICIARY_SEX_MALE\",\n" + "      \"insuredRelX12Enum\": \"PATIENT_RELATIONSHIP_CODE_RESERVED_FOR_NATIONAL_ASSIGNMENT_61\",\n" + "      \"insuredDob\": \"2021-06-12\",\n" + "      \"insuredDobText\": \"06122021\"\n" + "    }\n" + "  }, {\n" + "    \"insuredPayer\": {\n" + "      \"payersIdUnrecognized\": \"m\",\n" + "      \"payersName\": \"mtf\",\n" + "      \"relIndUnrecognized\": \"g\",\n" + "      \"assignIndEnum\": \"ASSIGNMENT_OF_BENEFITS_INDICATOR_NO_BENEFITS_ASSIGNED\",\n" + "      \"providerNumber\": \"xpsbcwwfppr\",\n" + "      \"adjDcnIcn\": \"rbgmxqdknxbtnkjkhmjtkfd\",\n" + "      \"priorPmt\": \"3423.70\",\n" + "      \"estAmtDue\": \"135.86\",\n" + "      \"insuredRelEnum\": \"PATIENT_RELATIONSHIP_CODE_RESERVED_FOR_NATIONAL_ASSIGNMENT_61\",\n" + "      \"insuredName\": \"zmkbpdbtm\",\n" + "      \"insuredSsnHic\": \"q\",\n" + "      \"insuredGroupName\": \"vj\",\n" + "      \"insuredGroupNbr\": \"sms\",\n" + "      \"treatAuthCd\": \"xdx2\",\n" + "      \"insuredSexUnrecognized\": \"z\",\n" + "      \"insuredRelX12Enum\": \"PATIENT_RELATIONSHIP_CODE_RESERVED_FOR_NATIONAL_ASSIGNMENT_90\",\n" + "      \"insuredDob\": \"2021-02-16\",\n" + "      \"insuredDobText\": \"02162021\"\n" + "    }\n" + "  }, {\n" + "    \"insuredPayer\": {\n" + "      \"payersIdUnrecognized\": \"2\",\n" + "      \"payersName\": \"dxrdkvfzfdfcmbnjghwn\",\n" + "      \"relIndUnrecognized\": \"b\",\n" + "      \"assignIndUnrecognized\": \"s\",\n" + "      \"providerNumber\": \"crwrxpnhbgbj\",\n" + "      \"adjDcnIcn\": \"sfgvbrtdwxjwzzmpjbfmzzg\",\n" + "      \"priorPmt\": \"4.19\",\n" + "      \"estAmtDue\": \"87579.10\",\n" + "      \"insuredRelEnum\": \"PATIENT_RELATIONSHIP_CODE_RESERVED_FOR_NATIONAL_ASSIGNMENT_29\",\n" + "      \"insuredName\": \"szdwpddcp\",\n" + "      \"insuredSsnHic\": \"xdmgkd\",\n" + "      \"insuredGroupName\": \"bkgwgjmpnwnwzq\",\n" + "      \"insuredGroupNbr\": \"vtbnpbpzrkzqdqk\",\n" + "      \"treatAuthCd\": \"k1bqrsk75pz1scr\",\n" + "      \"insuredSexEnum\": \"BENEFICIARY_SEX_UNKNOWN\",\n" + "      \"insuredRelX12Unrecognized\": \"14\",\n" + "      \"insuredDob\": \"2021-05-10\",\n" + "      \"insuredDobText\": \"05102021\"\n" + "    }\n" + "  }, {\n" + "    \"insuredPayer\": {\n" + "      \"payersIdEnum\": \"PAYERS_CODE_WORKERS_COMPENSATION\",\n" + "      \"payersName\": \"nzhhhwtwrmh\",\n" + "      \"relIndEnum\": \"RELEASE_OF_INFORMATION_NO_RELEASE_ON_FILE\",\n" + "      \"assignIndEnum\": \"ASSIGNMENT_OF_BENEFITS_INDICATOR_BENEFITS_ASSIGNED\",\n" + "      \"providerNumber\": \"wpvhcvthsrh\",\n" + "      \"adjDcnIcn\": \"cbzgmqxncdsfvnqwhmtghbg\",\n" + "      \"priorPmt\": \"261.11\",\n" + "      \"estAmtDue\": \"219.45\",\n" + "      \"insuredRelUnrecognized\": \"65\",\n" + "      \"insuredName\": \"q\",\n" + "      \"insuredSsnHic\": \"bnqfw\",\n" + "      \"insuredGroupName\": \"srxwvrt\",\n" + "      \"insuredGroupNbr\": \"vjsg\",\n" + "      \"treatAuthCd\": \"qf6n2k31b0dq\",\n" + "      \"insuredSexEnum\": \"BENEFICIARY_SEX_UNKNOWN\",\n" + "      \"insuredRelX12Enum\": \"PATIENT_RELATIONSHIP_CODE_GRANDCHILD\",\n" + "      \"insuredDob\": \"2021-02-05\",\n" + "      \"insuredDobText\": \"02052021\"\n" + "    }\n" + "  }],\n" + "  \"fissAuditTrail\": [{\n" + "    \"badtStatusEnum\": \"CLAIM_STATUS_RTP\",\n" + "    \"badtLoc\": \"4zz44\",\n" + "    \"badtOperId\": \"5k\",\n" + "    \"badtReas\": \"qp7\",\n" + "    \"badtCurrDateCymd\": \"2021-04-30\"\n" + "  }, {\n" + "    \"badtStatusEnum\": \"CLAIM_STATUS_RETURN_TO_PRO\",\n" + "    \"badtLoc\": \"wx0\",\n" + "    \"badtOperId\": \"fhmgmx4\",\n" + "    \"badtReas\": \"jcdt\",\n" + "    \"badtCurrDateCymd\": \"2021-02-15\"\n" + "  }, {\n" + "    \"badtStatusEnum\": \"CLAIM_STATUS_ROUTING\",\n" + "    \"badtLoc\": \"5khn\",\n" + "    \"badtOperId\": \"301rcr49n\",\n" + "    \"badtReas\": \"0mqgw\",\n" + "    \"badtCurrDateCymd\": \"2021-03-19\"\n" + "  }, {\n" + "    \"badtStatusUnrecognized\": \"4\",\n" + "    \"badtLoc\": \"zj6z\",\n" + "    \"badtOperId\": \"n4k5\",\n" + "    \"badtReas\": \"mb52z\",\n" + "    \"badtCurrDateCymd\": \"2021-04-27\"\n" + "  }, {\n" + "    \"badtStatusEnum\": \"CLAIM_STATUS_BLANK\",\n" + "    \"badtLoc\": \"h\",\n" + "    \"badtOperId\": \"kc6\",\n" + "    \"badtReas\": \"j\",\n" + "    \"badtCurrDateCymd\": \"2021-06-16\"\n" + "  }, {\n" + "    \"badtStatusUnrecognized\": \"3\",\n" + "    \"badtLoc\": \"r\",\n" + "    \"badtOperId\": \"bp8gtjvb\",\n" + "    \"badtReas\": \"pg\",\n" + "    \"badtCurrDateCymd\": \"2021-04-30\"\n" + "  }, {\n" + "    \"badtStatusUnrecognized\": \"2\",\n" + "    \"badtLoc\": \"xd\",\n" + "    \"badtOperId\": \"mn3nm2\",\n" + "    \"badtReas\": \"zg325\",\n" + "    \"badtCurrDateCymd\": \"2021-02-16\"\n" + "  }, {\n" + "    \"badtStatusEnum\": \"CLAIM_STATUS_MOVE\",\n" + "    \"badtLoc\": \"6z\",\n" + "    \"badtOperId\": \"skg403qd\",\n" + "    \"badtReas\": \"2j72t\",\n" + "    \"badtCurrDateCymd\": \"2021-06-24\"\n" + "  }, {\n" + "    \"badtStatusUnrecognized\": \"3\",\n" + "    \"badtLoc\": \"hr4\",\n" + "    \"badtOperId\": \"bqjhmw51t\",\n" + "    \"badtReas\": \"bcg9t\",\n" + "    \"badtCurrDateCymd\": \"2021-03-13\"\n" + "  }, {\n" + "    \"badtStatusUnrecognized\": \"p\",\n" + "    \"badtLoc\": \"8sr3\",\n" + "    \"badtOperId\": \"tpc5586\",\n" + "    \"badtReas\": \"fd3b9\",\n" + "    \"badtCurrDateCymd\": \"2021-06-26\"\n" + "  }, {\n" + "    \"badtStatusUnrecognized\": \"3\",\n" + "    \"badtLoc\": \"tb\",\n" + "    \"badtOperId\": \"hsmtc1db\",\n" + "    \"badtReas\": \"hrr\",\n" + "    \"badtCurrDateCymd\": \"2021-02-19\"\n" + "  }, {\n" + "    \"badtStatusUnrecognized\": \"h\",\n" + "    \"badtLoc\": \"8bcxj\",\n" + "    \"badtOperId\": \"w5xns5tm\",\n" + "    \"badtReas\": \"wskp\",\n" + "    \"badtCurrDateCymd\": \"2021-01-19\"\n" + "  }, {\n" + "    \"badtStatusUnrecognized\": \"t\",\n" + "    \"badtLoc\": \"56\",\n" + "    \"badtOperId\": \"shhv\",\n" + "    \"badtReas\": \"nk\",\n" + "    \"badtCurrDateCymd\": \"2021-02-07\"\n" + "  }, {\n" + "    \"badtStatusUnrecognized\": \"q\",\n" + "    \"badtLoc\": \"3346\",\n" + "    \"badtOperId\": \"dt\",\n" + "    \"badtReas\": \"g\",\n" + "    \"badtCurrDateCymd\": \"2021-02-07\"\n" + "  }, {\n" + "    \"badtStatusEnum\": \"CLAIM_STATUS_SUSPEND\",\n" + "    \"badtLoc\": \"x\",\n" + "    \"badtOperId\": \"gdgm5v\",\n" + "    \"badtReas\": \"t896p\",\n" + "    \"badtCurrDateCymd\": \"2021-01-06\"\n" + "  }, {\n" + "    \"badtStatusUnrecognized\": \"c\",\n" + "    \"badtLoc\": \"9fx\",\n" + "    \"badtOperId\": \"sqprx3j\",\n" + "    \"badtReas\": \"hm3w\",\n" + "    \"badtCurrDateCymd\": \"2021-06-12\"\n" + "  }, {\n" + "    \"badtStatusEnum\": \"CLAIM_STATUS_DENIED\",\n" + "    \"badtLoc\": \"505q\",\n" + "    \"badtOperId\": \"0\",\n" + "    \"badtReas\": \"tgstb\",\n" + "    \"badtCurrDateCymd\": \"2021-06-02\"\n" + "  }, {\n" + "    \"badtStatusEnum\": \"CLAIM_STATUS_FORCE\",\n" + "    \"badtLoc\": \"bnd\",\n" + "    \"badtOperId\": \"4j1\",\n" + "    \"badtReas\": \"xxz\",\n" + "    \"badtCurrDateCymd\": \"2021-05-11\"\n" + "  }, {\n" + "    \"badtStatusEnum\": \"CLAIM_STATUS_SUSPEND\",\n" + "    \"badtLoc\": \"6\",\n" + "    \"badtOperId\": \"59s\",\n" + "    \"badtReas\": \"m\",\n" + "    \"badtCurrDateCymd\": \"2021-02-11\"\n" + "  }, {\n" + "    \"badtStatusEnum\": \"CLAIM_STATUS_ROUTING\",\n" + "    \"badtLoc\": \"c8\",\n" + "    \"badtOperId\": \"r6fwg5sns\",\n" + "    \"badtReas\": \"tdh2\",\n" + "    \"badtCurrDateCymd\": \"2021-05-23\"\n" + "  }],\n" + "  \"rejectCd\": \"g06r\",\n" + "  \"fullPartDenInd\": \"9\",\n" + "  \"nonPayInd\": \"gh\",\n" + "  \"xrefDcnNbr\": \"d4tf7h188107\",\n" + "  \"adjReqCdEnum\": \"ADJUSTMENT_REQUESTOR_CODE_FISCAL_INTERMEDIARY\",\n" + "  \"adjReasCd\": \"n\",\n" + "  \"cancelXrefDcn\": \"x\",\n" + "  \"cancelDateCymd\": \"2021-01-12\",\n" + "  \"cancAdjCdEnum\": \"CANCEL_ADJUSTMENT_CODE_OTHER\",\n" + "  \"originalXrefDcn\": \"ws5h69ffchwwgghm8qjf\",\n" + "  \"paidDtCymd\": \"2021-04-27\",\n" + "  \"admDateCymd\": \"2021-02-22\",\n" + "  \"admSourceUnrecognized\": \"p\",\n" + "  \"primaryPayerCodeEnum\": \"PAYERS_CODE_VETERANS_ADMINISTRATION\",\n" + "  \"attendPhysId\": \"hc5ft3r\",\n" + "  \"attendPhysLname\": \"49cd\",\n" + "  \"attendPhysFname\": \"ftsdx4\",\n" + "  \"attendPhysMint\": \"t\",\n" + "  \"attendPhysFlagUnrecognized\": \"v\",\n" + "  \"operatingPhysId\": \"zxw89\",\n" + "  \"operPhysLname\": \"5b\",\n" + "  \"operPhysFname\": \"1zq84dp\",\n" + "  \"operPhysMint\": \"k\",\n" + "  \"operPhysFlagEnum\": \"PHYSICIAN_FLAG_NO\",\n" + "  \"othPhysId\": \"x79m54mr\",\n" + "  \"othPhysLname\": \"sj6k56gg\",\n" + "  \"othPhysFname\": \"84r\",\n" + "  \"othPhysMint\": \"6\",\n" + "  \"othPhysFlagEnum\": \"PHYSICIAN_FLAG_NO\",\n" + "  \"xrefHicNbr\": \"hn70st6z5\",\n" + "  \"procNewHicIndUnrecognized\": \"j\",\n" + "  \"newHic\": \"73j4\",\n" + "  \"reposIndEnum\": \"REPOSITORY_INDICATOR_HIC_HAS_BEEN_MOVED\",\n" + "  \"reposHic\": \"mb\",\n" + "  \"mbiSubmBeneIndEnum\": \"FISS_HIC_OR_MBI_IS_MBI\",\n" + "  \"adjMbiIndUnrecognized\": \"9\",\n" + "  \"adjMbi\": \"19kn4mf5\",\n" + "  \"medicalRecordNo\": \"kk\"\n" + "}", json);
}
Also used : FissClaim(gov.cms.mpsm.rda.v1.fiss.FissClaim) Clock(java.time.Clock) Test(org.junit.jupiter.api.Test)

Example 2 with FissClaim

use of gov.cms.mpsm.rda.v1.fiss.FissClaim in project beneficiary-fhir-data by CMSgov.

the class RandomFissClaimSourceTest method oneMaxToReturn.

@Test
public void oneMaxToReturn() throws Exception {
    RandomFissClaimSource source = new RandomFissClaimSource(0, 1);
    assertTrue(source.hasNext());
    FissClaim claim = source.next();
    assertTrue(claim.getDcn().length() > 0);
    assertFalse(source.hasNext());
    assertNextPastEndOfDataThrowsException(source);
}
Also used : FissClaim(gov.cms.mpsm.rda.v1.fiss.FissClaim) Test(org.junit.jupiter.api.Test)

Example 3 with FissClaim

use of gov.cms.mpsm.rda.v1.fiss.FissClaim in project beneficiary-fhir-data by CMSgov.

the class RandomFissClaimSourceTest method threeMaxToReturn.

@Test
public void threeMaxToReturn() throws Exception {
    RandomFissClaimSource source = new RandomFissClaimSource(0, 3);
    assertTrue(source.hasNext());
    FissClaim claim = source.next();
    assertTrue(claim.getDcn().length() > 0);
    assertTrue(source.hasNext());
    claim = source.next();
    assertTrue(claim.getDcn().length() > 0);
    assertTrue(source.hasNext());
    claim = source.next();
    assertTrue(claim.getDcn().length() > 0);
    assertFalse(source.hasNext());
    assertNextPastEndOfDataThrowsException(source);
}
Also used : FissClaim(gov.cms.mpsm.rda.v1.fiss.FissClaim) Test(org.junit.jupiter.api.Test)

Example 4 with FissClaim

use of gov.cms.mpsm.rda.v1.fiss.FissClaim in project beneficiary-fhir-data by CMSgov.

the class RdaLoadJobIT method fissClaimsTest.

@Test
public void fissClaimsTest() throws Exception {
    RdaPipelineTestUtils.runTestWithTemporaryDb(RdaLoadJobIT.class, clock, (appState, entityManager) -> {
        assertTablesAreEmpty(entityManager);
        RdaServer.LocalConfig.builder().fissSourceFactory(fissJsonSource(fissClaimJson)).build().runWithPortParam(port -> {
            final RdaLoadOptions config = createRdaLoadOptions(port);
            final PipelineJob<?> job = config.createFissClaimsLoadJob(appState);
            job.call();
        });
        final ImmutableList<FissClaimChange> expectedClaims = JsonMessageSource.parseAll(fissClaimJson, JsonMessageSource::parseFissClaimChange);
        List<PreAdjFissClaim> claims = getPreAdjFissClaims(entityManager);
        assertEquals(expectedClaims.size(), claims.size());
        for (PreAdjFissClaim resultClaim : claims) {
            FissClaim expected = findMatchingFissClaim(expectedClaims, resultClaim);
            assertNotNull(expected);
            assertEquals(expected.getHicNo(), resultClaim.getHicNo());
            assertEquals(expected.getPracLocCity(), Strings.nullToEmpty(resultClaim.getPracLocCity()));
            assertEquals(expected.getFissProcCodesCount(), resultClaim.getProcCodes().size());
            assertEquals(expected.getFissDiagCodesCount(), resultClaim.getDiagCodes().size());
        }
    });
}
Also used : JsonMessageSource(gov.cms.bfd.pipeline.rda.grpc.server.JsonMessageSource) PreAdjFissClaim(gov.cms.bfd.model.rda.PreAdjFissClaim) FissClaim(gov.cms.mpsm.rda.v1.fiss.FissClaim) FissClaimChange(gov.cms.mpsm.rda.v1.FissClaimChange) PreAdjFissClaim(gov.cms.bfd.model.rda.PreAdjFissClaim) Test(org.junit.jupiter.api.Test)

Example 5 with FissClaim

use of gov.cms.mpsm.rda.v1.fiss.FissClaim in project beneficiary-fhir-data by CMSgov.

the class JsonMessageSourceTest method claimsList.

@Test
public void claimsList() throws Exception {
    JsonMessageSource<FissClaim> source = new JsonMessageSource<>(ImmutableList.of(CLAIM_1, CLAIM_2), JsonMessageSource::parseFissClaim);
    assertTrue(source.hasNext());
    FissClaim claim = source.next();
    assertEquals("63843470", claim.getDcn());
    assertTrue(source.hasNext());
    claim = source.next();
    assertEquals("2643602", claim.getDcn());
    assertFalse(source.hasNext());
    assertNextPastEndOfDataThrowsException(source);
    assertMultipleCallsToCloseOk(source);
}
Also used : FissClaim(gov.cms.mpsm.rda.v1.fiss.FissClaim) Test(org.junit.jupiter.api.Test)

Aggregations

FissClaim (gov.cms.mpsm.rda.v1.fiss.FissClaim)12 Test (org.junit.jupiter.api.Test)11 FissClaimChange (gov.cms.mpsm.rda.v1.FissClaimChange)4 PreAdjFissClaim (gov.cms.bfd.model.rda.PreAdjFissClaim)3 PreAdjFissDiagnosisCode (gov.cms.bfd.model.rda.PreAdjFissDiagnosisCode)2 PreAdjFissProcCode (gov.cms.bfd.model.rda.PreAdjFissProcCode)2 FissDiagnosisCode (gov.cms.mpsm.rda.v1.fiss.FissDiagnosisCode)2 FissProcedureCode (gov.cms.mpsm.rda.v1.fiss.FissProcedureCode)2 Clock (java.time.Clock)2 Mbi (gov.cms.bfd.model.rda.Mbi)1 PreAdjFissAuditTrail (gov.cms.bfd.model.rda.PreAdjFissAuditTrail)1 PreAdjFissPayer (gov.cms.bfd.model.rda.PreAdjFissPayer)1 RdaChange (gov.cms.bfd.pipeline.rda.grpc.RdaChange)1 JsonMessageSource (gov.cms.bfd.pipeline.rda.grpc.server.JsonMessageSource)1 FissClaimTransformer (gov.cms.bfd.pipeline.rda.grpc.source.FissClaimTransformer)1 IdHasher (gov.cms.bfd.pipeline.sharedutils.IdHasher)1 ClaimRequest (gov.cms.mpsm.rda.v1.ClaimRequest)1 FissAuditTrail (gov.cms.mpsm.rda.v1.fiss.FissAuditTrail)1 FissPayer (gov.cms.mpsm.rda.v1.fiss.FissPayer)1 BufferedWriter (java.io.BufferedWriter)1