Downloads Documentation Community Contribute Demo






Show Sidebar
Login | Register
Show
Ignore:
Timestamp:
08/14/08 21:19:41 (5 months ago)
Author:
kevjay
Message:

logicws: Fixed bug where Obs cannot be extracted for some token Results.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • openmrs-modules/logicws/web/src/org/openmrs/module/logicws/web/StackedDataStyle.java

    r5220 r5284  
    199199                                    } else if (split 
    200200                                            .equals(OBSERVATIONLOCATION)) { 
    201                                         Obs obs = (Obs) resByPat.getValue() 
    202                                                 .get(i).getResultObject(); 
     201 
     202                                        Obs obs = null; 
     203                                        try { 
     204                                            obs = (Obs) resByPat.getValue() 
     205                                                    .get(i).getResultObject(); 
     206                                        } catch (ClassCastException e) { 
     207                                        } 
    203208 
    204209                                        if (obs != null) { 
     
    216221                                        } 
    217222                                    } else if (split.equals(ENCOUNTERDATE)) { 
    218                                         Obs obs = (Obs) resByPat.getValue() 
    219                                                 .get(i).getResultObject(); 
     223                                        Obs obs = null; 
     224                                        try { 
     225                                            obs = (Obs) resByPat.getValue() 
     226                                                    .get(i).getResultObject(); 
     227                                        } catch (ClassCastException e) { 
     228                                        } 
    220229 
    221230                                        if (obs != null) { 
     
    241250                                        } 
    242251                                    } else if (split.equals(ENCOUNTERTYPE)) { 
    243                                         Obs obs = (Obs) resByPat.getValue() 
    244                                                 .get(i).getResultObject(); 
     252                                        Obs obs = null; 
     253                                        try { 
     254                                            obs = (Obs) resByPat.getValue() 
     255                                                    .get(i).getResultObject(); 
     256                                        } catch (ClassCastException e) { 
     257                                        } 
    245258 
    246259                                        if (obs != null) { 
     
    310323                                    } 
    311324                                } else if (split.equals(OBSERVATIONLOCATION)) { 
    312                                     Obs obs = (Obs) resByPat.getValue() 
    313                                             .getResultObject(); 
     325 
     326                                    Obs obs = null; 
     327                                    try { 
     328                                        obs = (Obs) resByPat.getValue() 
     329                                                .getResultObject(); 
     330                                    } catch (ClassCastException e) { 
     331                                    } 
    314332 
    315333                                    if (obs != null) { 
     
    327345                                    } 
    328346                                } else if (split.equals(ENCOUNTERDATE)) { 
    329                                     Obs obs = (Obs) resByPat.getValue() 
    330                                             .getResultObject(); 
    331  
     347                                    Obs obs = null; 
     348                                    try { 
     349                                        obs = (Obs) resByPat.getValue() 
     350                                                .getResultObject(); 
     351                                    } catch (ClassCastException e) { 
     352                                    } 
    332353                                    if (obs != null) { 
    333354                                        out.print(START_VALUE_TAG 
     
    348369                                    } 
    349370                                } else if (split.equals(ENCOUNTERTYPE)) { 
    350                                     Obs obs = (Obs) resByPat.getValue() 
    351                                             .getResultObject(); 
    352  
     371                                    Obs obs = null; 
     372                                    try { 
     373                                        obs = (Obs) resByPat.getValue() 
     374                                                .getResultObject(); 
     375                                    } catch (ClassCastException e) { 
     376                                    } 
    353377                                    if (obs != null) { 
    354378                                        out.print(START_VALUE_TAG