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\BaseWebFacade\main\src\java\gov\va\med\imaging\translator | AbstractClinicalTranslator.java | Thu Jun 29 17:22:10 2017 UTC |
| 2 | C:\AraxisMergeCompare\Pri_re\IV-ehmp_cif\BaseWebFacade\main\src\java\gov\va\med\imaging\translator | AbstractClinicalTranslator.java | Fri Jul 7 16:35:49 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 3 | 334 |
| 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: Jan 11, 2012 | |
| 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.i maging.tra nslator; | |
| 27 | ||
| 28 | import org .apache.lo g4j.Logger ; | |
| 29 | ||
| 30 | import gov .va.med.im aging.exch ange.busin ess.Image; | |
| 31 | import gov .va.med.im aging.exch ange.busin ess.docume nts.Docume nt; | |
| 32 | import gov .va.med.im aging.exch ange.enums .ImageQual ity; | |
| 33 | import gov .va.med.im aging.exch ange.enums .VistaImag eType; | |
| 34 | import gov .va.med.im aging.web. commands.A bstractWeb serviceCom mand; | |
| 35 | import gov .va.med.im aging.webs ervices.cl inical.Abs tractClini calWebAppC onfigurati on; | |
| 36 | import gov .va.med.im aging.webs ervices.cl inical.Cli nicalConte ntTypeConf ig; | |
| 37 | ||
| 38 | /** | |
| 39 | * @author
|
|
| 40 | * | |
| 41 | */ | |
| 42 | public abs tract clas s Abstract ClinicalTr anslator | |
| 43 | { | |
| 44 | pu blic final static St ring canne dDoDAbstra ct = ".\\B MP\\DOD_Do c.bmp"; | |
| 45 | pu blic final static St ring annot ationDateF ormat = "M MM dd, yyy y@kk:mm:ss "; | |
| 46 | ||
| 47 | pr otected fi nal static String nc atReposito ryId = "2. 16.840.1.1 13883.3.19 8.1"; | |
| 48 | ||
| 49 | pr otected fi nal static Logger lo gger = Log ger.getLog ger(Abstra ctClinical Translator .class); | |
| 50 | ||
| 51 | ||
| 52 | pr otected st atic Vista ImageType getImageTy pe(Abstrac tClinicalW ebAppConfi guration c onfigurati on, Docume nt documen t) | |
| 53 | { | |
| 54 | if(n catReposit oryId.equa ls(documen t.getRepos itoryId()) ) | |
| 55 | { | |
| 56 | return VistaImag eType.NCAT ; | |
| 57 | } | |
| 58 | ||
| 59 | Vist aImageType vistaImag eType = | |
| 60 | config uration.ge tVistaImag eType(docu ment.getMe diaType()) ; | |
| 61 | retu rn vistaIm ageType; | |
| 62 | ||
| 63 | } | |
| 64 | ||
| 65 | pr otected st atic Strin g getAbsUr i(Image im age, Strin g imageUrn , | |
| 66 | Abstra ctClinical WebAppConf iguration configurat ion) | |
| 67 | { | |
| 68 | if(( image.getA bsFilename () != null ) && (imag e.getAbsFi lename().s tartsWith( "-1"))) | |
| 69 | { | |
| 70 | return image.get AbsFilenam e(); | |
| 71 | } | |
| 72 | else | |
| 73 | { | |
| 74 | return "imageURN =" + image Urn + "&im ageQuality =20&conten tType=" + getContent Type(image , ImageQua lity.THUMB NAIL, conf iguration) ; | |
| 75 | } | |
| 76 | } | |
| 77 | ||
| 78 | pr otected st atic Strin g getFullU ri(Image i mage, Stri ng imageUr n, | |
| 79 | Abstra ctClinical WebAppConf iguration configurat ion) | |
| 80 | { | |
| 81 | bool ean isRadI mage = isR adImage(im age); | |
| 82 | if(( image.getF ullFilenam e() != nul l) && (ima ge.getFull Filename() .startsWit h("-1"))) | |
| 83 | { | |
| 84 | return image.get FullFilena me(); // p ut in erro r state | |
| 85 | } | |
| 86 | else | |
| 87 | { | |
| 88 | // if the image is not rad iology, th en this is a ref ima ge request , if not r ad image | |
| 89 | // the n ref loca tion is fo r the diag nostic ima ge. | |
| 90 | int im ageQuality = (isRadI mage ? Ima geQuality. REFERENCE. getCanonic al() : Ima geQuality. DIAGNOSTIC UNCOMPRESS ED.getCano nical()); | |
| 91 | return "imageURN =" + image Urn + "&im ageQuality =" + image Quality + "&contentT ype=" + ge tContentTy pe(image, | |
| 92 | ImageQuali ty.REFEREN CE, config uration); | |
| 93 | } | |
| 94 | } | |
| 95 | ||
| 96 | pr otected st atic Strin g getDiagU ri(Image i mage, Stri ng imageUr n, | |
| 97 | Abstra ctClinical WebAppConf iguration configurat ion) | |
| 98 | { | |
| 99 | bool ean isRadI mage = isR adImage(im age); | |
| 100 | if(i sRadImage) | |
| 101 | { | |
| 102 | if((im age.getBig Filename() != null) && (image. getBigFile name().sta rtsWith("- 1"))) | |
| 103 | { | |
| 104 | return i mage.getBi gFilename( ); | |
| 105 | } | |
| 106 | else | |
| 107 | { | |
| 108 | ||
| 109 | return " imageURN=" + imageUr n + "&imag eQuality=9 0&contentT ype=" + | |
| 110 | getContent Type(image , ImageQua lity.DIAGN OSTIC, con figuration ); | |
| 111 | } | |
| 112 | } | |
| 113 | else | |
| 114 | { | |
| 115 | return ""; | |
| 116 | } | |
| 117 | } | |
| 118 | ||
| 119 | pr otected st atic Strin g getConte ntType(Ima ge image, ImageQuali ty imageQu ality, | |
| 120 | Abstra ctClinical WebAppConf iguration configurat ion) | |
| 121 | { | |
| 122 | Stri ng content Type = ""; | |
| 123 | ||
| 124 | Clin icalConten tTypeConfi g config = getConten tTypeConfi g(image.ge tImgType() , | |
| 125 | imageQua lity, conf iguration) ; | |
| 126 | if(c onfig != n ull) | |
| 127 | conten tType = co nfig.getCo ntentType( ); | |
| 128 | ||
| 129 | if(c ontentType .length() > 0) | |
| 130 | { | |
| 131 | conten tType += " ,*/*"; | |
| 132 | } | |
| 133 | else | |
| 134 | { | |
| 135 | conten tType = "* /*"; | |
| 136 | } | |
| 137 | retu rn content Type; | |
| 138 | } | |
| 139 | ||
| 140 | pr ivate stat ic Clinica lContentTy peConfig g etContentT ypeConfig( int imageT ype, | |
| 141 | ImageQ uality ima geQuality, AbstractC linicalWeb AppConfigu ration con figuration ) | |
| 142 | { | |
| 143 | Vist aImageType vistaImag eType = ge tVistaImag eType(imag eType); | |
| 144 | if(v istaImageT ype == nul l) | |
| 145 | { | |
| 146 | return null; | |
| 147 | } | |
| 148 | retu rn configu ration.get ContentTyp eConfigura tion(vista ImageType, | |
| 149 | imageQua lity); | |
| 150 | } | |
| 151 | ||
| 152 | pr ivate stat ic VistaIm ageType ge tVistaImag eType(int imageType) | |
| 153 | { | |
| 154 | retu rn VistaIm ageType.va lueOfImage Type(image Type); | |
| 155 | } | |
| 156 | ||
| 157 | pr otected st atic boole an isRadIm age(Image image) | |
| 158 | { | |
| 159 | if(i mage == nu ll) | |
| 160 | return false; | |
| 161 | int imgType = image.getI mgType(); | |
| 162 | if(( imgType == VistaImag eType.DICO M.getImage Type()) || | |
| 163 | (imgType == VistaI mageType.X RAY.getIma geType())) | |
| 164 | { | |
| 165 | return true; | |
| 166 | } | |
| 167 | retu rn false; | |
| 168 | } | |
| 169 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.