Produced by Araxis Merge on 4/2/2019 1:06:57 PM Central Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
# | Location | File | Last Modified |
---|---|---|---|
1 | C:\AraxisMergeCompare\Pri_un\ARS_Backend\ars_app\src\test\java\gov\va\med\ars\service\impl | RfaiViewSubmissionServiceImplTest.java | Wed Mar 27 19:22:51 2019 UTC |
2 | C:\AraxisMergeCompare\Pri_re\ARS_Backend\ars_app\src\test\java\gov\va\med\ars\service\impl | RfaiViewSubmissionServiceImplTest.java | Fri Mar 29 17:45:50 2019 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Text Blocks | Lines | |
Unchanged | 3 | 442 |
Changed | 2 | 4 |
Inserted | 0 | 0 |
Removed | 0 | 0 |
Whitespace | |
---|---|
Character case | Differences in character case are significant |
Line endings | Differences in line endings (CR and LF characters) are ignored |
CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
1 | package go v.va.med.a rs.service .impl; | |
2 | ||
3 | import sta tic org.ju nit.Assert .assertEqu als; | |
4 | import sta tic org.ju nit.Assert .assertNot Null; | |
5 | import sta tic org.mo ckito.Mock ito.when; | |
6 | ||
7 | import jav a.math.Big Decimal; | |
8 | import jav a.math.Big Integer; | |
9 | import jav a.nio.char set.Charse t; | |
10 | import jav a.text.Dat eFormat; | |
11 | import jav a.text.Sim pleDateFor mat; | |
12 | import jav a.util.Arr ayList; | |
13 | import jav a.util.Dat e; | |
14 | import jav a.util.Has hSet; | |
15 | import jav a.util.Lis t; | |
16 | import jav a.util.Set ; | |
17 | ||
18 | import org .apache.lo gging.log4 j.LogManag er; | |
19 | import org .apache.lo gging.log4 j.Logger; | |
20 | import org .junit.Tes t; | |
21 | import org .junit.run ner.RunWit h; | |
22 | import org .mockito.I njectMocks ; | |
23 | import org .mockito.M ock; | |
24 | import org .mockito.r unners.Moc kitoJUnitR unner; | |
25 | import org .springfra mework.htt p.MediaTyp e; | |
26 | import org .springfra mework.tes t.context. ActiveProf iles; | |
27 | ||
28 | import gov .va.med.ar s.dao.ars. ClaimConta ctReposito ry; | |
29 | import gov .va.med.ar s.dao.ars. ClaimSvcLi nesReposit ory; | |
30 | import gov .va.med.ar s.dao.ars. HccsCdRepo sitory; | |
31 | import gov .va.med.ar s.dao.ars. IClaimSubm issionRepo sitory; | |
32 | import gov .va.med.ar s.dao.ars. LoincCdRep ository; | |
33 | import gov .va.med.ar s.dao.ars. LoincModCd Repository ; | |
34 | import gov .va.med.ar s.dao.ars. RfaiLookup Repository ; | |
35 | import gov .va.med.ar s.model.re sponse.Rfa i277Submis sionRespon se; | |
36 | import gov .va.med.ar s.model.re sponse.Rfa iAttachmen tResponse; | |
37 | import gov .va.med.ar s.model.re sponse.Rfa iLineItemR esponse; | |
38 | import gov .va.med.ar s.model.re sponse.Rfa iRelatedIt emResponse ; | |
39 | import gov .va.med.do main.ars.C laimCodeBr idge; | |
40 | import gov .va.med.do main.ars.C laimCodeBr idgeId; | |
41 | import gov .va.med.do main.ars.C laimContac t; | |
42 | import gov .va.med.do main.ars.C laimSubmis sion; | |
43 | import gov .va.med.do main.ars.H ccsCd; | |
44 | import gov .va.med.do main.ars.L oincCd; | |
45 | import gov .va.med.do main.ars.L oincModCd; | |
46 | import gov .va.med.do main.ars.P ayerConfig ; | |
47 | ||
48 | @RunWith(M ockitoJUni tRunner.cl ass) | |
49 | @ActivePro files("dev ") | |
50 | public cla ss RfaiVie wSubmissio nServiceIm plTest { | |
51 | pr ivate stat ic final L ogger logg er = LogMa nager.getL ogger(Rfai ViewSubmis sionServic eImplTest. class); | |
52 | pu blic stati c final Me diaType AP PLICATION_ JSON_UTF8 = new Medi aType(Medi aType.APPL ICATION_JS ON.getType (), | |
53 | MediaT ype.APPLIC ATION_JSON .getSubtyp e(), Chars et.forName ("utf8")); | |
54 | ||
55 | @M ock | |
56 | IC laimSubmis sionReposi tory claim SubRepo; | |
57 | ||
58 | @M ock | |
59 | Hc csCdReposi tory hccsR epo; | |
60 | ||
61 | @M ock | |
62 | Lo incCdRepos itory loin cRepo; | |
63 | @M ock | |
64 | Lo incModCdRe pository l oincModRep o; | |
65 | @M ock | |
66 | Rf aiLookupRe pository r faiReposit ory; | |
67 | @M ock | |
68 | Cl aimSvcLine sRepositor y claimSvc LinesRepos itory; | |
69 | @M ock | |
70 | Cl aimContact Repository claimCont actReposit ory; | |
71 | ||
72 | pu blic DateF ormat date Format = n ew SimpleD ateFormat( "MM/DD/YYY Y"); | |
73 | ||
74 | @I njectMocks | |
75 | pr ivate Rfai ViewSubmis sionServic eImpl rfai ViewSubmis sionServic eImpl; | |
76 | ||
77 | @T est | |
78 | pu blic void testMockIs Working() { | |
79 | asse rtNotNull( "RfaiViewS ubmissionS erviceImpl Injection Failed", rfaiViewSu bmissionSe rviceImpl) ; | |
80 | logg er.info("R faiViewSub missionSer viceImpl" + rfaiView Submission ServiceImp l); | |
81 | } | |
82 | ||
83 | @T est | |
84 | pu blic void getRfaiSub missionRes ults() thr ows Except ion { | |
85 | ||
86 | BigI nteger sub missionId = new BigI nteger("16 22"); | |
87 | BigD ecimal big Decimal = new BigDec imal("1788 8.41"); | |
88 | ||
89 | Loin cCd loinc = new Loin cCd(); | |
90 | loin c.setLoinc Id(1l); | |
91 | loin c.setStclo incCd("Stc loincCd"); | |
92 | ||
93 | Loin cModCd loi ncModCd = new LoincM odCd(); | |
94 | loin cModCd.set LoincModId (2l); | |
95 | loin cModCd.set StcloincCd Mod("loinc ModCodes") ; | |
96 | ||
97 | Loin cModCd loi ncModCdTwo = new Loi ncModCd(); | |
98 | loin cModCd.set LoincModId (3l); | |
99 | loin cModCdTwo. setStcloin cCdMod("lo incModCode sTwo"); | |
100 | ||
101 | Hccs Cd hccs = new HccsCd (); | |
102 | hccs .setHccsId (4l); | |
103 | hccs .setStchcc statuscatC d("stchccs tatuscatCd "); | |
104 | ||
105 | Clai mCodeBridg eId claimC odeBridgeI d = new Cl aimCodeBri dgeId(new BigInteger ("1623"), 1416, 3, 5 , 0, 0); | |
106 | Set< ClaimCodeB ridge> Cla imCodeBrid geSet = ne w HashSet< >(); | |
107 | Clai mCodeBridg e claimCod eBridge = new ClaimC odeBridge( ); | |
108 | clai mCodeBridg e.setId(cl aimCodeBri dgeId); | |
109 | clai mCodeBridg e.setHccsC d(hccs); | |
110 | clai mCodeBridg e.setLoinc Cd(loinc); | |
111 | clai mCodeBridg e.setLoinc ModCdByLoi ncMod1Id(l oincModCd) ; | |
112 | clai mCodeBridg e.setLoinc ModCdByLoi ncMod2Id(l oincModCdT wo); | |
113 | Clai mCodeBridg eSet.add(c laimCodeBr idge); | |
114 | ||
115 | List <RfaiAttac hmentRespo nse> rfaiA ttachmentR esponseLis t = new Ar rayList<>( ); | |
116 | Rfai Attachment Response r faiAttachm entRespons e = new Rf aiAttachme ntResponse (); | |
117 | rfai Attachment Response.s etStatusCo de("stchcc statuscatC d"); | |
118 | rfai Attachment Response.s etLoincCod es("Stcloi ncCd"); | |
119 | rfai Attachment Response.s etLoincMod Codes1("lo incModCode s"); | |
120 | rfai Attachment Response.s etLoincMod Codes2("lo incModCode sTwo"); | |
121 | rfai Attachment Response.s etClaimLev el("LINE") ; | |
122 | rfai Attachment Response.s etAttachme nts(""); | |
123 | rfai Attachment Response.s etServiceL ine(1416l) ; | |
124 | rfai Attachment ResponseLi st.add(rfa iAttachmen tResponse) ; | |
125 | ||
126 | Rfai 277Submiss ionRespons e rfai277S ubmissionR esponse = new Rfai27 7Submissio nResponse( ); | |
127 | rfai 277Submiss ionRespons e.setClaim Id(new Big Integer("1 ")); | |
128 | rfai 277Submiss ionRespons e.setRfaiS tatus("rfa i status") ; | |
129 | rfai 277Submiss ionRespons e.setPayer Name("paye r name"); | |
130 | rfai 277Submiss ionRespons e.setPayer Id("1111") ; | |
131 | rfai 277Submiss ionRespons e.setInfor mationRece iver("info receiver" ); | |
132 | rfai 277Submiss ionRespons e.setRespo nseDate("1 2/12/2017" ); | |
133 | rfai 277Submiss ionRespons e.setProvi derNpi("pr ovider npi "); | |
134 | rfai 277Submiss ionRespons e.setProvi derTin("pr ovider tin "); | |
135 | rfai 277Submiss ionRespons e.setPatie ntLastname ("last nam e"); | |
136 | rfai 277Submiss ionRespons e.setPatie ntFirstNam e("first n ame"); | |
137 | rfai 277Submiss ionRespons e.setPatie ntIdentifi er("22"); | |
138 | rfai 277Submiss ionRespons e.setPatie ntcontrolN umber("44" ); | |
139 | rfai 277Submiss ionRespons e.setPayer ClaimContr olNumber(" 66"); | |
140 | rfai 277Submiss ionRespons e.setBillT ype("bill type"); | |
141 | rfai 277Submiss ionRespons e.setClear ingHouseId ("88"); | |
142 | rfai 277Submiss ionRespons e.setMedic alRecordNu mber("100" ); | |
143 | rfai277Sub missionRes ponse.setC ontactInfo (" PII "); | |
144 | ||
145 | List <RfaiAttac hmentRespo nse> rfaiA ttachmentR esponses = new Array List<RfaiA ttachmentR esponse>() ; | |
146 | Rfai Attachment Response a ttachmentR esponse = new RfaiAt tachmentRe sponse(); | |
147 | atta chmentResp onse.setCl aimLevel(" claim leve l"); | |
148 | rfai Attachment Responses. add(attach mentRespon se); | |
149 | rfai 277Submiss ionRespons e.setRfaiA ttachmentR esponse(rf aiAttachme ntResponse List); | |
150 | ||
151 | Clai mContact c laimContac t = new Cl aimContact (); | |
152 | clai mContact.s etContactu serid(100l ); | |
153 | claimConta ct.setCont actemail(" PII "); | |
154 | clai mContact.s etDatecrea ted(dateFo rmat.parse ("11/01/18 ")); | |
155 | clai mContact.s etDatemodi fied(dateF ormat.pars e("11/01/1 8")); | |
156 | ||
157 | Clai mSubmissio n claimSub mission = new ClaimS ubmission( ); | |
158 | clai mSubmissio n.setTrn02 claimIndex (rfai277Su bmissionRe sponse.get ClaimId()) ; | |
159 | // c laimSubmis sion.setHl 1nm103pyrN m(rfai277S ubmissionR esponse.ge tPayerName ()); | |
160 | // c laimSubmis sion.setHl 1nm109pyrI d(rfai277S ubmissionR esponse.ge tPayerId() ); | |
161 | clai mSubmissio n.setSubmi ssionid(su bmissionId ); | |
162 | clai mSubmissio n.setHl2nm 103infRcvr (rfai277Su bmissionRe sponse.get Informatio nReceiver( )); | |
163 | Date responseD ate = new Date(rfai2 77Submissi onResponse .getRespon seDate()); | |
164 | clai mSubmissio n.setDtp20 3responsed uedate(res ponseDate) ; | |
165 | clai mSubmissio n.setHl3nm 109prvnpi( rfai277Sub missionRes ponse.getP roviderNpi ()); | |
166 | clai mSubmissio n.setHl2nm 109svcprvt in(rfai277 Submission Response.g etProvider Tin()); | |
167 | clai mSubmissio n.setHl4nm 103ptlstnm (rfai277Su bmissionRe sponse.get PatientLas tname()); | |
168 | clai mSubmissio n.setHl4nm 104ptftnm( rfai277Sub missionRes ponse.getP atientFirs tName()); | |
169 | clai mSubmissio n.setHl4nm 109ptid(rf ai277Submi ssionRespo nse.getPat ientIdenti fier()); | |
170 | clai mSubmissio n.setRef10 2ptctrlnmb r(rfai277S ubmissionR esponse.ge tPatientco ntrolNumbe r()); | |
171 | clai mSubmissio n.setTrn02 pyrclmctrl nmbr(rfai2 77Submissi onResponse .getPayerC laimContro lNumber()) ; | |
172 | clai mSubmissio n.setRef20 2billtype( rfai277Sub missionRes ponse.getB illType()) ; | |
173 | clai mSubmissio n.setRef40 2clrnghsid (rfai277Su bmissionRe sponse.get ClearingHo useId()); | |
174 | clai mSubmissio n.setRef30 2medrecnmb r(rfai277S ubmissionR esponse.ge tMedicalRe cordNumber ()); | |
175 | clai mSubmissio n.setSubmi ssionStatu s("rfai st atus"); | |
176 | clai mSubmissio n.setGener ate277Stat us("rfai s tatus"); | |
177 | clai mSubmissio n.setDatec reated(new Date()); | |
178 | clai mSubmissio n.setDatem odified(ne w Date()); | |
179 | clai mSubmissio n.setClaim Contact(cl aimContact ); | |
180 | clai mSubmissio n.setClaim CodeBridge s(ClaimCod eBridgeSet ); | |
181 | ||
182 | Paye rConfig pa yerConfig = new Paye rConfig(); | |
183 | paye rConfig.se tPayerInde x((long) ( 1)); | |
184 | paye rConfig.se tPayerIden tifier("pa yerIdentif ier"); | |
185 | paye rConfig.se tPayerIden tifierDesc ("payerIde ntifierDes c"); | |
186 | ||
187 | clai mSubmissio n.setPayer Config(pay erConfig); | |
188 | ||
189 | List <ClaimSubm ission> re latedSubmi ssions = n ew ArrayLi st<ClaimSu bmission>( ); | |
190 | rela tedSubmiss ions.add(c laimSubmis sion); | |
191 | ||
192 | List <RfaiRelat edItemResp onse> rfai RelatedIte mResponses = new Arr ayList<Rfa iRelatedIt emResponse >(); | |
193 | Rfai RelatedIte mResponse relatedIte mResponse = new Rfai RelatedIte mResponse( ); | |
194 | rela tedItemRes ponse.setS ubmissionI d(new BigI nteger("59 ")); | |
195 | rela tedItemRes ponse.setC laimId(new BigIntege r("2")); | |
196 | rela tedItemRes ponse.setE ndDate("12 /11/2017") ; | |
197 | rela tedItemRes ponse.setM edicalReco rdNumber(" 123"); | |
198 | rela tedItemRes ponse.setP atientCont rolNumber( "999"); | |
199 | rela tedItemRes ponse.setP atientName ("Last Nam e"); | |
200 | rfai RelatedIte mResponses .add(relat edItemResp onse); | |
201 | List <RfaiRelat edItemResp onse> rfai RelatedIte mResponses 2 = new Ar rayList<Rf aiRelatedI temRespons e>(); | |
202 | ||
203 | rfai 277Submiss ionRespons e.setRfaiR elatedItem Response(r faiRelated ItemRespon ses2); | |
204 | ||
205 | List <RfaiLineI temRespons e> rfaiLin eItemRespo nseList = new ArrayL ist<>(); | |
206 | Rfai LineItemRe sponse rfa iLineItemR esponse = new RfaiLi neItemResp onse(Long. valueOf("0 0001"), " 09/13/2017 ", | |
207 | "09/13/2 017", "065 1", "Q5001 ", "G4,RT, LT,P3", bi gDecimal); | |
208 | rfai LineItemRe sponseList .add(rfaiL ineItemRes ponse); | |
209 | ||
210 | List <RfaiLineI temRespons e> rfaiLin eItemRespo nseList2 = new Array List<>(); | |
211 | ||
212 | rfai 277Submiss ionRespons e.setRfaiL ineItemRes ponse(rfai LineItemRe sponseList 2); | |
213 | ||
214 | when (rfaiRepos itory.getC laimSubInf o(submissi onId)).the nReturn(cl aimSubmiss ion); | |
215 | when (rfaiRepos itory.find Bytrn02cla imIndex(ne w BigInteg er("10096" ))).thenRe turn(relat edSubmissi ons); | |
216 | ||
217 | Rfai 277Submiss ionRespons e rfaiSubm issionResu lts = rfai ViewSubmis sionServic eImpl | |
218 | .getRfai Submission Results(su bmissionId ); | |
219 | asse rtEquals(r fai277Subm issionResp onse.getPa tientFirst Name(), rf aiSubmissi onResults. getPatient FirstName( )); | |
220 | ||
221 | } | |
222 | ||
223 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.