Produced by Araxis Merge on 4/18/2019 5:55:29 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 | MCCF_EDI_TAS_TASCore v2.0_Build_10.zip\MCCF_EDI_TAS_SVC_FHIR_Services\VA-FHIR-Server\src\main\java\ca\uhn\mappings\healthCheck | MappingsHealthCheck.java | Wed Apr 3 02:27:52 2019 UTC |
2 | MCCF_EDI_TAS_TASCore v2.0_Build_10.zip\MCCF_EDI_TAS_SVC_FHIR_Services\VA-FHIR-Server\src\main\java\ca\uhn\mappings\healthCheck | MappingsHealthCheck.java | Mon Apr 15 17:44:24 2019 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Text Blocks | Lines | |
Unchanged | 2 | 236 |
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 ca .uhn.mappi ngs.health Check; | |
2 | ||
3 | import jav a.util.Dat e; | |
4 | ||
5 | import org .hl7.fhir. dstu3.mode l.Bundle; | |
6 | import org .hl7.fhir. dstu3.mode l.Bundle.B undleEntry Component; | |
7 | import org .hl7.fhir. dstu3.mode l.Codeable Concept; | |
8 | import org .hl7.fhir. dstu3.mode l.Coding; | |
9 | import org .hl7.fhir. dstu3.mode l.ContactP oint; | |
10 | import org .hl7.fhir. dstu3.mode l.Endpoint ; | |
11 | import org .hl7.fhir. dstu3.mode l.Endpoint .EndpointS tatus; | |
12 | import org .hl7.fhir. dstu3.mode l.Extensio n; | |
13 | import org .hl7.fhir. dstu3.mode l.Identifi er; | |
14 | import org .hl7.fhir. dstu3.mode l.Period; | |
15 | import org .hl7.fhir. dstu3.mode l.StringTy pe; | |
16 | ||
17 | import com .fasterxml .jackson.d atabind.no de.ArrayNo de; | |
18 | import ca. uhn.utilit ies.DateHe lper; | |
19 | ||
20 | public cla ss Mapping sHealthChe ck { | |
21 | ||
22 | ||
23 | pu blic Endpo int mapHea lthToFhir( ArrayNode responseVL ) { | |
24 | ||
25 | ||
26 | Endp oint hlthE P = new En dpoint(); | |
27 | ||
28 | Iden tifier id = new Iden tifier(); | |
29 | if ( responseVL != null & & response VL.get(0) != null && responseV L.get(0).g et("IEN"). asText() ! = null) { | |
30 | id.set Value(resp onseVL.get (0).get("I EN").asTex t()); | |
31 | hlthEP .setId(res ponseVL.ge t(0).get(" IEN").asTe xt()); | |
32 | ||
33 | } el se { | |
34 | id.set Value("1") ; | |
35 | hlthEP .setId("1" ); | |
36 | System .out.print ln("null") ; | |
37 | } | |
38 | ||
39 | id.s etSystem(" IEN"); | |
40 | hlth EP.addIden tifier(id) ; | |
41 | Codi ng conType = new Cod ing(); | |
42 | // / /This Conn ection Typ e info is not actual ly in the response | |
43 | conT ype.setCod e("hl7-fhi r-rest"); | |
44 | conT ype.setSys tem("http: //terminol ogy.hl7.or g/CodeSyst em/endpoin t-connecti on-type"); | |
45 | hlth EP.setConn ectionType (conType); | |
46 | if ( responseVL != null & & response VL.get(0) != null && responseV L.get(0).g et("STATUS ") != null | |
47 | && respo nseVL.get( 0).get("ST ATUS").asT ext() != n ull) { | |
48 | hlthEP .setStatus (EndpointS tatus.ACTI VE); | |
49 | } el se { | |
50 | hlthEP .setStatus (EndpointS tatus.ERRO R); | |
51 | } | |
52 | hlth EP.setName ("HEALTH") ; | |
53 | Code ableConcep t payloadT ype = new CodeableCo ncept(); | |
54 | Codi ng coding = new Codi ng(); | |
55 | codi ng.setCode ("SystemHe althCheck" ); | |
56 | codi ng.setSyst em("some V istA syste m being ev aluated"); | |
57 | payl oadType.ad dCoding(co ding); | |
58 | hlth EP.addPayl oadType(pa yloadType) ; | |
59 | hlthEP.set Address("h ttps:// DNS . URL "); | |
60 | Iden tifier id2 = new Ide ntifier(); | |
61 | if ( responseVL != null & & response VL.get(0) != null && responseV L.get(0).g et("BOX-VO LUME PAIR" ) != null | |
62 | && respo nseVL.get( 0).get("BO X-VOLUME P AIR").asTe xt() != nu ll) { | |
63 | id2.se tValue(res ponseVL.ge t(0).get(" BOX-VOLUME PAIR").as Text()); | |
64 | } | |
65 | id2. setSystem( "BOX-VOLUM E PAIR"); | |
66 | hlth EP.addIden tifier(id2 ); | |
67 | ||
68 | Iden tifier id3 = new Ide ntifier(); | |
69 | if ( responseVL != null & & response VL.get(0) != null && responseV L.get(0).g et("STATIO N") != nul l | |
70 | && respo nseVL.get( 0).get("ST ATION").as Text() != null) { | |
71 | id3.se tValue(res ponseVL.ge t(0).get(" STATION"). asText()); | |
72 | } | |
73 | id3. setSystem( "STATION") ; | |
74 | hlth EP.addIden tifier(id3 ); | |
75 | ||
76 | Exte nsion port = new Ext ension(); | |
77 | Stri ng portVal ue = new S tring(); | |
78 | if ( responseVL != null & & response VL.get(0) != null && responseV L.get(0).g et("PORT") != null | |
79 | && respo nseVL.get( 0).get("PO RT").asTex t() != nul l) { | |
80 | portVa lue = resp onseVL.get (0).get("P ORT").asTe xt(); | |
81 | port.s etValue(ne w StringTy pe(respons eVL.get(0) .get("PORT ").asText( ))); | |
82 | } | |
83 | port .setUrl("u rn:va:vist a:port"); | |
84 | hlth EP.addExte nsion(port ); | |
85 | Exte nsion asso ciatedConf ig = new E xtension() ; | |
86 | Stri ng assocCo nfigValue = new Stri ng(); | |
87 | if ( responseVL != null & & response VL.get(0) != null && responseV L.get(0).g et("ASSOCI ATED CONFI GURATION") != null | |
88 | && respo nseVL.get( 0).get("AS SOCIATED C ONFIGURATI ON").asTex t() != nul l) { | |
89 | assocC onfigValue = respons eVL.get(0) .get("ASSO CIATED CON FIGURATION ").toStrin g(); | |
90 | associ atedConfig .setValue( new String Type(respo nseVL.get( 0).get("AS SOCIATED C ONFIGURATI ON").asTex t())); | |
91 | associ atedConfig .setUrl("u rn:va:vist a:associat edConfigur ation"); | |
92 | } | |
93 | hlth EP.addExte nsion(asso ciatedConf ig); | |
94 | Cont actPoint c ont = new ContactPoi nt(); | |
95 | if ( responseVL != null & & response VL.get(0) != null && responseV L.get(0).g et("USER R ESPONSIBLE ") != null | |
96 | && respo nseVL.get( 0).get("US ER RESPONS IBLE").asT ext() != n ull) { | |
97 | cont.s etValue(re sponseVL.g et(0).get( "USER RESP ONSIBLE"). asText()); | |
98 | } | |
99 | hlth EP.addCont act(cont); | |
100 | Exte nsion targ et = new E xtension() ; | |
101 | Stri ng targetV alue = new String(); | |
102 | if ( responseVL != null & & response VL.get(0) != null && responseV L.get(0).g et("FILE") != null | |
103 | && respo nseVL.get( 0).get("FI LE").asTex t() != nul l) { | |
104 | target Value = re sponseVL.g et(0).get( "FILE").as Text(); | |
105 | target .setValue( new String Type(respo nseVL.get( 0).get("FI LE").asTex t())); | |
106 | } | |
107 | targ et.setUrl( "urn:va:vi sta:file") ; | |
108 | hlth EP.addExte nsion(targ et); | |
109 | Peri od pd = ne w Period() ; | |
110 | if ( responseVL != null & & response VL.get(0) != null && responseV L.get(0).g et("DATE/T IME OF LAS T STATUS") != null | |
111 | && respo nseVL.get( 0).get("DA TE/TIME OF LAST STAT US").asTex t() != nul l) { | |
112 | Date d ate = Date Helper.map VistaStrin gToDate(re sponseVL.g et(0).get( "DATE/TIME OF LAST S TATUS").as Text()); | |
113 | pd.set End(date); | |
114 | } | |
115 | hlth EP.setPeri od(pd); | |
116 | ||
117 | retu rn hlthEP; | |
118 | } | |
119 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.