Produced by Araxis Merge on 6/9/2017 3:51:28 PM Eastern 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 | Fri Jun 9 19:51:28 2017 UTC | ||
| 2 | eHealth_Exch (eHealth Exchange Enhancements) Build 3 docs & code_May_2017.zip\VAP_CIF_CODE0502.zip\VAP_CIF_CODE0502\VAP_CIF_CODE0502\nvap-web\src\main\java\gov\va\nvap\web\report | PatientDiscoverySummaryReportResults.java | Fri Apr 21 20:15:58 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 0 | 0 |
| Changed | 0 | 0 |
| Inserted | 1 | 376 |
| 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.nvap. web.report ; | |||||
| 2 | ||||||
| 3 | import gov .va.med.nh in.adapter .audit.Act ionType; | |||||
| 4 | import gov .va.med.nh in.adapter .audit.Act ionValuesT ype; | |||||
| 5 | import gov .va.med.nh in.adapter .audit.Aud itSummarie sType; | |||||
| 6 | import gov .va.med.nh in.adapter .audit.Aud itSummaryT ype; | |||||
| 7 | import gov .va.med.nh in.adapter .audit.Fie ldType; | |||||
| 8 | import gov .va.med.nh in.adapter .audit.Get AuditsSumm ary; | |||||
| 9 | import gov .va.med.nh in.adapter .audit.Get AuditsSumm aryRespons e; | |||||
| 10 | import gov .va.med.nh in.adapter .audit.Gro upByFields Type; | |||||
| 11 | import gov .va.med.nh in.adapter .audit.Str ingValuesT ype; | |||||
| 12 | import gov .va.med.nh in.adapter .audit.Sum maryFields Type; | |||||
| 13 | import gov .va.nvap.c ommon.date .Gregorian DateUtil; | |||||
| 14 | import gov .va.nvap.c ommon.sort .BubbleSor tListMap; | |||||
| 15 | import gov .va.nvap.c ommon.vali dation.Nul lChecker; | |||||
| 16 | import gov .va.nvap.p rivacy.Org anizationT ype; | |||||
| 17 | import gov .va.nvap.s ervice.ada pter.audit .AdapterAu ditManager ; | |||||
| 18 | import gov .va.nvap.s ervice.aud it.AuditEx ception; | |||||
| 19 | import gov .va.nvap.w eb.app.Res ponseDispa tcherHttpS ervlet; | |||||
| 20 | import gov .va.nvap.w eb.dao.Fac ilityDAO; | |||||
| 21 | import gov .va.nvap.w eb.dao.Use rDocumentD AO; | |||||
| 22 | import gov .va.nvap.w eb.helper. facility.F acilityHel per; | |||||
| 23 | import gov .va.nvap.w eb.helper. privacy.Co nsentManag ementHelpe r; | |||||
| 24 | import gov .va.nvap.w eb.helper. report.Rep ortHelper; | |||||
| 25 | import gov .va.nvap.w eb.patient .ExcelGene ratorThrea d; | |||||
| 26 | import gov .va.nvap.w eb.user.Us erHelper; | |||||
| 27 | import gov .va.nvap.w eb.util.da te.DateUti l; | |||||
| 28 | import gov .va.nvap.w eb.util.xl s.ExcelExp orter; | |||||
| 29 | ||||||
| 30 | import jav a.io.IOExc eption; | |||||
| 31 | import jav a.util.Arr ayList; | |||||
| 32 | import jav a.util.Cal endar; | |||||
| 33 | import jav a.util.Dat e; | |||||
| 34 | import jav a.util.Has hMap; | |||||
| 35 | import jav a.util.Lin kedHashMap ; | |||||
| 36 | import jav a.util.Lis t; | |||||
| 37 | import jav a.util.Map ; | |||||
| 38 | ||||||
| 39 | import jav ax.ejb.EJB ; | |||||
| 40 | import jav ax.servlet .ServletEx ception; | |||||
| 41 | import jav ax.servlet .http.Http ServletReq uest; | |||||
| 42 | import jav ax.servlet .http.Http ServletRes ponse; | |||||
| 43 | import jav ax.servlet .http.Http Session; | |||||
| 44 | import org .apache.co mmons.lang .StringUti ls; | |||||
| 45 | ||||||
| 46 | /** | |||||
| 47 | * This cl ass handle s the resu lts page f or Patient Discovery Summary r eport. | |||||
| 48 | * | |||||
| 49 | * @author Irakli Ka kushadze | |||||
| 50 | */ | |||||
| 51 | public cla ss Patient DiscoveryS ummaryRepo rtResults extends Re sponseDisp atcherHttp Servlet { | |||||
| 52 | ||||||
| 53 | privat e static f inal long serialVers ionUID = 1 L; | |||||
| 54 | ||||||
| 55 | privat e AdapterA uditManage r adapterA uditManage r; | |||||
| 56 | ||||||
| 57 | @EJB(b eanInterfa ce = Adapt erAuditMan ager.class , mappedNa me = "Adap terAuditMa nager") | |||||
| 58 | public void setA dapterAudi tManager(f inal Adapt erAuditMan ager adapt erAuditMan ager) { | |||||
| 59 | th is.adapter AuditManag er = adapt erAuditMan ager; | |||||
| 60 | } | |||||
| 61 | ||||||
| 62 | public void expo rtToExcel( final Http ServletReq uest reque st, final HttpServle tResponse response) throws Ser vletExcept ion, IOExc eption { | |||||
| 63 | Ex celGenerat orThread e xGenThread = new Exc elGenerato rThread("e xGenThread "); | |||||
| 64 | ex GenThread. setIsSumma ryReport(t rue); | |||||
| 65 | ||||||
| 66 | // Get the se ssion fina l | |||||
| 67 | Ht tpSession session = request.ge tSession(f alse); | |||||
| 68 | ||||||
| 69 | // Create a map of key which is based on t he result data key a nd the | |||||
| 70 | // heading v alue The h eading is used to cr eate the c olumn head ers and th e | |||||
| 71 | // key is us ed to pull the data from the r esults | |||||
| 72 | fi nal Map<St ring, Stri ng> patien tDiscovery Map = new LinkedHash Map<String , String>( ); | |||||
| 73 | ||||||
| 74 | fi nal Object startDate Str = sess ion.getAtt ribute("pa tientDisco verySummar yQueryStar tDate"); | |||||
| 75 | fi nal Object endDateSt r = sessio n.getAttri bute("pati entDiscove rySummaryQ ueryEndDat e"); | |||||
| 76 | ||||||
| 77 | // Generate filters. | |||||
| 78 | fi nal Map<St ring, List <Object>> filterMap = new Link edHashMap< String, Li st<Object> >(); | |||||
| 79 | fi nal Linked HashMap<St ring, Obje ct> filter s = new Li nkedHashMa p<String, Object>(); | |||||
| 80 | ||||||
| 81 | fi lters.put( "Start Dat e", this.g etReportHe lper().get FormattedD ate((Date) startDate Str)); | |||||
| 82 | fi lters.put( "End Date" , this.get ReportHelp er().getFo rmattedDat e((Date) e ndDateStr) ); | |||||
| 83 | fi lters.put( "User ID", session.g etAttribut e("patient DiscoveryS ummaryQuer yUserId")) ; | |||||
| 84 | fi lters.put( "Patient P referred F acility", ExcelExpor ter.getPat ientPrefer redFacilit yFilter(ge tFacilityD AO(), (Str ing) sessi on.getAttr ibute("fac ility"))); | |||||
| 85 | fi lters.put( "eHealth E xchange Or ganization ", ExcelEx porter.get FilterValu e(session. getAttribu te("patien tDiscovery SummaryQue ryOrgName" ))); | |||||
| 86 | Ex celExporte r.populate FilterMapF orExport(r equest, fi lters, fil terMap, se ssion.getA ttribute(" patientTyp es").toStr ing()); | |||||
| 87 | ex GenThread. setFilterM ap(filterM ap); | |||||
| 88 | ||||||
| 89 | ex GenThread. setHasOpti onalRows(t rue); | |||||
| 90 | ex GenThread. setOptiona lRowsMap(c reateOptio nalRowsMap ()); | |||||
| 91 | ||||||
| 92 | pa tientDisco veryMap.pu t("partner Org", "eHe alth Excha nge Organi zation"); | |||||
| 93 | pa tientDisco veryMap.pu t("vaFacil ity", "Pat ient Prefe rred Facil ity"); | |||||
| 94 | pa tientDisco veryMap.pu t("auditsC ount", "Au dits"); | |||||
| 95 | pa tientDisco veryMap.pu t("countUn iqueRealPa tients", " Unique Rea l Patients "); | |||||
| 96 | pa tientDisco veryMap.pu t("matches FoundRealP atients", "Matches F ound for R eal Patien ts"); | |||||
| 97 | pa tientDisco veryMap.pu t("matchFa ilsRealPat ients", "M atch Fails for Real Patients") ; | |||||
| 98 | pa tientDisco veryMap.pu t("countUn iqueTestPa tients", " Unique Tes t Patients "); | |||||
| 99 | pa tientDisco veryMap.pu t("matches FoundTestP atients", "Matches F ound for T est Patien ts"); | |||||
| 100 | pa tientDisco veryMap.pu t("matchFa ilsTestPat ients", "M atch Fails for Test Patients") ; | |||||
| 101 | ex GenThread. setReportM ap(patient DiscoveryM ap); | |||||
| 102 | ||||||
| 103 | // Set names for Excel generator thread | |||||
| 104 | ex GenThread. setTitle(" Patient Di scovery Au dit Summar y Report") ; | |||||
| 105 | ||||||
| 106 | ex GenThread. setExcelEx porter(thi s.getExcel Exporter() ); | |||||
| 107 | ex GenThread. setAdapter AuditManag er(adapter AuditManag er); | |||||
| 108 | ex GenThread. setReportH elper(getR eportHelpe r()); | |||||
| 109 | ex GenThread. setCmsHelp er(getCmsH elper()); | |||||
| 110 | ex GenThread. setFacilit yHelper(ge tFacilityH elper()); | |||||
| 111 | ex GenThread. setUserId( UserHelper .getUserNa me(request )); | |||||
| 112 | ex GenThread. setUserDoc umentDao(g etUserDocu mentDAO()) ; | |||||
| 113 | ||||||
| 114 | // Set searc h attribut es for get ting audit results | |||||
| 115 | ex GenThread. setAttribu tes(mapSes sionAttrib utes(sessi on)); | |||||
| 116 | ||||||
| 117 | ex GenThread. run(); | |||||
| 118 | ||||||
| 119 | th is.forward (request, response, "show"); | |||||
| 120 | } | |||||
| 121 | ||||||
| 122 | privat e Map<Stri ng, Object > mapSessi onAttribut es(HttpSes sion sessi on) { | |||||
| 123 | Ma p<String, Object> at tributes = new HashM ap<String, Object>() ; | |||||
| 124 | ||||||
| 125 | at tributes.p ut("userId ", (String ) session | |||||
| 126 | .get Attribute( "patientDi scoverySum maryQueryU serId")); | |||||
| 127 | ||||||
| 128 | // Add 24 ho urs to end date if s ame as sta rt date | |||||
| 129 | Da te startDa te = (Date ) session. getAttribu te("patien tDiscovery SummaryQue ryStartDat e"); | |||||
| 130 | Da te endDate = (Date) session.ge tAttribute ("patientD iscoverySu mmaryQuery EndDate"); | |||||
| 131 | if (NullChec ker.isNotE mpty(endDa te)) { | |||||
| 132 | if (endD ate.equals (startDate )) { | |||||
| 133 | endD ate = Date Util.addTi me(endDate , Calendar .HOUR, 24) ; | |||||
| 134 | } | |||||
| 135 | } | |||||
| 136 | at tributes.p ut("startD ate", star tDate); | |||||
| 137 | at tributes.p ut("endDat e", endDat e); | |||||
| 138 | ||||||
| 139 | // Set both sender and receiver org to the organizat ion entere d | |||||
| 140 | at tributes.p ut("organi zation", ( String) se ssion | |||||
| 141 | .get Attribute( "patientDi scoverySum maryQueryO rganizatio n")); | |||||
| 142 | at tributes.p ut("remote Organizati on", (Stri ng) sessio n | |||||
| 143 | .get Attribute( "patientDi scoverySum maryQueryO rganizatio n")); | |||||
| 144 | ||||||
| 145 | at tributes.p ut("facili ty", (Stri ng) sessio n.getAttri bute("faci lity")); | |||||
| 146 | at tributes.p ut("patien tTypes", ( Integer) s ession.get Attribute( "patientTy pes")); | |||||
| 147 | // sort | |||||
| 148 | at tributes.p ut("sortVa lue", (Str ing) sessi on | |||||
| 149 | .get Attribute( "patientDi scoverySum marySortVa lue")); | |||||
| 150 | at tributes.p ut("sortDi rection", (String) s ession | |||||
| 151 | .get Attribute( "patientDi scoverySum marySortDi rection")) ; | |||||
| 152 | ||||||
| 153 | // Set Actio n Types | |||||
| 154 | fi nal Action ValuesType actionsTy pe = new A ctionValue sType(); | |||||
| 155 | ac tionsType. getValue() .add(Actio nType.ANNO UNCE); | |||||
| 156 | ac tionsType. getValue() .add(Actio nType.CHEC K_POLICY); | |||||
| 157 | ac tionsType. getValue() .add(Actio nType.MPI_ FIND_MATCH ); | |||||
| 158 | ac tionsType. getValue() .add(Actio nType.ADD_ PATIENT_CO RRELATION) ; | |||||
| 159 | ac tionsType. setNotIn(f alse); | |||||
| 160 | at tributes.p ut("action sType", ac tionsType) ; | |||||
| 161 | ||||||
| 162 | // Group by | |||||
| 163 | fi nal GroupB yFieldsTyp e groupByF ieldsType = new Grou pByFieldsT ype(); | |||||
| 164 | fi nal List<F ieldType> fieldTypeL ist = grou pByFieldsT ype.getGro upByField( ); | |||||
| 165 | fi eldTypeLis t.add(Fiel dType.REMO TE_ORGANIZ ATION_ID); | |||||
| 166 | fi eldTypeLis t.add(Fiel dType.PATI ENT_FACILI TY_NUMBER) ; | |||||
| 167 | fi eldTypeLis t.add(Fiel dType.PATI ENT_FACILI TY_NAME); | |||||
| 168 | fi eldTypeLis t.add(Fiel dType.REMO TE_ORGANIZ ATION_NAME ); | |||||
| 169 | at tributes.p ut("groupB yFieldsTyp e", groupB yFieldsTyp e); | |||||
| 170 | ||||||
| 171 | re turn attri butes; | |||||
| 172 | } | |||||
| 173 | ||||||
| 174 | Map<St ring, Stri ng> create OptionalRo wsMap() { | |||||
| 175 | Ma p<String, String> op tionalRows Map = new LinkedHash Map<String , String>( ); | |||||
| 176 | op tionalRows Map.put("t otalCount" , "Total a udits"); | |||||
| 177 | re turn optio nalRowsMap ; | |||||
| 178 | } | |||||
| 179 | ||||||
| 180 | @Overr ide | |||||
| 181 | public void unsp ecified(fi nal HttpSe rvletReque st request , final Ht tpServletR esponse re sponse) th rows Servl etExceptio n, IOExcep tion { | |||||
| 182 | ||||||
| 183 | fi nal HttpSe ssion sess ion = requ est.getSes sion(false ); | |||||
| 184 | fi nal Date s d = (Date) session.g etAttribut e("patient DiscoveryS ummaryQuer yStartDate "); | |||||
| 185 | Da te ed = (D ate) sessi on.getAttr ibute("pat ientDiscov erySummary QueryEndDa te"); | |||||
| 186 | fi nal String userId = (String) s ession.get Attribute( "patientDi scoverySum maryQueryU serId"); | |||||
| 187 | fi nal String organizat ion = (Str ing) sessi on.getAttr ibute("pat ientDiscov erySummary QueryOrgan ization"); | |||||
| 188 | fi nal String patientFa cility = ( String) se ssion.getA ttribute(" facility") ; | |||||
| 189 | fi nal int pa tientTypes = (Intege r) session .getAttrib ute("patie ntTypes"); | |||||
| 190 | fi nal GetAud itsSummary getAudits SummaryReq uest = new GetAudits Summary(); | |||||
| 191 | fi nal String patientDi scoverySum marySortVa lue = requ est.getPar ameter("pa tientDisco verySummar ySortValue "); | |||||
| 192 | fi nal String patientDi scoverySum marySortDi rection = request.ge tParameter ("patientD iscoverySu mmarySortD irection") ; | |||||
| 193 | ||||||
| 194 | // Set start date | |||||
| 195 | if (NullChec ker.isNotE mpty(sd)) { | |||||
| 196 | getAudit sSummaryRe quest.setF romDate(Gr egorianDat eUtil.getG regorianCa lendarByDa te(sd)); | |||||
| 197 | } | |||||
| 198 | ||||||
| 199 | // Set end d ate | |||||
| 200 | if (NullChec ker.isNotE mpty(ed)) { | |||||
| 201 | if (ed.e quals(sd)) { | |||||
| 202 | ed = DateUtil. addTime(ed , Calendar .HOUR, 24) ; | |||||
| 203 | } | |||||
| 204 | getAudit sSummaryRe quest.setT oDate(Greg orianDateU til.getGre gorianCale ndarByDate (ed)); | |||||
| 205 | } | |||||
| 206 | ||||||
| 207 | // Set user ID | |||||
| 208 | if (NullChec ker.isNotE mpty(userI d)) { | |||||
| 209 | final St ringValues Type userI dValue = n ew StringV aluesType( ); | |||||
| 210 | userIdVa lue.getVal ue().add(u serId); | |||||
| 211 | userIdVa lue.setNot In(false); | |||||
| 212 | getAudit sSummaryRe quest.setU serIds(use rIdValue); | |||||
| 213 | ||||||
| 214 | } | |||||
| 215 | ||||||
| 216 | // Set patie nt preferr ed facilit y | |||||
| 217 | if (!NullChe cker.isNul lOrEmpty(p atientFaci lity)) { | |||||
| 218 | final St ringValues Type patie ntFacilyNu mber = new StringVal uesType(); | |||||
| 219 | patientF acilyNumbe r.setNotIn (false); | |||||
| 220 | final Li st<String> patientFa cilyNumber List = pat ientFacily Number.get Value(); | |||||
| 221 | patientF acilyNumbe rList.add( patientFac ility); | |||||
| 222 | getAudit sSummaryRe quest.setP atientFaci lityNumber s(patientF acilyNumbe r); | |||||
| 223 | } | |||||
| 224 | ||||||
| 225 | // Set partn er organiz ation | |||||
| 226 | fi nal String ValuesType orgTypes = new Stri ngValuesTy pe(); | |||||
| 227 | if (NullChec ker.isNotE mpty(organ ization)) { | |||||
| 228 | orgTypes .getValue( ).add(orga nization); | |||||
| 229 | } | |||||
| 230 | or gTypes.set NotIn(fals e); | |||||
| 231 | ge tAuditsSum maryReques t.setRemot eOrganizat ionIds(org Types); | |||||
| 232 | ge tAuditsSum maryReques t.setOrgan izationIds (orgTypes) ; | |||||
| 233 | ||||||
| 234 | // Set patie nt types | |||||
| 235 | ge tAuditsSum maryReques t.setPatie ntTypes(pa tientTypes ); | |||||
| 236 | ||||||
| 237 | // Set actio in types | |||||
| 238 | fi nal Action ValuesType actionsTy pe = new A ctionValue sType(); | |||||
| 239 | ac tionsType. getValue() .add(Actio nType.ANNO UNCE); | |||||
| 240 | ac tionsType. getValue() .add(Actio nType.CHEC K_POLICY); | |||||
| 241 | ac tionsType. getValue() .add(Actio nType.MPI_ FIND_MATCH ); | |||||
| 242 | ac tionsType. getValue() .add(Actio nType.ADD_ PATIENT_CO RRELATION) ; | |||||
| 243 | ac tionsType. setNotIn(f alse); | |||||
| 244 | ge tAuditsSum maryReques t.setActio ns(actions Type); | |||||
| 245 | ||||||
| 246 | // Group by | |||||
| 247 | fi nal GroupB yFieldsTyp e groupByF ieldsType = new Grou pByFieldsT ype(); | |||||
| 248 | fi nal List<F ieldType> fieldTypeL ist = grou pByFieldsT ype.getGro upByField( ); | |||||
| 249 | fi eldTypeLis t.add(Fiel dType.REMO TE_ORGANIZ ATION_ID); | |||||
| 250 | fi eldTypeLis t.add(Fiel dType.PATI ENT_FACILI TY_NUMBER) ; | |||||
| 251 | fi eldTypeLis t.add(Fiel dType.PATI ENT_FACILI TY_NAME); | |||||
| 252 | fi eldTypeLis t.add(Fiel dType.REMO TE_ORGANIZ ATION_NAME ); | |||||
| 253 | ge tAuditsSum maryReques t.setGroup ByFields(g roupByFiel dsType); | |||||
| 254 | ||||||
| 255 | tr y { | |||||
| 256 | // Get s ummary lis t from Exc hange | |||||
| 257 | GetAudit sSummaryRe sponse get AuditsSumm aryRespons e = this.a dapterAudi tManager.g etAuditSum mary(getAu ditsSummar yRequest); | |||||
| 258 | ||||||
| 259 | // Const ruct resul ts for the jsp page | |||||
| 260 | List<Map <String, O bject>> re sults = ne w ArrayLis t<Map<Stri ng, Object >>(); | |||||
| 261 | long tot alCount = 0l; | |||||
| 262 | final Au ditSummari esType aud itSummarie sType = ge tAuditsSum maryRespon se.getAudi tSummaries (); | |||||
| 263 | ||||||
| 264 | List<Aud itSummaryT ype> audit Summary = new ArrayL ist<AuditS ummaryType >(); | |||||
| 265 | if (audi tSummaries Type != nu ll) { | |||||
| 266 | audi tSummary = auditSumm ariesType. getAuditSu mmary(); | |||||
| 267 | } | |||||
| 268 | ||||||
| 269 | for (fin al AuditSu mmaryType auditSumma ryType : a uditSummar y) { | |||||
| 270 | fina l Map<Stri ng, Object > resultMa p = new Ha shMap<Stri ng, Object >(); | |||||
| 271 | fina l long cou nt = audit SummaryTyp e.getCount (); | |||||
| 272 | fina l SummaryF ieldsType summaryFie lds = audi tSummaryTy pe.getSumm aryFields( ); | |||||
| 273 | fina l List<Str ing> summa ryField = summaryFie lds.getSum maryField( ); | |||||
| 274 | ||||||
| 275 | if ( NullChecke r.isEmpty( summaryFie ld)) { | |||||
| 276 | continue; | |||||
| 277 | } | |||||
| 278 | ||||||
| 279 | if ( summaryFie ld.size() < 4) { | |||||
| 280 | continue; | |||||
| 281 | } | |||||
| 282 | ||||||
| 283 | // P artner org anization | |||||
| 284 | Orga nizationTy pe organiz ationType = null; | |||||
| 285 | if ( NullChecke r.isNotEmp ty(summary Field.get( 0))) { | |||||
| 286 | organizati onType = ( this.getCm sHelper(). getOrganiz ationByHom eCommunity Id(summary Field.get( 0).replace ("urn:oid: ", ""))); | |||||
| 287 | } | |||||
| 288 | if ( organizati onType!= n ull && !Nu llChecker. isNullOrEm pty(organi zationType )) { | |||||
| 289 | resultMap. put("partn erOrg", Re portDataPr ocessor.nu llEmptyRep laceWithUn known(orga nizationTy pe.getOrgN ame())); | |||||
| 290 | } el se { | |||||
| 291 | resultMap. put("partn erOrg", Re portDataPr ocessor.nu llEmptyRep laceWithUn known(summ aryField.g et(3))); | |||||
| 292 | } | |||||
| 293 | ||||||
| 294 | // P atient pre ferred fac ility | |||||
| 295 | fina l String a dapterVAFa cility = s ummaryFiel d.get(1); | |||||
| 296 | Stri ng vaFacil ity; | |||||
| 297 | if ( ReportData Processor. isValidSta tion(adapt erVAFacili ty)) { | |||||
| 298 | vaFacility = this.ge tFacilityH elper().ge tFacilityN ameByStati onId(adapt erVAFacili ty); | |||||
| 299 | if (NullCh ecker.isEm pty(vaFaci lity)) { | |||||
| 300 | vaFaci lity = sum maryField. get(2); | |||||
| 301 | } | |||||
| 302 | } el se { | |||||
| 303 | vaFacility = summary Field.get( 2); | |||||
| 304 | } | |||||
| 305 | resu ltMap.put( "vaFacilit y", Report DataProces sor.fixSta tion(vaFac ility)); | |||||
| 306 | ||||||
| 307 | // A udits coun t | |||||
| 308 | resu ltMap.put( "auditsCou nt", count ); | |||||
| 309 | ||||||
| 310 | // T he rest of the value s are simp ly copied from audit Summary | |||||
| 311 | resu ltMap.put( "countUniq ueRealPati ents", Str ingUtils.i sNumeric(s ummaryFiel d.get(4)) ? Long.par seLong(sum maryField. get(4)) : 0); | |||||
| 312 | resu ltMap.put( "countUniq ueTestPati ents", Str ingUtils.i sNumeric(s ummaryFiel d.get(5)) ? Long.par seLong(sum maryField. get(5)) : 0); | |||||
| 313 | resu ltMap.put( "matchesFo undRealPat ients", St ringUtils. isNumeric( summaryFie ld.get(6)) ? Long.pa rseLong(su mmaryField .get(6)) : 0); | |||||
| 314 | resu ltMap.put( "matchesFo undTestPat ients", St ringUtils. isNumeric( summaryFie ld.get(7)) ? Long.pa rseLong(su mmaryField .get(7)) : 0); | |||||
| 315 | resu ltMap.put( "matchFail sRealPatie nts", Stri ngUtils.is Numeric(su mmaryField .get(8)) ? Long.pars eLong(summ aryField.g et(8)) : 0 ); | |||||
| 316 | resu ltMap.put( "matchFail sTestPatie nts", Stri ngUtils.is Numeric(su mmaryField .get(9)) ? Long.pars eLong(summ aryField.g et(9)) : 0 ); | |||||
| 317 | ||||||
| 318 | resu lts.add(re sultMap); | |||||
| 319 | tota lCount += count; | |||||
| 320 | } | |||||
| 321 | ||||||
| 322 | // Sort | |||||
| 323 | if (Null Checker.is NotEmpty(p atientDisc overySumma rySortValu e) && Null Checker.is NotEmpty(p atientDisc overySumma rySortDire ction)) { | |||||
| 324 | bool ean ascend ing = !pat ientDiscov erySummary SortDirect ion.equals IgnoreCase ("DESC"); | |||||
| 325 | fina l BubbleSo rtListMap bSorter = new Bubble SortListMa p(); | |||||
| 326 | resu lts = bSor ter.sortBy Column(res ults, pati entDiscove rySummaryS ortValue, ascending) ; | |||||
| 327 | } | |||||
| 328 | ||||||
| 329 | session. setAttribu te("totalC ount", tot alCount); | |||||
| 330 | session. setAttribu te("patien tDiscovery SummaryRes ults", res ults); | |||||
| 331 | } catch (fin al AuditEx ception ex ) { | |||||
| 332 | throw ne w AuditExc eption(ex) ; | |||||
| 333 | } | |||||
| 334 | th is.forward (request, response, "show"); | |||||
| 335 | } | |||||
| 336 | ||||||
| 337 | /** | |||||
| 338 | * Get the conse nt managem ent helper from Spri ng. | |||||
| 339 | * @re turn Conse ntManageme ntHelper C onsent man agement he lper | |||||
| 340 | */ | |||||
| 341 | privat e ConsentM anagementH elper getC msHelper() { | |||||
| 342 | re turn getBe an("cmsHel per", Cons entManagem entHelper. class); | |||||
| 343 | } | |||||
| 344 | ||||||
| 345 | /** | |||||
| 346 | * Get the excel exporter class from Spring. | |||||
| 347 | * @re turn the e xcel expor ter object | |||||
| 348 | */ | |||||
| 349 | privat e ExcelExp orter getE xcelExport er() { | |||||
| 350 | re turn getBe an("excelE xporter", ExcelExpor ter.class) ; | |||||
| 351 | } | |||||
| 352 | ||||||
| 353 | /** | |||||
| 354 | * Get the facil ity helper from Spri ng. | |||||
| 355 | * @re turn Facil ityHelper helper | |||||
| 356 | */ | |||||
| 357 | privat e Facility Helper get FacilityHe lper() { | |||||
| 358 | re turn getBe an("facili tyHelper", FacilityH elper.clas s); | |||||
| 359 | } | |||||
| 360 | ||||||
| 361 | privat e Facility DAO getFac ilityDAO() { | |||||
| 362 | re turn this. getBean("F acilityDAO ", Facilit yDAO.class ); | |||||
| 363 | } | |||||
| 364 | ||||||
| 365 | /** | |||||
| 366 | * Get the repor t helper f rom Spring . | |||||
| 367 | * @re turn Repor tHelper Re port helpe r | |||||
| 368 | */ | |||||
| 369 | privat e ReportHe lper getRe portHelper () { | |||||
| 370 | re turn getBe an("report Helper", R eportHelpe r.class); | |||||
| 371 | } | |||||
| 372 | ||||||
| 373 | privat e UserDocu mentDAO ge tUserDocum entDAO() { | |||||
| 374 | re turn this. getBean("U serDocumen tDAO", Use rDocumentD AO.class); | |||||
| 375 | } | |||||
| 376 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.