8. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 6/5/2018 10:24:07 AM 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.

8.1 Files compared

# Location File Last Modified
1 patch_205_build_9.zip\Java\AwivClientWebApp\main\src\java\gov\va\med\imaging\awiv\server\translator AwivClientTranslator.java Wed May 30 14:35:27 2018 UTC
2 patch_205_build_9.zip\Java\AwivClientWebApp\main\src\java\gov\va\med\imaging\awiv\server\translator AwivClientTranslator.java Thu May 31 21:29:56 2018 UTC

8.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 3 882
Changed 2 4
Inserted 0 0
Removed 0 0

8.3 Comparison options

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

8.4 Active regular expressions

No regular expressions were active.

8.5 Comparison detail

  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:     PI I
  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.awi v.server.t ranslator;
  27  
  28   import jav a.util.Arr ayList;
  29   import jav a.util.Cal endar;
  30   import jav a.util.Dat e;
  31   import jav a.util.Lis t;
  32   import jav a.util.Sor tedSet;
  33   import jav a.util.Tre eSet;
  34  
  35   import org .apache.lo gging.log4 j.LogManag er;
  36   import org .apache.lo gging.log4 j.Logger;
  37  
  38   import gov .va.med.SE RIALIZATIO N_FORMAT;
  39   import gov .va.med.We llKnownOID ;
  40   import gov .va.med.im aging.arti factsource .ResolvedA rtifactSou rce;
  41   import gov .va.med.im aging.awiv .business. AwivArtifa ctResults;
  42   import gov .va.med.im aging.awiv .business. AwivAuthen ticationSi tesInforma tion;
  43   import gov .va.med.im aging.awiv .business. AwivImage;
  44   import gov .va.med.im aging.awiv .business. AwivMeansT estResult;
  45   import gov .va.med.im aging.awiv .business. AwivPatien tSensitivi ty;
  46   import gov .va.med.im aging.awiv .business. AwivServer Informatio n;
  47   import gov .va.med.im aging.awiv .business. AwivSite;
  48   import gov .va.med.im aging.awiv .business. AwivStudy;
  49   import gov .va.med.im aging.awiv .business. AwivStudyD etails;
  50   import gov .va.med.im aging.awiv .business. AwivStudyS tatus;
  51   import gov .va.med.im aging.awiv .business. AwivWelcom eMessage;
  52   import gov .va.med.im aging.awiv .business. Patient;
  53   import gov .va.med.im aging.awiv .configura tion.AwivC lientConfi guration;
  54   import gov .va.med.im aging.core .interface s.exceptio ns.MethodE xception;
  55   import gov .va.med.im aging.exce ptions.URN FormatExce ption;
  56   import gov .va.med.im aging.exch ange.busin ess.Artifa ctResultEr ror;
  57   import gov .va.med.im aging.exch ange.busin ess.Artifa ctResultEr rorCompara tor;
  58   import gov .va.med.im aging.exch ange.busin ess.Artifa ctResults;
  59   import gov .va.med.im aging.exch ange.busin ess.Image;
  60   import gov .va.med.im aging.exch ange.busin ess.Patien tMeansTest Result;
  61   import gov .va.med.im aging.exch ange.busin ess.Patien tSensitive Value;
  62   import gov .va.med.im aging.exch ange.busin ess.Series ;
  63   import gov .va.med.im aging.exch ange.busin ess.Site;
  64   import gov .va.med.im aging.exch ange.busin ess.Study;
  65   import gov .va.med.im aging.exch ange.busin ess.StudyS etResult;
  66   import gov .va.med.im aging.exch ange.busin ess.Welcom eMessage;
  67   import gov .va.med.im aging.exch ange.busin ess.docume nts.Docume nt;
  68   import gov .va.med.im aging.exch ange.busin ess.docume nts.Docume ntSet;
  69   import gov .va.med.im aging.exch ange.busin ess.docume nts.Docume ntSetResul t;
  70   import gov .va.med.im aging.exch ange.busin ess.util.E xchangeUti l;
  71   import gov .va.med.im aging.exch ange.enums .ArtifactR esultError Code;
  72   import gov .va.med.im aging.exch ange.enums .ObjectSta tus;
  73   import gov .va.med.im aging.exch ange.enums .PatientSe nsitivityL evel;
  74   import gov .va.med.im aging.exch ange.enums .VistaImag eType;
  75   import gov .va.med.im aging.tran slator.Abs tractClini calTransla tor;
  76   import gov .va.med.im aging.webs ervices.cl inical.Abs tractClini calWebAppC onfigurati on;
  77  
  78   /**
  79    * Transla tor for co nverting V IX busines s objects  into AWIV  serializab le objects
  80    * 
  81    * @author   PI I
  82    *
  83    */
  84   public cla ss AwivCli entTransla tor
  85   extends Ab stractClin icalTransl ator
  86   {
  87           pr ivate fina l static L ogger logg er = LogMa nager.getL ogger(Awiv ClientTran slator.cla ss);
  88           pr otected st atic Logge r getLogge r()
  89           {
  90                    retu rn logger;
  91           }
  92           
  93           pu blic stati c AwivArti factResult s translat e(Artifact Results ar tifactResu lts) 
  94           th rows URNFo rmatExcept ion, Metho dException
  95           {
  96                    Awiv ArtifactRe sults resu lt = new A wivArtifac tResults() ;
  97                    List <AwivStudy > awivStud ies = new  ArrayList< AwivStudy> ();
  98                    
  99                    // f ix for TFS  #54876
  100                    if(a rtifactRes ults == nu ll)
  101                    {
  102                             getLog ger().warn ("Artifact Results is  null, thi s should n ot happen.  Returning  empty res ult with e rror.");
  103                             result .setAwivSt udies(new  AwivStudy[ 0]);
  104                             return  result;
  105                    }
  106                    
  107                    // f ix for TFS  #54876
  108                    if(a rtifactRes ults.getSt udySetResu lt() == nu ll && arti factResult s.getDocum entSetResu lt() == nu ll)
  109                    {
  110                             getLog ger().warn ("Both Stu dySetResul t and Docu mentSetRes ult of Art ifactResul ts are nul l, probabl y indicate s patient  not actual ly seen at  site. Ret urning emp ty result  without er ror.");
  111                             result .setAwivSt udies(new  AwivStudy[ 0]);
  112                             return  result;
  113                    }
  114                    
  115                    bool ean isPart ial = arti factResult s.isPartia lResult();
  116                    Stud ySetResult  studySetR esult = ar tifactResu lts.getStu dySetResul t();
  117                    bool ean gotARe sult = fal se;
  118                    Sort edSet<Arti factResult Error> err ors = 
  119                             new Tr eeSet<Arti factResult Error>(new  ArtifactR esultError Comparator ());
  120                    if(s tudySetRes ult != nul l)
  121                    {
  122                             if(stu dySetResul t.getArtif acts() !=  null)
  123                             {
  124                                      for(Stud y study :  studySetRe sult.getAr tifacts())
  125                                      {
  126                                               awivStudie s.add(tran slateStudy (study));
  127                                               gotAResult  = true;
  128                                      }
  129                             }
  130                             if(stu dySetResul t.getArtif actResultE rrors() !=  null)
  131                             {
  132                                      for(Arti factResult Error erro r : studyS etResult.g etArtifact ResultErro rs())
  133                                      {
  134                                               errors.add (error);
  135                                      }
  136                             }
  137                    }
  138                    Docu mentSetRes ult docume ntSetResul t = artifa ctResults. getDocumen tSetResult ();
  139                    if(d ocumentSet Result !=  null)
  140                    {
  141                             // thi s will onl y be popul ated if ge tting docu ments from  the DoD,  otherwise  VA documen ts 
  142                             // wil l be inclu ded in the  StudySetR esult
  143                             if(doc umentSetRe sult.getAr tifacts()  != null)
  144                             {
  145                                      for(Docu mentSet do cumentSet  : document SetResult. getArtifac ts())
  146                                      {
  147                                               awivStudie s.addAll(t ranslate(d ocumentSet ));
  148                                               gotAResult  = true;
  149                                      }
  150                             }
  151                             if(doc umentSetRe sult.getAr tifactResu ltErrors()  != null)
  152                             {
  153                                      for(Arti factResult Error erro r : docume ntSetResul t.getArtif actResultE rrors())
  154                                      {
  155                                               errors.add (error);
  156                                      }
  157                             }
  158                    }
  159                    Stri ngBuilder  partialRes ultErrorMe ssage = ne w StringBu ilder();
  160                    if(! gotAResult )
  161                    {
  162                             // if  no result  was includ ed, then s end an exc eption mes sage from  the error  code
  163                             if(err ors.size()  > 0)
  164                             {
  165                                      // takin g the high est priori ty error c ode to thr ow
  166                                      Artifact ResultErro r error =  errors.fir st();
  167                                      Artifact ResultErro rCode erro rCode = er ror.getErr orCode();
  168                                      if(error Code == Ar tifactResu ltErrorCod e.timeoutE xception)
  169                                               throw new  MethodExce ption("jav a.net.Sock etTimeoutE xception:  Read timed  out");
  170                                      else
  171                                              
  172                                               throw new  MethodExce ption(erro rCode.name () + ": "  + error.ge tCodeConte xt());
  173                             }                         
  174                    }
  175                    else
  176                    {
  177                             // got  a valid r esult but  want to in clude the  details of  the error  message
  178                             //if(( isPartial)  && ( erro rs.size()  > 0))
  179                             // JMW  5/23/2011  P104 - if  there are  any error s, include  them in t he error m essage
  180                             if(err ors.size()  > 0)
  181                             {
  182                                      partialR esultError Message.ap pend("Rece vieved '"  + errors.s ize() + "'  errors: " );
  183                                      for(Arti factResult Error erro r : errors )
  184                                      {                                           
  185                                               partialRes ultErrorMe ssage.appe nd(error.g etCodeCont ext());
  186                                               partialRes ultErrorMe ssage.appe nd("; ");
  187                                      }
  188                             }
  189                    }
  190                    
  191                    resu lt.setPart ialResult( isPartial) ;
  192                    resu lt.setPart ialResultM essage(par tialResult ErrorMessa ge.toStrin g());
  193                    resu lt.setAwiv Studies(aw ivStudies. toArray(ne w AwivStud y[result.s ize()]));
  194                    
  195                    retu rn result;
  196           }
  197           
  198           pr ivate stat ic AwivStu dy transla teStudy(
  199                             Study  study) 
  200           th rows URNFo rmatExcept ion 
  201           {
  202                    if(s tudy == nu ll)
  203                             return  null;
  204                    
  205                    Stri ng siteAbb r = study. getSiteAbb r();
  206                    if(E xchangeUti l.isSiteDO D(study.ge tSiteNumbe r()))
  207                    {
  208                             siteAb br = study .getSiteAb br()+ (stu dy.getSite Name() !=  null ? "-"  + study.g etSiteName () : "");                   
  209                    }
  210                    Stri ng studyCl ass = stud y.getStudy Class() ==  null ? ""  : study.g etStudyCla ss();
  211                    
  212                    
  213                    
  214                    Awiv Study resu lt = 
  215                             new Aw ivStudy(st udy.getStu dyUrn().to String(SER IALIZATION _FORMAT.CD TP), study .getSiteNu mber(), 
  216                                               study.getP atientId() , study.ge tPatientNa me(), stud y.getProce dure(), 
  217                                               study.getP rocedureDa te(), site Abbr, stud y.getImage Count(), s tudy.getDe scription( ), 
  218                                               study.getI magePackag e(), study Class, stu dy.getImag eType(), s tudy.getSp ecialty(),
  219                                               study.getF irstImage( ).getImage Urn().toSt ring(SERIA LIZATION_F ORMAT.CDTP ), false, 
  220                                               study.isSt udyImagesH aveAnnotat ions(), tr anslate(st udy.getStu dyViewStat us()),
  221                                               study.isSe nsitive(),  translate (study.get FirstImage ()));                   
  222                    retu rn result;
  223           }
  224           
  225           pr ivate stat ic AwivStu dyStatus t ranslate(O bjectStatu s objectSt atus)
  226           {
  227                    retu rn new Awi vStudyStat us(objectS tatus.getV alue(), ob jectStatus .getDescri ption());
  228           }
  229           
  230           pr ivate stat ic List<Aw ivStudy> t ranslate(D ocumentSet  documentS et)
  231           {
  232                    if(d ocumentSet  == null)
  233                             return  null;
  234                    
  235                    List <AwivStudy > result =  
  236                             new Ar rayList<Aw ivStudy>() ;
  237                    
  238                    for( Document d ocument :  documentSe t)
  239                    {
  240                             VistaI mageType v istaImageT ype = getI mageType(g etWebAppCo nfiguratio n(), docum ent);
  241                             if(vis taImageTyp e == null)
  242                             {
  243                                      vistaIma geType = V istaImageT ype.UNKNOW N_IMAGING_ TYPE;
  244                                      getLogge r().debug( "Document  with media  type '" +  document. getMediaTy pe() + "',  returning  VistaImag eType of ' " + vistaI mageType +  "' for Cl inical Dis play.");                                                 
  245                             }                
  246                             String  id = docu ment.getGl obalArtifa ctIdentifi er().toStr ing(SERIAL IZATION_FO RMAT.CDTP) ;
  247                             String  siteNumbe r = docume nt.getRepo sitoryId() ;
  248                             if((We llKnownOID .HAIMS_DOC UMENT.isAp plicable(d ocument.ge tGlobalArt ifactIdent ifier().ge tHomeCommu nityId())  || 
  249                                               (ncatRepos itoryId.eq uals(docum ent.getRep ositoryId( )))))
  250                             {
  251                                      siteNumb er = "200" ;
  252                             }
  253                             
  254                             String  procedure  = documen t.getName( );
  255                             String  descripti on = "";
  256                             if(vis taImageTyp e == Vista ImageType. NCAT)
  257                             {
  258                                      // NCAT  reports do n't have a  name valu e
  259                                      descript ion = "Neu rocognitiv e Assessme nt Tool";
  260                             }
  261                             AwivSt udy awivSt udy = new  AwivStudy( id, siteNu mber, docu mentSet.ge tPatientIc n(), 
  262                                               documentSe t.getPatie ntName(),  procedure,  
  263                                               documentSe t.getProce dureDate()  != null ?  documentS et.getProc edureDate( ) : docume nt.getCrea tionDate()
  264                                               "DoD", 1,  descriptio n, "", "",  "", "", i d, true, f alse, tran slate(Obje ctStatus.V IEWABLE),
  265                                               false, tra nslate(doc umentSet,  document,  vistaImage Type));
  266                             
  267                             result .add(awivS tudy);           
  268                    }
  269                    retu rn result;
  270           }
  271           
  272           pr ivate stat ic AwivIma ge transla te(Documen tSet docum entSet, 
  273                             Docume nt documen t, VistaIm ageType vi staImageTy pe)
  274           {
  275                    retu rn new Awi vImage(doc ument.getG lobalArtif actIdentif ier().toSt ring(SERIA LIZATION_F ORMAT.CDTP ),
  276                                      vistaIma geType.get ImageType( ), "", "") ;
  277           }
  278  
  279           pr ivate stat ic Abstrac tClinicalW ebAppConfi guration g etWebAppCo nfiguratio n()
  280           {
  281                    retu rn AwivCli entConfigu ration.get Configurat ion();
  282           }
  283           
  284           pu blic stati c AwivSite  [] transl atePatient SelectionS ites(List< ResolvedAr tifactSour ce> resolv edArtifact Sources)
  285           {
  286                    List <AwivSite>  result =  new ArrayL ist<AwivSi te>();
  287                    
  288                    for( ResolvedAr tifactSour ce resolve dArtifactS ource : re solvedArti factSource s)
  289                    {
  290                             if(res olvedArtif actSource. getArtifac tSource()  instanceof  Site)
  291                             {
  292                                      Site sit e = (Site) resolvedAr tifactSour ce.getArti factSource ();
  293                                      
  294                                      if(site. isSitePati entLookupa ble())
  295                                      {
  296                                               result.add (new AwivS ite(site.g etSiteName (), site.g etSiteNumb er()));
  297                                      }
  298                             }
  299                    }
  300                    retu rn result. toArray(ne w AwivSite [result.si ze()]);
  301           }
  302           
  303           pr ivate stat ic AwivSit e [] trans lateUserAu thenticati onSites(Li st<Resolve dArtifactS ource> res olvedArtif actSources )
  304           {
  305                    List <AwivSite>  result =  new ArrayL ist<AwivSi te>();
  306                    
  307                    for( ResolvedAr tifactSour ce resolve dArtifactS ource : re solvedArti factSource s)
  308                    {
  309                             if(res olvedArtif actSource. getArtifac tSource()  instanceof  Site)
  310                             {
  311                                      Site sit e = (Site) resolvedAr tifactSour ce.getArti factSource ();
  312                                      if(site. isSiteUser Authentica table())
  313                                      {
  314                                               result.add (new AwivS ite(site.g etSiteName (), site.g etSiteNumb er()));
  315                                      }
  316                             }
  317                    }
  318                    retu rn result. toArray(ne w AwivSite [result.si ze()]);
  319           }
  320           
  321           pu blic stati c AwivAuth entication SitesInfor mation tra nslate(Lis t<Resolved ArtifactSo urce> reso lvedArtifa ctSources,  
  322                             AwivCl ientConfig uration aw ivClientCo nfiguratio n, String  version)
  323           {
  324                    Awiv Site [] aw ivSites =  translateU serAuthent icationSit es(resolve dArtifactS ources);
  325                    Awiv ServerInfo rmation aw ivServerIn formation  = translat e(awivClie ntConfigur ation, ver sion);
  326                    
  327                    retu rn new Awi vAuthentic ationSites Informatio n(awivSite s, awivSer verInforma tion);
  328           }
  329           
  330           pu blic stati c AwivServ erInformat ion transl ate(AwivCl ientConfig uration aw ivClientCo nfiguratio n, String  version)
  331           {
  332                    int  idleTimeou tMinutes =  awivClien tConfigura tion.getId leTimeoutM inutes();
  333                    bool ean ieOnly  = awivCli entConfigu ration.isI eOnly();
  334                    bool ean checkM eansTest =  awivClien tConfigura tion.isChe ckMeansTes t();
  335                    retu rn new Awi vServerInf ormation(v ersion, id leTimeoutM inutes, ie Only, chec kMeansTest );
  336           }
  337           
  338           pu blic stati c Patient  [] transla tePatients (List<gov. va.med.ima ging.excha nge.busine ss.Patient > patients )
  339           {
  340                    Pati ent [] res ult = new  Patient[pa tients.siz e()];
  341                    for( int i = 0;  i < patie nts.size() ; i++)
  342                    {                         
  343                             gov.va .med.imagi ng.exchang e.business .Patient p atient = p atients.ge t(i);
  344                             result [i] = tran slate(pati ent);                           
  345                    }
  346                    retu rn result;
  347           }
  348           
  349           pu blic stati c Patient  translate( gov.va.med .imaging.e xchange.bu siness.Pat ient patie nt)
  350           {
  351                    if(p atient ==  null)
  352                             return  null;
  353                    Date  dob = pat ient.getDo b();
  354                    if(d ob.after(n ew Date()) )
  355                    {
  356                             getLog ger().debu g("DOB is  after toda y, subtrac ting 100 y ears from  DOB");
  357                             Calend ar dobCale ndar = Cal endar.getI nstance();
  358                             dobCal endar.setT ime(dob);
  359                             dobCal endar.add( Calendar.Y EAR, -100) ;
  360                             dob =  dobCalenda r.getTime( );
  361                    }
  362                    retu rn new Pat ient(patie nt.getPati entName(),  patient.g etPatientI cn(), 
  363                                      patient. getSsn(),  patient.ge tVeteranSt atus(), do b, patient .getSensit ive());
  364           }
  365           
  366           pu blic stati c AwivStud yDetails t ranslate(S tudy study )
  367           th rows URNFo rmatExcept ion
  368           {
  369                    if(s tudy == nu ll)
  370                             return  null;
  371                    
  372                    Awiv StudyDetai ls result  = new Awiv StudyDetai ls();
  373                    Awiv Study awiv Study = tr anslateStu dy(study);
  374                    
  375                    resu lt.setAwiv Study(awiv Study);
  376                    resu lt.setAwiv Images(tra nslateImag es(study)) ;
  377                    retu rn result;
  378           }
  379           
  380           pr ivate stat ic AwivIma ge[] trans lateImages (Study stu dy)
  381           {
  382                    List <AwivImage > result =  new Array List<AwivI mage>();
  383                    for( Series ser ies : stud y)
  384                    {
  385                             for(Im age image  : series)
  386                             {
  387                                      result.a dd(transla te(image)) ;
  388                             }
  389                    }
  390                    retu rn result. toArray(ne w AwivImag e[result.s ize()]);
  391           }
  392           
  393           pr ivate stat ic AwivIma ge transla te(Image i mage)
  394           {
  395                    if(i mage == nu ll)
  396                             return  null;
  397                    retu rn new Awi vImage(ima ge.getImag eUrn().toS tring(SERI ALIZATION_ FORMAT.CDT P),
  398                                      image.ge tImgType() , image.ge tAbsLocati on(), imag e.getFullL ocation()) ;
  399           }
  400           
  401           pu blic stati c AwivPati entSensiti vity trans late(Patie ntSensitiv eValue pat ientSensit ivityValue )
  402           {
  403                    int  code = pat ientSensit ivityValue .getSensit iveLevel() .getCode() ;
  404                    Stri ng warning Message =  translateN ewLinesToB reaks(pati entSensiti vityValue. getWarning Message()) ;
  405                    retu rn new Awi vPatientSe nsitivity( code, warn ingMessage );
  406           }
  407           
  408           pu blic stati c String t ranslateNe wLinesToBr eaks(Strin g msg)
  409           {
  410                    if(m sg == null )
  411                             return  "";
  412                    retu rn msg.rep lace(new S tring("\n" ), new Str ing("<br>" ));
  413           }
  414           
  415           pu blic stati c PatientS ensitivity Level tran slatePatie ntSensitiv eCode(int  code)
  416           {
  417                    retu rn Patient Sensitivit yLevel.get PatientSen sitivityLe vel(code);
  418           }
  419           
  420           pu blic stati c AwivWelc omeMessage  translate (WelcomeMe ssage welc omeMessage )
  421           {
  422                    if(w elcomeMess age == nul l)
  423                             return  null;
  424                    
  425                    Stri ng message  = welcome Message.ge tMessageTe xt();
  426                    mess age = mess age.replac e(new Stri ng("\n"),  new String ("<br>"));                  
  427                    
  428                    retu rn new Awi vWelcomeMe ssage(mess age);
  429           }
  430           
  431           pu blic stati c AwivMean sTestResul t translat e(PatientM eansTestRe sult patie ntMeansTes t)
  432           {
  433                    if(p atientMean sTest == n ull)
  434                             return  null;
  435                    Stri ng meansTe stMessage  = patientM eansTest.g etMessage( );
  436                    if(m eansTestMe ssage != n ull)
  437                    {
  438                             meansT estMessage  = meansTe stMessage. replace(ne w String(" \n"), new  String("<b r>"));
  439                    }
  440                    retu rn new Awi vMeansTest Result(pat ientMeansT est.getCod e(), 
  441                                      meansTes tMessage);
  442           }
  443   }