36. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 8/31/2017 11:16:53 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.

36.1 Files compared

# Location File Last Modified
1 JLV_2.6.zip\JLV_2.6\JLV_2.6\Joint Legacy Viewer\jMeadows\src\main\java\gov\va\med\jmeadows\dataservicehandler VistaDataServiceHandler.java Thu Aug 31 12:13:08 2017 UTC
2 JLV_2.6.zip\JLV_2.6\JLV_2.6\Joint Legacy Viewer\jMeadows\src\main\java\gov\va\med\jmeadows\dataservicehandler VistaDataServiceHandler.java Thu Aug 31 13:29:03 2017 UTC

36.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 2 2188
Changed 1 2
Inserted 0 0
Removed 0 0

36.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

36.4 Active regular expressions

No regular expressions were active.

36.5 Comparison detail

  1   /**
  2    * Janus 4 .0 (c)
  3    * Copyrig ht (c) 201 1 Hawaii R esource Gr oup LLC. A ll Rights  Reserved.
  4    * Develop ed for the  Pacific T elehealth  & Technolo gy Hui and  the Pacif ic Joint I nformation  Technolog y Center
  5    * Contrib utors:
  6    *     Hon orable Sen ator Danie l K. Inouy e
  7    *     VA  Pacific Is lands Heal th Care Sy stem
  8    *     Tri pler Army  Medical Ce nter
  9    */
  10    
  11    
  12   package go v.va.med.j meadows.da taserviceh andler;
  13  
  14   import gov .va.med.jm eadows.com mon.JMeado wsExceptio n;
  15   import gov .va.med.vd s.webservi ce.*;
  16   import org .slf4j.Log ger;
  17   import org .slf4j.Log gerFactory ;
  18  
  19   import jav a.util.Arr ayList;
  20   import jav a.util.Lis t;
  21  
  22   import jav ax.xml.nam espace.QNa me;
  23   import jav ax.xml.ws. BindingPro vider;
  24   import jav ax.xml.ws. handler.Ha ndler;
  25  
  26  
  27   /**
  28    *
  29    * @author  vhahonbru nos
  30    */
  31   public cla ss VistaDa taServiceH andler ext ends DataS erviceHand ler {
  32       privat e VistaDat aService m _VistaData Service;
  33       privat e static f inal Logge r LOGGER =  LoggerFac tory.getLo gger(Vista DataServic eHandler.c lass);
  34  
  35       public  VistaData ServiceHan dler(Strin g url) {
  36           su per();
  37  
  38           se rviceURL =  url;
  39           se rviceName  = "VistaDa taService" ;
  40             serviceNam espace = " http://web service.vd s. URL         /";
  41           qS erviceName  = new QNa me(service Namespace,  serviceNa me);
  42  
  43       }
  44  
  45       privat e VistaDat a getVista DataPort()  {
  46  
  47           if  (m_VistaD ataService  == null)  {
  48                createSe rvice();
  49           }
  50  
  51           Vi staData po rt = m_Vis taDataServ ice.getVis taDataPort ();
  52  
  53           // set port e ndpoint ad dress
  54           Bi ndingProvi der prov =  (BindingP rovider) p ort;
  55           pr ov.getRequ estContext ().put(Bin dingProvid er.ENDPOIN T_ADDRESS_ PROPERTY,  serviceURL );
  56           pr ov.getRequ estContext ().put("co m.sun.xml. internal.w s.connect. timeout",  serviceCon nectionTim eoutMS);
  57           pr ov.getRequ estContext ().put("co m.sun.xml. internal.w s.request. timeout",  serviceReq uestTimeou tMS);
  58           pr ov.getRequ estContext ().put("co m.sun.xml. ws.connect .timeout",  serviceCo nnectionTi meoutMS);
  59           pr ov.getRequ estContext ().put("co m.sun.xml. ws.request .timeout",  serviceRe questTimeo utMS);
  60  
  61           //  SOAP mess age loggin g - Enable  to show l ogging in  output win dow
  62           if  ("test".e qualsIgnor eCase(APP_ CONFIG.get AppEnviron ment()) ||  "developm ent".equal sIgnoreCas e(APP_CONF IG.getAppE nvironment ()))
  63           {
  64                prov.get Binding(). getHandler Chain().ad d(new SOAP LoggingHan dler());
  65                List<Han dler> hand lerList =  prov.getBi nding().ge tHandlerCh ain();
  66                handlerL ist.add(ne w SOAPLogg ingHandler ());
  67                prov.get Binding(). setHandler Chain(hand lerList);
  68           }
  69  
  70           re turn port;
  71       }
  72  
  73       privat e synchron ized void  createServ ice() {
  74           if  (m_VistaD ataService  == null)  {
  75                try {
  76                    m_Vi staDataSer vice = new  VistaData Service();
  77                } catch  (Exception  e) {
  78                    logE rror(e);
  79                    thro w new Runt imeExcepti on(e);
  80                }
  81           }
  82       }
  83  
  84       public  User logi n(Site sit e, String  accessCode , String v erifyCode)  throws JM eadowsExce ption
  85       {        
  86           Us er user =  null;
  87  
  88           tr y {
  89                VistaDat a port = g etVistaDat aPort();
  90                user = p ort.login( site, acce ssCode, ve rifyCode);
  91           }  catch (Exc eption e)  {
  92                logError (e);
  93                throw ne w JMeadows Exception( e);
  94           }
  95  
  96           re turn user;
  97       }
  98  
  99       public  User logi nSaml(Site  site, Str ing samlTo ken) throw s JMeadows Exception
  100       {
  101           Us er user =  null;
  102  
  103           tr y {
  104                VistaDat a port = g etVistaDat aPort();
  105                user = p ort.loginS aml(site,  samlToken) ;
  106           }  catch (Exc eption e)  {
  107                logError (e);
  108                throw ne w JMeadows Exception( e);
  109           }
  110  
  111           re turn user;
  112       }
  113       
  114       public  Admission Detail get AdmissionD etails(Que ryBean que ryBean) th rows JMead owsExcepti on {
  115           Ad missionDet ail return Val = null ;
  116  
  117           tr y {
  118                VistaDat a port = g etVistaDat aPort();
  119                returnVa l = port.g etAdmissio nDetails(q ueryBean);
  120  
  121           }  catch (Exc eption e)  {
  122                logError (e);
  123                throw ne w JMeadows Exception( e);
  124           }
  125  
  126  
  127           re turn retur nVal;
  128       }
  129  
  130       public  Diagnosis [] getAdmi ssionDiagn osis(Query Bean query Bean) thro ws JMeadow sException  {
  131           Di agnosis[]  diagnosis  = null;
  132  
  133           tr y {
  134  
  135                VistaDat a port = g etVistaDat aPort();
  136                List<Dia gnosis> di ag = port. getAdmissi onDiagnosi s(queryBea n);
  137                diagnosi s = diag.t oArray(new  Diagnosis [diag.size ()]);
  138           }  catch (Exc eption e)  {
  139                logError (e);
  140                throw ne w JMeadows Exception( e);
  141           }
  142           re turn diagn osis;
  143  
  144       }
  145  
  146       public  Procedure [] getAdmi ssionProce dures(Quer yBean quer yBean) thr ows JMeado wsExceptio n {
  147           Pr ocedure[]  admissionP rocedures  = null;
  148  
  149           tr y {
  150                VistaDat a port = g etVistaDat aPort();
  151                List<Pro cedure> pr oc = port. getAdmissi onProcedur es(queryBe an);
  152                admissio nProcedure s = proc.t oArray(new  Procedure [proc.size ()]);
  153           }  catch (Exc eption e)  {
  154                logError (e);
  155                throw ne w JMeadows Exception( e);
  156           }
  157  
  158           re turn admis sionProced ures;
  159       }
  160  
  161       public  FreeTextR eport getC linicalRem inderDetai l(QueryBea n queryBea n) throws  JMeadowsEx ception {
  162           Fr eeTextRepo rt returnV al = null;
  163  
  164           tr y {
  165                VistaDat a port = g etVistaDat aPort();
  166                returnVa l = port.g etClinical ReminderDe tail(query Bean);
  167           }  catch (Exc eption e)  {
  168                logError (e);
  169                throw ne w JMeadows Exception( e);
  170           }
  171  
  172  
  173           re turn retur nVal;
  174  
  175       }
  176  
  177       public  List<Free TextReport > getConsu ltReport(Q ueryBean q ueryBean)  throws JMe adowsExcep tion {
  178           tr y {
  179                VistaDat a port = g etVistaDat aPort();
  180                return p ort.getCon sultReport (queryBean );
  181           }  catch (Exc eption e)  {
  182                throw ne w JMeadows Exception( e);
  183           }
  184       }
  185  
  186       public  FreeTextR eport getM edicationD etail(Quer yBean quer yBean) thr ows JMeado wsExceptio n {
  187           Fr eeTextRepo rt returnV al = null;
  188  
  189           tr y {
  190                VistaDat a port = g etVistaDat aPort();
  191                returnVa l = port.g etMedicati onDetail(q ueryBean);
  192           }  catch (Exc eption e)  {
  193                logError (e);
  194                throw ne w JMeadows Exception( e);
  195           }
  196  
  197           re turn retur nVal;
  198       }
  199  
  200       public  LabResult [] getLabO rderResult (QueryBean  queryBean ) throws J MeadowsExc eption {
  201           La bResult[]  orderResul t = null;
  202  
  203           tr y {
  204                VistaDat a port = g etVistaDat aPort();
  205                List<Lab Result> or es = port. getLabOrde rResult(qu eryBean);
  206                orderRes ult = ores .toArray(n ew LabResu lt[ores.si ze()]);
  207           }  catch (Exc eption e)  {
  208                logError (e);
  209                throw ne w JMeadows Exception( e);
  210           }
  211  
  212           re turn order Result;
  213       }
  214  
  215       public  FreeTextR eport getP atientLabR eport(Quer yBean quer yBean) thr ows JMeado wsExceptio n {
  216           Fr eeTextRepo rt report  = null;
  217  
  218           tr y {
  219                VistaDat a port = g etVistaDat aPort();
  220                report =  port.getP atientLabR eport(quer yBean);
  221           }  catch (Exc eption e)  {
  222                logError (e);
  223                throw ne w JMeadows Exception( e);
  224           }
  225  
  226           re turn repor t;
  227       }
  228  
  229       public  LabResult [] getPati entLabResu lts(QueryB ean queryB ean) throw s JMeadows Exception  {
  230           Li st<LabResu lt> labRes ults = nul l;
  231  
  232           tr y {
  233                VistaDat a port = g etVistaDat aPort();
  234                labResul ts = port. getPatient LabResults (queryBean );
  235           }  catch (Exc eption e)  {
  236                logError (e);
  237                throw ne w JMeadows Exception( e);
  238           }
  239  
  240           re turn labRe sults.toAr ray(new La bResult[la bResults.s ize()]);
  241       }
  242  
  243       public  FreeTextR eport getO rderDetail (QueryBean  queryBean ) throws J MeadowsExc eption
  244       {
  245           Fr eeTextRepo rt returnV al = null;
  246  
  247           tr y {
  248                VistaDat a port = g etVistaDat aPort();
  249                returnVa l = port.g etOrderDet ail(queryB ean);
  250           }  catch (Exc eption e)  {
  251                logError (e);
  252                throw ne w JMeadows Exception( e);
  253           }
  254  
  255           re turn retur nVal;
  256       }
  257  
  258       public  PatientAd mission[]  getPatient Admissions (QueryBean  queryBean ) throws J MeadowsExc eption {
  259           Pa tientAdmis sion[] pat Admissions  = null;
  260  
  261           tr y {
  262                VistaDat a port = g etVistaDat aPort();
  263                List<Pat ientAdmiss ion> adm =  port.getP atientAdmi ssions(que ryBean);
  264                patAdmis sions = ad m.toArray( new Patien tAdmission [adm.size( )]);
  265           }  catch (Exc eption e)  {
  266                logError (e);
  267                throw ne w JMeadows Exception( e);
  268           }
  269  
  270           re turn patAd missions;
  271       }
  272  
  273       /**
  274        * Ret rieves lis t of patie nt allergi es.
  275        * @pa ram queryB ean Query  parameters .
  276        *                    Requir ed params:  User, Pat ient
  277        * @re turn A lis t of patie nt allergi es.
  278        * @th rows JMead owsExcepti on if ther e was an e rror..
  279        */
  280       public  Allergy[]  getPatien tAllergies (QueryBean  queryBean ) throws J MeadowsExc eption {
  281           Al lergy[] al lergy = nu ll;
  282  
  283           tr y {
  284                VistaDat a port = g etVistaDat aPort();
  285                List<All ergy> algy  = port.ge tPatientAl lergies(qu eryBean);
  286                allergy  = algy.toA rray(new A llergy[alg y.size()]) ;
  287           }  catch (Exc eption e)  {
  288                logError (e);
  289                throw ne w JMeadows Exception( e);
  290           }
  291  
  292           re turn aller gy;
  293       }
  294  
  295       /**
  296        * Ret rieves det ails of an  allergy.
  297        * @pa ram queryB ean Query  parameters .
  298        *                    Requir ed params:  User, Pat ient, item Id, record Site
  299        * @re turn Aller gyDetail c ontaining  allergy re port text.
  300        * @th rows JMead owsExcepti on if ther e was an e rror..
  301        */
  302       public  AllergyDe tail getAl lergyDetai l(QueryBea n queryBea n) throws  JMeadowsEx ception {
  303           Al lergyDetai l allergyD etail = nu ll;
  304  
  305           tr y {
  306                VistaDat a port = g etVistaDat aPort();
  307                allergyD etail = po rt.getAlle rgyDetail( queryBean) ;
  308           }  catch (Exc eption e)  {
  309                logError (e);
  310                throw ne w JMeadows Exception( e);
  311           }
  312  
  313           re turn aller gyDetail;
  314       }
  315  
  316       public  PatientAp pointments [] getPati entAppoint ments(Quer yBean quer yBean) thr ows JMeado wsExceptio n {
  317           Pa tientAppoi ntments[]  appointmen ts = null;
  318  
  319           tr y {
  320                VistaDat a port = g etVistaDat aPort();
  321                List<Pat ientAppoin tments> ap ts = port. getPatient Appointmen ts(queryBe an);
  322                appointm ents = apt s.toArray( new Patien tAppointme nts[apts.s ize()]);
  323           }  catch (Exc eption e)  {
  324                logError (e);
  325                throw ne w JMeadows Exception( e);
  326           }
  327  
  328           re turn appoi ntments;
  329       }
  330  
  331       public  Encounter [] getPati entEncount ers(QueryB ean queryB ean) throw s JMeadows Exception  {
  332           En counter[]  encounters  = null;
  333  
  334           tr y {
  335                VistaDat a port = g etVistaDat aPort();
  336                List<Enc ounter> en c = port.g etPatientE ncounters( queryBean) ;
  337                encounte rs = enc.t oArray(new  Encounter [enc.size( )]);
  338           }  catch (Exc eption e)  {
  339                logError (e);
  340                throw ne w JMeadows Exception( e);
  341           }
  342  
  343           re turn encou nters;
  344       }
  345  
  346       public  FreeTextR eport getE ncountersR eport(Quer yBean quer yBean) thr ows JMeado wsExceptio n {
  347           Fr eeTextRepo rt returnV al = null;
  348  
  349           tr y {
  350                VistaDat a port = g etVistaDat aPort();
  351                returnVa l = port.g etEncounte rsReport(q ueryBean);
  352           }  catch (Exc eption e)  {
  353                throw ne w JMeadows Exception( e);
  354           }
  355  
  356           re turn retur nVal;
  357       }
  358  
  359       public  ClinicalR eminder[]  getPatient ClinicalRe minders(Qu eryBean qu eryBean) t hrows JMea dowsExcept ion {
  360           Cl inicalRemi nder[] rem inders = n ull;
  361  
  362           tr y {
  363                VistaDat a port = g etVistaDat aPort();
  364                List<Cli nicalRemin der> remin d = port.g etPatientC linicalRem inders(que ryBean);
  365                reminder s = remind .toArray(n ew Clinica lReminder[ remind.siz e()]);
  366           }  catch (Exc eption e)  {
  367                throw ne w JMeadows Exception( e);
  368           }
  369  
  370           re turn remin ders;
  371       }
  372  
  373   //    publ ic String  getPatient CodeGreen( QueryBean  queryBean)  throws JM eadowsExce ption {
  374   //         String ret urnVal = n ull;
  375   //
  376   //         try {
  377   //             VistaD ata port =  getVistaD ataPort();
  378   //             return Val = port .getPatien tCodeGreen (queryBean );
  379   //         } catch (E xception e ) {
  380   //             throw  new JMeado wsExceptio n(e);
  381   //         }
  382   //
  383   //         return ret urnVal;
  384   //    }
  385  
  386       public  Consult[]  getPatien tConsultRe quests(Que ryBean que ryBean) th rows JMead owsExcepti on {
  387           Co nsult[] co nsults = n ull;
  388  
  389           tr y {
  390                VistaDat a port = g etVistaDat aPort();
  391                List<Con sult> cons  = port.ge tPatientCo nsultReque sts(queryB ean);
  392                consults  = cons.to Array(new  Consult[co ns.size()] );
  393           }  catch (Exc eption e)  {
  394                logError (e);
  395                throw ne w JMeadows Exception( e);
  396           }
  397  
  398           re turn consu lts;
  399       }
  400  
  401       public  Vitals[]  getPatient CurrentVit als(QueryB ean queryB ean) throw s JMeadows Exception  {
  402           Vi tals[] vit als = null ;
  403  
  404           tr y {
  405                VistaDat a port = g etVistaDat aPort();
  406                List<Vit als> vit =  port.getP atientCurr entVitals( queryBean) ;
  407                vitals =  vit.toArr ay(new Vit als[vit.si ze()]);
  408           }  catch (Exc eption e)  {
  409                logError (e);
  410                throw ne w JMeadows Exception( e);
  411           }
  412  
  413           re turn vital s;
  414  
  415       }
  416  
  417       public  PatientDe mographics [] getPati entDemogra phics(Quer yBean quer yBean) thr ows JMeado wsExceptio n {
  418           Pa tientDemog raphics[]  returnVal  = null;
  419           tr y {
  420                VistaDat a port = g etVistaDat aPort();
  421                List<Pat ientDemogr aphics> de mo = port. getPatient Demographi cs(queryBe an);
  422                returnVa l = demo.t oArray(new  PatientDe mographics [demo.size ()]);
  423           }  catch (Exc eption e)  {
  424                throw ne w JMeadows Exception( e);
  425           }
  426  
  427           re turn retur nVal;
  428       }
  429  
  430       public  ProgressN ote[] getP atientDisc hargeSumma ries(Query Bean query Bean) thro ws JMeadow sException  {
  431           Pr ogressNote [] notes =  null;
  432  
  433           tr y {
  434                VistaDat a port = g etVistaDat aPort();
  435                List<Pro gressNote>  sum = por t.getPatie ntDischarg eSummaries (queryBean );
  436                notes =  sum.toArra y(new Prog ressNote[s um.size()] );
  437           }  catch (Exc eption e)  {
  438                throw ne w JMeadows Exception( e);
  439           }
  440  
  441           re turn notes ;
  442       }
  443  
  444       public  boolean i sSensitive Patient(Qu eryBean qu eryBean) t hrows JMea dowsExcept ion {
  445           tr y {
  446                VistaDat a port = g etVistaDat aPort();
  447                List<Ale rt> alerts  = port.ge tSensitive PatientAle rts(queryB ean);
  448                int oldA lertLevel  = -2;
  449                int newA lertLevel;
  450  
  451                for (Ale rt alert:  alerts) {
  452                    newA lertLevel  = Integer. parseInt(a lert.getAl ertId());
  453                    if ( newAlertLe vel > oldA lertLevel)  {
  454                         oldAlertLe vel = newA lertLevel;
  455                    }
  456                }
  457  
  458                if (oldA lertLevel  == -2) {
  459                    thro w new JMea dowsExcept ion("Unabl e to deter mine if pa tient has  sensitive  records.") ;
  460                }
  461  
  462                if (oldA lertLevel  > 0) {
  463                    retu rn true;
  464                } else {
  465                    retu rn false;
  466                }
  467  
  468           }  catch (Exc eption e)  {
  469                logError (e);
  470                throw ne w JMeadows Exception( e);
  471           }
  472       }
  473  
  474       public  List<Aler t> getSens itivePatie ntAlerts(Q ueryBean q ueryBean)  throws JMe adowsExcep tion {
  475           tr y {
  476                VistaDat a port = g etVistaDat aPort();
  477                return p ort.getSen sitivePati entAlerts( queryBean) ;
  478           }  catch (Exc eption e)  {
  479                logError (e);
  480                throw ne w JMeadows Exception( e);
  481           }
  482       }
  483  
  484       public  PatientDe mographics Detail[] g etPatientD emographic sDetail(Qu eryBean qu eryBean) t hrows JMea dowsExcept ion {
  485           Pa tientDemog raphicsDet ail[] retu rnVal = nu ll;
  486  
  487           tr y {
  488                VistaDat a port = g etVistaDat aPort();
  489                List<Pat ientDemogr aphicsDeta il> demo =  port.getP atientDemo graphicsDe tail(query Bean);
  490                returnVa l = demo.t oArray(new  PatientDe mographics Detail[dem o.size()]) ;
  491           }  catch (Exc eption e)  {
  492                logError (e);
  493                throw ne w JMeadows Exception( e);
  494           }
  495  
  496           re turn retur nVal;
  497       }
  498  
  499       public  Immunizat ion[] getP atientImmu nizations( QueryBean  queryBean)  throws JM eadowsExce ption {
  500           Im munization [] immuniz ation = nu ll;
  501           tr y {
  502                VistaDat a port = g etVistaDat aPort();
  503                List<Imm unization>  imm = por t.getPatie ntImmuniza tions(quer yBean);
  504                immuniza tion = imm .toArray(n ew Immuniz ation[imm. size()]);
  505           }  catch (Exc eption e)  {
  506                logError (e);
  507                throw ne w JMeadows Exception( e);
  508           }
  509  
  510           re turn immun ization;
  511       }
  512  
  513       public  LabOrder[ ] getPatie ntLabs(Que ryBean que ryBean) th rows JMead owsExcepti on {
  514           La bOrder[] o rders = nu ll;
  515           tr y {
  516                VistaDat a port = g etVistaDat aPort();
  517                List<Lab Order> ord  = port.ge tPatientLa bs(queryBe an);
  518                orders =  ord.toArr ay(new Lab Order[ord. size()]);
  519           }  catch (Exc eption e)  {
  520                logError (e);
  521                throw ne w JMeadows Exception( e);
  522           }
  523  
  524           re turn order s;
  525       }
  526  
  527       public  LabResult [] getPati entLabTest Results(Qu eryBean qu eryBean) t hrows JMea dowsExcept ion {
  528           La bResult[]  results =  null;
  529           tr y {
  530                VistaDat a port = g etVistaDat aPort();
  531                List<Lab Result> re s = port.g etPatientL abTestResu lts(queryB ean);
  532                results  = res.toAr ray(new La bResult[re s.size()]) ;
  533           }  catch (Exc eption e)  {
  534                logError (e);
  535                throw ne w JMeadows Exception( e);
  536           }
  537  
  538           re turn resul ts;
  539       }
  540  
  541       public  Medicatio n[] getPat ientMedica tions(Quer yBean quer yBean) thr ows JMeado wsExceptio n {
  542           Me dication[]  medicatio n = null;
  543           tr y {
  544                VistaDat a port = g etVistaDat aPort();
  545                List<Med ication> m eds = port .getPatien tMedicatio ns(queryBe an);
  546                medicati on = meds. toArray(ne w Medicati on[meds.si ze()]);
  547           }  catch (Exc eption e)  {
  548                logError (e);
  549                throw ne w JMeadows Exception( e);
  550           }
  551  
  552           re turn medic ation;
  553       }
  554  
  555   //    publ ic Medicat ion[] getP atientMedi cationsNVA (QueryBean  queryBean ) throws J MeadowsExc eption {
  556   //         Medication [] medicat ion = null ;
  557   //         try {
  558   //             VistaD ata port =  getVistaD ataPort();
  559   //             medica tion = por t.getPatie ntMedicati onsNVA(que ryBean).to Array(new  Medication [0]);
  560   //
  561   //         } catch (E xception e ) {
  562   //             throw  new JMeado wsExceptio n(e);
  563   //         }
  564   //
  565   //         return med ication;
  566   //
  567   //    }
  568  
  569       public  Order[] g etPatientO rders(Quer yBean quer yBean) thr ows JMeado wsExceptio n {
  570           Or der[] orde rs = null;
  571  
  572           tr y {
  573                VistaDat a port = g etVistaDat aPort();
  574                List<Ord er> ord =  port.getPa tientOrder s(queryBea n);
  575                orders =  ord.toArr ay(new Ord er[ord.siz e()]);
  576           }  catch (Exc eption e)  {
  577                logError (e);
  578                throw ne w JMeadows Exception( e);
  579           }
  580  
  581           re turn order s;
  582       }
  583  
  584       public  Problem[]  getPatien tProblemLi st(QueryBe an queryBe an) throws  JMeadowsE xception {
  585           Pr oblem[] pr oblems = n ull;
  586  
  587           tr y {
  588                VistaDat a port = g etVistaDat aPort();
  589                List<Pro blem> prob  = port.ge tPatientPr oblemList( queryBean) ;
  590                problems  = prob.to Array(new  Problem[pr ob.size()] );
  591           }  catch (Exc eption e)  {
  592                logError (e);
  593                throw ne w JMeadows Exception( e);
  594           }
  595  
  596           re turn probl ems;
  597       }
  598  
  599   //    publ ic Procedu re[] getPa tientProce dures(Quer yBean quer yBean) thr ows JMeado wsExceptio n {
  600   //         Procedure[ ] procedur e = null;
  601   //
  602   //         try {
  603   //             VistaD ata port =  getVistaD ataPort();
  604   //             proced ure = port .getPatien tProcedure s(queryBea n).toArray (new Proce dure[0]);
  605   //         } catch (E xception e ) {
  606   //             throw  new JMeado wsExceptio n(e);
  607   //         }
  608   //
  609   //         return pro cedure;
  610   //
  611   //    }
  612  
  613       public  ProgressN ote[] getP atientProg ressNotes( QueryBean  queryBean)  throws JM eadowsExce ption {
  614           Pr ogressNote [] notes =  null;
  615  
  616           tr y {
  617                VistaDat a port = g etVistaDat aPort();
  618                List<Pro gressNote>  note = po rt.getPati entProgres sNotes(que ryBean);
  619                notes =  note.toArr ay(new Pro gressNote[ note.size( )]);
  620           }  catch (Exc eption e)  {
  621                logError (e);
  622                throw ne w JMeadows Exception( e);
  623           }
  624  
  625           re turn notes ;
  626       }
  627  
  628       public  Radiology Report[] g etPatientR ads(QueryB ean queryB ean) throw s JMeadows Exception  {
  629           Ra diologyRep ort[] exam s = null;
  630  
  631           tr y {
  632                VistaDat a port = g etVistaDat aPort();
  633                List<Rad iologyRepo rt> rpt =  port.getPa tientRads( queryBean) ;
  634                exams =  rpt.toArra y(new Radi ologyRepor t[rpt.size ()]);
  635           }  catch (Exc eption e)  {
  636                throw ne w JMeadows Exception( e);
  637           }
  638  
  639           re turn exams ;
  640       }
  641  
  642       public  Vitals[]  getPatient Vitals(Que ryBean que ryBean) th rows JMead owsExcepti on {
  643           Vi tals[] vit als = null ;
  644  
  645           tr y {
  646                VistaDat a port = g etVistaDat aPort();
  647                List<Vit als> vit =  port.getP atientVita ls(queryBe an);
  648                vitals =  vit.toArr ay(new Vit als[vit.si ze()]);
  649           }  catch (Exc eption e)  {
  650                logError (e);
  651                throw ne w JMeadows Exception( e);
  652           }
  653  
  654           re turn vital s;
  655       }
  656  
  657   //    publ ic Prescri ption getP rescriptio nFills(Que ryBean que ryBean) th rows JMead owsExcepti on {
  658   //         Prescripti on returnV al = null;
  659   //
  660   //         try {
  661   //             VistaD ata port =  getVistaD ataPort();
  662   //             return Val = port .getPrescr iptionFill s(queryBea n);
  663   //         } catch (E xception e ) {
  664   //             throw  new JMeado wsExceptio n(e);
  665   //         }
  666   //
  667   //         return ret urnVal;
  668   //
  669   //    }
  670  
  671       public  ProblemDe tail getPr oblemDetai l(QueryBea n queryBea n) throws  JMeadowsEx ception {
  672           Pr oblemDetai l returnVa l = null;
  673  
  674           tr y {
  675                VistaDat a port = g etVistaDat aPort();
  676                returnVa l = port.g etProblemD etail(quer yBean);
  677           }  catch (Exc eption e)  {
  678                logError (e);
  679                throw ne w JMeadows Exception( e);
  680           }
  681  
  682           re turn retur nVal;
  683       }
  684  
  685       public  FreeTextR eport getP rogressNot e(QueryBea n queryBea n) throws  JMeadowsEx ception {
  686           Fr eeTextRepo rt returnV al = null;
  687  
  688           tr y {
  689                VistaDat a port = g etVistaDat aPort();
  690                returnVa l = port.g etProgress Note(query Bean);
  691           }  catch (Exc eption e)  {
  692                logError (e);
  693                throw ne w JMeadows Exception( e);
  694           }
  695  
  696           re turn retur nVal;
  697       }
  698  
  699       public  User getP roviderPro file(Site  site, Stri ng userIen , String p roviderNPI ) throws J MeadowsExc eption {
  700           Us er returnV al = null;
  701           tr y {
  702                VistaDat a port = g etVistaDat aPort();
  703                returnVa l = port.g etProvider Profile(si te, userIe n, provide rNPI);
  704           }  catch (Exc eption e)  {
  705                logError (e);
  706                throw ne w JMeadows Exception( e);
  707           }
  708  
  709           re turn retur nVal;
  710       }
  711  
  712       public  Radiology Report get RadiologyR eport(Quer yBean quer yBean) thr ows JMeado wsExceptio n {
  713           Ra diologyRep ort return Val = null ;
  714  
  715           tr y {
  716                VistaDat a port = g etVistaDat aPort();
  717                returnVa l = port.g etRadiolog yReport(qu eryBean);
  718           }  catch (Exc eption e)  {
  719                logError (e);
  720                throw ne w JMeadows Exception( e);
  721           }
  722  
  723           re turn retur nVal;
  724  
  725       }
  726  
  727       public  List<Aler t> getUser Alerts(Que ryBean que ryBean) th rows JMead owsExcepti on {
  728  
  729           tr y {
  730                VistaDat a port = g etVistaDat aPort();
  731                return p ort.getUse rAlerts(qu eryBean);
  732           }  catch (Exc eption e)  {
  733                logError (e);
  734                throw ne w JMeadows Exception( e);
  735           }
  736       }
  737  
  738       public  Diagnosis [] getVisi tDiagnosis (QueryBean  queryBean ) throws J MeadowsExc eption {
  739           Di agnosis[]  returnVal  = null;
  740           tr y {
  741                VistaDat a port = g etVistaDat aPort();
  742                List<Dia gnosis> di ag = port. getVisitDi agnosis(qu eryBean);
  743                returnVa l = diag.t oArray(new  Diagnosis [diag.size ()]);
  744           }  catch (Exc eption e)  {
  745                logError (e);
  746                throw ne w JMeadows Exception( e);
  747           }
  748  
  749           re turn retur nVal;
  750       }
  751  
  752       public  FreeTextR eport getV isitNotes( QueryBean  queryBean)  throws JM eadowsExce ption {
  753           Fr eeTextRepo rt returnV al = null;
  754  
  755           tr y {
  756                VistaDat a port = g etVistaDat aPort();
  757                returnVa l = port.g etVisitNot es(queryBe an);
  758           }  catch (Exc eption e)  {
  759                logError (e);
  760                throw ne w JMeadows Exception( e);
  761           }
  762  
  763           re turn retur nVal;
  764       }
  765  
  766       public  Procedure [] getVisi tProcedure s(QueryBea n queryBea n) throws  JMeadowsEx ception {
  767           Pr ocedure[]  returnVal  = null;
  768  
  769           tr y {
  770                VistaDat a port = g etVistaDat aPort();
  771                List<Pro cedure> pr oc = port. getVisitPr ocedures(q ueryBean);
  772                returnVa l = proc.t oArray(new  Procedure [proc.size ()]);
  773           }  catch (Exc eption e)  {
  774                logError (e);
  775                throw ne w JMeadows Exception( e);
  776           }
  777  
  778  
  779           re turn retur nVal;
  780       }
  781  
  782  
  783       public  List<Pati ent> looku pPatient(Q ueryBean q ueryBean)  throws JMe adowsExcep tion {
  784  
  785           tr y {
  786                VistaDat a port = g etVistaDat aPort();
  787                //return  a max of  100 patien ts
  788                queryBea n.setMax(1 00);
  789                return p ort.lookup Patient(qu eryBean);
  790           }  catch (Exc eption e)  {
  791                logError (e);
  792                throw ne w JMeadows Exception( e);
  793           }
  794       }
  795  
  796       public  boolean s electPatie nt(QueryBe an queryBe an) throws  JMeadowsE xception {
  797           bo olean retu rnVal = fa lse;
  798  
  799           tr y {
  800                VistaDat a port = g etVistaDat aPort();
  801                //return  a max of  100 patien ts
  802                queryBea n.setMax(1 00);
  803                returnVa l = port.s electPatie nt(queryBe an);
  804           }  catch (Exc eption e)  {
  805                logError (e);
  806                throw ne w JMeadows Exception( e);
  807           }
  808  
  809           re turn retur nVal;
  810  
  811       }
  812  
  813       public  ReferralB ean[] getD RReferrals (QueryBean  queryBean ) throws J MeadowsExc eption {
  814           Re ferralBean [] returnV al = null;
  815  
  816           tr y {
  817                VistaDat a port = g etVistaDat aPort();
  818                List<Ref erralBean>  ref = por t.getDRRef errals(que ryBean);
  819                returnVa l = ref.to Array(new  ReferralBe an[ref.siz e()]);
  820           }  catch (Exc eption e)  {
  821                logError (e);
  822                throw ne w JMeadows Exception( e);
  823           }
  824  
  825           re turn retur nVal;
  826       }
  827  
  828       public  PatientAd mission[]  getProvide rAdmission s(QueryBea n queryBea n) throws  JMeadowsEx ception {
  829           tr y {
  830                List<Pat ientAdmiss ion> admis sions = nu ll;
  831                VistaDat a port = g etVistaDat aPort();
  832                admissio ns = port. getProvide rAdmission s(queryBea n);
  833                return a dmissions. toArray(ne w PatientA dmission[a dmissions. size()]);
  834           }  catch (Exc eption e)  {
  835                logError (e);
  836                throw ne w JMeadows Exception( e);
  837           }
  838       }
  839  
  840       public  PatientAd mission[]  getWardAdm issions(Qu eryBean qu eryBean) t hrows JMea dowsExcept ion {
  841           tr y {
  842                List<Pat ientAdmiss ion> admis sions = nu ll;
  843                VistaDat a port = g etVistaDat aPort();
  844                admissio ns = port. getWardAdm issions(qu eryBean);
  845                return a dmissions. toArray(ne w PatientA dmission[a dmissions. size()]);
  846           }  catch (Exc eption e)  {
  847                throw ne w JMeadows Exception( e);
  848           }
  849       }
  850  
  851       public  PatientAp pointments [] getProv iderAppoin tments(Que ryBean que ryBean) th rows JMead owsExcepti on {
  852           tr y {
  853                List<Pat ientAppoin tments> ap pointments  = null;
  854                VistaDat a port = g etVistaDat aPort();
  855                appointm ents = por t.getProvi derAppoint ments(quer yBean);
  856                return a ppointment s.toArray( new Patien tAppointme nts[appoin tments.siz e()]);
  857           }  catch (Exc eption e)  {
  858                logError (e);
  859                throw ne w JMeadows Exception( e);
  860           }
  861       }
  862  
  863       public  ProgressN ote[] getP roviderUns ignedNotes (QueryBean  queryBean ) throws J MeadowsExc eption {
  864           tr y {
  865                List<Pro gressNote>  unsignedN otes = nul l;
  866                VistaDat a port = g etVistaDat aPort();
  867                unsigned Notes = po rt.getProv iderUnsign edNotes(qu eryBean);
  868                return u nsignedNot es.toArray (new Progr essNote[un signedNote s.size()]) ;
  869           }  catch (Exc eption e)  {
  870                throw ne w JMeadows Exception( e);
  871           }
  872       }
  873  
  874       public  Consult[]  getProvid erConsults Requested( QueryBean  queryBean)  throws JM eadowsExce ption {
  875           tr y {
  876                List<Con sult> cons ultsReques ted = null ;
  877                VistaDat a port = g etVistaDat aPort();
  878                consults Requested  = port.get ProviderCo nsultsRequ ested(quer yBean);
  879                return c onsultsReq uested.toA rray(new C onsult[con sultsReque sted.size( )]);
  880           }  catch (Exc eption e)  {
  881                logError (e);
  882                throw ne w JMeadows Exception( e);
  883           }
  884       }
  885  
  886       public  Consult[]  getProvid erConsults Received(Q ueryBean q ueryBean)  throws JMe adowsExcep tion {
  887           tr y {
  888                List<Con sult> cons ultsReceiv ed = null;
  889                VistaDat a port = g etVistaDat aPort();
  890                consults Received =  port.getP roviderCon sultsRecei ved(queryB ean);
  891                return c onsultsRec eived.toAr ray(new Co nsult[cons ultsReceiv ed.size()] );
  892           }  catch (Exc eption e)  {
  893                logError (e);
  894                throw ne w JMeadows Exception( e);
  895           }
  896       }
  897  
  898       public  Order[] g etProvider OrdersPend ing(QueryB ean queryB ean) throw s JMeadows Exception  {
  899           tr y {
  900                List<Ord er> orders  = null;
  901                VistaDat a port = g etVistaDat aPort();
  902                orders =  port.getP roviderOrd ersPending (queryBean );
  903                return o rders.toAr ray(new Or der[orders .size()]);
  904           }  catch (Exc eption e)  {
  905                logError (e);
  906                throw ne w JMeadows Exception( e);
  907           }
  908       }
  909  
  910       public  Order[] g etProvider OrdersResu lted(Query Bean query Bean) thro ws JMeadow sException  {
  911           tr y {
  912                List<Ord er> orders  = null;
  913                VistaDat a port = g etVistaDat aPort();
  914                orders =  port.getP roviderOrd ersResulte d(queryBea n);
  915                return o rders.toAr ray(new Or der[orders .size()]);
  916           }  catch (Exc eption e)  {
  917                logError (e);
  918                throw ne w JMeadows Exception( e);
  919           }
  920       }
  921  
  922       public  LabResult [] getProv iderLabAbn ormalResul ts(QueryBe an queryBe an) throws  JMeadowsE xception {
  923           tr y {
  924                List<Lab Result> la bResults =  null;
  925                VistaDat a port = g etVistaDat aPort();
  926                labResul ts = port. getProvide rLabAbnorm alResults( queryBean) ;
  927                return l abResults. toArray(ne w LabResul t[labResul ts.size()] );
  928           }  catch (Exc eption e)  {
  929                logError (e);
  930                throw ne w JMeadows Exception( e);
  931           }
  932       }
  933  
  934       public  Insurance Bean[] get PatientIns urances(Qu eryBean qu eryBean) t hrows JMea dowsExcept ion {
  935           In suranceBea n[] insura nces = nul l;
  936  
  937           tr y {
  938                VistaDat a port = g etVistaDat aPort();
  939                List<Ins uranceBean > ins = po rt.getPati entInsuran ce(queryBe an);
  940                insuranc es = ins.t oArray(new  Insurance Bean[ins.s ize()]);
  941           }  catch (Exc eption e)  {
  942                logError (e);
  943                throw ne w JMeadows Exception( e);
  944           }
  945  
  946           re turn insur ances;
  947       }
  948  
  949       public  Procedure [] getPati entProcedu res(QueryB ean queryB ean) throw s JMeadows Exception  {
  950           Pr ocedure[]  procedures  = null;
  951  
  952           tr y {
  953                VistaDat a port = g etVistaDat aPort();
  954                List<Pro cedure> pr oc = port. getPatient Procedures (queryBean );
  955                procedur es = proc. toArray(ne w Procedur e[proc.siz e()]);
  956           }  catch (Exc eption e)  {
  957                logError (e);
  958                throw ne w JMeadows Exception( e);
  959           }
  960  
  961           re turn proce dures;
  962       }
  963  
  964       public  StudyQuer y[] getVix StudyQuery FromSite(Q ueryBean q ueryBean)  throws JMe adowsExcep tion {
  965           St udyQuery[]  studyQuer ies = null ;
  966  
  967           tr y {
  968                VistaDat a port = g etVistaDat aPort();
  969                StudyQue ry studyQu ery = port .getVixStu dyQueryFro mSite(quer yBean);
  970  
  971                List<Stu dyQuery> l ist = new  ArrayList< StudyQuery >();
  972                list.add (studyQuer y);
  973  
  974                studyQue ries = lis t.toArray( new StudyQ uery[list. size()]);
  975           }
  976           ca tch (Excep tion e) {
  977                logError (e);
  978                throw ne w JMeadows Exception( e);
  979           }
  980  
  981           re turn study Queries;
  982       }
  983  
  984       public  StudyQuer y getVixSt udyQueryWi thDetails( QueryBean  queryBean)  throws JM eadowsExce ption {
  985           St udyQuery s tudyQuery;
  986  
  987           tr y {
  988                VistaDat a port = g etVistaDat aPort();
  989                studyQue ry = port. getVixStud yQueryWith Details(qu eryBean);
  990           }
  991           ca tch (Excep tion e) {
  992                logError (e);
  993                throw ne w JMeadows Exception( e);
  994           }
  995  
  996           re turn study Query;
  997       }
  998  
  999       public  StudyQuer y getVixSt udyQueryWi thoutDetai ls(QueryBe an queryBe an) throws  JMeadowsE xception
  1000       {
  1001           St udyQuery s tudyQuery;
  1002  
  1003           tr y {
  1004                VistaDat a port = g etVistaDat aPort();
  1005                studyQue ry = port. getVixStud yQueryWith outDetails (queryBean );
  1006           }
  1007           ca tch (Excep tion e) {
  1008                logError (e);
  1009                throw ne w JMeadows Exception( e);
  1010           }
  1011  
  1012           re turn study Query;
  1013       }
  1014  
  1015       public  StudyDeta il getVixS tudyDetail (QueryBean  queryBean ) throws J MeadowsExc eption
  1016       {
  1017           St udyDetail  studyDetai l;
  1018  
  1019           tr y {
  1020                VistaDat a port = g etVistaDat aPort();
  1021                studyDet ail = port .getVixStu dyDetail(q ueryBean);
  1022           }
  1023           ca tch (Excep tion e) {
  1024                logError (e);
  1025                throw ne w JMeadows Exception( e);
  1026           }
  1027  
  1028           re turn study Detail;
  1029       }
  1030  
  1031       public  String ge tVixStudyV iewerUrl(Q ueryBean q ueryBean)  throws JMe adowsExcep tion {
  1032           St ring viewe rUrl;
  1033  
  1034           tr y {
  1035                VistaDat a port = g etVistaDat aPort();
  1036                viewerUr l = port.g etVixStudy ViewerUrl( queryBean) ;
  1037           }
  1038           ca tch (Excep tion e) {
  1039                logError (e);
  1040                throw ne w JMeadows Exception( e);
  1041           }
  1042  
  1043           re turn viewe rUrl;
  1044       }
  1045  
  1046       public  HealthSum maryTypeLi st[] getPa tientHealt hSummaryTy pesList(Qu eryBean qu eryBean) t hrows JMea dowsExcept ion {
  1047           Li st<HealthS ummaryType List> list List = nul l;
  1048  
  1049           tr y {
  1050                VistaDat a port = g etVistaDat aPort();
  1051                listList  = port.ge tPatientHe althSummar yTypes(que ryBean);
  1052  
  1053           }  catch (Exc eption e)  {
  1054                logError (e);
  1055                throw ne w JMeadows Exception( e);
  1056           }
  1057  
  1058           re turn listL ist.toArra y(new Heal thSummaryT ypeList[li stList.siz e()]);
  1059       }
  1060  
  1061       public  FreeTextR eport getP atientHeal thSummary( QueryBean  queryBean)  throws JM eadowsExce ption {
  1062           Fr eeTextRepo rt returnV al = null;
  1063  
  1064           tr y {
  1065                VistaDat a port = g etVistaDat aPort();
  1066                returnVa l = port.g etPatientH ealthSumma ry(queryBe an);
  1067           }  catch (Exc eption e)  {
  1068                logError (e);
  1069                throw ne w JMeadows Exception( e);
  1070           }
  1071  
  1072  
  1073           re turn retur nVal;
  1074  
  1075       }
  1076       
  1077       public  List<Pce>  getPcesFo rNote(Quer yBean quer yBean) thr ows JMeado wsExceptio n {
  1078           Li st<Pce> pc es = null;
  1079           
  1080           tr y {
  1081                VistaDat a port = g etVistaDat aPort();
  1082                pces = p ort.getPce sForNote(q ueryBean);
  1083           }
  1084           ca tch (Excep tion e) {
  1085                    logE rror(e);
  1086                    thro w new JMea dowsExcept ion(e);
  1087           }
  1088           
  1089           re turn pces;
  1090       }
  1091       
  1092       privat e void log Error(Exce ption e){
  1093           LO GGER.error ("VistaDat aService E RROR: " +  e.getMessa ge(), e);
  1094       }
  1095   }