Produced by Araxis Merge on 4/5/2017 4:21:45 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:\working_scrub\Unredacted\eHX Code Base\eHX_Bld2_Source Code_CIF_2017-02-14\NHIN_adapter\AdapterEJB\src\main\java\gov\va\med\nhin\adapter\adaptergateway\patientdiscovery | NhincProxyNHINPatientDiscoverySender.java | Fri Feb 10 15:41:44 2017 UTC |
| 2 | eHX-CIF.zip\eHX-CIF\eHX Code Base\eHX_Bld2_Source Code_CIF_2017-02-14\NHIN_adapter\AdapterEJB\src\main\java\gov\va\med\nhin\adapter\adaptergateway\patientdiscovery | NhincProxyNHINPatientDiscoverySender.java | Mon Apr 3 14:23:04 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 192 |
| 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 | package go v.va.med.n hin.adapte r.adapterg ateway.pat ientdiscov ery; | |
| 2 | ||
| 3 | import com .sun.xml.w s.client.B indingProv iderProper ties; | |
| 4 | import jav a.net.Malf ormedURLEx ception; | |
| 5 | import jav a.net.URL; | |
| 6 | ||
| 7 | import jav ax.ejb.EJB ; | |
| 8 | import jav ax.ejb.Sta teless; | |
| 9 | import jav ax.xml.nam espace.QNa me; | |
| 10 | ||
| 11 | import org .hl7.v3.PR PAIN201305 UV02; | |
| 12 | import org .hl7.v3.PR PAIN201306 UV02; | |
| 13 | import org .hl7.v3.Re spondingGa tewayPRPAI N201305UV0 2RequestTy pe; | |
| 14 | import org .hl7.v3.Re spondingGa tewayPRPAI N201306UV0 2ResponseT ype; | |
| 15 | ||
| 16 | import gov .hhs.fha.n hinc.commo n.nhinccom mon.Assert ionType; | |
| 17 | import gov .hhs.fha.n hinc.commo n.nhinccom mon.HomeCo mmunityTyp e; | |
| 18 | import gov .hhs.fha.n hinc.commo n.nhinccom mon.NhinTa rgetCommun itiesType; | |
| 19 | import gov .hhs.fha.n hinc.commo n.nhinccom mon.NhinTa rgetCommun ityType; | |
| 20 | import gov .hhs.fha.n hinc.entit ypatientdi scovery.En tityPatien tDiscovery ; | |
| 21 | import gov .hhs.fha.n hinc.entit ypatientdi scovery.En tityPatien tDiscovery PortType; | |
| 22 | import gov .va.med.nh in.adapter .propertyl ookup.Prop ertyLookup ; | |
| 23 | import gov .va.med.nh in.adapter .propertyl ookup.Prop ertyLookup Local; | |
| 24 | import jav a.util.Map ; | |
| 25 | import jav ax.xml.ws. BindingPro vider; | |
| 26 | import org .slf4j.Log ger; | |
| 27 | import org .slf4j.Log gerFactory ; | |
| 28 | ||
| 29 | /** | |
| 30 | * | |
| 31 | * @author DN S VAZQUD | |
| 32 | */ | |
| 33 | @Stateless (name = "N hincProxyN HINPatient DiscoveryS ender") | |
| 34 | public cla ss NhincPr oxyNHINPat ientDiscov erySender implements NHINPatie ntDiscover ySender { | |
| 35 | ||
| 36 | privat e static f inal Logge r logger = LoggerFac tory.getLo gger(Nhinc ProxyNHINP atientDisc overySende r.class.ge tName()); | |
| 37 | privat e Property Lookup pro pertyLooku p; | |
| 38 | privat e EntityPa tientDisco very entit yPatientDi scovery; | |
| 39 | ||
| 40 | @EJB(b eanInterfa ce = Prope rtyLookupL ocal.class , beanName = "Proper tyLookup") | |
| 41 | public void setP ropertyLoo kup(Proper tyLookup p ropertyLoo kup) { | |
| 42 | th is.propert yLookup = propertyLo okup; | |
| 43 | } | |
| 44 | ||
| 45 | public PRPAIN201 306UV02 se ndRequest( PRPAIN2013 05UV02 prp ain201305, Assertion Type asser tion, Stri ng remoteH omeCommuni tyId) { | |
| 46 | ||
| 47 | lo gger.debug ("Entering NhincProx yNHINPatie ntDiscover ySender::s endRequest "); | |
| 48 | ||
| 49 | PR PAIN201306 UV02 ret = null; | |
| 50 | ||
| 51 | tr y { | |
| 52 | Respondi ngGatewayP RPAIN20130 5UV02Reque stType req uest = new Respondin gGatewayPR PAIN201305 UV02Reques tType(); | |
| 53 | ||
| 54 | request. setAsserti on(asserti on); | |
| 55 | request. setPRPAIN2 01305UV02( prpain2013 05); | |
| 56 | request. setNhinTar getCommuni ties(creat eNhinTarge tCommuniti es(remoteH omeCommuni tyId)); | |
| 57 | ||
| 58 | //change d on 02/01 /2017 (EHX -12) | |
| 59 | logger.d ebug("Impl ementing t imeout pro perties!") ; | |
| 60 | EntityPa tientDisco veryPortTy pe port = getPatient DiscoveryE ntityPort( ); | |
| 61 | Map<Stri ng, Object > requestC ontext = ( (BindingPr ovider) po rt).getReq uestContex t(); | |
| 62 | requestC ontext.put (BindingPr oviderProp erties.REQ UEST_TIMEO UT, proper tyLookup.g etProperty ("REQUEST_ TIMEOUT")) ; | |
| 63 | requestC ontext.put (BindingPr oviderProp erties.CON NECT_TIMEO UT, proper tyLookup.g etProperty ("CONNECT_ TIMEOUT")) ; | |
| 64 | ||
| 65 | Respondi ngGatewayP RPAIN20130 6UV02Respo nseType re sponse = p ort.respon dingGatewa yPRPAIN201 305UV02(re quest); | |
| 66 | ||
| 67 | ret = re sponse.get CommunityR esponse(). get(0).get PRPAIN2013 06UV02(); | |
| 68 | ||
| 69 | } catch (Mal formedURLE xception t ) { | |
| 70 | logger.e rror("Send ing reques t failed d ue to {}", t); | |
| 71 | } | |
| 72 | re turn ret; | |
| 73 | } | |
| 74 | ||
| 75 | privat e NhinTarg etCommunit iesType cr eateNhinTa rgetCommun ities(Stri ng homeCom munityId) { | |
| 76 | ||
| 77 | Ho meCommunit yType home Community = new Home CommunityT ype(); | |
| 78 | ho meCommunit y.setHomeC ommunityId (homeCommu nityId); | |
| 79 | ||
| 80 | Nh inTargetCo mmunityTyp e homeTarg etCommunit y = new Nh inTargetCo mmunityTyp e(); | |
| 81 | ho meTargetCo mmunity.se tHomeCommu nity(homeC ommunity); | |
| 82 | ||
| 83 | Nh inTargetCo mmunitiesT ype ret = new NhinTa rgetCommun itiesType( ); | |
| 84 | re t.getNhinT argetCommu nity().add (homeTarge tCommunity ); | |
| 85 | ||
| 86 | re turn ret; | |
| 87 | } | |
| 88 | ||
| 89 | privat e EntityPa tientDisco veryPortTy pe getPati entDiscove ryEntityPo rt() throw s Malforme dURLExcept ion { | |
| 90 | if (entityPa tientDisco very == nu ll) { | |
| 91 | entityPa tientDisco very = new EntityPat ientDiscov ery(new UR L(property Lookup.get Property(" PatientDis coveryProx yWSDL")), new QName( "urn:gov:h hs:fha:nhi nc:entityp atientdisc overy", "E ntityPatie ntDiscover y")); | |
| 92 | } | |
| 93 | ||
| 94 | re turn entit yPatientDi scovery.ge tEntityPat ientDiscov eryPortSoa p(); | |
| 95 | } | |
| 96 | ||
| 97 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.