296. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 4/5/2017 4:22:08 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.

296.1 Files compared

# Location File Last Modified
1 C:\working_scrub\Unredacted\eHX Code Base\eHX_Bld2_Source Code_CIF_2017-02-14\NHIN_adapter\SpecProcessor\src\test\resources\NewStyleSheets\nhin cda2detail.xsl Fri Feb 10 15:41:44 2017 UTC
2 eHX-CIF.zip\eHX-CIF\eHX Code Base\eHX_Bld2_Source Code_CIF_2017-02-14\NHIN_adapter\SpecProcessor\src\test\resources\NewStyleSheets\nhin cda2detail.xsl Mon Apr 3 14:39:44 2017 UTC

296.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 7 36688
Changed 6 12
Inserted 0 0
Removed 0 0

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

296.4 Active regular expressions

No regular expressions were active.

296.5 Comparison detail

  1   <?xml 
  2     version="1 .0" 
  3     encoding=" utf-8"
  4   ?>
  5   <xsl:style sheet 
  6     version="1 .0"
  7           
  8     xmlns:xsl= "http://ww w.w3.org/1 999/XSL/Tr ansform"
  9           
  10     xmlns:n3=" http://www .w3.org/19 99/xhtml"
  11           
  12     xmlns:n1=" urn:hl7-or g:v3"
  13           
  14     xmlns:n2=" urn:hl7-or g:v3/meta/ voc"
  15           
  16     xmlns:sdtc ="urn:hl7- org:sdtc"
  17           
  18     xmlns:voc= "urn:hl7-o rg:v3/voc"
  19           
  20     xmlns:xsi= "http://ww w.w3.org/2 001/XMLSch ema-instan ce"
  21           
  22     xmlns:sect ion="urn:g ov.va.med"
  23           
  24     xmlns:msxs l="urn:sch emas-micro soft-com:x slt"
  25   >
  26    
  27             
  28     <xsl:impor
  29      href="cda2 detailComm on.xslt"
  30     />
  31             
  32     <xsl:impor
  33      href="deta ilCommon.x sl"
  34     />
  35             
  36     <xsl:impor
  37      href="../c ommon.xsl"
  38     />
  39             
  40     <xsl:outpu
  41      method="ht ml" 
  42      indent="ye s" 
  43      version="4 .01" 
  44      encoding=" ISO-8859-1 "
  45     />
  46    
  47             
  48     <xsl:templ ate 
  49      name="disp laySource"
  50     >
  51                       
  52      <head>
  53                                 
  54       <link 
  55        type="text /css" 
  56        href="nhin .css" 
  57        rel="style sheet"
  58       />
  59      
  60                                 
  61       <h2 
  62        align="cen ter"
  63       >
  64                                           
  65        <xsl:call- template 
  66         name="docu mentTitle"
  67        >
  68                                                    
  69         <xsl:with- param 
  70          name="root
  71          select="."
  72         />
  73                                            
  74        </xsl:call -template>
  75                                  
  76       </h2>
  77                        
  78      </head>
  79              
  80     </xsl:temp late>
  81    
  82             
  83     <xsl:templ ate 
  84      name="disp layTitle"
  85     >
  86                       
  87      <div 
  88       style="tex t-align:ce nter;"
  89      >
  90                                 
  91       <span 
  92        style="fon t-size:lar ger;font-w eight:bold "
  93       >
  94                                           
  95        <xsl:value -of 
  96         select="n1 :code/@dis playName"
  97        />
  98                                  
  99       </span>
  100                        
  101      </div>
  102              
  103     </xsl:temp late>
  104    
  105             
  106     <xsl:templ ate 
  107      name="disp layReportD ates"
  108     >
  109                       
  110      <b>
  111                                 
  112       <xsl:text>
  113        Created On
  114       </xsl:text >
  115                        
  116      </b>
  117                       
  118      <xsl:call- template 
  119       name="getC reatedOnDa te"
  120      />
  121                       
  122      <xsl:if 
  123       test="n1:d ocumentati onOf/n1:se rviceEvent /n1:perfor mer/n1:eff ectiveTime /n1:low/@v alue"
  124      >
  125                                 
  126       <xsl:text 
  127        disable-ou tput-escap ing="yes"
  128       >
  129        &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
  130       </xsl:text >
  131                                 
  132       <b>
  133                                           
  134        <xsl:text>
  135         Date Range
  136        </xsl:text >
  137                                  
  138       </b>
  139                                 
  140       <xsl:choos e>
  141                                           
  142        <xsl:when 
  143         test="stri ng-length( n1:documen tationOf/n 1:serviceE vent/n1:pe rformer/n1 :effective Time/n1:lo w/@value)= 0"
  144        >
  145                                                    
  146         <xsl:call- template 
  147          name="na"
  148         />
  149                                            
  150        </xsl:when >
  151                                           
  152        <xsl:when 
  153         test="star ts-with(n1 :documenta tionOf/n1: serviceEve nt/n1:perf ormer/n1:e ffectiveTi me/n1:low/ @value,' ' )"
  154        >
  155                                                    
  156         <xsl:call- template 
  157          name="na"
  158         />
  159                                            
  160        </xsl:when >
  161                                           
  162        <xsl:other wise>
  163                                                    
  164         <xsl:call- template 
  165          name="form atDateLong "
  166         >
  167                                                              
  168          <xsl:with- param 
  169           name="date String" 
  170           select="n1 :documenta tionOf/n1: serviceEve nt/n1:perf ormer/n1:e ffectiveTi me/n1:low/ @value"
  171          />
  172                                                     
  173         </xsl:call -template>
  174                                            
  175        </xsl:othe rwise>
  176                                  
  177       </xsl:choo se>
  178                                 
  179       <b>
  180                                           
  181        <xsl:text 
  182         disable-ou tput-escap ing="yes"
  183        >
  184          - 
  185        </xsl:text >
  186                                  
  187       </b>
  188                                 
  189       <xsl:choos e>
  190                                           
  191        <xsl:when 
  192         test="stri ng-length( n1:documen tationOf/n 1:serviceE vent/n1:pe rformer/n1 :effective Time/n1:hi gh/@value) =0"
  193        >
  194                                                    
  195         <xsl:call- template 
  196          name="na"
  197         />
  198                                            
  199        </xsl:when >
  200                                           
  201        <xsl:when 
  202         test="star ts-with(n1 :documenta tionOf/n1: serviceEve nt/n1:perf ormer/n1:e ffectiveTi me/n1:high /@value,'  ')"
  203        >
  204                                                    
  205         <xsl:call- template 
  206          name="na"
  207         />
  208                                            
  209        </xsl:when >
  210                                           
  211        <xsl:other wise>
  212                                                    
  213         <xsl:call- template 
  214          name="form atDateLong "
  215         >
  216                                                              
  217          <xsl:with- param 
  218           name="date String" 
  219           select="n1 :documenta tionOf/n1: serviceEve nt/n1:perf ormer/n1:e ffectiveTi me/n1:high /@value"
  220          />
  221                                                     
  222         </xsl:call -template>
  223                                            
  224        </xsl:othe rwise>
  225                                  
  226       </xsl:choo se>
  227                        
  228      </xsl:if>
  229              
  230     </xsl:temp late>
  231    
  232             
  233     <xsl:templ ate 
  234      name="disp layPatient Block"
  235     >
  236                       
  237      <table 
  238       width='100 %' 
  239       class="fir st"
  240      >
  241                                 
  242       <xsl:varia ble 
  243        name="pati entRole" 
  244        select="n1 :recordTar get/n1:pat ientRole"
  245       />
  246                                 
  247       <tr>
  248                                           
  249        <td 
  250         width='15%
  251         valign="to p"
  252        >
  253                                                    
  254         <b>
  255                                                              
  256          <xsl:text>
  257           Patient: 
  258          </xsl:text >
  259                                                     
  260         </b>
  261                                            
  262        </td>
  263                                           
  264        <td 
  265         width='35%
  266         valign="to p"
  267        >
  268                                                    
  269         <xsl:choos e>
  270                                                              
  271          <xsl:when 
  272           test="$pat ientRole/n 1:patient/ n1:name[@u se='L']"
  273         
  274                                                                        
  275           <xsl:call- template 
  276            name="getN ame"
  277           >
  278                                                                                  
  279            <xsl:with- param 
  280             name="name
  281             select="$p atientRole /n1:patien t/n1:name[ @use='L']"
  282            />
  283                                                                         
  284           </xsl:call -template>
  285                                                               
  286          </xsl:when >
  287                                                              
  288          <xsl:other wise>
  289                                                                        
  290           <xsl:call- template 
  291            name="getN ame"
  292           >
  293                                                                                  
  294            <xsl:with- param 
  295             name="name
  296             select="$p atientRole /n1:patien t/n1:name"
  297            />
  298                                                                         
  299           </xsl:call -template>
  300                                                               
  301          </xsl:othe rwise>
  302                                                     
  303         </xsl:choo se>
  304                                                    
  305         <xsl:if 
  306          test="$pat ientRole/n 1:addr"
  307         >
  308                                                              
  309          <xsl:call- template 
  310           name="getA ddress"
  311          >
  312                                                                        
  313           <xsl:with- param 
  314            name="addr
  315            select="$p atientRole /n1:addr"
  316           />
  317                                                               
  318          </xsl:call -template>
  319                                                     
  320         </xsl:if>
  321                                                    
  322         <xsl:choos e>
  323                                                              
  324          <xsl:when 
  325           test="$pat ientRole/n 1:telecom/ @value"
  326          >
  327                                                                        
  328           <xsl:for-e ach 
  329            select="$p atientRole /n1:teleco m"
  330           >
  331                                                                                  
  332            <xsl:call- template 
  333             name="getT elecom"
  334            >
  335                                                                                            
  336             <xsl:with- param 
  337              name="tele com" 
  338              select="."
  339             />
  340                                                                                   
  341            </xsl:call -template>
  342                                                                         
  343           </xsl:for- each>
  344                                                               
  345          </xsl:when >
  346                                                              
  347          <xsl:other wise>
  348                                                                        
  349           <br/>
  350                                                                        
  351           <b>
  352                                                                                  
  353            <xsl:text>
  354             tel: 
  355            </xsl:text >
  356                                                                         
  357           </b>
  358                                                               
  359          </xsl:othe rwise>
  360                                                     
  361         </xsl:choo se>
  362                                            
  363        </td>
  364                                           
  365        <td 
  366         width='15%
  367         align='rig ht' 
  368         valign="to p"
  369        >
  370                                                    
  371         <b>
  372                                                              
  373          <xsl:text>
  374           Patient ID
  375          </xsl:text >
  376                                                     
  377         </b>
  378                                            
  379        </td>
  380                                           
  381        <td 
  382         width='35%
  383         valign="to p"
  384        >
  385                                                    
  386         <xsl:if 
  387          test="stri ng-length( $patientRo le/n1:id/@ extension) >0"
  388         >
  389                                                              
  390          <xsl:value -of 
  391           select="$p atientRole /n1:id/@ex tension"
  392          />
  393                                                     
  394         </xsl:if>
  395                                            
  396        </td>
  397                                  
  398       </tr>
  399      
  400                                 
  401       <!-- Alter native/For mer Names  -->
  402                                 
  403       <xsl:if 
  404        test="$pat ientRole/n 1:patient/ n1:name[@u se='P']"
  405       >
  406                                  
  407        <tr>
  408                                            
  409         <td 
  410          width='15%
  411          valign="to p"
  412         >
  413                                                     
  414          <b>
  415                                                               
  416           <xsl:text>
  417            Alias or F ormer Name s: 
  418           </xsl:text >
  419                                                      
  420          </b>
  421                                             
  422         </td>
  423                                            
  424         <td 
  425          width='35%
  426          valign="to p"
  427         >
  428                                                     
  429          <xsl:for-e ach 
  430           select="$p atientRole /n1:patien t/n1:name[ @use='P']"
  431          >
  432                                                               
  433           <xsl:call- template 
  434            name="getN ame"
  435           >
  436                                                                         
  437            <xsl:with- param 
  438             name="name
  439             select="."
  440            />
  441                                                                
  442           </xsl:call -template>
  443                                                               
  444           <br/>
  445                                                      
  446          </xsl:for- each>
  447                                             
  448         </td>
  449                                   
  450        </tr>
  451                                  
  452       </xsl:if>
  453                                 
  454                                 
  455       <tr>
  456                                           
  457        <td 
  458         width='15%
  459         valign="to p"
  460        >
  461                                                    
  462         <b>
  463                                                              
  464          <xsl:text>
  465           Birthdate:  
  466          </xsl:text >
  467                                                     
  468         </b>
  469                                            
  470        </td>
  471                                           
  472        <td 
  473         width='35%
  474         valign="to p"
  475        >
  476                                                    
  477         <xsl:call- template 
  478          name="form atDateLong "
  479         >
  480                                                              
  481          <xsl:with- param 
  482           name="date String" 
  483           select="$p atientRole /n1:patien t/n1:birth Time/@valu e"
  484          />
  485                                                     
  486         </xsl:call -template>
  487                                            
  488        </td>
  489                                           
  490        <td 
  491         width='15%
  492         align='rig ht' 
  493         valign="to p"
  494        >
  495                                                    
  496         <b>
  497                                                              
  498          <xsl:text>
  499           Sex: 
  500          </xsl:text >
  501                                                     
  502         </b>
  503                                            
  504        </td>
  505                                           
  506        <td 
  507         width='35%
  508         valign="to p"
  509        >
  510                                                    
  511         <xsl:call- template 
  512          name="getG enderStrin g"
  513         />
  514                                            
  515        </td>
  516                                  
  517       </tr>
  518      
  519                                 
  520       <tr>
  521                                           
  522        <td 
  523         width='15%
  524         valign="to p"
  525        >
  526                                                    
  527         <b>
  528                                                              
  529          <xsl:text>
  530           Birthplace
  531          </xsl:text >
  532                                                     
  533         </b>
  534                                            
  535        </td>
  536                                           
  537        <td 
  538         width='35%
  539         valign="to p"
  540        >
  541                                                    
  542         <xsl:if 
  543          test="$pat ientRole/n 1:patient/ n1:birthpl ace/n1:pla ce/n1:addr "
  544         >
  545                                                              
  546          <xsl:call- template 
  547           name="getA ddress"
  548          >
  549                                                                        
  550           <xsl:with- param 
  551            name="addr
  552            select="$p atientRole /n1:patien t/n1:birth place/n1:p lace/n1:ad dr"
  553           />
  554                                                               
  555          </xsl:call -template>
  556                                                     
  557         </xsl:if>
  558                                            
  559        </td>
  560                                           
  561        <td 
  562         width='15%
  563         align='rig ht' 
  564         valign="to p"
  565        >
  566                                                    
  567         <b>
  568                                                              
  569          <xsl:text>
  570           Marital St atus: 
  571          </xsl:text >
  572                                                     
  573         </b>
  574                                            
  575        </td>
  576                                           
  577        <td 
  578         width='35%
  579         valign="to p"
  580        >
  581                                                    
  582         <xsl:choos e>
  583                                                              
  584          <xsl:when 
  585           test="$pat ientRole/n 1:patient/ n1:marital StatusCode /@displayN ame"
  586          >
  587                                                                        
  588           <xsl:value -of 
  589            select="$p atientRole /n1:patien t/n1:marit alStatusCo de/@displa yName"
  590           />
  591                                                               
  592          </xsl:when >
  593                                                     
  594         </xsl:choo se>
  595                                            
  596        </td>
  597                                  
  598       </tr>
  599      
  600                                 
  601       <tr>
  602                                           
  603        <td 
  604         width='15%
  605         valign="to p"
  606        />
  607                                           
  608        <td 
  609         width='35%
  610         valign="to p"
  611        />
  612                                           
  613        <td 
  614         width='15%
  615         align='rig ht' 
  616         valign="to p"
  617        >
  618                                                    
  619         <b>
  620                                                              
  621          <xsl:text>
  622           Religious  Affiliatio n: 
  623          </xsl:text >
  624                                                     
  625         </b>
  626                                            
  627        </td>
  628                                           
  629        <td 
  630         width='35%
  631         valign="to p"
  632        >
  633                                                    
  634         <xsl:choos e>
  635                                                              
  636          <xsl:when 
  637           test="$pat ientRole/n 1:patient/ n1:religio usAffillia tionCode/@ displayNam e"
  638          >
  639                                                                        
  640           <xsl:value -of 
  641            select="$p atientRole /n1:patien t/n1:relig iousAffill iationCode /@displayN ame"
  642           />
  643                                                               
  644          </xsl:when >
  645                                                     
  646         </xsl:choo se>
  647                                            
  648        </td>
  649                                  
  650       </tr>
  651      
  652                                 
  653       <tr>
  654                                           
  655        <td 
  656         width='15%
  657         valign="to p"
  658        />
  659                                           
  660        <td 
  661         width='35%
  662         valign="to p"
  663        />
  664                                           
  665        <td 
  666         width='15%
  667         align='rig ht' 
  668         valign="to p"
  669        >
  670                                                    
  671         <b>
  672                                                              
  673          <xsl:text>
  674           Race: 
  675          </xsl:text >
  676                                                     
  677         </b>
  678                                            
  679        </td>
  680                                           
  681        <td 
  682         width='35%
  683         valign="to p"
  684        >
  685                                                    
  686         <xsl:for-e ach 
  687          select="$p atientRole /n1:patien t/n1:raceC ode"
  688         >
  689                                                              
  690          <xsl:choos e>
  691                                                                        
  692           <xsl:when 
  693            test="$pat ientRole/n 1:patient/ n1:raceCod e/@display Name"
  694           >
  695                                                                                  
  696            <xsl:value -of 
  697             select="$p atientRole /n1:patien t/n1:raceC ode/@displ ayName"
  698            />
  699                                                                                  
  700            <br/>
  701                                                                         
  702           </xsl:when >
  703                                                               
  704          </xsl:choo se>
  705                                                     
  706         </xsl:for- each>
  707                                            
  708        </td>
  709                                  
  710       </tr>
  711      
  712                                 
  713       <tr>
  714                                           
  715        <td 
  716         width='15%
  717         valign="to p"
  718        />
  719                                           
  720        <td 
  721         width='35%
  722         valign="to p"
  723        />
  724                                           
  725        <td 
  726         width='15%
  727         align='rig ht' 
  728         valign="to p"
  729        >
  730                                                    
  731         <b>
  732                                                              
  733          <xsl:text>
  734           Ethnicity:  
  735          </xsl:text >
  736                                                     
  737         </b>
  738                                            
  739        </td>
  740                                           
  741        <td 
  742         width='35%
  743         valign="to p"
  744        >
  745                                                    
  746         <xsl:choos e>
  747                                                              
  748          <xsl:when 
  749           test="$pat ientRole/n 1:patient/ n1:ethnicG roupCode/@ displayNam e"
  750          >
  751                                                                        
  752           <xsl:value -of 
  753            select="$p atientRole /n1:patien t/n1:ethni cGroupCode /@displayN ame"
  754           />
  755                                                               
  756          </xsl:when >
  757                                                     
  758         </xsl:choo se>
  759                                            
  760        </td>
  761                                  
  762       </tr>
  763      
  764                                 
  765       <xsl:varia ble 
  766        name="hasL anguages"
  767       >
  768                                           
  769        <xsl:call- template 
  770         name="isLa nguageFoun d"
  771        >
  772                                                    
  773         <xsl:with- param 
  774          name="pati entRole" 
  775          select="$p atientRole "
  776         />
  777                                            
  778        </xsl:call -template>
  779                                  
  780       </xsl:vari able>
  781                                 
  782       <tr>
  783                                           
  784        <td 
  785         width="15%
  786         valign="to p"
  787        >
  788                                                    
  789         <b>
  790                                                              
  791          <xsl:text>
  792           Language(s ):
  793          </xsl:text >
  794                                                     
  795         </b>
  796                                            
  797        </td>
  798                                           
  799        <td 
  800         width="35%
  801         valign="to p"
  802        >
  803                                            
  804         <xsl:choos e>
  805                                                     
  806          <xsl:when 
  807           test="$has Languages= 'true'"
  808          >
  809                                                               
  810           <xsl:call- template 
  811            name="disp layLanguag es"
  812           >
  813                                                                         
  814            <xsl:with- param 
  815             name="pati entRole" 
  816             select="$p atientRole "
  817            />
  818                                                                
  819           </xsl:call -template>
  820                                                      
  821          </xsl:when >
  822                                                     
  823          <xsl:other wise>
  824           <xsl:text>
  825            --
  826           </xsl:text >
  827          </xsl:othe rwise>
  828                                             
  829         </xsl:choo se>
  830                                            
  831        </td>
  832                                           
  833        <td 
  834         width="15%
  835         valign="to p"
  836        >
  837        </td>
  838                                           
  839        <td 
  840         width="35%
  841         valign="to p"
  842        >
  843        </td>
  844                                  
  845       </tr>
  846                        
  847      </table>
  848              
  849     </xsl:temp late>
  850    
  851             
  852     <xsl:templ ate 
  853      match="n1: languageCo de"
  854     >
  855                       
  856      <xsl:varia ble 
  857       name="code String"
  858      >
  859                                 
  860       <xsl:apply -templates  
  861        select="."  
  862        mode="data "
  863       />
  864                        
  865      </xsl:vari able>
  866                       
  867      <xsl:if 
  868       test="stri ng-length( normalize- space($cod eString))> 0"
  869      >
  870                                 
  871       <li>
  872                                           
  873        <xsl:value -of 
  874         select="$c odeString"
  875        />
  876                                  
  877       </li>
  878                        
  879      </xsl:if>
  880              
  881     </xsl:temp late>
  882             
  883             
  884     <xsl:templ ate 
  885      name="disp layAuthorB lock"
  886     >
  887                       
  888      <br/>
  889                       
  890      <table 
  891       width='100 %' 
  892       class="fir st"
  893      >
  894                                 
  895       <tr>
  896                                           
  897        <td 
  898         width="15%
  899         valign="to p"
  900        >
  901                                                    
  902         <b>
  903                                                              
  904          <xsl:text>
  905           Authoring  Date: 
  906          </xsl:text >
  907                                                     
  908         </b>
  909                                            
  910        </td>
  911                                           
  912        <td 
  913         width="35%
  914         valign="to p"
  915        >
  916                                                    
  917         <xsl:varia ble 
  918          name="date String"
  919         >
  920                                                              
  921          <xsl:choos e>
  922                                                                        
  923           <xsl:when 
  924            test="stri ng-length( ./n1:autho r/n1:time/ @value)>0"
  925          
  926                                                                                  
  927            <xsl:value -of 
  928             select="./ n1:author/ n1:time/@v alue"
  929            />
  930                                                                         
  931           </xsl:when >
  932                                                                        
  933           <xsl:when 
  934            test="stri ng-length( ./n1:autho r/n1:time/ n1:low/@va lue)>0"
  935          
  936                                                                                  
  937            <xsl:value -of 
  938             select="./ n1:author/ n1:time/n1 :low/@valu e"
  939            />
  940                                                                         
  941           </xsl:when >
  942                                                                        
  943           <xsl:when 
  944            test="stri ng-length( ./n1:autho r/n1:time/ n1:high/@v alue)>0"
  945          
  946                                                                                  
  947            <xsl:value -of 
  948             select="./ n1:author/ n1:time/n1 :high/@val ue"
  949            />
  950                                                                         
  951           </xsl:when >
  952                                                               
  953          </xsl:choo se>
  954                                                     
  955         </xsl:vari able>
  956                                                    
  957         <xsl:call- template 
  958          name="form atDateShor t"
  959         >
  960                                                              
  961          <xsl:with- param 
  962           name="date String" 
  963           select="$d ateString"
  964          />
  965                                                     
  966         </xsl:call -template>  
  967                                            
  968        </td>
  969                                  
  970       </tr>
  971                                 
  972       <xsl:for-e ach 
  973        select="n1 :author"
  974       >
  975                                  
  976        <tr>
  977                                            
  978         <td 
  979          width="15%
  980          valign="to p"
  981         >
  982                                                     
  983          <b>
  984                                                               
  985           <xsl:text>
  986            Authoring  Source: 
  987           </xsl:text >
  988                                                      
  989          </b>
  990                                             
  991         </td>
  992                                            
  993         <td 
  994          width="35%
  995          valign="to p"
  996         >
  997                                                     
  998                                                     
  999          <!--<b><xs l:text>Ass igned Auth or</xsl:te xt></b><br />-->
  1000                                                     
  1001          <xsl:varia ble 
  1002           name="auth orName"
  1003          >
  1004                                                               
  1005           <xsl:call- template 
  1006            name="getN ame"
  1007           >
  1008                                                                         
  1009            <xsl:with- param 
  1010             name="name
  1011             select="./ n1:assigne dAuthor/n1 :assignedP erson/n1:n ame"
  1012            />
  1013                                                                
  1014           </xsl:call -template>
  1015                                                      
  1016          </xsl:vari able>
  1017                                                     
  1018          <xsl:choos e>
  1019                                                               
  1020           <xsl:when 
  1021            test="$aut horName=''  or string -length($a uthorName) =0"
  1022           >
  1023                                                                         
  1024            <b>
  1025             <xsl:text>
  1026              Author Nam e not give n
  1027             </xsl:text >
  1028            </b> 
  1029                                                                
  1030           </xsl:when >
  1031                                                               
  1032           <xsl:other wise>
  1033                                                                         
  1034            <xsl:value -of 
  1035             select="$a uthorName"
  1036            />
  1037                                                                
  1038           </xsl:othe rwise>
  1039                                                      
  1040          </xsl:choo se>
  1041                                                     
  1042                                                     
  1043          <xsl:if 
  1044           test="./n1 :assignedA uthor/n1:a ddr"
  1045          >
  1046                                                               
  1047           <xsl:call- template 
  1048            name="getA ddress"
  1049           >
  1050                                                                         
  1051            <xsl:with- param 
  1052             name="addr
  1053             select="./ n1:assigne dAuthor/n1 :addr"
  1054            />
  1055                                                                
  1056           </xsl:call -template>
  1057                                                      
  1058          </xsl:if>
  1059                                                     
  1060          <xsl:choos e>
  1061                                                               
  1062           <xsl:when 
  1063            test="./n1 :assignedA uthor/n1:t elecom"
  1064           >
  1065                                                                         
  1066            <xsl:for-e ach 
  1067             select="./ n1:assigne dAuthor/n1 :telecom"
  1068            >
  1069                                                                                   
  1070             <xsl:call- template 
  1071              name="getT elecom"
  1072             >
  1073                                                                                             
  1074              <xsl:with- param 
  1075               name="tele com" 
  1076               select="."
  1077              />
  1078                                                                                    
  1079             </xsl:call -template>
  1080                                                                          
  1081            </xsl:for- each>
  1082                                                                
  1083           </xsl:when >
  1084                                                               
  1085           <xsl:other wise>
  1086                                                                         
  1087            <br/>
  1088            <b>
  1089             <xsl:text>
  1090              tel: AUTHO R PHONE MI SSING
  1091             </xsl:text >
  1092            </b>
  1093                                                                
  1094           </xsl:othe rwise>
  1095                                                      
  1096          </xsl:choo se>
  1097                                                     
  1098          <br/>
  1099                                                     
  1100          <br/>
  1101                                                     
  1102          <!-- <b><x sl:text>Or ganization </xsl:text ></b><br/> -->
  1103                                                     
  1104          <xsl:call- template 
  1105           name="getN ame"
  1106          >
  1107                                                               
  1108           <xsl:with- param 
  1109            name="name
  1110            select="./ n1:assigne dAuthor/n1 :represent edOrganiza tion/n1:na me"
  1111           />
  1112                                                      
  1113          </xsl:call -template>
  1114                                                     
  1115          <xsl:if 
  1116           test="./n1 :assignedA uthor/n1:r epresented Organizati on/n1:addr "
  1117          >
  1118                                                               
  1119           <xsl:call- template 
  1120            name="getA ddress"
  1121           >
  1122                                                                         
  1123            <xsl:with- param 
  1124             name="addr
  1125             select="./ n1:assigne dAuthor/n1 :represent edOrganiza tion/n1:ad dr"
  1126            />
  1127                                                                
  1128           </xsl:call -template>
  1129                                                      
  1130          </xsl:if>
  1131                                                     
  1132          <xsl:choos e>
  1133                                                               
  1134           <xsl:when 
  1135            test="./n1 :assignedA uthor/n1:r epresented Organizati on/n1:tele com"
  1136           >
  1137                                                                         
  1138            <xsl:for-e ach 
  1139             select="./ n1:assigne dAuthor/n1 :represent edOrganiza tion/n1:te lecom"
  1140            >
  1141                                                                                   
  1142             <xsl:call- template 
  1143              name="getT elecom"
  1144             >
  1145                                                                                             
  1146              <xsl:with- param 
  1147               name="tele com" 
  1148               select="."
  1149              />
  1150                                                                                    
  1151             </xsl:call -template>
  1152                                                                          
  1153            </xsl:for- each>
  1154                                                                
  1155           </xsl:when >
  1156                                                               
  1157           <xsl:other wise>
  1158                                                                         
  1159            <br/>
  1160            <b>
  1161             <xsl:text>
  1162              tel: ORGAN IZATION PH ONE MISSIN G
  1163             </xsl:text >
  1164            </b>
  1165                                                                
  1166           </xsl:othe rwise>
  1167                                                      
  1168          </xsl:choo se>
  1169                                             
  1170         </td>
  1171                                            
  1172         <td 
  1173          width="15%
  1174          valign="to p"
  1175         />
  1176                                            
  1177         <td 
  1178          width="35%
  1179          valign="to p"
  1180         />
  1181                                   
  1182        </tr>
  1183                                  
  1184       </xsl:for- each>
  1185               
  1186                        
  1187      </table>
  1188              
  1189     </xsl:temp late>
  1190             
  1191             
  1192     <xsl:templ ate 
  1193      name="getO rganizatio nInfo"
  1194     >
  1195                       
  1196      <xsl:param  
  1197       name="orgB lock"
  1198      />
  1199                       
  1200      <xsl:call- template 
  1201       name="getN ame"
  1202      >
  1203                                 
  1204       <xsl:with- param 
  1205        name="name
  1206        select="$o rgBlock/n1 :name"
  1207       />
  1208                        
  1209      </xsl:call -template>
  1210                       
  1211      <xsl:if 
  1212       test="$org Block/n1:a ddr"
  1213      >
  1214                                 
  1215       <xsl:call- template 
  1216        name="getA ddress"
  1217       >
  1218                                           
  1219        <xsl:with- param 
  1220         name="addr
  1221         select="$o rgBlock/n1 :addr"
  1222        />
  1223                                  
  1224       </xsl:call -template>
  1225                        
  1226      </xsl:if>
  1227                       
  1228      <xsl:choos e>
  1229                                 
  1230       <xsl:when 
  1231        test="$org Block/n1:t elecom"
  1232       >
  1233                                           
  1234        <xsl:for-e ach 
  1235         select="$o rgBlock/n1 :telecom"
  1236        >
  1237                                                    
  1238         <xsl:call- template 
  1239          name="getT elecom"
  1240         >
  1241                                                              
  1242          <xsl:with- param 
  1243           name="tele com" 
  1244           select="."
  1245          />
  1246                                                     
  1247         </xsl:call -template>
  1248                                            
  1249        </xsl:for- each>
  1250                                  
  1251       </xsl:when >
  1252                                 
  1253       <xsl:other wise>
  1254                                           
  1255        <br/>
  1256        <b>
  1257         <xsl:text>
  1258          tel: ORGAN IZATION PH ONE MISSIN G
  1259         </xsl:text >
  1260        </b>
  1261                                  
  1262       </xsl:othe rwise>
  1263                        
  1264      </xsl:choo se>
  1265              
  1266     </xsl:temp late>
  1267             
  1268             
  1269     <xsl:templ ate 
  1270      name="disp laySourceB lock"
  1271     >
  1272                       
  1273      <table 
  1274       width="100 %" 
  1275       class="sec ond"
  1276      >
  1277                                 
  1278       <tr>
  1279                                           
  1280        <td 
  1281         width="15%
  1282         valign="to p"
  1283        >
  1284                                                    
  1285         <b>
  1286                                                              
  1287          <xsl:text>
  1288           Custodian  Source:
  1289          </xsl:text >
  1290                                                     
  1291         </b>
  1292                                            
  1293        </td>
  1294                                           
  1295        <td 
  1296         width="35%
  1297         valign="to p"
  1298        >
  1299                                            
  1300         <xsl:choos e>
  1301                                                     
  1302          <xsl:when 
  1303           test="./n1 :informant "
  1304          >
  1305                                                               
  1306           <xsl:for-e ach 
  1307            select="./ n1:informa nt"
  1308           >
  1309                                                                         
  1310            <xsl:call- template 
  1311             name="getO rganizatio nInfo"
  1312            >
  1313                                                                                   
  1314             <xsl:with- param 
  1315              name="orgB lock" 
  1316              select="./ n1:assigne dEntity/n1 :represent edOrganiza tion"
  1317             />
  1318                                                                          
  1319            </xsl:call -template>
  1320                                                                
  1321           </xsl:for- each>
  1322                                                      
  1323          </xsl:when >
  1324                                                     
  1325          <xsl:when 
  1326           test="./n1 :custodian "
  1327          >
  1328                                                               
  1329           <xsl:for-e ach 
  1330            select="n1 :custodian "
  1331           >
  1332                                                                         
  1333            <xsl:call- template 
  1334             name="getO rganizatio nInfo"
  1335            >
  1336                                                                                   
  1337             <xsl:with- param 
  1338              name="orgB lock" 
  1339              select="./ n1:assigne dCustodian /n1:repres entedCusto dianOrgani zation"
  1340             />
  1341                                                                          
  1342            </xsl:call -template>
  1343                                                                
  1344           </xsl:for- each>
  1345                                                      
  1346          </xsl:when >
  1347                                                     
  1348          <xsl:other wise>
  1349                                                               
  1350           <xsl:call- template 
  1351            name="getO rganizatio nInfo"
  1352           >
  1353                                                                         
  1354            <xsl:with- param 
  1355             name="orgB lock" 
  1356             select="./ n1:assigne dAuthor/n1 :represent edOrganiza tion"
  1357            />
  1358                                                                
  1359           </xsl:call -template>
  1360                                                      
  1361          </xsl:othe rwise>
  1362                                             
  1363         </xsl:choo se>                                               
  1364                                            
  1365        </td> 
  1366                                           
  1367        <td 
  1368         width="15%
  1369         valign="to p"
  1370        />
  1371                                           
  1372        <td 
  1373         width="35%
  1374         valign="to p"
  1375        />
  1376                                  
  1377       </tr>
  1378                        
  1379      </table>
  1380              
  1381     </xsl:temp late>
  1382             
  1383             
  1384     <xsl:templ ate 
  1385      name="disp layHcProvi derBlock"
  1386     >
  1387                       
  1388      <xsl:if 
  1389       test="n1:d ocumentati onOf/n1:se rviceEvent /n1:perfor mer"
  1390      >
  1391                                 
  1392       <br/>
  1393                                 
  1394       <br/>
  1395                                 
  1396       <b>
  1397        <xsl:text>
  1398         Providers:
  1399        </xsl:text >
  1400       </b> 
  1401                                 
  1402       <table 
  1403        style="fon t-size:14p
  1404        border="1"
  1405       >
  1406                                           
  1407        <thead>
  1408                                                    
  1409         <tr>
  1410                                                              
  1411          <th 
  1412           class="fir st"
  1413          >
  1414           Provider N ame
  1415          </th>
  1416                                                              
  1417          <th 
  1418           class="fir st"
  1419          >
  1420           Provider's  Organizat ion
  1421          </th>
  1422                                                              
  1423          <th 
  1424           class="fir st"
  1425          >
  1426           Provider R ole
  1427          </th>
  1428                                                              
  1429          <th 
  1430           class="fir st"
  1431          >
  1432           Phone/Emai l/URL
  1433          </th>
  1434                                                              
  1435          <th 
  1436           class="fir st"
  1437          >
  1438           Address
  1439          </th>
  1440                                                              
  1441          <th 
  1442           class="fir st"
  1443          >
  1444           Date Range
  1445          </th>
  1446                                                              
  1447          <th 
  1448           class="fir st"
  1449          >
  1450           Provider T ype
  1451          </th>
  1452                                                              
  1453          <th 
  1454           class="fir st"
  1455          >
  1456           Provider I D
  1457          </th>
  1458                                                              
  1459          <th 
  1460           class="fir st"
  1461          >
  1462           Provider P atient ID
  1463          </th>
  1464                                                     
  1465         </tr>
  1466                                            
  1467        </thead>
  1468                                           
  1469        <tbody>
  1470                                   
  1471         <xsl:for-e ach 
  1472          select="n1 :documenta tionOf/n1: serviceEve nt/n1:perf ormer"
  1473         >
  1474                                                     
  1475          <tr>
  1476                                                               
  1477           <!-- Provi der Name   -->
  1478                                                               
  1479           <td 
  1480            class="sec ond"
  1481           >
  1482                                                                         
  1483            <xsl:varia ble 
  1484             name="entr yName"
  1485            >
  1486                                                                                   
  1487             <xsl:call- template 
  1488              name="getN ame"
  1489             >
  1490                                                                                             
  1491              <xsl:with- param 
  1492               name="name
  1493               select="./ n1:assigne dEntity/n1 :assignedP erson/n1:n ame"
  1494              />
  1495                                                                                    
  1496             </xsl:call -template>
  1497                                                                          
  1498            </xsl:vari able>
  1499                                                                         
  1500            <xsl:varia ble 
  1501             name="prov iderName"
  1502            >
  1503                                                                                   
  1504             <xsl:choos e>
  1505                                                                                             
  1506              <xsl:when 
  1507               test="stri ng-length( $entryName )>0"
  1508              >
  1509                                                                                                      
  1510               <xsl:value -of 
  1511                select="$e ntryName"
  1512               />
  1513                                                                                              
  1514              </xsl:when >
  1515                                                                                             
  1516              <xsl:other wise>
  1517               --
  1518              </xsl:othe rwise>
  1519                                                                                    
  1520             </xsl:choo se>
  1521                                                                          
  1522            </xsl:vari able>
  1523                                                                         
  1524            <div 
  1525             style="ove rflow:hidd en; white- space:nowr ap; width: 200px; pad ding-right :5px;"
  1526            >
  1527                                                                          
  1528             <xsl:call- template 
  1529              name="flyo verSpan"
  1530             >
  1531                                                                                    
  1532              <xsl:with- param 
  1533               name="data
  1534               select="$p roviderNam e"
  1535              />
  1536                                                                                    
  1537              <xsl:with- param 
  1538               name="free Text" 
  1539               select="''
  1540              />
  1541                                                                                    
  1542              <xsl:with- param 
  1543               name="deSq uigglefy" 
  1544               select="''
  1545              />
  1546                                                                           
  1547             </xsl:call -template>
  1548                                                                          
  1549            </div>
  1550                                                                
  1551           </td>
  1552                                                               
  1553                                                               
  1554           <!-- Provi der Org -- >
  1555                                                               
  1556           <td 
  1557            class="sec ond"
  1558           >
  1559                                                                         
  1560            <xsl:varia ble 
  1561             name="orgN ame"
  1562            >
  1563                                                                                   
  1564             <xsl:choos e>
  1565                                                                                             
  1566              <xsl:when 
  1567               test="./n1 :assignedE ntity/n1:r epresented Organizati on/n1:name  and strin g-length(. /n1:assign edEntity/n 1:represen tedOrganiz ation/n1:n ame)>0"
  1568              >
  1569                                                                                                      
  1570               <xsl:value -of 
  1571                select="./ n1:assigne dEntity/n1 :represent edOrganiza tion/n1:na me"
  1572               />
  1573                                                                                              
  1574              </xsl:when >
  1575                                                                                             
  1576              <xsl:other wise>
  1577               --
  1578              </xsl:othe rwise>
  1579                                                                                    
  1580             </xsl:choo se>
  1581                                                                          
  1582            </xsl:vari able>
  1583                                                                         
  1584            <div 
  1585             style="ove rflow:hidd en; white- space:nowr ap; width: 200px; pad ding-right :5px;"
  1586            >
  1587                                                                          
  1588             <xsl:call- template 
  1589              name="flyo verSpan"
  1590             >
  1591                                                                                    
  1592              <xsl:with- param 
  1593               name="data
  1594               select="$o rgName"
  1595              />
  1596                                                                                    
  1597              <xsl:with- param 
  1598               name="free Text" 
  1599               select="''
  1600              />
  1601                                                                                    
  1602              <xsl:with- param 
  1603               name="deSq uigglefy" 
  1604               select="''
  1605              />
  1606                                                                           
  1607             </xsl:call -template>
  1608                                                                          
  1609            </div>
  1610                                                                
  1611           </td>
  1612                                                               
  1613                                                               
  1614           <!-- Provi der Role   -->
  1615                                                               
  1616           <td 
  1617            class="sec ond"
  1618           >
  1619                                                                         
  1620            <xsl:varia ble 
  1621             name="role "
  1622            >
  1623                                                                                   
  1624             <xsl:call- template 
  1625              name="getP roviderRol e"
  1626             >
  1627                                                                                             
  1628              <xsl:with- param 
  1629               name="perf ormer" 
  1630               select="."
  1631              />
  1632                                                                                    
  1633             </xsl:call -template>
  1634                                                                          
  1635            </xsl:vari able>
  1636                                                                         
  1637            <xsl:varia ble 
  1638             name="prov iderRole"
  1639            >
  1640                                                                                   
  1641             <xsl:choos e>
  1642                                                                                             
  1643              <xsl:when 
  1644               test="stri ng-length( $role)>0"
  1645              >
  1646                                                                                                      
  1647               <xsl:value -of 
  1648                select="$r ole"
  1649               />
  1650                                                                                              
  1651              </xsl:when >
  1652                                                                                             
  1653              <xsl:other wise>
  1654               --
  1655              </xsl:othe rwise>
  1656                                                                                    
  1657             </xsl:choo se>
  1658                                                                          
  1659            </xsl:vari able>
  1660                                                                         
  1661            <div 
  1662             style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  1663            >
  1664                                                                          
  1665             <xsl:call- template 
  1666              name="flyo verSpan"
  1667             >
  1668                                                                                    
  1669              <xsl:with- param 
  1670               name="data
  1671               select="$p roviderRol e"
  1672              />
  1673                                                                                    
  1674              <xsl:with- param 
  1675               name="free Text" 
  1676               select="''
  1677              />
  1678                                                                                    
  1679              <xsl:with- param 
  1680               name="deSq uigglefy" 
  1681               select="''
  1682              />
  1683                                                                           
  1684             </xsl:call -template>
  1685                                                                          
  1686            </div>
  1687                                                                
  1688           </td>
  1689                                                               
  1690                                                               
  1691           <!-- Provi der Phone/ email/URL  -->
  1692                                                               
  1693           <td 
  1694            class="sec ond"
  1695           >       
  1696                                                                         
  1697            <div 
  1698             style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  1699            >
  1700                                                                          
  1701             <xsl:varia ble 
  1702              name="tele comStr"
  1703             >
  1704                                                                                    
  1705              <xsl:for-e ach 
  1706               select="./ n1:assigne dEntity/n1 :telecom"
  1707              >
  1708                                                                                              
  1709               <xsl:value -of 
  1710                select="./ @value"
  1711               />
  1712                                                                                     
  1713              </xsl:for- each>
  1714                                                                           
  1715             </xsl:vari able>
  1716                                                                          
  1717             <xsl:choos e>
  1718                                                                                    
  1719              <xsl:when 
  1720               test="$tel ecomStr an d string-l ength($tel ecomStr)>0 "
  1721              >
  1722                                                                                              
  1723               <xsl:value -of 
  1724                select="$t elecomStr"
  1725               />
  1726               <xsl:text>
  1727                 
  1728               </xsl:text >
  1729                                                                                     
  1730              </xsl:when >
  1731                                                                                    
  1732              <xsl:other wise>
  1733                                                                                              
  1734               <xsl:text>
  1735                --
  1736               </xsl:text >
  1737                                                                                     
  1738              </xsl:othe rwise>
  1739                                                                           
  1740             </xsl:choo se>
  1741                                                                          
  1742            </div>
  1743                                                                
  1744           </td>
  1745                                                               
  1746                                                               
  1747           <!-- Provi der Addres s -->
  1748                                                               
  1749           <td 
  1750            class="sec ond" 
  1751           >
  1752                                                                         
  1753            <div 
  1754             style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  1755            >
  1756                                                                          
  1757             <xsl:varia ble 
  1758              name="addr Str"
  1759             >
  1760                                                                                    
  1761              <xsl:if 
  1762               test="./n1 :assignedE ntity/n1:a ddr"
  1763              >
  1764                                                                                              
  1765               <xsl:call- template 
  1766                name="getS ingleLineA ddress"
  1767               >
  1768                                                                                                       
  1769                <xsl:with- param 
  1770                 name="addr
  1771                 select="./ n1:assigne dEntity/n1 :addr"
  1772                />
  1773                                                                                               
  1774               </xsl:call -template>
  1775                                                                                     
  1776              </xsl:if>
  1777                                                                           
  1778             </xsl:vari able>
  1779                                                                          
  1780             <xsl:choos e>
  1781                                                                                    
  1782              <xsl:when 
  1783               test="$add rStr and s tring-leng th($addrSt r) > 0"
  1784              >
  1785                                                                                              
  1786               <xsl:value -of 
  1787                select="$a ddrStr"
  1788               />
  1789                                                                                     
  1790              </xsl:when >
  1791                                                                                    
  1792              <xsl:other wise>
  1793               <xsl:text>
  1794                --
  1795               </xsl:text >
  1796              </xsl:othe rwise>
  1797                                                                           
  1798             </xsl:choo se>
  1799                                                                          
  1800            </div>
  1801                                                                
  1802           </td>
  1803                                                               
  1804                                                               
  1805           <!-- Date  Range -->
  1806                                                               
  1807           <xsl:varia ble 
  1808            name="star tDateStrin g"
  1809           >
  1810                                                                         
  1811            <xsl:call- template 
  1812             name="form atDateShor t"
  1813            >
  1814                                                                                   
  1815             <xsl:with- param 
  1816              name="date String" 
  1817              select="./ n1:time/n1 :low/@valu e"
  1818             />
  1819                                                                          
  1820            </xsl:call -template>  
  1821                                                                
  1822           </xsl:vari able>
  1823                                                               
  1824                                                               
  1825           <xsl:varia ble 
  1826            name="endD ateString"
  1827           >
  1828                                                                         
  1829            <xsl:call- template 
  1830             name="form atDateShor t"
  1831            >
  1832                                                                                   
  1833             <xsl:with- param 
  1834              name="date String" 
  1835              select="./ n1:time/n1 :high/@val ue"
  1836             />
  1837                                                                          
  1838            </xsl:call -template>  
  1839                                                                
  1840           </xsl:vari able>
  1841                                                               
  1842                                                               
  1843           <td 
  1844            class="sec ond"
  1845           >
  1846                                                                         
  1847            <div 
  1848             style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  1849            >
  1850                                                                          
  1851             <xsl:choos e>
  1852                                                                                    
  1853              <xsl:when 
  1854               test="stri ng-length( $startDate String) =  0 and stri ng-length( $endDateSt ring) > 0"
  1855              >
  1856                                                                                              
  1857               <xsl:value -of 
  1858                select="$e ndDateStri ng"
  1859               />
  1860                                                                                     
  1861              </xsl:when >
  1862                                                                                    
  1863              <xsl:when 
  1864               test="stri ng-length( $startDate String) >  0 and stri ng-length( $endDateSt ring) = 0"
  1865              >
  1866                                                                                              
  1867               <xsl:value -of 
  1868                select="$s tartDateSt ring"
  1869               />
  1870                                                                                     
  1871              </xsl:when >
  1872                                                                                    
  1873              <xsl:when 
  1874               test="stri ng-length( $startDate String) >  0 and stri ng-length( $endDateSt ring) > 0"
  1875              >
  1876                                                                                              
  1877               <xsl:value -of 
  1878                select="$s tartDateSt ring"
  1879               />
  1880                - 
  1881               <xsl:value -of 
  1882                select="$e ndDateStri ng"
  1883               />
  1884                                                                                     
  1885              </xsl:when >
  1886                                                                                    
  1887              <xsl:other wise>
  1888               <xsl:text>
  1889                --
  1890               </xsl:text >
  1891              </xsl:othe rwise>
  1892                                                                           
  1893             </xsl:choo se>
  1894                                                                          
  1895            </div>
  1896                                                                
  1897           </td>
  1898                                                               
  1899                                                               
  1900           <!-- Provi der Type   -->
  1901                                                               
  1902           <td 
  1903            class="sec ond"
  1904           >
  1905                                                                         
  1906            <div 
  1907             style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  1908            >
  1909                                                                          
  1910             <xsl:choos e>
  1911                                                                                    
  1912              <xsl:when 
  1913               test="./n1 :assignedE ntity/n1:c ode/@displ ayName"
  1914              >
  1915                                                                                              
  1916               <xsl:value -of 
  1917                select="./ n1:assigne dEntity/n1 :code/@dis playName"
  1918               />
  1919                                                                                     
  1920              </xsl:when >
  1921                                                                                    
  1922              <xsl:when 
  1923               test="./n1 :assignedE ntity/n1:c ode/@code"
  1924              >
  1925                                                                                              
  1926               <xsl:choos e>
  1927                                                                                                       
  1928                <xsl:when 
  1929                 test="./n1 :assignedE ntity/n1:c ode/@code  = '1000000 00X'"
  1930                >
  1931                                                                                                                 
  1932                 <xsl:text>
  1933                  Behavioral  Health an d Social S ervice Pro viders
  1934                 </xsl:text
  1935                                                                                                        
  1936                </xsl:when >
  1937                                                                                                       
  1938                <xsl:when 
  1939                 test="./n1 :assignedE ntity/n1:c ode/@code  = '1100000 00X'"
  1940               
  1941                                                                                                                 
  1942                 <xsl:text>
  1943                  Chiropract ic Provide rs
  1944                 </xsl:text
  1945                                                                                                        
  1946                </xsl:when >
  1947                                                                                                       
  1948                <xsl:when 
  1949                 test="./n1 :assignedE ntity/n1:c ode/@code  = '1200000 00X'"
  1950               
  1951                                                                                                                 
  1952                 <xsl:text>
  1953                  Dental Pro viders
  1954                 </xsl:text
  1955                                                                                                        
  1956                </xsl:when >
  1957                                                                                                       
  1958                <xsl:when 
  1959                 test="./n1 :assignedE ntity/n1:c ode/@code  = '1300000 00X'"
  1960               
  1961                                                                                                                 
  1962                 <xsl:text>
  1963                  Dietary an d Nutritio nal Servic e Provider s
  1964                 </xsl:text
  1965                                                                                                        
  1966                </xsl:when >
  1967                                                                                                       
  1968                <xsl:when 
  1969                 test="./n1 :assignedE ntity/n1:c ode/@code  = '1400000 00X'"
  1970               
  1971                                                                                                                 
  1972                 <xsl:text>
  1973                  Emergency  Medical Se rvice Prov iders
  1974                 </xsl:text
  1975                                                                                                        
  1976                </xsl:when >
  1977                                                                                                       
  1978                <xsl:when 
  1979                 test="./n1 :assignedE ntity/n1:c ode/@code  = '1500000 00X'"
  1980               
  1981                                                                                                                 
  1982                 <xsl:text>
  1983                  Eye and Vi sion Servi ce Provide rs
  1984                 </xsl:text
  1985                                                                                                        
  1986                </xsl:when >
  1987                                                                                                       
  1988                <xsl:when 
  1989                 test="./n1 :assignedE ntity/n1:c ode/@code  = '1600000 00X'"
  1990               
  1991                                                                                                                 
  1992                 <xsl:text>
  1993                  Nursing Se rvice Prov iders
  1994                 </xsl:text
  1995                                                                                                        
  1996                </xsl:when >
  1997                                                                                                       
  1998                <xsl:when 
  1999                 test="./n1 :assignedE ntity/n1:c ode/@code  = '1800000 00X'"
  2000               
  2001                                                                                                                 
  2002                 <xsl:text>
  2003                  Pharmacy S ervice Pro viders (In dividuals)
  2004                 </xsl:text
  2005                                                                                                        
  2006                </xsl:when >
  2007                                                                                                       
  2008                <xsl:when 
  2009                 test="./n1 :assignedE ntity/n1:c ode/@code  = '2000000 00X'"
  2010               
  2011                                                                                                                 
  2012                 <xsl:text>
  2013                  Allopathic  &amp; Ost eopathic P hysicians
  2014                 </xsl:text
  2015                                                                                                        
  2016                </xsl:when >
  2017                                                                                                       
  2018                <xsl:when 
  2019                 test="./n1 :assignedE ntity/n1:c ode/@code  = '2100000 00X'"
  2020               
  2021                                                                                                                 
  2022                 <xsl:text>
  2023                  Podiatric  Medicine a nd Surgery  Providers
  2024                 </xsl:text
  2025                                                                                                        
  2026                </xsl:when >
  2027                                                                                                       
  2028                <xsl:when 
  2029                 test="./n1 :assignedE ntity/n1:c ode/@code  = '2200000 00X'"
  2030               
  2031                                                                                                                 
  2032                 <xsl:text>
  2033                  Respirator y, Rehabil itative an d Restorat ive Servic e Provider s
  2034                 </xsl:text
  2035                                                                                                        
  2036                </xsl:when >
  2037                                                                                                       
  2038                <xsl:when 
  2039                 test="./n1 :assignedE ntity/n1:c ode/@code  = '2300000 00X'"
  2040               
  2041                                                                                                                 
  2042                 <xsl:text>
  2043                  Speech, La nguage and  Hearing P roviders
  2044                 </xsl:text
  2045                                                                                                        
  2046                </xsl:when >
  2047                                                                                                       
  2048                <xsl:when 
  2049                 test="./n1 :assignedE ntity/n1:c ode/@code  = '2500000 00X'"
  2050               
  2051                                                                                                                 
  2052                 <xsl:text>
  2053                  Agencies
  2054                 </xsl:text
  2055                                                                                                        
  2056                </xsl:when >
  2057                                                                                                       
  2058                <xsl:when 
  2059                 test="./n1 :assignedE ntity/n1:c ode/@code  = '2600000 00X'"
  2060               
  2061                                                                                                                 
  2062                 <xsl:text>
  2063                  Ambulatory  Health Ca re Facilit ies
  2064                 </xsl:text
  2065                                                                                                        
  2066                </xsl:when >
  2067                                                                                                       
  2068                <xsl:when 
  2069                 test="./n1 :assignedE ntity/n1:c ode/@code  = '2800000 00X'"
  2070               
  2071                                                                                                                 
  2072                 <xsl:text>
  2073                  Hospitals
  2074                 </xsl:text
  2075                                                                                                        
  2076                </xsl:when >
  2077                                                                                                       
  2078                <xsl:when 
  2079                 test="./n1 :assignedE ntity/n1:c ode/@code  = '2900000 00X'"
  2080               
  2081                                                                                                                 
  2082                 <xsl:text>
  2083                  Laboratori es
  2084                 </xsl:text
  2085                                                                                                        
  2086                </xsl:when >
  2087                                                                                                       
  2088                <xsl:when 
  2089                 test="./n1 :assignedE ntity/n1:c ode/@code  = '3000000 00X'"
  2090               
  2091                                                                                                                 
  2092                 <xsl:text>
  2093                  Managed Ca re Organiz ations
  2094                 </xsl:text
  2095                                                                                                        
  2096                </xsl:when >
  2097                                                                                                       
  2098                <xsl:when 
  2099                 test="./n1 :assignedE ntity/n1:c ode/@code  = '3100000 00X'"
  2100               
  2101                                                                                                                 
  2102                 <xsl:text>
  2103                  Nursing an d Custodia l Care Fac ilities
  2104                 </xsl:text
  2105                                                                                                        
  2106                </xsl:when >
  2107                                                                                                       
  2108                <xsl:when 
  2109                 test="./n1 :assignedE ntity/n1:c ode/@code  = '3200000 00X'"
  2110               
  2111                                                                                                                 
  2112                 <xsl:text>
  2113                  Residentia l Treatmen t Faciliti es
  2114                 </xsl:text
  2115                                                                                                        
  2116                </xsl:when >
  2117                                                                                                       
  2118                <xsl:when 
  2119                 test="./n1 :assignedE ntity/n1:c ode/@code  = '3300000 00X'"
  2120               
  2121                                                                                                                 
  2122                 <xsl:text>
  2123                  Suppliers  (including  Pharmacie s and Dura ble Medica l Equipmen t)
  2124                 </xsl:text
  2125                                                                                                        
  2126                </xsl:when >
  2127                                                                                                       
  2128                <xsl:when 
  2129                 test="./n1 :assignedE ntity/n1:c ode/@code  = '3600000 00X'"
  2130               
  2131                                                                                                                 
  2132                 <xsl:text>
  2133                  Physician  Assistants  and Advan ced Practi ce Nursing  Providers
  2134                 </xsl:text
  2135                                                                                                        
  2136                </xsl:when >
  2137                                                                                                       
  2138                <xsl:when 
  2139                 test="./n1 :assignedE ntity/n1:c ode/@code  = '3700000 00X'"
  2140               
  2141                                                                                                                 
  2142                 <xsl:text>
  2143                  Nursing Se rvice Rela ted Provid ers
  2144                 </xsl:text
  2145                                                                                                        
  2146                </xsl:when >
  2147                                                                                                       
  2148                <xsl:when 
  2149                 test="./n1 :assignedE ntity/n1:c ode/@code  = '3800000 00X'"
  2150               
  2151                                                                                                                 
  2152                 <xsl:text>
  2153                  Respite Ca re Facilit y
  2154                 </xsl:text
  2155                                                                                                        
  2156                </xsl:when >
  2157                                                                                               
  2158               </xsl:choo se>
  2159                                                                                     
  2160              </xsl:when >
  2161                                                                                    
  2162              <xsl:when 
  2163               test="./n1 :assignedE ntity/n1:c ode/n1:ori ginalText"
  2164              >
  2165                                                                                              
  2166               <xsl:value -of 
  2167                select="./ n1:assigne dEntity/n1 :code/n1:o riginalTex t"
  2168               />
  2169                                                                                     
  2170              </xsl:when >
  2171                                                                                    
  2172              <xsl:other wise>
  2173               <xsl:text>
  2174                --
  2175               </xsl:text >
  2176              </xsl:othe rwise>
  2177                                                                           
  2178             </xsl:choo se>
  2179                                                                          
  2180            </div>
  2181                                                                
  2182           </td>
  2183                                                               
  2184                                                               
  2185           <!-- Natio nal Provid er Id -->
  2186                                                               
  2187           <td 
  2188            class="sec ond"
  2189           >
  2190                                                                         
  2191            <div 
  2192             style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  2193            >
  2194                                                                          
  2195             <xsl:choos e>
  2196                                                                                    
  2197              <xsl:when 
  2198               test="./n1 :assignedE ntity/n1:i d/@extensi on"
  2199              >
  2200                                                                                              
  2201               <xsl:value -of 
  2202                select="./ n1:assigne dEntity/n1 :id/@exten sion"
  2203               />
  2204                                                                                     
  2205              </xsl:when >
  2206                                                                                    
  2207              <xsl:other wise>
  2208               <xsl:text>
  2209                --
  2210               </xsl:text >
  2211              </xsl:othe rwise>
  2212                                                                           
  2213             </xsl:choo se>
  2214                                                                          
  2215            </div>
  2216                                                                
  2217           </td>
  2218                                                               
  2219                                                               
  2220           <!-- Provi der Patien t ID -->
  2221                                                               
  2222           <td 
  2223            class="sec ond"
  2224           >
  2225                                                                         
  2226            <div 
  2227             style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  2228            >
  2229                                                                          
  2230             <xsl:choos e>
  2231                                                                                    
  2232              <xsl:when 
  2233               test="./n1 :assignedE ntity/sdtc :patient/s dtc:id/@ex tension"
  2234              >
  2235                                                                                              
  2236               <xsl:value -of 
  2237                select="./ n1:assigne dEntity/sd tc:patient /sdtc:id/@ extension"
  2238               />
  2239                                                                                     
  2240              </xsl:when >
  2241                                                                                    
  2242              <xsl:other wise>
  2243               <xsl:text>
  2244                --
  2245               </xsl:text >
  2246              </xsl:othe rwise>
  2247                                                                           
  2248             </xsl:choo se>
  2249                                                                          
  2250            </div>
  2251                                                                
  2252           </td>
  2253                                                      
  2254          </tr>   
  2255                                    
  2256         </xsl:for- each>
  2257                                   
  2258        </tbody>
  2259                         
  2260       </table>
  2261                        
  2262       <br/>
  2263                        
  2264       <br/>
  2265                        
  2266      </xsl:if>
  2267              
  2268     </xsl:temp late>
  2269    
  2270             
  2271     <xsl:templ ate 
  2272      name="disp layTableOf Contents"
  2273     >
  2274                       
  2275      <div 
  2276       style="mar gin-bottom :35px"
  2277      >
  2278                                 
  2279       <h3>
  2280                                           
  2281        <a 
  2282         name="toc"
  2283        >
  2284         Table of C ontents
  2285        </a>
  2286                                  
  2287       </h3>
  2288                                 
  2289       <ul>
  2290                                           
  2291        <xsl:for-e ach 
  2292         select="n1 :component /n1:struct uredBody/n 1:componen t/n1:secti on/n1:titl e"
  2293        >
  2294                                                    
  2295         <xsl:sort/ >
  2296                                                    
  2297         <xsl:varia ble 
  2298          name="comp Found"
  2299         >
  2300                                                              
  2301          <xsl:call- template 
  2302           name="comp onentFound "
  2303          >
  2304                                                                        
  2305           <xsl:with- param 
  2306            name="comp Section" 
  2307            select=".. /."
  2308           />
  2309                                                               
  2310          </xsl:call -template>
  2311                                                     
  2312         </xsl:vari able>
  2313                                                    
  2314         <xsl:choos e>
  2315                                                              
  2316          <xsl:when 
  2317           test="stri ng-length( $compFound )>0"
  2318          >
  2319                                                                        
  2320           <li>
  2321                                                                                  
  2322            <a 
  2323             style="fon t-family:g eorgia;fon t-size:12p t"  
  2324             href="#{ge nerate-id( .)}"
  2325            >
  2326                                                                                            
  2327             <xsl:value -of 
  2328              select="."
  2329             />
  2330                                                                                   
  2331            </a>
  2332                                                                         
  2333           </li>
  2334                                                               
  2335          </xsl:when >
  2336                                                     
  2337         </xsl:choo se>
  2338                                            
  2339        </xsl:for- each>
  2340                                  
  2341       </ul>
  2342                        
  2343      </div>
  2344              
  2345     </xsl:temp late>
  2346    
  2347             
  2348     <xsl:templ ate 
  2349      name="disp layContent s"
  2350     >
  2351                       
  2352      <xsl:apply -templates  
  2353       select="n1 :component /n1:struct uredBody/n 1:componen t"
  2354      >
  2355                                 
  2356       <xsl:sort 
  2357        select="n1 :section/n 1:title"
  2358       />
  2359                        
  2360      </xsl:appl y-template s>
  2361              
  2362     </xsl:temp late>
  2363    
  2364             
  2365     <xsl:templ ate 
  2366      name="disp layContact InfoBlock"
  2367     >
  2368              
  2369                       
  2370      <table 
  2371       width='100 %' 
  2372       class="fir st"
  2373      >
  2374                                 
  2375       <!-- 
  2376                                 <tr>
  2377                                          <td widt h="15%" va lign="top"  align='le ft'>
  2378                                                   <b>Contact s: </b>
  2379                                          </td>
  2380                                          <td widt h="85%"/>
  2381                                 </tr>
  2382                                 -->
  2383                                 
  2384       <xsl:for-e ach 
  2385        select="n1 :participa nt[@typeCo de='IND']/ n1:associa tedEntity"
  2386       >
  2387                                           
  2388        <tr>
  2389                                                    
  2390         <td 
  2391          width="15%
  2392          valign="to p" 
  2393          align='lef t'
  2394         >
  2395                                                              
  2396          <b>
  2397           Contact: 
  2398          </b>
  2399                                                     
  2400         </td>
  2401                                                    
  2402         <td 
  2403          width="35%
  2404          valign="to p"
  2405         >
  2406                                                              
  2407          <xsl:call- template 
  2408           name="getP articipant "
  2409          >
  2410                                                                        
  2411           <xsl:with- param 
  2412            name="part icipant" 
  2413            select="."
  2414           />
  2415                                                               
  2416          </xsl:call -template>
  2417                                                     
  2418         </td>
  2419                                                    
  2420         <td/>
  2421                                            
  2422        </tr>
  2423                                           
  2424        <tr>
  2425                                                    
  2426         <td 
  2427          width="15%
  2428          valign="to p" 
  2429          align='lef t'
  2430         />
  2431                                                    
  2432         <td/>
  2433                                                    
  2434         <td/>
  2435                                            
  2436        </tr>
  2437                                  
  2438       </xsl:for- each>
  2439                        
  2440      </table>
  2441              
  2442     </xsl:temp late>
  2443    
  2444             
  2445     <xsl:templ ate 
  2446      name="getP articipant "
  2447     >
  2448                       
  2449      <xsl:param  
  2450       name="part icipant"
  2451      />
  2452                       
  2453      <p>
  2454                                 
  2455       <xsl:call- template 
  2456        name="getN ame"
  2457       >
  2458                                           
  2459        <xsl:with- param 
  2460         name="name
  2461         select="$p articipant /n1:associ atedPerson /n1:name"
  2462        />
  2463                                  
  2464       </xsl:call -template>
  2465                                 
  2466       <xsl:if 
  2467        test="$par ticipant/n 1:addr"
  2468       >
  2469                                           
  2470        <xsl:choos e>
  2471                                                    
  2472         <xsl:when 
  2473          test="$isK aiser"
  2474         >
  2475                                                              
  2476          <xsl:call- template 
  2477           name="getS ingleAddre ss"
  2478          >
  2479                                                                        
  2480           <xsl:with- param 
  2481            name="addr
  2482            select="$p articipant /n1:addr"
  2483           />
  2484                                                               
  2485          </xsl:call -template>
  2486                                                     
  2487         </xsl:when >
  2488                                                    
  2489         <xsl:other wise>
  2490                                                              
  2491          <xsl:call- template 
  2492           name="getA ddress"
  2493          >
  2494                                                                        
  2495           <xsl:with- param 
  2496            name="addr
  2497            select="$p articipant /n1:addr"
  2498           />
  2499                                                               
  2500          </xsl:call -template>
  2501                                                     
  2502         </xsl:othe rwise>
  2503                                            
  2504        </xsl:choo se>
  2505                                  
  2506       </xsl:if>
  2507                                 
  2508       <xsl:choos e>
  2509                                           
  2510        <xsl:when 
  2511         test="$par ticipant/n 1:telecom/ @value"
  2512        >
  2513                                                    
  2514         <xsl:for-e ach 
  2515          select="$p articipant /n1:teleco m"
  2516         >
  2517                                                              
  2518          <xsl:call- template 
  2519           name="getT elecom"
  2520          >
  2521                                                                        
  2522           <xsl:with- param 
  2523            name="tele com" 
  2524            select="."
  2525           />
  2526                                                               
  2527          </xsl:call -template>
  2528                                                     
  2529         </xsl:for- each>
  2530                                            
  2531        </xsl:when >
  2532                                           
  2533        <xsl:other wise>
  2534                                                    
  2535         <br/>
  2536                                                    
  2537         <b>
  2538                                                              
  2539          <xsl:text>
  2540           tel: CONTA CT PHONE M ISSING
  2541          </xsl:text >
  2542                                                     
  2543         </b>
  2544                                            
  2545        </xsl:othe rwise>
  2546                                  
  2547       </xsl:choo se>
  2548                                 
  2549       <br/>
  2550                                 
  2551       <b>
  2552        Relationsh ip: 
  2553       </b>
  2554                                 
  2555       <xsl:if 
  2556        test="$par ticipant/n 1:code"
  2557       >
  2558                                           
  2559        <xsl:choos e>
  2560                                                    
  2561         <xsl:when 
  2562          test="$par ticipant/n 1:code/@di splayName"
  2563         >
  2564                                                              
  2565          <xsl:value -of 
  2566           select="$p articipant /n1:code/@ displayNam e"
  2567          />
  2568                                                     
  2569         </xsl:when >
  2570                                                    
  2571         <xsl:when 
  2572          test="$par ticipant/n 1:code/n1: originalTe xt"
  2573         >
  2574                                                              
  2575          <xsl:value -of 
  2576           select="$p articipant /n1:code/n 1:original Text"
  2577          />
  2578                                                     
  2579         </xsl:when >
  2580                                                    
  2581         <xsl:when 
  2582          test="$par ticipant/n 1:code/@co de"
  2583         >
  2584                                                              
  2585          <xsl:value -of 
  2586           select="$p articipant /n1:code/@ code"
  2587          />
  2588                                                     
  2589         </xsl:when >
  2590                                            
  2591        </xsl:choo se>
  2592                                  
  2593       </xsl:if>
  2594                                 
  2595       <br/>
  2596                                 
  2597       <b>
  2598        Contact Ty pe: 
  2599       </b>
  2600                                 
  2601       <xsl:if 
  2602        test="$par ticipant/@ classCode"
  2603       >
  2604                                           
  2605        <xsl:choos e>
  2606                                                    
  2607         <xsl:when 
  2608          test="$par ticipant/@ classCode= 'AGNT'"
  2609         >
  2610                                                              
  2611          <xsl:text>
  2612           Agent
  2613          </xsl:text
  2614                                                     
  2615         </xsl:when >
  2616                                                    
  2617         <xsl:when 
  2618          test="$par ticipant/@ classCode= 'CAREGIVER '"
  2619         >
  2620                                                              
  2621          <xsl:text>
  2622           Caregiver
  2623          </xsl:text
  2624                                                     
  2625         </xsl:when >
  2626                                                    
  2627         <xsl:when 
  2628          test="$par ticipant/@ classCode= 'ECON'"
  2629         >
  2630                                                              
  2631          <xsl:text>
  2632           Emergency  Contact
  2633          </xsl:text
  2634                                                     
  2635         </xsl:when >
  2636                                                    
  2637         <xsl:when 
  2638          test="$par ticipant/@ classCode= 'GUARD'"
  2639         >
  2640                                                              
  2641          <xsl:text>
  2642           Guardian
  2643          </xsl:text
  2644                                                     
  2645         </xsl:when >
  2646                                                    
  2647         <xsl:when 
  2648          test="$par ticipant/@ classCode= 'NOK'"
  2649         >
  2650                                                              
  2651          <xsl:text>
  2652           Next of ki n
  2653          </xsl:text
  2654                                                     
  2655         </xsl:when >
  2656                                                    
  2657         <xsl:when 
  2658          test="$par ticipant/@ classCode= 'PRS'"
  2659         >
  2660                                                              
  2661          <xsl:text>
  2662           Personal
  2663          </xsl:text
  2664                                                     
  2665         </xsl:when >
  2666                                            
  2667        </xsl:choo se>
  2668                                  
  2669       </xsl:if>
  2670                        
  2671      </p>
  2672              
  2673     </xsl:temp late>
  2674    
  2675             
  2676     <xsl:templ ate 
  2677      name="getS ingleAddre ss"
  2678     >
  2679                       
  2680      <xsl:param  
  2681       name="addr "
  2682      />
  2683                       
  2684      <xsl:if 
  2685       test="$add r/n1:stree tAddressLi ne != ' '"
  2686      >
  2687                                 
  2688       <br/>
  2689                                 
  2690       <xsl:if 
  2691        test="stri ng-length( $addr/n1:s treetAddre ssLine)>0"
  2692       >
  2693                                           
  2694        <xsl:value -of 
  2695         select="$a ddr/n1:str eetAddress Line"
  2696        />
  2697                                  
  2698       </xsl:if>
  2699      
  2700                                 
  2701       <br/>
  2702                                 
  2703       <xsl:value -of 
  2704        select="$a ddr/n1:cit y"
  2705       />
  2706       ,
  2707                                 
  2708       <xsl:value -of 
  2709        select="$a ddr/n1:sta te"
  2710       />
  2711       ,
  2712                                 
  2713       <xsl:value -of 
  2714        select="$a ddr/n1:pos talCode"
  2715       />
  2716                        
  2717      </xsl:if>
  2718              
  2719     </xsl:temp late>
  2720    
  2721             
  2722     <xsl:templ ate 
  2723      name="getA ddress"
  2724     >
  2725                       
  2726      <xsl:param  
  2727       name="addr "
  2728      />
  2729                       
  2730      <xsl:if 
  2731       test="$add r/n1:stree tAddressLi ne != ' '"
  2732      >
  2733                                 
  2734       <xsl:for-e ach 
  2735        select="$a ddr/n1:str eetAddress Line"
  2736       >
  2737                                           
  2738        <br/>
  2739                                           
  2740        <xsl:if 
  2741         test="stri ng-length( $addr/n1:s treetAddre ssLine)>0"
  2742        >
  2743                                                    
  2744         <xsl:value -of 
  2745          select="."
  2746         />
  2747                                            
  2748        </xsl:if>
  2749                                  
  2750       </xsl:for- each>
  2751                        
  2752      </xsl:if>
  2753                       
  2754      <br/>
  2755                       
  2756                       
  2757      <xsl:value -of 
  2758       select="$a ddr/n1:cit y"
  2759      />
  2760                       
  2761      <xsl:if 
  2762       test="stri ng-length( $addr/n1:c ity)>0 and  string-le ngth($addr /n1:state) >0"
  2763      >
  2764                                 
  2765       <xsl:text>
  2766       
  2767       </xsl:text >
  2768                        
  2769      </xsl:if>
  2770                       
  2771      <xsl:if 
  2772       test="stri ng-length( $addr/n1:s tate)>0"
  2773      >
  2774                                 
  2775       <xsl:value -of 
  2776        select="$a ddr/n1:sta te"
  2777       />
  2778                        
  2779      </xsl:if>
  2780                       
  2781      <xsl:if 
  2782       test="stri ng-length( $addr/n1:s tate)>0 an d string-l ength($add r/n1:posta lCode)>0"
  2783      >
  2784                                 
  2785       <xsl:text>
  2786       
  2787       </xsl:text >
  2788                        
  2789      </xsl:if>
  2790                       
  2791      <xsl:if 
  2792       test="stri ng-length( $addr/n1:s tate)>0"
  2793      >
  2794                                 
  2795       <xsl:value -of 
  2796        select="$a ddr/n1:pos talCode"
  2797       />
  2798                        
  2799      </xsl:if>
  2800              
  2801     </xsl:temp late>
  2802    
  2803             
  2804     <xsl:templ ate 
  2805      name="getS ingleLineA ddress"
  2806     >
  2807                       
  2808      <xsl:param  
  2809       name="addr "
  2810      />
  2811                       
  2812      <xsl:if 
  2813       test="$add r/n1:stree tAddressLi ne and $ad dr/n1:stre etAddressL ine != ' ' "
  2814      >
  2815                                 
  2816       <xsl:for-e ach 
  2817        select="$a ddr/n1:str eetAddress Line"
  2818       >
  2819                                           
  2820        <xsl:if 
  2821         test="stri ng-length( $addr/n1:s treetAddre ssLine)>0"
  2822        >
  2823                                                    
  2824         <xsl:text>
  2825           
  2826         </xsl:text >
  2827                                                    
  2828         <xsl:value -of 
  2829          select="."
  2830         />
  2831                                            
  2832        </xsl:if>
  2833                                  
  2834       </xsl:for- each>
  2835                        
  2836      </xsl:if>
  2837                       
  2838                       
  2839      <xsl:if 
  2840       test="$add r/n1:city"
  2841     
  2842                                 
  2843       <xsl:text>
  2844         
  2845       </xsl:text >
  2846                                 
  2847       <xsl:value -of 
  2848        select="$a ddr/n1:cit y"
  2849       />
  2850                        
  2851      </xsl:if>
  2852                       
  2853                       
  2854      <xsl:if 
  2855       test="stri ng-length( $addr/n1:c ity)>0 and  string-le ngth($addr /n1:state) >0"
  2856      >
  2857                                 
  2858       <xsl:text>
  2859       
  2860       </xsl:text >
  2861                        
  2862      </xsl:if>
  2863                       
  2864      <xsl:if 
  2865       test="stri ng-length( $addr/n1:s tate)>0"
  2866      >
  2867                                 
  2868       <xsl:value -of 
  2869        select="$a ddr/n1:sta te"
  2870       />
  2871                        
  2872      </xsl:if>
  2873                       
  2874      <xsl:if 
  2875       test="stri ng-length( $addr/n1:s tate)>0 an d string-l ength($add r/n1:posta lCode)>0"
  2876      >
  2877                                 
  2878       <xsl:text>
  2879       
  2880       </xsl:text >
  2881                        
  2882      </xsl:if>
  2883                       
  2884      <xsl:if 
  2885       test="stri ng-length( $addr/n1:s tate)>0"
  2886      >
  2887                                 
  2888       <xsl:value -of 
  2889        select="$a ddr/n1:pos talCode"
  2890       />
  2891                        
  2892      </xsl:if>
  2893              
  2894     </xsl:temp late>
  2895    
  2896             
  2897     <xsl:templ ate 
  2898      name="getT elecom"
  2899     >
  2900                       
  2901      <xsl:param  
  2902       name="tele com"
  2903      />
  2904                       
  2905      <br/>
  2906                       
  2907      <xsl:if 
  2908       test="stri ng-length( $telecom/@ value)>0"
  2909      >
  2910                                 
  2911       <xsl:value -of 
  2912        select="$t elecom/@va lue"
  2913       />
  2914                                 
  2915       <xsl:choos e>
  2916                                           
  2917        <xsl:when 
  2918         test="./@u se='HP' "
  2919        >
  2920                                                    
  2921         <b>
  2922                                                              
  2923          <xsl:text>
  2924            Home
  2925          </xsl:text >
  2926                                                     
  2927         </b>
  2928                                            
  2929        </xsl:when >
  2930                                           
  2931        <xsl:when 
  2932         test="./@u se='WP' "
  2933        >
  2934                                                    
  2935         <b>
  2936                                                              
  2937          <xsl:text>
  2938            Work
  2939          </xsl:text >
  2940                                                     
  2941         </b>
  2942                                            
  2943        </xsl:when >
  2944                                           
  2945        <xsl:when 
  2946         test="./@u se='HV' "
  2947        >
  2948                                                    
  2949         <b>
  2950                                                              
  2951          <xsl:text>
  2952            Vacation
  2953          </xsl:text >
  2954                                                     
  2955         </b>
  2956                                            
  2957        </xsl:when >
  2958                                           
  2959        <xsl:when 
  2960         test="./@u se='MC' "
  2961        >
  2962                                                    
  2963         <b>
  2964                                                              
  2965          <xsl:text>
  2966            Mobile
  2967          </xsl:text >
  2968                                                     
  2969         </b>
  2970                                            
  2971        </xsl:when >
  2972                                           
  2973        <xsl:other wise>
  2974                                                    
  2975         <b>
  2976                                                              
  2977          <xsl:text>
  2978          </xsl:text >
  2979                                                     
  2980         </b>
  2981                                            
  2982        </xsl:othe rwise>
  2983                                  
  2984       </xsl:choo se>
  2985                        
  2986      </xsl:if>
  2987              
  2988     </xsl:temp late>
  2989    
  2990             
  2991     <xsl:templ ate 
  2992      name="getS ingleLineT elecom"
  2993     >
  2994                       
  2995      <xsl:param  
  2996       name="tele com"
  2997      />
  2998                       
  2999      <xsl:if 
  3000       test="stri ng-length( $telecom/@ value)>0"
  3001      >
  3002                                 
  3003       <xsl:text>
  3004         
  3005       </xsl:text >
  3006                                 
  3007       <xsl:value -of 
  3008        select="$t elecom/@va lue"
  3009       />
  3010                                 
  3011       <xsl:choos e>
  3012                                           
  3013        <xsl:when 
  3014         test="./@u se='HP' "
  3015        >
  3016                                                    
  3017         <b>
  3018                                                              
  3019          <xsl:text>
  3020            Home
  3021          </xsl:text >
  3022                                                     
  3023         </b>
  3024                                            
  3025        </xsl:when >
  3026                                           
  3027        <xsl:when 
  3028         test="./@u se='WP' "
  3029        >
  3030                                                    
  3031         <b>
  3032                                                              
  3033          <xsl:text>
  3034            Work
  3035          </xsl:text >
  3036                                                     
  3037         </b>
  3038                                            
  3039        </xsl:when >
  3040                                           
  3041        <xsl:when 
  3042         test="./@u se='HV' "
  3043        >
  3044                                                    
  3045         <b>
  3046                                                              
  3047          <xsl:text>
  3048            Vacation
  3049          </xsl:text >
  3050                                                     
  3051         </b>
  3052                                            
  3053        </xsl:when >
  3054                                           
  3055        <xsl:when 
  3056         test="./@u se='MC' "
  3057        >
  3058                                                    
  3059         <b>
  3060                                                              
  3061          <xsl:text>
  3062            Mobile
  3063          </xsl:text >
  3064                                                     
  3065         </b>
  3066                                            
  3067        </xsl:when >
  3068                                           
  3069        <xsl:other wise>
  3070                                                    
  3071         <b>
  3072                                                              
  3073          <xsl:text>
  3074          </xsl:text >
  3075                                                     
  3076         </b>
  3077                                            
  3078        </xsl:othe rwise>
  3079                                  
  3080       </xsl:choo se>
  3081                                 
  3082       <xsl:text>
  3083         
  3084       </xsl:text >
  3085                        
  3086      </xsl:if>
  3087              
  3088     </xsl:temp late>
  3089    
  3090             
  3091     <!-- Get A uthor  -->
  3092             
  3093     <xsl:templ ate 
  3094      name="getA uthor"
  3095     >
  3096                       
  3097      <xsl:varia ble 
  3098       name="auth or"
  3099      />
  3100                       
  3101      <xsl:call- template 
  3102       name="getN ame"
  3103      >
  3104                                 
  3105       <xsl:with- param 
  3106        name="name
  3107        select="n1 :author/n1 :assignedA uthor/n1:a ssignedPer son/n1:nam e"
  3108       />
  3109                        
  3110      </xsl:call -template>
  3111                       
  3112      <xsl:choos e>
  3113                                 
  3114       <xsl:when 
  3115        test="$aut hor"
  3116       >
  3117                                           
  3118        <xsl:value -of 
  3119         select="n1 :author/n1 :assignedA uthor/n1:a ssignedPer son/n1:nam e"
  3120        />
  3121                                  
  3122       </xsl:when >
  3123                        
  3124      </xsl:choo se>
  3125              
  3126     </xsl:temp late>
  3127    
  3128             
  3129     <!-- non X ML Body -- >
  3130    
  3131             
  3132     <xsl:templ ate 
  3133      name="nonX MLBody"
  3134     >
  3135                       
  3136      <xsl:param  
  3137       name="nonX MLBody" 
  3138       select="n1 :component /n1:nonXML Body" 
  3139      />
  3140                       
  3141      <MediaType >
  3142                                 
  3143       <xsl:value -of 
  3144        select="$n onXMLBody/ n1:text/@m ediaType" 
  3145       />
  3146                        
  3147      </MediaTyp e>
  3148                       
  3149      <Represent ation>
  3150                                 
  3151       <xsl:value -of 
  3152        select="$n onXMLBody/ n1:text/@r epresentat ion" 
  3153       />
  3154                        
  3155      </Represen tation>
  3156                       
  3157      <Text>
  3158                                 
  3159       <xsl:value -of 
  3160        select="$n onXMLBody/ n1:text" 
  3161       />
  3162                        
  3163      </Text>
  3164              
  3165     </xsl:temp late>
  3166             
  3167             
  3168     <xsl:templ ate 
  3169      match="n1: component/ n1:nonXMLB ody"
  3170     >
  3171                       
  3172      <xsl:choos e>
  3173                                 
  3174       <!-- if th ere is a r eference,  use that i n an IFRAM E -->
  3175                                 
  3176       <xsl:when 
  3177        test="n1:t ext/n1:ref erence"
  3178       >
  3179                                           
  3180        <IFRAME 
  3181         name="nonX MLBody" 
  3182         id="nonXML Body" 
  3183         WIDTH="100 %" 
  3184         HEIGHT="66 %" 
  3185         src="{n1:t ext/n1:ref erence/@va lue}" 
  3186        />
  3187                                  
  3188       </xsl:when >
  3189                                 
  3190       <xsl:when 
  3191        test="n1:t ext/@media Type='text /plain'"
  3192       >
  3193                                           
  3194        <pre>
  3195                                                    
  3196         <xsl:value -of 
  3197          select="n1 :text/text ()" 
  3198         />
  3199                                            
  3200        </pre>
  3201                                  
  3202       </xsl:when >
  3203                                 
  3204       <xsl:other wise>
  3205                                           
  3206        <CENTER>
  3207         Cannot dis play the t ext
  3208        </CENTER>
  3209                                  
  3210       </xsl:othe rwise>
  3211                        
  3212      </xsl:choo se>
  3213              
  3214     </xsl:temp late>
  3215    
  3216    
  3217             
  3218     <!-- Struc turedBody  -->
  3219    
  3220             
  3221     <!-- Compo nent/Secti on -->
  3222             
  3223     <xsl:templ ate 
  3224      match="n1: component/ n1:section "
  3225     >
  3226                       
  3227      <xsl:apply -templates  
  3228       select="n1 :title"
  3229      />
  3230                       
  3231      <xsl:choos e>
  3232                        
  3233                                 
  3234       <!-- Probl ems -->
  3235                                 
  3236       <xsl:when 
  3237        test="n1:c ode[@code= $loincProb lemCode]"
  3238       >
  3239                                           
  3240        <xsl:choos e>
  3241                                                    
  3242         <xsl:when 
  3243          test="n1:e ntry"
  3244         >
  3245                                                              
  3246          <xsl:call- template 
  3247           name="form atNarrativ eBlockComm ents"
  3248          >
  3249                                                                        
  3250           <xsl:with- param 
  3251            name="tabl e" 
  3252            select="n1 :text/n1:t able[@ID=$ problemsCo mmentsTabl eId]"
  3253           />
  3254                                                               
  3255          </xsl:call -template>
  3256                                                              
  3257          <xsl:call- template 
  3258           name="disp layProblem Table"
  3259          >
  3260                                                                        
  3261           <xsl:with- param 
  3262            select="./ n1:text/n1 :table[@ID =$problems TableId]" 
  3263            name="tabl e"
  3264           />
  3265                                                               
  3266          </xsl:call -template>
  3267                                                     
  3268         </xsl:when >
  3269                                                    
  3270         <xsl:other wise>
  3271                                                              
  3272          <xsl:apply -templates  
  3273           select="./ n1:text"
  3274          />                                 
  3275                                                     
  3276         </xsl:othe rwise>
  3277                                            
  3278        </xsl:choo se>
  3279                                  
  3280       </xsl:when >
  3281                                 
  3282                                 
  3283       <!-- Aller gies -->
  3284                                 
  3285       <xsl:when 
  3286        test="n1:c ode[@code= $loincAlle rgyCode]"
  3287       >
  3288                                           
  3289        <xsl:choos e>
  3290                                                    
  3291         <xsl:when 
  3292          test="n1:e ntry"
  3293         >
  3294                                                              
  3295          <xsl:call- template 
  3296           name="form atNarrativ eBlockComm ents"
  3297          >
  3298                                                                        
  3299           <xsl:with- param 
  3300            name="tabl e" 
  3301            select="n1 :text/n1:t able[@ID=$ allergiesC ommentTabl eId]"
  3302           />
  3303                                                               
  3304          </xsl:call -template>
  3305                                                              
  3306          <xsl:call- template 
  3307           name="disp layAllergy Table"
  3308          >
  3309                                                                        
  3310           <xsl:with- param 
  3311            name="tabl e" 
  3312            select="./ n1:text/n1 :table[@ID =$allergie sTableId]"
  3313           />
  3314                                                               
  3315          </xsl:call -template>
  3316                                                              
  3317          <xsl:call- template 
  3318           name="disp layAllergy ConsolTabl e"
  3319          >
  3320                                                                        
  3321           <xsl:with- param 
  3322            name="tabl e" 
  3323            select="./ n1:text/n1 :table[@ID =$allergie sTableCons olId]"
  3324           />
  3325                                                               
  3326          </xsl:call -template>
  3327                                                     
  3328         </xsl:when >
  3329                                                    
  3330         <xsl:other wise>
  3331                                                              
  3332          <xsl:apply -templates  
  3333           select="./ n1:text"
  3334          />                                 
  3335                                                     
  3336         </xsl:othe rwise>
  3337                                            
  3338        </xsl:choo se>
  3339                                  
  3340       </xsl:when >
  3341                                 
  3342                                 
  3343       <!-- Medic ations -->
  3344                                 
  3345       <xsl:when 
  3346        test="n1:c ode[@code= $loincMedC ode]"
  3347       >
  3348                                           
  3349        <xsl:choos e>
  3350                                                    
  3351         <xsl:when 
  3352          test="n1:e ntry"
  3353         >
  3354                                                              
  3355          <xsl:call- template 
  3356           name="form atNarrativ eBlockComm ents"
  3357          >
  3358                                                                        
  3359           <xsl:with- param 
  3360            name="tabl e" 
  3361            select="n1 :text/n1:t able[@ID=$ medication sCommentsT ableId]"
  3362           />
  3363                                                               
  3364          </xsl:call -template>
  3365                                                              
  3366          <xsl:call- template 
  3367           name="disp layMedsTab le"
  3368          >
  3369                                                                        
  3370           <xsl:with- param 
  3371            name="tabl e" 
  3372            select="./ n1:text/n1 :table[@ID =$medicati onsTableId ]"
  3373           />
  3374                                                               
  3375          </xsl:call -template>
  3376                                                     
  3377         </xsl:when >
  3378                                                    
  3379         <xsl:other wise>
  3380                                                              
  3381          <xsl:apply -templates  
  3382           select="./ n1:text"
  3383          />                                 
  3384                                                     
  3385         </xsl:othe rwise>
  3386                                            
  3387        </xsl:choo se>
  3388                                  
  3389       </xsl:when >
  3390                                 
  3391                                 
  3392       <!-- Encou nters -->
  3393                                 
  3394       <xsl:when 
  3395        test="n1:c ode[@code= $loincEnco unterCode] "
  3396       >
  3397                                           
  3398        <xsl:choos e>
  3399                                                    
  3400         <xsl:when 
  3401          test="n1:e ntry"
  3402         >
  3403                                                              
  3404          <xsl:call- template 
  3405           name="form atNarrativ eBlockComm ents"
  3406          >
  3407                                                                        
  3408           <xsl:with- param 
  3409            name="tabl e" 
  3410            select="n1 :text/n1:t able[@ID=$ encounters CommentsTa bleId]"
  3411           />
  3412                                                               
  3413          </xsl:call -template>
  3414                                                              
  3415          <xsl:call- template 
  3416           name="disp layEncount erTable"
  3417          >
  3418                                                                        
  3419           <xsl:with- param 
  3420            name="tabl e" 
  3421            select="./ n1:text/n1 :table[@ID =$encounte rsTableId]
  3422           />
  3423                                                               
  3424          </xsl:call -template>
  3425                                                     
  3426         </xsl:when >
  3427                                                    
  3428         <xsl:other wise>
  3429                                                              
  3430          <xsl:apply -templates  
  3431           select="./ n1:text"
  3432          />                                 
  3433                                                     
  3434         </xsl:othe rwise>
  3435                                            
  3436        </xsl:choo se>
  3437                                  
  3438       </xsl:when >
  3439                                 
  3440                                 
  3441       <!-- Resul ts -->
  3442                                 
  3443       <xsl:when 
  3444        test="n1:c ode[@code= $loincResu ltsCode]"
  3445       >
  3446                                           
  3447        <xsl:choos e>
  3448                                                    
  3449         <xsl:when 
  3450          test="n1:e ntry"
  3451         >
  3452                                                              
  3453          <xsl:call- template 
  3454           name="form atNarrativ eBlockComm ents"
  3455          >
  3456                                                                        
  3457           <xsl:with- param 
  3458            name="tabl e" 
  3459            select="n1 :text/n1:d iv[@ID=$re sultsDivId ]/n1:table [@ID=$resu ltsComment sTableId]"
  3460           />
  3461                                                               
  3462          </xsl:call -template>
  3463                                                              
  3464          <xsl:call- template 
  3465           name="disp layResults Table"
  3466          >
  3467                                                                        
  3468           <xsl:with- param  
  3469            name="tabl e" 
  3470            select="./ n1:text/n1 :div[@ID=$ resultsDiv Id]/n1:tab le[@ID=$re sultsTable Id]"
  3471           />
  3472                                                               
  3473          </xsl:call -template>
  3474                                                     
  3475         </xsl:when >
  3476                                                    
  3477         <xsl:other wise>
  3478                                                              
  3479          <xsl:apply -templates  
  3480           select="./ n1:text"
  3481          />                                 
  3482                                                     
  3483         </xsl:othe rwise>
  3484                                            
  3485        </xsl:choo se>
  3486                                  
  3487       </xsl:when >
  3488                                 
  3489                                 
  3490       <!-- Proce dures -->
  3491                                 
  3492       <xsl:when 
  3493        test="n1:c ode[@code= $loincProc eduresCode ]"
  3494       >
  3495                                           
  3496        <xsl:choos e>
  3497                                                    
  3498         <xsl:when 
  3499          test="n1:e ntry"
  3500         >
  3501                                                              
  3502          <xsl:call- template 
  3503           name="form atNarrativ eBlockComm ents"
  3504          >
  3505                                                                        
  3506           <xsl:with- param 
  3507            name="tabl e" 
  3508            select="n1 :text/n1:t able[@ID=$ procedures CommentsTa bleId]"
  3509           />
  3510                                                               
  3511          </xsl:call -template>
  3512                                                              
  3513          <xsl:call- template 
  3514           name="disp layProcedu reTable"
  3515          >
  3516                                                                        
  3517           <xsl:with- param 
  3518            name="tabl e" 
  3519            select="./ n1:text/n1 :table[@ID =$procedur esTableId] "
  3520           />
  3521                                                               
  3522          </xsl:call -template>
  3523                                                     
  3524         </xsl:when >
  3525                                                    
  3526         <xsl:other wise>
  3527                                                              
  3528          <xsl:apply -templates  
  3529           select="./ n1:text"
  3530          />                                 
  3531                                                     
  3532         </xsl:othe rwise>
  3533                                            
  3534        </xsl:choo se>
  3535                                  
  3536       </xsl:when >
  3537                                 
  3538                                 
  3539       <!-- Immun izations - ->
  3540                                 
  3541       <xsl:when 
  3542        test="n1:c ode[@code= $loincImmu nizationsC ode]"
  3543       >
  3544                                           
  3545        <xsl:choos e>
  3546                                                    
  3547         <xsl:when 
  3548          test="n1:e ntry"
  3549         >
  3550                                                              
  3551          <xsl:call- template 
  3552           name="form atNarrativ eBlockComm ents"
  3553          >
  3554                                                                        
  3555           <xsl:with- param 
  3556            name="tabl e" 
  3557            select="n1 :text/n1:t able[@ID=$ immunizati onsComment sTableId]"
  3558           />
  3559                                                               
  3560          </xsl:call -template>
  3561                                                              
  3562          <xsl:call- template 
  3563           name="disp layImmuniz ationTable "
  3564          >
  3565                                                                        
  3566           <xsl:with- param 
  3567            name="tabl e" 
  3568            select="./ n1:text/n1 :table[@ID =$immuniza tionsTable Id]"
  3569           />
  3570                                                               
  3571          </xsl:call -template>
  3572                                                     
  3573         </xsl:when >
  3574                                                    
  3575         <xsl:other wise>
  3576                                                              
  3577          <xsl:apply -templates  
  3578           select="./ n1:text"
  3579          />                                 
  3580                                                     
  3581         </xsl:othe rwise>
  3582                                            
  3583        </xsl:choo se>
  3584                                  
  3585       </xsl:when >
  3586                                 
  3587                                 
  3588       <!-- Vital  Signs -->
  3589                                 
  3590       <xsl:when 
  3591        test="n1:c ode[@code= $loincVita lsCode]"
  3592       >
  3593                                           
  3594        <xsl:choos e>
  3595                                                    
  3596         <xsl:when 
  3597          test="n1:e ntry"
  3598         >
  3599                                                              
  3600          <xsl:call- template 
  3601           name="form atNarrativ eBlockComm ents"
  3602          >
  3603                                                                        
  3604           <xsl:with- param 
  3605            name="tabl e" 
  3606            select="n1 :text/n1:t able[@ID=$ vitalSigns CommentsTa bleId]"
  3607           />
  3608                                                               
  3609          </xsl:call -template>
  3610                                                              
  3611          <xsl:call- template 
  3612           name="disp layVitalsT able"
  3613          >
  3614                                                                        
  3615           <xsl:with- param 
  3616            name="tabl e" 
  3617            select="./ n1:text/n1 :table[@ID =$vitalSig nsTableId] "
  3618           />
  3619                                                               
  3620          </xsl:call -template>
  3621                                                     
  3622         </xsl:when >
  3623                                                    
  3624         <xsl:other wise>
  3625                                                              
  3626          <xsl:apply -templates  
  3627           select="./ n1:text"
  3628          />                                 
  3629                                                     
  3630         </xsl:othe rwise>
  3631                                            
  3632        </xsl:choo se>
  3633                                  
  3634       </xsl:when >
  3635                                 
  3636                                 
  3637       <!-- Advan ce Directi ves -->
  3638                                 
  3639       <xsl:when 
  3640        test="n1:c ode[@code= $loincAdvD irectivesC ode]"
  3641       >
  3642                                           
  3643        <xsl:choos e>
  3644                                                    
  3645         <xsl:when 
  3646          test="n1:e ntry"
  3647         >
  3648                                                              
  3649          <xsl:call- template 
  3650           name="form atNarrativ eBlockComm ents"
  3651          >
  3652                                                                        
  3653           <xsl:with- param 
  3654            name="tabl e" 
  3655            select="n1 :text/n1:t able[@ID=$ advDirecti vesComment sTableId]"
  3656           />
  3657                                                               
  3658          </xsl:call -template>
  3659                                                              
  3660          <xsl:call- template 
  3661           name="disp layAdvDire ctivesTabl e"
  3662          >
  3663                                                                        
  3664           <xsl:with- param 
  3665            name="tabl e" 
  3666            select="./ n1:text/n1 :table[@ID =$advDirec tivesTable Id]"
  3667           />
  3668                                                               
  3669          </xsl:call -template>
  3670                                                     
  3671         </xsl:when >
  3672                                                    
  3673         <xsl:other wise>
  3674                                                              
  3675          <xsl:apply -templates  
  3676           select="./ n1:text"
  3677          />                                 
  3678                                                     
  3679         </xsl:othe rwise>
  3680                                            
  3681        </xsl:choo se>
  3682                                  
  3683       </xsl:when >
  3684                                 
  3685                                 
  3686       <!-- Payme nt Sources  (Insuranc e Provider ) -->
  3687                                 
  3688       <xsl:when 
  3689        test="n1:c ode[@code= $loincPaym entSources Code]"
  3690       >
  3691                                           
  3692        <xsl:choos e>
  3693                                                    
  3694         <xsl:when 
  3695          test="n1:e ntry"
  3696         >
  3697                                                              
  3698          <xsl:call- template 
  3699           name="form atNarrativ eBlockComm ents"
  3700          >
  3701                                                                        
  3702           <xsl:with- param 
  3703            name="tabl e" 
  3704            select="n1 :text/n1:t able[@ID=$ payerComme ntsTableId ]"
  3705           />
  3706                                                               
  3707          </xsl:call -template>
  3708                                                              
  3709          <xsl:call- template 
  3710           name="disp layInsProv iderTable"
  3711          >
  3712                                                                        
  3713           <xsl:with- param 
  3714            name="tabl e" 
  3715            select="./ n1:text/n1 :table[@ID =$payerTab leId]"
  3716           />
  3717                                                               
  3718          </xsl:call -template>
  3719                                                     
  3720         </xsl:when >
  3721                                                    
  3722         <xsl:other wise>
  3723                                                              
  3724          <xsl:apply -templates  
  3725           select="./ n1:text"
  3726          />                                 
  3727                                                     
  3728         </xsl:othe rwise>
  3729                                            
  3730        </xsl:choo se>
  3731                                  
  3732       </xsl:when >
  3733      
  3734                                 
  3735       <!-- Treat ment Plan  (Plan of C are) -->
  3736                                 
  3737       <xsl:when 
  3738        test="n1:c ode[@code= $loincPlan OfCareCode ]"
  3739       >
  3740                                           
  3741        <xsl:choos e>
  3742                                                    
  3743         <xsl:when 
  3744          test="n1:e ntry"
  3745         >
  3746                                                     
  3747                                                              
  3748          <xsl:call- template 
  3749           name="form atNarrativ eBlockComm ents"
  3750          >
  3751                                                                        
  3752           <xsl:with- param 
  3753            name="tabl e" 
  3754            select="n1 :text/n1:d iv[@ID=$pl anOfCareDi vId]/n1:ta ble[@id=$p lanOfCareC ommentsTab leId]"
  3755           />
  3756                                                               
  3757          </xsl:call -template>
  3758                                                              
  3759          <br/>
  3760                                                              
  3761                                                              
  3762          <!-- Futur e Encounte rs -->
  3763                                                              
  3764          <xsl:if 
  3765           test="n1:t ext/n1:div [@ID=$plan OfCareDivI d]/n1:div[ @id=$futur eEncounter sDivId]"
  3766          >
  3767                                                                        
  3768           <xsl:call- template 
  3769            name="disp layFutureE ncountersT able"
  3770           >
  3771                                                                                  
  3772            <xsl:with- param 
  3773             name="tabl e" 
  3774             select="n1 :text/n1:d iv[@ID=$pl anOfCareDi vId]/n1:di v[@id=$fut ureEncount ersDivId]/ n1:table[@ id=$future Encounters TableId]"
  3775            />
  3776                                                                         
  3777           </xsl:call -template>
  3778                                                               
  3779          </xsl:if>
  3780                                                              
  3781                                                              
  3782          <!-- Futur e Supply - ->
  3783                                                              
  3784          <xsl:if 
  3785           test="n1:t ext/n1:div [@ID=$plan OfCareDivI d]/n1:div[ @id=$futur eSupplyDiv Id]"
  3786          >
  3787                                                                        
  3788           <xsl:call- template 
  3789            name="disp layFutureS upplyTable "
  3790           >
  3791                                                                                  
  3792            <xsl:with- param 
  3793             name="tabl e" 
  3794             select="n1 :text/n1:d iv[@ID=$pl anOfCareDi vId]/n1:di v[@id=$fut ureSupplyD ivId]/n1:t able[@id=$ futureSupp lyTableId] "
  3795            />
  3796                                                                         
  3797           </xsl:call -template>
  3798                                                               
  3799          </xsl:if>
  3800                                                              
  3801                                                              
  3802          <!-- Futur e Act -->
  3803                                                              
  3804          <xsl:if 
  3805           test="n1:t ext/n1:div [@ID=$plan OfCareDivI d]/n1:div[ @id=$futur eActDivId] "
  3806          >
  3807                                                                        
  3808           <xsl:call- template 
  3809            name="disp layFutureA ctTable"
  3810           >
  3811                                                                                  
  3812            <xsl:with- param 
  3813             name="tabl e" 
  3814             select="n1 :text/n1:d iv[@ID=$pl anOfCareDi vId]/n1:di v[@id=$fut ureActDivI d]/n1:tabl e[@id=$fut ureActTabl eId]"
  3815            />
  3816                                                                         
  3817           </xsl:call -template>
  3818                                                               
  3819          </xsl:if>
  3820                                                              
  3821                                                              
  3822          <!-- Futur e Procedur e -->
  3823                                                              
  3824          <xsl:if 
  3825           test="n1:t ext/n1:div [@ID=$plan OfCareDivI d]/n1:div[ @id=$futur eProcedure DivId]"
  3826          >
  3827                                                                        
  3828           <xsl:call- template 
  3829            name="disp layFutureP rocedureTa ble"
  3830           >
  3831                                                                                  
  3832            <xsl:with- param 
  3833             name="tabl e" 
  3834             select="n1 :text/n1:d iv[@ID=$pl anOfCareDi vId]/n1:di v[@id=$fut ureProcedu reDivId]/n 1:table[@i d=$futureP rocedureTa bleId]"
  3835            />
  3836                                                                         
  3837           </xsl:call -template>
  3838                                                               
  3839          </xsl:if>
  3840                                                              
  3841                                                              
  3842          <!-- Futur e Substanc e -->
  3843                                                              
  3844          <xsl:if 
  3845           test="n1:t ext/n1:div [@ID=$plan OfCareDivI d]/n1:div[ @id=$futur eSubstance DivId]"
  3846          >
  3847                                                                        
  3848           <xsl:call- template 
  3849            name="disp layFutureS ubstanceTa ble"
  3850           >
  3851                                                                                           
  3852            <xsl:with- param 
  3853             name="tabl e" 
  3854             select="n1 :text/n1:d iv[@ID=$pl anOfCareDi vId]/n1:di v[@id=$fut ureSubstan ceDivId]/n 1:table[@i d=$futureS ubstanceTa bleId]"
  3855            />
  3856                                                                         
  3857           </xsl:call -template>
  3858                                                               
  3859          </xsl:if>
  3860                                                              
  3861                                                              
  3862          <!-- Futur e Observat ion -->
  3863                                                              
  3864          <xsl:if 
  3865           test="n1:t ext/n1:div [@ID=$plan OfCareDivI d]/n1:div[ @id=$futur eObservati onDivId]"
  3866          >
  3867                                                                        
  3868           <xsl:call- template 
  3869            name="disp layFutureO bservation Table"
  3870           >
  3871                                                                                  
  3872            <xsl:with- param 
  3873             name="tabl e" 
  3874             select="n1 :text/n1:d iv[@ID=$pl anOfCareDi vId]/n1:di v[@id=$fut ureObserva tionDivId] /n1:table[ @id=$futur eObservati onTableId] "
  3875            />
  3876                                                                         
  3877           </xsl:call -template>
  3878                                                               
  3879          </xsl:if>
  3880                                                     
  3881         </xsl:when >
  3882                                                    
  3883         <xsl:other wise>
  3884                                                              
  3885          <xsl:apply -templates  
  3886           select="./ n1:text"
  3887          />                                 
  3888                                                     
  3889         </xsl:othe rwise>
  3890                                            
  3891        </xsl:choo se>
  3892                                  
  3893       </xsl:when >
  3894                                 
  3895       <xsl:other wise/>
  3896                        
  3897      </xsl:choo se>
  3898              
  3899     </xsl:temp late>
  3900    
  3901             
  3902     <!-- Displ ay Vitals  Table -->
  3903             
  3904     <xsl:templ ate 
  3905      name="disp layVitalsT able"
  3906     >
  3907                       
  3908      <xsl:param  
  3909       name="tabl e"
  3910      />
  3911                       
  3912                       
  3913      <!--  Get  the table  -->
  3914                       
  3915      <table 
  3916       style="fon t-size:14p
  3917       border="1"
  3918      >
  3919                                 
  3920       <thead>
  3921                                           
  3922        <tr>
  3923                                                    
  3924         <xsl:for-e ach 
  3925          select="$t able/n1:th ead/n1:tr/ n1:th"
  3926         >
  3927                                                              
  3928          <th 
  3929           class="fir st"
  3930          >
  3931           <xsl:value -of 
  3932            select="."
  3933           />
  3934          </th>
  3935                                                     
  3936         </xsl:for- each>
  3937                                            
  3938        </tr>
  3939                                  
  3940       </thead>
  3941                                 
  3942       <tbody>
  3943                                           
  3944        <xsl:choos e>
  3945                                                    
  3946         <xsl:when 
  3947          test="./n1 :td[1]/n1: content"
  3948         >
  3949                                                              
  3950          <xsl:for-e ach 
  3951           select="$t able/n1:tb ody/n1:tr"
  3952          >
  3953                                                                        
  3954           <xsl:sort 
  3955            select="su bstring(no rmalize-sp ace(./n1:t d[1]/n1:co ntent),1,8 )" 
  3956            order="des cending"
  3957           />
  3958                                                                        
  3959           <tr 
  3960            class="sec ond"
  3961           >
  3962                                                                                  
  3963            <xsl:call- template 
  3964             name="disp layVitalsD ataRow"
  3965            >
  3966                                                                                            
  3967             <xsl:with- param 
  3968              name="tabl eRow" 
  3969              select="."
  3970             />
  3971                                                                                   
  3972            </xsl:call -template>
  3973                                                                         
  3974           </tr>
  3975                                                               
  3976          </xsl:for- each>
  3977                                                     
  3978         </xsl:when >
  3979                                                    
  3980         <xsl:other wise>
  3981                                                              
  3982          <xsl:for-e ach 
  3983           select="$t able/n1:tb ody/n1:tr"
  3984          >
  3985                                                                        
  3986           <xsl:sort 
  3987            select="su bstring(no rmalize-sp ace(./n1:t d[1]),1,8)
  3988            order="des cending"
  3989           />
  3990                                                                        
  3991           <tr 
  3992            class="sec ond"
  3993           >
  3994                                                                                  
  3995            <xsl:call- template 
  3996             name="disp layVitalsD ataRow"
  3997            >
  3998                                                                                            
  3999             <xsl:with- param 
  4000              name="tabl eRow" 
  4001              select="."
  4002             />
  4003                                                                                   
  4004            </xsl:call -template>
  4005                                                                         
  4006           </tr>
  4007                                                               
  4008          </xsl:for- each>
  4009                                                     
  4010         </xsl:othe rwise>
  4011                                            
  4012        </xsl:choo se>   
  4013                                  
  4014       </tbody>
  4015                        
  4016      </table>
  4017              
  4018     </xsl:temp late>
  4019             
  4020             
  4021     <xsl:templ ate 
  4022      name="disp layVitalsD ataRow"
  4023     >
  4024                       
  4025      <xsl:param  
  4026       name="tabl eRow"
  4027      />
  4028     
  4029                       
  4030      <xsl:varia ble 
  4031       name="date Value"
  4032      >
  4033                                 
  4034       <xsl:choos e>
  4035                                           
  4036        <xsl:when 
  4037         test="./n1 :td[1]/n1: content"
  4038        >
  4039                                                    
  4040         <xsl:value -of 
  4041          select="./ n1:td[1]/n 1:content"
  4042         /> 
  4043                                            
  4044        </xsl:when >
  4045                                           
  4046        <xsl:other wise>
  4047                                                    
  4048         <xsl:value -of 
  4049          select="./ n1:td[1]"
  4050         />
  4051                                            
  4052        </xsl:othe rwise>
  4053                                  
  4054       </xsl:choo se>
  4055                        
  4056      </xsl:vari able>
  4057                       
  4058                       
  4059      <xsl:varia ble 
  4060       name="date String"
  4061      >
  4062                                 
  4063       <xsl:call- template 
  4064        name="form atDateShor t"
  4065       >
  4066                                           
  4067        <xsl:with- param 
  4068         name="date String" 
  4069         select="no rmalize-sp ace($dateV alue)"
  4070        />
  4071                                  
  4072       </xsl:call -template>  
  4073                        
  4074      </xsl:vari able>
  4075                       
  4076                       
  4077      <xsl:for-e ach 
  4078       select="$t ableRow/n1 :td"
  4079      >
  4080                        
  4081                                 
  4082       <xsl:varia ble 
  4083        name="data Value"
  4084       >
  4085                                           
  4086        <xsl:choos e>
  4087                                                    
  4088         <xsl:when 
  4089          test="./n1 :content"
  4090         >
  4091                                                              
  4092          <xsl:value -of 
  4093           select="./ n1:content "
  4094          /> 
  4095                                                     
  4096         </xsl:when >
  4097                                                    
  4098         <xsl:other wise>
  4099                                                              
  4100          <xsl:value -of 
  4101           select="."
  4102          />
  4103                                                     
  4104         </xsl:othe rwise>
  4105                                            
  4106        </xsl:choo se>
  4107                                  
  4108       </xsl:vari able>
  4109      
  4110                                 
  4111       <td>
  4112                                           
  4113        <xsl:choos e>
  4114                                                    
  4115         <xsl:when 
  4116          test="posi tion()=1"
  4117         >
  4118           
  4119          <!-- Date/ Time -->
  4120                                                              
  4121          <div 
  4122           style="ove rflow:hidd en; white- space:nowr ap; width: 150px;"
  4123          >
  4124                                                               
  4125           <xsl:call- template 
  4126            name="flyo verSpan"
  4127           >
  4128                                                                         
  4129            <xsl:with- param 
  4130             name="data
  4131             select="$d ateString"  
  4132            />
  4133                                                                         
  4134            <xsl:with- param 
  4135             name="free Text" 
  4136             select="''
  4137            />
  4138                                                                         
  4139            <xsl:with- param 
  4140             name="deSq uigglefy" 
  4141             select="''
  4142            />
  4143                                                                
  4144           </xsl:call -template>
  4145                                                               
  4146          </div>
  4147                                                     
  4148         </xsl:when >
  4149                                                    
  4150         <xsl:when 
  4151          test="posi tion()=2"
  4152         >
  4153           
  4154          <!-- TEMP  -->
  4155                                                              
  4156          <div 
  4157           style="ove rflow:hidd en; white- space:nowr ap; width: 100px;"
  4158          >
  4159                                                               
  4160           <xsl:call- template 
  4161            name="disp layVitalsE ntry"
  4162           >
  4163                                                                         
  4164            <xsl:with- param 
  4165             name="stri ng" 
  4166             select="$d ataValue" 
  4167            />
  4168                                                                         
  4169            <xsl:with- param 
  4170             name="deli miter" 
  4171             select="'/ /'" 
  4172            />
  4173                                                                
  4174           </xsl:call -template>
  4175                                                               
  4176          </div>
  4177                                                     
  4178         </xsl:when >
  4179                                                    
  4180         <xsl:when 
  4181          test="posi tion()=3"
  4182         >
  4183           
  4184          <!-- Heart  Rate -->
  4185                                                              
  4186          <div 
  4187           style="ove rflow:hidd en; white- space:nowr ap; width: 100px;"
  4188          >
  4189                                                               
  4190           <xsl:call- template 
  4191            name="disp layVitalsE ntry"
  4192           >
  4193                                                                         
  4194            <xsl:with- param 
  4195             name="stri ng" 
  4196             select="$d ataValue" 
  4197            />
  4198                                                                         
  4199            <xsl:with- param 
  4200             name="deli miter" 
  4201             select="'/ /'" 
  4202            />
  4203                                                                
  4204           </xsl:call -template>
  4205                                                               
  4206          </div>
  4207                                                     
  4208         </xsl:when >
  4209                                                    
  4210         <xsl:when 
  4211          test="posi tion()=4"
  4212         >
  4213           
  4214          <!-- Respi tory Rate  -->
  4215                                                              
  4216          <div 
  4217           style="ove rflow:hidd en; white- space:nowr ap; width: 300px;"
  4218          >
  4219                                                               
  4220           <xsl:call- template 
  4221            name="disp layVitalsE ntry"
  4222           >
  4223                                                                         
  4224            <xsl:with- param 
  4225             name="stri ng" 
  4226             select="$d ataValue" 
  4227            />
  4228                                                                         
  4229            <xsl:with- param 
  4230             name="deli miter" 
  4231             select="'/ /'" 
  4232            />
  4233                                                                
  4234           </xsl:call -template>
  4235                                                               
  4236          </div>
  4237                                                     
  4238         </xsl:when >
  4239                                                    
  4240         <xsl:when 
  4241          test="posi tion()=5"
  4242         >
  4243           
  4244          <!-- BP -- >
  4245                                                              
  4246          <div 
  4247           style="ove rflow:hidd en; white- space:nowr ap; width: 100px;"
  4248          >
  4249                                                               
  4250           <xsl:call- template 
  4251            name="disp layVitalsE ntry"
  4252           >
  4253                                                                         
  4254            <xsl:with- param 
  4255             name="stri ng" 
  4256             select="$d ataValue" 
  4257            />
  4258                                                                         
  4259            <xsl:with- param 
  4260             name="deli miter" 
  4261             select="'/ /'" 
  4262            />
  4263                                                                
  4264           </xsl:call -template>
  4265                                                               
  4266          </div>
  4267                                                     
  4268         </xsl:when >
  4269                                                    
  4270         <xsl:when 
  4271          test="posi tion()=6"
  4272         >
  4273           
  4274          <!-- Heigh t -->
  4275                                                              
  4276          <div 
  4277           style="ove rflow:hidd en; white- space:nowr ap; width: 100px;"
  4278          >
  4279                                                               
  4280           <xsl:call- template 
  4281            name="disp layVitalsE ntry"
  4282           >
  4283                                                                         
  4284            <xsl:with- param 
  4285             name="stri ng" 
  4286             select="$d ataValue" 
  4287            />
  4288                                                                         
  4289            <xsl:with- param 
  4290             name="deli miter" 
  4291             select="'/ /'" 
  4292            />
  4293                                                                
  4294           </xsl:call -template>
  4295                                                               
  4296          </div>
  4297                                                     
  4298         </xsl:when >
  4299                                                    
  4300         <xsl:when 
  4301          test="posi tion()=7"
  4302         >
  4303           
  4304          <!-- Heigh t Lying -- >
  4305                                                              
  4306          <div 
  4307           style="ove rflow:hidd en; white- space:nowr ap; width: 100px;;"
  4308          >
  4309                                                               
  4310           <xsl:call- template 
  4311            name="disp layVitalsE ntry"
  4312           >
  4313                                                                         
  4314            <xsl:with- param 
  4315             name="stri ng" 
  4316             select="$d ataValue" 
  4317            />
  4318                                                                         
  4319            <xsl:with- param 
  4320             name="deli miter" 
  4321             select="'/ /'" 
  4322            />
  4323                                                                
  4324           </xsl:call -template>
  4325                                                               
  4326          </div>
  4327                                                     
  4328         </xsl:when >
  4329                                                    
  4330         <xsl:when 
  4331          test="posi tion()=8"
  4332         >
  4333           
  4334          <!-- BMI - ->
  4335                                                              
  4336          <div 
  4337           style="ove rflow:hidd en; white- space:nowr ap; width: 100px;;"
  4338          >
  4339                                                               
  4340           <xsl:call- template 
  4341            name="disp layVitalsE ntry"
  4342           >
  4343                                                                         
  4344            <xsl:with- param 
  4345             name="stri ng" 
  4346             select="$d ataValue" 
  4347            />
  4348                                                                         
  4349            <xsl:with- param 
  4350             name="deli miter" 
  4351             select="'/ /'" 
  4352            />
  4353                                                                
  4354           </xsl:call -template>
  4355                                                               
  4356          </div>
  4357                                                     
  4358         </xsl:when >
  4359                                                    
  4360         <xsl:when 
  4361          test="posi tion()=9"
  4362         >
  4363           
  4364          <!-- Weigh t -->
  4365                                                              
  4366          <div 
  4367           style="ove rflow:hidd en; white- space:nowr ap; width: 100px;;"
  4368          >
  4369                                                               
  4370           <xsl:call- template 
  4371            name="disp layVitalsE ntry"
  4372           >
  4373                                                                         
  4374            <xsl:with- param 
  4375             name="stri ng" 
  4376             select="$d ataValue" 
  4377            />
  4378                                                                         
  4379            <xsl:with- param 
  4380             name="deli miter" 
  4381             select="'/ /'" 
  4382            />
  4383                                                                
  4384           </xsl:call -template>
  4385                                                               
  4386          </div>
  4387                                                     
  4388         </xsl:when >
  4389                                                    
  4390         <xsl:when 
  4391          test="posi tion()=10"
  4392         >
  4393           
  4394          <!-- O2 Sa turation - ->
  4395                                                              
  4396          <div 
  4397           style="ove rflow:hidd en; white- space:nowr ap; width: 100px;"
  4398          >
  4399                                                               
  4400           <xsl:call- template 
  4401            name="disp layVitalsE ntry"
  4402           >
  4403                                                                         
  4404            <xsl:with- param 
  4405             name="stri ng" 
  4406             select="$d ataValue" 
  4407            />
  4408                                                                         
  4409            <xsl:with- param 
  4410             name="deli miter" 
  4411             select="'/ /'" 
  4412            />
  4413                                                                
  4414           </xsl:call -template>
  4415                                                               
  4416          </div>
  4417                                                     
  4418         </xsl:when >
  4419                                                    
  4420         <xsl:when 
  4421          test="posi tion()=11"
  4422         >
  4423           
  4424          <!-- Head  Circumfere nce -->
  4425                                                              
  4426          <div 
  4427           style="ove rflow:hidd en; white- space:nowr ap; width: 100px;"
  4428          >
  4429                                                               
  4430           <xsl:call- template 
  4431            name="disp layVitalsE ntry"
  4432           >
  4433                                                                         
  4434            <xsl:with- param 
  4435             name="stri ng" 
  4436             select="$d ataValue" 
  4437            />
  4438                                                                         
  4439            <xsl:with- param 
  4440             name="deli miter" 
  4441             select="'/ /'" 
  4442            />
  4443                                                                
  4444           </xsl:call -template>
  4445                                                      
  4446          </div>
  4447                                                     
  4448         </xsl:when >
  4449                                                    
  4450         <xsl:when 
  4451          test="posi tion()=12"
  4452         >
  4453           
  4454          <!-- Body  Surface Ar ea -->
  4455                                                              
  4456          <div 
  4457           style="ove rflow:hidd en; white- space:nowr ap; width: 150px;"
  4458          >
  4459                                                               
  4460           <xsl:call- template 
  4461            name="disp layVitalsE ntry"
  4462           >
  4463                                                                         
  4464            <xsl:with- param 
  4465             name="stri ng" 
  4466             select="$d ataValue" 
  4467            />
  4468                                                                         
  4469            <xsl:with- param 
  4470             name="deli miter" 
  4471             select="'/ /'" 
  4472            />
  4473                                                                
  4474           </xsl:call -template>
  4475                                                               
  4476          </div>
  4477                                                     
  4478         </xsl:when >
  4479                                                    
  4480         <xsl:when 
  4481          test="posi tion()=13"
  4482         >
  4483           
  4484          <!-- Sourc e -->
  4485                                                              
  4486          <div 
  4487           style="ove rflow:hidd en; white- space:nowr ap; width: 280px;"
  4488          >
  4489                                                               
  4490           <xsl:call- template 
  4491            name="disp layVitalsE ntry"
  4492           >
  4493                                                                         
  4494            <xsl:with- param 
  4495             name="stri ng" 
  4496             select="$d ataValue" 
  4497            />
  4498                                                                         
  4499            <xsl:with- param 
  4500             name="deli miter" 
  4501             select="'/ /'" 
  4502            />
  4503                                                                
  4504           </xsl:call -template>
  4505                                                               
  4506          </div>
  4507                                                     
  4508         </xsl:when >
  4509                                            
  4510        </xsl:choo se>
  4511                                  
  4512       </td>
  4513                        
  4514      </xsl:for- each>
  4515              
  4516     </xsl:temp late>
  4517             
  4518             
  4519     <xsl:templ ate 
  4520      name="disp layVitalsE ntry"
  4521     >
  4522                       
  4523      <xsl:param  
  4524       name="stri ng" 
  4525      />
  4526                       
  4527      <xsl:param  
  4528       name="deli miter" 
  4529      />
  4530                       
  4531                       
  4532      <xsl:choos e>
  4533                                 
  4534       <xsl:when 
  4535        test="$del imiter and  contains( $string, $ delimiter) "
  4536       >
  4537                                  
  4538                                           
  4539        <xsl:call- template 
  4540         name="flyo verSpan"
  4541        >
  4542                                                    
  4543         <xsl:with- param 
  4544          name="data
  4545          select="su bstring-be fore($stri ng, $delim iter)" 
  4546         />
  4547                                                    
  4548         <xsl:with- param 
  4549          name="free Text" 
  4550          select="''
  4551         />
  4552                                                    
  4553         <xsl:with- param 
  4554          name="deSq uigglefy" 
  4555          select="''
  4556         />
  4557                                            
  4558        </xsl:call -template>
  4559                                           
  4560        <hr/>
  4561                                           
  4562                                           
  4563        <!-- call  myself to  display th e other to kens -->
  4564                                           
  4565        <xsl:call- template 
  4566         name="disp layVitalsE ntry"
  4567        >
  4568                                                    
  4569         <xsl:with- param 
  4570          name="stri ng" 
  4571          select="su bstring-af ter($strin g, $delimi ter)" 
  4572         />
  4573                                                    
  4574         <xsl:with- param 
  4575          name="deli miter" 
  4576          select="$d elimiter" 
  4577         />
  4578                                            
  4579        </xsl:call -template>
  4580                                           
  4581                                  
  4582       </xsl:when >
  4583                                 
  4584       <xsl:other wise>
  4585                                           
  4586        <xsl:call- template 
  4587         name="flyo verSpan"
  4588        >
  4589                                                    
  4590         <xsl:with- param 
  4591          name="data
  4592          select="$s tring" 
  4593         />
  4594                                                    
  4595         <xsl:with- param 
  4596          name="free Text" 
  4597          select="''
  4598         />
  4599                                                    
  4600         <xsl:with- param 
  4601          name="deSq uigglefy" 
  4602          select="''
  4603         />
  4604                                            
  4605        </xsl:call -template>
  4606                                  
  4607       </xsl:othe rwise>
  4608                        
  4609      </xsl:choo se>
  4610              
  4611     </xsl:temp late>
  4612    
  4613             
  4614     <!-- Displ ay Encount er Table - ->
  4615             
  4616     <xsl:templ ate 
  4617      name="disp layEncount erTable"
  4618     >
  4619                       
  4620      <xsl:param  
  4621       name="tabl e"
  4622      />
  4623                       
  4624                       
  4625      <!--  Get  the table  -->
  4626                       
  4627      <table 
  4628       style="fon t-size:14p
  4629       border="1"
  4630      >
  4631                                 
  4632       <thead>
  4633                                           
  4634        <tr>
  4635                                                    
  4636         <xsl:for-e ach 
  4637          select="$t able/n1:th ead/n1:tr/ n1:th"
  4638         >
  4639                                                              
  4640          <th 
  4641           class="fir st"
  4642          >
  4643           <xsl:value -of 
  4644            select="."
  4645           />
  4646          </th>
  4647                                                     
  4648         </xsl:for- each>
  4649                                            
  4650        </tr>
  4651                                  
  4652       </thead>
  4653                                 
  4654       <tbody>
  4655                                           
  4656        <xsl:choos e>
  4657                                                    
  4658         <xsl:when 
  4659          test="./n1 :td[1]/n1: content"
  4660         >
  4661                                                              
  4662          <xsl:for-e ach 
  4663           select="$t able/n1:tb ody/n1:tr"
  4664          >
  4665                                                                        
  4666           <xsl:sort 
  4667            select="su bstring(no rmalize-sp ace(./n1:t d[1]/n1:co ntent),1,8 )" 
  4668            order="des cending"
  4669           />
  4670                                                                        
  4671           <tr 
  4672            class="sec ond"
  4673           >
  4674                                                                                  
  4675            <xsl:call- template 
  4676             name="disp layEncount erDataRow"
  4677            >
  4678                                                                                            
  4679             <xsl:with- param 
  4680              name="tabl eRow" 
  4681              select="."
  4682             />
  4683                                                                                   
  4684            </xsl:call -template>
  4685                                                                         
  4686           </tr>
  4687                                                               
  4688          </xsl:for- each>
  4689                                                     
  4690         </xsl:when >
  4691                                                    
  4692         <xsl:other wise>
  4693                                                              
  4694          <xsl:for-e ach 
  4695           select="$t able/n1:tb ody/n1:tr"
  4696          >                                                            
  4697                                                                        
  4698           <xsl:sort 
  4699            select="su bstring(no rmalize-sp ace(./n1:t d[1]),1,8)
  4700            order="des cending"
  4701           />
  4702                                                                        
  4703           <tr 
  4704            class="sec ond"
  4705           >
  4706                                                                                  
  4707            <xsl:call- template 
  4708             name="disp layEncount erDataRow"
  4709            >
  4710                                                                                            
  4711             <xsl:with- param 
  4712              name="tabl eRow" 
  4713              select="."
  4714             />
  4715                                                                                   
  4716            </xsl:call -template>
  4717                                                                         
  4718           </tr>
  4719                                                               
  4720          </xsl:for- each>
  4721                                                     
  4722         </xsl:othe rwise>
  4723                                            
  4724        </xsl:choo se>   
  4725                                  
  4726       </tbody>
  4727                        
  4728      </table>
  4729              
  4730     </xsl:temp late>
  4731             
  4732             
  4733     <xsl:templ ate 
  4734      name="disp layEncount erDataRow"
  4735     >
  4736                       
  4737      <xsl:param  
  4738       name="tabl eRow"
  4739      />
  4740     
  4741                       
  4742      <xsl:varia ble 
  4743       name="date Value"
  4744      >
  4745                                 
  4746       <xsl:choos e>
  4747                                           
  4748        <xsl:when 
  4749         test="./n1 :td[1]/n1: content"
  4750        >
  4751                                                    
  4752         <xsl:value -of 
  4753          select="./ n1:td[1]/n 1:content"
  4754         /> 
  4755                                            
  4756        </xsl:when >
  4757                                           
  4758        <xsl:other wise>
  4759                                                    
  4760         <xsl:value -of 
  4761          select="./ n1:td[1]"
  4762         />
  4763                                            
  4764        </xsl:othe rwise>
  4765                                  
  4766       </xsl:choo se>
  4767                        
  4768      </xsl:vari able>
  4769                       
  4770                       
  4771      <xsl:varia ble 
  4772       name="date String"
  4773      >
  4774                                 
  4775       <xsl:call- template 
  4776        name="conv ertDate"
  4777       >
  4778                                           
  4779        <xsl:with- param 
  4780         name="date Value" 
  4781         select="no rmalize-sp ace($dateV alue)"
  4782        />
  4783                                  
  4784       </xsl:call -template>  
  4785                        
  4786      </xsl:vari able>
  4787                       
  4788                       
  4789      <xsl:for-e ach 
  4790       select="$t ableRow/n1 :td"
  4791      >
  4792                        
  4793                                 
  4794       <xsl:varia ble 
  4795        name="data Value"
  4796       >
  4797                                           
  4798        <xsl:choos e>
  4799                                                    
  4800         <xsl:when 
  4801          test="./n1 :content"
  4802         >
  4803                                                              
  4804          <xsl:value -of 
  4805           select="./ n1:content "
  4806          /> 
  4807                                                     
  4808         </xsl:when >
  4809                                                    
  4810         <xsl:other wise>
  4811                                                              
  4812          <xsl:value -of 
  4813           select="."
  4814          />
  4815                                                     
  4816         </xsl:othe rwise>
  4817                                            
  4818        </xsl:choo se>
  4819                                  
  4820       </xsl:vari able>
  4821                                 
  4822                                 
  4823       <td>
  4824                                           
  4825        <xsl:choos e>
  4826                                                    
  4827         <xsl:when 
  4828          test="posi tion()=1"
  4829         >
  4830           
  4831          <!-- Date/ Time -->
  4832                                                              
  4833          <div 
  4834           style="ove rflow:hidd en; white- space:nowr ap; width: auto; padd ing-right: 5px;"
  4835          >
  4836                                                               
  4837           <xsl:call- template 
  4838            name="flyo verSpan"
  4839           >
  4840                                                                         
  4841            <xsl:with- param 
  4842             name="data
  4843             select="$d ateString"  
  4844            />
  4845                                                                         
  4846            <xsl:with- param 
  4847             name="free Text" 
  4848             select="''
  4849            />
  4850                                                                         
  4851            <xsl:with- param 
  4852             name="deSq uigglefy" 
  4853             select="''
  4854            />
  4855                                                                
  4856           </xsl:call -template>
  4857                                                               
  4858          </div>
  4859                                                     
  4860         </xsl:when >
  4861                                                    
  4862         <xsl:when 
  4863          test="posi tion()=2"
  4864         >
  4865           
  4866          <!-- Encou nter Type  -->
  4867                                                              
  4868          <div 
  4869           style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  4870          >
  4871                                                               
  4872           <xsl:call- template 
  4873            name="flyo verSpan"
  4874           >
  4875                                                                         
  4876            <xsl:with- param 
  4877             name="data
  4878             select="$d ataValue" 
  4879            />
  4880                                                                         
  4881            <xsl:with- param 
  4882             name="free Text" 
  4883             select="'y es'" 
  4884            />
  4885                                                                         
  4886            <xsl:with- param 
  4887             name="deSq uigglefy" 
  4888             select="'y es'" 
  4889            />
  4890                                                                
  4891           </xsl:call -template>
  4892                                                               
  4893          </div>
  4894                                                     
  4895         </xsl:when >
  4896                                                    
  4897         <xsl:when 
  4898          test="posi tion()=3"
  4899         >
  4900           
  4901          <!-- Encou nter Descr iption -->
  4902                                                              
  4903          <div 
  4904           style="ove rflow:hidd en; white- space:nowr ap; width: 360px;heig ht:1em"
  4905          >
  4906                                                               
  4907           <xsl:call- template 
  4908            name="flyo verSpan"
  4909           >
  4910                                                                         
  4911            <xsl:with- param 
  4912             name="data
  4913             select="$d ataValue" 
  4914            />
  4915                                                                         
  4916            <xsl:with- param 
  4917             name="free Text" 
  4918             select="'y es'" 
  4919            />
  4920                                                                         
  4921            <xsl:with- param 
  4922             name="deSq uigglefy" 
  4923             select="'y es'" 
  4924            />
  4925                                                                
  4926           </xsl:call -template>
  4927                                                               
  4928          </div>
  4929                                                     
  4930         </xsl:when >
  4931                                                    
  4932         <xsl:when 
  4933          test="posi tion()=4"
  4934         >
  4935           
  4936          <!-- Free  Text -->
  4937                                                              
  4938          <xsl:varia ble 
  4939           name="data "
  4940          >
  4941                                                                        
  4942           <xsl:call- template 
  4943            name="repl aceSquiggl esWithBrea ks"
  4944           >
  4945                                                                                  
  4946            <xsl:with- param 
  4947             name="text
  4948             select="$d ataValue"
  4949            />
  4950                                                                         
  4951           </xsl:call -template>
  4952                                                               
  4953          </xsl:vari able>
  4954                                                              
  4955          <xsl:varia ble 
  4956           name="lenT est" 
  4957           select="st ring-lengt h($data)" 
  4958          />
  4959                                                              
  4960          <xsl:choos e>
  4961                                                                        
  4962           <xsl:when 
  4963            test="$len Test &gt;  25"
  4964           >
  4965                                                                                  
  4966            <textarea 
  4967             rows="10" 
  4968             style="ove rflow-y:au to;width:2 40px;text- align:left  resize:no ne"
  4969            >
  4970                                                                                            
  4971             <xsl:value -of 
  4972              select="$d ata"
  4973             />
  4974                                                                                   
  4975            </textarea >
  4976                                                                         
  4977           </xsl:when >
  4978                                                                        
  4979           <xsl:other wise>
  4980                                                                                  
  4981            <div 
  4982             style="ove rflow:hidd en; white- space:nowr ap; width: 360px;heig ht:1em"
  4983            >
  4984                                                                                            
  4985             <xsl:call- template 
  4986              name="flyo verSpan"
  4987             >
  4988                                                                                                     
  4989              <xsl:with- param 
  4990               name="data
  4991               select="$d ataValue" 
  4992              />
  4993                                                                                                     
  4994              <xsl:with- param 
  4995               name="free Text" 
  4996               select="'y es'" 
  4997              />
  4998                                                                                                     
  4999              <xsl:with- param 
  5000               name="deSq uigglefy" 
  5001               select="'y es'" 
  5002              />
  5003                                                                                             
  5004             </xsl:call -template>
  5005                                                                                   
  5006            </div>
  5007                                                                         
  5008           </xsl:othe rwise>         
  5009                                                               
  5010          </xsl:choo se>
  5011                                                     
  5012         </xsl:when >
  5013                                                    
  5014         <xsl:when 
  5015          test="posi tion()=5"
  5016         >
  5017           
  5018          <!-- Admis sion Type  -->
  5019                                                              
  5020          <div 
  5021           style="ove rflow:hidd en; white- space:nowr ap; width: 240px; pad ding-right :5px;"
  5022          >
  5023                                                               
  5024           <xsl:call- template 
  5025            name="flyo verSpan"
  5026           >
  5027                                                                         
  5028            <xsl:with- param 
  5029             name="data
  5030             select="$d ataValue" 
  5031            />
  5032                                                                         
  5033            <xsl:with- param 
  5034             name="free Text" 
  5035             select="'y es'" 
  5036            />
  5037                                                                         
  5038            <xsl:with- param 
  5039             name="deSq uigglefy" 
  5040             select="'y es'" 
  5041            />
  5042                                                                
  5043           </xsl:call -template>
  5044                                                               
  5045          </div>
  5046                                                     
  5047         </xsl:when >
  5048                                                    
  5049         <xsl:when 
  5050          test="posi tion()=6"
  5051         >
  5052           
  5053          <!-- Provi der -->
  5054                                                              
  5055          <div 
  5056           style="ove rflow:hidd en; white- space:nowr ap; width: 200px; pad ding-right :5px;"
  5057          >
  5058                                                               
  5059           <xsl:call- template 
  5060            name="flyo verSpan"
  5061           >
  5062                                                                         
  5063            <xsl:with- param 
  5064             name="data
  5065             select="$d ataValue" 
  5066            />
  5067                                                                         
  5068            <xsl:with- param 
  5069             name="free Text" 
  5070             select="'y es'" 
  5071            />
  5072                                                                         
  5073            <xsl:with- param 
  5074             name="deSq uigglefy" 
  5075             select="''
  5076            />
  5077                                                                
  5078           </xsl:call -template>
  5079                                                               
  5080          </div>
  5081                                                     
  5082         </xsl:when >
  5083                                                    
  5084         <xsl:when 
  5085          test="posi tion()=7"
  5086         >
  5087           
  5088          <!-- Admis sion Sourc e -->
  5089                                                              
  5090          <div 
  5091           style="ove rflow:hidd en; white- space:nowr ap; width: 100px; pad ding-right :5px;"
  5092          >
  5093                                                               
  5094           <xsl:call- template 
  5095            name="flyo verSpan"
  5096           >
  5097                                                                         
  5098            <xsl:with- param 
  5099             name="data
  5100             select="$d ataValue" 
  5101            />
  5102                                                                         
  5103            <xsl:with- param 
  5104             name="free Text" 
  5105             select="'y es'" 
  5106            />
  5107                                                                         
  5108            <xsl:with- param 
  5109             name="deSq uigglefy" 
  5110             select="''
  5111            />
  5112                                                                
  5113           </xsl:call -template>
  5114                                                               
  5115          </div>
  5116                                                     
  5117         </xsl:when >
  5118                                                    
  5119         <xsl:when 
  5120          test="posi tion()=8"
  5121         >
  5122           
  5123          <!-- Facil ity Locati on -->
  5124                                                              
  5125          <div 
  5126           style="ove rflow:hidd en; white- space:nowr ap; width: 100px; pad ding-right :5px;"
  5127          >
  5128                                                               
  5129           <xsl:call- template 
  5130            name="flyo verSpan"
  5131           >
  5132                                                                         
  5133            <xsl:with- param 
  5134             name="data
  5135             select="$d ataValue" 
  5136            />
  5137                                                                         
  5138            <xsl:with- param 
  5139             name="free Text" 
  5140             select="''
  5141            />
  5142                                                                         
  5143            <xsl:with- param 
  5144             name="deSq uigglefy" 
  5145             select="''
  5146            />
  5147                                                                
  5148           </xsl:call -template>
  5149                                                               
  5150          </div>
  5151                                                     
  5152         </xsl:when >
  5153                                                    
  5154         <xsl:when 
  5155          test="posi tion()=9"
  5156         >
  5157           
  5158          <!-- In Fa cility Dur ation -->
  5159                                                              
  5160          <div 
  5161           style="ove rflow:hidd en; white- space:nowr ap; width: 100px; pad ding-right :5px;"
  5162          >
  5163                                                               
  5164           <xsl:call- template 
  5165            name="flyo verSpan"
  5166           >
  5167                                                                         
  5168            <xsl:with- param 
  5169             name="data
  5170             select="$d ataValue" 
  5171            />
  5172                                                                         
  5173            <xsl:with- param 
  5174             name="free Text" 
  5175             select="''
  5176            />
  5177                                                                         
  5178            <xsl:with- param 
  5179             name="deSq uigglefy" 
  5180             select="''
  5181            />
  5182                                                                
  5183           </xsl:call -template>
  5184                                                               
  5185          </div>
  5186                                                     
  5187         </xsl:when >
  5188                                                    
  5189         <xsl:when 
  5190          test="posi tion()=10"
  5191         >
  5192           
  5193          <!-- Reaso n for Visi t -->
  5194                                                              
  5195          <div 
  5196           style="ove rflow:hidd en; white- space:nowr ap; width: 100px; pad ding-right :5px;"
  5197          >
  5198                                                               
  5199           <xsl:call- template 
  5200            name="flyo verSpan"
  5201           >
  5202                                                                         
  5203            <xsl:with- param 
  5204             name="data
  5205             select="$d ataValue" 
  5206            />
  5207                                                                         
  5208            <xsl:with- param 
  5209             name="free Text" 
  5210             select="''
  5211            />
  5212                                                                         
  5213            <xsl:with- param 
  5214             name="deSq uigglefy" 
  5215             select="''
  5216            />
  5217                                                                
  5218           </xsl:call -template>
  5219                                                               
  5220          </div>
  5221                                                     
  5222         </xsl:when >
  5223                                                    
  5224         <xsl:when 
  5225          test="posi tion()=11"
  5226         >
  5227           
  5228          <!-- Sourc e -->
  5229                                                              
  5230          <div 
  5231           style="ove rflow:hidd en; white- space:nowr ap; width: 200px; pad ding-right :5px;"
  5232          >
  5233                                                               
  5234           <xsl:call- template 
  5235            name="flyo verSpan"
  5236           >
  5237                                                                         
  5238            <xsl:with- param 
  5239             name="data
  5240             select="$d ataValue" 
  5241            />
  5242                                                                         
  5243            <xsl:with- param 
  5244             name="free Text" 
  5245             select="''
  5246            />
  5247                                                                         
  5248            <xsl:with- param 
  5249             name="deSq uigglefy" 
  5250             select="''
  5251            />
  5252                                                                
  5253           </xsl:call -template>
  5254                                                               
  5255          </div>
  5256                                                     
  5257         </xsl:when >
  5258                                                    
  5259         <xsl:when 
  5260          test="posi tion()=12"
  5261         >
  5262           
  5263          <!-- Patie nt Class - ->
  5264                                                              
  5265          <div 
  5266           style="ove rflow:hidd en; white- space:nowr ap; width: 200px; pad ding-right :5px;"
  5267          >
  5268                                                               
  5269           <xsl:call- template 
  5270            name="flyo verSpan"
  5271           >
  5272                                                                         
  5273            <xsl:with- param 
  5274             name="data
  5275             select="$d ataValue" 
  5276            />
  5277                                                                         
  5278            <xsl:with- param 
  5279             name="free Text" 
  5280             select="''
  5281            />
  5282                                                                         
  5283            <xsl:with- param 
  5284             name="deSq uigglefy" 
  5285             select="''
  5286            />
  5287                                                                
  5288           </xsl:call -template>
  5289                                                               
  5290          </div>
  5291                                                     
  5292         </xsl:when >
  5293                                                    
  5294         <xsl:when 
  5295          test="posi tion()=13"
  5296         >
  5297           
  5298          <!-- Disch arge Dispo sition -->
  5299                                                              
  5300          <div 
  5301           style="ove rflow:hidd en; white- space:nowr ap; width: 200px; pad ding-right :5px;"
  5302          >
  5303                                                               
  5304           <xsl:call- template 
  5305            name="flyo verSpan"
  5306           >
  5307                                                                         
  5308            <xsl:with- param 
  5309             name="data
  5310             select="$d ataValue" 
  5311            />
  5312                                                                         
  5313            <xsl:with- param 
  5314             name="free Text" 
  5315             select="''
  5316            />
  5317                                                                         
  5318            <xsl:with- param 
  5319             name="deSq uigglefy" 
  5320             select="''
  5321            />
  5322                                                                
  5323           </xsl:call -template>
  5324                                                               
  5325          </div>
  5326                                                     
  5327         </xsl:when >
  5328                                                    
  5329         <xsl:when 
  5330          test="posi tion()=14"
  5331         >
  5332           
  5333          <!--  HC F acility Na me -->
  5334                                                              
  5335          <div 
  5336           style="ove rflow:hidd en; white- space:nowr ap; width: 200px; pad ding-right :5px;"
  5337          >
  5338                                                               
  5339           <xsl:call- template 
  5340            name="flyo verSpan"
  5341           >
  5342                                                                         
  5343            <xsl:with- param 
  5344             name="data
  5345             select="$d ataValue" 
  5346            />
  5347                                                                         
  5348            <xsl:with- param 
  5349             name="free Text" 
  5350             select="''
  5351            />
  5352                                                                         
  5353            <xsl:with- param 
  5354             name="deSq uigglefy" 
  5355             select="''
  5356            />
  5357                                                                
  5358           </xsl:call -template>
  5359                                                               
  5360          </div>
  5361                                                     
  5362         </xsl:when >
  5363                                                    
  5364         <xsl:when 
  5365          test="posi tion()=15"
  5366         >
  5367           
  5368          <!--  HC F acility Lo cation -->
  5369                                                              
  5370          <div 
  5371           style="ove rflow:hidd en; white- space:nowr ap; width: 200px; pad ding-right :5px;"
  5372          >
  5373                                                               
  5374           <xsl:call- template 
  5375            name="flyo verSpan"
  5376           >
  5377                                                                         
  5378            <xsl:with- param 
  5379             name="data
  5380             select="$d ataValue" 
  5381            />
  5382                                                                         
  5383            <xsl:with- param 
  5384             name="free Text" 
  5385             select="''
  5386            />
  5387                                                                         
  5388            <xsl:with- param 
  5389             name="deSq uigglefy" 
  5390             select="''
  5391            />
  5392                                                                
  5393           </xsl:call -template>
  5394                                                               
  5395          </div>
  5396                                                     
  5397         </xsl:when >
  5398                                                    
  5399         <xsl:when 
  5400          test="posi tion()=16"
  5401         >
  5402           
  5403          <!--  HC F acility ID  -->
  5404                                                              
  5405          <div 
  5406           style="ove rflow:hidd en; white- space:nowr ap; width: 200px; pad ding-right :5px;"
  5407          >
  5408                                                               
  5409           <xsl:call- template 
  5410            name="flyo verSpan"
  5411           >
  5412                                                                         
  5413            <xsl:with- param 
  5414             name="data
  5415             select="$d ataValue" 
  5416            />
  5417                                                                         
  5418            <xsl:with- param 
  5419             name="free Text" 
  5420             select="''
  5421            />
  5422                                                                         
  5423            <xsl:with- param 
  5424             name="deSq uigglefy" 
  5425             select="''
  5426            />
  5427                                                                
  5428           </xsl:call -template>
  5429                                                               
  5430          </div>
  5431                                                     
  5432         </xsl:when >
  5433                                                    
  5434         <xsl:when 
  5435          test="posi tion()=17"
  5436         >
  5437           
  5438          <!-- HC Fa cility Add ress -->
  5439                                                              
  5440          <div 
  5441           style="ove rflow:hidd en; white- space:nowr ap; width: 200px; pad ding-right :5px;"
  5442          >
  5443                                                               
  5444           <xsl:call- template 
  5445            name="flyo verSpan"
  5446           >
  5447                                                                         
  5448            <xsl:with- param 
  5449             name="data
  5450             select="$d ataValue" 
  5451            />
  5452                                                                         
  5453            <xsl:with- param 
  5454             name="free Text" 
  5455             select="''
  5456            />
  5457                                                                         
  5458            <xsl:with- param 
  5459             name="deSq uigglefy" 
  5460             select="''
  5461            />
  5462                                                                
  5463           </xsl:call -template>
  5464                                                               
  5465          </div>
  5466                                                     
  5467         </xsl:when >
  5468                                            
  5469        </xsl:choo se>
  5470                                  
  5471       </td>
  5472                        
  5473      </xsl:for- each>
  5474              
  5475     </xsl:temp late>
  5476             
  5477             
  5478     <!-- Displ ay Vitals  Table -->
  5479             
  5480     <xsl:templ ate 
  5481      name="disp layMedsTab le"
  5482     >
  5483                       
  5484      <xsl:param  
  5485       name="tabl e"
  5486      />
  5487                       
  5488                       
  5489      <!--  Get  the table  -->
  5490                       
  5491      <table 
  5492       style="fon t-size:14p
  5493       border="1"
  5494      >
  5495                                 
  5496       <thead>
  5497                                           
  5498        <tr>
  5499                                                    
  5500         <xsl:for-e ach 
  5501          select="$t able/n1:th ead/n1:tr/ n1:th"
  5502         >
  5503                                                              
  5504          <th 
  5505           class="fir st"
  5506          >
  5507           <xsl:value -of 
  5508            select="."
  5509           />
  5510          </th>
  5511                                                     
  5512         </xsl:for- each>
  5513                                            
  5514        </tr>
  5515                                  
  5516       </thead>
  5517                                 
  5518       <tbody>
  5519                                           
  5520        <xsl:choos e>
  5521                                                    
  5522         <xsl:when 
  5523          test="./n1 :td[4]/n1: content"
  5524         >
  5525                                                              
  5526          <xsl:for-e ach 
  5527           select="$t able/n1:tb ody/n1:tr"
  5528          >
  5529                                                                        
  5530           <xsl:sort 
  5531            select="su bstring(no rmalize-sp ace(./n1:t d[4]/n1:co ntent),1,8 )" 
  5532            order="des cending"
  5533           />
  5534                                                                        
  5535           <tr 
  5536            class="sec ond"
  5537           >
  5538                                                                                  
  5539            <xsl:call- template 
  5540             name="disp layMedData Row"
  5541            >
  5542                                                                                            
  5543             <xsl:with- param 
  5544              name="tabl eRow" 
  5545              select="."
  5546             />
  5547                                                                                   
  5548            </xsl:call -template>
  5549                                                                         
  5550           </tr>
  5551                                                               
  5552          </xsl:for- each>
  5553                                                     
  5554         </xsl:when >
  5555                                                    
  5556         <xsl:other wise>
  5557                                                              
  5558          <xsl:for-e ach 
  5559           select="$t able/n1:tb ody/n1:tr"
  5560          >
  5561                                                                        
  5562           <xsl:sort 
  5563            select="su bstring(no rmalize-sp ace(./n1:t d[4]),1,8)
  5564            order="des cending"
  5565           />
  5566                                                                        
  5567           <tr 
  5568            class="sec ond"
  5569           >
  5570                                                                                  
  5571            <xsl:call- template 
  5572             name="disp layMedData Row"
  5573            >
  5574                                                                                            
  5575             <xsl:with- param 
  5576              name="tabl eRow" 
  5577              select="."
  5578             />
  5579                                                                                   
  5580            </xsl:call -template>
  5581                                                                         
  5582           </tr>
  5583                                                               
  5584          </xsl:for- each>
  5585                                                     
  5586         </xsl:othe rwise>
  5587                                            
  5588        </xsl:choo se>   
  5589                                  
  5590       </tbody>
  5591                        
  5592      </table>
  5593              
  5594     </xsl:temp late>
  5595             
  5596             
  5597     <xsl:templ ate 
  5598      name="disp layMedData Row"
  5599     >
  5600                       
  5601      <xsl:param  
  5602       name="tabl eRow"
  5603      />
  5604     
  5605                       
  5606      <xsl:varia ble 
  5607       name="onse tDateValue "
  5608      >
  5609                                 
  5610       <xsl:choos e>
  5611                                           
  5612        <xsl:when 
  5613         test="./n1 :td[4]/n1: content"
  5614        >
  5615                                                    
  5616         <xsl:value -of 
  5617          select="./ n1:td[4]/n 1:content"
  5618         /> 
  5619                                            
  5620        </xsl:when >
  5621                                           
  5622        <xsl:other wise>
  5623                                                    
  5624         <xsl:value -of 
  5625          select="./ n1:td[4]"
  5626         />
  5627                                            
  5628        </xsl:othe rwise>
  5629                                  
  5630       </xsl:choo se>
  5631                        
  5632      </xsl:vari able>
  5633                       
  5634                       
  5635      <xsl:varia ble 
  5636       name="orde rDateStrin g"
  5637      >
  5638                                 
  5639       <xsl:call- template 
  5640        name="form atDateShor t"
  5641       >
  5642                                           
  5643        <xsl:with- param 
  5644         name="date String" 
  5645         select="no rmalize-sp ace($onset DateValue) "
  5646        />
  5647                                  
  5648       </xsl:call -template>  
  5649                        
  5650      </xsl:vari able>
  5651                       
  5652                       
  5653      <xsl:varia ble 
  5654       name="expi rationDate Value"
  5655      >
  5656                                 
  5657       <xsl:choos e>
  5658                                           
  5659        <xsl:when 
  5660         test="./n1 :td[5]/n1: content"
  5661        >
  5662                                                    
  5663         <xsl:value -of 
  5664          select="./ n1:td[5]/n 1:content"
  5665         /> 
  5666                                            
  5667        </xsl:when >
  5668                                           
  5669        <xsl:other wise>
  5670                                                    
  5671         <xsl:value -of 
  5672          select="./ n1:td[5]"
  5673         />
  5674                                            
  5675        </xsl:othe rwise>
  5676                                  
  5677       </xsl:choo se>
  5678                        
  5679      </xsl:vari able>
  5680                       
  5681                       
  5682      <xsl:varia ble 
  5683       name="expi rationDate String"
  5684      >
  5685                                 
  5686       <xsl:call- template 
  5687        name="form atDateShor t"
  5688       >
  5689                                           
  5690        <xsl:with- param 
  5691         name="date String" 
  5692         select="no rmalize-sp ace($expir ationDateV alue)"
  5693        />
  5694                                  
  5695       </xsl:call -template>  
  5696                        
  5697      </xsl:vari able>
  5698                       
  5699                       
  5700      <xsl:varia ble 
  5701       name="fill edDateValu e"
  5702      >
  5703                                 
  5704       <xsl:choos e>
  5705                                           
  5706        <xsl:when 
  5707         test="./n1 :td[10]/n1 :content"
  5708        >
  5709                                                    
  5710         <xsl:value -of 
  5711          select="./ n1:td[10]/ n1:content "
  5712         /> 
  5713                                            
  5714        </xsl:when >
  5715                                           
  5716        <xsl:other wise>
  5717                                                    
  5718         <xsl:value -of 
  5719          select="./ n1:td[10]"
  5720         />
  5721                                            
  5722        </xsl:othe rwise>
  5723                                  
  5724       </xsl:choo se>
  5725                        
  5726      </xsl:vari able>
  5727                       
  5728                       
  5729      <xsl:varia ble 
  5730       name="fill edDateStri ng"
  5731      >
  5732                                 
  5733       <xsl:call- template 
  5734        name="form atDateShor t"
  5735       >
  5736                                           
  5737        <xsl:with- param 
  5738         name="date String" 
  5739         select="no rmalize-sp ace($fille dDateValue )"
  5740        />
  5741                                  
  5742       </xsl:call -template>  
  5743                        
  5744      </xsl:vari able>
  5745                       
  5746                       
  5747      <!-- Med s top date - ->
  5748                       
  5749      <xsl:varia ble 
  5750       name="stop Entry"
  5751      >
  5752                                 
  5753       <xsl:choos e>
  5754                                           
  5755        <xsl:when 
  5756         test="./n1 :td[14]/n1 :content"
  5757        >
  5758                                                    
  5759         <xsl:value -of 
  5760          select="./ n1:td[14]/ n1:content "
  5761         /> 
  5762                                            
  5763        </xsl:when >
  5764                                           
  5765        <xsl:other wise>
  5766                                                    
  5767         <xsl:value -of 
  5768          select="./ n1:td[14]"
  5769         />
  5770                                            
  5771        </xsl:othe rwise>
  5772                                  
  5773       </xsl:choo se>
  5774                        
  5775      </xsl:vari able>
  5776                                         
  5777                       
  5778      <xsl:varia ble 
  5779       name="stop EntryStrin g"
  5780      >
  5781                                 
  5782       <xsl:call- template 
  5783        name="conv ertDate"
  5784       >
  5785                                           
  5786        <xsl:with- param 
  5787         name="date Value" 
  5788         select="no rmalize-sp ace($stopE ntry)"
  5789        />
  5790                                  
  5791       </xsl:call -template>  
  5792                        
  5793      </xsl:vari able>
  5794                       
  5795                       
  5796      <!-- Admin istrative  Timing -->
  5797                       
  5798      <xsl:varia ble 
  5799       name="admi nTimingEnt ry"
  5800      >
  5801                                 
  5802       <xsl:choos e>
  5803                                           
  5804        <xsl:when 
  5805         test="./n1 :td[15]/n1 :content"
  5806        >
  5807                                                    
  5808         <xsl:value -of 
  5809          select="./ n1:td[15]/ n1:content "
  5810         /> 
  5811                                            
  5812        </xsl:when >
  5813                                           
  5814        <xsl:other wise>
  5815                                                    
  5816         <xsl:value -of 
  5817          select="./ n1:td[15]"
  5818         />
  5819                                            
  5820        </xsl:othe rwise>
  5821                                  
  5822       </xsl:choo se>
  5823                        
  5824      </xsl:vari able>
  5825                       
  5826                       
  5827      <xsl:varia ble 
  5828       name="admi nTimingStr ing"
  5829      >
  5830                                 
  5831       <xsl:call- template 
  5832        name="tran slateAdmin TimingEntr y"
  5833       >
  5834                                           
  5835        <xsl:with- param 
  5836         name="admi nTimingEnt ry" 
  5837         select="$a dminTiming Entry"
  5838        />
  5839                                  
  5840       </xsl:call -template>  
  5841                        
  5842      </xsl:vari able>
  5843     
  5844                       
  5845      <xsl:for-e ach 
  5846       select="$t ableRow/n1 :td"
  5847      >
  5848                        
  5849                                 
  5850       <xsl:varia ble 
  5851        name="data Value"
  5852       >
  5853                                           
  5854        <xsl:choos e>
  5855                                                    
  5856         <xsl:when 
  5857          test="./n1 :content"
  5858         >
  5859                                                              
  5860          <xsl:value -of 
  5861           select="./ n1:content "
  5862          /> 
  5863                                                     
  5864         </xsl:when >
  5865                                                    
  5866         <xsl:other wise>
  5867                                                              
  5868          <xsl:value -of 
  5869           select="."
  5870          />
  5871                                                     
  5872         </xsl:othe rwise>
  5873                                            
  5874        </xsl:choo se>
  5875                                  
  5876       </xsl:vari able>
  5877                                 
  5878                                 
  5879       <td>
  5880                                           
  5881        <xsl:choos e>
  5882                                                    
  5883         <xsl:when 
  5884          test="posi tion()=1"
  5885         >
  5886           
  5887          <!-- Medic ations -->  
  5888                                                              
  5889          <div 
  5890           style="ove rflow:hidd en; white- space:nowr ap; width: 280; paddi ng-right:5 px;"
  5891          >
  5892                                                               
  5893           <xsl:call- template 
  5894            name="flyo verSpan"
  5895           >
  5896                                                                         
  5897            <xsl:with- param 
  5898             name="data
  5899             select="$d ataValue" 
  5900            />
  5901                                                                         
  5902            <xsl:with- param 
  5903             name="free Text" 
  5904             select="''
  5905            />
  5906                                                                         
  5907            <xsl:with- param 
  5908             name="deSq uigglefy" 
  5909             select="''
  5910            />
  5911                                                                
  5912           </xsl:call -template>
  5913                                                               
  5914          </div>
  5915                                                     
  5916         </xsl:when >
  5917                                                    
  5918         <xsl:when 
  5919          test="posi tion()=2"
  5920         >
  5921           
  5922          <!-- Brand  Name -->
  5923                                                              
  5924          <div 
  5925           style="ove rflow:hidd en; white- space:nowr ap; width: 180px;"
  5926          >
  5927                                                               
  5928           <xsl:call- template 
  5929            name="flyo verSpan"
  5930           >
  5931                                                                         
  5932            <xsl:with- param 
  5933             name="data
  5934             select="$d ataValue" 
  5935            />
  5936                                                                         
  5937            <xsl:with- param 
  5938             name="free Text" 
  5939             select="''
  5940            />
  5941                                                                         
  5942            <xsl:with- param 
  5943             name="deSq uigglefy" 
  5944             select="''
  5945            />
  5946                                                                
  5947           </xsl:call -template>
  5948                                                               
  5949          </div>
  5950                                                     
  5951         </xsl:when >
  5952                                                    
  5953         <xsl:when 
  5954          test="posi tion()=3"
  5955         >
  5956           
  5957          <!-- Medic ation Stat us -->
  5958                                                              
  5959          <div 
  5960           style="ove rflow:hidd en; white- space:nowr ap; width: 100px;;"
  5961          >
  5962                                                               
  5963           <xsl:call- template 
  5964            name="flyo verSpan"
  5965           >
  5966                                                                         
  5967            <xsl:with- param 
  5968             name="data
  5969             select="$d ataValue" 
  5970            />
  5971                                                                         
  5972            <xsl:with- param 
  5973             name="free Text" 
  5974             select="''
  5975            />
  5976                                                                         
  5977            <xsl:with- param 
  5978             name="deSq uigglefy" 
  5979             select="''
  5980            />
  5981                                                                
  5982           </xsl:call -template>
  5983                                                               
  5984          </div>
  5985                                                     
  5986         </xsl:when >
  5987                                                    
  5988         <xsl:when 
  5989          test="posi tion()=4"
  5990         >
  5991           
  5992          <!-- Order  Date -->
  5993                                                              
  5994          <div 
  5995           style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  5996          >
  5997                                                               
  5998           <xsl:call- template 
  5999            name="flyo verSpan"
  6000           >
  6001                                                                         
  6002            <xsl:with- param 
  6003             name="data
  6004             select="$o rderDateSt ring" 
  6005            />
  6006                                                                         
  6007            <xsl:with- param 
  6008             name="free Text" 
  6009             select="''
  6010            />
  6011                                                                         
  6012            <xsl:with- param 
  6013             name="deSq uigglefy" 
  6014             select="''
  6015            />
  6016                                                                
  6017           </xsl:call -template>
  6018                                                               
  6019          </div>
  6020                                                     
  6021         </xsl:when >
  6022                                                    
  6023         <xsl:when 
  6024          test="posi tion()=5"
  6025         >
  6026           
  6027          <!-- Order  Expiratio n Date -->
  6028                                                              
  6029          <div 
  6030           style="ove rflow:hidd en; white- space:nowr ap; width: 100px;"
  6031          >
  6032                                                               
  6033           <xsl:call- template 
  6034            name="flyo verSpan"
  6035           >
  6036                                                                         
  6037            <xsl:with- param 
  6038             name="data
  6039             select="$e xpirationD ateString"  
  6040            />
  6041                                                                         
  6042            <xsl:with- param 
  6043             name="free Text" 
  6044             select="''
  6045            />
  6046                                                                         
  6047            <xsl:with- param 
  6048             name="deSq uigglefy" 
  6049             select="''
  6050            />
  6051                                                                
  6052           </xsl:call -template>
  6053                                                               
  6054          </div>
  6055                                                     
  6056         </xsl:when >
  6057                                                    
  6058         <xsl:when 
  6059          test="posi tion()=6"
  6060         >
  6061           
  6062          <!-- Provi der (Order ing) -->
  6063                                                              
  6064          <div 
  6065           style="ove rflow:hidd en; white- space:nowr ap; width: 140px;"
  6066          >
  6067                                                               
  6068           <xsl:call- template 
  6069            name="flyo verSpan"
  6070           >
  6071                                                                         
  6072            <xsl:with- param 
  6073             name="data
  6074             select="$d ataValue" 
  6075            />
  6076                                                                         
  6077            <xsl:with- param 
  6078             name="free Text" 
  6079             select="''
  6080            />
  6081                                                                         
  6082            <xsl:with- param 
  6083             name="deSq uigglefy" 
  6084             select="''
  6085            />
  6086                                                                
  6087           </xsl:call -template>
  6088                                                               
  6089          </div>
  6090                                                     
  6091         </xsl:when >
  6092                                                    
  6093         <xsl:when 
  6094          test="posi tion()=7"
  6095         >
  6096           
  6097          <!-- Presc ription Nu mber-->
  6098                                                              
  6099          <div 
  6100           style="ove rflow:hidd en; white- space:nowr ap; width: 100px;"
  6101          >
  6102                                                               
  6103           <xsl:call- template 
  6104            name="flyo verSpan"
  6105           >
  6106                                                                         
  6107            <xsl:with- param 
  6108             name="data
  6109             select="$d ataValue" 
  6110            />
  6111                                                                         
  6112            <xsl:with- param 
  6113             name="free Text" 
  6114             select="''
  6115            />
  6116                                                                         
  6117            <xsl:with- param 
  6118             name="deSq uigglefy" 
  6119             select="''
  6120            />
  6121                                                                
  6122           </xsl:call -template>
  6123                                                               
  6124          </div>
  6125                                                     
  6126         </xsl:when >
  6127                                                    
  6128         <xsl:when 
  6129          test="posi tion()=8"
  6130         >
  6131           
  6132          <!-- Fill  Status -->
  6133                                                              
  6134          <div 
  6135           style="ove rflow:hidd en; white- space:nowr ap; width: 100px;"
  6136          >
  6137                                                               
  6138           <xsl:call- template 
  6139            name="flyo verSpan"
  6140           >
  6141                                                                         
  6142            <xsl:with- param 
  6143             name="data
  6144             select="$d ataValue" 
  6145            />
  6146                                                                         
  6147            <xsl:with- param 
  6148             name="free Text" 
  6149             select="''
  6150            />
  6151                                                                         
  6152            <xsl:with- param 
  6153             name="deSq uigglefy" 
  6154             select="''
  6155            />
  6156                                                                
  6157           </xsl:call -template>
  6158                                                               
  6159          </div>
  6160                                                     
  6161         </xsl:when >
  6162                                                    
  6163         <xsl:when 
  6164          test="posi tion()=9"
  6165         >
  6166           
  6167          <!-- Quant ity Dispen sed -->
  6168                                                              
  6169          <div 
  6170           style="ove rflow:hidd en; white- space:nowr ap; width: 80px;"
  6171          >
  6172                                                               
  6173           <xsl:call- template 
  6174            name="flyo verSpan"
  6175           >
  6176                                                                         
  6177            <xsl:with- param 
  6178             name="data
  6179             select="$d ataValue" 
  6180            />
  6181                                                                         
  6182            <xsl:with- param 
  6183             name="free Text" 
  6184             select="''
  6185            />
  6186                                                                         
  6187            <xsl:with- param 
  6188             name="deSq uigglefy" 
  6189             select="''
  6190            />
  6191                                                                
  6192           </xsl:call -template>
  6193                                                               
  6194          </div>
  6195                                                     
  6196         </xsl:when >
  6197                                                    
  6198         <xsl:when 
  6199          test="posi tion()=10"
  6200         >
  6201           
  6202          <!-- Dispe nse Date   -->
  6203                                                              
  6204          <div 
  6205           style="ove rflow:hidd en; white- space:nowr ap; width: 100px;;"
  6206          >
  6207                                                               
  6208           <xsl:call- template 
  6209            name="flyo verSpan"
  6210           >
  6211                                                                         
  6212            <xsl:with- param 
  6213             name="data
  6214             select="$f illedDateS tring" 
  6215            />
  6216                                                                         
  6217            <xsl:with- param 
  6218             name="free Text" 
  6219             select="''
  6220            />
  6221                                                                         
  6222            <xsl:with- param 
  6223             name="deSq uigglefy" 
  6224             select="''
  6225            />
  6226                                                                
  6227           </xsl:call -template>
  6228                                                               
  6229          </div>
  6230                                                     
  6231         </xsl:when >
  6232                                                    
  6233         <xsl:when 
  6234          test="posi tion()=11"
  6235         >
  6236           
  6237          <!-- Sig - ->
  6238                                                              
  6239          <div 
  6240           style="ove rflow:hidd en; white- space:nowr ap; width: 300px;"
  6241          >
  6242                                                               
  6243           <xsl:call- template 
  6244            name="flyo verSpan"
  6245           >
  6246                                                                         
  6247            <xsl:with- param 
  6248             name="data
  6249             select="$d ataValue" 
  6250            />
  6251                                                                         
  6252            <xsl:with- param 
  6253             name="free Text" 
  6254             select="''
  6255            />
  6256                                                                         
  6257            <xsl:with- param 
  6258             name="deSq uigglefy" 
  6259             select="''
  6260            />
  6261                                                                
  6262           </xsl:call -template>
  6263                                                               
  6264          </div>
  6265                                                     
  6266         </xsl:when >
  6267                                                    
  6268         <xsl:when 
  6269          test="posi tion()=12"
  6270         >
  6271           
  6272          <!-- Sourc e -->
  6273                                                              
  6274          <div 
  6275           style="ove rflow:hidd en; white- space:nowr ap; width: 200px"
  6276          >
  6277                                                               
  6278           <xsl:call- template 
  6279            name="flyo verSpan"
  6280           >
  6281                                                                         
  6282            <xsl:with- param 
  6283             name="data
  6284             select="$d ataValue" 
  6285            />
  6286                                                                         
  6287            <xsl:with- param 
  6288             name="free Text" 
  6289             select="''
  6290            />
  6291                                                                         
  6292            <xsl:with- param 
  6293             name="deSq uigglefy" 
  6294             select="''
  6295            />
  6296                                                                
  6297           </xsl:call -template>
  6298                                                               
  6299          </div>
  6300                                                     
  6301         </xsl:when >
  6302                                                    
  6303         <xsl:when 
  6304          test="posi tion()=13"
  6305         >
  6306           
  6307          <!-- React ion -->
  6308                                                              
  6309          <div 
  6310           style="ove rflow:hidd en; white- space:nowr ap; width: 200px"
  6311          >
  6312                                                               
  6313           <xsl:call- template 
  6314            name="flyo verSpan"
  6315           >
  6316                                                                         
  6317            <xsl:with- param 
  6318             name="data
  6319             select="$d ataValue" 
  6320            />
  6321                                                                         
  6322            <xsl:with- param 
  6323             name="free Text" 
  6324             select="''
  6325            />
  6326                                                                         
  6327            <xsl:with- param 
  6328             name="deSq uigglefy" 
  6329             select="''
  6330            />
  6331                                                                
  6332           </xsl:call -template>
  6333                                                               
  6334          </div>
  6335                                                     
  6336         </xsl:when >
  6337                                                    
  6338         <xsl:when 
  6339          test="posi tion()=14"
  6340         >
  6341           
  6342          <!-- Indic ate Medica tion Stopp ed -->
  6343                                                              
  6344          <div 
  6345           style="ove rflow:hidd en; white- space:nowr ap; width: 280px"
  6346          >
  6347                                                               
  6348           <xsl:call- template 
  6349            name="flyo verSpan"
  6350           >
  6351                                                                         
  6352            <xsl:with- param 
  6353             name="data
  6354             select="$d ataValue" 
  6355            />
  6356                                                                         
  6357            <xsl:with- param 
  6358             name="free Text" 
  6359             select="''
  6360            />
  6361                                                                         
  6362            <xsl:with- param 
  6363             name="deSq uigglefy" 
  6364             select="''
  6365            />
  6366                                                                
  6367           </xsl:call -template>
  6368                                                               
  6369          </div>
  6370                                                     
  6371         </xsl:when >
  6372                                                    
  6373         <xsl:when 
  6374          test="posi tion()=15"
  6375         >
  6376           
  6377          <!-- Admin istrative  Timing -->
  6378                                                              
  6379          <div 
  6380           style="ove rflow:hidd en; white- space:nowr ap; width: 500px"
  6381          >
  6382                                                               
  6383           <xsl:call- template 
  6384            name="flyo verSpan"
  6385           >
  6386                                                                         
  6387            <xsl:with- param 
  6388             name="data
  6389             select="$a dminTiming String" 
  6390            />
  6391                                                                         
  6392            <xsl:with- param 
  6393             name="free Text" 
  6394             select="''
  6395            />
  6396                                                                         
  6397            <xsl:with- param 
  6398             name="deSq uigglefy" 
  6399             select="''
  6400            />
  6401                                                                
  6402           </xsl:call -template>
  6403                                                               
  6404          </div>
  6405                                                     
  6406         </xsl:when >
  6407                                                    
  6408         <xsl:when 
  6409          test="posi tion()=16"
  6410         >
  6411           
  6412          <!-- Route  Code -->
  6413                                                              
  6414          <div 
  6415           style="ove rflow:hidd en; white- space:nowr ap; width: 100px"
  6416          >
  6417                                                               
  6418           <xsl:call- template 
  6419            name="flyo verSpan"
  6420           >
  6421                                                                         
  6422            <xsl:with- param 
  6423             name="data
  6424             select="$d ataValue" 
  6425            />
  6426                                                                         
  6427            <xsl:with- param 
  6428             name="free Text" 
  6429             select="''
  6430            />
  6431                                                                         
  6432            <xsl:with- param 
  6433             name="deSq uigglefy" 
  6434             select="''
  6435            />
  6436                                                                
  6437           </xsl:call -template>
  6438                                                               
  6439          </div>
  6440                                                     
  6441         </xsl:when >
  6442                                                    
  6443         <xsl:when 
  6444          test="posi tion()=17"
  6445         >
  6446           
  6447          <!-- Body  Site -->
  6448                                                              
  6449          <div 
  6450           style="ove rflow:hidd en; white- space:nowr ap; width: 200px"
  6451          >
  6452                                                               
  6453           <xsl:call- template 
  6454            name="flyo verSpan"
  6455           >
  6456                                                                         
  6457            <xsl:with- param 
  6458             name="data
  6459             select="$d ataValue" 
  6460            />
  6461                                                                         
  6462            <xsl:with- param 
  6463             name="free Text" 
  6464             select="''
  6465            />
  6466                                                                         
  6467            <xsl:with- param 
  6468             name="deSq uigglefy" 
  6469             select="''
  6470            />
  6471                                                                
  6472           </xsl:call -template>
  6473                                                               
  6474          </div>
  6475                                                     
  6476         </xsl:when >
  6477                                                    
  6478         <xsl:when 
  6479          test="posi tion()=18"
  6480         >
  6481           
  6482          <!-- Dose  Qualtity - ->
  6483                                                              
  6484          <div 
  6485           style="ove rflow:hidd en; white- space:nowr ap; width: 100px"
  6486          >
  6487                                                               
  6488           <xsl:call- template 
  6489            name="flyo verSpan"
  6490           >
  6491                                                                         
  6492            <xsl:with- param 
  6493             name="data
  6494             select="$d ataValue" 
  6495            />
  6496                                                                         
  6497            <xsl:with- param 
  6498             name="free Text" 
  6499             select="''
  6500            />
  6501                                                                         
  6502            <xsl:with- param 
  6503             name="deSq uigglefy" 
  6504             select="''
  6505            />
  6506                                                                
  6507           </xsl:call -template>
  6508                                                               
  6509          </div>
  6510                                                     
  6511         </xsl:when >
  6512                                                    
  6513         <xsl:when 
  6514          test="posi tion()=19"
  6515         >
  6516           
  6517          <!-- Dose  Restrictio n -->
  6518                                                              
  6519          <div 
  6520           style="ove rflow:hidd en; white- space:nowr ap; width: 100px"
  6521          >
  6522                                                               
  6523           <xsl:call- template 
  6524            name="flyo verSpan"
  6525           >
  6526                                                                         
  6527            <xsl:with- param 
  6528             name="data
  6529             select="$d ataValue" 
  6530            />
  6531                                                                         
  6532            <xsl:with- param 
  6533             name="free Text" 
  6534             select="''
  6535            />
  6536                                                                         
  6537            <xsl:with- param 
  6538             name="deSq uigglefy" 
  6539             select="''
  6540            />
  6541                                                                
  6542           </xsl:call -template>
  6543                                                               
  6544          </div>
  6545                                                     
  6546         </xsl:when >
  6547                                                    
  6548         <xsl:when 
  6549          test="posi tion()=20"
  6550         >
  6551           
  6552          <!-- Produ ct Form -- >
  6553                                                              
  6554          <div 
  6555           style="ove rflow:hidd en; white- space:nowr ap; width: 100px"
  6556          >
  6557                                                               
  6558           <xsl:call- template 
  6559            name="flyo verSpan"
  6560           >
  6561                                                                         
  6562            <xsl:with- param 
  6563             name="data
  6564             select="$d ataValue" 
  6565            />
  6566                                                                         
  6567            <xsl:with- param 
  6568             name="free Text" 
  6569             select="''
  6570            />
  6571                                                                         
  6572            <xsl:with- param 
  6573             name="deSq uigglefy" 
  6574             select="''
  6575            />
  6576                                                                
  6577           </xsl:call -template>
  6578                                                               
  6579          </div>
  6580                                                     
  6581         </xsl:when >
  6582                                                    
  6583         <xsl:when 
  6584          test="posi tion()=21"
  6585         >
  6586           
  6587          <!-- Deliv ery Method  -->
  6588                                                              
  6589          <div 
  6590           style="ove rflow:hidd en; white- space:nowr ap; width: 100px"
  6591          >
  6592                                                               
  6593           <xsl:call- template 
  6594            name="flyo verSpan"
  6595           >
  6596                                                                         
  6597            <xsl:with- param 
  6598             name="data
  6599             select="$d ataValue" 
  6600            />
  6601                                                                         
  6602            <xsl:with- param 
  6603             name="free Text" 
  6604             select="''
  6605            />
  6606                                                                         
  6607            <xsl:with- param 
  6608             name="deSq uigglefy" 
  6609             select="''
  6610            />
  6611                                                                
  6612           </xsl:call -template>
  6613                                                               
  6614          </div>
  6615                                                     
  6616         </xsl:when >
  6617                                                    
  6618         <xsl:when 
  6619          test="posi tion()=22"
  6620         >
  6621           
  6622          <!--Drug M anufacture rd  -->
  6623                                                              
  6624          <div 
  6625           style="ove rflow:hidd en; white- space:nowr ap; width: 100px"
  6626          >
  6627                                                               
  6628           <xsl:call- template 
  6629            name="flyo verSpan"
  6630           >
  6631                                                                         
  6632            <xsl:with- param 
  6633             name="data
  6634             select="$d ataValue" 
  6635            />
  6636                                                                         
  6637            <xsl:with- param 
  6638             name="free Text" 
  6639             select="''
  6640            />
  6641                                                                         
  6642            <xsl:with- param 
  6643             name="deSq uigglefy" 
  6644             select="''
  6645            />
  6646                                                                
  6647           </xsl:call -template>
  6648                                                               
  6649          </div>
  6650                                                     
  6651         </xsl:when >
  6652                                                    
  6653         <xsl:when 
  6654          test="posi tion()=23"
  6655         >
  6656           
  6657          <!-- Medic ation Type  -->
  6658                                                              
  6659          <div 
  6660           style="ove rflow:hidd en; white- space:nowr ap; width: 100px"
  6661          >
  6662                                                               
  6663           <xsl:call- template 
  6664            name="flyo verSpan"
  6665           >
  6666                                                                         
  6667            <xsl:with- param 
  6668             name="data
  6669             select="$d ataValue" 
  6670            />
  6671                                                                         
  6672            <xsl:with- param 
  6673             name="free Text" 
  6674             select="''
  6675            />
  6676                                                                         
  6677            <xsl:with- param 
  6678             name="deSq uigglefy" 
  6679             select="''
  6680            />
  6681                                                                
  6682           </xsl:call -template>
  6683                                                               
  6684          </div>
  6685                                                     
  6686         </xsl:when >
  6687                                                    
  6688         <xsl:when 
  6689          test="posi tion()=24"
  6690         >
  6691           
  6692          <!-- Indic ation -->
  6693                                                              
  6694          <div 
  6695           style="ove rflow:hidd en; white- space:nowr ap; width: 100px"
  6696          >
  6697                                                               
  6698           <xsl:call- template 
  6699            name="flyo verSpan"
  6700           >
  6701                                                                         
  6702            <xsl:with- param 
  6703             name="data
  6704             select="$d ataValue" 
  6705            />
  6706                                                                         
  6707            <xsl:with- param 
  6708             name="free Text" 
  6709             select="''
  6710            />
  6711                                                                         
  6712            <xsl:with- param 
  6713             name="deSq uigglefy" 
  6714             select="''
  6715            />
  6716                                                                
  6717           </xsl:call -template>
  6718                                                               
  6719          </div>
  6720                                                     
  6721         </xsl:when >
  6722                                                    
  6723         <xsl:when 
  6724          test="posi tion()=25"
  6725         >
  6726           
  6727          <!-- Vehic le -->
  6728                                                              
  6729          <div 
  6730           style="ove rflow:hidd en; white- space:nowr ap; width: 100px"
  6731          >
  6732                                                               
  6733           <xsl:call- template 
  6734            name="flyo verSpan"
  6735           >
  6736                                                                         
  6737            <xsl:with- param 
  6738             name="data
  6739             select="$d ataValue" 
  6740            />
  6741                                                                         
  6742            <xsl:with- param 
  6743             name="free Text" 
  6744             select="''
  6745            />
  6746                                                                         
  6747            <xsl:with- param 
  6748             name="deSq uigglefy" 
  6749             select="''
  6750            />
  6751                                                                
  6752           </xsl:call -template>
  6753                                                               
  6754          </div>
  6755                                                     
  6756         </xsl:when >
  6757                                                    
  6758         <xsl:when 
  6759          test="posi tion()=26"
  6760         >
  6761           
  6762          <!-- Dose  Indicator  -->
  6763                                                              
  6764          <div 
  6765           style="ove rflow:hidd en; white- space:nowr ap; width: 100px"
  6766          >
  6767                                                               
  6768           <xsl:call- template 
  6769            name="flyo verSpan"
  6770           >
  6771                                                                         
  6772            <xsl:with- param 
  6773             name="data
  6774             select="$d ataValue" 
  6775            />
  6776                                                                         
  6777            <xsl:with- param 
  6778             name="free Text" 
  6779             select="''
  6780            />
  6781                                                                         
  6782            <xsl:with- param 
  6783             name="deSq uigglefy" 
  6784             select="''
  6785            />
  6786                                                                
  6787           </xsl:call -template>
  6788                                                               
  6789          </div>
  6790                                                     
  6791         </xsl:when >
  6792                                                    
  6793         <xsl:when 
  6794          test="posi tion()=27"
  6795         >
  6796           
  6797          <!-- Order  Number -- >
  6798                                                              
  6799          <div 
  6800           style="ove rflow:hidd en; white- space:nowr ap; width: 100px"
  6801          >
  6802                                                               
  6803           <xsl:call- template 
  6804            name="flyo verSpan"
  6805           >
  6806                                                                         
  6807            <xsl:with- param 
  6808             name="data
  6809             select="$d ataValue" 
  6810            />
  6811                                                                         
  6812            <xsl:with- param 
  6813             name="free Text" 
  6814             select="''
  6815            />
  6816                                                                         
  6817            <xsl:with- param 
  6818             name="deSq uigglefy" 
  6819             select="''
  6820            />
  6821                                                                
  6822           </xsl:call -template>
  6823                                                               
  6824          </div>
  6825                                                     
  6826         </xsl:when >
  6827                                                    
  6828         <xsl:when 
  6829          test="posi tion()=28"
  6830         >
  6831           
  6832          <!-- Total  Fills -->
  6833                                                              
  6834          <div 
  6835           style="ove rflow:hidd en; white- space:nowr ap; width: 100px"
  6836          >
  6837                                                               
  6838           <xsl:call- template 
  6839            name="flyo verSpan"
  6840           >
  6841                                                                         
  6842            <xsl:with- param 
  6843             name="data
  6844             select="$d ataValue" 
  6845            />
  6846                                                                         
  6847            <xsl:with- param 
  6848             name="free Text" 
  6849             select="''
  6850            />
  6851                                                                         
  6852            <xsl:with- param 
  6853             name="deSq uigglefy" 
  6854             select="''
  6855            />
  6856                                                                
  6857           </xsl:call -template>
  6858                                                               
  6859          </div>
  6860                                                     
  6861         </xsl:when >
  6862                                                    
  6863         <xsl:when 
  6864          test="posi tion()=29"
  6865         >
  6866           
  6867          <!-- Fulfi llment Ins tructions  -->
  6868                                                              
  6869          <div 
  6870           style="ove rflow:hidd en; white- space:nowr ap; width: 100px"
  6871          >
  6872                                                               
  6873           <xsl:call- template 
  6874            name="flyo verSpan"
  6875           >
  6876                                                                         
  6877            <xsl:with- param 
  6878             name="data
  6879             select="$d ataValue" 
  6880            />
  6881                                                                         
  6882            <xsl:with- param 
  6883             name="free Text" 
  6884             select="''
  6885            />
  6886                                                                         
  6887            <xsl:with- param 
  6888             name="deSq uigglefy" 
  6889             select="''
  6890            />
  6891                                                                
  6892           </xsl:call -template>
  6893                                                               
  6894          </div>
  6895                                                     
  6896         </xsl:when >
  6897                                                    
  6898         <xsl:when 
  6899          test="posi tion()=30"
  6900         >
  6901           
  6902          <!-- Dispe nsing Prov ider -->
  6903                                                              
  6904          <div 
  6905           style="ove rflow:hidd en; white- space:nowr ap; width: 100px"
  6906          >
  6907                                                               
  6908           <xsl:call- template 
  6909            name="flyo verSpan"
  6910           >
  6911                                                                         
  6912            <xsl:with- param 
  6913             name="data
  6914             select="$d ataValue" 
  6915            />
  6916                                                                         
  6917            <xsl:with- param 
  6918             name="free Text" 
  6919             select="''
  6920            />
  6921                                                                         
  6922            <xsl:with- param 
  6923             name="deSq uigglefy" 
  6924             select="''
  6925            />
  6926                                                                
  6927           </xsl:call -template>
  6928                                                               
  6929          </div>
  6930                                                     
  6931         </xsl:when >
  6932                                                    
  6933         <xsl:when 
  6934          test="posi tion()=31"
  6935         >
  6936           
  6937          <!-- Pharm acy Locati on -->
  6938                                                              
  6939          <div 
  6940           style="ove rflow:hidd en; white- space:nowr ap; width: 100px"
  6941          >
  6942                                                               
  6943           <xsl:call- template 
  6944            name="flyo verSpan"
  6945           >
  6946                                                                         
  6947            <xsl:with- param 
  6948             name="data
  6949             select="$d ataValue" 
  6950            />
  6951                                                                         
  6952            <xsl:with- param 
  6953             name="free Text" 
  6954             select="''
  6955            />
  6956                                                                         
  6957            <xsl:with- param 
  6958             name="deSq uigglefy" 
  6959             select="''
  6960            />
  6961                                                                
  6962           </xsl:call -template>
  6963                                                               
  6964          </div>
  6965                                                     
  6966         </xsl:when >
  6967                                                    
  6968         <xsl:when 
  6969          test="posi tion()=32"
  6970         >
  6971           
  6972          <!-- Fill  Number -->
  6973                                                              
  6974          <div 
  6975           style="ove rflow:hidd en; white- space:nowr ap; width: 100px"
  6976          >
  6977                                                               
  6978           <xsl:call- template 
  6979            name="flyo verSpan"
  6980           >
  6981                                                                         
  6982            <xsl:with- param 
  6983             name="data
  6984             select="$d ataValue" 
  6985            />
  6986                                                                         
  6987            <xsl:with- param 
  6988             name="free Text" 
  6989             select="''
  6990            />
  6991                                                                         
  6992            <xsl:with- param 
  6993             name="deSq uigglefy" 
  6994             select="''
  6995            />
  6996                                                                
  6997           </xsl:call -template>
  6998                                                               
  6999          </div>
  7000                                                     
  7001         </xsl:when >
  7002                                                    
  7003         <xsl:other wise/> 
  7004                                            
  7005        </xsl:choo se>
  7006                                  
  7007       </td>
  7008                        
  7009      </xsl:for- each>
  7010              
  7011     </xsl:temp late>
  7012             
  7013             
  7014     <!-- Probl em Table - ->
  7015             
  7016     <xsl:templ ate 
  7017      name="disp layProblem Table"
  7018     >
  7019                       
  7020      <xsl:param  
  7021       name="tabl e"
  7022      />
  7023                       
  7024                       
  7025      <!--  Get  the table  -->
  7026                       
  7027      <table 
  7028       style="fon t-size:14p
  7029       border="1"
  7030      >
  7031                                 
  7032       <thead>
  7033                                           
  7034        <tr>
  7035                                                    
  7036         <xsl:for-e ach 
  7037          select="$t able/n1:th ead/n1:tr/ n1:th"
  7038         >
  7039                                                              
  7040          <th 
  7041           class="fir st"
  7042          >
  7043           <xsl:value -of 
  7044            select="."
  7045           />
  7046          </th>
  7047                                                     
  7048         </xsl:for- each>
  7049                                            
  7050        </tr>
  7051                                  
  7052       </thead>
  7053                                 
  7054       <tbody>
  7055                                           
  7056        <xsl:choos e>
  7057                                                    
  7058         <xsl:when 
  7059          test="./n1 :td[5]/n1: content"
  7060         >
  7061                                                              
  7062          <xsl:for-e ach 
  7063           select="$t able/n1:tb ody/n1:tr"
  7064          >
  7065                                                                        
  7066           <xsl:sort 
  7067            select="su bstring(no rmalize-sp ace(./n1:t d[5]/n1:co ntent),1,8 )" 
  7068            order="des cending"
  7069           />
  7070                                                                        
  7071           <tr 
  7072            class="sec ond"
  7073           >
  7074                                                                                  
  7075            <xsl:call- template 
  7076             name="disp layProblem DataRow"
  7077            >
  7078                                                                                            
  7079             <xsl:with- param 
  7080              name="tabl eRow" 
  7081              select="."
  7082             />
  7083                                                                                   
  7084            </xsl:call -template>
  7085                                                                         
  7086           </tr>
  7087                                                               
  7088          </xsl:for- each>
  7089                                                     
  7090         </xsl:when >
  7091                                                    
  7092         <xsl:other wise>
  7093                                                              
  7094          <xsl:for-e ach 
  7095           select="$t able/n1:tb ody/n1:tr"
  7096          >
  7097                                                                        
  7098           <xsl:sort 
  7099            select="su bstring(no rmalize-sp ace(./n1:t d[5]),1,8)
  7100            order="des cending"
  7101           />
  7102                                                                        
  7103           <tr 
  7104            class="sec ond"
  7105           >
  7106                                                                                  
  7107            <xsl:call- template 
  7108             name="disp layProblem DataRow"
  7109            >
  7110                                                                                            
  7111             <xsl:with- param 
  7112              name="tabl eRow" 
  7113              select="."
  7114             />
  7115                                                                                   
  7116            </xsl:call -template>
  7117                                                                         
  7118           </tr>
  7119                                                               
  7120          </xsl:for- each>
  7121                                                     
  7122         </xsl:othe rwise>
  7123                                            
  7124        </xsl:choo se>   
  7125                                  
  7126       </tbody>
  7127                        
  7128      </table>
  7129              
  7130     </xsl:temp late>
  7131             
  7132             
  7133     <xsl:templ ate 
  7134      name="disp layProblem DataRow"
  7135     >
  7136                       
  7137      <xsl:param  
  7138       name="tabl eRow"
  7139      />
  7140     
  7141                       
  7142      <xsl:varia ble 
  7143       name="onse tDateValue "
  7144      >
  7145                                 
  7146       <xsl:choos e>
  7147                                           
  7148        <xsl:when 
  7149         test="./n1 :td[5]/n1: content"
  7150        >
  7151                                                    
  7152         <xsl:value -of 
  7153          select="./ n1:td[5]/n 1:content"
  7154         /> 
  7155                                            
  7156        </xsl:when >
  7157                                           
  7158        <xsl:other wise>
  7159                                                    
  7160         <xsl:value -of 
  7161          select="./ n1:td[5]"
  7162         />
  7163                                            
  7164        </xsl:othe rwise>
  7165                                  
  7166       </xsl:choo se>
  7167                        
  7168      </xsl:vari able>
  7169                       
  7170                       
  7171      <xsl:varia ble 
  7172       name="onse tDateStrin g"
  7173      >
  7174                                 
  7175       <xsl:call- template 
  7176        name="form atDateShor t"
  7177       >
  7178                                           
  7179        <xsl:with- param 
  7180         name="date String" 
  7181         select="no rmalize-sp ace($onset DateValue) "
  7182        />
  7183                                  
  7184       </xsl:call -template>  
  7185                        
  7186      </xsl:vari able>
  7187                       
  7188                       
  7189      <xsl:varia ble 
  7190       name="reso lveDateVal ue"
  7191      >
  7192                                 
  7193       <xsl:choos e>
  7194                                           
  7195        <xsl:when 
  7196         test="./n1 :td[6]/n1: content"
  7197        >
  7198                                                    
  7199         <xsl:value -of 
  7200          select="./ n1:td[6]/n 1:content"
  7201         /> 
  7202                                            
  7203        </xsl:when >
  7204                                           
  7205        <xsl:other wise>
  7206                                                    
  7207         <xsl:value -of 
  7208          select="./ n1:td[6]"
  7209         />
  7210                                            
  7211        </xsl:othe rwise>
  7212                                  
  7213       </xsl:choo se>
  7214                        
  7215      </xsl:vari able>
  7216                       
  7217                       
  7218      <xsl:varia ble 
  7219       name="reso lveDateStr ing"
  7220      >
  7221                                 
  7222       <xsl:call- template 
  7223        name="form atDateShor t"
  7224       >
  7225                                           
  7226        <xsl:with- param 
  7227         name="date String" 
  7228         select="no rmalize-sp ace($resol veDateValu e)"
  7229        />
  7230                                  
  7231       </xsl:call -template>  
  7232                        
  7233      </xsl:vari able>
  7234                       
  7235                       
  7236      <xsl:varia ble 
  7237       name="time OfDeathDat eValue"
  7238      >
  7239                                 
  7240       <xsl:choos e>
  7241                                           
  7242        <xsl:when 
  7243         test="./n1 :td[10]/n1 :content"
  7244        >
  7245                                                    
  7246         <xsl:value -of 
  7247          select="./ n1:td[10]/ n1:content "
  7248         /> 
  7249                                            
  7250        </xsl:when >
  7251                                           
  7252        <xsl:other wise>
  7253                                                    
  7254         <xsl:value -of 
  7255          select="./ n1:td[10]"
  7256         />
  7257                                            
  7258        </xsl:othe rwise>
  7259                                  
  7260       </xsl:choo se>
  7261                        
  7262      </xsl:vari able>
  7263                       
  7264                       
  7265      <xsl:varia ble 
  7266       name="time OfDeathDat eString"
  7267      >
  7268                                 
  7269       <xsl:call- template 
  7270        name="form atDateTime ShortFromU tc"
  7271       >
  7272                                           
  7273        <xsl:with- param 
  7274         name="date String" 
  7275         select="no rmalize-sp ace($timeO fDeathDate Value)"
  7276        />
  7277                                  
  7278       </xsl:call -template>  
  7279                        
  7280      </xsl:vari able>
  7281                       
  7282                       
  7283      <xsl:for-e ach 
  7284       select="$t ableRow/n1 :td"
  7285      >
  7286                        
  7287                                 
  7288       <xsl:varia ble 
  7289        name="data Value"
  7290       >
  7291                                           
  7292        <xsl:choos e>
  7293                                                    
  7294         <xsl:when 
  7295          test="./n1 :content"
  7296         >
  7297                                                              
  7298          <xsl:value -of 
  7299           select="./ n1:content "
  7300          /> 
  7301                                                     
  7302         </xsl:when >
  7303                                                    
  7304         <xsl:other wise>
  7305                                                              
  7306          <xsl:value -of 
  7307           select="."
  7308          />
  7309                                                     
  7310         </xsl:othe rwise>
  7311                                            
  7312        </xsl:choo se>
  7313                                  
  7314       </xsl:vari able>
  7315                        
  7316                                 
  7317       <td>
  7318                                           
  7319        <xsl:choos e>
  7320                                                    
  7321         <xsl:when 
  7322          test="posi tion()=1"
  7323         >
  7324           
  7325          <!-- Probl em -->
  7326                                                     
  7327                                                              
  7328          <xsl:varia ble 
  7329           name="prob lem"
  7330          >
  7331                                                                        
  7332           <xsl:choos e>
  7333                                                                                  
  7334            <xsl:when 
  7335             test="cont ains($data Value,'Pre gnancy')"
  7336            >
  7337                                                                                            
  7338             <xsl:varia ble 
  7339              name="orig Entry" 
  7340              select="te xt()"
  7341             />
  7342                                                                                            
  7343             <xsl:varia ble 
  7344              name="firs tPart" 
  7345              select="su bstring-af ter($origE ntry, '(')
  7346             />
  7347                                                                                            
  7348             <xsl:varia ble 
  7349              name="date Part" 
  7350              select="su bstring-be fore($firs tPart, ')' )" 
  7351             />
  7352                                                                                            
  7353             <xsl:varia ble 
  7354              name="orig Date" 
  7355              select="no rmalize-sp ace($dateP art)"
  7356             />
  7357                                                                                            
  7358             <xsl:varia ble 
  7359              name="date Str"
  7360             >
  7361                                                                                                     
  7362              <xsl:call- template 
  7363               name="form atDateShor t"
  7364              >
  7365                                                                                                               
  7366               <xsl:with- param 
  7367                name="date String" 
  7368                select="$o rigDate"
  7369               />
  7370                                                                                                      
  7371              </xsl:call -template>
  7372                                                                                             
  7373             </xsl:vari able>
  7374                                                                                            
  7375             <xsl:varia ble 
  7376              name="entr yStr" 
  7377              select="co ncat('Preg nancy ( ',  $dateStr,  ' )')"
  7378             />
  7379                                                                                            
  7380             <xsl:value -of 
  7381              select="$e ntryStr"
  7382             />
  7383                                                                                   
  7384            </xsl:when >
  7385                                                                                  
  7386            <xsl:other wise>
  7387             <xsl:value -of 
  7388              select="$d ataValue"
  7389             />
  7390            </xsl:othe rwise>
  7391                                                                         
  7392           </xsl:choo se>
  7393                                                               
  7394          </xsl:vari able>
  7395                                                              
  7396                                                              
  7397          <div 
  7398           style="ove rflow:hidd en; white- space:nowr ap; width: 240px; pad ding-right :5px;"
  7399          >
  7400                                                               
  7401           <xsl:call- template 
  7402            name="flyo verSpan"
  7403           >
  7404                                                                         
  7405            <xsl:with- param 
  7406             name="data
  7407             select="$p roblem" 
  7408            />
  7409                                                                         
  7410            <xsl:with- param 
  7411             name="free Text" 
  7412             select="''
  7413            />
  7414                                                                         
  7415            <xsl:with- param 
  7416             name="deSq uigglefy" 
  7417             select="''
  7418            />
  7419                                                                
  7420           </xsl:call -template>
  7421                                                               
  7422          </div>
  7423                                                     
  7424         </xsl:when >
  7425                                                    
  7426         <xsl:when 
  7427          test="posi tion()=2"
  7428         >
  7429           
  7430          <!-- Statu s -->
  7431                                                              
  7432          <div 
  7433           style="ove rflow:hidd en; white- space:nowr ap; width: 80px; padd ing-right: 5px;"
  7434          >
  7435                                                               
  7436           <xsl:call- template 
  7437            name="flyo verSpan"
  7438           >
  7439                                                                         
  7440            <xsl:with- param 
  7441             name="data
  7442             select="$d ataValue" 
  7443            />
  7444                                                                         
  7445            <xsl:with- param 
  7446             name="free Text" 
  7447             select="''
  7448            />
  7449                                                                         
  7450            <xsl:with- param 
  7451             name="deSq uigglefy" 
  7452             select="''
  7453            />
  7454                                                                
  7455           </xsl:call -template>
  7456                                                               
  7457          </div>
  7458                                                     
  7459         </xsl:when >
  7460                                                    
  7461         <xsl:when 
  7462          test="posi tion()=3"
  7463         >
  7464           
  7465          <!-- Probl em Code -- >
  7466                                                              
  7467          <div 
  7468           style="ove rflow:hidd en; white- space:nowr ap; width: 150px; pad ding-right :5px;"
  7469          >
  7470                                                               
  7471           <xsl:call- template 
  7472            name="flyo verSpan"
  7473           >
  7474                                                                         
  7475            <xsl:with- param 
  7476             name="data
  7477             select="$d ataValue" 
  7478            />
  7479                                                                         
  7480            <xsl:with- param 
  7481             name="free Text" 
  7482             select="''
  7483            />
  7484                                                                         
  7485            <xsl:with- param 
  7486             name="deSq uigglefy" 
  7487             select="''
  7488            />
  7489                                                                
  7490           </xsl:call -template>
  7491                                                               
  7492          </div>
  7493                                                     
  7494         </xsl:when >
  7495                                                    
  7496         <xsl:when 
  7497          test="posi tion()=4"
  7498         >
  7499           
  7500          <!-- Probl em Type -- >
  7501                                                              
  7502          <div 
  7503           style="ove rflow:hidd en; white- space:nowr ap; width: 150px; pad ding-right :5px;"
  7504          >
  7505                                                               
  7506           <xsl:call- template 
  7507            name="flyo verSpan"
  7508           >
  7509                                                                         
  7510            <xsl:with- param 
  7511             name="data
  7512             select="$d ataValue" 
  7513            />
  7514                                                                         
  7515            <xsl:with- param 
  7516             name="free Text" 
  7517             select="''
  7518            />
  7519                                                                         
  7520            <xsl:with- param 
  7521             name="deSq uigglefy" 
  7522             select="''
  7523            />
  7524                                                                
  7525           </xsl:call -template>
  7526                                                               
  7527          </div>
  7528                                                     
  7529         </xsl:when >
  7530                                                    
  7531         <xsl:when 
  7532          test="posi tion()=5"
  7533         >
  7534           
  7535          <!-- Onset  Date -->
  7536                                                              
  7537          <div 
  7538           style="ove rflow:hidd en; white- space:nowr ap; width: 100px; pad ding-right :5px;"
  7539          >
  7540                                                               
  7541           <xsl:call- template 
  7542            name="flyo verSpan"
  7543           >
  7544                                                                         
  7545            <xsl:with- param 
  7546             name="data
  7547             select="$o nsetDateSt ring" 
  7548            />
  7549                                                                         
  7550            <xsl:with- param 
  7551             name="free Text" 
  7552             select="''
  7553            />
  7554                                                                         
  7555            <xsl:with- param 
  7556             name="deSq uigglefy" 
  7557             select="''
  7558            />
  7559                                                                
  7560           </xsl:call -template>
  7561                                                               
  7562          </div>
  7563                                                     
  7564         </xsl:when >
  7565                                                    
  7566         <xsl:when 
  7567          test="posi tion()=6"
  7568         >
  7569           
  7570          <!-- Resol ve Date -- >
  7571                                                              
  7572          <div 
  7573           style="ove rflow:hidd en; white- space:nowr ap; width: 100px; pad ding-right :5px;"
  7574          >
  7575                                                               
  7576           <xsl:call- template 
  7577            name="flyo verSpan"
  7578           >
  7579                                                                         
  7580            <xsl:with- param 
  7581             name="data
  7582             select="$r esolveDate String" 
  7583            />
  7584                                                                         
  7585            <xsl:with- param 
  7586             name="free Text" 
  7587             select="''
  7588            />
  7589                                                                         
  7590            <xsl:with- param 
  7591             name="deSq uigglefy" 
  7592             select="''
  7593            />
  7594                                                                
  7595           </xsl:call -template>
  7596                                                               
  7597          </div>
  7598                                                     
  7599         </xsl:when >
  7600                                                    
  7601         <xsl:when 
  7602          test="posi tion()=7"
  7603         >
  7604           
  7605          <!-- Cause  of Death  -->
  7606                                                              
  7607          <div 
  7608           style="ove rflow:hidd en; white- space:nowr ap; width: 200px; pad ding-right :5px;"
  7609          >
  7610                                                               
  7611           <xsl:call- template 
  7612            name="flyo verSpan"
  7613           >
  7614                                                                         
  7615            <xsl:with- param 
  7616             name="data
  7617             select="$d ataValue" 
  7618            />
  7619                                                                         
  7620            <xsl:with- param 
  7621             name="free Text" 
  7622             select="''
  7623            />
  7624                                                                         
  7625            <xsl:with- param 
  7626             name="deSq uigglefy" 
  7627             select="''
  7628            />
  7629                                                                
  7630           </xsl:call -template>
  7631                                                               
  7632          </div>
  7633                                                     
  7634         </xsl:when >
  7635                                                    
  7636         <xsl:when 
  7637          test="posi tion()=8"
  7638         >
  7639           
  7640          <!-- Age a t Onset  - ->
  7641                                                              
  7642          <div 
  7643           style="ove rflow:hidd en; white- space:nowr ap; width: 80px; padd ing-right: 5px;"
  7644          >
  7645                                                               
  7646           <xsl:call- template 
  7647            name="flyo verSpan"
  7648           >
  7649                                                                         
  7650            <xsl:with- param 
  7651             name="data
  7652             select="$d ataValue" 
  7653            />
  7654                                                                         
  7655            <xsl:with- param 
  7656             name="free Text" 
  7657             select="''
  7658            />
  7659                                                                         
  7660            <xsl:with- param 
  7661             name="deSq uigglefy" 
  7662             select="''
  7663            />
  7664                                                                
  7665           </xsl:call -template>
  7666                                                               
  7667          </div>
  7668                                                     
  7669         </xsl:when >
  7670                                                    
  7671         <xsl:when 
  7672          test="posi tion()=9"
  7673         >
  7674           
  7675          <!-- Age a t Death  - ->
  7676                                                              
  7677          <div 
  7678           style="ove rflow:hidd en; white- space:nowr ap; width: 80px; padd ing-right: 5px;"
  7679          >
  7680                                                               
  7681           <xsl:call- template 
  7682            name="flyo verSpan"
  7683           >
  7684                                                                         
  7685            <xsl:with- param 
  7686             name="data
  7687             select="$d ataValue" 
  7688            />
  7689                                                                         
  7690            <xsl:with- param 
  7691             name="free Text" 
  7692             select="''
  7693            />
  7694                                                                         
  7695            <xsl:with- param 
  7696             name="deSq uigglefy" 
  7697             select="''
  7698            />
  7699                                                                
  7700           </xsl:call -template>
  7701                                                               
  7702          </div>
  7703                                                     
  7704         </xsl:when >
  7705                                                    
  7706         <xsl:when 
  7707          test="posi tion()=10"
  7708         >
  7709           
  7710          <!-- Time  of Death   -->
  7711                                                              
  7712          <div 
  7713           style="ove rflow:hidd en; white- space:nowr ap; width: 120px; pad ding-right :5px;"
  7714          >
  7715                                                               
  7716           <xsl:call- template 
  7717            name="flyo verSpan"
  7718           >
  7719                                                                         
  7720            <xsl:with- param 
  7721             name="data
  7722             select="$t imeOfDeath DateValue"  
  7723            />
  7724                                                                         
  7725            <xsl:with- param 
  7726             name="free Text" 
  7727             select="''
  7728            />
  7729                                                                         
  7730            <xsl:with- param 
  7731             name="deSq uigglefy" 
  7732             select="''
  7733            />
  7734                                                                
  7735           </xsl:call -template>
  7736                                                               
  7737          </div>
  7738                                                     
  7739         </xsl:when >
  7740                                                    
  7741         <xsl:when 
  7742          test="posi tion()=11"
  7743         >
  7744           
  7745          <!-- Provi der  -->
  7746                                                              
  7747          <div 
  7748           style="ove rflow:hidd en; white- space:nowr ap; width: 200px; pad ding-right :5px;"
  7749          >
  7750                                                               
  7751           <xsl:call- template 
  7752            name="flyo verSpan"
  7753           >
  7754                                                                         
  7755            <xsl:with- param 
  7756             name="data
  7757             select="$d ataValue" 
  7758            />
  7759                                                                         
  7760            <xsl:with- param 
  7761             name="free Text" 
  7762             select="'y es'" 
  7763            />
  7764                                                                         
  7765            <xsl:with- param 
  7766             name="deSq uigglefy" 
  7767             select="''
  7768            />
  7769                                                                
  7770           </xsl:call -template>
  7771                                                               
  7772          </div>
  7773                                                     
  7774         </xsl:when >
  7775                                                    
  7776         <xsl:when 
  7777          test="posi tion()=12"
  7778         >
  7779           
  7780          <!-- Sourc e  -->
  7781                                                              
  7782          <div 
  7783           style="ove rflow:hidd en; white- space:nowr ap; width: 200px; pad ding-right :5px;"
  7784          >
  7785                                                               
  7786           <xsl:call- template 
  7787            name="flyo verSpan"
  7788           >
  7789                                                                         
  7790            <xsl:with- param 
  7791             name="data
  7792             select="$d ataValue" 
  7793            />
  7794                                                                         
  7795            <xsl:with- param 
  7796             name="free Text" 
  7797             select="'y es'" 
  7798            />
  7799                                                                         
  7800            <xsl:with- param 
  7801             name="deSq uigglefy" 
  7802             select="''
  7803            />
  7804                                                                
  7805           </xsl:call -template>
  7806                                                               
  7807          </div>
  7808                                                     
  7809         </xsl:when >
  7810                                            
  7811        </xsl:choo se>
  7812                                  
  7813       </td>
  7814                        
  7815      </xsl:for- each>
  7816              
  7817     </xsl:temp late>
  7818    
  7819             
  7820     <!-- Advan ce Directi ves -->
  7821             
  7822     <xsl:templ ate 
  7823      name="disp layAdvDire ctivesTabl e"
  7824     >
  7825                       
  7826      <xsl:param  
  7827       name="tabl e"
  7828      />
  7829                       
  7830                       
  7831      <!--  Get  the table  -->
  7832                       
  7833      <table 
  7834       style="fon t-size:14p
  7835       border="1"
  7836      >
  7837                                 
  7838       <thead>
  7839                                           
  7840        <tr>
  7841                                                    
  7842         <xsl:for-e ach 
  7843          select="$t able/n1:th ead/n1:tr/ n1:th"
  7844         >
  7845                                                              
  7846          <th 
  7847           class="fir st"
  7848          >
  7849           <xsl:value -of 
  7850            select="."
  7851           />
  7852          </th>
  7853                                                     
  7854         </xsl:for- each>
  7855                                            
  7856        </tr>
  7857                                  
  7858       </thead>
  7859                                 
  7860       <tbody>
  7861                                           
  7862        <xsl:choos e>
  7863                                                    
  7864         <xsl:when 
  7865          test="./n1 :td[3]/n1: content"
  7866         >
  7867                                                              
  7868          <xsl:for-e ach 
  7869           select="$t able/n1:tb ody/n1:tr"
  7870          >
  7871                                                                        
  7872           <xsl:sort 
  7873            select="su bstring(no rmalize-sp ace(./n1:t d[3]/n1:co ntent),1,8 )" 
  7874            order="des cending"
  7875           />
  7876                                                                        
  7877           <tr 
  7878            class="sec ond"
  7879           >
  7880                                                                                  
  7881            <xsl:call- template 
  7882             name="disp layAdvDire ctivesData Row"
  7883            >
  7884                                                                                            
  7885             <xsl:with- param 
  7886              name="tabl eRow" 
  7887              select="."
  7888             />
  7889                                                                                   
  7890            </xsl:call -template>
  7891                                                                         
  7892           </tr>
  7893                                                               
  7894          </xsl:for- each>
  7895                                                     
  7896         </xsl:when >
  7897                                                    
  7898         <xsl:other wise>
  7899                                                              
  7900          <xsl:for-e ach 
  7901           select="$t able/n1:tb ody/n1:tr"
  7902          >
  7903                                                                        
  7904           <xsl:sort 
  7905            select="su bstring(no rmalize-sp ace(./n1:t d[3]),1,8)
  7906            order="des cending"
  7907           />
  7908                                                                        
  7909           <tr 
  7910            class="sec ond"
  7911           >
  7912                                                                                  
  7913            <xsl:call- template 
  7914             name="disp layAdvDire ctivesData Row"
  7915            >
  7916                                                                                            
  7917             <xsl:with- param 
  7918              name="tabl eRow" 
  7919              select="."
  7920             />
  7921                                                                                   
  7922            </xsl:call -template>
  7923                                                                         
  7924           </tr>
  7925                                                               
  7926          </xsl:for- each>
  7927                                                     
  7928         </xsl:othe rwise>
  7929                                            
  7930        </xsl:choo se>   
  7931                                  
  7932       </tbody>
  7933                        
  7934      </table>
  7935              
  7936     </xsl:temp late>
  7937             
  7938             
  7939     <xsl:templ ate 
  7940      name="disp layAdvDire ctivesData Row"
  7941     >
  7942                       
  7943      <xsl:param  
  7944       name="tabl eRow"
  7945      />
  7946     
  7947                       
  7948      <xsl:varia ble 
  7949       name="date Value"
  7950      >
  7951                                 
  7952       <xsl:choos e>
  7953                                           
  7954        <xsl:when 
  7955         test="./n1 :td[3]/n1: content"
  7956        >
  7957                                                    
  7958         <xsl:value -of 
  7959          select="./ n1:td[3]/n 1:content"
  7960         /> 
  7961                                            
  7962        </xsl:when >
  7963                                           
  7964        <xsl:other wise>
  7965                                                    
  7966         <xsl:value -of 
  7967          select="./ n1:td[3]"
  7968         />
  7969                                            
  7970        </xsl:othe rwise>
  7971                                  
  7972       </xsl:choo se>
  7973                        
  7974      </xsl:vari able>
  7975                       
  7976                       
  7977      <xsl:varia ble 
  7978       name="onse tDateStrin g"
  7979      >
  7980                                 
  7981       <xsl:call- template 
  7982        name="form atDateShor t"
  7983       >
  7984                                           
  7985        <xsl:with- param 
  7986         name="date String" 
  7987         select="no rmalize-sp ace($dateV alue)"
  7988        />
  7989                                  
  7990       </xsl:call -template>  
  7991                        
  7992      </xsl:vari able>
  7993                       
  7994                       
  7995      <xsl:for-e ach 
  7996       select="$t ableRow/n1 :td"
  7997      >
  7998                        
  7999                                 
  8000       <xsl:varia ble 
  8001        name="data Value"
  8002       >
  8003                                           
  8004        <xsl:choos e>
  8005                                                    
  8006         <xsl:when 
  8007          test="./n1 :content"
  8008         >
  8009                                                              
  8010          <xsl:value -of 
  8011           select="./ n1:content "
  8012          /> 
  8013                                                     
  8014         </xsl:when >
  8015                                                    
  8016         <xsl:other wise>
  8017                                                              
  8018          <xsl:value -of 
  8019           select="."
  8020          />
  8021                                                     
  8022         </xsl:othe rwise>
  8023                                            
  8024        </xsl:choo se>
  8025                                  
  8026       </xsl:vari able>
  8027                        
  8028                                 
  8029       <td>
  8030                                           
  8031        <xsl:choos e>
  8032                                                    
  8033         <xsl:when 
  8034          test="posi tion()=1"
  8035         >
  8036           
  8037          <!-- Advan ce Directi ve Type -- >
  8038                                                              
  8039          <div 
  8040           style="ove rflow:hidd en; white- space:nowr ap; width: 240px; pad ding-right :5px;"
  8041          >
  8042                                                               
  8043           <xsl:call- template 
  8044            name="flyo verSpan"
  8045           >
  8046                                                                         
  8047            <xsl:with- param 
  8048             name="data
  8049             select="$d ataValue" 
  8050            />
  8051                                                                         
  8052            <xsl:with- param 
  8053             name="free Text" 
  8054             select="''
  8055            />
  8056                                                                         
  8057            <xsl:with- param 
  8058             name="deSq uigglefy" 
  8059             select="''
  8060            />
  8061                                                                
  8062           </xsl:call -template>
  8063                                                               
  8064          </div>
  8065                                                     
  8066         </xsl:when >
  8067                                                    
  8068         <xsl:when 
  8069          test="posi tion()=2"
  8070         >
  8071           
  8072          <!-- Title  -->
  8073                                                              
  8074          <div 
  8075           style="ove rflow:hidd en; white- space:nowr ap; width: 240px; pad ding-right :5px;"
  8076          >
  8077                                                               
  8078           <xsl:call- template 
  8079            name="flyo verSpan"
  8080           >
  8081                                                                         
  8082            <xsl:with- param 
  8083             name="data
  8084             select="$d ataValue" 
  8085            />
  8086                                                                         
  8087            <xsl:with- param 
  8088             name="free Text" 
  8089             select="''
  8090            />
  8091                                                                         
  8092            <xsl:with- param 
  8093             name="deSq uigglefy" 
  8094             select="''
  8095            />
  8096                                                                
  8097           </xsl:call -template>
  8098                                                               
  8099          </div>
  8100                                                     
  8101         </xsl:when >
  8102                                                    
  8103         <xsl:when 
  8104          test="posi tion()=3"
  8105         >
  8106           
  8107          <!-- Effec tive Date  -->
  8108                                                              
  8109          <div 
  8110           style="ove rflow:hidd en; white- space:nowr ap; width: 100px; pad ding-right :5px;"
  8111          >
  8112                                                               
  8113           <xsl:call- template 
  8114            name="flyo verSpan"
  8115           >
  8116                                                                         
  8117            <xsl:with- param 
  8118             name="data
  8119             select="$o nsetDateSt ring" 
  8120            />
  8121                                                                         
  8122            <xsl:with- param 
  8123             name="free Text" 
  8124             select="''
  8125            />
  8126                                                                         
  8127            <xsl:with- param 
  8128             name="deSq uigglefy" 
  8129             select="''
  8130            />
  8131                                                                
  8132           </xsl:call -template>
  8133                                                               
  8134          </div>
  8135                                                     
  8136         </xsl:when >
  8137                                                    
  8138         <xsl:when 
  8139          test="posi tion()=4"
  8140         >
  8141           
  8142          <!-- Custo dian -->
  8143                                                              
  8144          <div 
  8145           style="ove rflow:hidd en; white- space:nowr ap; width: 150px; pad ding-right :5px;"
  8146          >
  8147                                                               
  8148           <xsl:call- template 
  8149            name="flyo verSpan"
  8150           >
  8151                                                                         
  8152            <xsl:with- param 
  8153             name="data
  8154             select="$d ataValue" 
  8155            />
  8156                                                                         
  8157            <xsl:with- param 
  8158             name="free Text" 
  8159             select="''
  8160            />
  8161                                                                         
  8162            <xsl:with- param 
  8163             name="deSq uigglefy" 
  8164             select="''
  8165            />
  8166                                                                
  8167           </xsl:call -template>
  8168                                                               
  8169          </div>
  8170                                                     
  8171         </xsl:when >
  8172                                                    
  8173         <xsl:when 
  8174          test="posi tion()=5"
  8175         >
  8176           
  8177          <!-- Sourc e -->
  8178                                                              
  8179          <div 
  8180           style="ove rflow:hidd en; white- space:nowr ap; width: 100px; pad ding-right :5px;"
  8181          >
  8182                                                               
  8183           <xsl:call- template 
  8184            name="flyo verSpan"
  8185           >
  8186                                                                         
  8187            <xsl:with- param 
  8188             name="data
  8189             select="$d ataValue" 
  8190            />
  8191                                                                         
  8192            <xsl:with- param 
  8193             name="free Text" 
  8194             select="''
  8195            />
  8196                                                                         
  8197            <xsl:with- param 
  8198             name="deSq uigglefy" 
  8199             select="''
  8200            />
  8201                                                                
  8202           </xsl:call -template>
  8203                                                               
  8204          </div>
  8205                                                     
  8206         </xsl:when >
  8207                                                    
  8208         <xsl:when 
  8209          test="posi tion()=6"
  8210         >
  8211           
  8212          <!-- Advan ce Directi ve Referen ce -->
  8213                                                              
  8214          <div 
  8215           style="ove rflow:hidd en; white- space:nowr ap; width: 160px; pad ding-right :5px;"
  8216          >
  8217                                                               
  8218           <xsl:call- template 
  8219            name="flyo verSpan"
  8220           >
  8221                                                                         
  8222            <xsl:with- param 
  8223             name="data
  8224             select="$d ataValue" 
  8225            />
  8226                                                                         
  8227            <xsl:with- param 
  8228             name="free Text" 
  8229             select="''
  8230            />
  8231                                                                         
  8232            <xsl:with- param 
  8233             name="deSq uigglefy" 
  8234             select="''
  8235            />
  8236                                                                
  8237           </xsl:call -template>
  8238                                                               
  8239          </div>
  8240                                                     
  8241         </xsl:when >
  8242                                            
  8243        </xsl:choo se>
  8244                                  
  8245       </td>
  8246                        
  8247      </xsl:for- each>
  8248              
  8249     </xsl:temp late>
  8250    
  8251             
  8252     <!--  Alle rgy HITSP  Table -->
  8253             
  8254     <xsl:templ ate 
  8255      name="disp layAllergy Table"
  8256     >
  8257                       
  8258      <xsl:param  
  8259       name="tabl e"
  8260      />
  8261                       
  8262                       
  8263      <!--  Get  the table  -->
  8264                       
  8265      <table 
  8266       style="fon t-size:14p
  8267       border="1"
  8268      >
  8269                                 
  8270       <thead>
  8271                                           
  8272        <tr>
  8273                                                    
  8274         <xsl:for-e ach 
  8275          select="$t able/n1:th ead/n1:tr/ n1:th"
  8276         >
  8277                                                              
  8278          <th 
  8279           class="fir st"
  8280          >
  8281           <xsl:value -of 
  8282            select="."
  8283           />
  8284          </th>
  8285                                                     
  8286         </xsl:for- each>
  8287                                            
  8288        </tr>
  8289                                  
  8290       </thead>
  8291                                 
  8292       <tbody>
  8293                                  
  8294        <xsl:choos e>
  8295                                            
  8296         <xsl:when 
  8297          test="./n1 :td[5]/n1: content"
  8298         >
  8299                                                     
  8300          <xsl:for-e ach 
  8301           select="$t able/n1:tb ody/n1:tr"
  8302          >
  8303                                                               
  8304           <xsl:sort 
  8305            select="su bstring(no rmalize-sp ace(./n1:t d[5]/n1:co ntent),1,8 )" 
  8306            order="des cending"
  8307           />
  8308                                                               
  8309           <tr 
  8310            class="sec ond"
  8311           >
  8312                                                                         
  8313            <xsl:call- template 
  8314             name="disp layAllergy DataRow"
  8315            >
  8316                                                                                   
  8317             <xsl:with- param 
  8318              name="tabl eRow" 
  8319              select="."
  8320             />
  8321                                                                          
  8322            </xsl:call -template>
  8323                                                                
  8324           </tr>
  8325                                                      
  8326          </xsl:for- each>
  8327                                             
  8328         </xsl:when >
  8329                                            
  8330         <xsl:other wise>
  8331                                                     
  8332          <xsl:for-e ach 
  8333           select="$t able/n1:tb ody/n1:tr"
  8334          >
  8335                                                               
  8336           <xsl:sort 
  8337            select="su bstring(no rmalize-sp ace(./n1:t d[5]),1,8)
  8338            order="des cending"
  8339           />
  8340                                                               
  8341           <tr 
  8342            class="sec ond"
  8343           >
  8344                                                                         
  8345            <xsl:call- template 
  8346             name="disp layAllergy DataRow"
  8347            >
  8348                                                                                   
  8349             <xsl:with- param 
  8350              name="tabl eRow" 
  8351              select="."
  8352             />
  8353                                                                          
  8354            </xsl:call -template>
  8355                                                                
  8356           </tr>
  8357                                                      
  8358          </xsl:for- each>
  8359                                             
  8360         </xsl:othe rwise>
  8361                                   
  8362        </xsl:choo se>   
  8363                                  
  8364       </tbody>
  8365                        
  8366      </table>
  8367              
  8368     </xsl:temp late>
  8369             
  8370             
  8371     <xsl:templ ate 
  8372      name="disp layAllergy DataRow"
  8373     >
  8374                       
  8375      <xsl:param  
  8376       name="tabl eRow"
  8377      />
  8378                       
  8379                       
  8380      <xsl:varia ble 
  8381       name="date Value"
  8382      >
  8383                                 
  8384       <xsl:choos e>
  8385                                           
  8386        <xsl:when 
  8387         test="./n1 :td[5]/n1: content"
  8388        >
  8389                                                    
  8390         <xsl:value -of 
  8391          select="./ n1:td[5]/n 1:content"
  8392         /> 
  8393                                            
  8394        </xsl:when >
  8395                                           
  8396        <xsl:other wise>
  8397                                                    
  8398         <xsl:value -of 
  8399          select="./ n1:td[5]"
  8400         />
  8401                                            
  8402        </xsl:othe rwise>
  8403                                  
  8404       </xsl:choo se>
  8405                        
  8406      </xsl:vari able>
  8407                       
  8408                       
  8409      <xsl:varia ble 
  8410       name="even tDateStrin g"
  8411      >
  8412                                 
  8413       <xsl:call- template 
  8414        name="form atDateShor t"
  8415       >
  8416                                           
  8417        <xsl:with- param 
  8418         name="date String" 
  8419         select="no rmalize-sp ace($dateV alue)"
  8420        />
  8421                                  
  8422       </xsl:call -template>  
  8423                        
  8424      </xsl:vari able>
  8425                       
  8426                       
  8427      <xsl:for-e ach 
  8428       select="$t ableRow/n1 :td"
  8429      >
  8430                        
  8431                                 
  8432       <xsl:varia ble 
  8433        name="data Value"
  8434       >
  8435                                           
  8436        <xsl:choos e>
  8437                                                    
  8438         <xsl:when 
  8439          test="./n1 :content"
  8440         >
  8441                                                              
  8442          <xsl:value -of 
  8443           select="./ n1:content "
  8444          /> 
  8445                                                     
  8446         </xsl:when >
  8447                                                    
  8448         <xsl:other wise>
  8449                                                              
  8450          <xsl:value -of 
  8451           select="."
  8452          />
  8453                                                     
  8454         </xsl:othe rwise>
  8455                                            
  8456        </xsl:choo se>
  8457                                  
  8458       </xsl:vari able>
  8459                        
  8460                                 
  8461       <td>
  8462                                           
  8463        <xsl:choos e>
  8464                                                    
  8465         <xsl:when 
  8466          test="posi tion()=1"
  8467         >
  8468           
  8469          <!-- Aller gen -->
  8470                                                              
  8471          <div 
  8472           style="ove rflow:hidd en; white- space:nowr ap; width: 180px; pad ding-right :5px;"
  8473          >
  8474                                                               
  8475           <xsl:call- template 
  8476            name="flyo verSpan"
  8477           >
  8478                                                                         
  8479            <xsl:with- param 
  8480             name="data
  8481             select="$d ataValue"
  8482            />
  8483                                                                         
  8484            <xsl:with- param 
  8485             name="free Text" 
  8486             select="'y es'" 
  8487            />
  8488                                                                         
  8489            <xsl:with- param 
  8490             name="deSq uigglefy" 
  8491             select="''
  8492            />
  8493                                                                
  8494           </xsl:call -template>
  8495                                                               
  8496          </div>
  8497                                                     
  8498         </xsl:when >
  8499                                                    
  8500         <xsl:when 
  8501          test="posi tion()=2"
  8502         >
  8503           
  8504          <!-- React ion -->
  8505                                                              
  8506          <div 
  8507           style="ove rflow:hidd en; white- space:nowr ap; width: 240px; pad ding-right :5px;"
  8508          >
  8509                                                               
  8510           <xsl:call- template 
  8511            name="flyo verSpan"
  8512           >
  8513                                                                         
  8514            <xsl:with- param 
  8515             name="data
  8516             select="$d ataValue"
  8517            />
  8518                                                                         
  8519            <xsl:with- param 
  8520             name="free Text" 
  8521             select="'y es'"
  8522            />
  8523                                                                         
  8524            <xsl:with- param 
  8525             name="deSq uigglefy" 
  8526             select="'y es'" 
  8527            />
  8528                                                                
  8529           </xsl:call -template>
  8530                                                               
  8531          </div>
  8532                                                     
  8533         </xsl:when >
  8534                                                    
  8535         <xsl:when 
  8536          test="posi tion()=3"
  8537         >
  8538           
  8539          <!-- Sever ity -->
  8540                                                              
  8541          <div 
  8542           style="ove rflow:hidd en; white- space:nowr ap; width: 100px; pad ding-right :5px;"
  8543          >
  8544                                                               
  8545           <xsl:call- template 
  8546            name="flyo verSpan"
  8547           >
  8548                                                                         
  8549            <xsl:with- param 
  8550             name="data
  8551             select="$d ataValue"
  8552            />
  8553                                                                         
  8554            <xsl:with- param 
  8555             name="free Text" 
  8556             select="'y es'" 
  8557            />
  8558                                                                         
  8559            <xsl:with- param 
  8560             name="deSq uigglefy" 
  8561             select="''
  8562            />
  8563                                                                
  8564           </xsl:call -template>
  8565                                                               
  8566          </div>
  8567                                                     
  8568         </xsl:when >
  8569                                                    
  8570         <xsl:when 
  8571          test="posi tion()=4"
  8572         >
  8573           
  8574          <!-- Event  Type -->
  8575                                                              
  8576          <div 
  8577           style="ove rflow:hidd en; white- space:nowr ap; width: 180px; pad ding-right :5px;"
  8578          >
  8579                                                               
  8580           <xsl:call- template 
  8581            name="flyo verSpan"
  8582           >
  8583                                                                         
  8584            <xsl:with- param 
  8585             name="data
  8586             select="$d ataValue"
  8587            />
  8588                                                                         
  8589            <xsl:with- param 
  8590             name="free Text" 
  8591             select="'y es'" 
  8592            />
  8593                                                                         
  8594            <xsl:with- param 
  8595             name="deSq uigglefy" 
  8596             select="''
  8597            />
  8598                                                                
  8599           </xsl:call -template>
  8600                                                               
  8601          </div>
  8602                                                     
  8603         </xsl:when >
  8604                                                    
  8605         <xsl:when 
  8606          test="posi tion()=5"
  8607         >
  8608           
  8609          <!-- Event  Date -->
  8610                                                              
  8611          <div 
  8612           style="ove rflow:hidd en; white- space:nowr ap; width: 180px; pad ding-right :5px;"
  8613          >
  8614                                                               
  8615           <xsl:call- template 
  8616            name="flyo verSpan"
  8617           >
  8618                                                                         
  8619            <xsl:with- param 
  8620             name="data
  8621             select="$e ventDateSt ring"
  8622            />
  8623                                                                         
  8624            <xsl:with- param 
  8625             name="free Text" 
  8626             select="'y es'" 
  8627            />
  8628                                                                         
  8629            <xsl:with- param 
  8630             name="deSq uigglefy" 
  8631             select="''
  8632            />
  8633                                                                
  8634           </xsl:call -template>
  8635                                                               
  8636          </div>
  8637                                                     
  8638         </xsl:when >
  8639                                                    
  8640         <xsl:when 
  8641          test="posi tion()=6"
  8642         >
  8643           
  8644          <!-- Sourc e -->
  8645                                                              
  8646          <div 
  8647           style="ove rflow:hidd en; white- space:nowr ap; width: 200px; pad ding-right :5px;"
  8648          >
  8649                                                               
  8650           <xsl:call- template 
  8651            name="flyo verSpan"
  8652           >
  8653                                                                         
  8654            <xsl:with- param 
  8655             name="data
  8656             select="$d ataValue"
  8657            />
  8658                                                                         
  8659            <xsl:with- param 
  8660             name="free Text" 
  8661             select="'y es'" 
  8662            />
  8663                                                                         
  8664            <xsl:with- param 
  8665             name="deSq uigglefy" 
  8666             select="'y es'" 
  8667            />
  8668                                                                
  8669           </xsl:call -template>
  8670                                                               
  8671          </div>
  8672                                                     
  8673         </xsl:when >
  8674                                            
  8675        </xsl:choo se>
  8676                                           
  8677       </td>
  8678                        
  8679      </xsl:for- each>
  8680              
  8681     </xsl:temp late>
  8682    
  8683             
  8684     <!--  Alle rgy Consol  Table -->
  8685             
  8686     <xsl:templ ate 
  8687      name="disp layAllergy ConsolTabl e"
  8688     >
  8689                       
  8690      <xsl:param  
  8691       name="tabl e"
  8692      />
  8693                       
  8694                       
  8695      <!--  Get  the table  -->
  8696                       
  8697      <table 
  8698       style="fon t-size:14p
  8699       border="1"
  8700      >
  8701                                 
  8702       <thead>
  8703                                           
  8704        <tr>
  8705                                                    
  8706         <xsl:for-e ach 
  8707          select="$t able/n1:th ead/n1:tr/ n1:th"
  8708         >
  8709                                                              
  8710          <th 
  8711           class="fir st"
  8712          >
  8713           <xsl:value -of 
  8714            select="."
  8715           />
  8716          </th>
  8717                                                     
  8718         </xsl:for- each>
  8719                                            
  8720        </tr>
  8721                                  
  8722       </thead>
  8723                                 
  8724       <tbody>
  8725                                  
  8726        <xsl:choos e>
  8727                                            
  8728         <xsl:when 
  8729          test="./n1 :td[6]/n1: content"
  8730         >
  8731                                                     
  8732          <xsl:for-e ach 
  8733           select="$t able/n1:tb ody/n1:tr"
  8734          >
  8735                                                               
  8736           <xsl:sort 
  8737            select="su bstring(no rmalize-sp ace(./n1:t d[6]/n1:co ntent),1,8 )" 
  8738            order="des cending"
  8739           />
  8740                                                               
  8741           <tr 
  8742            class="sec ond"
  8743           >
  8744                                                                         
  8745            <xsl:call- template 
  8746             name="disp layAllergy ConsolData Row"
  8747            >
  8748                                                                                   
  8749             <xsl:with- param 
  8750              name="tabl eRow" 
  8751              select="."
  8752             />
  8753                                                                          
  8754            </xsl:call -template>
  8755                                                                
  8756           </tr>
  8757                                                      
  8758          </xsl:for- each>
  8759                                             
  8760         </xsl:when >
  8761                                            
  8762         <xsl:other wise>
  8763                                                     
  8764          <xsl:for-e ach 
  8765           select="$t able/n1:tb ody/n1:tr"
  8766          >
  8767                                                               
  8768           <xsl:sort 
  8769            select="su bstring(no rmalize-sp ace(./n1:t d[6]),1,8)
  8770            order="des cending"
  8771           />
  8772                                                               
  8773           <tr 
  8774            class="sec ond"
  8775           >
  8776                                                                         
  8777            <xsl:call- template 
  8778             name="disp layAllergy ConsolData Row"
  8779            >
  8780                                                                                   
  8781             <xsl:with- param 
  8782              name="tabl eRow" 
  8783              select="."
  8784             />
  8785                                                                          
  8786            </xsl:call -template>
  8787                                                                
  8788           </tr>
  8789                                                      
  8790          </xsl:for- each>
  8791                                             
  8792         </xsl:othe rwise>
  8793                                   
  8794        </xsl:choo se>   
  8795                                  
  8796       </tbody>
  8797                        
  8798      </table>
  8799              
  8800     </xsl:temp late>
  8801             
  8802             
  8803     <xsl:templ ate 
  8804      name="disp layAllergy ConsolData Row"
  8805     >
  8806                       
  8807      <xsl:param  
  8808       name="tabl eRow"
  8809      />
  8810                       
  8811                       
  8812      <xsl:varia ble 
  8813       name="date Value"
  8814      >
  8815                                 
  8816       <xsl:choos e>
  8817                                           
  8818        <xsl:when 
  8819         test="./n1 :td[6]/n1: content"
  8820        >
  8821                                                    
  8822         <xsl:value -of 
  8823          select="./ n1:td[6]/n 1:content"
  8824         /> 
  8825                                            
  8826        </xsl:when >
  8827                                           
  8828        <xsl:other wise>
  8829                                                    
  8830         <xsl:value -of 
  8831          select="./ n1:td[6]"
  8832         />
  8833                                            
  8834        </xsl:othe rwise>
  8835                                  
  8836       </xsl:choo se>
  8837                        
  8838      </xsl:vari able>
  8839                       
  8840                       
  8841      <xsl:varia ble 
  8842       name="even tDateStrin g"
  8843      >
  8844                                 
  8845       <xsl:call- template 
  8846        name="form atDateShor t"
  8847       >
  8848                                           
  8849        <xsl:with- param 
  8850         name="date String" 
  8851         select="no rmalize-sp ace($dateV alue)"
  8852        />
  8853                                  
  8854       </xsl:call -template>  
  8855                        
  8856      </xsl:vari able>
  8857                       
  8858                       
  8859      <xsl:for-e ach 
  8860       select="$t ableRow/n1 :td"
  8861      >
  8862                        
  8863                                 
  8864       <xsl:varia ble 
  8865        name="data Value"
  8866       >
  8867                                           
  8868        <xsl:choos e>
  8869                                                    
  8870         <xsl:when 
  8871          test="./n1 :content"
  8872         >
  8873                                                              
  8874          <xsl:value -of 
  8875           select="./ n1:content "
  8876          /> 
  8877                                                     
  8878         </xsl:when >
  8879                                                    
  8880         <xsl:other wise>
  8881                                                              
  8882          <xsl:value -of 
  8883           select="."
  8884          />
  8885                                                     
  8886         </xsl:othe rwise>
  8887                                            
  8888        </xsl:choo se>
  8889                                  
  8890       </xsl:vari able>
  8891                        
  8892                                 
  8893       <td>
  8894                                           
  8895        <xsl:choos e>
  8896                                                    
  8897         <xsl:when 
  8898          test="posi tion()=1"
  8899         >
  8900           
  8901          <!-- Aller gen -->
  8902                                                              
  8903          <div 
  8904           style="ove rflow:hidd en; white- space:nowr ap; width: 180px; pad ding-right :5px;"
  8905          >
  8906                                                               
  8907           <xsl:call- template 
  8908            name="flyo verSpan"
  8909           >
  8910                                                                         
  8911            <xsl:with- param 
  8912             name="data
  8913             select="$d ataValue"
  8914            />
  8915                                                                         
  8916            <xsl:with- param 
  8917             name="free Text" 
  8918             select="'y es'" 
  8919            />
  8920                                                                         
  8921            <xsl:with- param 
  8922             name="deSq uigglefy" 
  8923             select="''
  8924            />
  8925                                                                
  8926           </xsl:call -template>
  8927                                                               
  8928          </div>
  8929                                                     
  8930         </xsl:when >
  8931                                                    
  8932         <xsl:when 
  8933          test="posi tion()=2"
  8934         >
  8935           
  8936          <!-- Aller gen Severi ty -->
  8937                                                              
  8938          <div 
  8939           style="ove rflow:hidd en; white- space:nowr ap; width: 240px; pad ding-right :5px;"
  8940          >
  8941                                                               
  8942           <xsl:call- template 
  8943            name="flyo verSpan"
  8944           >
  8945                                                                         
  8946            <xsl:with- param 
  8947             name="data
  8948             select="$d ataValue"
  8949            />
  8950                                                                         
  8951            <xsl:with- param 
  8952             name="free Text" 
  8953             select="'y es'"
  8954            />
  8955                                                                         
  8956            <xsl:with- param 
  8957             name="deSq uigglefy" 
  8958             select="'y es'" 
  8959            />
  8960                                                                
  8961           </xsl:call -template>
  8962                                                               
  8963          </div>
  8964                                                     
  8965         </xsl:when >
  8966                                                    
  8967         <xsl:when 
  8968          test="posi tion()=3"
  8969         >
  8970           
  8971          <!-- React ion -->
  8972                                                              
  8973          <div 
  8974           style="ove rflow:hidd en; white- space:nowr ap; width: 100px;"
  8975          >
  8976                                                               
  8977           <xsl:call- template 
  8978            name="disp layVitalsE ntry"
  8979           >
  8980                                                                         
  8981            <xsl:with- param 
  8982             name="stri ng" 
  8983             select="$d ataValue" 
  8984            />
  8985                                                                         
  8986            <xsl:with- param 
  8987             name="deli miter" 
  8988             select="'/ /'" 
  8989            />
  8990                                                                
  8991           </xsl:call -template>
  8992                                                               
  8993          </div>
  8994                                                     
  8995         </xsl:when >
  8996                                                    
  8997         <xsl:when 
  8998          test="posi tion()=4"
  8999         >
  9000           
  9001          <!-- React ion Severi ty-->
  9002                                                                                
  9003          <div 
  9004           style="ove rflow:hidd en; white- space:nowr ap; width: 100px;"
  9005          >
  9006                                                               
  9007           <xsl:call- template 
  9008            name="disp layVitalsE ntry"
  9009           >
  9010                                                                         
  9011            <xsl:with- param 
  9012             name="stri ng" 
  9013             select="$d ataValue" 
  9014            />
  9015                                                                         
  9016            <xsl:with- param 
  9017             name="deli miter" 
  9018             select="'/ /'" 
  9019            />
  9020                                                                
  9021           </xsl:call -template>
  9022                                                               
  9023          </div>
  9024                                                     
  9025         </xsl:when >
  9026                                                    
  9027         <xsl:when 
  9028          test="posi tion()=5"
  9029         >
  9030           
  9031          <!-- Event  Type -->
  9032                                                              
  9033          <div 
  9034           style="ove rflow:hidd en; white- space:nowr ap; width: 180px; pad ding-right :5px;"
  9035          >
  9036                                                               
  9037           <xsl:call- template 
  9038            name="flyo verSpan"
  9039           >
  9040                                                                         
  9041            <xsl:with- param 
  9042             name="data
  9043             select="$d ataValue"
  9044            />
  9045                                                                         
  9046            <xsl:with- param 
  9047             name="free Text" 
  9048             select="'y es'" 
  9049            />
  9050                                                                         
  9051            <xsl:with- param 
  9052             name="deSq uigglefy" 
  9053             select="''
  9054            />
  9055                                                                
  9056           </xsl:call -template>
  9057                                                               
  9058          </div>
  9059                                                     
  9060         </xsl:when >
  9061                                                    
  9062         <xsl:when 
  9063          test="posi tion()=6"
  9064         >
  9065           
  9066          <!-- Event  Date -->
  9067                                                              
  9068          <div 
  9069           style="ove rflow:hidd en; white- space:nowr ap; width: 180px; pad ding-right :5px;"
  9070          >
  9071                                                               
  9072           <xsl:call- template 
  9073            name="flyo verSpan"
  9074           >
  9075                                                                         
  9076            <xsl:with- param 
  9077             name="data
  9078             select="$e ventDateSt ring"
  9079            />
  9080                                                                         
  9081            <xsl:with- param 
  9082             name="free Text" 
  9083             select="'y es'" 
  9084            />
  9085                                                                         
  9086            <xsl:with- param 
  9087             name="deSq uigglefy" 
  9088             select="''
  9089            />
  9090                                                                
  9091           </xsl:call -template>
  9092                                                               
  9093          </div>
  9094                                                     
  9095         </xsl:when >
  9096                                                    
  9097         <xsl:when 
  9098          test="posi tion()=7"
  9099         >
  9100           
  9101          <!-- Sourc e -->
  9102                                                              
  9103          <div 
  9104           style="ove rflow:hidd en; white- space:nowr ap; width: 200px; pad ding-right :5px;"
  9105          >
  9106                                                               
  9107           <xsl:call- template 
  9108            name="flyo verSpan"
  9109           >
  9110                                                                         
  9111            <xsl:with- param 
  9112             name="data
  9113             select="$d ataValue"
  9114            />
  9115                                                                         
  9116            <xsl:with- param 
  9117             name="free Text" 
  9118             select="'y es'" 
  9119            />
  9120                                                                         
  9121            <xsl:with- param 
  9122             name="deSq uigglefy" 
  9123             select="'y es'" 
  9124            />
  9125                                                                
  9126           </xsl:call -template>
  9127                                                               
  9128          </div>
  9129                                                     
  9130         </xsl:when >
  9131                                            
  9132        </xsl:choo se>
  9133                                           
  9134       </td>
  9135                        
  9136      </xsl:for- each>
  9137              
  9138     </xsl:temp late>
  9139                      
  9140             
  9141     <!-- Resul ts Table - ->
  9142             
  9143     <xsl:templ ate 
  9144      name="disp layResults Table"
  9145     >
  9146                       
  9147      <xsl:param  
  9148       name="tabl e"
  9149      />
  9150                       
  9151                       
  9152      <!--  Get  the table  -->
  9153                       
  9154      <table 
  9155       style="fon t-size:14p
  9156       border="1"
  9157      >
  9158                                 
  9159       <thead>
  9160                                           
  9161        <tr>
  9162                                                    
  9163         <xsl:for-e ach 
  9164          select="$t able/n1:th ead/n1:th"
  9165         >
  9166                                                              
  9167          <th 
  9168           class="fir st"
  9169          >
  9170           <xsl:value -of 
  9171            select="."
  9172           />
  9173          </th>
  9174                                                     
  9175         </xsl:for- each>
  9176                                            
  9177        </tr>
  9178                                  
  9179       </thead>
  9180                                 
  9181       <tbody>
  9182                                           
  9183        <xsl:for-e ach 
  9184         select="$t able/n1:tb ody/n1:tr"
  9185        >
  9186                                                    
  9187         <tr 
  9188          class="sec ond"
  9189         >
  9190                                                              
  9191          <xsl:call- template 
  9192           name="disp layResults DataRow"
  9193          >
  9194                                                                        
  9195           <xsl:with- param 
  9196            name="tabl eRow" 
  9197            select="."
  9198           />
  9199                                                               
  9200          </xsl:call -template>
  9201                                                     
  9202         </tr>
  9203                                            
  9204        </xsl:for- each>
  9205                                  
  9206       </tbody>
  9207                        
  9208      </table>
  9209              
  9210     </xsl:temp late>
  9211             
  9212             
  9213     <xsl:templ ate 
  9214      name="disp layResults DataRow"
  9215     >
  9216                       
  9217      <xsl:param  
  9218       name="tabl eRow"
  9219      />
  9220     
  9221                       
  9222      <xsl:varia ble 
  9223       name="date Value"
  9224      >
  9225                                 
  9226       <xsl:choos e>
  9227                                           
  9228        <xsl:when 
  9229         test="./n1 :td[1]/n1: content"
  9230        >
  9231                                                    
  9232         <xsl:value -of 
  9233          select="./ n1:td[1]/n 1:content"
  9234         /> 
  9235                                            
  9236        </xsl:when >
  9237                                           
  9238        <xsl:other wise>
  9239                                                    
  9240         <xsl:value -of 
  9241          select="./ n1:td[1]"
  9242         />
  9243                                            
  9244        </xsl:othe rwise>
  9245                                  
  9246       </xsl:choo se>
  9247                        
  9248      </xsl:vari able>
  9249                       
  9250                       
  9251      <xsl:varia ble 
  9252       name="effe ctiveDateS tring"
  9253      >
  9254                                 
  9255       <xsl:call- template 
  9256        name="conv ertDate"
  9257       >
  9258                                           
  9259        <xsl:with- param 
  9260         name="date Value" 
  9261         select="no rmalize-sp ace($dateV alue)"
  9262        />
  9263                                  
  9264       </xsl:call -template>  
  9265                        
  9266      </xsl:vari able>
  9267                                         
  9268                       
  9269      <xsl:for-e ach 
  9270       select="$t ableRow/n1 :td"
  9271      >
  9272                        
  9273                                 
  9274       <xsl:varia ble 
  9275        name="data Value"
  9276       >
  9277                                           
  9278        <xsl:choos e>
  9279                                                    
  9280         <xsl:when 
  9281          test="./n1 :content"
  9282         >
  9283                                                              
  9284          <xsl:value -of 
  9285           select="./ n1:content "
  9286          /> 
  9287                                                     
  9288         </xsl:when >
  9289                                                    
  9290         <xsl:other wise>
  9291                                                              
  9292          <xsl:value -of 
  9293           select="."
  9294          />
  9295                                                     
  9296         </xsl:othe rwise>
  9297                                            
  9298        </xsl:choo se>
  9299                                  
  9300       </xsl:vari able>
  9301                        
  9302                                 
  9303       <td>
  9304                                           
  9305        <xsl:choos e>
  9306                                                    
  9307         <xsl:when 
  9308          test="posi tion()=1"
  9309         >
  9310           
  9311          <!-- Date/ Time -->
  9312                                                              
  9313          <div 
  9314           style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  9315          >
  9316                                                               
  9317           <xsl:call- template 
  9318            name="flyo verSpan"
  9319           >
  9320                                                                         
  9321            <xsl:with- param 
  9322             name="data
  9323             select="$e ffectiveDa teString" 
  9324            />
  9325                                                                         
  9326            <xsl:with- param 
  9327             name="free Text" 
  9328             select="''
  9329            />
  9330                                                                         
  9331            <xsl:with- param 
  9332             name="deSq uigglefy" 
  9333             select="''
  9334            />
  9335                                                                
  9336           </xsl:call -template>
  9337                                                               
  9338          </div>
  9339                                                     
  9340         </xsl:when >
  9341                                                    
  9342         <xsl:when 
  9343          test="posi tion()=2"
  9344         >
  9345           
  9346          <!-- Resul t Type -->
  9347                                                              
  9348          <div 
  9349           style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  9350          >
  9351                                                               
  9352           <xsl:call- template 
  9353            name="flyo verSpan"
  9354           >
  9355                                                                         
  9356            <xsl:with- param 
  9357             name="data
  9358             select="$d ataValue" 
  9359            />
  9360                                                                         
  9361            <xsl:with- param 
  9362             name="free Text" 
  9363             select="'y es'" 
  9364            />
  9365                                                                         
  9366            <xsl:with- param 
  9367             name="deSq uigglefy" 
  9368             select="''
  9369            />
  9370                                                                
  9371           </xsl:call -template>
  9372                                                               
  9373          </div>
  9374                                                     
  9375         </xsl:when >
  9376                                                    
  9377         <xsl:when 
  9378          test="posi tion()=3"
  9379         >
  9380           
  9381          <!-- Sourc e -->
  9382                                                              
  9383          <div 
  9384           style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  9385          >
  9386                                                               
  9387           <xsl:call- template 
  9388            name="flyo verSpan"
  9389           >
  9390                                                                         
  9391            <xsl:with- param 
  9392             name="data
  9393             select="$d ataValue" 
  9394            />
  9395                                                                         
  9396            <xsl:with- param 
  9397             name="free Text" 
  9398             select="'y es'" 
  9399            />
  9400                                                                         
  9401            <xsl:with- param 
  9402             name="deSq uigglefy" 
  9403             select="''
  9404            />
  9405                                                                
  9406           </xsl:call -template>
  9407                                                               
  9408          </div>
  9409                                                     
  9410         </xsl:when >
  9411                                                    
  9412         <xsl:when 
  9413          test="posi tion()=4"
  9414         >
  9415           
  9416          <!-- Resul t -->
  9417                                                              
  9418          <div 
  9419           style="ove rflow:hidd en; white- space:nowr ap; width: 260px;"
  9420          >
  9421                                                               
  9422           <xsl:call- template 
  9423            name="flyo verSpan"
  9424           >
  9425                                                                         
  9426            <xsl:with- param 
  9427             name="data
  9428             select="$d ataValue" 
  9429            />
  9430                                                                         
  9431            <xsl:with- param 
  9432             name="free Text" 
  9433             select="''
  9434            />
  9435                                                                         
  9436            <xsl:with- param 
  9437             name="deSq uigglefy" 
  9438             select="''
  9439            />
  9440                                                                
  9441           </xsl:call -template>
  9442                                                               
  9443          </div>
  9444                                                     
  9445         </xsl:when >
  9446                                                    
  9447         <xsl:when 
  9448          test="posi tion()=5"
  9449         >
  9450           
  9451          <!-- Unit  -->
  9452                                                              
  9453          <div 
  9454           style="ove rflow:hidd en; white- space:nowr ap; width: 240px;;"
  9455          >
  9456                                                               
  9457           <xsl:call- template 
  9458            name="flyo verSpan"
  9459           >
  9460                                                                         
  9461            <xsl:with- param 
  9462             name="data
  9463             select="$d ataValue" 
  9464            />
  9465                                                                         
  9466            <xsl:with- param 
  9467             name="free Text" 
  9468             select="'y es'" 
  9469            />
  9470                                                                         
  9471            <xsl:with- param 
  9472             name="deSq uigglefy" 
  9473             select="'y es'" 
  9474            />
  9475                                                                
  9476           </xsl:call -template>
  9477                                                               
  9478          </div>
  9479                                                     
  9480         </xsl:when >
  9481                                                    
  9482         <xsl:when 
  9483          test="posi tion()=6"
  9484         >
  9485           
  9486          <!-- Inter pretation  -->
  9487                                                              
  9488          <div 
  9489           style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  9490          >
  9491                                                               
  9492           <xsl:call- template 
  9493            name="flyo verSpan"
  9494           >
  9495                                                                         
  9496            <xsl:with- param 
  9497             name="data
  9498             select="$d ataValue" 
  9499            />
  9500                                                                         
  9501            <xsl:with- param 
  9502             name="free Text" 
  9503             select="''
  9504            />
  9505                                                                         
  9506            <xsl:with- param 
  9507             name="deSq uigglefy" 
  9508             select="''
  9509            />
  9510                                                                
  9511           </xsl:call -template>
  9512                                                               
  9513          </div>
  9514                                                     
  9515         </xsl:when >
  9516                                                    
  9517         <xsl:when 
  9518          test="posi tion()=7"
  9519         >
  9520           
  9521          <!-- Refer ence Range  -->
  9522                                                              
  9523          <div 
  9524           style="ove rflow:hidd en; white- space:nowr ap;width:2 40px;"
  9525          >
  9526                                                               
  9527           <xsl:call- template 
  9528            name="flyo verSpan"
  9529           >
  9530                                                                         
  9531            <xsl:with- param 
  9532             name="data
  9533             select="$d ataValue" 
  9534            />
  9535                                                                         
  9536            <xsl:with- param 
  9537             name="free Text" 
  9538             select="''
  9539            />
  9540                                                                         
  9541            <xsl:with- param 
  9542             name="deSq uigglefy" 
  9543             select="''
  9544            />
  9545                                                                
  9546           </xsl:call -template>
  9547                                                               
  9548          </div>
  9549                                                     
  9550         </xsl:when >
  9551                                                    
  9552         <xsl:when 
  9553          test="posi tion()=8"
  9554         >
  9555           
  9556          <!-- Comme nts -->
  9557                                                              
  9558          <xsl:varia ble 
  9559           name="data "
  9560          >
  9561                                                                        
  9562           <xsl:call- template 
  9563            name="repl aceSquiggl esWithBrea ks"
  9564           >
  9565                                                                                  
  9566            <xsl:with- param 
  9567             name="text
  9568             select="$d ataValue"
  9569            />
  9570                                                                         
  9571           </xsl:call -template>
  9572                                                               
  9573          </xsl:vari able>
  9574                                                              
  9575          <xsl:varia ble 
  9576           name="lenT est" 
  9577           select="st ring-lengt h($data)" 
  9578          />
  9579                                                              
  9580          <xsl:choos e>
  9581                                                                        
  9582           <xsl:when 
  9583            test="$len Test &gt;  25"
  9584           >
  9585                                                                                  
  9586            <textarea 
  9587             rows="10" 
  9588             style="ove rflow-y:au to;width:2 40px;text- align:left  resize:no ne"
  9589            >
  9590                                                                                            
  9591             <xsl:value -of 
  9592              select="$d ata"
  9593             />
  9594                                                                                   
  9595            </textarea >
  9596                                                                         
  9597           </xsl:when >
  9598                                                                        
  9599           <xsl:other wise>
  9600                                                                                  
  9601            <div 
  9602             style="ove rflow:hidd en; white- space:nowr ap; width: 360px;heig ht:1em"
  9603            >
  9604                                                                                            
  9605             <xsl:call- template 
  9606              name="flyo verSpan"
  9607             >
  9608                                                                                                     
  9609              <xsl:with- param 
  9610               name="data
  9611               select="$d ataValue" 
  9612              />
  9613                                                                                                     
  9614              <xsl:with- param 
  9615               name="free Text" 
  9616               select="'y es'" 
  9617              />
  9618                                                                                                     
  9619              <xsl:with- param 
  9620               name="deSq uigglefy" 
  9621               select="'y es'" 
  9622              />
  9623                                                                                             
  9624             </xsl:call -template>
  9625                                                                                   
  9626            </div>
  9627                                                                         
  9628           </xsl:othe rwise>         
  9629                                                               
  9630          </xsl:choo se>
  9631                                                     
  9632         </xsl:when >
  9633                                                    
  9634         <xsl:when 
  9635          test="posi tion()=9"
  9636         >
  9637           
  9638          <!-- Statu s -->
  9639                                                              
  9640          <div 
  9641           style="ove rflow:hidd en; white- space:nowr ap;width:2 40px;"
  9642          >
  9643                                                               
  9644           <xsl:call- template 
  9645            name="flyo verSpan"
  9646           >
  9647                                                                         
  9648            <xsl:with- param 
  9649             name="data
  9650             select="$d ataValue" 
  9651            />
  9652                                                                         
  9653            <xsl:with- param 
  9654             name="free Text" 
  9655             select="''
  9656            />
  9657                                                                         
  9658            <xsl:with- param 
  9659             name="deSq uigglefy" 
  9660             select="''
  9661            />
  9662                                                                
  9663           </xsl:call -template>
  9664                                                               
  9665          </div>
  9666                                                     
  9667         </xsl:when >
  9668                                                    
  9669         <xsl:when 
  9670          test="posi tion()=10"
  9671         >
  9672           
  9673          <!-- Analy te Status  -->
  9674                                                              
  9675          <div 
  9676           style="ove rflow:hidd en; white- space:nowr ap;width:2 40px;"
  9677          >
  9678                                                               
  9679           <xsl:call- template 
  9680            name="flyo verSpan"
  9681           >
  9682                                                                         
  9683            <xsl:with- param 
  9684             name="data
  9685             select="$d ataValue" 
  9686            />
  9687                                                                         
  9688            <xsl:with- param 
  9689             name="free Text" 
  9690             select="''
  9691            />
  9692                                                                         
  9693            <xsl:with- param 
  9694             name="deSq uigglefy" 
  9695             select="''
  9696            />
  9697                                                                
  9698           </xsl:call -template>
  9699                                                               
  9700          </div>
  9701                                                     
  9702         </xsl:when >
  9703                                            
  9704        </xsl:choo se>
  9705                                  
  9706       </td>
  9707                        
  9708      </xsl:for- each>
  9709              
  9710     </xsl:temp late>
  9711             
  9712             
  9713     <!-- Immun ization Ta ble -->
  9714             
  9715     <xsl:templ ate 
  9716      name="disp layImmuniz ationTable "
  9717     >
  9718                       
  9719      <xsl:param  
  9720       name="tabl e"
  9721      />
  9722                       
  9723                       
  9724      <!--  Get  the table  -->
  9725                       
  9726      <table 
  9727       style="fon t-size:14p
  9728       border="1"
  9729      >
  9730                                 
  9731       <thead>
  9732                                           
  9733        <tr>
  9734                                                    
  9735         <xsl:for-e ach 
  9736          select="$t able/n1:th ead/n1:tr/ n1:th"
  9737         >
  9738                                                              
  9739          <th 
  9740           class="fir st"
  9741          >
  9742           <xsl:value -of 
  9743            select="."
  9744           />
  9745          </th>
  9746                                                     
  9747         </xsl:for- each>
  9748                                            
  9749        </tr>
  9750                                  
  9751       </thead>
  9752                                 
  9753       <tbody>
  9754                                  
  9755        <xsl:choos e>
  9756                                            
  9757         <xsl:when 
  9758          test="./n1 :td[3]/n1: content"
  9759         >
  9760                                                     
  9761          <xsl:for-e ach 
  9762           select="$t able/n1:tb ody/n1:tr"
  9763          >
  9764                                                               
  9765           <xsl:sort 
  9766            select="su bstring(no rmalize-sp ace(./n1:t d[3]/n1:co ntent),1,8 )" 
  9767            order="des cending"
  9768           />
  9769                                                               
  9770           <tr 
  9771            class="sec ond"
  9772           >
  9773                                                                         
  9774            <xsl:call- template 
  9775             name="disp layImmuniz ationDataR ow"
  9776            >
  9777                                                                                   
  9778             <xsl:with- param 
  9779              name="tabl eRow" 
  9780              select="."
  9781             />
  9782                                                                          
  9783            </xsl:call -template>
  9784                                                                
  9785           </tr>
  9786                                                      
  9787          </xsl:for- each>
  9788                                             
  9789         </xsl:when >
  9790                                            
  9791         <xsl:other wise>
  9792                                                     
  9793          <xsl:for-e ach 
  9794           select="$t able/n1:tb ody/n1:tr"
  9795          >
  9796                                                               
  9797           <xsl:sort 
  9798            select="su bstring(no rmalize-sp ace(./n1:t d[3]),1,8)
  9799            order="des cending"
  9800           />
  9801                                                               
  9802           <tr 
  9803            class="sec ond"
  9804           >
  9805                                                                         
  9806            <xsl:call- template 
  9807             name="disp layImmuniz ationDataR ow"
  9808            >
  9809                                                                                   
  9810             <xsl:with- param 
  9811              name="tabl eRow" 
  9812              select="."
  9813             />
  9814                                                                          
  9815            </xsl:call -template>
  9816                                                                
  9817           </tr>
  9818                                                      
  9819          </xsl:for- each>
  9820                                             
  9821         </xsl:othe rwise>
  9822                                   
  9823        </xsl:choo se>   
  9824                                  
  9825       </tbody>
  9826                        
  9827      </table>
  9828              
  9829     </xsl:temp late>
  9830             
  9831             
  9832     <xsl:templ ate 
  9833      name="disp layImmuniz ationDataR ow"
  9834     >
  9835                       
  9836      <xsl:param  
  9837       name="tabl eRow"
  9838      />
  9839     
  9840                       
  9841      <xsl:varia ble 
  9842       name="date Value"
  9843      >
  9844                                 
  9845       <xsl:choos e>
  9846                                           
  9847        <xsl:when 
  9848         test="./n1 :td[3]/n1: content"
  9849        >
  9850                                                    
  9851         <xsl:value -of 
  9852          select="./ n1:td[3]/n 1:content"
  9853         /> 
  9854                                            
  9855        </xsl:when >
  9856                                           
  9857        <xsl:other wise>
  9858                                                    
  9859         <xsl:value -of 
  9860          select="./ n1:td[3]"
  9861         />
  9862                                            
  9863        </xsl:othe rwise>
  9864                                  
  9865       </xsl:choo se>
  9866                        
  9867      </xsl:vari able>
  9868                       
  9869                       
  9870      <xsl:varia ble 
  9871       name="effe ctiveDateS tring"
  9872      >
  9873                                 
  9874       <xsl:call- template 
  9875        name="form atDateShor t"
  9876       >
  9877                                           
  9878        <xsl:with- param 
  9879         name="date String" 
  9880         select="no rmalize-sp ace($dateV alue)"
  9881        />
  9882                                  
  9883       </xsl:call -template>  
  9884                        
  9885      </xsl:vari able>
  9886                                         
  9887                       
  9888      <xsl:for-e ach 
  9889       select="$t ableRow/n1 :td"
  9890      >
  9891      
  9892                                 
  9893       <xsl:varia ble 
  9894        name="data Value"
  9895       >
  9896                                           
  9897        <xsl:choos e>
  9898                                                    
  9899         <xsl:when 
  9900          test="./n1 :content"
  9901         >
  9902                                                              
  9903          <xsl:value -of 
  9904           select="./ n1:content "
  9905          /> 
  9906                                                     
  9907         </xsl:when >
  9908                                                    
  9909         <xsl:other wise>
  9910                                                              
  9911          <xsl:value -of 
  9912           select="."
  9913          />
  9914                                                     
  9915         </xsl:othe rwise>
  9916                                            
  9917        </xsl:choo se>
  9918                                  
  9919       </xsl:vari able>
  9920                        
  9921                                 
  9922       <td>
  9923                                           
  9924        <xsl:choos e>
  9925                                                    
  9926         <xsl:when 
  9927          test="posi tion()=1"
  9928         >
  9929           
  9930          <!-- Immun ization -- >
  9931                                                              
  9932          <div 
  9933           style="ove rflow:hidd en; white- space:nowr ap; width: 300px;"
  9934          >
  9935                                                               
  9936           <xsl:call- template 
  9937            name="flyo verSpan"
  9938           >
  9939                                                                         
  9940            <xsl:with- param 
  9941             name="data
  9942             select="$d ataValue" 
  9943            />
  9944                                                                         
  9945            <xsl:with- param 
  9946             name="free Text" 
  9947             select="''
  9948            />
  9949                                                                         
  9950            <xsl:with- param 
  9951             name="deSq uigglefy" 
  9952             select="''
  9953            />
  9954                                                                
  9955           </xsl:call -template>
  9956                                                               
  9957          </div>
  9958                                                     
  9959         </xsl:when >
  9960                                                    
  9961         <xsl:when 
  9962          test="posi tion()=2"
  9963         >
  9964           
  9965          <!-- Serie s -->
  9966                                                              
  9967          <div 
  9968           style="ove rflow:hidd en; white- space:nowr ap; width: 100px;"
  9969          >
  9970                                                               
  9971           <xsl:call- template 
  9972            name="flyo verSpan"
  9973           >
  9974                                                                         
  9975            <xsl:with- param 
  9976             name="data
  9977             select="$d ataValue" 
  9978            />
  9979                                                                         
  9980            <xsl:with- param 
  9981             name="free Text" 
  9982             select="''
  9983            />
  9984                                                                         
  9985            <xsl:with- param 
  9986             name="deSq uigglefy" 
  9987             select="''
  9988            />
  9989                                                                
  9990           </xsl:call -template>
  9991                                                               
  9992          </div>
  9993                                                     
  9994         </xsl:when >
  9995                                                    
  9996         <xsl:when 
  9997          test="posi tion()=3"
  9998         >
  9999           
  10000          <!-- Date  Issued -->
  10001                                                              
  10002          <div 
  10003           style="ove rflow:hidd en; white- space:nowr ap; width: 100px;"
  10004          >
  10005                                                               
  10006           <xsl:call- template 
  10007            name="flyo verSpan"
  10008           >
  10009                                                                         
  10010            <xsl:with- param 
  10011             name="data
  10012             select="$e ffectiveDa teString" 
  10013            />
  10014                                                                         
  10015            <xsl:with- param 
  10016             name="free Text" 
  10017             select="''
  10018            />
  10019                                                                         
  10020            <xsl:with- param 
  10021             name="deSq uigglefy" 
  10022             select="''
  10023            />
  10024                                                                
  10025           </xsl:call -template>
  10026                                                               
  10027          </div>
  10028                                                     
  10029         </xsl:when >
  10030                                                    
  10031         <xsl:when 
  10032          test="posi tion()=4"
  10033         >
  10034           
  10035          <!-- React ion -->
  10036                                                              
  10037          <div 
  10038           style="ove rflow:hidd en; white- space:nowr ap; width: 260px;"
  10039          >
  10040                                                               
  10041           <xsl:call- template 
  10042            name="flyo verSpan"
  10043           >
  10044                                                                         
  10045            <xsl:with- param 
  10046             name="data
  10047             select="$d ataValue" 
  10048            />
  10049                                                                         
  10050            <xsl:with- param 
  10051             name="free Text" 
  10052             select="''
  10053            />
  10054                                                                         
  10055            <xsl:with- param 
  10056             name="deSq uigglefy" 
  10057             select="''
  10058            />
  10059                                                                
  10060           </xsl:call -template>
  10061                                                               
  10062          </div>
  10063                                                     
  10064         </xsl:when >
  10065                                                    
  10066         <xsl:when 
  10067          test="posi tion()=5"
  10068         >
  10069           
  10070          <!-- Comme nts -->
  10071                                                              
  10072          <div 
  10073           style="ove rflow:hidd en; white- space:nowr ap; width: 240px;;"
  10074          >
  10075                                                               
  10076           <xsl:call- template 
  10077            name="flyo verSpan"
  10078           >
  10079                                                                         
  10080            <xsl:with- param 
  10081             name="data
  10082             select="$d ataValue" 
  10083            />
  10084                                                                         
  10085            <xsl:with- param 
  10086             name="free Text" 
  10087             select="''
  10088            />
  10089                                                                         
  10090            <xsl:with- param 
  10091             name="deSq uigglefy" 
  10092             select="''
  10093            />
  10094                                                                
  10095           </xsl:call -template>
  10096                                                               
  10097          </div>
  10098                                                     
  10099         </xsl:when >
  10100                                                    
  10101         <xsl:when 
  10102          test="posi tion()=6"
  10103         >
  10104           
  10105          <!-- Immun ization Re fused -->
  10106                                                              
  10107          <div 
  10108           style="ove rflow:hidd en; white- space:nowr ap; width: 80px;"
  10109          >
  10110                                                               
  10111           <xsl:call- template 
  10112            name="flyo verSpan"
  10113           >
  10114                                                                         
  10115            <xsl:with- param 
  10116             name="data
  10117             select="$d ataValue" 
  10118            />
  10119                                                                         
  10120            <xsl:with- param 
  10121             name="free Text" 
  10122             select="''
  10123            />
  10124                                                                         
  10125            <xsl:with- param 
  10126             name="deSq uigglefy" 
  10127             select="''
  10128            />
  10129                                                                
  10130           </xsl:call -template>
  10131                                                               
  10132          </div>
  10133                                                     
  10134         </xsl:when >
  10135                                                    
  10136         <xsl:when 
  10137          test="posi tion()=7"
  10138         >
  10139           
  10140          <!-- Refus al Reason  -->
  10141                                                              
  10142          <div 
  10143           style="ove rflow:hidd en; white- space:nowr ap; width: 240px;"
  10144          >
  10145                                                               
  10146           <xsl:call- template 
  10147            name="flyo verSpan"
  10148           >
  10149                                                                         
  10150            <xsl:with- param 
  10151             name="data
  10152             select="$d ataValue" 
  10153            />
  10154                                                                         
  10155            <xsl:with- param 
  10156             name="free Text" 
  10157             select="''
  10158            />
  10159                                                                         
  10160            <xsl:with- param 
  10161             name="deSq uigglefy" 
  10162             select="''
  10163            />
  10164                                                                
  10165           </xsl:call -template>
  10166                                                               
  10167          </div>
  10168                                                     
  10169         </xsl:when >
  10170                                                    
  10171         <xsl:when 
  10172          test="posi tion()=8"
  10173         >
  10174           
  10175          <!-- Provi der -->
  10176                                                              
  10177          <div 
  10178           style="ove rflow:hidd en; white- space:nowr ap; width: 240px;"
  10179          >
  10180                                                               
  10181           <xsl:call- template 
  10182            name="flyo verSpan"
  10183           >
  10184                                                                         
  10185            <xsl:with- param 
  10186             name="data
  10187             select="$d ataValue" 
  10188            />
  10189                                                                         
  10190            <xsl:with- param 
  10191             name="free Text" 
  10192             select="''
  10193            />
  10194                                                                         
  10195            <xsl:with- param 
  10196             name="deSq uigglefy" 
  10197             select="''
  10198            />
  10199                                                                
  10200           </xsl:call -template>
  10201                                                               
  10202          </div>
  10203                                                     
  10204         </xsl:when >
  10205                                                    
  10206         <xsl:when 
  10207          test="posi tion()=9"
  10208         >
  10209           
  10210          <!-- Sourc e -->
  10211                                                              
  10212          <div 
  10213           style="ove rflow:hidd en; white- space:nowr ap; width: 180px;"
  10214          >
  10215                                                               
  10216           <xsl:call- template 
  10217            name="flyo verSpan"
  10218           >
  10219                                                                         
  10220            <xsl:with- param 
  10221             name="data
  10222             select="$d ataValue" 
  10223            />
  10224                                                                         
  10225            <xsl:with- param 
  10226             name="free Text" 
  10227             select="''
  10228            />
  10229                                                                         
  10230            <xsl:with- param 
  10231             name="deSq uigglefy" 
  10232             select="''
  10233            />
  10234                                                                
  10235           </xsl:call -template>
  10236                                                               
  10237          </div>
  10238                                                     
  10239         </xsl:when >
  10240                                                    
  10241         <xsl:when 
  10242          test="posi tion()=10"
  10243         >
  10244           
  10245          <!-- Produ ct Referen ce -->
  10246                                                              
  10247          <div 
  10248           style="ove rflow:hide n; white-s pace:nowra p; width:2 40px;"
  10249          >
  10250                                                               
  10251           <xsl:call- template 
  10252            name="flyo verSpan"
  10253           >
  10254                                                                         
  10255            <xsl:with- param 
  10256             name="data
  10257             select="$d ataValue" 
  10258            />
  10259                                                                         
  10260            <xsl:with- param 
  10261             name="free Text" 
  10262             select="''
  10263            />
  10264                                                                         
  10265            <xsl:with- param 
  10266             name="deSq uigglefy" 
  10267             select="''
  10268            />
  10269                                                                
  10270           </xsl:call -template>
  10271                                                               
  10272          </div>
  10273                                                     
  10274         </xsl:when >
  10275                                                    
  10276         <xsl:when 
  10277          test="posi tion()=11"
  10278         >
  10279           
  10280          <!-- Comme nt Referen ce -->
  10281                                                              
  10282          <div 
  10283           style="ove rflow:hidd en; white- space:nowr ap; width: 240px;"
  10284          >
  10285                                                               
  10286           <xsl:call- template 
  10287            name="flyo verSpan"
  10288           >
  10289                                                                         
  10290            <xsl:with- param 
  10291             name="data
  10292             select="$d ataValue" 
  10293            />
  10294                                                                         
  10295            <xsl:with- param 
  10296             name="free Text" 
  10297             select="''
  10298            />
  10299                                                                         
  10300            <xsl:with- param 
  10301             name="deSq uigglefy" 
  10302             select="''
  10303            />
  10304                                                                
  10305           </xsl:call -template>
  10306                                                               
  10307          </div>
  10308                                                     
  10309         </xsl:when >
  10310                                                    
  10311         <xsl:when 
  10312          test="posi tion()=12"
  10313         >
  10314           
  10315          <!-- React ion Refere nce -->
  10316                                                              
  10317          <div 
  10318           style="ove rflow:hidd en; white- space:nowr ap; width: 240px;"
  10319          >
  10320                                                               
  10321           <xsl:call- template 
  10322            name="flyo verSpan"
  10323           >
  10324                                                                         
  10325            <xsl:with- param 
  10326             name="data
  10327             select="$d ataValue" 
  10328            />
  10329                                                                         
  10330            <xsl:with- param 
  10331             name="free Text" 
  10332             select="''
  10333            />
  10334                                                                         
  10335            <xsl:with- param 
  10336             name="deSq uigglefy" 
  10337             select="''
  10338            />
  10339                                                                
  10340           </xsl:call -template>
  10341                                                               
  10342          </div>
  10343                                                     
  10344         </xsl:when >
  10345                                            
  10346        </xsl:choo se>
  10347                                  
  10348       </td>
  10349                        
  10350      </xsl:for- each>
  10351              
  10352     </xsl:temp late>
  10353             
  10354             
  10355     <!--  Insu rance Prov ider Table  -->
  10356             
  10357     <xsl:templ ate 
  10358      name="disp layInsProv iderTable"
  10359     >
  10360                       
  10361      <xsl:param  
  10362       name="tabl e"
  10363      />
  10364                       
  10365                       
  10366      <!--  Get  the table  -->
  10367                       
  10368      <table 
  10369       style="fon t-size:14p
  10370       border="1"
  10371      >
  10372                                 
  10373       <thead>
  10374                                           
  10375        <tr>
  10376                                                    
  10377         <xsl:for-e ach 
  10378          select="$t able/n1:th ead/n1:tr/ n1:th"
  10379         >
  10380                                                              
  10381          <th 
  10382           class="fir st"
  10383          >
  10384           <xsl:value -of 
  10385            select="."
  10386           />
  10387          </th>
  10388                                                     
  10389         </xsl:for- each>
  10390                                            
  10391        </tr>
  10392                                  
  10393       </thead>
  10394                                 
  10395       <tbody>
  10396                                           
  10397        <xsl:choos e>
  10398                                                    
  10399         <xsl:when 
  10400          test="./n1 :td[3]/n1: content"
  10401         >
  10402                                                              
  10403          <xsl:for-e ach 
  10404           select="$t able/n1:tb ody/n1:tr"
  10405          >
  10406                                                                        
  10407           <xsl:sort 
  10408            select="su bstring(no rmalize-sp ace(./n1:t d[3]/n1:co ntent),1,8 )" 
  10409            order="des cending"
  10410           />
  10411                                                                        
  10412           <tr 
  10413            class="sec ond"
  10414           >
  10415                                                                                  
  10416            <xsl:call- template 
  10417             name="disp layInsProv iderDataRo w"
  10418            >
  10419                                                                                            
  10420             <xsl:with- param 
  10421              name="tabl eRow" 
  10422              select="."
  10423             />
  10424                                                                                   
  10425            </xsl:call -template>
  10426                                                                         
  10427           </tr>
  10428                                                               
  10429          </xsl:for- each>
  10430                                                     
  10431         </xsl:when >
  10432                                                    
  10433         <xsl:other wise>
  10434                                                              
  10435          <xsl:for-e ach 
  10436           select="$t able/n1:tb ody/n1:tr"
  10437          >
  10438                                                                        
  10439           <xsl:sort 
  10440            select="su bstring(no rmalize-sp ace(./n1:t d[3]),1,8)
  10441            order="des cending"
  10442           />
  10443                                                                        
  10444           <tr 
  10445            class="sec ond"
  10446           >
  10447                                                                                  
  10448            <xsl:call- template 
  10449             name="disp layInsProv iderDataRo w"
  10450            >
  10451                                                                                            
  10452             <xsl:with- param 
  10453              name="tabl eRow" 
  10454              select="."
  10455             />
  10456                                                                                   
  10457            </xsl:call -template>
  10458                                                                         
  10459           </tr>
  10460                                                               
  10461          </xsl:for- each>
  10462                                                     
  10463         </xsl:othe rwise>
  10464                                            
  10465        </xsl:choo se>   
  10466                                  
  10467       </tbody>
  10468                        
  10469      </table>
  10470              
  10471     </xsl:temp late>
  10472             
  10473             
  10474     <xsl:templ ate 
  10475      name="disp layInsProv iderDataRo w"
  10476     >
  10477                       
  10478      <xsl:param  
  10479       name="tabl eRow"
  10480      />
  10481                       
  10482                       
  10483      <xsl:varia ble 
  10484       name="covB eginDateVa lue"
  10485      >
  10486                                 
  10487       <xsl:choos e>
  10488                                           
  10489        <xsl:when 
  10490         test="./n1 :td[8]/n1: content"
  10491        >
  10492                                                    
  10493         <xsl:value -of 
  10494          select="./ n1:td[8]/n 1:content"
  10495         /> 
  10496                                            
  10497        </xsl:when >
  10498                                           
  10499        <xsl:other wise>
  10500                                                    
  10501         <xsl:value -of 
  10502          select="./ n1:td[8]"
  10503         />
  10504                                            
  10505        </xsl:othe rwise>
  10506                                  
  10507       </xsl:choo se>
  10508                        
  10509      </xsl:vari able>
  10510                       
  10511                       
  10512      <xsl:varia ble 
  10513       name="covB eginDateSt ring"
  10514      >
  10515                                 
  10516       <xsl:call- template 
  10517        name="form atDateShor t"
  10518       >
  10519                                           
  10520        <xsl:with- param 
  10521         name="date String" 
  10522         select="no rmalize-sp ace($covBe ginDateVal ue)"
  10523        />
  10524                                  
  10525       </xsl:call -template>  
  10526                        
  10527      </xsl:vari able>
  10528                       
  10529                       
  10530      <xsl:varia ble 
  10531       name="covE ndDateValu e"
  10532      >
  10533                                 
  10534       <xsl:choos e>
  10535                                           
  10536        <xsl:when 
  10537         test="./n1 :td[9]/n1: content"
  10538        >
  10539                                                    
  10540         <xsl:value -of 
  10541          select="./ n1:td[9]/n 1:content"
  10542         /> 
  10543                                            
  10544        </xsl:when >
  10545                                           
  10546        <xsl:other wise>
  10547                                                    
  10548         <xsl:value -of 
  10549          select="./ n1:td[9]"
  10550         />
  10551                                            
  10552        </xsl:othe rwise>
  10553                                  
  10554       </xsl:choo se>
  10555                        
  10556      </xsl:vari able>
  10557                       
  10558                       
  10559      <xsl:varia ble 
  10560       name="covE ndDateStri ng"
  10561      >
  10562                                 
  10563       <xsl:call- template 
  10564        name="form atDateShor t"
  10565       >
  10566                                           
  10567        <xsl:with- param 
  10568         name="date String" 
  10569         select="no rmalize-sp ace($covEn dDateValue )"
  10570        />
  10571                                  
  10572       </xsl:call -template>  
  10573                        
  10574      </xsl:vari able>
  10575                       
  10576                       
  10577      <xsl:varia ble 
  10578       name="patd obDateValu e"
  10579      >
  10580                                 
  10581       <xsl:choos e>
  10582                                           
  10583        <xsl:when 
  10584         test="./n1 :td[15]/n1 :content"
  10585        >
  10586                                                    
  10587         <xsl:value -of 
  10588          select="./ n1:td[15]/ n1:content "
  10589         /> 
  10590                                            
  10591        </xsl:when >
  10592                                           
  10593        <xsl:other wise>
  10594                                                    
  10595         <xsl:value -of 
  10596          select="./ n1:td[15]"
  10597         />
  10598                                            
  10599        </xsl:othe rwise>
  10600                                  
  10601       </xsl:choo se>
  10602                        
  10603      </xsl:vari able>
  10604                       
  10605                       
  10606      <xsl:varia ble 
  10607       name="patd obString"
  10608      >
  10609                                 
  10610       <xsl:call- template 
  10611        name="form atDateShor t"
  10612       >
  10613                                           
  10614        <xsl:with- param 
  10615         name="date String" 
  10616         select="no rmalize-sp ace($patdo bDateValue )"
  10617        />
  10618                                  
  10619       </xsl:call -template>  
  10620                        
  10621      </xsl:vari able>
  10622                       
  10623                       
  10624      <xsl:varia ble 
  10625       name="subd obDateValu e"
  10626      >
  10627                                 
  10628       <xsl:choos e>
  10629                                           
  10630        <xsl:when 
  10631         test="./n1 :td[21]/n1 :content"
  10632        >
  10633                                                    
  10634         <xsl:value -of 
  10635          select="./ n1:td[21]/ n1:content "
  10636         /> 
  10637                                            
  10638        </xsl:when >
  10639                                           
  10640        <xsl:other wise>
  10641                                                    
  10642         <xsl:value -of 
  10643          select="./ n1:td[21]"
  10644         />
  10645                                            
  10646        </xsl:othe rwise>
  10647                                  
  10648       </xsl:choo se>
  10649                        
  10650      </xsl:vari able>
  10651                       
  10652                       
  10653      <xsl:varia ble 
  10654       name="subd obString"
  10655      >
  10656                                 
  10657       <xsl:call- template 
  10658        name="form atDateShor t"
  10659       >
  10660                                           
  10661        <xsl:with- param 
  10662         name="date String" 
  10663         select="no rmalize-sp ace($subdo bDateValue )"
  10664        />
  10665                                  
  10666       </xsl:call -template>  
  10667                        
  10668      </xsl:vari able> 
  10669     
  10670                       
  10671      <xsl:varia ble 
  10672       name="guar DateValue"
  10673      >
  10674                                 
  10675       <xsl:choos e>
  10676                                           
  10677        <xsl:when 
  10678         test="./n1 :td[22]/n1 :content"
  10679        >
  10680                                                    
  10681         <xsl:value -of 
  10682          select="./ n1:td[22]/ n1:content "
  10683         /> 
  10684                                            
  10685        </xsl:when >
  10686                                           
  10687        <xsl:other wise>
  10688                                                    
  10689         <xsl:value -of 
  10690          select="./ n1:td[22]"
  10691         />
  10692                                            
  10693        </xsl:othe rwise>
  10694                                  
  10695       </xsl:choo se>
  10696                        
  10697      </xsl:vari able>
  10698                       
  10699                       
  10700      <xsl:varia ble 
  10701       name="guar DateString "
  10702      >
  10703                                 
  10704       <xsl:call- template 
  10705        name="form atDateShor t"
  10706       >
  10707                                           
  10708        <xsl:with- param 
  10709         name="date String" 
  10710         select="no rmalize-sp ace($guarD ateValue)"
  10711        />
  10712                                  
  10713       </xsl:call -template>  
  10714                        
  10715      </xsl:vari able> 
  10716                       
  10717                       
  10718      <xsl:for-e ach 
  10719       select="$t ableRow/n1 :td"
  10720      >
  10721      
  10722                                 
  10723       <xsl:varia ble 
  10724        name="data Value"
  10725       >
  10726                                           
  10727        <xsl:choos e>
  10728                                                    
  10729         <xsl:when 
  10730          test="./n1 :content"
  10731         >
  10732                                                              
  10733          <xsl:value -of 
  10734           select="./ n1:content "
  10735          /> 
  10736                                                     
  10737         </xsl:when >
  10738                                                    
  10739         <xsl:other wise>
  10740                                                              
  10741          <xsl:value -of 
  10742           select="."
  10743          />
  10744                                                     
  10745         </xsl:othe rwise>
  10746                                            
  10747        </xsl:choo se>
  10748                                  
  10749       </xsl:vari able>
  10750                                 
  10751                                 
  10752       <td>
  10753                                           
  10754        <xsl:choos e>
  10755                                                    
  10756         <xsl:when 
  10757          test="posi tion()=1"
  10758         >
  10759           
  10760          <!-- Resul t ID -->
  10761                                                              
  10762          <div 
  10763           style="ove rflow:hidd en; white- space:nowr ap; width: 180px; pad ding-right :5px;"
  10764          >
  10765                                                                        
  10766           <xsl:call- template 
  10767            name="flyo verSpan"
  10768           >
  10769                                                                                  
  10770            <xsl:with- param 
  10771             name="data
  10772             select="$d ataValue"
  10773            />
  10774                                                                                  
  10775            <xsl:with- param 
  10776             name="free Text" 
  10777             select="''
  10778            />
  10779                                                                                  
  10780            <xsl:with- param 
  10781             name="deSq uigglefy" 
  10782             select="''
  10783            />
  10784                                                                         
  10785           </xsl:call -template>
  10786                                                               
  10787          </div>
  10788                                                     
  10789         </xsl:when >     
  10790                                                    
  10791         <xsl:when 
  10792          test="posi tion()=2"
  10793         >
  10794           
  10795          <!-- Group  Number  - ->
  10796                                                              
  10797          <div 
  10798           style="ove rflow:hidd en; white- space:nowr ap; width: 180px; pad ding-right :5px;"
  10799          >
  10800                                                                        
  10801           <xsl:call- template 
  10802            name="flyo verSpan"
  10803           >
  10804                                                                                  
  10805            <xsl:with- param 
  10806             name="data
  10807             select="$d ataValue"
  10808            />
  10809                                                                                  
  10810            <xsl:with- param 
  10811             name="free Text" 
  10812             select="''
  10813            />
  10814                                                                                  
  10815            <xsl:with- param 
  10816             name="deSq uigglefy" 
  10817             select="''
  10818            />
  10819                                                                         
  10820           </xsl:call -template>
  10821                                                               
  10822          </div>
  10823                                                     
  10824         </xsl:when >     
  10825                                                    
  10826         <xsl:when 
  10827          test="posi tion()=3"
  10828         >
  10829           
  10830          <!-- Insur ance Type   -->
  10831                                                              
  10832          <div 
  10833           style="ove rflow:hidd en; white- space:nowr ap; width: 180px; pad ding-right :5px;"
  10834          >
  10835                                                                        
  10836           <xsl:call- template 
  10837            name="flyo verSpan"
  10838           >
  10839                                                                                  
  10840            <xsl:with- param 
  10841             name="data
  10842             select="$d ataValue"
  10843            />
  10844                                                                                  
  10845            <xsl:with- param 
  10846             name="free Text" 
  10847             select="''
  10848            />
  10849                                                                                  
  10850            <xsl:with- param 
  10851             name="deSq uigglefy" 
  10852             select="''
  10853            />
  10854                                                                         
  10855           </xsl:call -template>
  10856                                                               
  10857          </div>
  10858                                                     
  10859         </xsl:when >     
  10860                                                    
  10861         <xsl:when 
  10862          test="posi tion()=4"
  10863         >
  10864           
  10865          <!-- Info  Src ID -->
  10866                                                              
  10867          <div 
  10868           style="ove rflow:hidd en; white- space:nowr ap; width: 180px; pad ding-right :5px;"
  10869          >
  10870                                                                        
  10871           <xsl:call- template 
  10872            name="flyo verSpan"
  10873           >
  10874                                                                                  
  10875            <xsl:with- param 
  10876             name="data
  10877             select="$d ataValue"
  10878            />
  10879                                                                                  
  10880            <xsl:with- param 
  10881             name="free Text" 
  10882             select="''
  10883            />
  10884                                                                                  
  10885            <xsl:with- param 
  10886             name="deSq uigglefy" 
  10887             select="''
  10888            />
  10889                                                                         
  10890           </xsl:call -template>
  10891                                                               
  10892          </div>
  10893                                                     
  10894         </xsl:when >     
  10895                                                    
  10896         <xsl:when 
  10897          test="posi tion()=5"
  10898         >
  10899           
  10900          <!-- Info  Src Addr   -->
  10901                                                              
  10902          <div 
  10903           style="ove rflow:hidd en; white- space:nowr ap; width: 180px; pad ding-right :5px;"
  10904          >
  10905                                                                        
  10906           <xsl:call- template 
  10907            name="flyo verSpan"
  10908           >
  10909                                                                                  
  10910            <xsl:with- param 
  10911             name="data
  10912             select="$d ataValue"
  10913            />
  10914                                                                                  
  10915            <xsl:with- param 
  10916             name="free Text" 
  10917             select="''
  10918            />
  10919                                                                                  
  10920            <xsl:with- param 
  10921             name="deSq uigglefy" 
  10922             select="''
  10923            />
  10924                                                                         
  10925           </xsl:call -template>
  10926                                                               
  10927          </div>
  10928                                                     
  10929         </xsl:when >     
  10930                                                    
  10931         <xsl:when 
  10932          test="posi tion()=6"
  10933         >
  10934           
  10935          <!-- Info  Src Teleco m  -->
  10936                                                              
  10937          <div 
  10938           style="ove rflow:hidd en; white- space:nowr ap; width: 180px; pad ding-right :5px;"
  10939          >
  10940                                                                        
  10941           <xsl:call- template 
  10942            name="flyo verSpan"
  10943           >
  10944                                                                                  
  10945            <xsl:with- param 
  10946             name="data
  10947             select="$d ataValue"
  10948            />
  10949                                                                                  
  10950            <xsl:with- param 
  10951             name="free Text" 
  10952             select="''
  10953            />
  10954                                                                                  
  10955            <xsl:with- param 
  10956             name="deSq uigglefy" 
  10957             select="''
  10958            />
  10959                                                                         
  10960           </xsl:call -template>
  10961                                                               
  10962          </div>
  10963                                                     
  10964         </xsl:when >     
  10965                                                    
  10966         <xsl:when 
  10967          test="posi tion()=7"
  10968         >
  10969           
  10970          <!-- Info  Src Name - ->
  10971                                                              
  10972          <div 
  10973           style="ove rflow:hidd en; white- space:nowr ap; width: 180px; pad ding-right :5px;"
  10974          >
  10975                                                                        
  10976           <xsl:call- template 
  10977            name="flyo verSpan"
  10978           >
  10979                                                                                  
  10980            <xsl:with- param 
  10981             name="data
  10982             select="$d ataValue"
  10983            />
  10984                                                                                  
  10985            <xsl:with- param 
  10986             name="free Text" 
  10987             select="''
  10988            />
  10989                                                                                  
  10990            <xsl:with- param 
  10991             name="deSq uigglefy" 
  10992             select="''
  10993            />
  10994                                                                         
  10995           </xsl:call -template>
  10996                                                               
  10997          </div>
  10998                                                     
  10999         </xsl:when >     
  11000                                                    
  11001         <xsl:when 
  11002          test="posi tion()=8"
  11003         >
  11004           
  11005          <!-- Cover age Begin  Date -->
  11006                                                              
  11007          <div 
  11008           style="ove rflow:hidd en; white- space:nowr ap; width: 180px; pad ding-right :5px;"
  11009          >
  11010                                                                        
  11011           <xsl:call- template 
  11012            name="flyo verSpan"
  11013           >
  11014                                                                                  
  11015            <xsl:with- param 
  11016             name="data
  11017             select="$c ovBeginDat eString"
  11018            />
  11019                                                                                  
  11020            <xsl:with- param 
  11021             name="free Text" 
  11022             select="''
  11023            />
  11024                                                                                  
  11025            <xsl:with- param 
  11026             name="deSq uigglefy" 
  11027             select="''
  11028            />
  11029                                                                         
  11030           </xsl:call -template>
  11031                                                               
  11032          </div>
  11033                                                     
  11034         </xsl:when >     
  11035                                                    
  11036         <xsl:when 
  11037          test="posi tion()=9"
  11038         >
  11039           
  11040          <!-- Cover age End Da te -->
  11041                                                              
  11042          <div 
  11043           style="ove rflow:hidd en; white- space:nowr ap; width: 180px; pad ding-right :5px;"
  11044          >
  11045                                                                        
  11046           <xsl:call- template 
  11047            name="flyo verSpan"
  11048           >
  11049                                                                                  
  11050            <xsl:with- param 
  11051             name="data
  11052             select="$c ovEndDateS tring"
  11053            />
  11054                                                                                  
  11055            <xsl:with- param 
  11056             name="free Text" 
  11057             select="''
  11058            />
  11059                                                                                  
  11060            <xsl:with- param 
  11061             name="deSq uigglefy" 
  11062             select="''
  11063            />
  11064                                                                         
  11065           </xsl:call -template>
  11066                                                               
  11067          </div>
  11068                                                     
  11069         </xsl:when >     
  11070                                                    
  11071         <xsl:when 
  11072          test="posi tion()=10"
  11073         >
  11074           
  11075          <!--Member  ID -->
  11076                                                              
  11077          <div 
  11078           style="ove rflow:hidd en; white- space:nowr ap; width: 180px; pad ding-right :5px;"
  11079          >
  11080                                                                        
  11081           <xsl:call- template 
  11082            name="flyo verSpan"
  11083           >
  11084                                                                                  
  11085            <xsl:with- param 
  11086             name="data
  11087             select="$d ataValue"
  11088            />
  11089                                                                                  
  11090            <xsl:with- param 
  11091             name="free Text" 
  11092             select="''
  11093            />
  11094                                                                                  
  11095            <xsl:with- param 
  11096             name="deSq uigglefy" 
  11097             select="''
  11098            />
  11099                                                                         
  11100           </xsl:call -template>
  11101                                                               
  11102          </div>
  11103                                                     
  11104         </xsl:when >     
  11105                                                    
  11106         <xsl:when 
  11107          test="posi tion()=11"
  11108         >
  11109           
  11110          <!-- Relat ionship Ty pe -->
  11111                                                              
  11112          <div 
  11113           style="ove rflow:hidd en; white- space:nowr ap; width: 180px; pad ding-right :5px;"
  11114          >
  11115                                                                        
  11116           <xsl:call- template 
  11117            name="flyo verSpan"
  11118           >
  11119                                                                                  
  11120            <xsl:with- param 
  11121             name="data
  11122             select="$d ataValue"
  11123            />
  11124                                                                                  
  11125            <xsl:with- param 
  11126             name="free Text" 
  11127             select="''
  11128            />
  11129                                                                                  
  11130            <xsl:with- param 
  11131             name="deSq uigglefy" 
  11132             select="''
  11133            />
  11134                                                                         
  11135           </xsl:call -template>
  11136                                                               
  11137          </div>
  11138                                                     
  11139         </xsl:when >     
  11140                                                    
  11141         <xsl:when 
  11142          test="posi tion()=12"
  11143         >
  11144           
  11145          <!-- Patie nt Addr -- >
  11146                                                              
  11147          <div 
  11148           style="ove rflow:hidd en; white- space:nowr ap; width: 180px; pad ding-right :5px;"
  11149          >
  11150                                                                        
  11151           <xsl:call- template 
  11152            name="flyo verSpan"
  11153           >
  11154                                                                                  
  11155            <xsl:with- param 
  11156             name="data
  11157             select="$d ataValue"
  11158            />
  11159                                                                                  
  11160            <xsl:with- param 
  11161             name="free Text" 
  11162             select="''
  11163            />
  11164                                                                                  
  11165            <xsl:with- param 
  11166             name="deSq uigglefy" 
  11167             select="''
  11168            />
  11169                                                                         
  11170           </xsl:call -template>
  11171                                                               
  11172          </div>
  11173                                                     
  11174         </xsl:when >     
  11175                                                    
  11176         <xsl:when 
  11177          test="posi tion()=13"
  11178         >
  11179           
  11180          <!-- Patie nt Phone - ->
  11181                                                              
  11182          <div 
  11183           style="ove rflow:hidd en; white- space:nowr ap; width: 180px; pad ding-right :5px;"
  11184          >
  11185                                                                        
  11186           <xsl:call- template 
  11187            name="flyo verSpan"
  11188           >
  11189                                                                                  
  11190            <xsl:with- param 
  11191             name="data
  11192             select="$d ataValue"
  11193            />
  11194                                                                                  
  11195            <xsl:with- param 
  11196             name="free Text" 
  11197             select="''
  11198            />
  11199                                                                                  
  11200            <xsl:with- param 
  11201             name="deSq uigglefy" 
  11202             select="''
  11203            />
  11204                                                                         
  11205           </xsl:call -template>
  11206                                                               
  11207          </div>
  11208                                                     
  11209         </xsl:when >     
  11210                                                    
  11211         <xsl:when 
  11212          test="posi tion()=14"
  11213         >
  11214           
  11215          <!--Patien t Name -->
  11216                                                              
  11217          <div 
  11218           style="ove rflow:hidd en; white- space:nowr ap; width: 180px; pad ding-right :5px;"
  11219          >
  11220                                                                        
  11221           <xsl:call- template 
  11222            name="flyo verSpan"
  11223           >
  11224                                                                                  
  11225            <xsl:with- param 
  11226             name="data
  11227             select="$d ataValue"
  11228            />
  11229                                                                                  
  11230            <xsl:with- param 
  11231             name="free Text" 
  11232             select="''
  11233            />
  11234                                                                                  
  11235            <xsl:with- param 
  11236             name="deSq uigglefy" 
  11237             select="''
  11238            />
  11239                                                                         
  11240           </xsl:call -template>
  11241                                                               
  11242          </div>
  11243                                                     
  11244         </xsl:when >     
  11245                                                    
  11246         <xsl:when 
  11247          test="posi tion()=15"
  11248         >
  11249           
  11250          <!-- Patie nt DOB -->
  11251                                                              
  11252          <div 
  11253           style="ove rflow:hidd en; white- space:nowr ap; width: 180px; pad ding-right :5px;"
  11254          >
  11255                                                                        
  11256           <xsl:call- template 
  11257            name="flyo verSpan"
  11258           >
  11259                                                                                  
  11260            <xsl:with- param 
  11261             name="data
  11262             select="$p atdobStrin g"
  11263            />
  11264                                                                                  
  11265            <xsl:with- param 
  11266             name="free Text" 
  11267             select="''
  11268            />
  11269                                                                                  
  11270            <xsl:with- param 
  11271             name="deSq uigglefy" 
  11272             select="''
  11273            />
  11274                                                                         
  11275           </xsl:call -template>
  11276                                                               
  11277          </div>
  11278                                                     
  11279         </xsl:when >     
  11280                                                    
  11281         <xsl:when 
  11282          test="posi tion()=16"
  11283         >
  11284           
  11285          <!-- Finac ially Resp onsible Pa rty -->
  11286                                                              
  11287          <div 
  11288           style="ove rflow:hidd en; white- space:nowr ap; width: 180px; pad ding-right :5px;"
  11289          >
  11290                                                                        
  11291           <xsl:call- template 
  11292            name="flyo verSpan"
  11293           >
  11294                                                                                  
  11295            <xsl:with- param 
  11296             name="data
  11297             select="$d ataValue"
  11298            />
  11299                                                                                  
  11300            <xsl:with- param 
  11301             name="free Text" 
  11302             select="''
  11303            />
  11304                                                                                  
  11305            <xsl:with- param 
  11306             name="deSq uigglefy" 
  11307             select="''
  11308            />
  11309                                                                         
  11310           </xsl:call -template>
  11311                                                               
  11312          </div>
  11313                                                     
  11314         </xsl:when >     
  11315                                                    
  11316         <xsl:when 
  11317          test="posi tion()=17"
  11318         >
  11319           
  11320          <!-- Sunsv riber ID - ->
  11321                                                              
  11322          <div 
  11323           style="ove rflow:hidd en; white- space:nowr ap; width: 180px; pad ding-right :5px;"
  11324          >
  11325                                                                        
  11326           <xsl:call- template 
  11327            name="flyo verSpan"
  11328           >
  11329                                                                                  
  11330            <xsl:with- param 
  11331             name="data
  11332             select="$d ataValue"
  11333            />
  11334                                                                                  
  11335            <xsl:with- param 
  11336             name="free Text" 
  11337             select="''
  11338            />
  11339                                                                                  
  11340            <xsl:with- param 
  11341             name="deSq uigglefy" 
  11342             select="''
  11343            />
  11344                                                                         
  11345           </xsl:call -template>
  11346                                                               
  11347          </div>
  11348                                                     
  11349         </xsl:when >     
  11350                                                    
  11351         <xsl:when 
  11352          test="posi tion()=18"
  11353         >
  11354           
  11355          <!-- Subsc riber Addr  -->
  11356                                                              
  11357          <div 
  11358           style="ove rflow:hidd en; white- space:nowr ap; width: 180px; pad ding-right :5px;"
  11359          >
  11360                                                                        
  11361           <xsl:call- template 
  11362            name="flyo verSpan"
  11363           >
  11364                                                                                  
  11365            <xsl:with- param 
  11366             name="data
  11367             select="$d ataValue"
  11368            />
  11369                                                                                  
  11370            <xsl:with- param 
  11371             name="free Text" 
  11372             select="''
  11373            />
  11374                                                                                  
  11375            <xsl:with- param 
  11376             name="deSq uigglefy" 
  11377             select="''
  11378            />
  11379                                                                         
  11380           </xsl:call -template>
  11381                                                               
  11382          </div>
  11383                                                     
  11384         </xsl:when >     
  11385                                                    
  11386         <xsl:when 
  11387          test="posi tion()=19"
  11388         >
  11389           
  11390          <!-- Subsc riber Phon e-->
  11391                                                              
  11392          <div 
  11393           style="ove rflow:hidd en; white- space:nowr ap; width: 180px; pad ding-right :5px;"
  11394          >
  11395                                                                        
  11396           <xsl:call- template 
  11397            name="flyo verSpan"
  11398           >
  11399                                                                                  
  11400            <xsl:with- param 
  11401             name="data
  11402             select="$d ataValue"
  11403            />
  11404                                                                                  
  11405            <xsl:with- param 
  11406             name="free Text" 
  11407             select="''
  11408            />
  11409                                                                                  
  11410            <xsl:with- param 
  11411             name="deSq uigglefy" 
  11412             select="''
  11413            />
  11414                                                                         
  11415           </xsl:call -template>
  11416                                                               
  11417          </div>
  11418                                                     
  11419         </xsl:when >     
  11420                                                    
  11421         <xsl:when 
  11422          test="posi tion()=20"
  11423         >
  11424           
  11425          <!-- Subsc riber Name  -->
  11426                                                              
  11427          <div 
  11428           style="ove rflow:hidd en; white- space:nowr ap; width: 180px; pad ding-right :5px;"
  11429          >
  11430                                                                        
  11431           <xsl:call- template 
  11432            name="flyo verSpan"
  11433           >
  11434                                                                                  
  11435            <xsl:with- param 
  11436             name="data
  11437             select="$d ataValue"
  11438            />
  11439                                                                                  
  11440            <xsl:with- param 
  11441             name="free Text" 
  11442             select="''
  11443            />
  11444                                                                                  
  11445            <xsl:with- param 
  11446             name="deSq uigglefy" 
  11447             select="''
  11448            />
  11449                                                                         
  11450           </xsl:call -template>
  11451                                                               
  11452          </div>
  11453                                                     
  11454         </xsl:when >     
  11455                                                    
  11456         <xsl:when 
  11457          test="posi tion()=21"
  11458         >
  11459           
  11460          <!-- Subsc riber DOB  -->
  11461                                                              
  11462          <div 
  11463           style="ove rflow:hidd en; white- space:nowr ap; width: 180px; pad ding-right :5px;"
  11464          >
  11465                                                                        
  11466           <xsl:call- template 
  11467            name="flyo verSpan"
  11468           >
  11469                                                                                  
  11470            <xsl:with- param 
  11471             name="data
  11472             select="$s ubdobStrin g"
  11473            />
  11474                                                                                  
  11475            <xsl:with- param 
  11476             name="free Text" 
  11477             select="''
  11478            />
  11479                                                                                  
  11480            <xsl:with- param 
  11481             name="deSq uigglefy" 
  11482             select="''
  11483            />
  11484                                                                         
  11485           </xsl:call -template>
  11486                                                               
  11487          </div>
  11488                                                     
  11489         </xsl:when >                       
  11490                                                    
  11491         <xsl:when 
  11492          test="posi tion()=22"
  11493         >
  11494           
  11495          <!-- Guara ntor Date  of Financi al Respons ibility -- >
  11496                                                              
  11497          <div 
  11498           style="ove rflow:hidd en; white- space:nowr ap; width: 180px; pad ding-right :5px;"
  11499          >
  11500                                                                        
  11501           <xsl:call- template 
  11502            name="flyo verSpan"
  11503           >
  11504                                                                                  
  11505            <xsl:with- param 
  11506             name="data
  11507             select="$g uarDateStr ing"
  11508            />
  11509                                                                                  
  11510            <xsl:with- param 
  11511             name="free Text" 
  11512             select="''
  11513            />
  11514                                                                                  
  11515            <xsl:with- param 
  11516             name="deSq uigglefy" 
  11517             select="''
  11518            />
  11519                                                                         
  11520           </xsl:call -template>
  11521                                                               
  11522          </div>
  11523                                                     
  11524         </xsl:when >                                                                           
  11525                                                    
  11526         <xsl:when 
  11527          test="posi tion()=23"
  11528         >
  11529           
  11530          <!-- Guara ntor Addr  -->
  11531                                                              
  11532          <div 
  11533           style="ove rflow:hidd en; white- space:nowr ap; width: 180px; pad ding-right :5px;"
  11534          >
  11535                                                                        
  11536           <xsl:call- template 
  11537            name="flyo verSpan"
  11538           >
  11539                                                                                  
  11540            <xsl:with- param 
  11541             name="data
  11542             select="$d ataValue"
  11543            />
  11544                                                                                  
  11545            <xsl:with- param 
  11546             name="free Text" 
  11547             select="''
  11548            />
  11549                                                                                  
  11550            <xsl:with- param 
  11551             name="deSq uigglefy" 
  11552             select="''
  11553            />
  11554                                                                         
  11555           </xsl:call -template>
  11556                                                               
  11557          </div>
  11558                                                     
  11559         </xsl:when >     
  11560                                                    
  11561         <xsl:when 
  11562          test="posi tion()=24"
  11563         >
  11564           
  11565          <!-- Guara ntor Phone  -->
  11566                                                              
  11567          <div 
  11568           style="ove rflow:hidd en; white- space:nowr ap; width: 180px; pad ding-right :5px;"
  11569          >
  11570                                                                        
  11571           <xsl:call- template 
  11572            name="flyo verSpan"
  11573           >
  11574                                                                                  
  11575            <xsl:with- param 
  11576             name="data
  11577             select="$d ataValue"
  11578            />
  11579                                                                                  
  11580            <xsl:with- param 
  11581             name="free Text" 
  11582             select="''
  11583            />
  11584                                                                                  
  11585            <xsl:with- param 
  11586             name="deSq uigglefy" 
  11587             select="''
  11588            />
  11589                                                                         
  11590           </xsl:call -template>
  11591                                                               
  11592          </div>
  11593                                                     
  11594         </xsl:when >     
  11595                                                    
  11596         <xsl:when 
  11597          test="posi tion()=25"
  11598         >
  11599           
  11600          <!-- Guara ntor Name  -->
  11601                                                              
  11602          <div 
  11603           style="ove rflow:hidd en; white- space:nowr ap; width: 180px; pad ding-right :5px;"
  11604          >
  11605                                                                        
  11606           <xsl:call- template 
  11607            name="flyo verSpan"
  11608           >
  11609                                                                                  
  11610            <xsl:with- param 
  11611             name="data
  11612             select="$d ataValue"
  11613            />
  11614                                                                                  
  11615            <xsl:with- param 
  11616             name="free Text" 
  11617             select="''
  11618            />
  11619                                                                                  
  11620            <xsl:with- param 
  11621             name="deSq uigglefy" 
  11622             select="''
  11623            />
  11624                                                                         
  11625           </xsl:call -template>
  11626                                                               
  11627          </div>
  11628                                                     
  11629         </xsl:when >     
  11630                                                    
  11631         <xsl:when 
  11632          test="posi tion()=26"
  11633         >
  11634           
  11635          <!-- Healt h Plan Nam e -->
  11636                                                              
  11637          <div 
  11638           style="ove rflow:hidd en; white- space:nowr ap; width: 180px; pad ding-right :5px;"
  11639          >
  11640                                                                        
  11641           <xsl:call- template 
  11642            name="flyo verSpan"
  11643           >
  11644                                                                                  
  11645            <xsl:with- param 
  11646             name="data
  11647             select="$d ataValue"
  11648            />
  11649                                                                                  
  11650            <xsl:with- param 
  11651             name="free Text" 
  11652             select="''
  11653            />
  11654                                                                                  
  11655            <xsl:with- param 
  11656             name="deSq uigglefy" 
  11657             select="''
  11658            />
  11659                                                                         
  11660           </xsl:call -template>
  11661                                                               
  11662          </div>
  11663                                                     
  11664         </xsl:when >     
  11665                                            
  11666        </xsl:choo se>
  11667                                  
  11668       </td>
  11669                        
  11670      </xsl:for- each>
  11671              
  11672     </xsl:temp late>
  11673             
  11674             
  11675     <!--  Proc edure Tabl e -->
  11676             
  11677     <xsl:templ ate 
  11678      name="disp layProcedu reTable"
  11679     >
  11680                       
  11681      <xsl:param  
  11682       name="tabl e"
  11683      />
  11684                       
  11685                       
  11686      <!--  Get  the table  -->
  11687                       
  11688      <table 
  11689       style="fon t-size:14p
  11690       border="1"
  11691      >
  11692                                 
  11693       <thead>
  11694                                           
  11695        <tr>
  11696                                                    
  11697         <xsl:for-e ach 
  11698          select="$t able/n1:th ead/n1:tr/ n1:th"
  11699         >
  11700                                                              
  11701          <th 
  11702           class="fir st"
  11703          >
  11704           <xsl:value -of 
  11705            select="."
  11706           />
  11707          </th>
  11708                                                     
  11709         </xsl:for- each>
  11710                                            
  11711        </tr>
  11712                                  
  11713       </thead>
  11714                                 
  11715       <tbody>
  11716                                           
  11717        <xsl:choos e>
  11718                                                    
  11719         <xsl:when 
  11720          test="./n1 :td[1]/n1: content"
  11721         >
  11722                                                              
  11723          <xsl:for-e ach 
  11724           select="$t able/n1:tb ody/n1:tr"
  11725          >
  11726                                                                        
  11727           <xsl:sort 
  11728            select="su bstring(no rmalize-sp ace(./n1:t d[1]/n1:co ntent),1,8 )" 
  11729            order="des cending"
  11730           />
  11731                                                                        
  11732           <tr 
  11733            class="sec ond"
  11734           >
  11735                                                                                  
  11736            <xsl:call- template 
  11737             name="disp layProcedu reDataRow"
  11738            >
  11739                                                                                            
  11740             <xsl:with- param 
  11741              name="tabl eRow" 
  11742              select="."
  11743             />
  11744                                                                                   
  11745            </xsl:call -template>
  11746                                                                         
  11747           </tr>
  11748                                                               
  11749          </xsl:for- each>
  11750                                                     
  11751         </xsl:when >
  11752                                                    
  11753         <xsl:other wise>
  11754                                                              
  11755          <xsl:for-e ach 
  11756           select="$t able/n1:tb ody/n1:tr"
  11757          >
  11758                                                                        
  11759           <xsl:sort 
  11760            select="su bstring(no rmalize-sp ace(./n1:t d[1]),1,8)
  11761            order="des cending"
  11762           />
  11763                                                                        
  11764           <tr 
  11765            class="sec ond"
  11766           >
  11767                                                                                  
  11768            <xsl:call- template 
  11769             name="disp layProcedu reDataRow"
  11770            >
  11771                                                                                            
  11772             <xsl:with- param 
  11773              name="tabl eRow" 
  11774              select="."
  11775             />
  11776                                                                                   
  11777            </xsl:call -template>
  11778                                                                         
  11779           </tr>
  11780                                                               
  11781          </xsl:for- each>
  11782                                                     
  11783         </xsl:othe rwise>
  11784                                            
  11785        </xsl:choo se>   
  11786                                  
  11787       </tbody>
  11788                        
  11789      </table>
  11790              
  11791     </xsl:temp late>
  11792             
  11793             
  11794     <xsl:templ ate 
  11795      name="disp layProcedu reDataRow"
  11796     >
  11797                       
  11798      <xsl:param  
  11799       name="tabl eRow"
  11800      />
  11801     
  11802                       
  11803      <xsl:varia ble 
  11804       name="time Value"
  11805      >
  11806                                 
  11807       <xsl:choos e>
  11808                                           
  11809        <xsl:when 
  11810         test="./n1 :td[1]/n1: content"
  11811        >
  11812                                                    
  11813         <xsl:value -of 
  11814          select="./ n1:td[1]/n 1:content"
  11815         /> 
  11816                                            
  11817        </xsl:when >
  11818                                           
  11819        <xsl:other wise>
  11820                                                    
  11821         <xsl:value -of 
  11822          select="./ n1:td[1]"
  11823         />
  11824                                            
  11825        </xsl:othe rwise>
  11826                                  
  11827       </xsl:choo se>
  11828                        
  11829      </xsl:vari able>
  11830                       
  11831                       
  11832      <xsl:varia ble 
  11833       name="date String"
  11834      >
  11835                                 
  11836       <xsl:call- template 
  11837        name="form atDateShor t"
  11838       >
  11839                                           
  11840        <xsl:with- param 
  11841         name="date String" 
  11842         select="no rmalize-sp ace($timeV alue)"
  11843        />
  11844                                  
  11845       </xsl:call -template>  
  11846                        
  11847      </xsl:vari able>
  11848                       
  11849                       
  11850                       
  11851      <xsl:for-e ach 
  11852       select="$t ableRow/n1 :td"
  11853      >
  11854                        
  11855                                 
  11856       <xsl:varia ble 
  11857        name="data Value"
  11858       >
  11859                                           
  11860        <xsl:choos e>
  11861                                                    
  11862         <xsl:when 
  11863          test="./n1 :content"
  11864         >
  11865                                                              
  11866          <xsl:value -of 
  11867           select="./ n1:content "
  11868          /> 
  11869                                                     
  11870         </xsl:when >
  11871                                                    
  11872         <xsl:other wise>
  11873                                                              
  11874          <xsl:value -of 
  11875           select="."
  11876          />
  11877                                                     
  11878         </xsl:othe rwise>
  11879                                            
  11880        </xsl:choo se>
  11881                                  
  11882       </xsl:vari able>
  11883                                 
  11884                                 
  11885       <td>
  11886                                           
  11887        <xsl:choos e>
  11888                                                    
  11889         <xsl:when 
  11890          test="posi tion()=1"
  11891         >
  11892           
  11893          <!-- Date/ Time -->
  11894                                                              
  11895          <div 
  11896           style="ove rflow:hidd en; white- space:nowr ap; width: 100px;"
  11897          >
  11898                                                               
  11899           <xsl:call- template 
  11900            name="flyo verSpan"
  11901           >
  11902                                                                         
  11903            <xsl:with- param 
  11904             name="data
  11905             select="$d ateString"  
  11906            />
  11907                                                                         
  11908            <xsl:with- param 
  11909             name="free Text" 
  11910             select="''
  11911            />
  11912                                                                         
  11913            <xsl:with- param 
  11914             name="deSq uigglefy" 
  11915             select="''
  11916            />
  11917                                                                
  11918           </xsl:call -template>
  11919                                                               
  11920          </div>
  11921                                                     
  11922         </xsl:when >
  11923                                                    
  11924         <xsl:when 
  11925          test="posi tion()=2"
  11926         >
  11927           
  11928          <!-- Proce sure Type  -->
  11929                                                              
  11930          <div 
  11931           style="ove rflow:hidd en; white- space:nowr ap; width: 180px;;"
  11932          >
  11933                                                               
  11934           <xsl:call- template 
  11935            name="flyo verSpan"
  11936           >
  11937                                                                         
  11938            <xsl:with- param 
  11939             name="data
  11940             select="$d ataValue" 
  11941            />
  11942                                                                         
  11943            <xsl:with- param 
  11944             name="free Text" 
  11945             select="''
  11946            />
  11947                                                                         
  11948            <xsl:with- param 
  11949             name="deSq uigglefy" 
  11950             select="''
  11951            />
  11952                                                                
  11953           </xsl:call -template>
  11954                                                               
  11955          </div>
  11956                                                     
  11957         </xsl:when >
  11958                                                    
  11959         <xsl:when 
  11960          test="posi tion()=3"
  11961         >
  11962           
  11963          <!-- Proce sure Descr iption -->
  11964                                                              
  11965          <div 
  11966           style="ove rflow:hidd en; white- space:nowr ap; width: 240px;;"
  11967          >
  11968                                                               
  11969           <xsl:call- template 
  11970            name="flyo verSpan"
  11971           >
  11972                                                                         
  11973            <xsl:with- param 
  11974             name="data
  11975             select="$d ataValue" 
  11976            />
  11977                                                                         
  11978            <xsl:with- param 
  11979             name="free Text" 
  11980             select="'y es'" 
  11981            />
  11982                                                                         
  11983            <xsl:with- param 
  11984             name="deSq uigglefy" 
  11985             select="''
  11986            />
  11987                                                                
  11988           </xsl:call -template>
  11989                                                               
  11990          </div>
  11991                                                     
  11992         </xsl:when >
  11993                                                    
  11994         <xsl:when 
  11995          test="posi tion()=4"
  11996         >
  11997           
  11998          <!--Proced ure Type D etails -->
  11999                                                              
  12000          <xsl:varia ble 
  12001           name="data "
  12002          >
  12003                                                                        
  12004           <xsl:call- template 
  12005            name="repl aceSquiggl esWithBrea ks"
  12006           >
  12007                                                                                  
  12008            <xsl:with- param 
  12009             name="text
  12010             select="$d ataValue"
  12011            />
  12012                                                                         
  12013           </xsl:call -template>
  12014                                                               
  12015          </xsl:vari able>
  12016                                                              
  12017          <xsl:varia ble 
  12018           name="lenT est" 
  12019           select="st ring-lengt h($data)" 
  12020          />
  12021                                                              
  12022          <xsl:choos e>
  12023                                                                        
  12024           <xsl:when 
  12025            test="$len Test &gt;  25"
  12026           >
  12027                                                                                  
  12028            <textarea 
  12029             rows="10" 
  12030             style="ove rflow-y:au to;width:2 40px;text- align:left  resize:no ne"
  12031            >
  12032                                                                                            
  12033             <xsl:value -of 
  12034              select="$d ata"
  12035             />
  12036                                                                                   
  12037            </textarea >
  12038                                                                         
  12039           </xsl:when >
  12040                                                                        
  12041           <xsl:other wise>
  12042                                                                                  
  12043            <div 
  12044             style="ove rflow:hidd en; white- space:nowr ap; width: 360px;heig ht:1em"
  12045            >
  12046                                                                                            
  12047             <xsl:call- template 
  12048              name="flyo verSpan"
  12049             >
  12050                                                                                                     
  12051              <xsl:with- param 
  12052               name="data
  12053               select="$d ataValue" 
  12054              />
  12055                                                                                                     
  12056              <xsl:with- param 
  12057               name="free Text" 
  12058               select="'y es'" 
  12059              />
  12060                                                                                                     
  12061              <xsl:with- param 
  12062               name="deSq uigglefy" 
  12063               select="'y es'" 
  12064              />
  12065                                                                                             
  12066             </xsl:call -template>
  12067                                                                                   
  12068            </div>
  12069                                                                         
  12070           </xsl:othe rwise>         
  12071                                                               
  12072          </xsl:choo se>
  12073                                                     
  12074         </xsl:when >
  12075                                                    
  12076         <xsl:when 
  12077          test="posi tion()=5"
  12078         >
  12079           
  12080          <!-- Provi der -->
  12081                                                              
  12082          <div 
  12083           style="ove rflow:hidd en; white- space:nowr ap; width: 280px;;"
  12084          >
  12085                                                               
  12086           <xsl:call- template 
  12087            name="flyo verSpan"
  12088           >
  12089                                                                         
  12090            <xsl:with- param 
  12091             name="data
  12092             select="$d ataValue" 
  12093            />
  12094                                                                         
  12095            <xsl:with- param 
  12096             name="free Text" 
  12097             select="''
  12098            />
  12099                                                                         
  12100            <xsl:with- param 
  12101             name="deSq uigglefy" 
  12102             select="''
  12103            />
  12104                                                                
  12105           </xsl:call -template>
  12106                                                               
  12107          </div>
  12108                                                     
  12109         </xsl:when >
  12110                                                    
  12111         <xsl:when 
  12112          test="posi tion()=6"
  12113         >
  12114           
  12115          <!-- Body  Site -->
  12116                                                              
  12117          <div 
  12118           style="ove rflow:hidd en; white- space:nowr ap; width: 180px;"
  12119          >
  12120                                                               
  12121           <xsl:call- template 
  12122            name="flyo verSpan"
  12123           >
  12124                                                                         
  12125            <xsl:with- param 
  12126             name="data
  12127             select="$d ataValue" 
  12128            />
  12129                                                                         
  12130            <xsl:with- param 
  12131             name="free Text" 
  12132             select="''
  12133            />
  12134                                                                         
  12135            <xsl:with- param 
  12136             name="deSq uigglefy" 
  12137             select="''
  12138            />
  12139                                                                
  12140           </xsl:call -template>
  12141                                                               
  12142          </div>
  12143                                                     
  12144         </xsl:when >
  12145                                                    
  12146         <xsl:when 
  12147          test="posi tion()=7"
  12148         >
  12149           
  12150          <!-- Sourc e -->
  12151                                                              
  12152          <div 
  12153           style="ove rflow:hidd en; white- space:nowr ap; width: 280px;"
  12154          >
  12155                                                               
  12156           <xsl:call- template 
  12157            name="flyo verSpan"
  12158           >
  12159                                                                         
  12160            <xsl:with- param 
  12161             name="data
  12162             select="$d ataValue" 
  12163            />
  12164                                                                         
  12165            <xsl:with- param 
  12166             name="free Text" 
  12167             select="''
  12168            />
  12169                                                                         
  12170            <xsl:with- param 
  12171             name="deSq uigglefy" 
  12172             select="''
  12173            />
  12174                                                                
  12175           </xsl:call -template>
  12176                                                               
  12177          </div>
  12178                                                     
  12179         </xsl:when >
  12180                                                    
  12181         <xsl:other wise>
  12182                                                              
  12183          <div 
  12184           style="ove rflow:hidd en; white- space:nowr ap; width: 280px;"
  12185          >
  12186                                                               
  12187           <xsl:call- template 
  12188            name="flyo verSpan"
  12189           >
  12190                                                                         
  12191            <xsl:with- param 
  12192             name="data
  12193             select="$d ataValue" 
  12194            />
  12195                                                                         
  12196            <xsl:with- param 
  12197             name="free Text" 
  12198             select="''
  12199            />
  12200                                                                         
  12201            <xsl:with- param 
  12202             name="deSq uigglefy" 
  12203             select="''
  12204            />
  12205                                                                
  12206           </xsl:call -template>
  12207                                                               
  12208          </div>
  12209                                                     
  12210         </xsl:othe rwise>
  12211                                            
  12212        </xsl:choo se>
  12213                                  
  12214       </td>
  12215                        
  12216      </xsl:for- each>
  12217              
  12218     </xsl:temp late>
  12219             
  12220             
  12221     <xsl:templ ate 
  12222      name="disp layFutureE ncountersT able"
  12223     >
  12224                       
  12225      <xsl:param  
  12226       name="tabl e"
  12227      />
  12228                       
  12229                       
  12230      <!--  Get  the table  -->
  12231                       
  12232      <table 
  12233       style="fon t-size:14p
  12234       border="1"
  12235      >
  12236                                 
  12237       <caption 
  12238        style="tex t-align:le ft"
  12239       >
  12240        <b>
  12241         <xsl:value -of 
  12242          select="$t able/../n1 :title"
  12243         />
  12244        </b>
  12245       </caption>
  12246                                 
  12247       <thead>
  12248                                           
  12249        <tr>
  12250                                                    
  12251         <xsl:for-e ach 
  12252          select="$t able/n1:th ead/n1:th"
  12253         >
  12254                                                              
  12255          <th 
  12256           class="fir st"
  12257          >
  12258           <xsl:value -of 
  12259            select="."
  12260           />
  12261          </th>
  12262                                                     
  12263         </xsl:for- each>
  12264                                            
  12265        </tr>
  12266                                  
  12267       </thead>
  12268                                 
  12269       <tbody>
  12270                                           
  12271        <xsl:choos e>
  12272                                                    
  12273         <xsl:when 
  12274          test="./n1 :td[1]/n1: content"
  12275         >
  12276                                                              
  12277          <xsl:for-e ach 
  12278           select="$t able/n1:tb ody/n1:tr"
  12279          >
  12280                                                                        
  12281           <xsl:sort 
  12282            select="su bstring(no rmalize-sp ace(./n1:t d[1]/n1:co ntent),1,8 )" 
  12283            order="des cending"
  12284           />
  12285                                                                        
  12286           <tr 
  12287            class="sec ond"
  12288           >
  12289                                                                                  
  12290            <xsl:call- template 
  12291             name="disp layFutureE ncounterDa taRow"
  12292            >
  12293                                                                                            
  12294             <xsl:with- param 
  12295              name="tabl eRow" 
  12296              select="."
  12297             />
  12298                                                                                   
  12299            </xsl:call -template>
  12300                                                                         
  12301           </tr>
  12302                                                               
  12303          </xsl:for- each>
  12304                                                     
  12305         </xsl:when >
  12306                                                    
  12307         <xsl:other wise>
  12308                                                              
  12309          <xsl:for-e ach 
  12310           select="$t able/n1:tb ody/n1:tr"
  12311          >
  12312                                                                        
  12313           <xsl:sort 
  12314            select="su bstring(no rmalize-sp ace(./n1:t d[1]),1,8)
  12315            order="des cending"
  12316           />
  12317                                                                        
  12318           <tr 
  12319            class="sec ond"
  12320           >
  12321                                                                                  
  12322            <xsl:call- template 
  12323             name="disp layFutureE ncounterDa taRow"
  12324            >
  12325                                                                                            
  12326             <xsl:with- param 
  12327              name="tabl eRow" 
  12328              select="."
  12329             />
  12330                                                                                   
  12331            </xsl:call -template>
  12332                                                                         
  12333           </tr>
  12334                                                               
  12335          </xsl:for- each>
  12336                                                     
  12337         </xsl:othe rwise>
  12338                                            
  12339        </xsl:choo se>   
  12340                                  
  12341       </tbody>
  12342                        
  12343      </table>
  12344                       
  12345      <br/>
  12346                       
  12347      <br/>
  12348              
  12349     </xsl:temp late>
  12350    
  12351             
  12352     <xsl:templ ate 
  12353      name="disp layFutureE ncounterDa taRow"
  12354     >
  12355                       
  12356      <xsl:param  
  12357       name="tabl eRow"
  12358      />
  12359     
  12360                       
  12361      <xsl:varia ble 
  12362       name="time Value"
  12363      >
  12364                                 
  12365       <xsl:choos e>
  12366                                           
  12367        <xsl:when 
  12368         test="./n1 :td[1]/n1: content"
  12369        >
  12370                                                    
  12371         <xsl:value -of 
  12372          select="./ n1:td[1]/n 1:content"
  12373         /> 
  12374                                            
  12375        </xsl:when >
  12376                                           
  12377        <xsl:other wise>
  12378                                                    
  12379         <xsl:value -of 
  12380          select="./ n1:td[1]"
  12381         />
  12382                                            
  12383        </xsl:othe rwise>
  12384                                  
  12385       </xsl:choo se>
  12386                        
  12387      </xsl:vari able>
  12388                       
  12389                       
  12390      <xsl:varia ble 
  12391       name="date String"
  12392      >
  12393                                 
  12394       <xsl:call- template 
  12395        name="conv ertDate"
  12396       >
  12397                                           
  12398        <xsl:with- param 
  12399         name="date Value" 
  12400         select="no rmalize-sp ace($timeV alue)"
  12401        />
  12402                                  
  12403       </xsl:call -template>  
  12404                        
  12405      </xsl:vari able>
  12406     
  12407                       
  12408      <xsl:varia ble 
  12409       name="faci lityTimeVa lue"
  12410      >
  12411                                 
  12412       <xsl:choos e>
  12413                                           
  12414        <xsl:when 
  12415         test="./n1 :td[9]/n1: content"
  12416        >
  12417                                                    
  12418         <xsl:value -of 
  12419          select="./ n1:td[9]/n 1:content"
  12420         /> 
  12421                                            
  12422        </xsl:when >
  12423                                           
  12424        <xsl:other wise>
  12425                                                    
  12426         <xsl:value -of 
  12427          select="./ n1:td[9]"
  12428         />
  12429                                            
  12430        </xsl:othe rwise>
  12431                                  
  12432       </xsl:choo se>
  12433                        
  12434      </xsl:vari able>
  12435                       
  12436                       
  12437      <xsl:varia ble 
  12438       name="faci lityTimeSt ring"
  12439      >
  12440                                 
  12441       <xsl:call- template 
  12442        name="form atDateShor t"
  12443       >
  12444                                           
  12445        <xsl:with- param 
  12446         name="date String" 
  12447         select="no rmalize-sp ace($facil ityTimeVal ue)"
  12448        />
  12449                                  
  12450       </xsl:call -template>  
  12451                        
  12452      </xsl:vari able>
  12453                       
  12454                       
  12455      <xsl:for-e ach 
  12456       select="$t ableRow/n1 :td"
  12457      >
  12458                        
  12459                                 
  12460       <xsl:varia ble 
  12461        name="data Value"
  12462       >
  12463                                           
  12464        <xsl:choos e>
  12465                                                    
  12466         <xsl:when 
  12467          test="./n1 :content"
  12468         >
  12469                                                              
  12470          <xsl:value -of 
  12471           select="./ n1:content "
  12472          /> 
  12473                                                     
  12474         </xsl:when >
  12475                                                    
  12476         <xsl:other wise>
  12477                                                              
  12478          <xsl:value -of 
  12479           select="."
  12480          />
  12481                                                     
  12482         </xsl:othe rwise>
  12483                                            
  12484        </xsl:choo se>
  12485                                  
  12486       </xsl:vari able>
  12487                                 
  12488                                 
  12489       <td>
  12490                                           
  12491        <xsl:choos e>
  12492                                                    
  12493         <xsl:when 
  12494          test="posi tion()=1"
  12495         >
  12496           
  12497          <!-- Date/ Time -->
  12498                                                              
  12499          <div 
  12500           style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  12501          >
  12502                                                               
  12503           <xsl:call- template 
  12504            name="flyo verSpan"
  12505           >
  12506                                                                         
  12507            <xsl:with- param 
  12508             name="data
  12509             select="$d ateString"  
  12510            />
  12511                                                                         
  12512            <xsl:with- param 
  12513             name="free Text" 
  12514             select="''
  12515            />
  12516                                                                         
  12517            <xsl:with- param 
  12518             name="deSq uigglefy" 
  12519             select="''
  12520            />
  12521                                                                
  12522           </xsl:call -template>
  12523                                                               
  12524          </div>
  12525                                                     
  12526         </xsl:when >
  12527                                                    
  12528         <xsl:when 
  12529          test="posi tion()=2"
  12530         >
  12531           
  12532          <!-- Encou nter Type  -->
  12533                                                              
  12534          <div 
  12535           style="ove rflow:hidd en; white- space:nowr ap; width: 180px;;"
  12536          >
  12537                                                               
  12538           <xsl:call- template 
  12539            name="flyo verSpan"
  12540           >
  12541                                                                         
  12542            <xsl:with- param 
  12543             name="data
  12544             select="$d ataValue" 
  12545            />
  12546                                                                         
  12547            <xsl:with- param 
  12548             name="free Text" 
  12549             select="''
  12550            />
  12551                                                                         
  12552            <xsl:with- param 
  12553             name="deSq uigglefy" 
  12554             select="''
  12555            />
  12556                                                                
  12557           </xsl:call -template>
  12558                                                               
  12559          </div>
  12560                                                     
  12561         </xsl:when >
  12562                                                    
  12563         <xsl:when 
  12564          test="posi tion()=3"
  12565         >
  12566           
  12567          <!-- Descr iption -->
  12568                                                              
  12569          <div 
  12570           style="ove rflow:hidd en; white- space:nowr ap; width: 240px;;"
  12571          >
  12572                                                               
  12573           <xsl:call- template 
  12574            name="flyo verSpan"
  12575           >
  12576                                                                         
  12577            <xsl:with- param 
  12578             name="data
  12579             select="$d ataValue" 
  12580            />
  12581                                                                         
  12582            <xsl:with- param 
  12583             name="free Text" 
  12584             select="'y es'" 
  12585            />
  12586                                                                         
  12587            <xsl:with- param 
  12588             name="deSq uigglefy" 
  12589             select="'y es'" 
  12590            />
  12591                                                                
  12592           </xsl:call -template>
  12593                                                               
  12594          </div>
  12595                                                     
  12596         </xsl:when >
  12597                                                    
  12598         <xsl:when 
  12599          test="posi tion()=4"
  12600         >
  12601           
  12602          <!-- Admis sion Type  -->
  12603                                                              
  12604          <div 
  12605           style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  12606          >
  12607                                                               
  12608           <xsl:call- template 
  12609            name="flyo verSpan"
  12610           >
  12611                                                                         
  12612            <xsl:with- param 
  12613             name="data
  12614             select="$d ataValue" 
  12615            />
  12616                                                                         
  12617            <xsl:with- param 
  12618             name="free Text" 
  12619             select="'y es'" 
  12620            />
  12621                                                                         
  12622            <xsl:with- param 
  12623             name="deSq uigglefy" 
  12624             select="'y es'" 
  12625            />
  12626                                                                
  12627           </xsl:call -template>
  12628                                                               
  12629          </div>
  12630                                                     
  12631         </xsl:when >
  12632                                                    
  12633         <xsl:when 
  12634          test="posi tion()=5"
  12635         >
  12636           
  12637          <!-- Provi der -->
  12638                                                              
  12639          <div 
  12640           style="ove rflow:hidd en; white- space:nowr ap; width: 280px;;"
  12641          >
  12642                                                               
  12643           <xsl:call- template 
  12644            name="flyo verSpan"
  12645           >
  12646                                                                         
  12647            <xsl:with- param 
  12648             name="data
  12649             select="$d ataValue" 
  12650            />
  12651                                                                         
  12652            <xsl:with- param 
  12653             name="free Text" 
  12654             select="'y es'" 
  12655            />
  12656                                                                         
  12657            <xsl:with- param 
  12658             name="deSq uigglefy" 
  12659             select="'y es'" 
  12660            />
  12661                                                                
  12662           </xsl:call -template>
  12663                                                               
  12664          </div>
  12665                                                     
  12666         </xsl:when >
  12667                                                    
  12668         <xsl:when 
  12669          test="posi tion()=6"
  12670         >
  12671           
  12672          <!-- Admis sion Sourc e -->
  12673                                                              
  12674          <div 
  12675           style="ove rflow:hidd en; white- space:nowr ap; width: 100px;"
  12676          >
  12677                                                               
  12678           <xsl:call- template 
  12679            name="flyo verSpan"
  12680           >
  12681                                                                         
  12682            <xsl:with- param 
  12683             name="data
  12684             select="$d ataValue" 
  12685            />
  12686                                                                         
  12687            <xsl:with- param 
  12688             name="free Text" 
  12689             select="''
  12690            />
  12691                                                                         
  12692            <xsl:with- param 
  12693             name="deSq uigglefy" 
  12694             select="''
  12695            />
  12696                                                                
  12697           </xsl:call -template>
  12698                                                               
  12699          </div>
  12700                                                     
  12701         </xsl:when >
  12702                                                    
  12703         <xsl:when 
  12704          test="posi tion()=7"
  12705         >
  12706           
  12707          <!-- Facil ity Locati on -->
  12708                                                              
  12709          <div 
  12710           style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  12711          >
  12712                                                               
  12713           <xsl:call- template 
  12714            name="flyo verSpan"
  12715           >
  12716                                                                         
  12717            <xsl:with- param 
  12718             name="data
  12719             select="$d ataValue" 
  12720            />
  12721                                                                         
  12722            <xsl:with- param 
  12723             name="free Text" 
  12724             select="''
  12725            />
  12726                                                                         
  12727            <xsl:with- param 
  12728             name="deSq uigglefy" 
  12729             select="''
  12730            />
  12731                                                                
  12732           </xsl:call -template>
  12733                                                               
  12734          </div>
  12735                                                     
  12736         </xsl:when >
  12737                                                    
  12738         <xsl:when 
  12739          test="posi tion()=8"
  12740         >
  12741           
  12742          <!-- In Fa cility Dur ation (tim e) -->
  12743                                                              
  12744          <div 
  12745           style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  12746          >
  12747                                                               
  12748           <xsl:call- template 
  12749            name="flyo verSpan"
  12750           >
  12751                                                                         
  12752            <xsl:with- param 
  12753             name="data
  12754             select="$f acilityTim eString" 
  12755            />
  12756                                                                         
  12757            <xsl:with- param 
  12758             name="free Text" 
  12759             select="'y es'" 
  12760            />
  12761                                                                         
  12762            <xsl:with- param 
  12763             name="deSq uigglefy" 
  12764             select="'y es'" 
  12765            />
  12766                                                                
  12767           </xsl:call -template>
  12768                                                               
  12769          </div>
  12770                                                     
  12771         </xsl:when >
  12772                                                    
  12773         <xsl:when 
  12774          test="posi tion()=9"
  12775         >
  12776           
  12777          <!-- Reaso n for Visi t -->
  12778                                                              
  12779          <div 
  12780           style="ove rflow:hidd en; white- space:nowr ap; width: 280px;"
  12781          >
  12782                                                               
  12783           <xsl:call- template 
  12784            name="flyo verSpan"
  12785           >
  12786                                                                         
  12787            <xsl:with- param 
  12788             name="data
  12789             select="$d ataValue" 
  12790            />
  12791                                                                         
  12792            <xsl:with- param 
  12793             name="free Text" 
  12794             select="''
  12795            />
  12796                                                                         
  12797            <xsl:with- param 
  12798             name="deSq uigglefy" 
  12799             select="''
  12800            />
  12801                                                                
  12802           </xsl:call -template>
  12803                                                               
  12804          </div>
  12805                                                     
  12806         </xsl:when >
  12807                                                    
  12808         <xsl:when 
  12809          test="posi tion()=10"
  12810         >
  12811           
  12812          <!-- Sourc e -->
  12813                                                              
  12814          <div 
  12815           style="ove rflow:hidd en; white- space:nowr ap; width: 100px;"
  12816          >
  12817                                                               
  12818           <xsl:call- template 
  12819            name="flyo verSpan"
  12820           >
  12821                                                                         
  12822            <xsl:with- param 
  12823             name="data
  12824             select="$d ataValue" 
  12825            />
  12826                                                                         
  12827            <xsl:with- param 
  12828             name="free Text" 
  12829             select="''
  12830            />
  12831                                                                         
  12832            <xsl:with- param 
  12833             name="deSq uigglefy" 
  12834             select="''
  12835            />
  12836                                                                
  12837           </xsl:call -template>
  12838                                                               
  12839          </div>
  12840                                                     
  12841         </xsl:when >
  12842                                                    
  12843         <xsl:when 
  12844          test="posi tion()=11"
  12845         >
  12846           
  12847          <!-- Patie nt Class - ->
  12848                                                              
  12849          <div 
  12850           style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  12851          >
  12852                                                               
  12853           <xsl:call- template 
  12854            name="flyo verSpan"
  12855           >
  12856                                                                         
  12857            <xsl:with- param 
  12858             name="data
  12859             select="$d ataValue" 
  12860            />
  12861                                                                         
  12862            <xsl:with- param 
  12863             name="free Text" 
  12864             select="''
  12865            />
  12866                                                                         
  12867            <xsl:with- param 
  12868             name="deSq uigglefy" 
  12869             select="''
  12870            />
  12871                                                                
  12872           </xsl:call -template>
  12873                                                               
  12874          </div>
  12875                                                     
  12876         </xsl:when >
  12877                                                    
  12878         <xsl:when 
  12879          test="posi tion()=12"
  12880         >
  12881           
  12882          <!-- Patie nt Class - ->
  12883                                                              
  12884          <div 
  12885           style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  12886          >
  12887                                                               
  12888           <xsl:call- template 
  12889            name="flyo verSpan"
  12890           >
  12891                                                                         
  12892            <xsl:with- param 
  12893             name="data
  12894             select="$d ataValue" 
  12895            />
  12896                                                                         
  12897            <xsl:with- param 
  12898             name="free Text" 
  12899             select="''
  12900            />
  12901                                                                         
  12902            <xsl:with- param 
  12903             name="deSq uigglefy" 
  12904             select="''
  12905            />
  12906                                                                
  12907           </xsl:call -template>
  12908                                                               
  12909          </div>
  12910                                                     
  12911         </xsl:when >
  12912                                                    
  12913         <xsl:when 
  12914          test="posi tion()=13"
  12915         >
  12916           
  12917          <!-- Patie nt Class - ->
  12918                                                              
  12919          <div 
  12920           style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  12921          >
  12922                                                               
  12923           <xsl:call- template 
  12924            name="flyo verSpan"
  12925           >
  12926                                                                         
  12927            <xsl:with- param 
  12928             name="data
  12929             select="$d ataValue" 
  12930            />
  12931                                                                         
  12932            <xsl:with- param 
  12933             name="free Text" 
  12934             select="''
  12935            />
  12936                                                                         
  12937            <xsl:with- param 
  12938             name="deSq uigglefy" 
  12939             select="''
  12940            />
  12941                                                                
  12942           </xsl:call -template>
  12943                                                               
  12944          </div>
  12945                                                     
  12946         </xsl:when >
  12947                                                    
  12948         <xsl:when 
  12949          test="posi tion()=14"
  12950         >
  12951           
  12952          <!-- Patie nt Class - ->
  12953                                                              
  12954          <div 
  12955           style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  12956          >
  12957                                                               
  12958           <xsl:call- template 
  12959            name="flyo verSpan"
  12960           >
  12961                                                                         
  12962            <xsl:with- param 
  12963             name="data
  12964             select="$d ataValue" 
  12965            />
  12966                                                                         
  12967            <xsl:with- param 
  12968             name="free Text" 
  12969             select="''
  12970            />
  12971                                                                         
  12972            <xsl:with- param 
  12973             name="deSq uigglefy" 
  12974             select="''
  12975            />
  12976                                                                
  12977           </xsl:call -template>
  12978                                                               
  12979          </div>
  12980                                                     
  12981         </xsl:when >
  12982                                                    
  12983         <xsl:when 
  12984          test="posi tion()=15"
  12985         >
  12986           
  12987          <!-- Patie nt Class - ->
  12988                                                              
  12989          <div 
  12990           style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  12991          >
  12992                                                               
  12993           <xsl:call- template 
  12994            name="flyo verSpan"
  12995           >
  12996                                                                         
  12997            <xsl:with- param 
  12998             name="data
  12999             select="$d ataValue" 
  13000            />
  13001                                                                         
  13002            <xsl:with- param 
  13003             name="free Text" 
  13004             select="''
  13005            />
  13006                                                                         
  13007            <xsl:with- param 
  13008             name="deSq uigglefy" 
  13009             select="''
  13010            />
  13011                                                                
  13012           </xsl:call -template>
  13013                                                               
  13014          </div>
  13015                                                     
  13016         </xsl:when >
  13017                                                    
  13018         <xsl:when 
  13019          test="posi tion()=16"
  13020         >
  13021           
  13022          <!-- Patie nt Class - ->
  13023                                                              
  13024          <div 
  13025           style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  13026          >
  13027                                                               
  13028           <xsl:call- template 
  13029            name="flyo verSpan"
  13030           >
  13031                                                                         
  13032            <xsl:with- param 
  13033             name="data
  13034             select="$d ataValue" 
  13035            />
  13036                                                                         
  13037            <xsl:with- param 
  13038             name="free Text" 
  13039             select="''
  13040            />
  13041                                                                         
  13042            <xsl:with- param 
  13043             name="deSq uigglefy" 
  13044             select="''
  13045            />
  13046                                                                
  13047           </xsl:call -template>
  13048                                                               
  13049          </div>
  13050                                                     
  13051         </xsl:when >
  13052                                            
  13053        </xsl:choo se>
  13054                                  
  13055       </td>
  13056                        
  13057      </xsl:for- each>
  13058              
  13059     </xsl:temp late>
  13060    
  13061             
  13062     <xsl:templ ate 
  13063      name="disp layFutureS upplyTable "
  13064     >
  13065                       
  13066      <xsl:param  
  13067       name="tabl e"
  13068      />
  13069                                         
  13070                       
  13071      <!--  Get  the table  -->
  13072                       
  13073      <table 
  13074       style="fon t-size:14p
  13075       border="1"
  13076      >
  13077                                 
  13078       <caption 
  13079        style="tex t-align:le ft"
  13080       >
  13081        <b>
  13082         <xsl:value -of 
  13083          select="$t able/../n1 :title"
  13084         />
  13085        </b>
  13086       </caption>
  13087                                 
  13088       <thead>
  13089                                           
  13090        <tr>
  13091                                                    
  13092         <xsl:for-e ach 
  13093          select="$t able/n1:th ead/n1:th"
  13094         >
  13095                                                              
  13096          <th 
  13097           class="fir st"
  13098          >
  13099           <xsl:value -of 
  13100            select="."
  13101           />
  13102          </th>
  13103                                                     
  13104         </xsl:for- each>
  13105                                            
  13106        </tr>
  13107                                  
  13108       </thead>
  13109                                 
  13110       <tbody>
  13111                                           
  13112        <xsl:choos e>
  13113                                                    
  13114         <xsl:when 
  13115          test="./n1 :td[1]/n1: content"
  13116         >
  13117                                                              
  13118          <xsl:for-e ach 
  13119           select="$t able/n1:tb ody/n1:tr"
  13120          >
  13121                                                                        
  13122           <xsl:sort 
  13123            select="su bstring(no rmalize-sp ace(./n1:t d[1]/n1:co ntent),1,8 )" 
  13124            order="des cending"
  13125           />
  13126                                                                        
  13127           <tr 
  13128            class="sec ond"
  13129           >
  13130                                                                                  
  13131            <xsl:call- template 
  13132             name="disp layFutureS upplyDataR ow"
  13133            >
  13134                                                                                            
  13135             <xsl:with- param 
  13136              name="tabl eRow" 
  13137              select="."
  13138             />
  13139                                                                                   
  13140            </xsl:call -template>
  13141                                                                         
  13142           </tr>
  13143                                                               
  13144          </xsl:for- each>
  13145                                                     
  13146         </xsl:when >
  13147                                                    
  13148         <xsl:other wise>
  13149                                                              
  13150          <xsl:for-e ach 
  13151           select="$t able/n1:tb ody/n1:tr"
  13152          >
  13153                                                                        
  13154           <xsl:sort 
  13155            select="su bstring(no rmalize-sp ace(./n1:t d[1]),1,8)
  13156            order="des cending"
  13157           />
  13158                                                                        
  13159           <tr 
  13160            class="sec ond"
  13161           >
  13162                                                                                  
  13163            <xsl:call- template 
  13164             name="disp layFutureS upplyDataR ow"
  13165            >
  13166                                                                                            
  13167             <xsl:with- param 
  13168              name="tabl eRow" 
  13169              select="."
  13170             />
  13171                                                                                   
  13172            </xsl:call -template>
  13173                                                                         
  13174           </tr>
  13175                                                               
  13176          </xsl:for- each>
  13177                                                     
  13178         </xsl:othe rwise>
  13179                                            
  13180        </xsl:choo se>   
  13181                                  
  13182       </tbody>
  13183                        
  13184      </table>
  13185                       
  13186      <br/>
  13187                       
  13188      <br/>
  13189              
  13190     </xsl:temp late>
  13191    
  13192             
  13193     <xsl:templ ate 
  13194      name="disp layFutureS upplyDataR ow"
  13195     >
  13196                       
  13197      <xsl:param  
  13198       name="tabl eRow"
  13199      />
  13200     
  13201                       
  13202      <xsl:varia ble 
  13203       name="time Value"
  13204      >
  13205                                 
  13206       <xsl:choos e>
  13207                                           
  13208        <xsl:when 
  13209         test="./n1 :td[3]/n1: content"
  13210        >
  13211                                                    
  13212         <xsl:value -of 
  13213          select="./ n1:td[3]/n 1:content"
  13214         /> 
  13215                                            
  13216        </xsl:when >
  13217                                           
  13218        <xsl:other wise>
  13219                                                    
  13220         <xsl:value -of 
  13221          select="./ n1:td[3]"
  13222         />
  13223                                            
  13224        </xsl:othe rwise>
  13225                                  
  13226       </xsl:choo se>
  13227                        
  13228      </xsl:vari able>
  13229                       
  13230                       
  13231      <xsl:varia ble 
  13232       name="date String"
  13233      >
  13234                                 
  13235       <xsl:call- template 
  13236        name="conv ertDate"
  13237       >
  13238                                           
  13239        <xsl:with- param 
  13240         name="date Value" 
  13241         select="no rmalize-sp ace($timeV alue)"
  13242        />
  13243                                  
  13244       </xsl:call -template>  
  13245                        
  13246      </xsl:vari able>
  13247                       
  13248                       
  13249      <xsl:varia ble 
  13250       name="auth oredTimeVa lue"
  13251      >
  13252                                 
  13253       <xsl:choos e>
  13254                                           
  13255        <xsl:when 
  13256         test="./n1 :td[8]/n1: content"
  13257        >
  13258                                                    
  13259         <xsl:value -of 
  13260          select="./ n1:td[86]/ n1:content "
  13261         /> 
  13262                                            
  13263        </xsl:when >
  13264                                           
  13265        <xsl:other wise>
  13266                                                    
  13267         <xsl:value -of 
  13268          select="./ n1:td[8]"
  13269         />
  13270                                            
  13271        </xsl:othe rwise>
  13272                                  
  13273       </xsl:choo se>
  13274                        
  13275      </xsl:vari able>
  13276                       
  13277                       
  13278      <xsl:varia ble 
  13279       name="auth oredTimeSt ring"
  13280      >
  13281                                 
  13282       <xsl:call- template 
  13283        name="form atDateShor t"
  13284       >
  13285                                           
  13286        <xsl:with- param 
  13287         name="date String" 
  13288         select="no rmalize-sp ace($autho redTimeVal ue)"
  13289        />
  13290                                  
  13291       </xsl:call -template>  
  13292                        
  13293      </xsl:vari able>
  13294                       
  13295                       
  13296      <xsl:varia ble 
  13297       name="faci lityTimeVa lue"
  13298      >
  13299                                 
  13300       <xsl:choos e>
  13301                                           
  13302        <xsl:when 
  13303         test="./n1 :td[11]/n1 :content"
  13304        >
  13305                                                    
  13306         <xsl:value -of 
  13307          select="./ n1:td[11]/ n1:content "
  13308         /> 
  13309                                            
  13310        </xsl:when >
  13311                                           
  13312        <xsl:other wise>
  13313                                                    
  13314         <xsl:value -of 
  13315          select="./ n1:td[1]"
  13316         />
  13317                                            
  13318        </xsl:othe rwise>
  13319                                  
  13320       </xsl:choo se>
  13321                        
  13322      </xsl:vari able>
  13323                       
  13324                       
  13325      <xsl:varia ble 
  13326       name="faci lityTimeSt ring"
  13327      >
  13328                                 
  13329       <xsl:call- template 
  13330        name="form atDateShor t"
  13331       >
  13332                                           
  13333        <xsl:with- param 
  13334         name="date String" 
  13335         select="no rmalize-sp ace($facil ityTimeVal ue)"
  13336        />
  13337                                  
  13338       </xsl:call -template>  
  13339                        
  13340      </xsl:vari able>
  13341                       
  13342                       
  13343      <xsl:varia ble 
  13344       name="admi ssionTimeV alue"
  13345      >
  13346                                 
  13347       <xsl:choos e>
  13348                                           
  13349        <xsl:when 
  13350         test="./n1 :td[12]/n1 :content"
  13351        >
  13352                                                    
  13353         <xsl:value -of 
  13354          select="./ n1:td[12]/ n1:content "
  13355         /> 
  13356                                            
  13357        </xsl:when >
  13358                                           
  13359        <xsl:other wise>
  13360                                                    
  13361         <xsl:value -of 
  13362          select="./ n1:td[12]"
  13363         />
  13364                                            
  13365        </xsl:othe rwise>
  13366                                  
  13367       </xsl:choo se>
  13368                        
  13369      </xsl:vari able>
  13370                       
  13371                       
  13372      <xsl:varia ble 
  13373       name="admi ssionTimeS tring"
  13374      >
  13375                                 
  13376       <xsl:call- template 
  13377        name="form atDateShor t"
  13378       >
  13379                                           
  13380        <xsl:with- param 
  13381         name="date String" 
  13382         select="no rmalize-sp ace($admis sionTimeVa lue)"
  13383        />
  13384                                  
  13385       </xsl:call -template>  
  13386                        
  13387      </xsl:vari able>
  13388                       
  13389                       
  13390      <xsl:for-e ach 
  13391       select="$t ableRow/n1 :td"
  13392      >
  13393                        
  13394                                 
  13395       <xsl:varia ble 
  13396        name="data Value"
  13397       >
  13398                                           
  13399        <xsl:choos e>
  13400                                                    
  13401         <xsl:when 
  13402          test="./n1 :content"
  13403         >
  13404                                                              
  13405          <xsl:value -of 
  13406           select="./ n1:content "
  13407          /> 
  13408                                                     
  13409         </xsl:when >
  13410                                                    
  13411         <xsl:other wise>
  13412                                                              
  13413          <xsl:value -of 
  13414           select="."
  13415          />
  13416                                                     
  13417         </xsl:othe rwise>
  13418                                            
  13419        </xsl:choo se>
  13420                                  
  13421       </xsl:vari able>
  13422                                 
  13423                                 
  13424       <td>
  13425                                           
  13426        <xsl:choos e>
  13427                                                    
  13428         <xsl:when 
  13429          test="posi tion()=1"
  13430         >
  13431           
  13432          <!-- Suppl y -->
  13433                                                              
  13434          <div 
  13435           style="ove rflow:hidd en; white- space:nowr ap; width: 100px;"
  13436          >
  13437                                                               
  13438           <xsl:call- template 
  13439            name="flyo verSpan"
  13440           >
  13441                                                                         
  13442            <xsl:with- param 
  13443             name="data
  13444             select="$d ataValue" 
  13445            />
  13446                                                                         
  13447            <xsl:with- param 
  13448             name="free Text" 
  13449             select="''
  13450            />
  13451                                                                         
  13452            <xsl:with- param 
  13453             name="deSq uigglefy" 
  13454             select="''
  13455            />
  13456                                                                
  13457           </xsl:call -template>
  13458                                                               
  13459          </div>
  13460                                                     
  13461         </xsl:when >
  13462                                                    
  13463         <xsl:when 
  13464          test="posi tion()=2"
  13465         >
  13466           
  13467          <!-- Manuf acturer -- >
  13468                                                              
  13469          <div 
  13470           style="ove rflow:hidd en; white- space:nowr ap; width: 180px;;"
  13471          >
  13472                                                               
  13473           <xsl:call- template 
  13474            name="flyo verSpan"
  13475           >
  13476                                                                         
  13477            <xsl:with- param 
  13478             name="data
  13479             select="$d ataValue" 
  13480            />
  13481                                                                         
  13482            <xsl:with- param 
  13483             name="free Text" 
  13484             select="''
  13485            />
  13486                                                                         
  13487            <xsl:with- param 
  13488             name="deSq uigglefy" 
  13489             select="''
  13490            />
  13491                                                                
  13492           </xsl:call -template>
  13493                                                               
  13494          </div>
  13495                                                     
  13496         </xsl:when >
  13497                                                    
  13498         <xsl:when 
  13499          test="posi tion()=3"
  13500         >
  13501           
  13502          <!-- Date/ Time -->
  13503                                                              
  13504          <div 
  13505           style="ove rflow:hidd en; white- space:nowr ap; width: 240px;;"
  13506          >
  13507                                                               
  13508           <xsl:call- template 
  13509            name="flyo verSpan"
  13510           >
  13511                                                                         
  13512            <xsl:with- param 
  13513             name="data
  13514             select="$d ateString"  
  13515            />
  13516                                                                         
  13517            <xsl:with- param 
  13518             name="free Text" 
  13519             select="''
  13520            />
  13521                                                                         
  13522            <xsl:with- param 
  13523             name="deSq uigglefy" 
  13524             select="''
  13525            />
  13526                                                                
  13527           </xsl:call -template>
  13528                                                               
  13529          </div>
  13530                                                     
  13531         </xsl:when >
  13532                                                    
  13533         <xsl:when 
  13534          test="posi tion()=4"
  13535         >
  13536           
  13537          <!-- ID -- >
  13538                                                              
  13539          <div 
  13540           style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  13541          >
  13542                                                               
  13543           <xsl:call- template 
  13544            name="flyo verSpan"
  13545           >
  13546                                                                         
  13547            <xsl:with- param 
  13548             name="data
  13549             select="$d ataValue" 
  13550            />
  13551                                                                         
  13552            <xsl:with- param 
  13553             name="free Text" 
  13554             select="'y es'" 
  13555            />
  13556                                                                         
  13557            <xsl:with- param 
  13558             name="deSq uigglefy" 
  13559             select="'y es'" 
  13560            />
  13561                                                                
  13562           </xsl:call -template>
  13563                                                               
  13564          </div>
  13565                                                     
  13566         </xsl:when >
  13567                                                    
  13568         <xsl:when 
  13569          test="posi tion()=5"
  13570         >
  13571           
  13572          <!-- Descr iption -->
  13573                                                              
  13574          <div 
  13575           style="ove rflow:hidd en; white- space:nowr ap; width: 280px;;"
  13576          >
  13577                                                               
  13578           <xsl:call- template 
  13579            name="flyo verSpan"
  13580           >
  13581                                                                         
  13582            <xsl:with- param 
  13583             name="data
  13584             select="$d ataValue" 
  13585            />
  13586                                                                         
  13587            <xsl:with- param 
  13588             name="free Text" 
  13589             select="'y es'" 
  13590            />
  13591                                                                         
  13592            <xsl:with- param 
  13593             name="deSq uigglefy" 
  13594             select="'y es'" 
  13595            />
  13596                                                                
  13597           </xsl:call -template>
  13598                                                               
  13599          </div>
  13600                                                     
  13601         </xsl:when >
  13602                                                    
  13603         <xsl:when 
  13604          test="posi tion()=6"
  13605         >
  13606           
  13607          <!-- Code  -->
  13608                                                              
  13609          <div 
  13610           style="ove rflow:hidd en; white- space:nowr ap; width: 100px;"
  13611          >
  13612                                                               
  13613           <xsl:call- template 
  13614            name="flyo verSpan"
  13615           >
  13616                                                                         
  13617            <xsl:with- param 
  13618             name="data
  13619             select="$d ataValue" 
  13620            />
  13621                                                                         
  13622            <xsl:with- param 
  13623             name="free Text" 
  13624             select="''
  13625            />
  13626                                                                         
  13627            <xsl:with- param 
  13628             name="deSq uigglefy" 
  13629             select="''
  13630            />
  13631                                                                
  13632           </xsl:call -template>
  13633                                                               
  13634          </div>
  13635                                                     
  13636         </xsl:when >
  13637                                                    
  13638         <xsl:when 
  13639          test="posi tion()=7"
  13640         >
  13641           
  13642          <!-- Reaso n -->
  13643                                                              
  13644          <div 
  13645           style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  13646          >
  13647                                                               
  13648           <xsl:call- template 
  13649            name="flyo verSpan"
  13650           >
  13651                                                                         
  13652            <xsl:with- param 
  13653             name="data
  13654             select="$d ataValue" 
  13655            />
  13656                                                                         
  13657            <xsl:with- param 
  13658             name="free Text" 
  13659             select="''
  13660            />
  13661                                                                         
  13662            <xsl:with- param 
  13663             name="deSq uigglefy" 
  13664             select="''
  13665            />
  13666                                                                
  13667           </xsl:call -template>
  13668                                                               
  13669          </div>
  13670                                                     
  13671         </xsl:when >
  13672                                                    
  13673         <xsl:when 
  13674          test="posi tion()=8"
  13675         >
  13676           
  13677          <!-- Autho red Time - ->
  13678                                                              
  13679          <div 
  13680           style="ove rflow:hidd en; white- space:nowr ap; width: 280px;"
  13681          >
  13682                                                               
  13683           <xsl:call- template 
  13684            name="flyo verSpan"
  13685           >
  13686                                                                         
  13687            <xsl:with- param 
  13688             name="data
  13689             select="$a uthoredTim eString" 
  13690            />
  13691                                                                         
  13692            <xsl:with- param 
  13693             name="free Text" 
  13694             select="'y es'" 
  13695            />
  13696                                                                         
  13697            <xsl:with- param 
  13698             name="deSq uigglefy" 
  13699             select="'y es'" 
  13700            />
  13701                                                                
  13702           </xsl:call -template>
  13703                                                               
  13704          </div>
  13705                                                     
  13706         </xsl:when >
  13707                                                    
  13708         <xsl:when 
  13709          test="posi tion()=9"
  13710         >
  13711           
  13712          <!-- Assig ned Person  -->
  13713                                                              
  13714          <div 
  13715           style="ove rflow:hidd en; white- space:nowr ap; width: 100px;"
  13716          >
  13717                                                               
  13718           <xsl:call- template 
  13719            name="flyo verSpan"
  13720           >
  13721                                                                         
  13722            <xsl:with- param 
  13723             name="data
  13724             select="$d ataValue" 
  13725            />
  13726                                                                         
  13727            <xsl:with- param 
  13728             name="free Text" 
  13729             select="''
  13730            />
  13731                                                                         
  13732            <xsl:with- param 
  13733             name="deSq uigglefy" 
  13734             select="''
  13735            />
  13736                                                                
  13737           </xsl:call -template>
  13738                                                               
  13739          </div>
  13740                                                     
  13741         </xsl:when >
  13742                                                    
  13743         <xsl:when 
  13744          test="posi tion()=10"
  13745         >
  13746           
  13747          <!-- Sourc e -->
  13748                                                              
  13749          <div 
  13750           style="ove rflow:hidd en; white- space:nowr ap; width: 100px;"
  13751          >
  13752                                                               
  13753           <xsl:call- template 
  13754            name="flyo verSpan"
  13755           >
  13756                                                                         
  13757            <xsl:with- param 
  13758             name="data
  13759             select="$d ataValue" 
  13760            />
  13761                                                                         
  13762            <xsl:with- param 
  13763             name="free Text" 
  13764             select="''
  13765            />
  13766                                                                         
  13767            <xsl:with- param 
  13768             name="deSq uigglefy" 
  13769             select="''
  13770            />
  13771                                                                
  13772           </xsl:call -template>
  13773                                                               
  13774          </div>
  13775                                                     
  13776         </xsl:when >
  13777                                                    
  13778         <xsl:when 
  13779          test="posi tion()=11"
  13780         >
  13781           
  13782          <!-- Facil ity Time - ->
  13783                                                              
  13784          <div 
  13785           style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  13786          >
  13787                                                               
  13788           <xsl:call- template 
  13789            name="flyo verSpan"
  13790           >
  13791                                                                         
  13792            <xsl:with- param 
  13793             name="data
  13794             select="$f acilityTim eString" 
  13795            />
  13796                                                                         
  13797            <xsl:with- param 
  13798             name="free Text" 
  13799             select="''
  13800            />
  13801                                                                         
  13802            <xsl:with- param 
  13803             name="deSq uigglefy" 
  13804             select="''
  13805            />
  13806                                                                
  13807           </xsl:call -template>
  13808                                                               
  13809          </div>
  13810                                                     
  13811         </xsl:when >
  13812                                                    
  13813         <xsl:when 
  13814          test="posi tion()=12"
  13815         >
  13816           
  13817          <!-- Admis sion Time  -->
  13818                                                              
  13819          <div 
  13820           style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  13821          >
  13822                                                               
  13823           <xsl:call- template 
  13824            name="flyo verSpan"
  13825           >
  13826                                                                         
  13827            <xsl:with- param 
  13828             name="data
  13829             select="$a dmissionTi meString" 
  13830            />
  13831                                                                         
  13832            <xsl:with- param 
  13833             name="free Text" 
  13834             select="''
  13835            />
  13836                                                                         
  13837            <xsl:with- param 
  13838             name="deSq uigglefy" 
  13839             select="''
  13840            />
  13841                                                                
  13842           </xsl:call -template>
  13843                                                               
  13844          </div>
  13845                                                     
  13846         </xsl:when >
  13847                                            
  13848        </xsl:choo se>
  13849                                  
  13850       </td>
  13851                        
  13852      </xsl:for- each>
  13853              
  13854     </xsl:temp late>
  13855    
  13856             
  13857     <xsl:templ ate 
  13858      name="disp layFutureA ctTable"
  13859     >
  13860                       
  13861      <xsl:param  
  13862       name="tabl e"
  13863      />
  13864                                         
  13865                       
  13866      <!--  Get  the table  -->
  13867                       
  13868      <table 
  13869       style="fon t-size:14p
  13870       border="1"
  13871      >
  13872                                 
  13873       <caption 
  13874        style="tex t-align:le ft"
  13875       >
  13876        <b>
  13877         <xsl:value -of 
  13878          select="$t able/../n1 :title"
  13879         />
  13880        </b>
  13881       </caption>
  13882                                 
  13883       <thead>
  13884                                           
  13885        <tr>
  13886                                                    
  13887         <xsl:for-e ach 
  13888          select="$t able/n1:th ead/n1:th"
  13889         >
  13890                                                              
  13891          <th 
  13892           class="fir st"
  13893          >
  13894           <xsl:value -of 
  13895            select="."
  13896           />
  13897          </th>
  13898                                                     
  13899         </xsl:for- each>
  13900                                            
  13901        </tr>
  13902                                  
  13903       </thead>
  13904                                 
  13905       <tbody>
  13906                                           
  13907        <xsl:choos e>
  13908                                                    
  13909         <xsl:when 
  13910          test="./n1 :td[3]/n1: content"
  13911         >
  13912                                                              
  13913          <xsl:for-e ach 
  13914           select="$t able/n1:tb ody/n1:tr"
  13915          >
  13916                                                                        
  13917           <xsl:sort 
  13918            select="su bstring(no rmalize-sp ace(./n1:t d[3]/n1:co ntent),1,8 )" 
  13919            order="des cending"
  13920           />
  13921                                                                        
  13922           <tr 
  13923            class="sec ond"
  13924           >
  13925                                                                                  
  13926            <xsl:call- template 
  13927             name="disp layFutureA ctDataRow"
  13928            >
  13929                                                                                            
  13930             <xsl:with- param 
  13931              name="tabl eRow" 
  13932              select="."
  13933             />
  13934                                                                                   
  13935            </xsl:call -template>
  13936                                                                         
  13937           </tr>
  13938                                                               
  13939          </xsl:for- each>
  13940                                                     
  13941         </xsl:when >
  13942                                                    
  13943         <xsl:other wise>
  13944                                                              
  13945          <xsl:for-e ach 
  13946           select="$t able/n1:tb ody/n1:tr"
  13947          >
  13948                                                                        
  13949           <xsl:sort 
  13950            select="su bstring(no rmalize-sp ace(./n1:t d[3]),1,8)
  13951            order="des cending"
  13952           />
  13953                                                                        
  13954           <tr 
  13955            class="sec ond"
  13956           >
  13957                                                                                  
  13958            <xsl:call- template 
  13959             name="disp layFutureA ctDataRow"
  13960            >
  13961                                                                                            
  13962             <xsl:with- param 
  13963              name="tabl eRow" 
  13964              select="."
  13965             />
  13966                                                                                   
  13967            </xsl:call -template>
  13968                                                                         
  13969           </tr>
  13970                                                               
  13971          </xsl:for- each>
  13972                                                     
  13973         </xsl:othe rwise>
  13974                                            
  13975        </xsl:choo se>   
  13976                                  
  13977       </tbody>
  13978                        
  13979      </table>
  13980                       
  13981      <br/>
  13982                       
  13983      <br/>
  13984              
  13985     </xsl:temp late>
  13986    
  13987             
  13988     <xsl:templ ate 
  13989      name="disp layFutureA ctDataRow"
  13990     >
  13991                       
  13992      <xsl:param  
  13993       name="tabl eRow"
  13994      />
  13995     
  13996                       
  13997      <xsl:varia ble 
  13998       name="time Value"
  13999      >
  14000                                 
  14001       <xsl:choos e>
  14002                                           
  14003        <xsl:when 
  14004         test="./n1 :td[3]/n1: content"
  14005        >
  14006                                                    
  14007         <xsl:value -of 
  14008          select="./ n1:td[3]/n 1:content"
  14009         /> 
  14010                                            
  14011        </xsl:when >
  14012                                           
  14013        <xsl:other wise>
  14014                                                    
  14015         <xsl:value -of 
  14016          select="./ n1:td[3]"
  14017         />
  14018                                            
  14019        </xsl:othe rwise>
  14020                                  
  14021       </xsl:choo se>
  14022                        
  14023      </xsl:vari able>
  14024                       
  14025                       
  14026      <xsl:varia ble 
  14027       name="date String"
  14028      >
  14029                                 
  14030       <xsl:call- template 
  14031        name="conv ertDate"
  14032       >
  14033                                           
  14034        <xsl:with- param 
  14035         name="date Value" 
  14036         select="no rmalize-sp ace($timeV alue)"
  14037        />
  14038                                  
  14039       </xsl:call -template>  
  14040                        
  14041      </xsl:vari able>
  14042                       
  14043                       
  14044      <xsl:for-e ach 
  14045       select="$t ableRow/n1 :td"
  14046      >
  14047                        
  14048                                 
  14049       <xsl:varia ble 
  14050        name="data Value"
  14051       >
  14052                                           
  14053        <xsl:choos e>
  14054                                                    
  14055         <xsl:when 
  14056          test="./n1 :content"
  14057         >
  14058                                                              
  14059          <xsl:value -of 
  14060           select="./ n1:content "
  14061          /> 
  14062                                                     
  14063         </xsl:when >
  14064                                                    
  14065         <xsl:other wise>
  14066                                                              
  14067          <xsl:value -of 
  14068           select="."
  14069          />
  14070                                                     
  14071         </xsl:othe rwise>
  14072                                            
  14073        </xsl:choo se>
  14074                                  
  14075       </xsl:vari able>
  14076                                 
  14077                                 
  14078       <td>
  14079                                           
  14080        <xsl:choos e>
  14081                                                    
  14082         <xsl:when 
  14083          test="posi tion()=1"
  14084         >
  14085           
  14086          <!--Activi ty -->
  14087                                                              
  14088          <div 
  14089           style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  14090          >
  14091                                                               
  14092           <xsl:call- template 
  14093            name="flyo verSpan"
  14094           >
  14095                                                                         
  14096            <xsl:with- param 
  14097             name="data
  14098             select="$d ataValue" 
  14099            />
  14100                                                                         
  14101            <xsl:with- param 
  14102             name="free Text" 
  14103             select="''
  14104            />
  14105                                                                         
  14106            <xsl:with- param 
  14107             name="deSq uigglefy" 
  14108             select="''
  14109            />
  14110                                                                
  14111           </xsl:call -template>
  14112                                                               
  14113          </div>
  14114                                                     
  14115         </xsl:when >
  14116                                                    
  14117         <xsl:when 
  14118          test="posi tion()=2"
  14119         >
  14120           
  14121          <!-- Activ ity Status  -->
  14122                                                              
  14123          <div 
  14124           style="ove rflow:hidd en; white- space:nowr ap; width: 180px;;"
  14125          >
  14126                                                               
  14127           <xsl:call- template 
  14128            name="flyo verSpan"
  14129           >
  14130                                                                         
  14131            <xsl:with- param 
  14132             name="data
  14133             select="$d ataValue" 
  14134            />
  14135                                                                         
  14136            <xsl:with- param 
  14137             name="free Text" 
  14138             select="''
  14139            />
  14140                                                                         
  14141            <xsl:with- param 
  14142             name="deSq uigglefy" 
  14143             select="''
  14144            />
  14145                                                                
  14146           </xsl:call -template>
  14147                                                               
  14148          </div>
  14149                                                     
  14150         </xsl:when >
  14151                                                    
  14152         <xsl:when 
  14153          test="posi tion()=3"
  14154         >
  14155           
  14156          <!-- Date/ Time -->
  14157                                                              
  14158          <div 
  14159           style="ove rflow:hidd en; white- space:nowr ap; width: 240px;;"
  14160          >
  14161                                                               
  14162           <xsl:call- template 
  14163            name="flyo verSpan"
  14164           >
  14165                                                                         
  14166            <xsl:with- param 
  14167             name="data
  14168             select="$d ateString"  
  14169            />
  14170                                                                         
  14171            <xsl:with- param 
  14172             name="free Text" 
  14173             select="'y es'" 
  14174            />
  14175                                                                         
  14176            <xsl:with- param 
  14177             name="deSq uigglefy" 
  14178             select="'y es'" 
  14179            />
  14180                                                                
  14181           </xsl:call -template>
  14182                                                               
  14183          </div>
  14184                                                     
  14185         </xsl:when >
  14186                                            
  14187        </xsl:choo se>
  14188                                  
  14189       </td>
  14190                        
  14191      </xsl:for- each>
  14192              
  14193     </xsl:temp late>
  14194    
  14195             
  14196     <xsl:templ ate 
  14197      name="disp layFutureP rocedureTa ble"
  14198     >
  14199                       
  14200      <xsl:param  
  14201       name="tabl e"
  14202      />
  14203                       
  14204                       
  14205      <!--  Get  the table  -->
  14206                       
  14207      <table 
  14208       style="fon t-size:14p
  14209       border="1"
  14210      >
  14211                                 
  14212       <caption 
  14213        style="tex t-align:le ft"
  14214       >
  14215        <b>
  14216         <xsl:value -of 
  14217          select="$t able/../n1 :title"
  14218         />
  14219        </b>
  14220       </caption>
  14221                                 
  14222       <thead>
  14223                                           
  14224        <tr>
  14225                                                    
  14226         <xsl:for-e ach 
  14227          select="$t able/n1:th ead/n1:th"
  14228         >
  14229                                                              
  14230          <th 
  14231           class="fir st"
  14232          >
  14233           <xsl:value -of 
  14234            select="."
  14235           />
  14236          </th>
  14237                                                     
  14238         </xsl:for- each>
  14239                                            
  14240        </tr>
  14241                                  
  14242       </thead>
  14243                                 
  14244       <tbody>
  14245                                           
  14246        <xsl:choos e>
  14247                                                    
  14248         <xsl:when 
  14249          test="./n1 :td[1]/n1: content"
  14250         >
  14251                                                              
  14252          <xsl:for-e ach 
  14253           select="$t able/n1:tb ody/n1:tr"
  14254          >
  14255                                                                        
  14256           <xsl:sort 
  14257            select="su bstring(no rmalize-sp ace(./n1:t d[1]/n1:co ntent),1,8 )" 
  14258            order="des cending"
  14259           />
  14260                                                                        
  14261           <xsl:messa ge>
  14262            SortDate: 
  14263            <xsl:value -of 
  14264             select="su bstring-be fore(norma lize-space (./n1:td[1 ]/n1:conte nt), ' ')"
  14265            />
  14266           </xsl:mess age>
  14267                                                                        
  14268           <tr 
  14269            class="sec ond"
  14270           >
  14271                                                                                  
  14272            <xsl:call- template 
  14273             name="disp layFutureP rocedureDa taRow"
  14274            >
  14275                                                                                            
  14276             <xsl:with- param 
  14277              name="tabl eRow" 
  14278              select="."
  14279             />
  14280                                                                                   
  14281            </xsl:call -template>
  14282                                                                         
  14283           </tr>
  14284                                                               
  14285          </xsl:for- each>
  14286                                                     
  14287         </xsl:when >
  14288                                                    
  14289         <xsl:other wise>
  14290                                                              
  14291          <xsl:for-e ach 
  14292           select="$t able/n1:tb ody/n1:tr"
  14293          >
  14294                                                                        
  14295           <xsl:sort 
  14296            select="su bstring(no rmalize-sp ace(./n1:t d[1]),1,8)
  14297            order="des cending"
  14298           />
  14299                                                                        
  14300           <xsl:messa ge>
  14301            SortDate: 
  14302            <xsl:value -of 
  14303             select="su bstring-be fore(norma lize-space (./n1:td[1 ]), ' ')"
  14304            />
  14305           </xsl:mess age>
  14306                                                                        
  14307           <tr 
  14308            class="sec ond"
  14309           >
  14310                                                                                  
  14311            <xsl:call- template 
  14312             name="disp layFutureP rocedureDa taRow"
  14313            >
  14314                                                                                            
  14315             <xsl:with- param 
  14316              name="tabl eRow" 
  14317              select="."
  14318             />
  14319                                                                                   
  14320            </xsl:call -template>
  14321                                                                         
  14322           </tr>
  14323                                                               
  14324          </xsl:for- each>
  14325                                                     
  14326         </xsl:othe rwise>
  14327                                            
  14328        </xsl:choo se>   
  14329                                  
  14330       </tbody>
  14331                        
  14332      </table>
  14333                       
  14334      <br/>
  14335                       
  14336      <br/>
  14337              
  14338     </xsl:temp late>
  14339    
  14340             
  14341     <xsl:templ ate 
  14342      name="disp layFutureP rocedureDa taRow"
  14343     >
  14344                       
  14345      <xsl:param  
  14346       name="tabl eRow"
  14347      />
  14348     
  14349                       
  14350      <xsl:varia ble 
  14351       name="time Value"
  14352      >
  14353                                 
  14354       <xsl:choos e>
  14355                                           
  14356        <xsl:when 
  14357         test="./n1 :td[1]/n1: content"
  14358        >
  14359                                                    
  14360         <xsl:value -of 
  14361          select="./ n1:td[1]/n 1:content"
  14362         /> 
  14363                                            
  14364        </xsl:when >
  14365                                           
  14366        <xsl:other wise>
  14367                                                    
  14368         <xsl:value -of 
  14369          select="./ n1:td[1]"
  14370         />
  14371                                            
  14372        </xsl:othe rwise>
  14373                                  
  14374       </xsl:choo se>
  14375                        
  14376      </xsl:vari able>
  14377                       
  14378                       
  14379      <xsl:varia ble 
  14380       name="date String"
  14381      >
  14382                                 
  14383       <xsl:call- template 
  14384        name="conv ertDate"
  14385       >
  14386                                           
  14387        <xsl:with- param 
  14388         name="date Value" 
  14389         select="no rmalize-sp ace($timeV alue)"
  14390        />
  14391                                  
  14392       </xsl:call -template>  
  14393                        
  14394      </xsl:vari able>
  14395                       
  14396                       
  14397                       
  14398      <xsl:varia ble 
  14399       name="auth oredTimeVa lue"
  14400      >
  14401                                 
  14402       <xsl:choos e>
  14403                                           
  14404        <xsl:when 
  14405         test="./n1 :td[6]/n1: content"
  14406        >
  14407                                                    
  14408         <xsl:value -of 
  14409          select="./ n1:td[6]/n 1:content"
  14410         /> 
  14411                                            
  14412        </xsl:when >
  14413                                           
  14414        <xsl:other wise>
  14415                                                    
  14416         <xsl:value -of 
  14417          select="./ n1:td[6]"
  14418         />
  14419                                            
  14420        </xsl:othe rwise>
  14421                                  
  14422       </xsl:choo se>
  14423                        
  14424      </xsl:vari able>
  14425                       
  14426                       
  14427      <xsl:varia ble 
  14428       name="auth oredTimeSt ring"
  14429      >
  14430                                 
  14431       <xsl:call- template 
  14432        name="form atDateShor t"
  14433       >
  14434                                           
  14435        <xsl:with- param 
  14436         name="date String" 
  14437         select="no rmalize-sp ace($autho redTimeVal ue)"
  14438        />
  14439                                  
  14440       </xsl:call -template>  
  14441                        
  14442      </xsl:vari able>
  14443                       
  14444                       
  14445      <xsl:varia ble 
  14446       name="faci lityTimeVa lue"
  14447      >
  14448                                 
  14449       <xsl:choos e>
  14450                                           
  14451        <xsl:when 
  14452         test="./n1 :td[9]/n1: content"
  14453        >
  14454                                                    
  14455         <xsl:value -of 
  14456          select="./ n1:td[9]/n 1:content"
  14457         /> 
  14458                                            
  14459        </xsl:when >
  14460                                           
  14461        <xsl:other wise>
  14462                                                    
  14463         <xsl:value -of 
  14464          select="./ n1:td[9]"
  14465         />
  14466                                            
  14467        </xsl:othe rwise>
  14468                                  
  14469       </xsl:choo se>
  14470                        
  14471      </xsl:vari able>
  14472                       
  14473                       
  14474      <xsl:varia ble 
  14475       name="faci lityTimeSt ring"
  14476      >
  14477                                 
  14478       <xsl:call- template 
  14479        name="form atDateShor t"
  14480       >
  14481                                           
  14482        <xsl:with- param 
  14483         name="date String" 
  14484         select="no rmalize-sp ace($facil ityTimeVal ue)"
  14485        />
  14486                                  
  14487       </xsl:call -template>  
  14488                        
  14489      </xsl:vari able>
  14490                       
  14491                       
  14492      <xsl:varia ble 
  14493       name="admi ssionTimeV alue"
  14494      >
  14495                                 
  14496       <xsl:choos e>
  14497                                           
  14498        <xsl:when 
  14499         test="./n1 :td[10]/n1 :content"
  14500        >
  14501                                                    
  14502         <xsl:value -of 
  14503          select="./ n1:td[10]/ n1:content "
  14504         /> 
  14505                                            
  14506        </xsl:when >
  14507                                           
  14508        <xsl:other wise>
  14509                                                    
  14510         <xsl:value -of 
  14511          select="./ n1:td[10]"
  14512         />
  14513                                            
  14514        </xsl:othe rwise>
  14515                                  
  14516       </xsl:choo se>
  14517                        
  14518      </xsl:vari able>
  14519                       
  14520                       
  14521      <xsl:varia ble 
  14522       name="admi ssionTimeS tring"
  14523      >
  14524                                 
  14525       <xsl:call- template 
  14526        name="form atDateShor t"
  14527       >
  14528                                           
  14529        <xsl:with- param 
  14530         name="date String" 
  14531         select="no rmalize-sp ace($admis sionTimeVa lue)"
  14532        />
  14533                                  
  14534       </xsl:call -template>  
  14535                        
  14536      </xsl:vari able>
  14537                       
  14538                       
  14539      <xsl:for-e ach 
  14540       select="$t ableRow/n1 :td"
  14541      >
  14542                        
  14543                                 
  14544       <xsl:varia ble 
  14545        name="data Value"
  14546       >
  14547                                           
  14548        <xsl:choos e>
  14549                                                    
  14550         <xsl:when 
  14551          test="./n1 :content"
  14552         >
  14553                                                              
  14554          <xsl:value -of 
  14555           select="./ n1:content "
  14556          /> 
  14557                                                     
  14558         </xsl:when >
  14559                                                    
  14560         <xsl:other wise>
  14561                                                              
  14562          <xsl:value -of 
  14563           select="."
  14564          />
  14565                                                     
  14566         </xsl:othe rwise>
  14567                                            
  14568        </xsl:choo se>
  14569                                  
  14570       </xsl:vari able>
  14571                                 
  14572                                 
  14573       <td>
  14574                                           
  14575        <xsl:choos e>
  14576                                                    
  14577         <xsl:when 
  14578          test="posi tion()=1"
  14579         >
  14580           
  14581          <!-- Date/ Time -->
  14582                                                              
  14583          <div 
  14584           style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  14585          >
  14586                                                               
  14587           <xsl:call- template 
  14588            name="flyo verSpan"
  14589           >
  14590                                                                         
  14591            <xsl:with- param 
  14592             name="data
  14593             select="$d ateString"  
  14594            />
  14595                                                                         
  14596            <xsl:with- param 
  14597             name="free Text" 
  14598             select="''
  14599            />
  14600                                                                         
  14601            <xsl:with- param 
  14602             name="deSq uigglefy" 
  14603             select="''
  14604            />
  14605                                                                
  14606           </xsl:call -template>
  14607                                                               
  14608          </div>
  14609                                                     
  14610         </xsl:when >
  14611                                                    
  14612         <xsl:when 
  14613          test="posi tion()=2"
  14614         >
  14615           
  14616          <!-- Proce dure Type  -->
  14617                                                              
  14618          <div 
  14619           style="ove rflow:hidd en; white- space:nowr ap; width: 180px;;"
  14620          >
  14621                                                               
  14622           <xsl:call- template 
  14623            name="flyo verSpan"
  14624           >
  14625                                                                         
  14626            <xsl:with- param 
  14627             name="data
  14628             select="$d ataValue" 
  14629            />
  14630                                                                         
  14631            <xsl:with- param 
  14632             name="free Text" 
  14633             select="''
  14634            />
  14635                                                                         
  14636            <xsl:with- param 
  14637             name="deSq uigglefy" 
  14638             select="''
  14639            />
  14640                                                                
  14641           </xsl:call -template>
  14642                                                               
  14643          </div>
  14644                                                     
  14645         </xsl:when >
  14646                                                    
  14647         <xsl:when 
  14648          test="posi tion()=3"
  14649         >
  14650           
  14651          <!-- Proce dure Descr iption -->
  14652                                                              
  14653          <div 
  14654           style="ove rflow:hidd en; white- space:nowr ap; width: 280px;;"
  14655          >
  14656                                                               
  14657           <xsl:call- template 
  14658            name="flyo verSpan"
  14659           >
  14660                                                                         
  14661            <xsl:with- param 
  14662             name="data
  14663             select="$d ataValue" 
  14664            />
  14665                                                                         
  14666            <xsl:with- param 
  14667             name="free Text" 
  14668             select="'y es'" 
  14669            />
  14670                                                                         
  14671            <xsl:with- param 
  14672             name="deSq uigglefy" 
  14673             select="'y es'" 
  14674            />
  14675                                                                
  14676           </xsl:call -template>
  14677                                                               
  14678          </div>
  14679                                                     
  14680         </xsl:when >
  14681                                                    
  14682         <xsl:when 
  14683          test="posi tion()=4"
  14684         >
  14685           
  14686          <!-- Proce dure Type  Details -- >
  14687                                                              
  14688          <div 
  14689           style="ove rflow:hidd en; white- space:nowr ap; width: 280px;"
  14690          >
  14691                                                               
  14692           <xsl:call- template 
  14693            name="flyo verSpan"
  14694           >
  14695                                                                         
  14696            <xsl:with- param 
  14697             name="data
  14698             select="$d ataValue" 
  14699            />
  14700                                                                         
  14701            <xsl:with- param 
  14702             name="free Text" 
  14703             select="'y es'" 
  14704            />
  14705                                                                         
  14706            <xsl:with- param 
  14707             name="deSq uigglefy" 
  14708             select="'y es'" 
  14709            />
  14710                                                                
  14711           </xsl:call -template>
  14712                                                               
  14713          </div>
  14714                                                     
  14715         </xsl:when >
  14716                                                    
  14717         <xsl:when 
  14718          test="posi tion()=5"
  14719         >
  14720           
  14721          <!-- Provi der -->
  14722                                                              
  14723          <div 
  14724           style="ove rflow:hidd en; white- space:nowr ap; width: 280px;;"
  14725          >
  14726                                                               
  14727           <xsl:call- template 
  14728            name="flyo verSpan"
  14729           >
  14730                                                                         
  14731            <xsl:with- param 
  14732             name="data
  14733             select="$d ataValue" 
  14734            />
  14735                                                                         
  14736            <xsl:with- param 
  14737             name="free Text" 
  14738             select="'y es'" 
  14739            />
  14740                                                                         
  14741            <xsl:with- param 
  14742             name="deSq uigglefy" 
  14743             select="'y es'" 
  14744            />
  14745                                                                
  14746           </xsl:call -template>
  14747                                                               
  14748          </div>
  14749                                                     
  14750         </xsl:when >
  14751                                                    
  14752         <xsl:when 
  14753          test="posi tion()=6"
  14754         >
  14755           
  14756          <!-- Body  Site -->
  14757                                                              
  14758          <div 
  14759           style="ove rflow:hidd en; white- space:nowr ap; width: 150px;"
  14760          >
  14761                                                               
  14762           <xsl:call- template 
  14763            name="flyo verSpan"
  14764           >
  14765                                                                         
  14766            <xsl:with- param 
  14767             name="data
  14768             select="$d ataValue" 
  14769            />
  14770                                                                         
  14771            <xsl:with- param 
  14772             name="free Text" 
  14773             select="''
  14774            />
  14775                                                                         
  14776            <xsl:with- param 
  14777             name="deSq uigglefy" 
  14778             select="''
  14779            />
  14780                                                                
  14781           </xsl:call -template>
  14782                                                               
  14783          </div>
  14784                                                     
  14785         </xsl:when >
  14786                                                    
  14787         <xsl:when 
  14788          test="posi tion()=7"
  14789         >
  14790           
  14791          <!-- Sourc e -->
  14792                                                              
  14793          <div 
  14794           style="ove rflow:hidd en; white- space:nowr ap; width: 280px;"
  14795          >
  14796                                                               
  14797           <xsl:call- template 
  14798            name="flyo verSpan"
  14799           >
  14800                                                                         
  14801            <xsl:with- param 
  14802             name="data
  14803             select="$d ataValue" 
  14804            />
  14805                                                                         
  14806            <xsl:with- param 
  14807             name="free Text" 
  14808             select="''
  14809            />
  14810                                                                         
  14811            <xsl:with- param 
  14812             name="deSq uigglefy" 
  14813             select="''
  14814            />
  14815                                                                
  14816           </xsl:call -template>
  14817                                                               
  14818          </div>
  14819                                                     
  14820         </xsl:when >
  14821                                            
  14822        </xsl:choo se>
  14823                                  
  14824       </td>
  14825                        
  14826      </xsl:for- each>
  14827              
  14828     </xsl:temp late>
  14829    
  14830             
  14831     <xsl:templ ate 
  14832      name="disp layFutureS ubstanceTa ble"
  14833     >
  14834                       
  14835      <xsl:param  
  14836       name="tabl e"
  14837      />
  14838                       
  14839                       
  14840      <!--  Get  the table  -->
  14841                       
  14842      <table 
  14843       style="fon t-size:14p
  14844       border="1"
  14845      >
  14846                                 
  14847       <caption 
  14848        style="tex t-align:le ft"
  14849       >
  14850        <b>
  14851         <xsl:value -of 
  14852          select="$t able/../n1 :title"
  14853         />
  14854        </b>
  14855       </caption>
  14856                                 
  14857       <thead>
  14858                                           
  14859        <tr>
  14860                                                    
  14861         <xsl:for-e ach 
  14862          select="$t able/n1:th ead/n1:th"
  14863         >
  14864                                                              
  14865          <th 
  14866           class="fir st"
  14867          >
  14868           <xsl:value -of 
  14869            select="."
  14870           />
  14871          </th>
  14872                                                     
  14873         </xsl:for- each>
  14874                                            
  14875        </tr>
  14876                                  
  14877       </thead>
  14878                                 
  14879       <tbody>
  14880                                           
  14881        <xsl:choos e>
  14882                                                    
  14883         <xsl:when 
  14884          test="./n1 :td[4]/n1: content"
  14885         >
  14886                                                              
  14887          <xsl:for-e ach 
  14888           select="$t able/n1:tb ody/n1:tr"
  14889          >
  14890                                                                        
  14891           <xsl:sort 
  14892            select="su bstring(no rmalize-sp ace(./n1:t d[4]/n1:co ntent),1,8 )" 
  14893            order="des cending"
  14894           />
  14895                                                                        
  14896           <tr 
  14897            class="sec ond"
  14898           >
  14899                                                                                  
  14900            <xsl:call- template 
  14901             name="disp layFutureS ubstanceDa taRow"
  14902            >
  14903                                                                                            
  14904             <xsl:with- param 
  14905              name="tabl eRow" 
  14906              select="."
  14907             />
  14908                                                                                   
  14909            </xsl:call -template>
  14910                                                                         
  14911           </tr>
  14912                                                               
  14913          </xsl:for- each>
  14914                                                     
  14915         </xsl:when >
  14916                                                    
  14917         <xsl:other wise>
  14918                                                              
  14919          <xsl:for-e ach 
  14920           select="$t able/n1:tb ody/n1:tr"
  14921          >
  14922                                                                        
  14923           <xsl:sort 
  14924            select="su bstring(no rmalize-sp ace(./n1:t d[4]),1,8)
  14925            order="des cending"
  14926           />
  14927                                                                        
  14928           <tr 
  14929            class="sec ond"
  14930           >
  14931                                                                                  
  14932            <xsl:call- template 
  14933             name="disp layFutureS ubstanceDa taRow"
  14934            >
  14935                                                                                            
  14936             <xsl:with- param 
  14937              name="tabl eRow" 
  14938              select="."
  14939             />
  14940                                                                                   
  14941            </xsl:call -template>
  14942                                                                         
  14943           </tr>
  14944                                                               
  14945          </xsl:for- each>
  14946                                                     
  14947         </xsl:othe rwise>
  14948                                            
  14949        </xsl:choo se>   
  14950                                  
  14951       </tbody>
  14952                        
  14953      </table>
  14954                       
  14955      <br/>
  14956                       
  14957      <br/>
  14958              
  14959     </xsl:temp late>
  14960    
  14961             
  14962     <xsl:templ ate 
  14963      name="disp layFutureS ubstanceDa taRow"
  14964     >
  14965                       
  14966      <xsl:param  
  14967       name="tabl eRow"
  14968      />
  14969     
  14970                       
  14971      <xsl:varia ble 
  14972       name="time Value"
  14973      >
  14974                                 
  14975       <xsl:choos e>
  14976                                           
  14977        <xsl:when 
  14978         test="./n1 :td[4]/n1: content"
  14979        >
  14980                                                    
  14981         <xsl:value -of 
  14982          select="./ n1:td[4]/n 1:content"
  14983         /> 
  14984                                            
  14985        </xsl:when >
  14986                                           
  14987        <xsl:other wise>
  14988                                                    
  14989         <xsl:value -of 
  14990          select="./ n1:td[4]"
  14991         />
  14992                                            
  14993        </xsl:othe rwise>
  14994                                  
  14995       </xsl:choo se>
  14996                        
  14997      </xsl:vari able>
  14998                       
  14999                       
  15000      <xsl:varia ble 
  15001       name="date String"
  15002      >
  15003                                 
  15004       <xsl:call- template 
  15005        name="conv ertDate"
  15006       >
  15007                                           
  15008        <xsl:with- param 
  15009         name="date Value" 
  15010         select="no rmalize-sp ace($timeV alue)"
  15011        />
  15012                                  
  15013       </xsl:call -template>  
  15014                        
  15015      </xsl:vari able>
  15016                       
  15017                       
  15018      <xsl:varia ble 
  15019       name="expi rationTime Value"
  15020      >
  15021                                 
  15022       <xsl:choos e>
  15023                                           
  15024        <xsl:when 
  15025         test="./n1 :td[5]/n1: content"
  15026        >
  15027                                                    
  15028         <xsl:value -of 
  15029          select="./ n1:td[5]/n 1:content"
  15030         /> 
  15031                                            
  15032        </xsl:when >
  15033                                           
  15034        <xsl:other wise>
  15035                                                    
  15036         <xsl:value -of 
  15037          select="./ n1:td[5]"
  15038         />
  15039                                            
  15040        </xsl:othe rwise>
  15041                                  
  15042       </xsl:choo se>
  15043                        
  15044      </xsl:vari able>
  15045                       
  15046                       
  15047      <xsl:varia ble 
  15048       name="expi rationDate String"
  15049      >
  15050                                 
  15051       <xsl:call- template 
  15052        name="conv ertDate"
  15053       >
  15054                                           
  15055        <xsl:with- param 
  15056         name="date Value" 
  15057         select="no rmalize-sp ace($expir ationTimeV alue)"
  15058        />
  15059                                  
  15060       </xsl:call -template>  
  15061                        
  15062      </xsl:vari able>
  15063     
  15064                       
  15065      <xsl:varia ble 
  15066       name="disp enseTimeVa lue"
  15067      >
  15068                                 
  15069       <xsl:choos e>
  15070                                           
  15071        <xsl:when 
  15072         test="./n1 :td[10]/n1 :content"
  15073        >
  15074                                                    
  15075         <xsl:value -of 
  15076          select="./ n1:td[10]/ n1:content "
  15077         /> 
  15078                                            
  15079        </xsl:when >
  15080                                           
  15081        <xsl:other wise>
  15082                                                    
  15083         <xsl:value -of 
  15084          select="./ n1:td[10]"
  15085         />
  15086                                            
  15087        </xsl:othe rwise>
  15088                                  
  15089       </xsl:choo se>
  15090                        
  15091      </xsl:vari able>
  15092                       
  15093                       
  15094      <xsl:varia ble 
  15095       name="disp enseDateSt ring"
  15096      >
  15097                                 
  15098       <xsl:call- template 
  15099        name="conv ertDate"
  15100       >
  15101                                           
  15102        <xsl:with- param 
  15103         name="date Value" 
  15104         select="no rmalize-sp ace($dispe nseTimeVal ue)"
  15105        />
  15106                                  
  15107       </xsl:call -template>  
  15108                        
  15109      </xsl:vari able>
  15110     
  15111                       
  15112      <!-- Admin istrative  Timing -->
  15113                       
  15114      <xsl:varia ble 
  15115       name="admi nTimingEnt ry"
  15116      >
  15117                                 
  15118       <xsl:choos e>
  15119                                           
  15120        <xsl:when 
  15121         test="./n1 :td[15]/n1 :content"
  15122        >
  15123                                                    
  15124         <xsl:value -of 
  15125          select="./ n1:td[15]/ n1:content "
  15126         /> 
  15127                                            
  15128        </xsl:when >
  15129                                           
  15130        <xsl:other wise>
  15131                                                    
  15132         <xsl:value -of 
  15133          select="./ n1:td[15]"
  15134         />
  15135                                            
  15136        </xsl:othe rwise>
  15137                                  
  15138       </xsl:choo se>
  15139                        
  15140      </xsl:vari able>
  15141                       
  15142                       
  15143      <xsl:varia ble 
  15144       name="admi nTimingStr ing"
  15145      >
  15146                                 
  15147       <xsl:call- template 
  15148        name="tran slateAdmin TimingEntr y"
  15149       >
  15150                                           
  15151        <xsl:with- param 
  15152         name="admi nTimingEnt ry" 
  15153         select="$a dminTiming Entry"
  15154        />
  15155                                  
  15156       </xsl:call -template>  
  15157                        
  15158      </xsl:vari able>
  15159                       
  15160                       
  15161      <xsl:for-e ach 
  15162       select="$t ableRow/n1 :td"
  15163      >
  15164                        
  15165                                 
  15166       <xsl:varia ble 
  15167        name="data Value"
  15168       >
  15169                                           
  15170        <xsl:choos e>
  15171                                                    
  15172         <xsl:when 
  15173          test="./n1 :content"
  15174         >
  15175                                                              
  15176          <xsl:value -of 
  15177           select="./ n1:content "
  15178          /> 
  15179                                                     
  15180         </xsl:when >
  15181                                                    
  15182         <xsl:other wise>
  15183                                                              
  15184          <xsl:value -of 
  15185           select="."
  15186          />
  15187                                                     
  15188         </xsl:othe rwise>
  15189                                            
  15190        </xsl:choo se>
  15191                                  
  15192       </xsl:vari able>
  15193                                                           
  15194                                 
  15195       <td>
  15196                                           
  15197        <xsl:choos e>
  15198                                                    
  15199         <xsl:when 
  15200          test="posi tion()=1"
  15201         >
  15202           
  15203          <!-- Medic ation -->
  15204                                                              
  15205          <div 
  15206           style="ove rflow:hidd en; white- space:nowr ap; width: 100px;"
  15207          >
  15208                                                               
  15209           <xsl:call- template 
  15210            name="flyo verSpan"
  15211           >
  15212                                                                         
  15213            <xsl:with- param 
  15214             name="data
  15215             select="$d ataValue" 
  15216            />
  15217                                                                         
  15218            <xsl:with- param 
  15219             name="free Text" 
  15220             select="''
  15221            />
  15222                                                                         
  15223            <xsl:with- param 
  15224             name="deSq uigglefy" 
  15225             select="''
  15226            />
  15227                                                                
  15228           </xsl:call -template>
  15229                                                               
  15230          </div>
  15231                                                     
  15232         </xsl:when >
  15233                                                    
  15234         <xsl:when 
  15235          test="posi tion()=2"
  15236         >
  15237           
  15238          <!-- Medic ation Bran d Name-->
  15239                                                              
  15240          <div 
  15241           style="ove rflow:hidd en; white- space:nowr ap; width: 180px;;"
  15242          >
  15243                                                               
  15244           <xsl:call- template 
  15245            name="flyo verSpan"
  15246           >
  15247                                                                         
  15248            <xsl:with- param 
  15249             name="data
  15250             select="$d ataValue" 
  15251            />
  15252                                                                         
  15253            <xsl:with- param 
  15254             name="free Text" 
  15255             select="''
  15256            />
  15257                                                                         
  15258            <xsl:with- param 
  15259             name="deSq uigglefy" 
  15260             select="''
  15261            />
  15262                                                                
  15263           </xsl:call -template>
  15264                                                               
  15265          </div>
  15266                                                     
  15267         </xsl:when >
  15268                                                    
  15269         <xsl:when 
  15270          test="posi tion()=3"
  15271         >
  15272           
  15273          <!-- Medic ation Stat us -->
  15274                                                              
  15275          <div 
  15276           style="ove rflow:hidd en; white- space:nowr ap; width: 240px;;"
  15277          >
  15278                                                               
  15279           <xsl:call- template 
  15280            name="flyo verSpan"
  15281           >
  15282                                                                         
  15283            <xsl:with- param 
  15284             name="data
  15285             select="$d ataValue" 
  15286            />
  15287                                                                         
  15288            <xsl:with- param 
  15289             name="free Text" 
  15290             select="'y es'" 
  15291            />
  15292                                                                         
  15293            <xsl:with- param 
  15294             name="deSq uigglefy" 
  15295             select="'y es'" 
  15296            />
  15297                                                                
  15298           </xsl:call -template>
  15299                                                               
  15300          </div>
  15301                                                     
  15302         </xsl:when >
  15303                                                    
  15304         <xsl:when 
  15305          test="posi tion()=4"
  15306         >
  15307           
  15308          <!-- Order  Date -->
  15309                                                              
  15310          <div 
  15311           style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  15312          >
  15313                                                               
  15314           <xsl:call- template 
  15315            name="flyo verSpan"
  15316           >
  15317                                                                         
  15318            <xsl:with- param 
  15319             name="data
  15320             select="$d ateString"  
  15321            />
  15322                                                                         
  15323            <xsl:with- param 
  15324             name="free Text" 
  15325             select="'y es'" 
  15326            />
  15327                                                                         
  15328            <xsl:with- param 
  15329             name="deSq uigglefy" 
  15330             select="'y es'" 
  15331            />
  15332                                                                
  15333           </xsl:call -template>
  15334                                                               
  15335          </div>
  15336                                                     
  15337         </xsl:when >
  15338                                                    
  15339         <xsl:when 
  15340          test="posi tion()=5"
  15341         >
  15342           
  15343          <!-- Order  Expiratio n -->
  15344                                                              
  15345          <div 
  15346           style="ove rflow:hidd en; white- space:nowr ap; width: 280px;;"
  15347          >
  15348                                                               
  15349           <xsl:call- template 
  15350            name="flyo verSpan"
  15351           >
  15352                                                                         
  15353            <xsl:with- param 
  15354             name="data
  15355             select="$e xpirationD ateString"  
  15356            />
  15357                                                                         
  15358            <xsl:with- param 
  15359             name="free Text" 
  15360             select="'y es'" 
  15361            />
  15362                                                                         
  15363            <xsl:with- param 
  15364             name="deSq uigglefy" 
  15365             select="'y es'" 
  15366            />
  15367                                                                
  15368           </xsl:call -template>
  15369                                                               
  15370          </div>
  15371                                                     
  15372         </xsl:when >
  15373                                                    
  15374         <xsl:when 
  15375          test="posi tion()=6"
  15376         >
  15377           
  15378          <!-- Provi der (Order ing) -->
  15379                                                              
  15380          <div 
  15381           style="ove rflow:hidd en; white- space:nowr ap; width: 100px;"
  15382          >
  15383                                                               
  15384           <xsl:call- template 
  15385            name="flyo verSpan"
  15386           >
  15387                                                                         
  15388            <xsl:with- param 
  15389             name="data
  15390             select="$d ataValue" 
  15391            />
  15392                                                                         
  15393            <xsl:with- param 
  15394             name="free Text" 
  15395             select="''
  15396            />
  15397                                                                         
  15398            <xsl:with- param 
  15399             name="deSq uigglefy" 
  15400             select="''
  15401            />
  15402                                                                
  15403           </xsl:call -template>
  15404                                                               
  15405          </div>
  15406                                                     
  15407         </xsl:when >
  15408                                                    
  15409         <xsl:when 
  15410          test="posi tion()=7"
  15411         >
  15412           
  15413          <!-- Presc ription Nu mber -->
  15414                                                              
  15415          <div 
  15416           style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  15417          >
  15418                                                               
  15419           <xsl:call- template 
  15420            name="flyo verSpan"
  15421           >
  15422                                                                         
  15423            <xsl:with- param 
  15424             name="data
  15425             select="$d ataValue" 
  15426            />
  15427                                                                         
  15428            <xsl:with- param 
  15429             name="free Text" 
  15430             select="''
  15431            />
  15432                                                                         
  15433            <xsl:with- param 
  15434             name="deSq uigglefy" 
  15435             select="''
  15436            />
  15437                                                                
  15438           </xsl:call -template>
  15439                                                               
  15440          </div>
  15441                                                     
  15442         </xsl:when >
  15443                                                    
  15444         <xsl:when 
  15445          test="posi tion()=8"
  15446         >
  15447           
  15448          <!-- Fill  Status -->
  15449                                                              
  15450          <div 
  15451           style="ove rflow:hidd en; white- space:nowr ap; width: 100px;"
  15452          >
  15453                                                               
  15454           <xsl:call- template 
  15455            name="flyo verSpan"
  15456           >
  15457                                                                         
  15458            <xsl:with- param 
  15459             name="data
  15460             select="$d ataValue" 
  15461            />
  15462                                                                         
  15463            <xsl:with- param 
  15464             name="free Text" 
  15465             select="''
  15466            />
  15467                                                                         
  15468            <xsl:with- param 
  15469             name="deSq uigglefy" 
  15470             select="''
  15471            />
  15472                                                                
  15473           </xsl:call -template>
  15474                                                               
  15475          </div>
  15476                                                     
  15477         </xsl:when >
  15478                                                    
  15479         <xsl:when 
  15480          test="posi tion()=9"
  15481         >
  15482           
  15483          <!-- Quant ity Dispen sed -->
  15484                                                              
  15485          <div 
  15486           style="ove rflow:hidd en; white- space:nowr ap; width: 100px;"
  15487          >
  15488                                                               
  15489           <xsl:call- template 
  15490            name="flyo verSpan"
  15491           >
  15492                                                                         
  15493            <xsl:with- param 
  15494             name="data
  15495             select="$d ataValue" 
  15496            />
  15497                                                                         
  15498            <xsl:with- param 
  15499             name="free Text" 
  15500             select="''
  15501            />
  15502                                                                         
  15503            <xsl:with- param 
  15504             name="deSq uigglefy" 
  15505             select="''
  15506            />
  15507                                                                
  15508           </xsl:call -template>
  15509                                                               
  15510          </div>
  15511                                                     
  15512         </xsl:when >
  15513                                                    
  15514         <xsl:when 
  15515          test="posi tion()=10"
  15516         >
  15517           
  15518          <!-- Dispe nse Date - ->
  15519                                                              
  15520          <div 
  15521           style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  15522          >
  15523                                                               
  15524           <xsl:call- template 
  15525            name="flyo verSpan"
  15526           >
  15527                                                                         
  15528            <xsl:with- param 
  15529             name="data
  15530             select="$d ataValue" 
  15531            />
  15532                                                                         
  15533            <xsl:with- param 
  15534             name="free Text" 
  15535             select="''
  15536            />
  15537                                                                         
  15538            <xsl:with- param 
  15539             name="deSq uigglefy" 
  15540             select="''
  15541            />
  15542                                                                
  15543           </xsl:call -template>
  15544                                                               
  15545          </div>
  15546                                                     
  15547         </xsl:when >
  15548                                                    
  15549         <xsl:when 
  15550          test="posi tion()=11"
  15551         >
  15552           
  15553          <!-- Sig - ->
  15554                                                              
  15555          <div 
  15556           style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  15557          >
  15558                                                               
  15559           <xsl:call- template 
  15560            name="flyo verSpan"
  15561           >
  15562                                                                         
  15563            <xsl:with- param 
  15564             name="data
  15565             select="$d ataValue" 
  15566            />
  15567                                                                         
  15568            <xsl:with- param 
  15569             name="free Text" 
  15570             select="''
  15571            />
  15572                                                                         
  15573            <xsl:with- param 
  15574             name="deSq uigglefy" 
  15575             select="''
  15576            />
  15577                                                                
  15578           </xsl:call -template>
  15579                                                               
  15580          </div>
  15581                                                     
  15582         </xsl:when >
  15583                                                    
  15584         <xsl:when 
  15585          test="posi tion()=12"
  15586         >
  15587           
  15588          <!-- Sourc e -->
  15589                                                              
  15590          <div 
  15591           style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  15592          >
  15593                                                               
  15594           <xsl:call- template 
  15595            name="flyo verSpan"
  15596           >
  15597                                                                         
  15598            <xsl:with- param 
  15599             name="data
  15600             select="$d ataValue" 
  15601            />
  15602                                                                         
  15603            <xsl:with- param 
  15604             name="free Text" 
  15605             select="''
  15606            />
  15607                                                                         
  15608            <xsl:with- param 
  15609             name="deSq uigglefy" 
  15610             select="''
  15611            />
  15612                                                                
  15613           </xsl:call -template>
  15614                                                               
  15615          </div>
  15616                                                     
  15617         </xsl:when >
  15618                                                    
  15619         <xsl:when 
  15620          test="posi tion()=13"
  15621         >
  15622           
  15623          <!-- React ion -->
  15624                                                              
  15625          <div 
  15626           style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  15627          >
  15628                                                               
  15629           <xsl:call- template 
  15630            name="flyo verSpan"
  15631           >
  15632                                                                         
  15633            <xsl:with- param 
  15634             name="data
  15635             select="$d ataValue" 
  15636            />
  15637                                                                         
  15638            <xsl:with- param 
  15639             name="free Text" 
  15640             select="''
  15641            />
  15642                                                                         
  15643            <xsl:with- param 
  15644             name="deSq uigglefy" 
  15645             select="''
  15646            />
  15647                                                                
  15648           </xsl:call -template>
  15649                                                               
  15650          </div>
  15651                                                     
  15652         </xsl:when >
  15653                                                    
  15654         <xsl:when 
  15655          test="posi tion()=14"
  15656         >
  15657           
  15658          <!-- Indic ate Medica tion Stopp ed -->
  15659                                                              
  15660          <div 
  15661           style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  15662          >
  15663                                                               
  15664           <xsl:call- template 
  15665            name="flyo verSpan"
  15666           >
  15667                                                                         
  15668            <xsl:with- param 
  15669             name="data
  15670             select="$d ataValue" 
  15671            />
  15672                                                                         
  15673            <xsl:with- param 
  15674             name="free Text" 
  15675             select="''
  15676            />
  15677                                                                         
  15678            <xsl:with- param 
  15679             name="deSq uigglefy" 
  15680             select="''
  15681            />
  15682                                                                
  15683           </xsl:call -template>
  15684                                                               
  15685          </div>
  15686                                                     
  15687         </xsl:when >
  15688                                                    
  15689         <xsl:when 
  15690          test="posi tion()=15"
  15691         >
  15692           
  15693          <!-- Admin istrative  Timing -->
  15694                                                              
  15695          <div 
  15696           style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  15697          >
  15698                                                               
  15699           <xsl:call- template 
  15700            name="flyo verSpan"
  15701           >
  15702                                                                         
  15703            <xsl:with- param 
  15704             name="data
  15705             select="$a dminTiming String" 
  15706            />
  15707                                                                         
  15708            <xsl:with- param 
  15709             name="free Text" 
  15710             select="''
  15711            />
  15712                                                                         
  15713            <xsl:with- param 
  15714             name="deSq uigglefy" 
  15715             select="''
  15716            />
  15717                                                                
  15718           </xsl:call -template>
  15719                                                               
  15720          </div>
  15721                                                     
  15722         </xsl:when >
  15723                                                    
  15724         <xsl:when 
  15725          test="posi tion()=16"
  15726         >
  15727           
  15728          <!-- Route  Code -->
  15729                                                              
  15730          <div 
  15731           style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  15732          >
  15733                                                               
  15734           <xsl:call- template 
  15735            name="flyo verSpan"
  15736           >
  15737                                                                         
  15738            <xsl:with- param 
  15739             name="data
  15740             select="$d ataValue" 
  15741            />
  15742                                                                         
  15743            <xsl:with- param 
  15744             name="free Text" 
  15745             select="''
  15746            />
  15747                                                                         
  15748            <xsl:with- param 
  15749             name="deSq uigglefy" 
  15750             select="''
  15751            />
  15752                                                                
  15753           </xsl:call -template>
  15754                                                               
  15755          </div>
  15756                                                     
  15757         </xsl:when >
  15758                                                    
  15759         <xsl:when 
  15760          test="posi tion()=17"
  15761         >
  15762           
  15763          <!-- Body  Site -->
  15764                                                              
  15765          <div 
  15766           style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  15767          >
  15768                                                               
  15769           <xsl:call- template 
  15770            name="flyo verSpan"
  15771           >
  15772                                                                         
  15773            <xsl:with- param 
  15774             name="data
  15775             select="$d ataValue" 
  15776            />
  15777                                                                         
  15778            <xsl:with- param 
  15779             name="free Text" 
  15780             select="''
  15781            />
  15782                                                                         
  15783            <xsl:with- param 
  15784             name="deSq uigglefy" 
  15785             select="''
  15786            />
  15787                                                                
  15788           </xsl:call -template>
  15789                                                               
  15790          </div>
  15791                                                     
  15792         </xsl:when >
  15793                                                    
  15794         <xsl:when 
  15795          test="posi tion()=18"
  15796         >
  15797           
  15798          <!-- Dose  Quantity - ->
  15799                                                              
  15800          <div 
  15801           style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  15802          >
  15803                                                               
  15804           <xsl:call- template 
  15805            name="flyo verSpan"
  15806           >
  15807                                                                         
  15808            <xsl:with- param 
  15809             name="data
  15810             select="$d ataValue" 
  15811            />
  15812                                                                         
  15813            <xsl:with- param 
  15814             name="free Text" 
  15815             select="''
  15816            />
  15817                                                                         
  15818            <xsl:with- param 
  15819             name="deSq uigglefy" 
  15820             select="''
  15821            />
  15822                                                                
  15823           </xsl:call -template>
  15824                                                               
  15825          </div>
  15826                                                     
  15827         </xsl:when >
  15828                                                    
  15829         <xsl:when 
  15830          test="posi tion()=19"
  15831         >
  15832           
  15833          <!-- Dose  Restrictio n -->
  15834                                                              
  15835          <div 
  15836           style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  15837          >
  15838                                                               
  15839           <xsl:call- template 
  15840            name="flyo verSpan"
  15841           >
  15842                                                                         
  15843            <xsl:with- param 
  15844             name="data
  15845             select="$d ataValue" 
  15846            />
  15847                                                                         
  15848            <xsl:with- param 
  15849             name="free Text" 
  15850             select="''
  15851            />
  15852                                                                         
  15853            <xsl:with- param 
  15854             name="deSq uigglefy" 
  15855             select="''
  15856            />
  15857                                                                
  15858           </xsl:call -template>
  15859                                                               
  15860          </div>
  15861                                                     
  15862         </xsl:when >
  15863                                                    
  15864         <xsl:when 
  15865          test="posi tion()=20"
  15866         >
  15867           
  15868          <!-- Produ ct Form -- >
  15869                                                              
  15870          <div 
  15871           style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  15872          >
  15873                                                               
  15874           <xsl:call- template 
  15875            name="flyo verSpan"
  15876           >
  15877                                                                         
  15878            <xsl:with- param 
  15879             name="data
  15880             select="$d ataValue" 
  15881            />
  15882                                                                         
  15883            <xsl:with- param 
  15884             name="free Text" 
  15885             select="''
  15886            />
  15887                                                                         
  15888            <xsl:with- param 
  15889             name="deSq uigglefy" 
  15890             select="''
  15891            />
  15892                                                                
  15893           </xsl:call -template>
  15894                                                               
  15895          </div>
  15896                                                     
  15897         </xsl:when >
  15898                                                    
  15899         <xsl:when 
  15900          test="posi tion()=21"
  15901         >
  15902           
  15903          <!-- Deliv ery Methos  -->
  15904                                                              
  15905          <div 
  15906           style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  15907          >
  15908                                                               
  15909           <xsl:call- template 
  15910            name="flyo verSpan"
  15911           >
  15912                                                                         
  15913            <xsl:with- param 
  15914             name="data
  15915             select="$d ataValue" 
  15916            />
  15917                                                                         
  15918            <xsl:with- param 
  15919             name="free Text" 
  15920             select="''
  15921            />
  15922                                                                         
  15923            <xsl:with- param 
  15924             name="deSq uigglefy" 
  15925             select="''
  15926            />
  15927                                                                
  15928           </xsl:call -template>
  15929                                                               
  15930          </div>
  15931                                                     
  15932         </xsl:when >
  15933                                                    
  15934         <xsl:when 
  15935          test="posi tion()=22"
  15936         >
  15937           
  15938          <!-- Drug  Manufactur e -->
  15939                                                              
  15940          <div 
  15941           style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  15942          >
  15943                                                               
  15944           <xsl:call- template 
  15945            name="flyo verSpan"
  15946           >
  15947                                                                         
  15948            <xsl:with- param 
  15949             name="data
  15950             select="$d ataValue" 
  15951            />
  15952                                                                         
  15953            <xsl:with- param 
  15954             name="free Text" 
  15955             select="''
  15956            />
  15957                                                                         
  15958            <xsl:with- param 
  15959             name="deSq uigglefy" 
  15960             select="''
  15961            />
  15962                                                                
  15963           </xsl:call -template>
  15964                                                               
  15965          </div>
  15966                                                     
  15967         </xsl:when >
  15968                                                    
  15969         <xsl:when 
  15970          test="posi tion()=23"
  15971         >
  15972           
  15973          <!-- Medic ation Type  -->
  15974                                                              
  15975          <div 
  15976           style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  15977          >
  15978                                                               
  15979           <xsl:call- template 
  15980            name="flyo verSpan"
  15981           >
  15982                                                                         
  15983            <xsl:with- param 
  15984             name="data
  15985             select="$d ataValue" 
  15986            />
  15987                                                                         
  15988            <xsl:with- param 
  15989             name="free Text" 
  15990             select="''
  15991            />
  15992                                                                         
  15993            <xsl:with- param 
  15994             name="deSq uigglefy" 
  15995             select="''
  15996            />
  15997                                                                
  15998           </xsl:call -template>
  15999                                                               
  16000          </div>
  16001                                                     
  16002         </xsl:when >
  16003                                                    
  16004         <xsl:when 
  16005          test="posi tion()=24"
  16006         >
  16007           
  16008          <!-- Indic ation -->
  16009                                                              
  16010          <div 
  16011           style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  16012          >
  16013                                                               
  16014           <xsl:call- template 
  16015            name="flyo verSpan"
  16016           >
  16017                                                                         
  16018            <xsl:with- param 
  16019             name="data
  16020             select="$d ataValue" 
  16021            />
  16022                                                                         
  16023            <xsl:with- param 
  16024             name="free Text" 
  16025             select="''
  16026            />
  16027                                                                         
  16028            <xsl:with- param 
  16029             name="deSq uigglefy" 
  16030             select="''
  16031            />
  16032                                                                
  16033           </xsl:call -template>
  16034                                                               
  16035          </div>
  16036                                                     
  16037         </xsl:when >
  16038                                                    
  16039         <xsl:when 
  16040          test="posi tion()=25"
  16041         >
  16042           
  16043          <!-- Vehic le -->
  16044                                                              
  16045          <div 
  16046           style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  16047          >
  16048                                                               
  16049           <xsl:call- template 
  16050            name="flyo verSpan"
  16051           >
  16052                                                                         
  16053            <xsl:with- param 
  16054             name="data
  16055             select="$d ataValue" 
  16056            />
  16057                                                                         
  16058            <xsl:with- param 
  16059             name="free Text" 
  16060             select="''
  16061            />
  16062                                                                         
  16063            <xsl:with- param 
  16064             name="deSq uigglefy" 
  16065             select="''
  16066            />
  16067                                                                
  16068           </xsl:call -template>
  16069                                                               
  16070          </div>
  16071                                                     
  16072         </xsl:when >
  16073                                                    
  16074         <xsl:when 
  16075          test="posi tion()=26"
  16076         >
  16077           
  16078          <!-- Dose  Indicator  -->
  16079                                                              
  16080          <div 
  16081           style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  16082          >
  16083                                                               
  16084           <xsl:call- template 
  16085            name="flyo verSpan"
  16086           >
  16087                                                                         
  16088            <xsl:with- param 
  16089             name="data
  16090             select="$d ataValue" 
  16091            />
  16092                                                                         
  16093            <xsl:with- param 
  16094             name="free Text" 
  16095             select="''
  16096            />
  16097                                                                         
  16098            <xsl:with- param 
  16099             name="deSq uigglefy" 
  16100             select="''
  16101            />
  16102                                                                
  16103           </xsl:call -template>
  16104                                                               
  16105          </div>
  16106                                                     
  16107         </xsl:when >
  16108                                                    
  16109         <xsl:when 
  16110          test="posi tion()=27"
  16111         >
  16112           
  16113          <!-- Order  Number -- >
  16114                                                              
  16115          <div 
  16116           style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  16117          >
  16118                                                               
  16119           <xsl:call- template 
  16120            name="flyo verSpan"
  16121           >
  16122                                                                         
  16123            <xsl:with- param 
  16124             name="data
  16125             select="$d ataValue" 
  16126            />
  16127                                                                         
  16128            <xsl:with- param 
  16129             name="free Text" 
  16130             select="''
  16131            />
  16132                                                                         
  16133            <xsl:with- param 
  16134             name="deSq uigglefy" 
  16135             select="''
  16136            />
  16137                                                                
  16138           </xsl:call -template>
  16139                                                               
  16140          </div>
  16141                                                     
  16142         </xsl:when >
  16143                                                    
  16144         <xsl:when 
  16145          test="posi tion()=28"
  16146         >
  16147           
  16148          <!-- Total  Fills -->
  16149                                                              
  16150          <div 
  16151           style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  16152          >
  16153                                                               
  16154           <xsl:call- template 
  16155            name="flyo verSpan"
  16156           >
  16157                                                                         
  16158            <xsl:with- param 
  16159             name="data
  16160             select="$d ataValue" 
  16161            />
  16162                                                                         
  16163            <xsl:with- param 
  16164             name="free Text" 
  16165             select="''
  16166            />
  16167                                                                         
  16168            <xsl:with- param 
  16169             name="deSq uigglefy" 
  16170             select="''
  16171            />
  16172                                                                
  16173           </xsl:call -template>
  16174                                                               
  16175          </div>
  16176                                                     
  16177         </xsl:when >
  16178                                                    
  16179         <xsl:when 
  16180          test="posi tion()=29"
  16181         >
  16182           
  16183          <!-- Fulfi llment Ins tructions  -->
  16184                                                              
  16185          <div 
  16186           style="ove rflow:hidd en; white- space:nowr ap; width: 300px;"
  16187          >
  16188                                                               
  16189           <xsl:call- template 
  16190            name="flyo verSpan"
  16191           >
  16192                                                                         
  16193            <xsl:with- param 
  16194             name="data
  16195             select="$d ataValue" 
  16196            />
  16197                                                                         
  16198            <xsl:with- param 
  16199             name="free Text" 
  16200             select="''
  16201            />
  16202                                                                         
  16203            <xsl:with- param 
  16204             name="deSq uigglefy" 
  16205             select="''
  16206            />
  16207                                                                
  16208           </xsl:call -template>
  16209                                                               
  16210          </div>
  16211                                                     
  16212         </xsl:when >
  16213                                                    
  16214         <xsl:when 
  16215          test="posi tion()=30"
  16216         >
  16217           
  16218          <!-- Dispe nsing Prov ider -->
  16219                                                              
  16220          <div 
  16221           style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  16222          >
  16223                                                               
  16224           <xsl:call- template 
  16225            name="flyo verSpan"
  16226           >
  16227                                                                         
  16228            <xsl:with- param 
  16229             name="data
  16230             select="$d ataValue" 
  16231            />
  16232                                                                         
  16233            <xsl:with- param 
  16234             name="free Text" 
  16235             select="''
  16236            />
  16237                                                                         
  16238            <xsl:with- param 
  16239             name="deSq uigglefy" 
  16240             select="''
  16241            />
  16242                                                                
  16243           </xsl:call -template>
  16244                                                               
  16245          </div>
  16246                                                     
  16247         </xsl:when >
  16248                                                    
  16249         <xsl:when 
  16250          test="posi tion()=31"
  16251         >
  16252           
  16253          <!-- Pharm acy Locati on -->
  16254                                                              
  16255          <div 
  16256           style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  16257          >
  16258                                                               
  16259           <xsl:call- template 
  16260            name="flyo verSpan"
  16261           >
  16262                                                                         
  16263            <xsl:with- param 
  16264             name="data
  16265             select="$d ataValue" 
  16266            />
  16267                                                                         
  16268            <xsl:with- param 
  16269             name="free Text" 
  16270             select="''
  16271            />
  16272                                                                         
  16273            <xsl:with- param 
  16274             name="deSq uigglefy" 
  16275             select="''
  16276            />
  16277                                                                
  16278           </xsl:call -template>
  16279                                                               
  16280          </div>
  16281                                                     
  16282         </xsl:when >
  16283                                                    
  16284         <xsl:when 
  16285          test="posi tion()=32"
  16286         >
  16287           
  16288          <!-- Fill  Number -->
  16289                                                              
  16290          <div 
  16291           style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  16292          >
  16293                                                               
  16294           <xsl:call- template 
  16295            name="flyo verSpan"
  16296           >
  16297                                                                         
  16298            <xsl:with- param 
  16299             name="data
  16300             select="$d ataValue" 
  16301            />
  16302                                                                         
  16303            <xsl:with- param 
  16304             name="free Text" 
  16305             select="''
  16306            />
  16307                                                                         
  16308            <xsl:with- param 
  16309             name="deSq uigglefy" 
  16310             select="''
  16311            />
  16312                                                                
  16313           </xsl:call -template>
  16314                                                               
  16315          </div>
  16316                                                     
  16317         </xsl:when >
  16318                                            
  16319        </xsl:choo se>
  16320                                  
  16321       </td>
  16322                        
  16323      </xsl:for- each>
  16324              
  16325     </xsl:temp late>
  16326    
  16327             
  16328     <xsl:templ ate 
  16329      name="disp layFutureO bservation Table"
  16330     >
  16331                       
  16332      <xsl:param  
  16333       name="tabl e"
  16334      />
  16335     
  16336                       
  16337      <!--  Get  the table  -->
  16338                       
  16339      <table 
  16340       style="fon t-size:14p
  16341       border="1"
  16342      >
  16343                                 
  16344       <caption 
  16345        style="tex t-align:le ft"
  16346       >
  16347        <b>
  16348         <xsl:value -of 
  16349          select="$t able/../n1 :title"
  16350         />
  16351        </b>
  16352       </caption>
  16353                                 
  16354       <thead>
  16355                                           
  16356        <tr>
  16357                                                    
  16358         <xsl:for-e ach 
  16359          select="$t able/n1:th ead/n1:th"
  16360         >
  16361                                                              
  16362          <th 
  16363           class="fir st"
  16364          >
  16365           <xsl:value -of 
  16366            select="."
  16367           />
  16368          </th>
  16369                                                     
  16370         </xsl:for- each>
  16371                                            
  16372        </tr>
  16373                                  
  16374       </thead>
  16375                                 
  16376       <tbody>
  16377                                           
  16378        <xsl:choos e>
  16379                                                    
  16380         <xsl:when 
  16381          test="./n1 :td[3]/n1: content"
  16382         >
  16383                                                              
  16384          <xsl:for-e ach 
  16385           select="$t able/n1:tb ody/n1:tr"
  16386          >
  16387                                                                        
  16388           <xsl:sort 
  16389            select="su bstring(no rmalize-sp ace(./n1:t d[3]/n1:co ntent),1,8 )" 
  16390            order="des cending"
  16391           />
  16392                                                                        
  16393           <tr 
  16394            class="sec ond"
  16395           >
  16396                                                                                  
  16397            <xsl:call- template 
  16398             name="disp layFutureO bservation DataRow"
  16399            >
  16400                                                                                            
  16401             <xsl:with- param 
  16402              name="tabl eRow" 
  16403              select="."
  16404             />
  16405                                                                                   
  16406            </xsl:call -template>
  16407                                                                         
  16408           </tr>
  16409                                                               
  16410          </xsl:for- each>
  16411                                                     
  16412         </xsl:when >
  16413                                                    
  16414         <xsl:other wise>
  16415                                                              
  16416          <xsl:for-e ach 
  16417           select="$t able/n1:tb ody/n1:tr"
  16418          >
  16419                                                                        
  16420           <xsl:sort 
  16421            select="su bstring(no rmalize-sp ace(./n1:t d[3]),1,8)
  16422            order="des cending"
  16423           />
  16424                                                                        
  16425           <tr 
  16426            class="sec ond"
  16427           >
  16428                                                                                  
  16429            <xsl:call- template 
  16430             name="disp layFutureO bservation DataRow"
  16431            >
  16432                                                                                            
  16433             <xsl:with- param 
  16434              name="tabl eRow" 
  16435              select="."
  16436             />
  16437                                                                                   
  16438            </xsl:call -template>
  16439                                                                         
  16440           </tr>
  16441                                                               
  16442          </xsl:for- each>
  16443                                                     
  16444         </xsl:othe rwise>
  16445                                            
  16446        </xsl:choo se>   
  16447                                  
  16448       </tbody>
  16449                        
  16450      </table>
  16451                       
  16452      <br/>
  16453                       
  16454      <br/>
  16455              
  16456     </xsl:temp late>
  16457    
  16458             
  16459     <xsl:templ ate 
  16460      name="disp layFutureO bservation DataRow"
  16461     >
  16462                       
  16463      <xsl:param  
  16464       name="tabl eRow"
  16465      />
  16466     
  16467                       
  16468      <xsl:varia ble 
  16469       name="time Value"
  16470      >
  16471                                 
  16472       <xsl:choos e>
  16473                                           
  16474        <xsl:when 
  16475         test="./n1 :td[3]/n1: content"
  16476        >
  16477                                                    
  16478         <xsl:value -of 
  16479          select="./ n1:td[3]/n 1:content"
  16480         /> 
  16481                                            
  16482        </xsl:when >
  16483                                           
  16484        <xsl:other wise>
  16485                                                    
  16486         <xsl:value -of 
  16487          select="./ n1:td[3]"
  16488         />
  16489                                            
  16490        </xsl:othe rwise>
  16491                                  
  16492       </xsl:choo se>
  16493                        
  16494      </xsl:vari able>
  16495                       
  16496                       
  16497      <xsl:varia ble 
  16498       name="date String"
  16499      >
  16500                                 
  16501       <xsl:call- template 
  16502        name="conv ertDate"
  16503       >
  16504                                           
  16505        <xsl:with- param 
  16506         name="date Value" 
  16507         select="no rmalize-sp ace($timeV alue)"
  16508        />
  16509                                  
  16510       </xsl:call -template>  
  16511                        
  16512      </xsl:vari able>
  16513                       
  16514                       
  16515      <xsl:for-e ach 
  16516       select="$t ableRow/n1 :td"
  16517      >
  16518                        
  16519                                 
  16520       <xsl:varia ble 
  16521        name="data Value"
  16522       >
  16523                                           
  16524        <xsl:choos e>
  16525                                                    
  16526         <xsl:when 
  16527          test="./n1 :content"
  16528         >
  16529                                                              
  16530          <xsl:value -of 
  16531           select="./ n1:content "
  16532          /> 
  16533                                                     
  16534         </xsl:when >
  16535                                                    
  16536         <xsl:other wise>
  16537                                                              
  16538          <xsl:value -of 
  16539           select="."
  16540          />
  16541                                                     
  16542         </xsl:othe rwise>
  16543                                            
  16544        </xsl:choo se>
  16545                                  
  16546       </xsl:vari able>
  16547                                 
  16548                                 
  16549       <td>
  16550                                           
  16551        <xsl:choos e>
  16552                                                    
  16553         <xsl:when 
  16554          test="posi tion()=1"
  16555         >
  16556           
  16557          <!-- Obser vation -->
  16558                                                              
  16559          <div 
  16560           style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  16561          >
  16562                                                               
  16563           <xsl:call- template 
  16564            name="flyo verSpan"
  16565           >
  16566                                                                         
  16567            <xsl:with- param 
  16568             name="data
  16569             select="$d ateString"  
  16570            />
  16571                                                                         
  16572            <xsl:with- param 
  16573             name="free Text" 
  16574             select="''
  16575            />
  16576                                                                         
  16577            <xsl:with- param 
  16578             name="deSq uigglefy" 
  16579             select="''
  16580            />
  16581                                                                
  16582           </xsl:call -template>
  16583                                                               
  16584          </div>
  16585                                                     
  16586         </xsl:when >
  16587                                                    
  16588         <xsl:when 
  16589          test="posi tion()=2"
  16590         >
  16591           
  16592          <!-- Obser vation Sta tus -->
  16593                                                              
  16594          <div 
  16595           style="ove rflow:hidd en; white- space:nowr ap; width: 180px;;"
  16596          >
  16597                                                               
  16598           <xsl:call- template 
  16599            name="flyo verSpan"
  16600           >
  16601                                                                         
  16602            <xsl:with- param 
  16603             name="data
  16604             select="$d ataValue" 
  16605            />
  16606                                                                         
  16607            <xsl:with- param 
  16608             name="free Text" 
  16609             select="''
  16610            />
  16611                                                                         
  16612            <xsl:with- param 
  16613             name="deSq uigglefy" 
  16614             select="''
  16615            />
  16616                                                                
  16617           </xsl:call -template>
  16618                                                               
  16619          </div>
  16620                                                     
  16621         </xsl:when >
  16622                                                    
  16623         <xsl:when 
  16624          test="posi tion()=3"
  16625         >
  16626           
  16627          <!-- Date/ Time -->
  16628                                                              
  16629          <div 
  16630           style="ove rflow:hidd en; white- space:nowr ap; width: 240px;;"
  16631          >
  16632                                                               
  16633           <xsl:call- template 
  16634            name="flyo verSpan"
  16635           >
  16636                                                                         
  16637            <xsl:with- param 
  16638             name="data
  16639             select="$d ateString"  
  16640            />
  16641                                                                         
  16642            <xsl:with- param 
  16643             name="free Text" 
  16644             select="'y es'" 
  16645            />
  16646                                                                         
  16647            <xsl:with- param 
  16648             name="deSq uigglefy" 
  16649             select="'y es'" 
  16650            />
  16651                                                                
  16652           </xsl:call -template>
  16653                                                               
  16654          </div>
  16655                                                     
  16656         </xsl:when >
  16657                                            
  16658        </xsl:choo se>
  16659                                  
  16660       </td>
  16661                        
  16662      </xsl:for- each>
  16663              
  16664     </xsl:temp late>
  16665    
  16666             
  16667     <!--   fly over -->
  16668             
  16669     <xsl:templ ate 
  16670      name="flyo verSpan"
  16671     >
  16672                       
  16673      <xsl:param  
  16674       name="data "
  16675      />
  16676                       
  16677      <xsl:param  
  16678       name="free Text"
  16679      />
  16680                       
  16681      <xsl:param  
  16682       name="deSq uigglefy"
  16683      />
  16684                       
  16685      <xsl:eleme nt 
  16686       name="span "
  16687      >
  16688                                 
  16689       <xsl:attri bute 
  16690        name="onmo useover"
  16691       >
  16692                                           
  16693        <xsl:choos e>
  16694                                                    
  16695         <xsl:when 
  16696          test="$fre eText and  string-len gth($freeT ext)>0"
  16697         >
  16698                                                              
  16699          <xsl:text>
  16700           DisplayTip (this,25,- 50,1)
  16701          </xsl:text >
  16702                                                     
  16703         </xsl:when >
  16704                                                    
  16705         <xsl:other wise>
  16706                                                              
  16707          <xsl:text>
  16708           DisplayTip (this,25,- 50,0)
  16709          </xsl:text >
  16710                                                     
  16711         </xsl:othe rwise>
  16712                                            
  16713        </xsl:choo se>
  16714                                  
  16715       </xsl:attr ibute>
  16716                                 
  16717       <xsl:choos e>
  16718                                           
  16719        <xsl:when 
  16720         test="$dat a and stri ng-length( $data)>0"
  16721        >
  16722                                                    
  16723         <xsl:choos e>
  16724                                                              
  16725          <xsl:when 
  16726           test="$deS quigglefy  and string -length($d eSquigglef y)>0"
  16727          >
  16728                                                                        
  16729           <xsl:call- template 
  16730            name="repl aceSquiggl esWithBrea ks"
  16731           >
  16732                                                                                  
  16733            <xsl:with- param 
  16734             name="text
  16735             select="$d ata"
  16736            />
  16737                                                                         
  16738           </xsl:call -template>
  16739                                                               
  16740          </xsl:when >
  16741                                                              
  16742          <xsl:other wise>
  16743                                                                        
  16744           <xsl:value -of 
  16745            select="$d ata"
  16746           />
  16747                                                               
  16748          </xsl:othe rwise>
  16749                                                     
  16750         </xsl:choo se>
  16751                                            
  16752        </xsl:when >
  16753                                           
  16754        <xsl:other wise>
  16755                                                    
  16756         <xsl:call- template 
  16757          name="na"
  16758         />
  16759                                            
  16760        </xsl:othe rwise>
  16761                                  
  16762       </xsl:choo se>
  16763                        
  16764      </xsl:elem ent>
  16765              
  16766     </xsl:temp late>
  16767    
  16768             
  16769     <xsl:templ ate 
  16770      name="repl aceSquiggl esWithBrea ks"
  16771     >
  16772                       
  16773      <xsl:param  
  16774       name="text "
  16775      />
  16776                       
  16777      <xsl:if 
  16778       test="$tex t"
  16779      >
  16780                                 
  16781       <xsl:choos e>
  16782                                           
  16783        <xsl:when 
  16784         test="cont ains($text ,'~')"
  16785        >
  16786                                                    
  16787         <xsl:value -of 
  16788          select="su bstring-be fore($text ,'~')"
  16789         />
  16790                                                    
  16791         <br/>
  16792                                                    
  16793         <xsl:call- template 
  16794          name="repl aceSquiggl esWithBrea ks"
  16795         >
  16796                                                              
  16797          <xsl:with- param 
  16798           name="text
  16799           select="su bstring-af ter($text, '~')"
  16800          />
  16801                                                     
  16802         </xsl:call -template>
  16803                                            
  16804        </xsl:when >
  16805                                           
  16806        <xsl:other wise>
  16807                                                    
  16808         <xsl:value -of 
  16809          select="$t ext"
  16810         />
  16811                                            
  16812        </xsl:othe rwise>
  16813                                  
  16814       </xsl:choo se>
  16815                        
  16816      </xsl:if>
  16817              
  16818     </xsl:temp late>
  16819    
  16820             
  16821     <!--   Tit le  -->
  16822             
  16823     <xsl:templ ate 
  16824      match="n1: title"
  16825     >
  16826                       
  16827      <xsl:varia ble 
  16828       name="comp Found"
  16829      >
  16830                                 
  16831       <xsl:call- template 
  16832        name="comp onentFound "
  16833       >
  16834                                           
  16835        <xsl:with- param 
  16836         name="comp Section" 
  16837         select=".. /."
  16838        />
  16839                                  
  16840       </xsl:call -template>
  16841                        
  16842      </xsl:vari able>
  16843                       
  16844      <xsl:choos e>
  16845                                 
  16846       <xsl:when 
  16847        test="stri ng-length( $compFound )>0"
  16848       >
  16849                                           
  16850        <h3>
  16851                                                    
  16852         <span 
  16853          style="fon t-weight:b old;line-h eight:40%"
  16854         >
  16855                                                              
  16856          <a 
  16857           name="{gen erate-id(. )}" 
  16858           href="#toc "
  16859          >
  16860                                                                        
  16861           <xsl:value -of 
  16862            select="."
  16863           />
  16864                                                               
  16865          </a>
  16866                                                     
  16867         </span>
  16868                                            
  16869        </h3>
  16870                                  
  16871       </xsl:when >
  16872                        
  16873      </xsl:choo se>
  16874              
  16875     </xsl:temp late>
  16876    
  16877             
  16878     <!--   Tex t   -->
  16879             
  16880     <xsl:templ ate 
  16881      match="n1: text"
  16882     >
  16883                       
  16884      <xsl:apply -templates  />
  16885              
  16886     </xsl:temp late>
  16887    
  16888             
  16889     <!--   par agraph  -- >
  16890             
  16891     <xsl:templ ate 
  16892      match="n1: paragraph"
  16893     >
  16894                       
  16895      <p>
  16896                                 
  16897       <xsl:apply -templates />
  16898                        
  16899      </p>
  16900              
  16901     </xsl:temp late>
  16902    
  16903             
  16904     <!--     C ontent w/  deleted te xt is hidd en -->
  16905             
  16906     <xsl:templ ate 
  16907      match="n1: content[@r evised='de lete']"
  16908     />
  16909    
  16910             
  16911     <!--   con tent  -->
  16912             
  16913     <xsl:templ ate 
  16914      match="n1: content"
  16915     >
  16916                       
  16917      <xsl:apply -templates />
  16918              
  16919     </xsl:temp late>
  16920    
  16921    
  16922             
  16923     <!--   lis t  -->
  16924             
  16925     <xsl:templ ate 
  16926      match="n1: list"
  16927     >
  16928                       
  16929      <xsl:if 
  16930       test="n1:c aption"
  16931      >
  16932                                 
  16933       <span 
  16934        style="fon t-weight:b old; "
  16935       >
  16936                                           
  16937        <xsl:apply -templates  
  16938         select="n1 :caption"
  16939        />
  16940                                  
  16941       </span>
  16942                        
  16943      </xsl:if>
  16944                       
  16945      <ul>
  16946                                 
  16947       <xsl:for-e ach 
  16948        select="n1 :item"
  16949       >
  16950                                           
  16951        <li>
  16952                                                    
  16953         <xsl:apply -templates  />
  16954                                            
  16955        </li>
  16956                                  
  16957       </xsl:for- each>
  16958                        
  16959      </ul>
  16960              
  16961     </xsl:temp late>
  16962    
  16963             
  16964     <xsl:templ ate 
  16965      match="n1: list[@list Type='orde red']"
  16966     >
  16967                       
  16968      <xsl:if 
  16969       test="n1:c aption"
  16970      >
  16971                                 
  16972       <span 
  16973        style="fon t-weight:b old; "
  16974       >
  16975                                           
  16976        <xsl:apply -templates  
  16977         select="n1 :caption"
  16978        />
  16979                                  
  16980       </span>
  16981                        
  16982      </xsl:if>
  16983                       
  16984      <ol>
  16985                                 
  16986       <xsl:for-e ach 
  16987        select="n1 :item"
  16988       >
  16989                                           
  16990        <li>
  16991                                                    
  16992         <xsl:apply -templates  />
  16993                                            
  16994        </li>
  16995                                  
  16996       </xsl:for- each>
  16997                        
  16998      </ol>
  16999              
  17000     </xsl:temp late>
  17001    
  17002    
  17003             
  17004     <!--   cap tion  -->
  17005             
  17006     <xsl:templ ate 
  17007      match="n1: caption"
  17008     >
  17009                       
  17010      <xsl:apply -templates />
  17011                       
  17012      <xsl:text>
  17013      
  17014      </xsl:text >
  17015              
  17016     </xsl:temp late>
  17017    
  17018             
  17019     <!--       Tables   - ->
  17020             
  17021     <xsl:templ ate 
  17022      match="n1: table/@*|n 1:thead/@* |n1:tfoot/ @*|n1:tbod y/@*|n1:co lgroup/@*| n1:col/@*| n1:tr/@*|n 1:th/@*|n1 :td/@*"
  17023     >
  17024                       
  17025      <xsl:copy>
  17026                                 
  17027       <xsl:copy- of 
  17028        select="@* "
  17029       />
  17030                                 
  17031       <xsl:apply -templates />
  17032                        
  17033      </xsl:copy >
  17034              
  17035     </xsl:temp late>
  17036    
  17037             
  17038     <xsl:templ ate 
  17039      match="n1: table"
  17040     >
  17041                       
  17042      <table>
  17043      
  17044                                 
  17045       <xsl:copy- of 
  17046        select="@* "
  17047       />
  17048                                 
  17049       <xsl:apply -templates />
  17050                        
  17051      </table>
  17052              
  17053     </xsl:temp late>
  17054    
  17055             
  17056     <xsl:templ ate 
  17057      match="n1: thead"
  17058     >
  17059                       
  17060      <thead>
  17061      
  17062                                 
  17063       <xsl:copy- of 
  17064        select="@* "
  17065       />
  17066                                 
  17067       <xsl:apply -templates />
  17068                        
  17069      </thead>
  17070              
  17071     </xsl:temp late>
  17072    
  17073             
  17074     <xsl:templ ate 
  17075      match="n1: tfoot"
  17076     >
  17077                       
  17078      <tfoot>
  17079      
  17080                                 
  17081       <xsl:copy- of 
  17082        select="@* "
  17083       />
  17084                                 
  17085       <xsl:apply -templates />
  17086                        
  17087      </tfoot>
  17088              
  17089     </xsl:temp late>
  17090    
  17091             
  17092     <xsl:templ ate 
  17093      match="n1: tbody"
  17094     >
  17095                       
  17096      <tbody>
  17097      
  17098                                 
  17099       <xsl:copy- of 
  17100        select="@* "
  17101       />
  17102                                 
  17103       <xsl:apply -templates />
  17104                        
  17105      </tbody>
  17106              
  17107     </xsl:temp late>
  17108    
  17109             
  17110     <xsl:templ ate 
  17111      match="n1: colgroup"
  17112     >
  17113                       
  17114      <colgroup>
  17115      
  17116                                 
  17117       <xsl:copy- of 
  17118        select="@* "
  17119       />
  17120                                 
  17121       <xsl:apply -templates />
  17122                        
  17123      </colgroup >
  17124              
  17125     </xsl:temp late>
  17126    
  17127             
  17128     <xsl:templ ate 
  17129      match="n1: col"
  17130     >
  17131                       
  17132      <col>
  17133      
  17134                                 
  17135       <xsl:copy- of 
  17136        select="@* "
  17137       />
  17138                                 
  17139       <xsl:apply -templates />
  17140                        
  17141      </col>
  17142              
  17143     </xsl:temp late>
  17144    
  17145             
  17146     <xsl:templ ate 
  17147      match="n1: tr"
  17148     >
  17149                       
  17150      <tr>
  17151      
  17152                                 
  17153       <xsl:copy- of 
  17154        select="@* "
  17155       />
  17156                                 
  17157       <xsl:apply -templates />
  17158                        
  17159      </tr>
  17160              
  17161     </xsl:temp late>
  17162    
  17163             
  17164     <xsl:templ ate 
  17165      match="n1: th"
  17166     >
  17167                       
  17168      <th>
  17169                                 
  17170       <xsl:copy- of 
  17171        select="@* "
  17172       />
  17173                                 
  17174       <xsl:apply -templates />
  17175                        
  17176      </th>
  17177              
  17178     </xsl:temp late>
  17179    
  17180             
  17181     <xsl:templ ate 
  17182      match="n1: td"
  17183     >
  17184                       
  17185      <td>
  17186                                 
  17187       <xsl:copy- of 
  17188        select="@* "
  17189       />
  17190                                 
  17191       <xsl:apply -templates />
  17192                        
  17193      </td>
  17194              
  17195     </xsl:temp late>
  17196    
  17197             
  17198     <xsl:templ ate 
  17199      match="n1: table/n1:c aption"
  17200     >
  17201                       
  17202      <span 
  17203       style="fon t-weight:b old; "
  17204      >
  17205                                 
  17206       <xsl:apply -templates />
  17207                        
  17208      </span>
  17209              
  17210     </xsl:temp late>
  17211    
  17212             
  17213     <!--   Ren derMultiMe dia 
  17214    
  17215              t his curren tly only h andles GIF 's and JPE G's.  It c ould, howe ver,
  17216              b e extended  by includ ing other  image MIME  types in  the predic ate
  17217              a nd/or by g enerating  <object> o r <applet>  tag with  the correc t
  17218              p arams depe nding on t he media t ype  @ID   =$imageRef      refer encedObjec t
  17219      -->
  17220             
  17221     <xsl:templ ate 
  17222      match="n1: renderMult iMedia"
  17223     >
  17224                       
  17225      <xsl:varia ble 
  17226       name="imag eRef" 
  17227       select="@r eferencedO bject"
  17228      />
  17229                       
  17230      <xsl:choos e>
  17231                                 
  17232       <xsl:when 
  17233        test="//n1 :regionOfI nterest[@I D=$imageRe f]"
  17234       >
  17235                                           
  17236        <!-- Here  is where t he Region  of Interes t image re ferencing  goes -->
  17237                                           
  17238        <xsl:if 
  17239         test='//n1 :regionOfI nterest[@I D=$imageRe f]//n1:obs ervationMe dia/n1:val ue[@mediaT ype="image /gif" or @ mediaType= "image/jpe g"]'
  17240        >
  17241                                                    
  17242         <br 
  17243          clear='all '
  17244         />
  17245                                                    
  17246         <xsl:eleme nt 
  17247          name='img'
  17248         >
  17249                                                              
  17250          <xsl:attri bute 
  17251           name='src'
  17252          >
  17253                                                                        
  17254           <xsl:value -of 
  17255            select='// n1:regionO fInterest[ @ID=$image Ref]//n1:o bservation Media/n1:v alue/n1:re ference/@v alue'
  17256           />
  17257                                                               
  17258          </xsl:attr ibute>
  17259                                                     
  17260         </xsl:elem ent>
  17261                                            
  17262        </xsl:if>
  17263                                  
  17264       </xsl:when >
  17265                                 
  17266       <xsl:other wise>
  17267                                           
  17268        <!-- Here  is where t he direct  MultiMedia  image ref erencing g oes -->
  17269                                           
  17270        <xsl:if 
  17271         test='//n1 :observati onMedia[@I D=$imageRe f]/n1:valu e[@mediaTy pe="image/ gif" or @m ediaType=" image/jpeg "]'
  17272        >
  17273                                                    
  17274         <br 
  17275          clear='all '
  17276         />
  17277                                                    
  17278         <xsl:eleme nt 
  17279          name='img'
  17280         >
  17281                                                              
  17282          <xsl:attri bute 
  17283           name='src'
  17284          >
  17285                                                                        
  17286           <xsl:value -of 
  17287            select='// n1:observa tionMedia[ @ID=$image Ref]/n1:va lue/n1:ref erence/@va lue'
  17288           />
  17289                                                               
  17290          </xsl:attr ibute>
  17291                                                     
  17292         </xsl:elem ent>
  17293                                            
  17294        </xsl:if>
  17295                                  
  17296       </xsl:othe rwise>
  17297                        
  17298      </xsl:choo se>
  17299              
  17300     </xsl:temp late>
  17301    
  17302             
  17303     <!--    St ylecode pr ocessing    
  17304                Supports B old, Under line and I talics dis play
  17305    
  17306     -->
  17307    
  17308             
  17309     <xsl:templ ate 
  17310      match="//n 1:*[@style Code]"
  17311     >
  17312     
  17313                       
  17314      <xsl:if 
  17315       test="@sty leCode='Bo ld'"
  17316      >
  17317                                 
  17318       <xsl:eleme nt 
  17319        name='b'
  17320       >
  17321                                           
  17322        <xsl:apply -templates />
  17323                                  
  17324       </xsl:elem ent>
  17325                        
  17326      </xsl:if>
  17327     
  17328                       
  17329      <xsl:if 
  17330       test="@sty leCode='It alics'"
  17331      >
  17332                                 
  17333       <xsl:eleme nt 
  17334        name='i'
  17335       >
  17336                                           
  17337        <xsl:apply -templates />
  17338                                  
  17339       </xsl:elem ent>
  17340                        
  17341      </xsl:if>
  17342     
  17343                       
  17344      <xsl:if 
  17345       test="@sty leCode='Un derline'"
  17346      >
  17347                                 
  17348       <xsl:eleme nt 
  17349        name='u'
  17350       >
  17351                                           
  17352        <xsl:apply -templates />
  17353                                  
  17354       </xsl:elem ent>
  17355                        
  17356      </xsl:if>
  17357     
  17358                       
  17359      <xsl:if 
  17360       test="cont ains(@styl eCode,'Bol d') and co ntains(@st yleCode,'I talics') a nd not (co ntains(@st yleCode, ' Underline' ))"
  17361      >
  17362                                 
  17363       <xsl:eleme nt 
  17364        name='b'
  17365       >
  17366                                           
  17367        <xsl:eleme nt 
  17368         name='i'
  17369        >
  17370                                                    
  17371         <xsl:apply -templates />
  17372                                            
  17373        </xsl:elem ent>
  17374                                  
  17375       </xsl:elem ent>
  17376                        
  17377      </xsl:if>
  17378     
  17379                       
  17380      <xsl:if 
  17381       test="cont ains(@styl eCode,'Bol d') and co ntains(@st yleCode,'U nderline')  and not ( contains(@ styleCode,  'Italics' ))"
  17382      >
  17383                                 
  17384       <xsl:eleme nt 
  17385        name='b'
  17386       >
  17387                                           
  17388        <xsl:eleme nt 
  17389         name='u'
  17390        >
  17391                                                    
  17392         <xsl:apply -templates />
  17393                                            
  17394        </xsl:elem ent>
  17395                                  
  17396       </xsl:elem ent>
  17397                        
  17398      </xsl:if>
  17399     
  17400                       
  17401      <xsl:if 
  17402       test="cont ains(@styl eCode,'Ita lics') and  contains( @styleCode ,'Underlin e') and no t (contain s(@styleCo de, 'Bold' ))"
  17403      >
  17404                                 
  17405       <xsl:eleme nt 
  17406        name='i'
  17407       >
  17408                                           
  17409        <xsl:eleme nt 
  17410         name='u'
  17411        >
  17412                                                    
  17413         <xsl:apply -templates />
  17414                                            
  17415        </xsl:elem ent>
  17416                                  
  17417       </xsl:elem ent>
  17418                        
  17419      </xsl:if>
  17420     
  17421                       
  17422      <xsl:if 
  17423       test="cont ains(@styl eCode,'Ita lics') and  contains( @styleCode ,'Underlin e') and co ntains(@st yleCode, ' Bold')"
  17424      >
  17425                                 
  17426       <xsl:eleme nt 
  17427        name='b'
  17428       >
  17429                                           
  17430        <xsl:eleme nt 
  17431         name='i'
  17432        >
  17433                                                    
  17434         <xsl:eleme nt 
  17435          name='u'
  17436         >
  17437                                                              
  17438          <xsl:apply -templates />
  17439                                                     
  17440         </xsl:elem ent>
  17441                                            
  17442        </xsl:elem ent>
  17443                                  
  17444       </xsl:elem ent>
  17445                        
  17446      </xsl:if>
  17447     
  17448              
  17449     </xsl:temp late>
  17450    
  17451             
  17452     <!--    Su perscript  or Subscri pt   -->
  17453             
  17454     <xsl:templ ate 
  17455      match="n1: sup"
  17456     >
  17457                       
  17458      <xsl:eleme nt 
  17459       name='sup'
  17460      >
  17461                                 
  17462       <xsl:apply -templates />
  17463                        
  17464      </xsl:elem ent>
  17465              
  17466     </xsl:temp late>
  17467             
  17468     <xsl:templ ate 
  17469      match="n1: sub"
  17470     >
  17471                       
  17472      <xsl:eleme nt 
  17473       name='sub'
  17474      >
  17475                                 
  17476       <xsl:apply -templates />
  17477                        
  17478      </xsl:elem ent>
  17479              
  17480     </xsl:temp late>
  17481    
  17482             
  17483     <!--  Bott omline  -- >
  17484    
  17485             
  17486     <xsl:templ ate 
  17487      name="disp layBottomL ine"
  17488     >
  17489                       
  17490      <p>
  17491                                 
  17492       <xsl:varia ble 
  17493        name="foun d"
  17494       />
  17495                                 
  17496       <xsl:call- template 
  17497        name="getN ame"
  17498       >
  17499                                           
  17500        <xsl:with- param 
  17501         name="name
  17502         select="n1 :legalAuth enticator/ n1:assigne dEntity/n1 :represent edOrganiza tion/n1:na me"
  17503        />
  17504                                  
  17505       </xsl:call -template>
  17506                                 
  17507       <xsl:choos e>
  17508                                           
  17509        <xsl:when 
  17510         test="$fou nd"
  17511        >
  17512                                                    
  17513         <b>
  17514                                                              
  17515          <xsl:text>
  17516           Electronic ally gener ated by: 
  17517          </xsl:text >
  17518                                                              
  17519          <xsl:value -of 
  17520           select="$f ound"
  17521          />
  17522                                                     
  17523         </b>
  17524                                            
  17525        </xsl:when >
  17526                                           
  17527        <xsl:other wise>
  17528                                                    
  17529         <b>
  17530                                                              
  17531          <xsl:text 
  17532           disable-ou tput-escap ing="yes"
  17533          >
  17534           Electronic ally gener ated on:&a mp;nbsp; 
  17535          </xsl:text >
  17536                                                              
  17537          <xsl:value -of 
  17538           select="$f ound"
  17539          />
  17540                                                     
  17541         </b>
  17542                                            
  17543        </xsl:othe rwise>
  17544                                  
  17545       </xsl:choo se>
  17546                                 
  17547       <xsl:choos e>
  17548                                           
  17549        <xsl:when 
  17550         test="stri ng-length( n1:effecti veTime/@va lue)=0"
  17551        >
  17552                                                    
  17553         <xsl:call- template 
  17554          name="na"
  17555         />
  17556                                            
  17557        </xsl:when >
  17558                                           
  17559        <xsl:when 
  17560         test="star ts-with(n1 :effective Time/@valu e,' ')"
  17561        >
  17562                                                    
  17563         <xsl:call- template 
  17564          name="na"
  17565         />
  17566                                            
  17567        </xsl:when >
  17568                                           
  17569        <xsl:other wise>
  17570                                                    
  17571         <xsl:varia ble 
  17572          name="date Found"
  17573         />
  17574                                                    
  17575         <xsl:call- template 
  17576          name="form atDateLong "
  17577         >
  17578                                                              
  17579          <xsl:with- param 
  17580           name="date String" 
  17581           select="n1 :effective Time/@valu e"
  17582          />
  17583                                                     
  17584         </xsl:call -template>
  17585                                                    
  17586         <xsl:if 
  17587          test="($da teFound) a nd not ($f ound)"
  17588         >
  17589                                                              
  17590          <xsl:text 
  17591           disable-ou tput-escap ing="yes"
  17592          >
  17593           &amp;nbsp; on&amp;nbs p; 
  17594          </xsl:text >
  17595                                                              
  17596          <xsl:value -of 
  17597           select="$d ateFound"
  17598          />
  17599                                                     
  17600         </xsl:if>
  17601                                                    
  17602         <xsl:if 
  17603          test="($da teFound) a nd ($found )"
  17604         >
  17605                                                              
  17606          <xsl:value -of 
  17607           select="$d ateFound"
  17608          />
  17609                                                     
  17610         </xsl:if>
  17611                                            
  17612        </xsl:othe rwise>
  17613                                  
  17614       </xsl:choo se>
  17615                        
  17616      </p>
  17617                       
  17618      <div 
  17619       id="TipBox
  17620       style="dis play:none; position:a bsolute;fo nt-size:12 px;font-we ight:bold; font-famil y:verdana; border:#72 B0E6 solid  1px;paddi ng:15px;co lor:black; background -color:#FF FFFF;"
  17621      >
  17622                                 
  17623       <xsl:text 
  17624        disable-ou tput-escap ing="yes"
  17625       >
  17626        &amp;nbsp;
  17627       </xsl:text >
  17628                        
  17629      </div>
  17630              
  17631     </xsl:temp late>
  17632    
  17633             
  17634     <!-- Aller gy table 
  17635             <x sl:templat e match="n 1:componen t/n1:secti on[n1:code /@code=$lo incAllergy Code]/n1:t ext/n1:tab le/n1:tbod y">
  17636                      <xsl :apply-tem plates>
  17637                               <xsl:s ort select ="n1:td[3] " order="d escending" />
  17638                      </xs l:apply-te mplates>
  17639             </ xsl:templa te>
  17640     -->
  17641             
  17642     <xsl:templ ate 
  17643      match="n1: component/ n1:section [n1:templa teId/@root ='2.16.840 .1.113883. IP          ']/n1:text /n1:table/ n1:tbody"
  17644     >
  17645                       
  17646      <xsl:apply -templates >
  17647                                 
  17648       <xsl:sort 
  17649        select="n1 :td[3]" 
  17650        order="des cending"
  17651       />
  17652                        
  17653      </xsl:appl y-template s>
  17654              
  17655     </xsl:temp late>
  17656    
  17657             
  17658     <xsl:templ ate 
  17659      match="n1: component/ n1:section [n1:templa teId/@root ='2.16.840 .1.113883. IP         ']/n1:text /n1:table/ n1:tbody"
  17660     >
  17661                       
  17662      <xsl:apply -templates >
  17663                                 
  17664       <xsl:sort 
  17665        select="n1 :td[5]" 
  17666        order="des cending"
  17667       />
  17668                        
  17669      </xsl:appl y-template s>
  17670              
  17671     </xsl:temp late>
  17672    
  17673             
  17674     <xsl:templ ate 
  17675      match="n1: component/ n1:section [n1:templa teId/@root ='2.16.840 .1.113883. IP          ' or n1:te mplateId/@ root='2.16 .840.1.113 883. IP          ' or n1:te mplateId/@ root='2.16 .840.1.113 883. IP         ' or n1:te mplateId/@ root='2.16 .840.1.113 883. IP         ']/n1:text /n1:table/ n1:tbody"
  17676     >
  17677                       
  17678      <xsl:apply -templates >
  17679                                 
  17680       <xsl:sort 
  17681        select="n1 :td[2]" 
  17682        order="des cending"
  17683       />
  17684                        
  17685      </xsl:appl y-template s>
  17686              
  17687     </xsl:temp late>
  17688    
  17689             
  17690     <xsl:templ ate 
  17691      match="n1: component/ n1:section [n1:templa teId/@root ='2.16.840 .1.113883. IP          ']/n1:text /n1:table/ n1:tbody/n 1:tr/n1:td [3]"
  17692     >
  17693                       
  17694      <td>
  17695                                 
  17696       <xsl:call- template 
  17697        name="form atDateShor t"
  17698       >
  17699                                           
  17700        <xsl:with- param 
  17701         name="date String"
  17702                                            
  17703         select="te xt()"
  17704        />
  17705                                  
  17706       </xsl:call -template>
  17707                        
  17708      </td>
  17709              
  17710     </xsl:temp late>
  17711    
  17712             
  17713     <xsl:templ ate 
  17714      match="n1: component/ n1:section [n1:templa teId/@root ='2.16.840 .1.113883. IP         ']/n1:text /n1:table/ n1:tbody/n 1:tr/n1:td [5]"
  17715     >
  17716                       
  17717      <td>
  17718                                 
  17719       <xsl:call- template 
  17720        name="form atDateShor t"
  17721       >
  17722                                           
  17723        <xsl:with- param 
  17724         name="date String"
  17725                                                     
  17726         select="te xt()"
  17727        />
  17728                                  
  17729       </xsl:call -template>
  17730                        
  17731      </td>
  17732              
  17733     </xsl:temp late>
  17734    
  17735             
  17736     <xsl:templ ate 
  17737      match="n1: component/ n1:section [n1:templa teId/@root ='2.16.840 .1.113883. IP          ' or n1:te mplateId/@ root='2.16 .840.1.113 883. IP          ' or n1:te mplateId/@ root='2.16 .840.1.113 883. IP         ' or n1:te mplateId/@ root='2.16 .840.1.113 883. IP         ']/n1:text /n1:table/ n1:tbody/n 1:tr/n1:td [2]"
  17738     >
  17739                       
  17740      <td>
  17741                                 
  17742       <xsl:call- template 
  17743        name="form atDateShor t"
  17744       >
  17745                                           
  17746        <xsl:with- param 
  17747         name="date String"
  17748                                                     
  17749         select="co ncat(subst ring(text( ),1,4),sub string(tex t(),6,2),s ubstring(t ext(),9,2) )"
  17750        />
  17751                                  
  17752       </xsl:call -template>
  17753                        
  17754      </td>
  17755              
  17756     </xsl:temp late>
  17757    
  17758             
  17759     <xsl:templ ate 
  17760      name="na"
  17761     >
  17762                       
  17763      <span 
  17764       title="Not  Available "
  17765      >
  17766                                 
  17767       <xsl:text>
  17768       </xsl:text >
  17769        
  17770       <!-- If bl ank from M DHT then b lank in st ylesheet - ->
  17771                        
  17772      </span>
  17773              
  17774     </xsl:temp late>
  17775    
  17776             
  17777     <!-- free  text proce ssing -->
  17778    
  17779             
  17780     <xsl:templ ate 
  17781      name="free Text"
  17782     >
  17783                       
  17784      <xsl:param  
  17785       name="text "
  17786      />
  17787     
  17788              
  17789     </xsl:temp late>
  17790    
  17791             
  17792     <xsl:templ ate 
  17793      name="disp lay1LineBr eak"
  17794     >
  17795                       
  17796      <br/>
  17797              
  17798     </xsl:temp late>
  17799    
  17800             
  17801     <xsl:templ ate 
  17802      name="disp layVitalsM ultiSepara tor"
  17803     >
  17804                       
  17805      <xsl:call- template 
  17806       name="disp lay1LineBr eak"
  17807      />
  17808              
  17809     </xsl:temp late>
  17810    
  17811             
  17812     <xsl:templ ate 
  17813      name="disp layVitalRo w"
  17814     >
  17815                       
  17816      <xsl:param  
  17817       name="row"
  17818      />
  17819                       
  17820      <tr 
  17821       class="sec ond"
  17822      >
  17823                                 
  17824       <xsl:call- template 
  17825        name="disp layVitalIt ems"
  17826       >
  17827                                           
  17828        <xsl:with- param 
  17829         name="row"  
  17830         select="$r ow"
  17831        />
  17832                                  
  17833       </xsl:call -template>
  17834                        
  17835      </tr>
  17836              
  17837     </xsl:temp late>
  17838    
  17839             
  17840     <xsl:templ ate 
  17841      name="disp layVitalsD ateItem"
  17842     >
  17843                       
  17844      <xsl:param  
  17845       name="rowD ata"
  17846      />
  17847                       
  17848      <td>
  17849                                 
  17850       <div 
  17851        style="ove rflow:hidd en; white- space:nowr ap; width: 80px;"
  17852       >
  17853                                           
  17854        <xsl:call- template 
  17855         name="disp layVitalsD ate"
  17856        >
  17857                                                    
  17858         <xsl:with- param 
  17859          name="rowD ata" 
  17860          select="$r owData"
  17861         />
  17862                                            
  17863        </xsl:call -template>
  17864                                  
  17865       </div>
  17866                        
  17867      </td>
  17868              
  17869     </xsl:temp late>
  17870    
  17871             
  17872     <xsl:templ ate 
  17873      name="disp layVitalsT empItem"
  17874     >
  17875                       
  17876      <xsl:param  
  17877       name="temp "
  17878      />
  17879                       
  17880      <td>
  17881                                 
  17882       <div 
  17883        style="ove rflow:hidd en; white- space:nowr ap; width: 70px;"
  17884       >
  17885                                           
  17886        <xsl:call- template 
  17887         name="disp layVitalsT emp"
  17888        >
  17889                                                    
  17890         <xsl:with- param 
  17891          name="temp
  17892          select="$t emp"
  17893         />
  17894                                            
  17895        </xsl:call -template>
  17896                                  
  17897       </div>
  17898                        
  17899      </td>
  17900              
  17901     </xsl:temp late>
  17902    
  17903             
  17904     <xsl:templ ate 
  17905      name="disp layVitalsS ourceItem"
  17906     >
  17907                       
  17908      <xsl:param  
  17909       name="row"
  17910      />
  17911                       
  17912      <td>
  17913                                 
  17914       <div 
  17915        style="ove rflow:hidd en; white- space:nowr ap; width: 150px;"
  17916       >
  17917                                           
  17918        <xsl:call- template 
  17919         name="disp layVitalsS ource"
  17920        >
  17921                                                    
  17922         <xsl:with- param 
  17923          name="row"  
  17924          select="$r ow"
  17925         />
  17926                                            
  17927        </xsl:call -template>
  17928                                  
  17929       </div>
  17930                        
  17931      </td>
  17932              
  17933     </xsl:temp late>
  17934    
  17935             
  17936     <xsl:templ ate 
  17937      name="disp layVitalsP oxItem"
  17938     >
  17939                       
  17940      <xsl:param  
  17941       name="pox"
  17942      />
  17943                       
  17944      <td>
  17945                                 
  17946       <div 
  17947        style="ove rflow:hidd en; white- space:nowr ap; width: 70px;"
  17948       >
  17949                                           
  17950        <xsl:call- template 
  17951         name="disp layVitalsP ox"
  17952        >
  17953                                                    
  17954         <xsl:with- param 
  17955          name="pox"  
  17956          select="$p ox"
  17957         />
  17958                                            
  17959        </xsl:call -template>
  17960                                  
  17961       </div>
  17962                        
  17963      </td>
  17964              
  17965     </xsl:temp late>
  17966    
  17967             
  17968     <xsl:templ ate 
  17969      name="disp layVitalsW eightItem"
  17970     >
  17971                       
  17972      <xsl:param  
  17973       name="weig ht"
  17974      />
  17975                       
  17976      <td>
  17977                                 
  17978       <div 
  17979        style="ove rflow:hidd en; white- space:nowr ap; width: 70px;"
  17980       >
  17981                                           
  17982        <xsl:call- template 
  17983         name="disp layVitalsW eight"
  17984        >
  17985                                                    
  17986         <xsl:with- param 
  17987          name="weig ht" 
  17988          select="$w eight"
  17989         />
  17990                                            
  17991        </xsl:call -template>
  17992                                  
  17993       </div>
  17994                        
  17995      </td>
  17996              
  17997     </xsl:temp late>
  17998    
  17999             
  18000     <xsl:templ ate 
  18001      name="disp layVitalsH eightItem"
  18002     >
  18003                       
  18004      <xsl:param  
  18005       name="heig ht"
  18006      />
  18007                       
  18008      <td>
  18009                                 
  18010       <div 
  18011        style="ove rflow:hidd en; white- space:nowr ap; width: 70px;"
  18012       >
  18013                                           
  18014        <xsl:call- template 
  18015         name="disp layVitalsH eight"
  18016        >
  18017                                                    
  18018         <xsl:with- param 
  18019          name="heig ht" 
  18020          select="$h eight"
  18021         />
  18022                                            
  18023        </xsl:call -template>
  18024                                  
  18025       </div>
  18026                        
  18027      </td>
  18028              
  18029     </xsl:temp late>
  18030    
  18031             
  18032     <xsl:templ ate 
  18033      name="disp layVitalsB pItem"
  18034     >
  18035                       
  18036      <xsl:param  
  18037       name="row"
  18038      />
  18039                       
  18040      <td>
  18041                                 
  18042       <div 
  18043        style="ove rflow:hidd en; white- space:nowr ap; width: 70px;"
  18044       >
  18045                                           
  18046        <xsl:call- template 
  18047         name="disp layVitalsB p"
  18048        >
  18049                                                    
  18050         <xsl:with- param 
  18051          name="row"  
  18052          select="$r ow"
  18053         />
  18054                                            
  18055        </xsl:call -template>
  18056                                  
  18057       </div>
  18058                        
  18059      </td>
  18060              
  18061     </xsl:temp late>
  18062    
  18063             
  18064     <xsl:templ ate 
  18065      name="disp layVitalsR espItem"
  18066     >
  18067                       
  18068      <xsl:param  
  18069       name="resp "
  18070      />
  18071                       
  18072      <td>
  18073                                 
  18074       <div 
  18075        style="ove rflow:hidd en; white- space:nowr ap; width: 70px;"
  18076       >
  18077                                           
  18078        <xsl:call- template 
  18079         name="disp layVitalsR esp"
  18080        >
  18081                                                    
  18082         <xsl:with- param 
  18083          name="resp
  18084          select="$r esp"
  18085         />
  18086                                            
  18087        </xsl:call -template>
  18088                                  
  18089       </div>
  18090                        
  18091      </td>
  18092              
  18093     </xsl:temp late>
  18094    
  18095             
  18096     <xsl:templ ate 
  18097      name="disp layVitalsP ulseItem"
  18098     >
  18099                       
  18100      <xsl:param  
  18101       name="puls e"
  18102      />
  18103                       
  18104      <td>
  18105                                 
  18106       <div 
  18107        style="ove rflow:hidd en; white- space:nowr ap; width: 70px;"
  18108       >
  18109                                           
  18110        <xsl:call- template 
  18111         name="disp layVitalsP ulse"
  18112        >
  18113                                                    
  18114         <xsl:with- param 
  18115          name="puls e" 
  18116          select="$p ulse"
  18117         />
  18118                                            
  18119        </xsl:call -template>
  18120                                  
  18121       </div>
  18122                        
  18123      </td>
  18124              
  18125     </xsl:temp late>
  18126    
  18127             
  18128     <xsl:templ ate 
  18129      name="getW eightResul t"
  18130     >
  18131                       
  18132      <xsl:param  
  18133       name="wt" 
  18134      />
  18135                       
  18136      <xsl:for-e ach 
  18137       select="$w t"
  18138      >
  18139                                 
  18140       <xsl:if 
  18141        test="posi tion()>1"
  18142       >
  18143                                           
  18144        <br/>
  18145                                  
  18146       </xsl:if>
  18147                                 
  18148       <xsl:choos e>
  18149                                           
  18150        <xsl:when 
  18151         test="stri ng-length( n1:value/@ value)>1"
  18152        >
  18153                                                    
  18154         <xsl:varia ble 
  18155          name="weig htResult" 
  18156          select="n1 :value/@va lue"
  18157         />
  18158                                                    
  18159         <xsl:choos e>
  18160                                                              
  18161          <xsl:when 
  18162           test="n1:v alue/@unit "
  18163          >
  18164                                                                        
  18165           <xsl:call- template 
  18166            name="flyo verSpan"
  18167           >
  18168                                                                                  
  18169            <xsl:with- param 
  18170             name="data
  18171             select="co ncat($weig htResult,n 1:value/@u nit)"
  18172            />
  18173                                                                                  
  18174            <xsl:with- param 
  18175             name="free Text" 
  18176             select="''
  18177            />
  18178                                                                                  
  18179            <xsl:with- param 
  18180             name="deSq uigglefy" 
  18181             select="''
  18182            />
  18183                                                                         
  18184           </xsl:call -template>
  18185                                                               
  18186          </xsl:when >
  18187                                                              
  18188          <xsl:other wise>
  18189                                                                        
  18190           <xsl:call- template 
  18191            name="flyo verSpan"
  18192           >
  18193                                                                                  
  18194            <xsl:with- param 
  18195             name="data
  18196             select="$w eightResul t"
  18197            />
  18198                                                                                  
  18199            <xsl:with- param 
  18200             name="free Text" 
  18201             select="''
  18202            />
  18203                                                                                  
  18204            <xsl:with- param 
  18205             name="deSq uigglefy" 
  18206             select="''
  18207            />
  18208                                                                         
  18209           </xsl:call -template>
  18210                                                               
  18211          </xsl:othe rwise>
  18212                                                     
  18213         </xsl:choo se>
  18214                                            
  18215        </xsl:when >
  18216                                           
  18217        <xsl:other wise>
  18218                                                    
  18219         <xsl:call- template 
  18220          name="na"
  18221         />
  18222                                            
  18223        </xsl:othe rwise>
  18224                                  
  18225       </xsl:choo se>
  18226                        
  18227      </xsl:for- each>
  18228     
  18229              
  18230     </xsl:temp late>
  18231    
  18232       
  18233     <xsl:templ ate 
  18234      name="form atNbCommen ts"
  18235     >
  18236              
  18237      <xsl:param  
  18238       name="titl e"
  18239      />
  18240          
  18241      <xsl:param  
  18242       name="comm ents"
  18243      />
  18244        
  18245      <div>
  18246           
  18247       <table 
  18248        class="com ments"
  18249       >
  18250              
  18251        <tbody>
  18252                 
  18253         <tr>
  18254                    
  18255          <td>
  18256                            
  18257           <xsl:choos e>
  18258                                      
  18259            <xsl:when 
  18260             test="$tit le"
  18261            >
  18262                                                
  18263             <xsl:value -of 
  18264              select="$t itle"
  18265             />
  18266             <xsl:text>
  18267             
  18268             </xsl:text >
  18269                                       
  18270            </xsl:when >
  18271                             
  18272           </xsl:choo se>
  18273                        
  18274           <xsl:value -of 
  18275            select="$c omments"
  18276           />
  18277                     
  18278          </td>
  18279                  
  18280         </tr>
  18281               
  18282        </tbody>
  18283            
  18284       </table>
  18285           
  18286       <br/>
  18287         
  18288      </div>
  18289        
  18290     </xsl:temp late>
  18291    
  18292       
  18293     <xsl:templ ate 
  18294      name="form atNarrativ eBlockComm ents"
  18295     >
  18296              
  18297      <xsl:param  
  18298       name="tabl e"
  18299      />
  18300              
  18301      <div>
  18302                        
  18303       <table 
  18304        class="com ments"
  18305       >
  18306                                  
  18307        <tbody>
  18308                                            
  18309         <xsl:for-e ach 
  18310          select="$t able/n1:th ead/n1:tr/ n1:th"
  18311         >
  18312                                                     
  18313          <tr 
  18314           class="fir st" 
  18315           align='lef t'
  18316          >
  18317           <b>
  18318            <xsl:value -of 
  18319             select="."
  18320            />
  18321           </b>
  18322          </tr>
  18323                                             
  18324         </xsl:for- each>
  18325                                            
  18326         <xsl:for-e ach 
  18327          select="$t able/n1:tb ody/n1:tr"
  18328         >
  18329                                                     
  18330          <tr 
  18331           class="sec ond"
  18332          >
  18333                                                               
  18334           <xsl:apply -templates  
  18335            select="./ n1:td"
  18336           />
  18337                                                      
  18338          </tr>
  18339                                             
  18340         </xsl:for- each>
  18341                                   
  18342        </tbody>
  18343                         
  18344       </table>
  18345               
  18346      </div>
  18347        
  18348     </xsl:temp late>
  18349    
  18350   </xsl:styl esheet>