Produced by Araxis Merge on 7/10/2017 1:01:42 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:\AraxisMergeCompare\Pri_un\IV-ehmp_cif\CoreValueObjects\main\src\java\gov\va\med\imaging\mix\business\fhir | DiagnosticReport.java | Thu Jun 29 17:22:22 2017 UTC |
| 2 | C:\AraxisMergeCompare\Pri_re\IV-ehmp_cif\CoreValueObjects\main\src\java\gov\va\med\imaging\mix\business\fhir | DiagnosticReport.java | Thu Jul 6 15:00:10 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 624 |
| 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.i maging.mix .business. fhir; | |
| 2 | ||
| 3 | import gov .va.med.im aging.mix. business.I magingStud yComparato r; | |
| 4 | ||
| 5 | import jav a.io.Seria lizable; | |
| 6 | import jav a.util.Ite rator; | |
| 7 | // import java.util. Date; | |
| 8 | import jav a.util.Sor tedSet; | |
| 9 | import jav a.util.Tre eSet; | |
| 10 | ||
| 11 | /** | |
| 12 | * @author DNS TITTOC | |
| 13 | * | |
| 14 | * This Di agnosticRe port class is for FH IR Diagnos ticReport model supp ort | |
| 15 | * Cardina lity: Pati ent 1..* D iagnosticR eport 0..* ImagingSt udy 0..* S eries 0..* Instance | |
| 16 | * | |
| 17 | */ | |
| 18 | public cla ss Diagnos ticReport implements Serializa ble, Itera ble<Imagin gStudy>, C omparable< Diagnostic Report> | |
| 19 | { | |
| 20 | pr ivate stat ic final l ong serial VersionUID = -518585 1367113539 915L; | |
| 21 | pr ivate Stri ng formatt edTextRepo rt; // The actua l report ( to/from Im agingStudy 's additio nal text e xtension e lement) -- never nul l or empty ! | |
| 22 | pr ivate Inte ger dRID; // D iagnostic Report ID -- if null from the enterprise , it will be a hashc ode of the full repo rt | |
| 23 | pr ivate Stri ng status= "final"; // R! regist ered | par tial | fin al | corre cted | app ended | ca ncelled | entered-in -error -- always fin al | |
| 24 | pr ivate Stri ng categor y; // S ervice cat egory –- “ radiology” , "ophthal mology", e tc. -- the proper di scipline t hat provid ed the rep ort | |
| 25 | pr ivate Stri ng code; // R ! Code|tex t for this diagnosti c report – CPT Or LO INC (by or der filler ) | |
| 26 | pr ivate Stri ng subject ; // R ! referenc e to the s ubject of the report -- in our use case the enterp rise’s pat ient ID | |
| 27 | pr ivate Stri ng encount er; // H ealth care event whe n test or dered (dat e-time) –- can be pr ovided (YY YYMMDD.HHM ISS), but not requir ed | |
| 28 | pr ivate Stri ng effecti veDateTime ; // when stud y was done & read (Y YYYMMDD.HH MISS) -- f or date ra nge the st art value | |
| 29 | pr ivate Stri ng issued; // R ! DateTim e (YYYYMMD D.HHMISS) the report was relea sed -- ask HAIMS! | |
| 30 | pr ivate Stri ng perform er; // R ! Respons ible Diagn ostic Serv ice – “rad iology”, e tc. -- mus t be ident ified! | |
| 31 | pr ivate Stri ng request ; // W hat was re quested –- not maint ained by i mage excha nge | |
| 32 | pr ivate Stri ng specime n; // S pecimens t his report is based on -- –- m ight be us ed for Pat hology –- not curren tly receiv ed | |
| 33 | privat e String r esult; // O bservation s - simple , or compl ex nested groups –- not mainta ined by im age exchan ge | |
| 34 | privat e String i mage=null; // Key image s associat ed with th is report {comment, link //R!} –- not ma intained f or image e xchange | |
| 35 | pr ivate Stri ng conclus ion; // C linical In terp. of t est result s – Concis e/clinical ly context ualized na rrative in terp. of t he Diag.Re port - ?? | |
| 36 | pr ivate Stri ng codedDi agnosis; // Codes for the concl usion –- n ot maintai ned by ima ge exchang e | |
| 37 | pr ivate Stri ng present edForm; // Entire re port as is sued (atta chment) -- not maint ained by i mage excha nge, see f ormattedTe xtReport f ield! | |
| 38 | pr ivate Inte ger number OfImagingS tudies; // read only field -- the Imagin gStudies S ET size | |
| 39 | pr ivate Sort edSet<Imag ingStudy> imagingStu dies = new TreeSet<I magingStud y>(new Ima gingStudyC omparator( )); | |
| 40 | ||
| 41 | /* * | |
| 42 | * Create a new Imagin gStudy | |
| 43 | * @param dT extReport The actual report fr om FHIR Im agingStudy 's additio nal text e xtension e lement; sh ould never be null | |
| 44 | * @param dR ID Diagnos tic Report ID -- aut o set repo rt hashcod e if null is given - - supposed to be loc alID from creator en terprise | |
| 45 | * @param dC ategory Se rvice cate gory –- “r adiology”, "ophthalm ology", et c. | |
| 46 | * @param dC ode Code|t ext For th is diagnos tic report – CPT Or LOINC (by order fill er) | |
| 47 | * @param dP atID Patie nt ID of s tudy creat or enterpr ise (ICN f or VA, EDI _PI for DO D) | |
| 48 | * @param dE nc Health care event when test ordered ( date-time) –- can be provided (YYYYMMDD. HHMISS), b ut not req uired | |
| 49 | * @param dE DT When st udy was do ne & read (YYYYMMDD. HHMISS) -- for date range the start valu e | |
| 50 | * @param dI ssued Date Time (YYYY MMDD.HHMIS S) the rep ort was re leased | |
| 51 | * @param dP erfr Respo nsible Dia gnostic Se rvice – “r adiology”, etc. | |
| 52 | * @param dR eq What wa s requeste d –- not m aintained by image e xchange | |
| 53 | * @param dS pecimen Sp ecimens th is report is based o n -- –- co uld be use d for Path ology | |
| 54 | * @param dR esult Obse rvations - simple, o r complex nested gro ups –- not maintaine d by image exchange | |
| 55 | * @param dC oncl Clini cal Interp . of test results – concise/cl inically c ontextuali zed narrat ive interp . of the D iag.Report | |
| 56 | * @param dC odeDiag Co des for th e conclusi on –- not maintained by image exchange | |
| 57 | * @param dP resForm at tachment i s not main tained by image exch ange, see formattedT extReport field! | |
| 58 | * / | |
| 59 | pu blic Diagn osticRepor t(String d TextReport , Integer dRID, Stri ng dCatego ry, String dCode, St ring dPatI D, String dEnc, Stri ng dEDT, S tring dIss ued, | |
| 60 | S tring dPer fr, String dReq, Str ing dSpeci men, Strin g dResult, String dC oncl, Stri ng dCodeDi ag, String dPresForm ) | |
| 61 | t hrows Exce ption | |
| 62 | { | |
| 63 | if ( (dTextRepo rt == null ) || dText Report.isE mpty()) { | |
| 64 | throw new Except ion("Forma tted Text Report can not be emp ty"); | |
| 65 | } | |
| 66 | if ( (dPatID == null) || dPatID.isE mpty()) { | |
| 67 | throw new Except ion("Repor t's subjec t(patientI D) cannot be empty") ; | |
| 68 | } | |
| 69 | this .formatted TextReport = dTextRe port; | |
| 70 | if ( this.dRID == null) { // set re port hashc ode here | |
| 71 | this.d RID= this. formattedT extReport. hashCode() ; | |
| 72 | } el se | |
| 73 | this.d RID = dRID ; | |
| 74 | this .status = "final"; / / hardcode d | |
| 75 | this .category = dCategor y; | |
| 76 | this .code = dC ode; | |
| 77 | this .subject = dPatID; | |
| 78 | this .encounter = dEnc; | |
| 79 | this .effective DateTime = dEDT; | |
| 80 | this .issued = dIssued; | |
| 81 | this .performer = dPerfr; | |
| 82 | this .request = dReq; | |
| 83 | this .specimen = dSpecime n; | |
| 84 | this .result = dResult; | |
| 85 | this .image = n ull; // ha rdcoded | |
| 86 | this .conclusio n = dConcl ; | |
| 87 | this .codedDiag nosis = dC odeDiag; | |
| 88 | this .presented Form = dPr esForm; | |
| 89 | } | |
| 90 | ||
| 91 | pu blic Strin g getForma ttedTextRe port() { | |
| 92 | retu rn formatt edTextRepo rt; | |
| 93 | } | |
| 94 | ||
| 95 | pu blic void setFormatt edTextRepo rt(String formattedT extReport) { | |
| 96 | this .formatted TextReport = formatt edTextRepo rt; | |
| 97 | } | |
| 98 | ||
| 99 | pu blic Integ er getdRID () { | |
| 100 | retu rn dRID; | |
| 101 | } | |
| 102 | ||
| 103 | pu blic void setdRID(In teger dRID ) { | |
| 104 | this .dRID = dR ID; | |
| 105 | } | |
| 106 | ||
| 107 | pu blic Strin g getStatu s() { | |
| 108 | retu rn status; | |
| 109 | } | |
| 110 | ||
| 111 | pu blic Strin g getCateg ory() { | |
| 112 | retu rn categor y; | |
| 113 | } | |
| 114 | ||
| 115 | pu blic void setCategor y(String c ategory) { | |
| 116 | this .category = category ; | |
| 117 | } | |
| 118 | ||
| 119 | pu blic Strin g getCode( ) { | |
| 120 | retu rn code; | |
| 121 | } | |
| 122 | ||
| 123 | pu blic void setCode(St ring code) { | |
| 124 | this .code = co de; | |
| 125 | } | |
| 126 | ||
| 127 | pu blic Strin g getSubje ct() { | |
| 128 | retu rn subject ; | |
| 129 | } | |
| 130 | ||
| 131 | pu blic void setSubject (String su bject) { | |
| 132 | this .subject = subject; | |
| 133 | } | |
| 134 | ||
| 135 | pu blic Strin g getEncou nter() { | |
| 136 | retu rn encount er; | |
| 137 | } | |
| 138 | ||
| 139 | pu blic void setEncount er(String encounter) { | |
| 140 | this .encounter = encount er; | |
| 141 | } | |
| 142 | ||
| 143 | pu blic Strin g getEffec tiveDateTi me() { | |
| 144 | retu rn effecti veDateTime ; | |
| 145 | } | |
| 146 | ||
| 147 | pu blic void setEffecti veDateTime (String ef fectiveDat eTime) { | |
| 148 | this .effective DateTime = effective DateTime; | |
| 149 | } | |
| 150 | ||
| 151 | pu blic Strin g getIssue d() { | |
| 152 | retu rn issued; | |
| 153 | } | |
| 154 | ||
| 155 | pu blic void setIssued( String iss ued) { | |
| 156 | this .issued = issued; | |
| 157 | } | |
| 158 | ||
| 159 | pu blic Strin g getPerfo rmer() { | |
| 160 | retu rn perform er; | |
| 161 | } | |
| 162 | ||
| 163 | pu blic void setPerform er(String performer) { | |
| 164 | this .performer = perform er; | |
| 165 | } | |
| 166 | ||
| 167 | pu blic Strin g getReque st() { | |
| 168 | retu rn request ; | |
| 169 | } | |
| 170 | ||
| 171 | pu blic void setRequest (String re quest) { | |
| 172 | this .request = request; | |
| 173 | } | |
| 174 | ||
| 175 | pu blic Strin g getSpeci men() { | |
| 176 | retu rn specime n; | |
| 177 | } | |
| 178 | ||
| 179 | pu blic void setSpecime n(String s pecimen) { | |
| 180 | this .specimen = specimen ; | |
| 181 | } | |
| 182 | ||
| 183 | pu blic Strin g getResul t() { | |
| 184 | retu rn result; | |
| 185 | } | |
| 186 | ||
| 187 | pu blic void setResult( String res ult) { | |
| 188 | this .result = result; | |
| 189 | } | |
| 190 | ||
| 191 | pu blic Strin g getImage () { | |
| 192 | retu rn image; | |
| 193 | } | |
| 194 | ||
| 195 | pu blic Strin g getConcl usion() { | |
| 196 | retu rn conclus ion; | |
| 197 | } | |
| 198 | ||
| 199 | pu blic void setConclus ion(String conclusio n) { | |
| 200 | this .conclusio n = conclu sion; | |
| 201 | } | |
| 202 | ||
| 203 | pu blic Strin g getCoded Diagnosis( ) { | |
| 204 | retu rn codedDi agnosis; | |
| 205 | } | |
| 206 | ||
| 207 | pu blic void setCodedDi agnosis(St ring coded Diagnosis) { | |
| 208 | this .codedDiag nosis = co dedDiagnos is; | |
| 209 | } | |
| 210 | ||
| 211 | pu blic Strin g getPrese ntedForm() { | |
| 212 | retu rn present edForm; | |
| 213 | } | |
| 214 | ||
| 215 | pu blic void setPresent edForm(Str ing presen tedForm) { | |
| 216 | this .presented Form = pre sentedForm ; | |
| 217 | } | |
| 218 | ||
| 219 | pu blic Integ er getNumb erOfImagin gStudies() { | |
| 220 | retu rn numberO fImagingSt udies; | |
| 221 | } | |
| 222 | ||
| 223 | pu blic Sorte dSet<Imagi ngStudy> g etImagingS tudies() { | |
| 224 | retu rn this.im agingStudi es; | |
| 225 | } | |
| 226 | ||
| 227 | pu blic void setImaging Studies(So rtedSet<Im agingStudy > imagingS tudies) { | |
| 228 | this .imagingSt udies = im agingStudi es; | |
| 229 | } | |
| 230 | ||
| 231 | /* * | |
| 232 | * Add an Im agingStudy to the Di agnosticRe port as a child; aut o incremen ts counter | |
| 233 | * @param im agingStudy as a sing le Imaging Study | |
| 234 | * / | |
| 235 | pu blic void addimaging Study(Imag ingStudy i magingStud y) | |
| 236 | { | |
| 237 | sync hronized(t his.imagin gStudies) | |
| 238 | { | |
| 239 | this.i magingStud ies.add(im agingStudy ); | |
| 240 | number OfImagingS tudies++; | |
| 241 | } | |
| 242 | } | |
| 243 | ||
| 244 | /* * | |
| 245 | * Add all o f the seri es in the given Set to the Stu dy as chil dren; auto increment s counter | |
| 246 | * @param im agingStudi es is a So rtedSet of ImagingSt udy | |
| 247 | * / | |
| 248 | pu blic void addimaging Studies(So rtedSet<Im agingStudy > imagingS tudies) | |
| 249 | { | |
| 250 | sync hronized(t his.imagin gStudies) | |
| 251 | { | |
| 252 | this.i magingStud ies.addAll (imagingSt udies); | |
| 253 | } | |
| 254 | } | |
| 255 | ||
| 256 | @O verride | |
| 257 | pu blic Itera tor<Imagin gStudy> it erator() | |
| 258 | { | |
| 259 | retu rn imaging Studies.it erator(); | |
| 260 | } | |
| 261 | ||
| 262 | ||
| 263 | ||
| 264 | /* (non-Java doc) | |
| 265 | * @see java .lang.Obje ct#toStrin g() | |
| 266 | * / | |
| 267 | @O verride | |
| 268 | pu blic Strin g toString () | |
| 269 | { | |
| 270 | retu rn "Report ID[" + thi s.dRID + " ] of patie nt[" + thi s.subject + "]; cate gory=" + t his.catego ry + "; Or der Date.T ime=" + th is.effecti veDateTime + | |
| 271 | "; Relea se Date.Ti me=" + thi s.issued + "; Conclu sion=" + t his.conclu sion + | |
| 272 | "#Imagin gStudies=" + this.nu mberOfImag ingStudies ; | |
| 273 | } | |
| 274 | ||
| 275 | @O verride | |
| 276 | pu blic int h ashCode() { | |
| 277 | fina l int prim e = 31; | |
| 278 | int result = 1 ; | |
| 279 | resu lt = prime * result | |
| 280 | + ((dRID == null) ? 0 : dRID .hashCode( )); | |
| 281 | resu lt = prime * result | |
| 282 | + ((subj ect == nul l) ? 0 : s ubject.has hCode()); | |
| 283 | retu rn result; | |
| 284 | } | |
| 285 | ||
| 286 | @O verride | |
| 287 | pu blic boole an equals( Object obj ) { | |
| 288 | if ( this == ob j) | |
| 289 | return true; | |
| 290 | if ( obj == nul l) | |
| 291 | return false; | |
| 292 | if ( getClass() != obj.ge tClass()) | |
| 293 | return false; | |
| 294 | fina l Diagnost icReport o ther = (Di agnosticRe port) obj; | |
| 295 | if ( dRID == nu ll) { | |
| 296 | if (ot her.dRID ! = null) | |
| 297 | return f alse; | |
| 298 | } el se if (!is sued.equal s(other.is sued)) | |
| 299 | return false; | |
| 300 | if ( subject == null) { | |
| 301 | if (ot her.subjec t != null) | |
| 302 | return f alse; | |
| 303 | } el se if (!su bject.equa ls(other.s ubject)) | |
| 304 | return false; | |
| 305 | retu rn true; | |
| 306 | } | |
| 307 | ||
| 308 | @O verride | |
| 309 | pu blic int c ompareTo(D iagnosticR eport that ) | |
| 310 | { | |
| 311 | retu rn (this.f ormattedTe xtReport.c ompareTo(t hat.format tedTextRep ort)); | |
| 312 | } | |
| 313 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.