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