Produced by Araxis Merge on 12/4/2017 8:32:30 AM Central Standard 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 | VCCM.zip\VCCM\CRM_solutions\FTPResources\source\WebResources | ftp_Demographics | Thu Nov 30 12:25:46 2017 UTC |
| 2 | VCCM.zip\VCCM\CRM_solutions\FTPResources\source\WebResources | ftp_Demographics | Thu Nov 30 16:39:08 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 654 |
| Changed | 1 | 2 |
| 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 | function r etrieveDem ographics( ){ | |
| 2 | try{ | |
| 3 | //debugger ; | |
| 4 | var eligib ility; | |
| 5 | var vetera n; | |
| 6 | var unempl oyable; | |
| 7 | var svcCI; | |
| 8 | var percen tage; | |
| 9 | var sensit ivityFlag; | |
| 10 | var add1; | |
| 11 | var addt1; | |
| 12 | var add2; | |
| 13 | var addt2; | |
| 14 | var add3; | |
| 15 | var addt3; | |
| 16 | var city; | |
| 17 | var tcity; | |
| 18 | var state; | |
| 19 | var tstate ; | |
| 20 | var zip; | |
| 21 | var tzip; | |
| 22 | var countr y; | |
| 23 | var tcount ry; | |
| 24 | var key = Xrm.Page.g etAttribut e("tri_vet eranid").g etValue(); | |
| 25 | //var key = "1003100 560V020099 "; | |
| 26 | ||
| 27 | ||
| 28 | var ret; | |
| 29 | var reques t ="https: //qacrmdac .np.crm.vr m.vba. DNS /WebParts/ api/eesumm ary/1.0/xm l/ftpCRM/0 00000"+key +"000000"; | |
| 30 | var query = new XMLH ttpRequest (); | |
| 31 | query.open ('GET', re quest, tru e); | |
| 32 | query.onre adystatech ange = fun ction(){ | |
| 33 | if (query.re adyState = = 4 && que ry.status= =200){ | |
| 34 | if ( query.resp onseXML.ch ildNodes[0 ].childNod es.length === 0){ | |
| 35 | ||
| 36 | return ; | |
| 37 | } | |
| 38 | ret = quer y.response XML.getEle mentsByTag Name("rate dDisabilit y")[0]; | |
| 39 | elig ibility = query.resp onseXML.ge tElementsB yTagName(" primaryEli gibility") [0].childN odes[2].ch ildNodes[0 ].data; | |
| 40 | //ve teran = qu ery.respon seXML.getE lementsByT agName("ve teran")[0] .childNode s[0].nodeV alue; | |
| 41 | unem ployable = query.res ponseXML.g etElements ByTagName( "unemploya ble")[0].c hildNodes[ 0].nodeVal ue; | |
| 42 | svcC I = query. responseXM L.getEleme ntsByTagNa me("servic eConnected Indicator" )[0].child Nodes[0].n odeValue; | |
| 43 | if(s vcCI === " true"){ | |
| 44 | perc entage = q uery.respo nseXML.get ElementsBy TagName("r atedDisabi lity")[0]. childNodes [0].childN odes[0].no deValue; | |
| 45 | } | |
| 46 | sens itivityFla g = query. responseXM L.getEleme ntsByTagNa me("sensit ivityInfo" )[0].child Nodes[0].c hildNodes[ 0].nodeVal ue; | |
| 47 | var adds=query .responseX ML.getElem entsByTagN ame("addre sses"); | |
| 48 | var perm; | |
| 49 | var temp = nul l; | |
| 50 | for (i=0; i<ad ds[0].chil dNodes.len gth; i++){ | |
| 51 | if (ad ds[0].chil dNodes[i]. childNodes [0].childN odes[0].no deValue == = "Permane nt"){ | |
| 52 | perm = i ; | |
| 53 | ||
| 54 | } | |
| 55 | ||
| 56 | } | |
| 57 | ||
| 58 | for (i=0; i<adds[0]. childNodes .length; i ++){ | |
| 59 | if (ad ds[0].chil dNodes[i]. childNodes [0].childN odes[0].no deValue == = "Tempora ry"){ | |
| 60 | temp = i ; | |
| 61 | ||
| 62 | } | |
| 63 | ||
| 64 | } | |
| 65 | if (perm ! == null){ | |
| 66 | var pa= query. responseXM L.getEleme ntsByTagNa me("addres ses")[0].c hildNodes[ perm]; | |
| 67 | } | |
| 68 | if(temp != = null){ | |
| 69 | va r ta = que ry.respons eXML.getEl ementsByTa gName("add resses")[0 ].childNod es[temp]; | |
| 70 | } | |
| 71 | ||
| 72 | for (i=0; i<pa .childNode s.length; i++){ | |
| 73 | if (pa .childNode s[i].nodeN ame === "l ine1"){ | |
| 74 | add1 = p a.childNod es[i].chil dNodes[0]. nodeValue; | |
| 75 | } | |
| 76 | ||
| 77 | } | |
| 78 | if(t emp !==nul l){ | |
| 79 | for (i=0; i<ta.child Nodes.leng th; i++){ | |
| 80 | if (ta .childNode s[i].nodeN ame === "l ine1"){ | |
| 81 | addt1 = ta.childNo des[i].chi ldNodes[0] .nodeValue ; | |
| 82 | } | |
| 83 | ||
| 84 | } | |
| 85 | } | |
| 86 | ||
| 87 | for (i=0; i<pa .childNode s.length; i++){ | |
| 88 | if (pa .childNode s[i].nodeN ame === "l ine2"){ | |
| 89 | add2 = p a.childNod es[i].chil dNodes[0]. nodeValue; | |
| 90 | } | |
| 91 | ||
| 92 | } | |
| 93 | if(t emp !== nu ll){ | |
| 94 | for (i=0; i<ta.child Nodes.leng th; i++){ | |
| 95 | if (ta .childNode s[i].nodeN ame === "l ine2"){ | |
| 96 | addt2 = ta.childNo des[i].chi ldNodes[0] .nodeValue ; | |
| 97 | } | |
| 98 | ||
| 99 | } | |
| 100 | } | |
| 101 | ||
| 102 | for (i=0; i<pa .childNode s.length; i++){ | |
| 103 | if (pa .childNode s[i].nodeN ame === "l ine3"){ | |
| 104 | add3 = p a.childNod es[i].chil dNodes[0]. nodeValue; | |
| 105 | } | |
| 106 | ||
| 107 | } | |
| 108 | if(t emp !== nu ll){ | |
| 109 | for (i=0; i<ta.child Nodes.leng th; i++){ | |
| 110 | if (ta .childNode s[i].nodeN ame === "l ine3"){ | |
| 111 | addt3 = ta.childNo des[i].chi ldNodes[0] .nodeValue ; | |
| 112 | } | |
| 113 | ||
| 114 | } | |
| 115 | } | |
| 116 | ||
| 117 | for (i=0; i<pa .childNode s.length; i++){ | |
| 118 | if (pa .childNode s[i].nodeN ame === "c ity"){ | |
| 119 | city = p a.childNod es[i].chil dNodes[0]. nodeValue; | |
| 120 | } | |
| 121 | ||
| 122 | } | |
| 123 | ||
| 124 | if(t emp){ | |
| 125 | for (i=0; i<ta.child Nodes.leng th; i++){ | |
| 126 | if (ta .childNode s[i].nodeN ame === "c ity"){ | |
| 127 | tcity = ta.childNo des[i].chi ldNodes[0] .nodeValue ; | |
| 128 | } | |
| 129 | ||
| 130 | } | |
| 131 | } | |
| 132 | for (i=0; i<pa .childNode s.length; i++){ | |
| 133 | if (pa .childNode s[i].nodeN ame === "s tate"){ | |
| 134 | state = pa.childNo des[i].chi ldNodes[0] .nodeValue ; | |
| 135 | } | |
| 136 | ||
| 137 | } | |
| 138 | if(t emp !== nu ll){ | |
| 139 | for (i=0; i<ta.child Nodes.leng th; i++){ | |
| 140 | if (ta .childNode s[i].nodeN ame === "s tate"){ | |
| 141 | tstate = ta.childN odes[i].ch ildNodes[0 ].nodeValu e; | |
| 142 | } | |
| 143 | ||
| 144 | } | |
| 145 | } | |
| 146 | for (i=0; i<pa .childNode s.length; i++){ | |
| 147 | if (pa .childNode s[i].nodeN ame === "z ip"){ | |
| 148 | zip = pa .childNode s[i].child Nodes[0].n odeValue; | |
| 149 | } | |
| 150 | ||
| 151 | } | |
| 152 | if(t emp !== nu ll){ | |
| 153 | for (i=0; i<ta.child Nodes.leng th; i++){ | |
| 154 | if (ta .childNode s[i].nodeN ame === "z ip"){ | |
| 155 | tzip = t a.childNod es[i].chil dNodes[0]. nodeValue; | |
| 156 | } | |
| 157 | ||
| 158 | } | |
| 159 | } | |
| 160 | for (i=0; i<pa .childNode s.length; i++){ | |
| 161 | if (pa .childNode s[i].nodeN ame === "c ountry"){ | |
| 162 | country = pa.child Nodes[i].c hildNodes[ 0].nodeVal ue; | |
| 163 | } | |
| 164 | ||
| 165 | } | |
| 166 | if(temp!== null){ | |
| 167 | for (i=0; i<ta.child Nodes.leng th; i++){ | |
| 168 | if (ta .childNode s[i].nodeN ame === "c ountry"){ | |
| 169 | tcountry = ta.chil dNodes[i]. childNodes [0].nodeVa lue; | |
| 170 | } | |
| 171 | ||
| 172 | } | |
| 173 | } | |
| 174 | ||
| 175 | Xrm. Page.getAt tribute("f tp_primary eligibilit ycode").se tValue(eli gibility); | |
| 176 | if(v eteran === "true"){ | |
| 177 | Xrm. Page.getAt tribute("f tp_patient type").set Value("vet eran"); | |
| 178 | } | |
| 179 | else { | |
| 180 | Xrm.Pa ge.getAttr ibute("ftp _patientty pe").setVa lue("Non-V eteran"); | |
| 181 | } | |
| 182 | Xrm. Page.getAt tribute("f tp_unemplo yable").se tValue(une mployable) ; | |
| 183 | if(s vcCI === " true"){ | |
| 184 | Xrm.Pa ge.getAttr ibute("ftp _serviceco nnected"). setValue(t rue); | |
| 185 | } | |
| 186 | else { | |
| 187 | Xrm.Pa ge.getAttr ibute("ftp _serviceco nnected"). setValue(f alse); | |
| 188 | } | |
| 189 | if ( percentage != null){ | |
| 190 | Xrm.Pa ge.getAttr ibute("ftp _scpercent ").setValu e(percenta ge); | |
| 191 | } | |
| 192 | if ( sensitivit yFlag === "true"){ | |
| 193 | Xrm. Page.getAt tribute("f tp_sensiti veveteran" ).setValue (true); | |
| 194 | } | |
| 195 | else { | |
| 196 | Xrm.Pa ge.getAttr ibute("ftp _sensitive veteran"). setValue(f alse); | |
| 197 | ||
| 198 | } | |
| 199 | if(add1 != = null){ | |
| 200 | Xrm. Page.getAt tribute("a ddress1_li ne1").setV alue(add1) ; | |
| 201 | } | |
| 202 | if(addt1 ! == null){ | |
| 203 | Xrm. Page.getAt tribute("a ddress2_li ne1").setV alue(addt1 ); | |
| 204 | } | |
| 205 | if(add2 != = null){ | |
| 206 | Xrm. Page.getAt tribute("a ddress1_li ne2").setV alue(add2) ; | |
| 207 | } | |
| 208 | if(addt2 ! == null){ | |
| 209 | Xrm. Page.getAt tribute("a ddress2_li ne2").setV alue(addt2 ); | |
| 210 | } | |
| 211 | if(add3 != = null){ | |
| 212 | Xrm. Page.getAt tribute("a ddress1_li ne3").setV alue(add3) ; | |
| 213 | } | |
| 214 | if(addt3 ! == null){ | |
| 215 | Xrm. Page.getAt tribute("a ddress2_li ne3").setV alue(addt3 ); | |
| 216 | } | |
| 217 | if(city != = null){ | |
| 218 | Xrm. Page.getAt tribute("a ddress1_ci ty").setVa lue(city); | |
| 219 | } | |
| 220 | if(tcity ! == null){ | |
| 221 | Xrm. Page.getAt tribute("a ddress2_ci ty").setVa lue(tcity) ; | |
| 222 | } | |
| 223 | if(state ! == null){ | |
| 224 | Xrm. Page.getAt tribute("a ddress1_st ateorprovi nce").setV alue(state ); | |
| 225 | } | |
| 226 | if(tstate !== null){ | |
| 227 | Xrm. Page.getAt tribute("a ddress2_st ateorprovi nce").setV alue(tstat e); | |
| 228 | } | |
| 229 | if(country !== null) { | |
| 230 | Xrm. Page.getAt tribute("a ddress1_co untry").se tValue(cou ntry); | |
| 231 | } | |
| 232 | if(tcountr y !== null ){ | |
| 233 | Xrm. Page.getAt tribute("a ddress2_co untry").se tValue(tco untry); | |
| 234 | } | |
| 235 | if(zip !== null){ | |
| 236 | Xrm. Page.getAt tribute("a ddress1_po stalcode") .setValue( zip); | |
| 237 | } | |
| 238 | if(tzip != = null){ | |
| 239 | Xrm. Page.getAt tribute("a ddress2_po stalcode") .setValue( tzip); | |
| 240 | } | |
| 241 | var addres s1_composi teValue = Xrm.Page.g etAttribut e("address 1_composit e").getVal ue(); | |
| 242 | var addres s1_line1 = Xrm.Page. getAttribu te("addres s1_line1") .getValue( ); | |
| 243 | var addr ess1_line2 = Xrm.Pag e.getAttri bute("addr ess1_line2 ").getValu e(); | |
| 244 | var addr ess1_line3 = Xrm.Pag e.getAttri bute("addr ess1_line3 ").getValu e(); | |
| 245 | var addr ess1_city = Xrm.Page .getAttrib ute("addre ss1_city") .getValue( ); | |
| 246 | var addr ess1_state orprovince = Xrm.Pag e.getAttri bute("addr ess1_state orprovince ").getValu e(); | |
| 247 | var addr ess1_posta lcode = Xr m.Page.get Attribute( "address1_ postalcode ").getValu e(); | |
| 248 | var addr ess1_count ry = Xrm.P age.getAtt ribute("ad dress1_cou ntry").get Value(); | |
| 249 | ||
| 250 | // Achie ve equival ent format ting | |
| 251 | //addres s1_line1 | |
| 252 | //addres s1_line2 | |
| 253 | //addres s1_line3 | |
| 254 | //addres s1_city, a ddress1_st ateorprovi nce addres s1_postalc ode | |
| 255 | //addres s1_country | |
| 256 | ||
| 257 | var addr essText = ""; | |
| 258 | if (addr ess1_line1 != null) { | |
| 259 | address Text += ad dress1_lin e1 + "\n"; | |
| 260 | } | |
| 261 | if (addr ess1_line2 != null) { | |
| 262 | address Text += ad dress1_lin e2 + "\n"; | |
| 263 | } | |
| 264 | if (addr ess1_line3 != null) { | |
| 265 | address Text += ad dress1_lin e3 + "\n"; | |
| 266 | } | |
| 267 | if (addr ess1_city != null) { | |
| 268 | address Text += ad dress1_cit y + ", "; | |
| 269 | } | |
| 270 | if (addr ess1_state orprovince != null) { | |
| 271 | address Text += ad dress1_sta teorprovin ce + " "; | |
| 272 | } | |
| 273 | if (addr ess1_posta lcode != n ull) { | |
| 274 | address Text += ad dress1_pos talcode + "\n"; | |
| 275 | } | |
| 276 | addressT ext += add ress1_coun try; | |
| 277 | ||
| 278 | Xrm.Page .getAttrib ute("addre ss1_compos ite").setV alue(addre ssText); | |
| 279 | ||
| 280 | var addres s2_composi teValue = Xrm.Page.g etAttribut e("address 2_composit e").getVal ue(); | |
| 281 | var addres s2_line1 = Xrm.Page. getAttribu te("addres s2_line1") .getValue( ); | |
| 282 | var addr ess2_line2 = Xrm.Pag e.getAttri bute("addr ess2_line2 ").getValu e(); | |
| 283 | var addr ess2_line3 = Xrm.Pag e.getAttri bute("addr ess2_line3 ").getValu e(); | |
| 284 | var addr ess2_city = Xrm.Page .getAttrib ute("addre ss2_city") .getValue( ); | |
| 285 | var addr ess2_state orprovince = Xrm.Pag e.getAttri bute("addr ess2_state orprovince ").getValu e(); | |
| 286 | var addr ess2_posta lcode = Xr m.Page.get Attribute( "address2_ postalcode ").getValu e(); | |
| 287 | var addr ess2_count ry = Xrm.P age.getAtt ribute("ad dress2_cou ntry").get Value(); | |
| 288 | ||
| 289 | // Achie ve equival ent format ting | |
| 290 | //addres s1_line1 | |
| 291 | //addres s1_line2 | |
| 292 | //addres s1_line3 | |
| 293 | //addres s1_city, a ddress1_st ateorprovi nce addres s1_postalc ode | |
| 294 | //addres s1_country | |
| 295 | ||
| 296 | var addr ess2Text = ""; | |
| 297 | if (addr ess2_line1 != null) { | |
| 298 | address 2Text += a ddress2_li ne1 + "\n" ; | |
| 299 | } | |
| 300 | if (addr ess2_line2 != null) { | |
| 301 | address 2Text += a ddress2_li ne2 + "\n" ; | |
| 302 | } | |
| 303 | if (addr ess2_line3 != null) { | |
| 304 | address 2Text += a ddress2_li ne3 + "\n" ; | |
| 305 | } | |
| 306 | if (addr ess2_city != null) { | |
| 307 | address 2Text += a ddress2_ci ty + ", "; | |
| 308 | } | |
| 309 | if (addr ess2_state orprovince != null) { | |
| 310 | address 2Text += a ddress2_st ateorprovi nce + " "; | |
| 311 | } | |
| 312 | if (addr ess1_posta lcode != n ull) { | |
| 313 | address 2Text += a ddress2_po stalcode + "\n"; | |
| 314 | } | |
| 315 | address2 Text += ad dress2_cou ntry; | |
| 316 | ||
| 317 | Xrm.Page .getAttrib ute("addre ss2_compos ite").setV alue(addre ss2Text); | |
| 318 | ||
| 319 | Xrm.Page.d ata.entity .save(); | |
| 320 | ||
| 321 | } | |
| 322 | }; | |
| 323 | query.send (request); | |
| 324 | } | |
| 325 | catch(e){ | |
| 326 | alert(e); | |
| 327 | } | |
| 328 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.