Produced by Araxis Merge on 3/1/2018 12:13:14 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 | ehealth_xchange_cif.zip\NHIN_adapter\AdapterEJB\src\main\java\gov\va\med\nhin\adapter\adaptergateway\patientdiscovery | NhincProxyNHINPatientDiscoverySender.java | Thu Feb 22 14:26:24 2018 UTC |
| 2 | ehealth_xchange_cif.zip\NHIN_adapter\AdapterEJB\src\main\java\gov\va\med\nhin\adapter\adaptergateway\patientdiscovery | NhincProxyNHINPatientDiscoverySender.java | Tue Feb 27 14:24:08 2018 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 238 |
| 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.*; | |
| 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 .logging.E ventAuditi ngFactoryI mpl; | |
| 23 | import gov .va.med.nh in.adapter .logging.M essagingHe lper; | |
| 24 | import gov .va.med.nh in.adapter .logging.M essagingHe lper.Query Type; | |
| 25 | import gov .va.med.nh in.adapter .utils.soa p.handler. SOAPHandle rResolver; | |
| 26 | import gov .va.med.nh in.adapter .propertyl ookup.Prop ertyLookup ; | |
| 27 | import gov .va.med.nh in.adapter .propertyl ookup.Prop ertyLookup Local; | |
| 28 | import jav a.util.Map ; | |
| 29 | import jav ax.xml.ws. BindingPro vider; | |
| 30 | import org .hl7.fhir. dstu3.mode l.AuditEve nt; | |
| 31 | import org .slf4j.Log ger; | |
| 32 | import org .slf4j.Log gerFactory ; | |
| 33 | ||
| 34 | /** | |
| 35 | * | |
| 36 | * @author DN S VAZQUD | |
| 37 | */ | |
| 38 | @Transacti onAttribut e(value = Transactio nAttribute Type.SUPPO RTS) | |
| 39 | @Stateless (name = "N hincProxyN HINPatient DiscoveryS ender") | |
| 40 | public cla ss NhincPr oxyNHINPat ientDiscov erySender implements NHINPatie ntDiscover ySender | |
| 41 | { | |
| 42 | privat e static f inal Logge r logger = LoggerFac tory.getLo gger(Nhinc ProxyNHINP atientDisc overySende r.class.ge tName()); | |
| 43 | privat e Property Lookup pro pertyLooku p; | |
| 44 | privat e EntityPa tientDisco very entit yPatientDi scovery; | |
| 45 | ||
| 46 | @EJB(b eanInterfa ce = Prope rtyLookupL ocal.class , beanName = "Proper tyFileLook up") | |
| 47 | public void setP ropertyLoo kup(Proper tyLookup p ropertyLoo kup) | |
| 48 | { | |
| 49 | th is.propert yLookup = propertyLo okup; | |
| 50 | } | |
| 51 | ||
| 52 | @Overr ide | |
| 53 | public PRPAIN201 306UV02 se ndRequest( PRPAIN2013 05UV02 prp ain201305, Assertion Type asser tion, | |
| 54 | String rem oteHomeCom munityId, AuditEvent event) | |
| 55 | { | |
| 56 | lo gger.debug ("Entering NhincProx yNHINPatie ntDiscover ySender::s endRequest "); | |
| 57 | ||
| 58 | PR PAIN201306 UV02 ret = null; | |
| 59 | ||
| 60 | tr y { | |
| 61 | Respondi ngGatewayP RPAIN20130 5UV02Reque stType req uest = new Respondin gGatewayPR PAIN201305 UV02Reques tType(); | |
| 62 | ||
| 63 | request. setAsserti on(asserti on); | |
| 64 | request. setPRPAIN2 01305UV02( prpain2013 05); | |
| 65 | request. setNhinTar getCommuni ties(creat eNhinTarge tCommuniti es(remoteH omeCommuni tyId)); | |
| 66 | ||
| 67 | //change d on 02/01 /2017 (EHX -12) | |
| 68 | logger.d ebug("Impl ementing t imeout pro perties!") ; | |
| 69 | EntityPa tientDisco veryPortTy pe port = getPatient DiscoveryE ntityPort( ); | |
| 70 | Map<Stri ng, Object > requestC ontext = ( (BindingPr ovider)por t).getRequ estContext (); | |
| 71 | requestC ontext.put (BindingPr oviderProp erties.REQ UEST_TIMEO UT, Intege r.parseInt (propertyL ookup.getP roperty("R EQUEST_TIM EOUT"))); | |
| 72 | requestC ontext.put (BindingPr oviderProp erties.CON NECT_TIMEO UT, Intege r.parseInt (propertyL ookup.getP roperty("C ONNECT_TIM EOUT"))); | |
| 73 | ||
| 74 | Messagin gHelper<Au ditEvent> msg | |
| 75 | = EventAud itingFacto ryImpl.get Factory(Au ditEvent.c lass).mess aging(); | |
| 76 | if (null != event) { | |
| 77 | msg. addQuery(e vent, requ est, Respo ndingGatew ayPRPAIN20 1305UV02Re questType. class, | |
| 78 | Q ueryType.R EQUEST, nu ll); | |
| 79 | } | |
| 80 | ||
| 81 | Respondi ngGatewayP RPAIN20130 6UV02Respo nseType re sponse = p ort.respon dingGatewa yPRPAIN201 305UV02(re quest); | |
| 82 | if (null != event) { | |
| 83 | msg. addQuery(e vent, requ est, Respo ndingGatew ayPRPAIN20 1306UV02Re sponseType .class, | |
| 84 | Q ueryType.R ESPONSE, n ull); | |
| 85 | } | |
| 86 | ||
| 87 | ret = re sponse.get CommunityR esponse(). get(0).get PRPAIN2013 06UV02(); | |
| 88 | ||
| 89 | } | |
| 90 | ca tch (Malfo rmedURLExc eption t) { | |
| 91 | logger.e rror("Send ing reques t failed d ue to {}", t); | |
| 92 | } | |
| 93 | re turn ret; | |
| 94 | } | |
| 95 | ||
| 96 | privat e NhinTarg etCommunit iesType cr eateNhinTa rgetCommun ities(Stri ng homeCom munityId) | |
| 97 | { | |
| 98 | ||
| 99 | Ho meCommunit yType home Community = new Home CommunityT ype(); | |
| 100 | ho meCommunit y.setHomeC ommunityId (homeCommu nityId); | |
| 101 | ||
| 102 | Nh inTargetCo mmunityTyp e homeTarg etCommunit y = new Nh inTargetCo mmunityTyp e(); | |
| 103 | ho meTargetCo mmunity.se tHomeCommu nity(homeC ommunity); | |
| 104 | ||
| 105 | Nh inTargetCo mmunitiesT ype ret = new NhinTa rgetCommun itiesType( ); | |
| 106 | re t.getNhinT argetCommu nity().add (homeTarge tCommunity ); | |
| 107 | ||
| 108 | re turn ret; | |
| 109 | } | |
| 110 | ||
| 111 | privat e EntityPa tientDisco veryPortTy pe getPati entDiscove ryEntityPo rt() throw s Malforme dURLExcept ion | |
| 112 | { | |
| 113 | if (entityPa tientDisco very == nu ll) { | |
| 114 | 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")); | |
| 115 | entityPa tientDisco very.setHa ndlerResol ver(new SO APHandlerR esolver(tr ue)); | |
| 116 | } | |
| 117 | ||
| 118 | re turn entit yPatientDi scovery.ge tEntityPat ientDiscov eryPortSoa p(); | |
| 119 | } | |
| 120 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.