Produced by Araxis Merge on 12/5/2017 12:06:49 PM 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 | IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\SiteServiceSOAPServer\main\src\java\gov\va\med\vista\siteservice\translator | SiteServiceTranslator.java | Mon Dec 4 21:35:04 2017 UTC |
| 2 | IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\SiteServiceSOAPServer\main\src\java\gov\va\med\vista\siteservice\translator | SiteServiceTranslator.java | Mon Dec 4 22:05:46 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 3 | 278 |
| 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 | /** | |
| 2 | * | |
| 3 | Package: MAG - Vis tA Imaging | |
| 4 | WARNING: Per VHA D irective 2 004-038, t his routin e should n ot be modi fied. | |
| 5 | Date Cre ated: Aug 20, 2008 | |
| 6 | Site Nam e: Washin gton OI Fi eld Office , Silver S pring, MD | |
| 7 | Developer:
|
|
| 8 | Descript ion: | |
| 9 | ||
| 10 | ;; +-------- ---------- ---------- ---------- ---------- ---------- ---------- + | |
| 11 | ;; Property of the US Government . | |
| 12 | ;; No permis sion to co py or redi stribute t his softwa re is give n. | |
| 13 | ;; Use of un released v ersions of this soft ware requi res the us er | |
| 14 | ;; to execu te a writt en test ag reement wi th the Vis tA Imaging | |
| 15 | ;; Developm ent Office of the De partment o f Veterans Affairs, | |
| 16 | ;; telephon e (301) 73 4-0100. | |
| 17 | ;; | |
| 18 | ;; The Food and Drug A dministrat ion classi fies this software a s | |
| 19 | ;; a Class I I medical device. A s such, it may not b e changed | |
| 20 | ;; in any wa y. Modifi cations to this soft ware may r esult in a n | |
| 21 | ;; adulterat ed medical device un der 21CFR8 20, the us e of which | |
| 22 | ;; is consid ered to be a violati on of US F ederal Sta tutes. | |
| 23 | ;; +-------- ---------- ---------- ---------- ---------- ---------- ---------- + | |
| 24 | ||
| 25 | */ | |
| 26 | package go v.va.med.v ista.sites ervice.tra nslator; | |
| 27 | ||
| 28 | import gov .va.med.im aging.Stri ngUtil; | |
| 29 | import gov .va.med.im aging.exch ange.busin ess.Region ; | |
| 30 | import gov .va.med.im aging.exch ange.busin ess.Site; | |
| 31 | ||
| 32 | import jav a.util.Arr ayList; | |
| 33 | import jav a.util.Lis t; | |
| 34 | ||
| 35 | import org .apache.lo gging.log4 j.LogManag er; | |
| 36 | import org .apache.lo gging.log4 j.Logger; | |
| 37 | ||
| 38 | /** | |
| 39 | * Transla tor for Si te Service | |
| 40 | * | |
| 41 | * @author
|
|
| 42 | * | |
| 43 | */ | |
| 44 | public cla ss SiteSer viceTransl ator | |
| 45 | { | |
| 46 | pr ivate fina l static L ogger logg er = LogMa nager.getL ogger(Site ServiceTra nslator.cl ass); | |
| 47 | pr ivate fina l static S tring site NumberDeli miter = "^ "; | |
| 48 | ||
| 49 | pu blic stati c gov.va.m ed.vistawe b.WebServi ces.SiteSe rvice.Site TO convert Site(Site site, Stri ng siteNum ber) | |
| 50 | { | |
| 51 | gov. va.med.vis taweb.WebS ervices.Si teService. SiteTO sit eTo = | |
| 52 | new go v.va.med.v istaweb.We bServices. SiteServic e.SiteTO() ; | |
| 53 | try | |
| 54 | { | |
| 55 | siteTo .setRegion ID(site.ge tRegionId( )); | |
| 56 | siteTo .setMonike r(site.get SiteAbbr() ); | |
| 57 | siteTo .setName(s ite.getSit eName()); | |
| 58 | siteTo .setSiteco de(site.ge tSiteNumbe r()); | |
| 59 | siteTo .setHostna me(site.ge tVistaServ er()); | |
| 60 | siteTo .setPort(s ite.getVis taPort()); | |
| 61 | } | |
| 62 | catc h(Exceptio n ex) | |
| 63 | { | |
| 64 | logger .error(ex. getClass() .getName() + " Error translati ng site (" + siteNum ber + ")") ; | |
| 65 | siteTo .setSiteco de(siteNum ber); | |
| 66 | siteTo .setFaultT O(createFa ult(ex, "I nvalid sit e code?")) ; | |
| 67 | } | |
| 68 | retu rn siteTo; | |
| 69 | } | |
| 70 | ||
| 71 | pu blic stati c gov.va.m ed.vistawe b.WebServi ces.SiteSe rvice.Site TO [] conv ertSites(L ist<Site> sites) | |
| 72 | { | |
| 73 | List <gov.va.me d.vistaweb .WebServic es.SiteSer vice.SiteT O> sitesTo = | |
| 74 | new Ar rayList<go v.va.med.v istaweb.We bServices. SiteServic e.SiteTO>( ); | |
| 75 | for( Site site : sites) | |
| 76 | { | |
| 77 | sitesT o.add(conv ertSite(si te, "")); | |
| 78 | } | |
| 79 | retu rn sitesTo .toArray(n ew gov.va. med.vistaw eb.WebServ ices.SiteS ervice.Sit eTO[sitesT o.size()]) ; | |
| 80 | } | |
| 81 | ||
| 82 | pu blic stati c gov.va.m ed.vistawe b.WebServi ces.SiteSe rvice.Regi onTO conve rtRegion(R egion regi on, String regionId) | |
| 83 | { | |
| 84 | gov. va.med.vis taweb.WebS ervices.Si teService. RegionTO r esult = | |
| 85 | new go v.va.med.v istaweb.We bServices. SiteServic e.RegionTO (); | |
| 86 | try | |
| 87 | { | |
| 88 | result .setID(reg ion.getReg ionNumber( )); | |
| 89 | result .setName(r egion.getR egionName( )); | |
| 90 | ||
| 91 | gov.va .med.vista web.WebSer vices.Site Service.Si teTO [] si tes = conv ertSites(r egion.getS ites()); | |
| 92 | result .setSites( new gov.va .med.vista web.WebSer vices.Site Service.Ar rayOfSiteT O(sites)); | |
| 93 | } | |
| 94 | catc h(Exceptio n ex) | |
| 95 | { | |
| 96 | logger .error(ex. getClass() .getName() + " Error translati ng region (" + regio nId + ")") ; | |
| 97 | result .setID(reg ionId); | |
| 98 | result .setFaultT O(createFa ult(ex, "I nvalid VIS N number?" )); | |
| 99 | } | |
| 100 | retu rn result; | |
| 101 | } | |
| 102 | ||
| 103 | pu blic stati c gov.va.m ed.vistawe b.WebServi ces.SiteSe rvice.Arra yOfRegionT O convertR egions(Lis t<Region> regions) | |
| 104 | { | |
| 105 | gov. va.med.vis taweb.WebS ervices.Si teService. RegionTO [ ] regionsT o = new | |
| 106 | gov.va .med.vista web.WebSer vices.Site Service.Re gionTO[reg ions.size( )]; | |
| 107 | for( int i = 0; i < regio ns.size(); i++) | |
| 108 | { | |
| 109 | Region region = regions.ge t(i); | |
| 110 | region sTo[i] = c onvertRegi on(region, ""); | |
| 111 | } | |
| 112 | ||
| 113 | gov. va.med.vis taweb.WebS ervices.Si teService. ArrayOfReg ionTO resu lt = new | |
| 114 | gov.va .med.vista web.WebSer vices.Site Service.Ar rayOfRegio nTO(region sTo); | |
| 115 | ||
| 116 | retu rn result; | |
| 117 | } | |
| 118 | ||
| 119 | /* * | |
| 120 | * Converted the delim ited strin g into an array of s ite number s | |
| 121 | * @param de limitedSit eNumbers | |
| 122 | * @return | |
| 123 | * / | |
| 124 | pu blic stati c String[] convertDe limitedStr ingsIntoSi teNumbers( String del imitedSite Numbers) | |
| 125 | { | |
| 126 | retu rn StringU til.split( delimitedS iteNumbers , siteNumb erDelimite r); | |
| 127 | } | |
| 128 | ||
| 129 | /* * | |
| 130 | * Create a fault base d on an ex ception | |
| 131 | * @param ex An except ion that o ccurred | |
| 132 | * @param su ggestion S uggestion for the ca use of the problem | |
| 133 | * @return | |
| 134 | * / | |
| 135 | pr ivate stat ic gov.va. med.vistaw eb.WebServ ices.SiteS ervice.Fau ltTO creat eFault(Exc eption ex, String su ggestion) | |
| 136 | { | |
| 137 | gov. va.med.vis taweb.WebS ervices.Si teService. FaultTO fa ult = | |
| 138 | new go v.va.med.v istaweb.We bServices. SiteServic e.FaultTO( ex.getClas s().toStri ng(), ex.g etMessage( ), null, s uggestion) ; | |
| 139 | retu rn fault; | |
| 140 | } | |
| 141 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.