300. EPMO Open Source Coordination Office Redaction File Detail Report

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

300.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\OldStyleSheets\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\OldStyleSheets\nhin cda2detail.xsl Mon Apr 3 14:39:53 2017 UTC

300.2 Comparison summary

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

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

300.4 Active regular expressions

No regular expressions were active.

300.5 Comparison detail

  1   <?xml 
  2     version="1 .0"
  3   ?>
  4   <xsl:style sheet 
  5     version="1 .0"
  6           
  7     xmlns:xsl= "http://ww w.w3.org/1 999/XSL/Tr ansform"
  8           
  9     xmlns:n3=" http://www .w3.org/19 99/xhtml"
  10           
  11     xmlns:n1=" urn:hl7-or g:v3"
  12           
  13     xmlns:n2=" urn:hl7-or g:v3/meta/ voc"
  14           
  15     xmlns:voc= "urn:hl7-o rg:v3/voc"
  16           
  17     xmlns:xsi= "http://ww w.w3.org/2 001/XMLSch ema-instan ce"
  18           
  19     xmlns:sect ion="urn:g ov.va.med"
  20           
  21     xmlns:msxs l="urn:sch emas-micro soft-com:x slt"
  22   >
  23    
  24             
  25     <xsl:impor
  26      href="cda2 detailComm on.xslt"
  27     />
  28             
  29     <xsl:impor
  30      href="deta ilCommon.x sl"
  31     />
  32             
  33     <xsl:impor
  34      href="../c ommon.xsl"
  35     />
  36             
  37     <xsl:outpu
  38      method="ht ml" 
  39      indent="ye s" 
  40      version="4 .01" 
  41      encoding=" ISO-8859-1 "
  42     />
  43    
  44             
  45     <xsl:templ ate 
  46      name="disp laySource"
  47     >
  48                       
  49      <head>
  50                                 
  51       <link 
  52        type="text /css" 
  53        href="reso urces/css/ nhin.css" 
  54        rel="style sheet"
  55       />
  56      
  57                                 
  58       <h2 
  59        align="cen ter"
  60       >
  61                                           
  62        <xsl:call- template 
  63         name="docu mentTitle"
  64        >
  65                                                    
  66         <xsl:with- param 
  67          name="root
  68          select="."
  69         />
  70                                            
  71        </xsl:call -template>
  72                                  
  73       </h2>
  74                        
  75      </head>
  76              
  77     </xsl:temp late>
  78    
  79             
  80     <xsl:templ ate 
  81      name="disp layTitle"
  82     >
  83                       
  84      <div 
  85       style="tex t-align:ce nter;"
  86      >
  87                                 
  88       <span 
  89        style="fon t-size:lar ger;font-w eight:bold "
  90       >
  91                                           
  92        <xsl:value -of 
  93         select="n1 :code/@dis playName"
  94        />
  95                                  
  96       </span>
  97                        
  98      </div>
  99              
  100     </xsl:temp late>
  101    
  102             
  103     <xsl:templ ate 
  104      name="disp layReportD ates"
  105     >
  106                       
  107      <b>
  108                                 
  109       <xsl:text>
  110        Created On
  111       </xsl:text >
  112                        
  113      </b>
  114                       
  115      <xsl:call- template 
  116       name="getC reatedOnDa te"
  117      />
  118                       
  119      <xsl:if 
  120       test="n1:d ocumentati onOf/n1:se rviceEvent /n1:perfor mer/n1:eff ectiveTime /n1:low/@v alue"
  121      >
  122                                 
  123       <xsl:text 
  124        disable-ou tput-escap ing="yes"
  125       >
  126        &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
  127       </xsl:text >
  128                                 
  129       <b>
  130                                           
  131        <xsl:text>
  132         Date Range
  133        </xsl:text >
  134                                  
  135       </b>
  136                                 
  137       <xsl:choos e>
  138                                           
  139        <xsl:when 
  140         test="stri ng-length( n1:documen tationOf/n 1:serviceE vent/n1:pe rformer/n1 :effective Time/n1:lo w/@value)= 0"
  141        >
  142                                                    
  143         <xsl:call- template 
  144          name="na"
  145         />
  146                                            
  147        </xsl:when >
  148                                           
  149        <xsl:when 
  150         test="star ts-with(n1 :documenta tionOf/n1: serviceEve nt/n1:perf ormer/n1:e ffectiveTi me/n1:low/ @value,' ' )"
  151        >
  152                                                    
  153         <xsl:call- template 
  154          name="na"
  155         />
  156                                            
  157        </xsl:when >
  158                                           
  159        <xsl:other wise>
  160                                                    
  161         <xsl:call- template 
  162          name="form atDateLong "
  163         >
  164                                                              
  165          <xsl:with- param 
  166           name="date String" 
  167           select="n1 :documenta tionOf/n1: serviceEve nt/n1:perf ormer/n1:e ffectiveTi me/n1:low/ @value"
  168          />
  169                                                     
  170         </xsl:call -template>
  171                                            
  172        </xsl:othe rwise>
  173                                  
  174       </xsl:choo se>
  175                                 
  176       <b>
  177                                           
  178        <xsl:text 
  179         disable-ou tput-escap ing="yes"
  180        >
  181          - 
  182        </xsl:text >
  183                                  
  184       </b>
  185                                 
  186       <xsl:choos e>
  187                                           
  188        <xsl:when 
  189         test="stri ng-length( n1:documen tationOf/n 1:serviceE vent/n1:pe rformer/n1 :effective Time/n1:hi gh/@value) =0"
  190        >
  191                                                    
  192         <xsl:call- template 
  193          name="na"
  194         />
  195                                            
  196        </xsl:when >
  197                                           
  198        <xsl:when 
  199         test="star ts-with(n1 :documenta tionOf/n1: serviceEve nt/n1:perf ormer/n1:e ffectiveTi me/n1:high /@value,'  ')"
  200        >
  201                                                    
  202         <xsl:call- template 
  203          name="na"
  204         />
  205                                            
  206        </xsl:when >
  207                                           
  208        <xsl:other wise>
  209                                                    
  210         <xsl:call- template 
  211          name="form atDateLong "
  212         >
  213                                                              
  214          <xsl:with- param 
  215           name="date String" 
  216           select="n1 :documenta tionOf/n1: serviceEve nt/n1:perf ormer/n1:e ffectiveTi me/n1:high /@value"
  217          />
  218                                                     
  219         </xsl:call -template>
  220                                            
  221        </xsl:othe rwise>
  222                                  
  223       </xsl:choo se>
  224                        
  225      </xsl:if>
  226              
  227     </xsl:temp late>
  228    
  229             
  230     <xsl:templ ate 
  231      name="disp layPatient Block"
  232     >
  233                       
  234      <table 
  235       width='100 %' 
  236       class="fir st"
  237      >
  238                                 
  239       <xsl:varia ble 
  240        name="pati entRole" 
  241        select="n1 :recordTar get/n1:pat ientRole"
  242       />
  243                                 
  244       <tr>
  245                                           
  246        <td 
  247         width='15%
  248         valign="to p"
  249        >
  250                                                    
  251         <b>
  252                                                              
  253          <xsl:text>
  254           Patient: 
  255          </xsl:text >
  256                                                     
  257         </b>
  258                                            
  259        </td>
  260                                           
  261        <td 
  262         width='35%
  263         valign="to p"
  264        >
  265                                                    
  266         <xsl:call- template 
  267          name="getN ame"
  268         >
  269                                                              
  270          <xsl:with- param 
  271           name="name
  272           select="$p atientRole /n1:patien t/n1:name"
  273          />
  274                                                     
  275         </xsl:call -template>
  276                                                    
  277         <xsl:if 
  278          test="$pat ientRole/n 1:addr"
  279         >
  280                                                              
  281          <xsl:call- template 
  282           name="getA ddress"
  283          >
  284                                                                        
  285           <xsl:with- param 
  286            name="addr
  287            select="$p atientRole /n1:addr"
  288           />
  289                                                               
  290          </xsl:call -template>
  291                                                     
  292         </xsl:if>
  293                                                    
  294         <xsl:choos e>
  295                                                              
  296          <xsl:when 
  297           test="$pat ientRole/n 1:telecom/ @value"
  298          >
  299                                                                        
  300           <xsl:for-e ach 
  301            select="$p atientRole /n1:teleco m"
  302           >
  303                                                                                  
  304            <xsl:call- template 
  305             name="getT elecom"
  306            >
  307                                                                                            
  308             <xsl:with- param 
  309              name="tele com" 
  310              select="."
  311             />
  312                                                                                   
  313            </xsl:call -template>
  314                                                                         
  315           </xsl:for- each>
  316                                                               
  317          </xsl:when >
  318                                                              
  319          <xsl:other wise>
  320                                                                        
  321           <br/>
  322                                                                        
  323           <b>
  324                                                                                  
  325            <xsl:text>
  326             tel: PATIE NT PHONE M ISSING
  327            </xsl:text >
  328                                                                         
  329           </b>
  330                                                               
  331          </xsl:othe rwise>
  332                                                     
  333         </xsl:choo se>
  334                                            
  335        </td>
  336                                           
  337        <td 
  338         width='15%
  339         align='rig ht' 
  340         valign="to p"
  341        >
  342                                                    
  343         <b>
  344                                                              
  345          <xsl:text>
  346           Patient ID
  347          </xsl:text >
  348                                                     
  349         </b>
  350                                            
  351        </td>
  352                                           
  353        <td 
  354         width='35%
  355         valign="to p"
  356        >
  357                                                    
  358         <xsl:if 
  359          test="stri ng-length( $patientRo le/n1:id/@ extension) >0"
  360         >
  361                                                              
  362          <xsl:value -of 
  363           select="$p atientRole /n1:id/@ex tension"
  364          />
  365                                                     
  366         </xsl:if>
  367                                            
  368        </td>
  369                                  
  370       </tr>
  371      
  372                                 
  373       <tr>
  374                                           
  375        <td 
  376         width='15%
  377         valign="to p"
  378        >
  379                                                    
  380         <b>
  381                                                              
  382          <xsl:text>
  383           Birthdate:  
  384          </xsl:text >
  385                                                     
  386         </b>
  387                                            
  388        </td>
  389                                           
  390        <td 
  391         width='35%
  392         valign="to p"
  393        >
  394                                                    
  395         <xsl:call- template 
  396          name="form atDateLong "
  397         >
  398                                                              
  399          <xsl:with- param 
  400           name="date String" 
  401           select="$p atientRole /n1:patien t/n1:birth Time/@valu e"
  402          />
  403                                                     
  404         </xsl:call -template>
  405                                            
  406        </td>
  407                                           
  408        <td 
  409         width='15%
  410         align='rig ht' 
  411         valign="to p"
  412        >
  413                                                    
  414         <b>
  415                                                              
  416          <xsl:text>
  417           Sex: 
  418          </xsl:text >
  419                                                     
  420         </b>
  421                                            
  422        </td>
  423                                           
  424        <td 
  425         width='35%
  426         valign="to p"
  427        >
  428                                                    
  429         <xsl:call- template 
  430          name="getG enderStrin g"
  431         />
  432                                            
  433        </td>
  434                                  
  435       </tr>
  436                                 
  437       <xsl:varia ble 
  438        name="hasL anguages"
  439       >
  440                                           
  441        <xsl:call- template 
  442         name="isLa nguageFoun d"
  443        >
  444                                                    
  445         <xsl:with- param 
  446          name="pati entRole" 
  447          select="$p atientRole "
  448         />
  449                                            
  450        </xsl:call -template>
  451                                  
  452       </xsl:vari able>
  453                                 
  454       <xsl:if 
  455        test="$has Languages"
  456       >
  457                                           
  458        <tr>
  459                                                    
  460         <td 
  461          width="15%
  462          valign="to p"
  463         >
  464                                                              
  465          <b>
  466                                                                        
  467           <xsl:text>
  468            Language(s ):
  469           </xsl:text >
  470                                                               
  471          </b>
  472                                                     
  473         </td>
  474                                                    
  475         <td 
  476          width="35%
  477          valign="to p"
  478         >
  479                                                     
  480          <xsl:call- template 
  481           name="disp layLanguag es"
  482          >
  483                                                               
  484           <xsl:with- param 
  485            name="pati entRole" 
  486            select="$p atientRole "
  487           />
  488                                                      
  489          </xsl:call -template>
  490                                                     
  491         </td>
  492                                                    
  493         <td 
  494          width="15%
  495          valign="to p"
  496         >
  497         </td>
  498                                                    
  499         <td 
  500          width="35%
  501          valign="to p"
  502         >
  503         </td>
  504                                            
  505        </tr>
  506                                  
  507       </xsl:if>
  508      
  509                        
  510      </table>
  511              
  512     </xsl:temp late>
  513    
  514             
  515     <xsl:templ ate 
  516      match="n1: languageCo de"
  517     >
  518                       
  519      <xsl:varia ble 
  520       name="code String"
  521      >
  522                                 
  523       <xsl:apply -templates  
  524        select="."  
  525        mode="data "
  526       />
  527                        
  528      </xsl:vari able>
  529                       
  530      <xsl:if 
  531       test="stri ng-length( normalize- space($cod eString))> 0"
  532      >
  533                                 
  534       <li>
  535                                           
  536        <xsl:value -of 
  537         select="$c odeString"
  538        />
  539                                  
  540       </li>
  541                        
  542      </xsl:if>
  543              
  544     </xsl:temp late>
  545             
  546             
  547     <xsl:templ ate 
  548      name="disp layAuthorB lock"
  549     >
  550                       
  551      <xsl:if 
  552       test="n1:a uthor"
  553      >
  554                                 
  555       <table 
  556        width="100 %" 
  557        class="sec ond"
  558       >
  559                                           
  560        <tr>
  561                                                    
  562         <td 
  563          width="15% "
  564         >
  565                                                              
  566          <b>
  567           Source:
  568          </b>
  569                                                     
  570         </td>
  571                                                    
  572         <td 
  573          width="85% "
  574         >
  575                                                              
  576          <xsl:value -of 
  577           select="n1 :author/n1 :assignedA uthor/n1:r epresented Organizati on/n1:name /text()"
  578          />
  579                                                     
  580         </td>
  581                                            
  582        </tr>
  583                                           
  584        <xsl:choos e>
  585                                                    
  586         <xsl:when 
  587          test="not( $isMVA)"
  588         >
  589                                                              
  590          <xsl:if 
  591           test="stri ng-length( normalize- space(n1:a uthor/n1:a ssignedAut hor/n1:ass ignedPerso n/n1:name) )>1"
  592          >
  593                                                                        
  594           <tr>
  595                                                                         
  596            <td 
  597             width="15%
  598             valign="to p"
  599            >
  600            </td>
  601                                                                         
  602            <td 
  603             width="85%
  604             valign="to p"
  605            >
  606                                                                                   Author :
  607                                                                                   
  608             <xsl:call- template 
  609              name="getP ersonNameF romRoot"
  610             >
  611                                                                                             
  612              <xsl:with- param 
  613               name="name Root" 
  614               select="n1 :author/n1 :assignedA uthor/n1:a ssignedPer son/n1:nam e"
  615              />
  616                                                                                    
  617             </xsl:call -template>
  618                                                                          
  619            </td>
  620                                                                         
  621           </tr>
  622                                                               
  623          </xsl:if>
  624                                                     
  625         </xsl:when >
  626                                            
  627        </xsl:choo se>
  628                                  
  629       </table>
  630                        
  631      </xsl:if>
  632              
  633     </xsl:temp late>
  634    
  635             
  636     <xsl:templ ate 
  637      name="disp layTableOf Contents"
  638     >
  639                       
  640      <div 
  641       style="mar gin-bottom :35px"
  642      >
  643                                 
  644       <h3>
  645                                           
  646        <a 
  647         name="toc"
  648        >
  649         Table of C ontents
  650        </a>
  651                                  
  652       </h3>
  653                                 
  654       <ul>
  655                                           
  656        <xsl:for-e ach 
  657         select="n1 :component /n1:struct uredBody/n 1:componen t/n1:secti on/n1:titl e"
  658        >
  659                                                    
  660         <xsl:sort/ >
  661                                                    
  662         <xsl:varia ble 
  663          name="comp Found"
  664         >
  665                                                              
  666          <xsl:call- template 
  667           name="comp onentFound "
  668          >
  669                                                                        
  670           <xsl:with- param 
  671            name="comp Section" 
  672            select=".. /."
  673           />
  674                                                               
  675          </xsl:call -template>
  676                                                     
  677         </xsl:vari able>
  678                                                    
  679         <xsl:choos e>
  680                                                              
  681          <xsl:when 
  682           test="stri ng-length( $compFound )>0"
  683          >
  684                                                                        
  685           <li>
  686                                                                                  
  687            <a 
  688             style="fon t-family:g eorgia;fon t-size:12p t"  
  689             href="#{ge nerate-id( .)}"
  690            >
  691                                                                                            
  692             <xsl:value -of 
  693              select="."
  694             />
  695                                                                                   
  696            </a>
  697                                                                         
  698           </li>
  699                                                               
  700          </xsl:when >
  701                                                     
  702         </xsl:choo se>
  703                                            
  704        </xsl:for- each>
  705                                  
  706       </ul>
  707                        
  708      </div>
  709              
  710     </xsl:temp late>
  711    
  712             
  713     <xsl:templ ate 
  714      name="disp layContent s"
  715     >
  716                       
  717      <xsl:apply -templates  
  718       select="n1 :component /n1:struct uredBody/n 1:componen t"
  719      >
  720                                 
  721       <xsl:sort 
  722        select="n1 :section/n 1:title"
  723       />
  724                        
  725      </xsl:appl y-template s>
  726                       
  727      <br>
  728      </br>
  729              
  730     </xsl:temp late>
  731    
  732             
  733     <xsl:templ ate 
  734      name="disp layContact InfoBlock"
  735     >
  736                       
  737      <xsl:choos e>
  738                                 
  739       <xsl:when 
  740        test="stri ng-length( n1:partici pant[@type Code='IND' ]/n1:assoc iatedEntit y[@classCo de='NOK']) >0"
  741       >
  742                                           
  743        <table 
  744         class="fir st"
  745        >
  746                                                    
  747         <tr>
  748                                                              
  749          <td 
  750           width="100 px" 
  751           valign="to p" 
  752           align='lef t'
  753          >
  754                                                                        
  755           <b>
  756            Emergency  Contact: 
  757           </b>
  758                                                               
  759          </td>
  760                                                              
  761          <td 
  762           valign="to p"
  763          >
  764                                                                        
  765           <xsl:call- template 
  766            name="getP articipant "
  767           >
  768                                                                                  
  769            <xsl:with- param 
  770             name="part icipant" 
  771             select="n1 :participa nt[@typeCo de='IND']/ n1:associa tedEntity[ @classCode ='NOK']"
  772            />
  773                                                                         
  774           </xsl:call -template>
  775                                                               
  776          </td>
  777                                                              
  778          <td 
  779           width="50p x"
  780          >
  781            
  782          </td>
  783                                                     
  784         </tr>
  785                                            
  786        </table>
  787                                  
  788       </xsl:when >
  789                                 
  790       <xsl:when 
  791        test="stri ng-length( n1:partici pant[@type Code='IND' ]/n1:assoc iatedEntit y[@classCo de='ECON'] )>0"
  792       >
  793                                           
  794        <table 
  795         class="fir st"
  796        >
  797                                                    
  798         <tr>
  799                                                              
  800          <td 
  801           width="100 px" 
  802           valign="to p" 
  803           align='lef t'
  804          >
  805                                                                        
  806           <b>
  807            Emergency  Contact: 
  808           </b>
  809                                                               
  810          </td>
  811                                                              
  812          <td 
  813           valign="to p"
  814          >
  815                                                                        
  816           <xsl:call- template 
  817            name="getP articipant "
  818           >
  819                                                                                  
  820            <xsl:with- param 
  821             name="part icipant" 
  822             select="n1 :participa nt[@typeCo de='IND']/ n1:associa tedEntity[ @classCode ='ECON']"
  823            />
  824                                                                         
  825           </xsl:call -template>
  826                                                               
  827          </td>
  828                                                              
  829          <td 
  830           width="50p x"
  831          >
  832            
  833          </td>
  834                                                     
  835         </tr>
  836                                            
  837        </table>
  838                                  
  839       </xsl:when >
  840                                 
  841       <xsl:other wise>
  842                                           
  843        <xsl:text 
  844         disable-ou tput-escap ing="yes"
  845        >
  846         &amp;nbsp;
  847        </xsl:text >
  848                                           
  849        <span 
  850         style="fon t-weight:b old; borde r:2px soli d;"
  851        >
  852                                                    
  853         <xsl:text>
  854           EMERGENCY  CONTACT I NFO MISSIN G! 
  855         </xsl:text >
  856                                            
  857        </span>
  858                                  
  859       </xsl:othe rwise>
  860                        
  861      </xsl:choo se>
  862              
  863     </xsl:temp late>
  864    
  865             
  866     <xsl:templ ate 
  867      name="getP articipant "
  868     >
  869                       
  870      <xsl:param  
  871       name="part icipant"
  872      />
  873                       
  874      <p>
  875                                 
  876       <xsl:call- template 
  877        name="getN ame"
  878       >
  879                                           
  880        <xsl:with- param 
  881         name="name
  882         select="$p articipant /n1:associ atedPerson /n1:name"
  883        />
  884                                  
  885       </xsl:call -template>
  886                                 
  887       <xsl:if 
  888        test="$par ticipant/n 1:addr"
  889       >
  890                                           
  891        <xsl:choos e>
  892                                                    
  893         <xsl:when 
  894          test="$isK aiser"
  895         >
  896                                                              
  897          <xsl:call- template 
  898           name="getS ingleAddre ss"
  899          >
  900                                                                        
  901           <xsl:with- param 
  902            name="addr
  903            select="$p articipant /n1:addr"
  904           />
  905                                                               
  906          </xsl:call -template>
  907                                                     
  908         </xsl:when >
  909                                                    
  910         <xsl:other wise>
  911                                                              
  912          <xsl:call- template 
  913           name="getA ddress"
  914          >
  915                                                                        
  916           <xsl:with- param 
  917            name="addr
  918            select="$p articipant /n1:addr"
  919           />
  920                                                               
  921          </xsl:call -template>
  922                                                     
  923         </xsl:othe rwise>
  924                                            
  925        </xsl:choo se>
  926                                  
  927       </xsl:if>
  928                                 
  929       <xsl:choos e>
  930                                           
  931        <xsl:when 
  932         test="$par ticipant/n 1:telecom/ @value"
  933        >
  934                                                    
  935         <xsl:for-e ach 
  936          select="$p articipant /n1:teleco m"
  937         >
  938                                                              
  939          <xsl:call- template 
  940           name="getT elecom"
  941          >
  942                                                                        
  943           <xsl:with- param 
  944            name="tele com" 
  945            select="."
  946           />
  947                                                               
  948          </xsl:call -template>
  949                                                     
  950         </xsl:for- each>
  951                                            
  952        </xsl:when >
  953                                           
  954        <xsl:other wise>
  955                                                    
  956         <br/>
  957                                                    
  958         <b>
  959                                                              
  960          <xsl:text>
  961           tel: CONTA CT PHONE M ISSING
  962          </xsl:text >
  963                                                     
  964         </b>
  965                                            
  966        </xsl:othe rwise>
  967                                  
  968       </xsl:choo se>
  969                                 
  970       <xsl:if 
  971        test="$par ticipant/n 1:code/n1: originalTe xt"
  972       >
  973                                           
  974        <br/>
  975                                           
  976        <b>
  977         Relationsh ip: 
  978        </b>
  979                                           
  980        <xsl:value -of 
  981         select="$p articipant /n1:code/n 1:original Text"
  982        />
  983                                  
  984       </xsl:if>
  985                        
  986      </p>
  987              
  988     </xsl:temp late>
  989    
  990             
  991     <xsl:templ ate 
  992      name="getS ingleAddre ss"
  993     >
  994                       
  995      <xsl:param  
  996       name="addr "
  997      />
  998                       
  999      <xsl:if 
  1000       test="$add r/n1:stree tAddressLi ne != ' '"
  1001      >
  1002                                 
  1003       <br/>
  1004                                 
  1005       <xsl:if 
  1006        test="stri ng-length( $addr/n1:s treetAddre ssLine)>0"
  1007       >
  1008                                           
  1009        <xsl:value -of 
  1010         select="$a ddr/n1:str eetAddress Line"
  1011        />
  1012                                  
  1013       </xsl:if>
  1014      
  1015                                 
  1016       <br/>
  1017                                 
  1018       <xsl:value -of 
  1019        select="$a ddr/n1:cit y"
  1020       />
  1021       ,
  1022                                 
  1023       <xsl:value -of 
  1024        select="$a ddr/n1:sta te"
  1025       />
  1026       ,
  1027                                 
  1028       <xsl:value -of 
  1029        select="$a ddr/n1:pos talCode"
  1030       />
  1031                        
  1032      </xsl:if>
  1033              
  1034     </xsl:temp late>
  1035    
  1036             
  1037     <xsl:templ ate 
  1038      name="getA ddress"
  1039     >
  1040                       
  1041      <xsl:param  
  1042       name="addr "
  1043      />
  1044                       
  1045      <xsl:if 
  1046       test="$add r/n1:stree tAddressLi ne != ' '"
  1047      >
  1048                                 
  1049       <xsl:for-e ach 
  1050        select="$a ddr/n1:str eetAddress Line"
  1051       >
  1052                                           
  1053        <br/>
  1054                                           
  1055        <xsl:if 
  1056         test="stri ng-length( $addr/n1:s treetAddre ssLine)>0"
  1057        >
  1058                                                    
  1059         <xsl:value -of 
  1060          select="."
  1061         />
  1062                                            
  1063        </xsl:if>
  1064                                  
  1065       </xsl:for- each>
  1066                        
  1067      </xsl:if>
  1068                       
  1069      <br/>
  1070                       
  1071      <xsl:value -of 
  1072       select="$a ddr/n1:cit y"
  1073      />
  1074      ,
  1075                       
  1076      <xsl:value -of 
  1077       select="$a ddr/n1:sta te"
  1078      />
  1079      ,
  1080                       
  1081      <xsl:value -of 
  1082       select="$a ddr/n1:pos talCode"
  1083      />
  1084              
  1085     </xsl:temp late>
  1086    
  1087             
  1088     <xsl:templ ate 
  1089      name="getT elecom"
  1090     >
  1091                       
  1092      <xsl:param  
  1093       name="tele com"
  1094      />
  1095                       
  1096      <br/>
  1097                       
  1098      <xsl:if 
  1099       test="stri ng-length( $telecom/@ value)>0"
  1100      >
  1101                                 
  1102       <xsl:value -of 
  1103        select="$t elecom/@va lue"
  1104       />
  1105                                 
  1106       <xsl:choos e>
  1107                                           
  1108        <xsl:when 
  1109         test="./@u se='HP' "
  1110        >
  1111                                                    
  1112         <b>
  1113                                                              
  1114          <xsl:text>
  1115            Home
  1116          </xsl:text >
  1117                                                     
  1118         </b>
  1119                                            
  1120        </xsl:when >
  1121                                           
  1122        <xsl:when 
  1123         test="./@u se='WP' "
  1124        >
  1125                                                    
  1126         <b>
  1127                                                              
  1128          <xsl:text>
  1129            Work
  1130          </xsl:text >
  1131                                                     
  1132         </b>
  1133                                            
  1134        </xsl:when >
  1135                                           
  1136        <xsl:when 
  1137         test="./@u se='HV' "
  1138        >
  1139                                                    
  1140         <b>
  1141                                                              
  1142          <xsl:text>
  1143            Vacation
  1144          </xsl:text >
  1145                                                     
  1146         </b>
  1147                                            
  1148        </xsl:when >
  1149                                           
  1150        <xsl:when 
  1151         test="./@u se='MC' "
  1152        >
  1153                                                    
  1154         <b>
  1155                                                              
  1156          <xsl:text>
  1157            Mobile
  1158          </xsl:text >
  1159                                                     
  1160         </b>
  1161                                            
  1162        </xsl:when >
  1163                                           
  1164        <xsl:other wise>
  1165                                                    
  1166         <b>
  1167                                                              
  1168          <xsl:text>
  1169          </xsl:text >
  1170                                                     
  1171         </b>
  1172                                            
  1173        </xsl:othe rwise>
  1174                                  
  1175       </xsl:choo se>
  1176                        
  1177      </xsl:if>
  1178              
  1179     </xsl:temp late>
  1180    
  1181             
  1182     <!-- Get A uthor  -->
  1183             
  1184     <xsl:templ ate 
  1185      name="getA uthor"
  1186     >
  1187                       
  1188      <xsl:varia ble 
  1189       name="auth or"
  1190      />
  1191                       
  1192      <xsl:call- template 
  1193       name="getN ame"
  1194      >
  1195                                 
  1196       <xsl:with- param 
  1197        name="name
  1198        select="n1 :author/n1 :assignedA uthor/n1:a ssignedPer son/n1:nam e"
  1199       />
  1200                        
  1201      </xsl:call -template>
  1202                       
  1203      <xsl:choos e>
  1204                                 
  1205       <xsl:when 
  1206        test="$aut hor"
  1207       >
  1208                                           
  1209        <xsl:value -of 
  1210         select="n1 :author/n1 :assignedA uthor/n1:a ssignedPer son/n1:nam e"
  1211        />
  1212                                  
  1213       </xsl:when >
  1214                        
  1215      </xsl:choo se>
  1216              
  1217     </xsl:temp late>
  1218    
  1219             
  1220     <!-- Struc turedBody  -->
  1221    
  1222             
  1223     <!-- Compo nent/Secti on -->
  1224             
  1225     <xsl:templ ate 
  1226      match="n1: component/ n1:section "
  1227     >
  1228                       
  1229      <xsl:apply -templates  
  1230       select="n1 :title"
  1231      />
  1232                       
  1233      <xsl:choos e>
  1234                                 
  1235       <xsl:when 
  1236        test="n1:c ode[@code= $loincProb lemCode]"
  1237       >
  1238                                           
  1239        <xsl:call- template 
  1240         name="getC ommonForma tComments"
  1241        />
  1242                                           
  1243        <xsl:call- template 
  1244         name="prob lemDetails "
  1245        >
  1246                                                    
  1247         <xsl:with- param 
  1248          select="."  
  1249          name="sect ion"
  1250         />
  1251                                            
  1252        </xsl:call -template>
  1253                                  
  1254       </xsl:when >
  1255                                 
  1256       <xsl:when 
  1257        test="n1:c ode[@code= $loincAlle rgyCode]"
  1258       >
  1259                                           
  1260        <xsl:call- template 
  1261         name="getC ommonForma tComments"
  1262        />
  1263                                           
  1264        <xsl:call- template 
  1265         name="alle rgyDetails "
  1266        >
  1267                                                    
  1268         <xsl:with- param 
  1269          select="."  
  1270          name="sect ion"
  1271         />
  1272                                            
  1273        </xsl:call -template>
  1274                                  
  1275       </xsl:when >
  1276                                 
  1277       <xsl:when 
  1278        test="n1:c ode[@code= $loincMedC ode]"
  1279       >
  1280                                           
  1281        <xsl:call- template 
  1282         name="getC ommonForma tComments"
  1283        />
  1284                                           
  1285        <xsl:call- template 
  1286         name="medD etails"
  1287        >
  1288                                                    
  1289         <xsl:with- param 
  1290          select="."  
  1291          name="sect ion"
  1292         />
  1293                                            
  1294        </xsl:call -template>
  1295                                  
  1296       </xsl:when >
  1297                                 
  1298       <xsl:when 
  1299        test="n1:c ode[@code= $loincEnco unterCode] "
  1300       >
  1301                                           
  1302        <xsl:call- template 
  1303         name="enco unterNotic e"
  1304        >
  1305                                                    
  1306         <xsl:with- param 
  1307          select="."  
  1308          name="sect ion"
  1309         />
  1310                                            
  1311        </xsl:call -template>
  1312                                           
  1313        <xsl:call- template 
  1314         name="enco unterDetai ls"
  1315        >
  1316                                                    
  1317         <xsl:with- param 
  1318          select="."  
  1319          name="sect ion"
  1320         />
  1321                                            
  1322        </xsl:call -template>
  1323                                  
  1324       </xsl:when >
  1325                                 
  1326       <xsl:when 
  1327        test="n1:c ode[@code= $loincResu ltsCode]"
  1328       >
  1329                                           
  1330        <xsl:call- template 
  1331         name="getC ommonForma tComments"
  1332        />
  1333                                           
  1334        <xsl:call- template 
  1335         name="resu ltsDetails "
  1336        >
  1337                                                    
  1338         <xsl:with- param 
  1339          select="."  
  1340          name="sect ion"
  1341         />
  1342                                            
  1343        </xsl:call -template>
  1344                                  
  1345       </xsl:when >
  1346                                 
  1347       <xsl:when 
  1348        test="n1:c ode[@code= $loincProc eduresCode ]"
  1349       >
  1350                                           
  1351        <xsl:call- template 
  1352         name="proc eduresNoti ce"
  1353        >
  1354                                                    
  1355         <xsl:with- param 
  1356          select="."  
  1357          name="sect ion"
  1358         />
  1359                                            
  1360        </xsl:call -template>
  1361                                           
  1362        <xsl:call- template 
  1363         name="proc eduresDeta ils"
  1364        >
  1365                                                    
  1366         <xsl:with- param 
  1367          select="."  
  1368          name="sect ion"
  1369         />
  1370                                            
  1371        </xsl:call -template>
  1372                                  
  1373       </xsl:when >
  1374                                 
  1375       <xsl:when 
  1376        test="n1:c ode[@code= $loincImmu nizationsC ode]"
  1377       >
  1378                                           
  1379        <xsl:call- template 
  1380         name="getC ommonForma tComments"
  1381        />
  1382                                           
  1383        <xsl:call- template 
  1384         name="immu nizationsD etails"
  1385        >
  1386                                                    
  1387         <xsl:with- param 
  1388          select="."  
  1389          name="sect ion"
  1390         />
  1391                                            
  1392        </xsl:call -template>
  1393                                  
  1394       </xsl:when >
  1395                                 
  1396       <xsl:when 
  1397        test="n1:c ode[@code= $loincVita lsCode]"
  1398       >
  1399                                           
  1400        <xsl:call- template 
  1401         name="getC ommonForma tComments"
  1402        />
  1403                                           
  1404        <xsl:call- template 
  1405         name="vita lsDetails"
  1406        >
  1407                                                    
  1408         <xsl:with- param 
  1409          select="."  
  1410          name="sect ion"
  1411         />
  1412                                            
  1413        </xsl:call -template>
  1414                                  
  1415       </xsl:when >
  1416      
  1417                                 
  1418       <xsl:other wise/>
  1419                        
  1420      </xsl:choo se>
  1421              
  1422     </xsl:temp late>
  1423    
  1424    
  1425             
  1426     <!-- Encou nter Detai l Section- ->
  1427             
  1428     <xsl:templ ate 
  1429      name="enco unterDetai ls"
  1430     >
  1431                       
  1432      <xsl:param  
  1433       name="sect ion"
  1434      />
  1435                       
  1436      <table 
  1437       border="1"  
  1438       style="fon t-size:14p x;"
  1439      >
  1440                                 
  1441       <thead>
  1442                                           
  1443        <tr>
  1444                                                    
  1445         <th 
  1446          class="fir st"
  1447         >
  1448                                                              
  1449          <xsl:text>
  1450           Date/Time
  1451          </xsl:text >
  1452                                                              
  1453          <xsl:if 
  1454           test="n1:e ntry/n1:en counter"
  1455          >
  1456                                                                        
  1457           <xsl:text>
  1458             - Count (
  1459           </xsl:text >
  1460                                                                        
  1461           <xsl:value -of 
  1462            select="co unt(n1:ent ry/n1:enco unter)"
  1463           />
  1464                                                                        
  1465           <xsl:text>
  1466            )
  1467           </xsl:text >
  1468                                                               
  1469          </xsl:if>
  1470                                                     
  1471         </th>
  1472                                                    
  1473         <th 
  1474          class="fir st"
  1475         >
  1476          Encounter  Type
  1477         </th>
  1478                                                    
  1479         <th 
  1480          class="fir st"
  1481         >
  1482          Encounter  Comments
  1483         </th>
  1484                                                    
  1485         <th 
  1486          class="fir st"
  1487         >
  1488          Provider
  1489         </th>
  1490                                            
  1491        </tr>
  1492                                  
  1493       </thead>
  1494                                 
  1495       <tbody>
  1496                                           
  1497        <xsl:apply -templates  
  1498         select="$s ection/n1: entry"
  1499        >
  1500                                                    
  1501         <xsl:sort 
  1502          select="n1 :encounter /n1:effect iveTime/n1 :low/@valu e" 
  1503          order="des cending"
  1504         />
  1505                                            
  1506        </xsl:appl y-template s>
  1507                                  
  1508       </tbody>
  1509                        
  1510      </table>
  1511                       
  1512      <br>
  1513      </br>
  1514                       
  1515      <xsl:choos e>
  1516                                 
  1517       <xsl:when 
  1518        test="not( boolean(n1 :entry/n1: encounter) )"
  1519       >
  1520                                           
  1521        <xsl:call- template 
  1522         name="noDa ta"
  1523        />
  1524                                  
  1525       </xsl:when >
  1526                                 
  1527       <xsl:other wise>
  1528                                           
  1529        <br>
  1530        </br>
  1531                                  
  1532       </xsl:othe rwise>
  1533                        
  1534      </xsl:choo se>
  1535              
  1536     </xsl:temp late>
  1537    
  1538             
  1539     <!-- Meds  Detail Sec tion -->
  1540             
  1541     <xsl:templ ate 
  1542      name="medD etails"
  1543     >
  1544                       
  1545      <xsl:param  
  1546       name="sect ion"
  1547      />
  1548                       
  1549      <table 
  1550       border="1"  
  1551       style="fon t-size:14p x"
  1552      >
  1553                                 
  1554       <thead>
  1555                                           
  1556        <tr>
  1557                                                    
  1558         <th 
  1559          class="fir st"
  1560         >
  1561                                                              
  1562          <xsl:text>
  1563           Medication s
  1564          </xsl:text >
  1565                                                              
  1566          <xsl:if 
  1567           test="n1:e ntry/n1:su bstanceAdm inistratio n"
  1568          >
  1569                                                                        
  1570           <xsl:text>
  1571             - Count (
  1572           </xsl:text >
  1573                                                                        
  1574           <xsl:value -of 
  1575            select="co unt(n1:ent ry/n1:subs tanceAdmin istration) "
  1576           />
  1577                                                                        
  1578           <xsl:text>
  1579            )
  1580           </xsl:text >
  1581                                                               
  1582          </xsl:if>
  1583                                                     
  1584         </th>
  1585                                                    
  1586         <!--<th cl ass="first ">Route</t h>-->
  1587                                                    
  1588         <!--<th cl ass="first ">Interval </th>-->
  1589                                                    
  1590         <th 
  1591          class="fir st"
  1592         >
  1593          Status
  1594         </th>
  1595                                                    
  1596         <th 
  1597          class="fir st"
  1598         >
  1599          Quantity
  1600         </th>
  1601                                                    
  1602         <th 
  1603          class="fir st"
  1604         >
  1605          Order Expi ration
  1606         </th>
  1607                                                    
  1608         <th 
  1609          class="fir st"
  1610         >
  1611          Provider
  1612         </th>
  1613                                                    
  1614         <th 
  1615          class="fir st"
  1616         >
  1617          Prescripti on #
  1618         </th>
  1619                                                    
  1620         <th 
  1621          class="fir st"
  1622         >
  1623          Dispense D ate
  1624         </th>
  1625                                                    
  1626         <th 
  1627          class="fir st"
  1628         >
  1629          Sig
  1630         </th>
  1631                                                    
  1632         <th 
  1633          class="fir st"
  1634         >
  1635          Source
  1636         </th>
  1637                                            
  1638        </tr>
  1639                                  
  1640       </thead>
  1641                                 
  1642       <tbody>
  1643                                           
  1644        <xsl:choos e>
  1645                                                    
  1646         <xsl:when 
  1647          test="$sec tion/n1:en try/n1:sub stanceAdmi nistration /n1:effect iveTime/n1 :high"
  1648         >
  1649                                                              
  1650          <xsl:apply -templates  
  1651           select="$s ection/n1: entry"
  1652          >
  1653                                                                        
  1654           <xsl:sort 
  1655            select="$s ection/n1: entry/n1:s ubstanceAd ministrati on/n1:effe ctiveTime/ n1:high/@v alue"
  1656           />
  1657                                                               
  1658          </xsl:appl y-template s>
  1659                                                     
  1660         </xsl:when >
  1661                                                    
  1662         <xsl:other wise>
  1663                                                              
  1664          <xsl:apply -templates  
  1665           select="$s ection/n1: entry"
  1666          >
  1667                                                                        
  1668           <xsl:sort 
  1669            select="$s ection/n1: entry/n1:s ubstanceAd ministrati on/n1:entr yRelations hip/n1:sup ply/n1:eff ectiveTime /@value"
  1670           />
  1671                                                               
  1672          </xsl:appl y-template s>
  1673                                                     
  1674         </xsl:othe rwise>
  1675                                            
  1676        </xsl:choo se>
  1677                                  
  1678       </tbody>
  1679                        
  1680      </table>
  1681                       
  1682      <br>
  1683      </br>
  1684                       
  1685      <xsl:choos e>
  1686                                 
  1687       <xsl:when 
  1688        test="not( boolean(n1 :entry/n1: substanceA dministrat ion))"
  1689       >
  1690                                           
  1691        <xsl:call- template 
  1692         name="noDa ta"
  1693        />
  1694                                           
  1695        <br>
  1696        </br>
  1697                                  
  1698       </xsl:when >
  1699                                 
  1700       <xsl:other wise>
  1701                                           
  1702        <br>
  1703        </br>
  1704                                  
  1705       </xsl:othe rwise>
  1706                        
  1707      </xsl:choo se>
  1708              
  1709     </xsl:temp late>
  1710    
  1711             
  1712     <!-- Probl em Detail  Section -- >
  1713             
  1714     <xsl:templ ate 
  1715      name="prob lemDetails "
  1716     >
  1717                       
  1718      <xsl:param  
  1719       name="sect ion"
  1720      />
  1721                       
  1722      <table 
  1723       border="1"  
  1724       style="fon t-size:14p x"
  1725      >
  1726                                 
  1727       <thead>
  1728                                           
  1729        <tr>
  1730                                                    
  1731         <th 
  1732          class="fir st"
  1733         >
  1734                                                              
  1735          <xsl:text>
  1736           Problems
  1737          </xsl:text >
  1738                                                              
  1739          <xsl:if 
  1740           test="n1:e ntry/n1:ac t/n1:entry Relationsh ip[@typeCo de='SUBJ'] /n1:observ ation"
  1741          >
  1742                                                                        
  1743           <xsl:text>
  1744             - Count (
  1745           </xsl:text >
  1746                                                                        
  1747           <xsl:value -of 
  1748            select="co unt(n1:ent ry/n1:act/ n1:entryRe lationship [@typeCode ='SUBJ']/n 1:observat ion)"
  1749           />
  1750                                                                        
  1751           <xsl:text>
  1752            )
  1753           </xsl:text >
  1754                                                               
  1755          </xsl:if>
  1756                                                     
  1757         </th>
  1758                                                    
  1759         <th 
  1760          class="fir st"
  1761         >
  1762          Status
  1763         </th>
  1764                                                    
  1765         <th 
  1766          class="fir st"
  1767         >
  1768          Problem Co de
  1769         </th>
  1770                                                    
  1771         <th 
  1772          class="fir st"
  1773         >
  1774          Date of On set
  1775         </th>
  1776                                                    
  1777         <th 
  1778          class="fir st"
  1779         >
  1780          Provider
  1781         </th>
  1782                                                    
  1783         <th 
  1784          class="fir st"
  1785         >
  1786          Source
  1787         </th>
  1788                                            
  1789        </tr>
  1790       
  1791                                  
  1792       </thead>
  1793                                 
  1794       <tbody>
  1795                                           
  1796        <xsl:choos e>
  1797                                                    
  1798         <xsl:when 
  1799          test="$sec tion/n1:en try/n1:act /n1:entryR elationshi p/n1:obser vation/n1: effectiveT ime/n1:low "
  1800         >
  1801                                                              
  1802          <xsl:apply -templates  
  1803           select="$s ection/n1: entry"
  1804          >
  1805                                                                        
  1806           <xsl:sort 
  1807            select="n1 :act/n1:en tryRelatio nship/n1:o bservation /n1:effect iveTime/n1 :low/@valu e" 
  1808            order="des cending"
  1809           />
  1810                                                               
  1811          </xsl:appl y-template s>
  1812                                                     
  1813         </xsl:when >
  1814                                                    
  1815         <xsl:other wise>
  1816                                                              
  1817          <xsl:apply -templates  
  1818           select="$s ection/n1: entry"
  1819          >
  1820                                                                        
  1821           <xsl:sort 
  1822            select="n1 :act/n1:ef fectiveTim e/n1:low/@ value" 
  1823            order="des cending"
  1824           />
  1825                                                               
  1826          </xsl:appl y-template s>
  1827                                                     
  1828         </xsl:othe rwise>
  1829                                            
  1830        </xsl:choo se>
  1831                                  
  1832       </tbody>
  1833                        
  1834      </table>
  1835                       
  1836      <br>
  1837      </br>
  1838                       
  1839      <xsl:choos e>
  1840                                 
  1841       <xsl:when 
  1842        test="not( boolean(n1 :entry/n1: act/n1:ent ryRelation ship[@type Code='SUBJ ']/n1:obse rvation))"
  1843       >
  1844                                           
  1845        <xsl:call- template 
  1846         name="noDa ta"
  1847        />
  1848                                  
  1849       </xsl:when >
  1850                                 
  1851       <xsl:other wise>
  1852                                           
  1853        <br>
  1854        </br>
  1855                                  
  1856       </xsl:othe rwise>
  1857                        
  1858      </xsl:choo se>
  1859              
  1860     </xsl:temp late>
  1861    
  1862             
  1863     <!-- Aller gy Detail  Section -- >
  1864             
  1865     <xsl:templ ate 
  1866      name="alle rgyDetails "
  1867     >
  1868                       
  1869      <xsl:param  
  1870       name="sect ion"
  1871      />
  1872                       
  1873      <table 
  1874       border="1"  
  1875       style="fon t-size:14p x"
  1876      >
  1877                                 
  1878       <thead>
  1879                                           
  1880        <tr>
  1881                                                    
  1882         <th 
  1883          class="fir st"
  1884         >
  1885                                                              
  1886          <xsl:text>
  1887           Allergens
  1888          </xsl:text >
  1889                                                              
  1890          <xsl:if 
  1891           test="n1:e ntry/n1:ac t/n1:entry Relationsh ip/n1:obse rvation"
  1892          >
  1893                                                                        
  1894           <xsl:text>
  1895             - Count (
  1896           </xsl:text >
  1897                                                                        
  1898           <xsl:value -of 
  1899            select="co unt(n1:ent ry/n1:act/ n1:entryRe lationship /n1:observ ation)"
  1900           />
  1901                                                                        
  1902           <xsl:text>
  1903            )
  1904           </xsl:text >
  1905                                                               
  1906          </xsl:if>
  1907                                                     
  1908         </th>
  1909                                                    
  1910         <th 
  1911          class="fir st"
  1912         >
  1913          Verificati on Date
  1914         </th>
  1915                                                    
  1916         <th 
  1917          class="fir st"
  1918         >
  1919          Event Type
  1920         </th>
  1921                                                    
  1922         <th 
  1923          class="fir st"
  1924         >
  1925          Reaction
  1926         </th>
  1927                                                    
  1928         <th 
  1929          class="fir st"
  1930         >
  1931          Severity
  1932         </th>
  1933                                                    
  1934         <th 
  1935          class="fir st"
  1936         >
  1937          Source
  1938         </th>
  1939                                            
  1940        </tr>
  1941                                  
  1942       </thead>
  1943                                 
  1944       <tbody>
  1945                                           
  1946        <xsl:choos e>
  1947                                                    
  1948         <xsl:when 
  1949          test="$sec tion/n1:en try/n1:act /n1:entryR elationshi p/n1:obser vation/n1: effectiveT ime/n1:low "
  1950         >
  1951                                                              
  1952          <xsl:apply -templates  
  1953           select="$s ection/n1: entry"
  1954          >
  1955                                                                        
  1956           <xsl:sort 
  1957            select="n1 :act/n1:en tryRelatio nship/n1:o bservation /n1:effect iveTime/n1 :low/@valu e" 
  1958            order="des cending"
  1959           />
  1960                                                               
  1961          </xsl:appl y-template s>
  1962                                                     
  1963         </xsl:when >
  1964                                                    
  1965         <xsl:other wise>
  1966                                                              
  1967          <xsl:apply -templates  
  1968           select="$s ection/n1: entry"
  1969          >
  1970                                                                        
  1971           <xsl:sort 
  1972            select="n1 :act/n1:ef fectiveTim e/n1:low/@ value" 
  1973            order="des cending"
  1974           />
  1975                                                               
  1976          </xsl:appl y-template s>
  1977                                                     
  1978         </xsl:othe rwise>
  1979                                            
  1980        </xsl:choo se>
  1981                                  
  1982       </tbody>
  1983                        
  1984      </table>
  1985                       
  1986      <br>
  1987      </br>
  1988                       
  1989      <xsl:choos e>
  1990                                 
  1991       <xsl:when 
  1992        test="not( boolean(n1 :entry/n1: act/n1:ent ryRelation ship/n1:ob servation) )"
  1993       >
  1994                                           
  1995        <xsl:call- template 
  1996         name="noDa ta"
  1997        />
  1998                                  
  1999       </xsl:when >
  2000                                 
  2001       <xsl:other wise>
  2002                                           
  2003        <br>
  2004        </br>
  2005                                  
  2006       </xsl:othe rwise>
  2007                        
  2008      </xsl:choo se>
  2009              
  2010     </xsl:temp late>
  2011    
  2012             
  2013     <!-- (Lab) Results De tail Secti on-->
  2014             
  2015     <xsl:templ ate 
  2016      name="resu ltsDetails "
  2017     >
  2018                       
  2019      <xsl:param  
  2020       name="sect ion"
  2021      />
  2022                       
  2023      <table 
  2024       border="1"  
  2025       style="fon t-size:14p x"
  2026      >
  2027                                 
  2028       <thead>
  2029                                           
  2030        <tr>
  2031                                                    
  2032         <th 
  2033          class="fir st"
  2034         >
  2035                                                              
  2036          <xsl:text>
  2037           Date/Time
  2038          </xsl:text >
  2039                                                              
  2040          <xsl:choos e>
  2041                                                                        
  2042           <xsl:when 
  2043            test="n1:e ntry/n1:or ganizer/n1 :component /n1:observ ation and  not(boolea n(n1:entry /n1:observ ation))"
  2044           >
  2045                                                                                  
  2046            <xsl:text>
  2047              - Count (
  2048            </xsl:text >
  2049                                                                                  
  2050            <xsl:value -of 
  2051             select="co unt(n1:ent ry/n1:orga nizer/n1:c omponent)"
  2052            />
  2053                                                                                  
  2054            <xsl:text>
  2055             )
  2056            </xsl:text >
  2057                                                                         
  2058           </xsl:when >
  2059                                                                        
  2060           <xsl:when 
  2061            test="n1:e ntry/n1:or ganizer/n1 :component /n1:observ ation and  n1:entry/n 1:observat ion"
  2062           >
  2063                                                                                  
  2064            <xsl:text>
  2065              - Count (
  2066            </xsl:text >
  2067                                                                                  
  2068            <xsl:value -of 
  2069             select="co unt(n1:ent ry/n1:orga nizer/n1:c omponent)+ count(n1:e ntry/n1:ob servation) "
  2070            />
  2071                                                                                  
  2072            <xsl:text>
  2073             )
  2074            </xsl:text >
  2075                                                                         
  2076           </xsl:when >
  2077                                                                        
  2078           <xsl:other wise>
  2079                                                                                  
  2080            <xsl:if 
  2081             test="n1:e ntry/n1:ob servation"
  2082            >
  2083                                                                                            
  2084             <xsl:text>
  2085               - Count (
  2086             </xsl:text >
  2087                                                                                            
  2088             <xsl:value -of 
  2089              select="co unt(n1:ent ry/n1:obse rvation)"
  2090             />
  2091                                                                                            
  2092             <xsl:text>
  2093              )
  2094             </xsl:text >
  2095                                                                                   
  2096            </xsl:if>
  2097                                                                         
  2098           </xsl:othe rwise>
  2099                                                               
  2100          </xsl:choo se>
  2101                                                     
  2102         </th>
  2103                                                    
  2104         <th 
  2105          class="fir st"
  2106         >
  2107          Result Typ e
  2108         </th>
  2109                                                    
  2110         <th 
  2111          class="fir st"
  2112         >
  2113          Source
  2114         </th>
  2115                                                    
  2116         <th 
  2117          class="fir st"
  2118         >
  2119          Result - U nit
  2120         </th>
  2121                                                    
  2122         <th 
  2123          class="fir st"
  2124         >
  2125          Interpreta tion
  2126         </th>
  2127                                                    
  2128         <th 
  2129          class="fir st"
  2130         >
  2131          Reference  Range
  2132         </th>
  2133                                                    
  2134         <th 
  2135          class="fir st"
  2136         >
  2137          Status
  2138         </th>
  2139                                            
  2140        </tr>
  2141                                  
  2142       </thead>
  2143                                 
  2144       <tbody>
  2145                                           
  2146        <xsl:choos e>
  2147                                                    
  2148         <xsl:when 
  2149          test="n1:o bservation /n1:effect iveTime/@v alue"
  2150         >
  2151                                                              
  2152          <xsl:apply -templates  
  2153           select="$s ection/n1: entry"
  2154          >
  2155                                                                        
  2156           <xsl:sort 
  2157            select="n1 :observati on/n1:effe ctiveTime/ @value" 
  2158            order="des cending"
  2159           />
  2160                                                               
  2161          </xsl:appl y-template s>
  2162                                                     
  2163         </xsl:when >
  2164                                                    
  2165         <xsl:other wise>
  2166                                                              
  2167          <xsl:apply -templates  
  2168           select="$s ection/n1: entry"
  2169          >
  2170                                                                        
  2171           <xsl:sort 
  2172            select="n1 :organizer /n1:compon ent/n1:obs ervation/n 1:effectiv eTime/@val ue" 
  2173            order="des cending"
  2174           />
  2175                                                               
  2176          </xsl:appl y-template s>
  2177                                                     
  2178         </xsl:othe rwise>
  2179                                            
  2180        </xsl:choo se>
  2181                                  
  2182       </tbody>
  2183                        
  2184      </table>
  2185                       
  2186      <br>
  2187      </br>
  2188                       
  2189      <xsl:choos e>
  2190                                 
  2191       <xsl:when 
  2192        test="not( boolean(n1 :entry/n1: observatio n)) and no t(boolean( n1:entry/n 1:organize r/n1:compo nent/n1:ob servation[ @classCode ='OBS' and  @moodCode ='EVN']))"
  2193       >
  2194                                           
  2195        <xsl:call- template 
  2196         name="noDa ta"
  2197        />
  2198                                  
  2199       </xsl:when >
  2200                                 
  2201       <xsl:other wise>
  2202                                           
  2203        <br>
  2204        </br>
  2205                                  
  2206       </xsl:othe rwise>
  2207                        
  2208      </xsl:choo se>
  2209              
  2210     </xsl:temp late>
  2211    
  2212             
  2213     <!-- Proce dures Deta il Section -->
  2214             
  2215     <xsl:templ ate 
  2216      name="proc eduresDeta ils"
  2217     >
  2218                       
  2219      <xsl:param  
  2220       name="sect ion"
  2221      />
  2222                       
  2223      <table 
  2224       border="1"  
  2225       style="fon t-size:14p x"
  2226      >
  2227                                 
  2228       <thead>
  2229                                           
  2230        <tr>
  2231                                                    
  2232         <th 
  2233          class="fir st"
  2234         >
  2235                                                              
  2236          <xsl:text>
  2237           Date/Time
  2238          </xsl:text >
  2239                                                              
  2240          <xsl:if 
  2241           test="n1:e ntry/n1:pr ocedure"
  2242          >
  2243                                                                        
  2244           <xsl:text>
  2245             - Count (
  2246           </xsl:text >
  2247                                                                        
  2248           <xsl:value -of 
  2249            select="co unt(n1:ent ry/n1:proc edure)"
  2250           />
  2251                                                                        
  2252           <xsl:text>
  2253            )
  2254           </xsl:text >
  2255                                                               
  2256          </xsl:if>
  2257                                                     
  2258         </th>
  2259                                                    
  2260         <th 
  2261          class="fir st"
  2262         >
  2263          Procedure  Type
  2264         </th>
  2265                                                    
  2266         <th 
  2267          class="fir st"
  2268         >
  2269          Procedure  Comments
  2270         </th>
  2271                                                    
  2272         <th 
  2273          class="fir st"
  2274         >
  2275          Provider
  2276         </th>
  2277                                            
  2278        </tr>
  2279                                  
  2280       </thead>
  2281                                 
  2282       <tbody>
  2283                                           
  2284        <xsl:apply -templates  
  2285         select="$s ection/n1: entry"
  2286        >
  2287                                                    
  2288         <xsl:sort 
  2289          select="n1 :procedure /n1:effect iveTime/n1 :low/@valu e" 
  2290          order="des cending"
  2291         />
  2292                                            
  2293        </xsl:appl y-template s>
  2294                                  
  2295       </tbody>
  2296                        
  2297      </table>
  2298                       
  2299      <br>
  2300      </br>
  2301                       
  2302      <xsl:choos e>
  2303                                 
  2304       <xsl:when 
  2305        test="not( boolean(n1 :entry/n1: procedure) )"
  2306       >
  2307                                           
  2308        <xsl:call- template 
  2309         name="noDa ta"
  2310        />
  2311                                  
  2312       </xsl:when >
  2313                                 
  2314       <xsl:other wise>
  2315                                           
  2316        <br>
  2317        </br>
  2318                                  
  2319       </xsl:othe rwise>
  2320                        
  2321      </xsl:choo se>
  2322              
  2323     </xsl:temp late>
  2324    
  2325             
  2326     <!-- Immun izations D etail Sect ion -->
  2327             
  2328     <xsl:templ ate 
  2329      name="immu nizationsD etails"
  2330     >
  2331                       
  2332      <xsl:param  
  2333       name="sect ion"
  2334      />
  2335                       
  2336      <table 
  2337       border="1"  
  2338       style="fon t-size:14p x"
  2339      >
  2340                                 
  2341       <thead>
  2342                                           
  2343        <tr>
  2344                                                    
  2345         <th 
  2346          class="fir st"
  2347         >
  2348                                                              
  2349          <xsl:text>
  2350           Immunizati ons
  2351          </xsl:text >
  2352                                                              
  2353          <xsl:if 
  2354           test="n1:e ntry/n1:su bstanceAdm inistratio n"
  2355          >
  2356                                                                        
  2357           <xsl:text>
  2358             - Count (
  2359           </xsl:text >
  2360                                                                        
  2361           <xsl:value -of 
  2362            select="co unt(n1:ent ry/n1:subs tanceAdmin istration) "
  2363           />
  2364                                                                        
  2365           <xsl:text>
  2366            )
  2367           </xsl:text >
  2368                                                               
  2369          </xsl:if>
  2370                                                     
  2371         </th>
  2372                                                    
  2373         <th 
  2374          class="fir st"
  2375         >
  2376          Series
  2377         </th>
  2378                                                    
  2379         <th 
  2380          class="fir st"
  2381         >
  2382          Date Issue d
  2383         </th>
  2384                                                    
  2385         <th 
  2386          class="fir st"
  2387         >
  2388          Reaction
  2389         </th>
  2390                                                    
  2391         <th 
  2392          class="fir st"
  2393         >
  2394          Comments
  2395         </th>
  2396                                            
  2397        </tr>
  2398                                  
  2399       </thead>
  2400                                 
  2401       <tbody>
  2402                                           
  2403        <xsl:apply -templates  
  2404         select="$s ection/n1: entry"
  2405        >
  2406                                                    
  2407         <xsl:sort 
  2408          select="n1 :substance Administra tion/n1:ef fectiveTim e/@value" 
  2409          order="des cending"
  2410         />
  2411                                            
  2412        </xsl:appl y-template s>
  2413                                  
  2414       </tbody>
  2415                        
  2416      </table>
  2417                       
  2418      <br>
  2419      </br>
  2420                       
  2421      <br>
  2422      </br>
  2423              
  2424     </xsl:temp late>
  2425    
  2426             
  2427     <!-- Vital s Detail S ection -->
  2428             
  2429     <xsl:templ ate 
  2430      name="vita lsDetails"
  2431     >
  2432                       
  2433      <xsl:param  
  2434       name="sect ion"
  2435      />
  2436                       
  2437      <table 
  2438       border="1"  
  2439       style="fon t-size:14p x"
  2440      >
  2441                                 
  2442       <thead>
  2443                                           
  2444        <tr>
  2445                                                    
  2446         <th 
  2447          class="fir st"
  2448         >
  2449                                                              
  2450          <xsl:text>
  2451           Date
  2452          </xsl:text >
  2453                                                              
  2454          <xsl:if 
  2455           test="n1:e ntry/n1:or ganizer"
  2456          >
  2457                                                                        
  2458           <xsl:text>
  2459             - Count (
  2460           </xsl:text >
  2461                                                                        
  2462           <xsl:value -of 
  2463            select="co unt(n1:ent ry/n1:orga nizer)"
  2464           />
  2465                                                                        
  2466           <xsl:text>
  2467            )
  2468           </xsl:text >
  2469                                                               
  2470          </xsl:if>
  2471                                                     
  2472         </th>
  2473                                                    
  2474         <th 
  2475          class="fir st"
  2476         >
  2477          TEMP
  2478         </th>
  2479                                                    
  2480         <th 
  2481          class="fir st"
  2482         >
  2483          PULSE
  2484         </th>
  2485                                                    
  2486         <th 
  2487          class="fir st"
  2488         >
  2489          RESP
  2490         </th>
  2491                                                    
  2492         <th 
  2493          class="fir st"
  2494         >
  2495          BP
  2496         </th>
  2497                                                    
  2498         <th 
  2499          class="fir st"
  2500         >
  2501          Ht
  2502         </th>
  2503                                                    
  2504         <th 
  2505          class="fir st"
  2506         >
  2507          HT-Lying
  2508         </th>
  2509                                                    
  2510         <th 
  2511          class="fir st"
  2512         >
  2513          Wt
  2514         </th>
  2515                                                    
  2516         <th 
  2517          class="fir st"
  2518         >
  2519          POx
  2520         </th>
  2521                                                    
  2522         <th 
  2523          class="fir st"
  2524         >
  2525          OCF
  2526         </th>
  2527                                                    
  2528         <th 
  2529          class="fir st"
  2530         >
  2531          Source
  2532         </th>                              
  2533                                            
  2534        </tr>
  2535                                  
  2536       </thead>
  2537                                 
  2538       <tbody>
  2539                                           
  2540        <xsl:apply -templates  
  2541         select="$s ection/n1: entry"
  2542        >
  2543                                                    
  2544         <xsl:sort 
  2545          select="n1 :organizer /n1:compon ent/n1:obs ervation/n 1:effectiv eTime/@val ue" 
  2546          order="des cending"
  2547         />
  2548                                            
  2549        </xsl:appl y-template s>
  2550                                           
  2551        <br/>
  2552                                  
  2553       </tbody>
  2554                        
  2555      </table>
  2556                       
  2557      <br>
  2558      </br>
  2559                       
  2560      <br>
  2561      </br>
  2562              
  2563     </xsl:temp late>
  2564    
  2565             
  2566     <!-- Encou nter row e ntry -->
  2567             
  2568     <xsl:templ ate 
  2569      name="encR ow"
  2570     >
  2571                       
  2572      <xsl:param  
  2573       name="row"
  2574      />
  2575                       
  2576      <tr 
  2577       class="sec ond"
  2578      >
  2579      
  2580                                 
  2581       <!-- Encou nter Date/ Time-->
  2582                                 
  2583       <td>
  2584                                           
  2585        <div 
  2586         style="ove rflow:hidd en; white- space:nowr ap; width: auto;"
  2587        >
  2588                                                    
  2589         <xsl:choos e>
  2590                                                              
  2591          <xsl:when 
  2592           test="$row /n1:encoun ter/n1:eff ectiveTime /n1:low/@v alue"
  2593          >
  2594                                                                        
  2595           <xsl:call- template 
  2596            name="form atDateShor t"
  2597           >
  2598                                                                                  
  2599            <xsl:with- param 
  2600             name="date String" 
  2601             select="$r ow/n1:enco unter/n1:e ffectiveTi me/n1:low/ @value"
  2602            />
  2603                                                                         
  2604           </xsl:call -template>
  2605                                                               
  2606          </xsl:when >
  2607                                                              
  2608          <xsl:when 
  2609           test="$row /n1:encoun ter/n1:eff ectiveTime /@value"
  2610          >
  2611                                                                        
  2612           <xsl:call- template 
  2613            name="form atDateShor t"
  2614           >
  2615                                                                                  
  2616            <xsl:with- param 
  2617             name="date String" 
  2618             select="$r ow/n1:enco unter/n1:e ffectiveTi me/@value"
  2619            />
  2620                                                                         
  2621           </xsl:call -template>
  2622                                                               
  2623          </xsl:when >
  2624                                                              
  2625          <xsl:other wise>
  2626                                                                        
  2627           <xsl:call- template 
  2628            name="na"
  2629           />
  2630                                                               
  2631          </xsl:othe rwise>
  2632                                                     
  2633         </xsl:choo se>
  2634                                            
  2635        </div>
  2636                                  
  2637       </td>
  2638      
  2639                                 
  2640       <!-- Encou nter Type   -->
  2641                                 
  2642       <td>
  2643                                           
  2644        <div 
  2645         style="ove rflow:hidd en; white- space:nowr ap; width: auto;"
  2646        >
  2647                                                    
  2648         <xsl:varia ble 
  2649          name="type Result"
  2650         >
  2651                                                              
  2652          <xsl:call- template 
  2653           name="getE ncounterTy pe"
  2654          >
  2655                                                                        
  2656           <xsl:with- param 
  2657            name="enco unter" 
  2658            select="$r ow/n1:enco unter"
  2659           />
  2660                                                               
  2661          </xsl:call -template>
  2662                                                     
  2663         </xsl:vari able>
  2664                                                    
  2665         <xsl:choos e>
  2666                                                              
  2667          <xsl:when 
  2668           test="stri ng-length( $typeResul t)>0"
  2669          >
  2670                                                                        
  2671           <xsl:call- template 
  2672            name="flyo verSpan"
  2673           >
  2674                                                                                  
  2675            <xsl:with- param 
  2676             name="data
  2677             select="$t ypeResult"
  2678            />
  2679                                                                         
  2680           </xsl:call -template>
  2681                                                               
  2682          </xsl:when >
  2683                                                              
  2684          <xsl:other wise>
  2685                                                                        
  2686           <xsl:call- template 
  2687            name="na"
  2688           />
  2689                                                               
  2690          </xsl:othe rwise>
  2691                                                     
  2692         </xsl:choo se>
  2693        
  2694                                            
  2695        </div>
  2696                                  
  2697       </td>
  2698      
  2699                                 
  2700       <!-- Encou nter Free  Text -->
  2701                                 
  2702       <td>
  2703                                           
  2704        <div 
  2705         style="ove rflow:hidd en; white- space:nowr ap; width: 360px;heig ht:1em"
  2706        >
  2707                                                    
  2708         <xsl:varia ble 
  2709          name="encF reeText"
  2710         >
  2711                                                              
  2712          <xsl:call- template 
  2713           name="ltri m"
  2714          >
  2715                                                                        
  2716           <xsl:with- param 
  2717            name="text "
  2718           >
  2719                                                                                  
  2720            <xsl:call- template 
  2721             name="getE ncounterFr eeText"
  2722            >
  2723                                                                                            
  2724             <xsl:with- param 
  2725              name="enco unter" 
  2726              select="$r ow/n1:enco unter"
  2727             />
  2728                                                                                   
  2729            </xsl:call -template>
  2730                                                                         
  2731           </xsl:with -param>
  2732                                                                        
  2733           <xsl:with- param 
  2734            name="star tChar" 
  2735            select="'~ '"
  2736           />
  2737                                                               
  2738          </xsl:call -template>
  2739                                                     
  2740         </xsl:vari able>
  2741                                                    
  2742         <xsl:choos e>
  2743                                                              
  2744          <xsl:when 
  2745           test="stri ng-length( $encFreeTe xt)>1"
  2746          >
  2747                                                                        
  2748           <xsl:call- template 
  2749            name="flyo verSpan"
  2750           >
  2751                                                                                  
  2752            <xsl:with- param 
  2753             name="data
  2754             select="$e ncFreeText "
  2755            />
  2756                                                                                  
  2757            <xsl:with- param 
  2758             name="free Text" 
  2759             select="'y es'"
  2760            />
  2761                                                                                  
  2762            <xsl:with- param 
  2763             name="deSq uigglefy" 
  2764             select="'y es'"
  2765            />
  2766                                                                         
  2767           </xsl:call -template>
  2768                                                               
  2769          </xsl:when >
  2770                                                              
  2771          <xsl:other wise>
  2772                                                                        
  2773           <xsl:call- template 
  2774            name="na"
  2775           />
  2776                                                               
  2777          </xsl:othe rwise>
  2778                                                     
  2779         </xsl:choo se>
  2780                                            
  2781        </div>
  2782                                  
  2783       </td>
  2784      
  2785                                 
  2786       <!-- Encou nter Provi der-->
  2787                                 
  2788       <td>
  2789                                           
  2790        <div 
  2791         style="ove rflow:hidd en; white- space:nowr ap; width: 160px;"
  2792        >
  2793                                                    
  2794         <xsl:varia ble 
  2795          name="encP rovider"
  2796         >
  2797                                                              
  2798          <xsl:call- template 
  2799           name="getE ncounterPr ovider"
  2800          >
  2801                                                                        
  2802           <xsl:with- param 
  2803            name="enco unter" 
  2804            select="$r ow/n1:enco unter"
  2805           />
  2806                                                               
  2807          </xsl:call -template>
  2808                                                     
  2809         </xsl:vari able>
  2810                                                    
  2811         <xsl:choos e>
  2812                                                              
  2813          <xsl:when 
  2814           test="stri ng-length( $encProvid er)>1"
  2815          >
  2816                                                                        
  2817           <xsl:call- template 
  2818            name="flyo verSpan"
  2819           >
  2820                                                                                  
  2821            <xsl:with- param 
  2822             name="data
  2823             select="$e ncProvider "
  2824            />
  2825                                                                         
  2826           </xsl:call -template>
  2827                                                               
  2828          </xsl:when >
  2829                                                              
  2830          <xsl:other wise>
  2831                                                                        
  2832           <xsl:call- template 
  2833            name="na"
  2834           />
  2835                                                               
  2836          </xsl:othe rwise>
  2837                                                     
  2838         </xsl:choo se>
  2839                                            
  2840        </div>
  2841                                  
  2842       </td>
  2843                        
  2844      </tr>
  2845              
  2846     </xsl:temp late>
  2847    
  2848             
  2849     <xsl:templ ate 
  2850      name="medR ow"
  2851     >
  2852                       
  2853      <xsl:param  
  2854       name="row"
  2855      />
  2856                       
  2857      <tr 
  2858       class="sec ond"
  2859      >
  2860                                 
  2861       <!-- Name  -->
  2862                                 
  2863       <td>
  2864                                           
  2865        <div 
  2866         style="ove rflow:hidd en; white- space:nowr ap; width: 180px;"
  2867        >
  2868                                                    
  2869         <xsl:call- template 
  2870          name="flyo verSpan"
  2871         >
  2872                                                              
  2873          <xsl:with- param 
  2874           name="data "
  2875          >
  2876                                                                        
  2877           <xsl:call- template 
  2878            name="getM edicationN ame"
  2879           >
  2880                                                                                  
  2881            <xsl:with- param 
  2882             name="row"  
  2883             select="$r ow"
  2884            />
  2885                                                                         
  2886           </xsl:call -template>
  2887                                                               
  2888          </xsl:with -param>
  2889                                                     
  2890         </xsl:call -template>
  2891                                            
  2892        </div>
  2893                                  
  2894       </td>
  2895      
  2896                                 
  2897       <!-- Statu s -->
  2898                                 
  2899       <td>
  2900                                           
  2901        <div 
  2902         style="ove rflow:hidd en; white- space:nowr ap; width: 80px;"
  2903        >
  2904                                                    
  2905         <xsl:varia ble 
  2906          name="medS tat"
  2907         >
  2908                                                              
  2909          <xsl:call- template 
  2910           name="medS tatus"
  2911          >
  2912                                                                        
  2913           <xsl:with- param 
  2914            name="subs tanceAdmin
  2915            select="$r ow/n1:subs tanceAdmin istration"
  2916           />
  2917                                                               
  2918          </xsl:call -template>
  2919                                                     
  2920         </xsl:vari able>
  2921                                                    
  2922         <xsl:choos e>
  2923                                                              
  2924          <xsl:when 
  2925           test="stri ng-length( $medStat)> 1"
  2926          >
  2927                                                                        
  2928           <xsl:call- template 
  2929            name="flyo verSpan"
  2930           >
  2931                                                                                  
  2932            <xsl:with- param 
  2933             name="data
  2934             select="$m edStat"
  2935            />
  2936                                                                         
  2937           </xsl:call -template>
  2938                                                               
  2939          </xsl:when >
  2940                                                              
  2941          <xsl:other wise>
  2942                                                                        
  2943           <xsl:call- template 
  2944            name="na"
  2945           />
  2946                                                               
  2947          </xsl:othe rwise>
  2948                                                     
  2949         </xsl:choo se>
  2950                                            
  2951        </div>
  2952                                  
  2953       </td>
  2954      
  2955                                 
  2956       <!-- Quant ity -->
  2957                                 
  2958       <td>
  2959                                           
  2960        <div 
  2961         style="ove rflow:hidd en; white- space:nowr ap; width: 40px;"
  2962        >
  2963                                                    
  2964         <xsl:call- template 
  2965          name="medQ uantity"
  2966         >
  2967                                                              
  2968          <xsl:with- param 
  2969           name="subs tanceAdmin
  2970           select="$r ow/n1:subs tanceAdmin istration"
  2971          />
  2972                                                     
  2973         </xsl:call -template>
  2974                                            
  2975        </div>
  2976                                  
  2977       </td>
  2978      
  2979                                 
  2980       <!-- Order  Expiratio n Date/Tim e -->
  2981                                 
  2982       <td>
  2983                                           
  2984        <div 
  2985         style="ove rflow:hidd en; white- space:nowr ap; width: 80px;"
  2986        >
  2987                                                    
  2988         <xsl:call- template 
  2989          name="medE xpiretime"
  2990         >
  2991                                                              
  2992          <xsl:with- param 
  2993           name="subs tanceAdmin
  2994           select="$r ow/n1:subs tanceAdmin istration"
  2995          />
  2996                                                     
  2997         </xsl:call -template>
  2998                                            
  2999        </div>
  3000                                  
  3001       </td>
  3002      
  3003                                 
  3004       <!-- Provi der -->
  3005                                 
  3006       <td>
  3007                                           
  3008        <div 
  3009         style="ove rflow:hidd en; white- space:nowr ap; width: 140px;"
  3010        >
  3011                                                    
  3012         <xsl:varia ble 
  3013          name="medP rovider"
  3014         >
  3015                                                              
  3016          <xsl:call- template 
  3017           name="getM edProvider "
  3018          >
  3019                                                                        
  3020           <xsl:with- param 
  3021            name="subs tanceAdmin
  3022            select="$r ow/n1:subs tanceAdmin istration"
  3023           />
  3024                                                               
  3025          </xsl:call -template>
  3026                                                     
  3027         </xsl:vari able>
  3028                                                    
  3029         <xsl:choos e>
  3030                                                              
  3031          <xsl:when 
  3032           test="stri ng-length( $medProvid er)>1"
  3033          >
  3034                                                                        
  3035           <xsl:call- template 
  3036            name="flyo verSpan"
  3037           >
  3038                                                                                  
  3039            <xsl:with- param 
  3040             name="data
  3041             select="$m edProvider "
  3042            />
  3043                                                                         
  3044           </xsl:call -template>
  3045                                                               
  3046          </xsl:when >
  3047                                                              
  3048          <xsl:other wise>
  3049                                                                        
  3050           <xsl:call- template 
  3051            name="na"
  3052           />
  3053                                                               
  3054          </xsl:othe rwise>
  3055                                                     
  3056         </xsl:choo se>
  3057                                            
  3058        </div>
  3059                                  
  3060       </td>
  3061      
  3062                                 
  3063       <!-- Presc ription ID  (Nbr) -->
  3064                                 
  3065       <td>
  3066                                           
  3067        <div 
  3068         style="ove rflow:hidd en; white- space:nowr ap; width: 80px;"
  3069        >
  3070                                                    
  3071         <xsl:varia ble 
  3072          name="rxNu m"
  3073         >
  3074                                                              
  3075          <xsl:call- template 
  3076           name="getR xNumString "
  3077          >
  3078                                                                        
  3079           <xsl:with- param 
  3080            name="subs tanceAdmin
  3081            select="$r ow/n1:subs tanceAdmin istration"
  3082           />
  3083                                                               
  3084          </xsl:call -template>
  3085                                                     
  3086         </xsl:vari able>
  3087                                                    
  3088         <xsl:choos e>
  3089                                                              
  3090          <xsl:when 
  3091           test="stri ng-length( $rxNum)>1"
  3092          >
  3093                                                                        
  3094           <xsl:value -of 
  3095            select="$r xNum"
  3096           />
  3097                                                               
  3098          </xsl:when >
  3099                                                              
  3100          <xsl:other wise>
  3101                                                                        
  3102           <xsl:call- template 
  3103            name="na"
  3104           />
  3105                                                               
  3106          </xsl:othe rwise>
  3107                                                     
  3108         </xsl:choo se>
  3109                                            
  3110        </div>
  3111                                  
  3112       </td>
  3113      
  3114                                 
  3115       <!-- dispe nse time - ->
  3116                                 
  3117       <td>
  3118                                           
  3119        <div 
  3120         style="ove rflow:hidd en; white- space:nowr ap; width: 80px;"
  3121        >
  3122                                                    
  3123         <xsl:call- template 
  3124          name="medB egintime"
  3125         >
  3126                                                              
  3127          <xsl:with- param 
  3128           name="row"  
  3129           select="$r ow"
  3130          />
  3131                                                     
  3132         </xsl:call -template>
  3133                                            
  3134        </div>
  3135                                  
  3136       </td>
  3137      
  3138                                 
  3139       <!-- Sig - ->
  3140                                 
  3141       <td>
  3142                                           
  3143        <div 
  3144         style="ove rflow:hidd en; white- space:nowr ap; width: 160px;"
  3145        >
  3146                                                    
  3147         <xsl:varia ble 
  3148          name="sig"
  3149         >
  3150                                                              
  3151          <xsl:call- template 
  3152           name="getS ig"
  3153          >
  3154                                                                        
  3155           <xsl:with- param 
  3156            name="subs tanceAdmin
  3157            select="$r ow/n1:subs tanceAdmin istration"
  3158           />
  3159                                                               
  3160          </xsl:call -template>
  3161                                                     
  3162         </xsl:vari able>
  3163                                                    
  3164         <xsl:choos e>
  3165                                                              
  3166          <xsl:when 
  3167           test="stri ng-length( $sig)>1"
  3168          >
  3169                                                                        
  3170           <xsl:call- template 
  3171            name="flyo verSpan"
  3172           >
  3173                                                                                  
  3174            <xsl:with- param 
  3175             name="data
  3176             select="$s ig"
  3177            />
  3178                                                                         
  3179           </xsl:call -template>
  3180                                                               
  3181          </xsl:when >
  3182                                                              
  3183          <xsl:other wise>
  3184                                                                        
  3185           <xsl:call- template 
  3186            name="na"
  3187           />
  3188                                                               
  3189          </xsl:othe rwise>
  3190                                                     
  3191         </xsl:choo se>
  3192                                            
  3193        </div>
  3194                                  
  3195       </td>
  3196      
  3197                                 
  3198       <!-- sourc e -->
  3199                                 
  3200       <td>
  3201                                           
  3202        <div 
  3203         style="ove rflow:hidd en; white- space:nowr ap; width: 100px;"
  3204        >
  3205                                                    
  3206         <xsl:varia ble 
  3207          name="sour ceResult"
  3208         >
  3209                                                              
  3210          <xsl:call- template 
  3211           name="getM edSource"
  3212          >
  3213                                                                        
  3214           <xsl:with- param 
  3215            name="subs tanceAdmin
  3216            select="$r ow/n1:subs tanceAdmin istration"
  3217           />
  3218                                                               
  3219          </xsl:call -template>
  3220                                                     
  3221         </xsl:vari able>
  3222                                                    
  3223         <xsl:if 
  3224          test="stri ng-length( $sourceRes ult)>1"
  3225         >
  3226                                                              
  3227          <xsl:call- template 
  3228           name="flyo verSpan"
  3229          >
  3230                                                                        
  3231           <xsl:with- param 
  3232            name="data
  3233            select="$s ourceResul t"
  3234           />
  3235                                                               
  3236          </xsl:call -template>
  3237                                                     
  3238         </xsl:if>
  3239                                            
  3240        </div>
  3241                                  
  3242       </td>
  3243                        
  3244      </tr>
  3245              
  3246     </xsl:temp late>
  3247    
  3248             
  3249     <xsl:templ ate 
  3250      name="prob lemRow"
  3251     >
  3252                       
  3253      <xsl:param  
  3254       name="row"
  3255      />
  3256                       
  3257      <xsl:varia ble 
  3258       name="rowD ata" 
  3259       select="$r ow/n1:act/ n1:entryRe lationship /n1:observ ation"
  3260      />
  3261                       
  3262      <xsl:varia ble 
  3263       name="ref"  
  3264       select="$r ow/n1:act/ n1:entryRe lationship /n1:observ ation/n1:t ext/n1:ref erence"
  3265      />
  3266                       
  3267      <xsl:varia ble 
  3268       name="path
  3269       select="$r ow/.."
  3270      />
  3271                       
  3272      <tr 
  3273       class="sec ond"
  3274      >
  3275      
  3276                                 
  3277       <!-- name  -->
  3278                                 
  3279       <td>
  3280                                           
  3281        <div 
  3282         style="ove rflow:hidd en; white- space:nowr ap; width: 240px;"
  3283        >
  3284                                                    
  3285         <xsl:varia ble 
  3286          name="prob Result"
  3287         >
  3288                                                              
  3289          <xsl:call- template 
  3290           name="prob Name"
  3291          >
  3292                                                                        
  3293           <xsl:with- param 
  3294            name="rowD ata" 
  3295            select="$r owData"
  3296           />                                                  
  3297                                                                        
  3298           <xsl:with- param 
  3299            name="ref"  
  3300            select="$r ef"
  3301           />
  3302                                                                        
  3303           <xsl:with- param 
  3304            name="path
  3305            select="$p ath"
  3306           />
  3307                                                               
  3308          </xsl:call -template>
  3309                                                     
  3310         </xsl:vari able>
  3311                                                    
  3312         <xsl:if 
  3313          test="stri ng-length( $probResul t)>1"
  3314         >
  3315                                                              
  3316          <xsl:call- template 
  3317           name="flyo verSpan"
  3318          >
  3319                                                                        
  3320           <xsl:with- param 
  3321            name="data
  3322            select="$p robResult"  
  3323           />
  3324                                                               
  3325          </xsl:call -template>
  3326                                                     
  3327         </xsl:if>
  3328                                            
  3329        </div>
  3330                                  
  3331       </td>
  3332      
  3333                                 
  3334       <!-- statu s -->
  3335                                 
  3336       <td>
  3337                                           
  3338        <div 
  3339         style="ove rflow:hidd en; white- space:nowr ap; width: 80px;"
  3340        >
  3341                                                    
  3342         <xsl:call- template 
  3343          name="prob Status"
  3344         >
  3345                                                              
  3346          <xsl:with- param 
  3347           name="row"  
  3348           select="$r ow"
  3349          />
  3350                                                     
  3351         </xsl:call -template>
  3352                                            
  3353        </div>
  3354                                  
  3355       </td>
  3356      
  3357                                 
  3358       <!-- Probl em Code -- >
  3359                                 
  3360       <td>
  3361                                           
  3362        <div 
  3363         style="ove rflow:hidd en; white- space:nowr ap; width: 150px"
  3364        >
  3365                                                    
  3366         <xsl:call- template 
  3367          name="getP roblemCode "
  3368         >
  3369                                                              
  3370          <xsl:with- param 
  3371           name="rowD ata" 
  3372           select="$r owData"
  3373          />
  3374                                                     
  3375         </xsl:call -template>
  3376                                            
  3377        </div>
  3378                                  
  3379       </td>
  3380      
  3381                                 
  3382       <!-- probl em effecti ve date -- >
  3383                                 
  3384       <td>
  3385                                           
  3386        <div 
  3387         style="ove rflow:hidd en; white- space:nowr ap;"
  3388        >
  3389                                                    
  3390         <xsl:call- template 
  3391          name="prob Date"
  3392         >
  3393                                                              
  3394          <xsl:with- param 
  3395           name="row"  
  3396           select="$r ow"
  3397          />
  3398                                                     
  3399         </xsl:call -template>
  3400                                            
  3401        </div>
  3402                                  
  3403       </td>
  3404      
  3405                                 
  3406       <!-- provi der -->
  3407                                 
  3408       <td>
  3409                                           
  3410        <div 
  3411         style="ove rflow:hidd en; white- space:nowr ap; width: 160px;"
  3412        >
  3413                                                    
  3414         <xsl:varia ble 
  3415          name="prov ider"
  3416         />
  3417                                                    
  3418         <xsl:call- template 
  3419          name="getP roblemProv ider"
  3420         >
  3421                                                              
  3422          <xsl:with- param 
  3423           name="act"  
  3424           select="$r ow/n1:act"
  3425          />
  3426                                                     
  3427         </xsl:call -template>
  3428                                                    
  3429         <xsl:if 
  3430          test="stri ng-length( $provider) >2"
  3431         >
  3432                                                              
  3433          <xsl:call- template 
  3434           name="flyo verSpan"
  3435          >
  3436                                                                        
  3437           <xsl:with- param 
  3438            name="data
  3439            select="$p rovider" 
  3440           />
  3441                                                               
  3442          </xsl:call -template>
  3443                                                     
  3444         </xsl:if>
  3445                                            
  3446        </div>
  3447                                  
  3448       </td>
  3449      
  3450                                 
  3451       <!-- sourc e -->
  3452                                 
  3453       <td>
  3454                                           
  3455        <div 
  3456         style="ove rflow:hidd en; white- space:nowr ap; width: 150px;"
  3457        >
  3458                                                    
  3459         <xsl:varia ble 
  3460          name="sour ce"
  3461         >
  3462                                                              
  3463          <xsl:call- template 
  3464           name="getP roblemSour ce"
  3465          >
  3466                                                                        
  3467           <xsl:with- param 
  3468            name="row"  
  3469            select="$r ow"
  3470           />
  3471                                                               
  3472          </xsl:call -template>
  3473                                                     
  3474         </xsl:vari able>
  3475                                                    
  3476         <xsl:choos e>
  3477                                                              
  3478          <xsl:when 
  3479           test="stri ng-length( $source)>1 "
  3480          >
  3481                                                                        
  3482           <xsl:call- template 
  3483            name="flyo verSpan"
  3484           >
  3485                                                                                  
  3486            <xsl:with- param 
  3487             name="data
  3488             select="$s ource"
  3489            />
  3490                                                                         
  3491           </xsl:call -template>
  3492                                                               
  3493          </xsl:when >
  3494                                                              
  3495          <xsl:other wise>
  3496                                                                        
  3497           <xsl:call- template 
  3498            name="na"
  3499           />
  3500                                                               
  3501          </xsl:othe rwise>
  3502                                                     
  3503         </xsl:choo se>
  3504                                            
  3505        </div>
  3506                                  
  3507       </td>
  3508                        
  3509      </tr>
  3510              
  3511     </xsl:temp late>
  3512    
  3513             
  3514     <!-- Aller gy entry r ow -->
  3515             
  3516     <xsl:templ ate 
  3517      name="alle rgyRow"
  3518     >
  3519                       
  3520      <xsl:param  
  3521       name="row"
  3522      />
  3523                       
  3524      <xsl:varia ble 
  3525       name="obse rvation" 
  3526       select="$r ow/n1:act/ n1:entryRe lationship /n1:observ ation"
  3527      />
  3528                       
  3529      <xsl:varia ble 
  3530       name="eR" 
  3531       select="$r ow/n1:act/ n1:entryRe lationship "
  3532      />
  3533                       
  3534      <tr 
  3535       class="sec ond"
  3536      >
  3537      
  3538                                 
  3539       <!--Allerg ens-->
  3540                                 
  3541       <td>
  3542                                           
  3543        <div 
  3544         style="ove rflow:hidd en; white- space:nowr ap; width: 180px; pad ding-right :5px;"
  3545        >                         
  3546                                                    
  3547         <xsl:varia ble 
  3548          name="alle rgen"
  3549         >
  3550                                                              
  3551          <xsl:call- template 
  3552           name="getA llergen"
  3553          >
  3554                                                                        
  3555           <xsl:with- param 
  3556            name="obse rvation" 
  3557            select="$o bservation "
  3558           />
  3559                                                               
  3560          </xsl:call -template>
  3561                                                     
  3562         </xsl:vari able>
  3563                                                    
  3564         <xsl:choos e>
  3565                                                              
  3566          <xsl:when 
  3567           test="stri ng-length( $allergen) >1"
  3568          >
  3569                                                                        
  3570           <xsl:call- template 
  3571            name="flyo verSpan"
  3572           >
  3573                                                                                  
  3574            <xsl:with- param 
  3575             name="data
  3576             select="$a llergen"
  3577            />
  3578                                                                         
  3579           </xsl:call -template>
  3580                                                               
  3581          </xsl:when >
  3582                                                              
  3583          <xsl:other wise>
  3584                                                                        
  3585           <xsl:call- template 
  3586            name="na"
  3587           />
  3588                                                               
  3589          </xsl:othe rwise>
  3590                                                     
  3591         </xsl:choo se>
  3592                                            
  3593        </div>
  3594                                  
  3595       </td>
  3596      
  3597                                 
  3598       <!--Verifi cation Dat e-->
  3599                                 
  3600       <td>
  3601                                           
  3602        <div 
  3603         style="ove rflow:hidd en; white- space:nowr ap; width: 100px;"
  3604        >
  3605                                                    
  3606         <xsl:call- template 
  3607          name="disp layAllergy Verificati onDate"
  3608         >
  3609                                                              
  3610          <xsl:with- param 
  3611           name="obse rvation" 
  3612           select="$o bservation "
  3613          />
  3614                                                     
  3615         </xsl:call -template>
  3616                                            
  3617        </div>
  3618                                  
  3619       </td>
  3620      
  3621                                 
  3622       <!--Event  Type-->
  3623                                 
  3624       <td>
  3625                                           
  3626        <div 
  3627         style="ove rflow:hidd en; white- space:nowr ap; width: 180px;"
  3628        >
  3629                                                    
  3630         <xsl:varia ble 
  3631          name="alle rgenType"
  3632         >
  3633                                                              
  3634          <xsl:call- template 
  3635           name="getE ventType"
  3636          >
  3637                                                                        
  3638           <xsl:with- param 
  3639            name="obs"  
  3640            select="$o bservation "
  3641           />
  3642                                                               
  3643          </xsl:call -template>
  3644                                                     
  3645         </xsl:vari able>
  3646                                                    
  3647         <xsl:choos e>
  3648                                                              
  3649          <xsl:when 
  3650           test="stri ng-length( $allergenT ype)>1"
  3651          >
  3652                                                                        
  3653           <xsl:call- template 
  3654            name="flyo verSpan"
  3655           >
  3656                                                                                  
  3657            <xsl:with- param 
  3658             name="data
  3659             select="$a llergenTyp e"
  3660            />
  3661                                                                         
  3662           </xsl:call -template>
  3663                                                               
  3664          </xsl:when >
  3665                                                              
  3666          <xsl:other wise>
  3667                                                                        
  3668           <xsl:call- template 
  3669            name="na"
  3670           />
  3671                                                               
  3672          </xsl:othe rwise>
  3673                                                     
  3674         </xsl:choo se>
  3675                                            
  3676        </div>
  3677                                  
  3678       </td>
  3679      
  3680                                 
  3681       <!--Reacti on-->
  3682                                 
  3683       <td>
  3684                                           
  3685        <div 
  3686         style="ove rflow:hidd en; white- space:nowr ap; width: 180px;"
  3687        >
  3688                                                    
  3689         <!--<xsl:f or-each se lect="$obs ervation/n 1:entryRel ationship[ @typeCode= 'MFST']">- ->
  3690                                                    
  3691         <xsl:varia ble 
  3692          name="valu eResult"
  3693         >
  3694                                                              
  3695          <xsl:call- template 
  3696           name="getR eactionVal ue"
  3697          >
  3698                                                                        
  3699           <xsl:with- param 
  3700            name="entr yRelations hip" 
  3701            select="$r ow/n1:act/ n1:entryRe lationship "
  3702           />
  3703                                                               
  3704          </xsl:call -template>
  3705                                                     
  3706         </xsl:vari able>
  3707                                                    
  3708         <xsl:choos e>
  3709                                                              
  3710          <xsl:when 
  3711           test="stri ng-length( $valueResu lt)>1"
  3712          >
  3713                                                                        
  3714           <xsl:call- template 
  3715            name="flyo verSpan"
  3716           >
  3717                                                                                  
  3718            <xsl:with- param 
  3719             name="data
  3720             select="$v alueResult "
  3721            />
  3722                                                                         
  3723           </xsl:call -template>
  3724                                                               
  3725          </xsl:when >
  3726                                                              
  3727          <xsl:other wise>
  3728                                                                        
  3729           <xsl:call- template 
  3730            name="na"
  3731           />
  3732                                                               
  3733          </xsl:othe rwise>
  3734                                                     
  3735         </xsl:choo se>
  3736                                                    
  3737         <!--</xsl: for-each>- ->
  3738                                            
  3739        </div>
  3740                                  
  3741       </td>
  3742      
  3743                                 
  3744       <!--Severi ty-->
  3745                                 
  3746       <td>
  3747                                           
  3748        <div 
  3749         style="ove rflow:hidd en; white- space:nowr ap; width: 100px;"
  3750        >
  3751                                                    
  3752         <xsl:varia ble 
  3753          name="seve rity"
  3754         >
  3755                                                              
  3756          <xsl:call- template 
  3757           name="getS everity"
  3758          >
  3759                                                                        
  3760           <xsl:with- param 
  3761            name="obse rvation" 
  3762            select="$o bservation "
  3763           />
  3764                                                               
  3765          </xsl:call -template>
  3766                                                     
  3767         </xsl:vari able>
  3768                                                    
  3769         <xsl:choos e>
  3770                                                              
  3771          <xsl:when 
  3772           test="stri ng-length( $severity) >1"
  3773          >
  3774                                                                        
  3775           <xsl:value -of 
  3776            select="$s everity"
  3777           />
  3778                                                               
  3779          </xsl:when >
  3780                                                              
  3781          <xsl:other wise>
  3782                                                                        
  3783           <xsl:call- template 
  3784            name="na"
  3785           />
  3786                                                               
  3787          </xsl:othe rwise>
  3788                                                     
  3789         </xsl:choo se>
  3790                                            
  3791        </div>
  3792                                  
  3793       </td>
  3794      
  3795                                 
  3796       <!--source -->
  3797                                 
  3798       <td>
  3799                                           
  3800        <div 
  3801         style="ove rflow:hidd en; white- space:nowr ap; width: 150px;"
  3802        >
  3803                                                    
  3804         <xsl:varia ble 
  3805          name="sour ce"
  3806         >
  3807                                                              
  3808          <xsl:call- template 
  3809           name="getA llergySour ce"
  3810          >
  3811                                                                        
  3812           <xsl:with- param 
  3813            name="row"  
  3814            select="$r ow"
  3815           />
  3816                                                               
  3817          </xsl:call -template>
  3818                                                     
  3819         </xsl:vari able>
  3820                                                    
  3821         <xsl:choos e>
  3822                                                              
  3823          <xsl:when 
  3824           test="stri ng-length( $source)>0 "
  3825          >
  3826                                                                        
  3827           <xsl:call- template 
  3828            name="flyo verSpan"
  3829           >
  3830                                                                                  
  3831            <xsl:with- param 
  3832             name="data
  3833             select="$s ource"
  3834            />
  3835                                                                         
  3836           </xsl:call -template>
  3837                                                               
  3838          </xsl:when >
  3839                                                              
  3840          <xsl:other wise>
  3841                                                                        
  3842           <xsl:call- template 
  3843            name="na"
  3844           />
  3845                                                               
  3846          </xsl:othe rwise>
  3847                                                     
  3848         </xsl:choo se>
  3849                                            
  3850        </div>
  3851                                  
  3852       </td>
  3853                        
  3854      </tr>
  3855     
  3856              
  3857     </xsl:temp late>
  3858    
  3859             
  3860     <!-- Proce dures row  entry -->
  3861             
  3862     <xsl:templ ate 
  3863      name="proc edureRow"
  3864     >
  3865                       
  3866      <xsl:param  
  3867       name="row"
  3868      />
  3869     
  3870                       
  3871      <tr 
  3872       class="sec ond"
  3873      >
  3874      
  3875                                 
  3876       <!-- Proce dure Date/ Time-->
  3877                                 
  3878       <td>
  3879                                           
  3880        <div 
  3881         style="ove rflow:hidd en; white- space:nowr ap;"
  3882        >
  3883                                                    
  3884         <xsl:choos e>
  3885                                                              
  3886          <xsl:when 
  3887           test="$row /n1:proced ure/n1:eff ectiveTime /n1:low/@v alue"
  3888          >
  3889                                                                        
  3890           <xsl:call- template 
  3891            name="form atDateShor t"
  3892           >
  3893                                                                                  
  3894            <xsl:with- param 
  3895             name="date String" 
  3896             select="$r ow/n1:proc edure/n1:e ffectiveTi me/n1:low/ @value"
  3897            />
  3898                                                                         
  3899           </xsl:call -template>
  3900                                                               
  3901          </xsl:when >
  3902                                                              
  3903          <xsl:other wise/>
  3904                                                     
  3905         </xsl:choo se>
  3906                                            
  3907        </div>
  3908                                  
  3909       </td>
  3910      
  3911                                 
  3912       <!-- Proce dure Type   -->
  3913                                 
  3914       <td>
  3915                                           
  3916        <div 
  3917         style="ove rflow:hidd en; white- space:nowr ap; width: 260px;"
  3918        >
  3919                                                    
  3920         <xsl:varia ble 
  3921          name="type "
  3922         >
  3923                                                              
  3924          <xsl:call- template 
  3925           name="getP rocedureTy pe"
  3926          >
  3927                                                                        
  3928           <xsl:with- param 
  3929            name="proc edure" 
  3930            select="$r ow/n1:proc edure"
  3931           />
  3932                                                               
  3933          </xsl:call -template>
  3934                                                     
  3935         </xsl:vari able>
  3936                                                    
  3937         <xsl:choos e>
  3938                                                              
  3939          <xsl:when 
  3940           test="stri ng-length( $type)>1"
  3941          >
  3942                                                                        
  3943           <xsl:call- template 
  3944            name="flyo verSpan"
  3945           >
  3946                                                                                  
  3947            <xsl:with- param 
  3948             name="data
  3949             select="$t ype"
  3950            />
  3951                                                                         
  3952           </xsl:call -template>
  3953                                                               
  3954          </xsl:when >
  3955                                                              
  3956          <xsl:other wise>
  3957                                                                        
  3958           <xsl:call- template 
  3959            name="na"
  3960           />
  3961                                                               
  3962          </xsl:othe rwise>
  3963                                                     
  3964         </xsl:choo se>
  3965                                            
  3966        </div>
  3967                                  
  3968       </td>
  3969      
  3970                                 
  3971       <!-- Proce dure Free  Text Type- ->
  3972      
  3973                                 
  3974       <td>
  3975                                           
  3976        <div 
  3977         style="ove rflow:hidd en; white- space:nowr ap; width: 260px;heig ht:1em"
  3978        >
  3979                                                    
  3980         <xsl:varia ble 
  3981          name="proc FreeText"
  3982         >
  3983                                                              
  3984          <xsl:call- template 
  3985           name="ltri m"
  3986          >
  3987                                                                        
  3988           <xsl:with- param 
  3989            name="text "
  3990           >
  3991                                                                                  
  3992            <xsl:call- template 
  3993             name="getP rocedureFr eeText"
  3994            >
  3995                                                                                            
  3996             <xsl:with- param 
  3997              name="proc edure" 
  3998              select="$r ow/n1:proc edure"
  3999             />
  4000                                                                                   
  4001            </xsl:call -template>
  4002                                                                         
  4003           </xsl:with -param>
  4004                                                                        
  4005           <xsl:with- param 
  4006            name="star tChar" 
  4007            select="'~ '"
  4008           />
  4009                                                               
  4010          </xsl:call -template>
  4011                                                     
  4012         </xsl:vari able>
  4013                                                    
  4014         <xsl:choos e>
  4015                                                              
  4016          <xsl:when 
  4017           test="stri ng-length( $procFreeT ext)>1"
  4018          >
  4019                                                                        
  4020           <xsl:call- template 
  4021            name="flyo verSpan"
  4022           >
  4023                                                                                  
  4024            <xsl:with- param 
  4025             name="data
  4026             select="$p rocFreeTex t"
  4027            />
  4028                                                                                  
  4029            <xsl:with- param 
  4030             name="free Text" 
  4031             select="'y es'"
  4032            />
  4033                                                                                  
  4034            <xsl:with- param 
  4035             name="deSq uigglefy" 
  4036             select="'y es'"
  4037            />
  4038                                                                         
  4039           </xsl:call -template>
  4040                                                               
  4041          </xsl:when >
  4042                                                              
  4043          <xsl:other wise>
  4044                                                                        
  4045           <xsl:call- template 
  4046            name="na"
  4047           />
  4048                                                               
  4049          </xsl:othe rwise>
  4050                                                     
  4051         </xsl:choo se>
  4052                                            
  4053        </div>
  4054                                  
  4055       </td>
  4056      
  4057                                 
  4058       <!-- Proce dure Provi der-->
  4059                                 
  4060       <td>
  4061                                           
  4062        <div 
  4063         style="ove rflow:hidd en; white- space:nowr ap; width: 180px;"
  4064        >
  4065                                                    
  4066         <xsl:varia ble 
  4067          name="proc Provider"
  4068         >
  4069                                                              
  4070          <xsl:call- template 
  4071           name="getP rocedurePr ovider"
  4072          >
  4073                                                                        
  4074           <xsl:with- param 
  4075            name="proc edure" 
  4076            select="$r ow/n1:proc edure"
  4077           />
  4078                                                               
  4079          </xsl:call -template>
  4080                                                     
  4081         </xsl:vari able>
  4082                                                    
  4083         <xsl:choos e>
  4084                                                              
  4085          <xsl:when 
  4086           test="stri ng-length( $procProvi der)>1"
  4087          >
  4088                                                                        
  4089           <xsl:call- template 
  4090            name="flyo verSpan"
  4091           >
  4092                                                                                  
  4093            <xsl:with- param 
  4094             name="data
  4095             select="$p rocProvide r"
  4096            />
  4097                                                                         
  4098           </xsl:call -template>
  4099                                                               
  4100          </xsl:when >
  4101                                                              
  4102          <xsl:other wise>
  4103                                                                        
  4104           <xsl:call- template 
  4105            name="na"
  4106           />
  4107                                                               
  4108          </xsl:othe rwise>
  4109                                                     
  4110         </xsl:choo se>
  4111                                            
  4112        </div>
  4113                                  
  4114       </td>
  4115                        
  4116      </tr>
  4117              
  4118     </xsl:temp late>
  4119    
  4120             
  4121     <!-- Labs  entry row  (organizer  capable)  -->
  4122             
  4123     <xsl:templ ate 
  4124      name="labs Row"
  4125     >
  4126                       
  4127      <xsl:param  
  4128       name="row"
  4129      />
  4130                       
  4131      <xsl:varia ble 
  4132       name="obse rvation1" 
  4133       select="$r ow/n1:comp onent/n1:o bservation "
  4134      />
  4135                       
  4136      <xsl:varia ble 
  4137       name="obse rvation2" 
  4138       select="$r ow/n1:orga nizer/n1:c omponent/n 1:observat ion"
  4139      />
  4140                       
  4141      <xsl:choos e>
  4142                                 
  4143       <xsl:when   
  4144        test="stri ng-length( $row/n1:or ganizer)!= 0"
  4145       >
  4146                                           
  4147        <tr 
  4148         class="sec ond"
  4149        >
  4150                                                    
  4151         <!-- Resul t Date/Tim e -->
  4152                                                    
  4153         <td>
  4154                                                              
  4155          <div 
  4156           style="ove rflow:hidd en; white- space:nowr ap; width: 100px; pad ding-right :5px;"
  4157          >
  4158                                                                        
  4159           <xsl:varia ble 
  4160            name="date "
  4161           >
  4162                                                                                  
  4163            <xsl:call- template 
  4164             name="getP anelDT"
  4165            >
  4166                                                                                            
  4167             <xsl:with- param 
  4168              name="orga nizer" 
  4169              select="$r ow/n1:orga nizer"
  4170             />
  4171                                                                                   
  4172            </xsl:call -template>
  4173                                                                         
  4174           </xsl:vari able>
  4175                                                                        
  4176           <xsl:choos e>
  4177                                                                                  
  4178            <xsl:when 
  4179             test="stri ng-length( $date)>0"
  4180            >
  4181                                                                                            
  4182             <xsl:call- template 
  4183              name="flyo verSpan"
  4184             >
  4185                                                                                                     
  4186              <xsl:with- param 
  4187               name="data
  4188               select="$d ate"
  4189              />
  4190                                                                                             
  4191             </xsl:call -template>
  4192                                                                                   
  4193            </xsl:when >
  4194                                                                                  
  4195            <xsl:other wise>
  4196                                                                                            
  4197             <xsl:call- template 
  4198              name="na"
  4199             />
  4200                                                                                   
  4201            </xsl:othe rwise>
  4202                                                                         
  4203           </xsl:choo se>
  4204                                                               
  4205          </div>
  4206                                                     
  4207         </td>
  4208                                                    
  4209         <!-- Organ izer Name  -->
  4210                                                    
  4211         <td>
  4212                                                              
  4213          <div 
  4214           style="ove rflow:hidd en; white- space:nowr ap; width: auto;"
  4215          >
  4216                                                                        
  4217           <xsl:varia ble 
  4218            name="orga nizerName"
  4219           >
  4220                                                                                  
  4221            <xsl:call- template 
  4222             name="getO rganizerNa me"
  4223            >
  4224                                                                                            
  4225             <xsl:with- param 
  4226              name="row"  
  4227              select="$r ow"
  4228             />
  4229                                                                                   
  4230            </xsl:call -template>
  4231                                                                         
  4232           </xsl:vari able>
  4233                                                                        
  4234           <xsl:choos e>
  4235                                                                                  
  4236            <xsl:when 
  4237             test="stri ng-length( $organizer Name)>0"
  4238            >
  4239                                                                                            
  4240             <xsl:call- template 
  4241              name="flyo verSpan"
  4242             >
  4243                                                                                                     
  4244              <xsl:with- param 
  4245               name="data
  4246               select="$o rganizerNa me"
  4247              />
  4248                                                                                             
  4249             </xsl:call -template>
  4250                                                                                   
  4251            </xsl:when >
  4252                                                                                  
  4253            <xsl:other wise>
  4254                                                                                            
  4255             <xsl:call- template 
  4256              name="na"
  4257             />
  4258                                                                                   
  4259            </xsl:othe rwise>
  4260                                                                         
  4261           </xsl:choo se>
  4262                                                               
  4263          </div>
  4264                                                     
  4265         </td>
  4266                                                    
  4267         <!-- sourc e -->
  4268                                                    
  4269         <td>
  4270                                                              
  4271          <div 
  4272           style="ove rflow:hidd en; white- space:nowr ap; width: auto;"
  4273          >
  4274                                                                        
  4275           <xsl:choos e>
  4276                                                                                  
  4277            <xsl:when 
  4278             test="$row /n1:organi zer/n1:aut hor/n1:ass ignedAutho r/n1:repre sentedOrga nization/n 1:name"
  4279            >
  4280                                                                                            
  4281             <xsl:value -of 
  4282              select="$r ow/n1:orga nizer/n1:a uthor/n1:a ssignedAut hor/n1:rep resentedOr ganization /n1:name"
  4283             />
  4284                                                                                   
  4285            </xsl:when >
  4286                                                                                  
  4287            <xsl:when 
  4288             test="$row /n1:organi zer/n1:per former/n1: assignedEn tity/n1:re presentedO rganizatio n/n1:name"
  4289            >
  4290                                                                                            
  4291             <xsl:value -of 
  4292              select="$r ow/n1:orga nizer/n1:p erformer/n 1:assigned Entity/n1: represente dOrganizat ion/n1:nam e"
  4293             />
  4294                                                                                   
  4295            </xsl:when >
  4296                                                                                  
  4297            <xsl:when 
  4298             test="$row /n1:organi zer/n1:com ponent/n1: observatio n/n1:parti cipant[@ty peCode='AU T']/n1:par ticipantRo le/n1:scop ingEntity/ n1:desc"
  4299            >
  4300                                                                                            
  4301             <xsl:value -of 
  4302              select="$r ow/n1:orga nizer/n1:c omponent/n 1:observat ion/n1:par ticipant[@ typeCode=' AUT']/n1:p articipant Role/n1:sc opingEntit y/n1:desc"
  4303             />
  4304                                                                                   
  4305            </xsl:when >
  4306                                                                                  
  4307            <xsl:other wise>
  4308                                                                                            
  4309             <xsl:call- template 
  4310              name="na"
  4311             />
  4312                                                                                   
  4313            </xsl:othe rwise>
  4314                                                                         
  4315           </xsl:choo se>
  4316                                                               
  4317          </div>
  4318                                                     
  4319         </td>
  4320                                                    
  4321         <td>
  4322                                                              
  4323          <xsl:call- template 
  4324           name="na"
  4325          />
  4326                                                     
  4327         </td>
  4328                                                    
  4329         <td>
  4330                                                              
  4331          <xsl:call- template 
  4332           name="na"
  4333          />
  4334                                                     
  4335         </td>
  4336                                                    
  4337         <td>
  4338                                                              
  4339          <xsl:call- template 
  4340           name="na"
  4341          />
  4342                                                     
  4343         </td>
  4344                                                    
  4345         <!-- Resul t Status - ->
  4346                                                    
  4347         <td>
  4348                                                              
  4349          <div 
  4350           style="ove rflow:hidd en; white- space:nowr ap; width: 80px;"
  4351          >
  4352                                                                        
  4353           <xsl:choos e>
  4354                                                                                  
  4355            <xsl:when 
  4356             test="stri ng-length( $row/n1:or ganizer/n1 :statusCod e/@code)>0 "
  4357            >
  4358                                                                                            
  4359             <xsl:call- template 
  4360              name="flyo verSpan"
  4361             >
  4362                                                                                                     
  4363              <xsl:with- param 
  4364               name="data
  4365               select="$r ow/n1:orga nizer/n1:s tatusCode/ @code"
  4366              />
  4367                                                                                             
  4368             </xsl:call -template>
  4369                                                                                   
  4370            </xsl:when >
  4371                                                                                  
  4372            <xsl:other wise>
  4373                                                                                            
  4374             <xsl:call- template 
  4375              name="na"
  4376             />
  4377                                                                                   
  4378            </xsl:othe rwise>
  4379                                                                         
  4380           </xsl:choo se>
  4381                                                               
  4382          </div>
  4383                                                     
  4384         </td>
  4385                                            
  4386        </tr>
  4387                                           
  4388        <xsl:for-e ach 
  4389         select="$r ow/n1:orga nizer/n1:c omponent/n 1:observat ion"
  4390        >
  4391                                                    
  4392         <tr 
  4393          class="thi rd"
  4394         >
  4395                                                              
  4396          <td>
  4397                                                                        
  4398           <xsl:call- template 
  4399            name="na"
  4400           />
  4401                                                               
  4402          </td>
  4403                                                              
  4404          <!-- Resul t Type (Fr ee-text)-- >
  4405                                                              
  4406          <td>
  4407                                                                        
  4408           <div 
  4409            style="ove rflow:hidd en; white- space:nowr ap; width: auto;"
  4410           >
  4411                                                                                  
  4412            <xsl:varia ble 
  4413             name="type Result2"
  4414            >
  4415                                                                                            
  4416             <xsl:call- template 
  4417              name="getR esultType2 "
  4418             >
  4419                                                                                                     
  4420              <xsl:with- param 
  4421               name="obse rvation" 
  4422               select="."
  4423              />
  4424                                                                                             
  4425             </xsl:call -template>
  4426                                                                                   
  4427            </xsl:vari able>
  4428                                                                                  
  4429            <xsl:choos e>
  4430                                                                                            
  4431             <xsl:when 
  4432              test="stri ng-length( $typeResul t2)>0"
  4433             >
  4434                                                                                                     
  4435              <xsl:call- template 
  4436               name="flyo verSpan"
  4437              >
  4438                                                                                                               
  4439               <xsl:with- param 
  4440                name="data
  4441                select="$t ypeResult2 "
  4442               />
  4443                                                                                                      
  4444              </xsl:call -template>
  4445                                                                                             
  4446             </xsl:when >
  4447                                                                                            
  4448             <xsl:other wise>
  4449                                                                                                     
  4450              <xsl:varia ble 
  4451               name="type Result3"
  4452              >
  4453                                                                                                               
  4454               <xsl:call- template 
  4455                name="getR esultType"
  4456               >
  4457                                                                                                                         
  4458                <xsl:with- param 
  4459                 name="obse rvation" 
  4460                 select="."
  4461                />
  4462                                                                                                                
  4463               </xsl:call -template>
  4464                                                                                                      
  4465              </xsl:vari able>
  4466                                                                                                     
  4467              <xsl:choos e>
  4468                                                                                                               
  4469               <xsl:when 
  4470                test="stri ng-length( $typeResul t3)>0"
  4471               >
  4472                                                                                                                         
  4473                <xsl:call- template 
  4474                 name="flyo verSpan"
  4475                >
  4476                                                                                                                                   
  4477                 <xsl:with- param 
  4478                  name="data
  4479                  select="$t ypeResult3 "
  4480                 />
  4481                                                                                                                          
  4482                </xsl:call -template>
  4483                                                                                                                
  4484               </xsl:when >
  4485                                                                                                               
  4486               <xsl:other wise>
  4487                                                                                                                         
  4488                <xsl:call- template 
  4489                 name="na"
  4490                />
  4491                                                                                                                
  4492               </xsl:othe rwise>
  4493                                                                                                      
  4494              </xsl:choo se>
  4495                                                                                             
  4496             </xsl:othe rwise>
  4497                                                                                   
  4498            </xsl:choo se>
  4499                                                                         
  4500           </div>
  4501                                                               
  4502          </td>
  4503                                                              
  4504          <td>
  4505                                                                        
  4506           <xsl:call- template 
  4507            name="na"
  4508           />
  4509                                                               
  4510          </td>
  4511                                                              
  4512          <!-- Resul t Value -- >
  4513                                                              
  4514          <td>
  4515                                                                        
  4516           <div 
  4517            style="ove rflow:hidd en; white- space:nowr ap; width: 110px;"
  4518           >
  4519                                                                                  
  4520            <xsl:varia ble 
  4521             name="valu eResult2"
  4522            >
  4523                                                                                            
  4524             <xsl:call- template 
  4525              name="getR esultValue "
  4526             >
  4527                                                                                                     
  4528              <xsl:with- param 
  4529               name="obse rvation" 
  4530               select="."
  4531              />
  4532                                                                                             
  4533             </xsl:call -template>
  4534                                                                                   
  4535            </xsl:vari able>
  4536                                                                                  
  4537            <xsl:choos e>
  4538                                                                                            
  4539             <xsl:when 
  4540              test="stri ng-length( $valueResu lt2)>0"
  4541             >
  4542                                                                                                     
  4543              <xsl:call- template 
  4544               name="flyo verSpan"
  4545              >
  4546                                                                                                               
  4547               <xsl:with- param 
  4548                name="data
  4549                select="$v alueResult 2"
  4550               />
  4551                                                                                                      
  4552              </xsl:call -template>
  4553                                                                                             
  4554             </xsl:when >
  4555                                                                                            
  4556             <xsl:other wise>
  4557                                                                                                     
  4558              <xsl:call- template 
  4559               name="na"
  4560              />
  4561                                                                                             
  4562             </xsl:othe rwise>
  4563                                                                                   
  4564            </xsl:choo se>
  4565                                                                         
  4566           </div>
  4567                                                               
  4568          </td>
  4569                                                              
  4570          <!-- inter pretation  -->
  4571                                                              
  4572          <td>
  4573                                                                        
  4574           <div 
  4575            style="ove rflow:hidd en; white- space:nowr ap; width: auto;"
  4576           >
  4577                                                                                  
  4578            <xsl:varia ble 
  4579             name="inte rpResult1"
  4580            >
  4581                                                                                            
  4582             <xsl:call- template 
  4583              name="getI nterpretat ion2"
  4584             >
  4585                                                                                                     
  4586              <xsl:with- param 
  4587               name="obse rvation" 
  4588               select="."
  4589              />
  4590                                                                                             
  4591             </xsl:call -template>
  4592                                                                                   
  4593            </xsl:vari able>
  4594                                                                                  
  4595            <xsl:choos e>
  4596                                                                                            
  4597             <xsl:when 
  4598              test="stri ng-length( $interpRes ult1)>0"
  4599             >
  4600                                                                                                     
  4601              <xsl:call- template 
  4602               name="flyo verSpan"
  4603              >
  4604                                                                                                               
  4605               <xsl:with- param 
  4606                name="data
  4607                select="$i nterpResul t1"
  4608               />
  4609                                                                                                      
  4610              </xsl:call -template>
  4611                                                                                             
  4612             </xsl:when >
  4613                                                                                            
  4614             <xsl:other wise>
  4615                                                                                                     
  4616              <xsl:varia ble 
  4617               name="inte rpResult2"
  4618              >
  4619                                                                                                               
  4620               <xsl:call- template 
  4621                name="getI nterpretat ion"
  4622               >
  4623                                                                                                                         
  4624                <xsl:with- param 
  4625                 name="obse rvation" 
  4626                 select="."
  4627                />
  4628                                                                                                                
  4629               </xsl:call -template>
  4630                                                                                                      
  4631              </xsl:vari able>
  4632                                                                                                     
  4633              <xsl:choos e>
  4634                                                                                                               
  4635               <xsl:when 
  4636                test="stri ng-length( $interpRes ult2)>0"
  4637               >
  4638                                                                                                                         
  4639                <xsl:call- template 
  4640                 name="flyo verSpan"
  4641                >
  4642                                                                                                                                   
  4643                 <xsl:with- param 
  4644                  name="data
  4645                  select="$i nterpResul t2"
  4646                 />
  4647                                                                                                                          
  4648                </xsl:call -template>
  4649                                                                                                                
  4650               </xsl:when >
  4651                                                                                                               
  4652               <xsl:other wise>
  4653                                                                                                                         
  4654                <xsl:call- template 
  4655                 name="na"
  4656                />
  4657                                                                                                                
  4658               </xsl:othe rwise>
  4659                                                                                                      
  4660              </xsl:choo se>
  4661                                                                                             
  4662             </xsl:othe rwise>
  4663                                                                                   
  4664            </xsl:choo se>
  4665                                                                         
  4666           </div>
  4667                                                               
  4668          </td>
  4669                                                              
  4670          <!-- ref r ange -->
  4671                                                              
  4672          <td>
  4673                                                                        
  4674           <div 
  4675            style="ove rflow:hidd en; white- space:nowr ap; width: 130px;"
  4676           >
  4677                                                                                  
  4678            <xsl:varia ble 
  4679             name="ref"
  4680            >
  4681                                                                                            
  4682             <xsl:call- template 
  4683              name="getR efRange"
  4684             >
  4685                                                                                                     
  4686              <xsl:with- param 
  4687               name="obse rvation" 
  4688               select="."
  4689              />
  4690                                                                                             
  4691             </xsl:call -template>
  4692                                                                                   
  4693            </xsl:vari able>
  4694                                                                                  
  4695            <xsl:choos e>
  4696                                                                                            
  4697             <xsl:when 
  4698              test="stri ng-length( $ref)>0"
  4699             >
  4700                                                                                                     
  4701              <xsl:call- template 
  4702               name="flyo verSpan"
  4703              >
  4704                                                                                                               
  4705               <xsl:with- param 
  4706                name="data
  4707                select="$r ef"
  4708               />
  4709                                                                                                      
  4710              </xsl:call -template>
  4711                                                                                             
  4712             </xsl:when >
  4713                                                                                            
  4714             <xsl:other wise>
  4715                                                                                                     
  4716              <xsl:call- template 
  4717               name="na"
  4718              />
  4719                                                                                             
  4720             </xsl:othe rwise>
  4721                                                                                   
  4722            </xsl:choo se>
  4723                                                                         
  4724           </div>
  4725                                                               
  4726          </td>
  4727                                                              
  4728          <!-- Resul t Status - ->
  4729                                                              
  4730          <td>
  4731                                                                        
  4732           <div 
  4733            style="ove rflow:hidd en; white- space:nowr ap; width: 80px;"
  4734           >
  4735                                                                                  
  4736            <xsl:choos e>
  4737                                                                                            
  4738             <xsl:when 
  4739              test="stri ng-length( ./n1:statu sCode/@cod e)>0"
  4740             >
  4741                                                                                                     
  4742              <xsl:call- template 
  4743               name="flyo verSpan"
  4744              >
  4745                                                                                                               
  4746               <xsl:with- param 
  4747                name="data
  4748                select="./ n1:statusC ode/@code"
  4749               />
  4750                                                                                                      
  4751              </xsl:call -template>
  4752                                                                                             
  4753             </xsl:when >
  4754                                                                                            
  4755             <xsl:other wise>
  4756                                                                                                     
  4757              <xsl:call- template 
  4758               name="na"
  4759              />
  4760                                                                                             
  4761             </xsl:othe rwise>
  4762                                                                                   
  4763            </xsl:choo se>
  4764                                                                         
  4765           </div>
  4766                                                               
  4767          </td>
  4768                                                     
  4769         </tr>
  4770                                            
  4771        </xsl:for- each>
  4772                                  
  4773       </xsl:when >
  4774                                 
  4775       <!-- No or ganizer wi th lab -->
  4776                                 
  4777       <xsl:other wise>
  4778                                           
  4779        <xsl:choos e>
  4780                                                    
  4781         <xsl:when 
  4782          test="stri ng-length( $row/n1:ob servation/ n1:code/@d isplayName )!=0 or $r ow/n1:obse rvation/n1 :text/n1:r eference/@ value"
  4783         >
  4784                                                              
  4785          <tr 
  4786           class="sec ond"
  4787          >
  4788                                                                        
  4789           <!-- Resul t Date/Tim e -->
  4790                                                                        
  4791           <td>
  4792                                                                                  
  4793            <div 
  4794             style="ove rflow:hidd en; white- space:nowr ap; width: auto; padd ing-right: 5px;"
  4795            >
  4796                                                                                            
  4797             <xsl:varia ble 
  4798              name="date 2"
  4799             >
  4800                                                                                                     
  4801              <xsl:call- template 
  4802               name="getR esultDT"
  4803              >
  4804                                                                                                               
  4805               <xsl:with- param 
  4806                name="obse rvation" 
  4807                select="$r ow/n1:obse rvation"
  4808               />
  4809                                                                                                      
  4810              </xsl:call -template>
  4811                                                                                             
  4812             </xsl:vari able>
  4813                                                                                            
  4814             <xsl:choos e>
  4815                                                                                                     
  4816              <xsl:when 
  4817               test="stri ng-length( $date2)>0"
  4818              >
  4819                                                                                                               
  4820               <xsl:call- template 
  4821                name="flyo verSpan"
  4822               >
  4823                                                                                                                         
  4824                <xsl:with- param 
  4825                 name="data
  4826                 select="$d ate2"
  4827                />
  4828                                                                                                                
  4829               </xsl:call -template>
  4830                                                                                                      
  4831              </xsl:when >
  4832                                                                                                     
  4833              <xsl:other wise>
  4834                                                                                                               
  4835               <xsl:call- template 
  4836                name="na"
  4837               />
  4838                                                                                                      
  4839              </xsl:othe rwise>
  4840                                                                                             
  4841             </xsl:choo se>
  4842                                                                                   
  4843            </div>
  4844                                                                         
  4845           </td>
  4846                                                                        
  4847           <!-- Resul t Type (Fr ee-text)-- >
  4848                                                                        
  4849           <td>
  4850                                                                                  
  4851            <div 
  4852             style="ove rflow:hidd en; white- space:nowr ap; width: auto;"
  4853            >
  4854                                                                                            
  4855             <xsl:varia ble 
  4856              name="type Result2"
  4857             >
  4858                                                                                                     
  4859              <xsl:call- template 
  4860               name="getR esultType2 "
  4861              >
  4862                                                                                                               
  4863               <xsl:with- param 
  4864                name="obse rvation" 
  4865                select="$r ow/n1:obse rvation"
  4866               />
  4867                                                                                                      
  4868              </xsl:call -template>
  4869                                                                                             
  4870             </xsl:vari able>
  4871                                                                                            
  4872             <xsl:choos e>
  4873                                                                                                     
  4874              <xsl:when 
  4875               test="stri ng-length( $typeResul t2)>0"
  4876              >
  4877                                                                                                               
  4878               <xsl:call- template 
  4879                name="flyo verSpan"
  4880               >
  4881                                                                                                                         
  4882                <xsl:with- param 
  4883                 name="data
  4884                 select="$t ypeResult2 "
  4885                />
  4886                                                                                                                
  4887               </xsl:call -template>
  4888                                                                                                      
  4889              </xsl:when >
  4890                                                                                                     
  4891              <xsl:other wise>
  4892                                                                                                               
  4893               <xsl:varia ble 
  4894                name="type Result3"
  4895               >
  4896                                                                                                                         
  4897                <xsl:call- template 
  4898                 name="getR esultType"
  4899                >
  4900                                                                                                                                   
  4901                 <xsl:with- param 
  4902                  name="obse rvation" 
  4903                  select="$r ow/n1:obse rvation"
  4904                 />
  4905                                                                                                                          
  4906                </xsl:call -template>
  4907                                                                                                                
  4908               </xsl:vari able>
  4909                                                                                                               
  4910               <xsl:choos e>
  4911                                                                                                                         
  4912                <xsl:when 
  4913                 test="stri ng-length( $typeResul t3)>0"
  4914                >
  4915                                                                                                                                   
  4916                 <xsl:call- template 
  4917                  name="flyo verSpan"
  4918                 >
  4919                                                                                                                                             
  4920                  <xsl:with- param 
  4921                   name="data
  4922                   select="$t ypeResult3 "
  4923                  />
  4924                                                                                                                                    
  4925                 </xsl:call -template>
  4926                                                                                                                          
  4927                </xsl:when >
  4928                                                                                                                         
  4929                <xsl:other wise>
  4930                                                                                                                                   
  4931                 <xsl:call- template 
  4932                  name="na"
  4933                 />
  4934                                                                                                                          
  4935                </xsl:othe rwise>
  4936                                                                                                                
  4937               </xsl:choo se>
  4938                                                                                                      
  4939              </xsl:othe rwise>
  4940                                                                                             
  4941             </xsl:choo se>
  4942                                                                                   
  4943            </div>
  4944                                                                         
  4945           </td>
  4946                                                                        
  4947           <td>
  4948                                                                                  
  4949            <xsl:call- template 
  4950             name="na"
  4951            />
  4952                                                                         
  4953           </td>
  4954                                                                        
  4955           <!-- Resul t Value -- >
  4956                                                                        
  4957           <td>
  4958                                                                                  
  4959            <div 
  4960             style="ove rflow:hidd en; width: 120px;"
  4961            >
  4962                                                                                            
  4963             <xsl:varia ble 
  4964              name="valu eResult"
  4965             >
  4966                                                                                                     
  4967              <xsl:call- template 
  4968               name="getR esultValue "
  4969              >
  4970                                                                                                               
  4971               <xsl:with- param 
  4972                name="obse rvation" 
  4973                select="$r ow/n1:obse rvation"
  4974               />
  4975                                                                                                      
  4976              </xsl:call -template>
  4977                                                                                             
  4978             </xsl:vari able>
  4979                                                                                            
  4980             <xsl:choos e>
  4981                                                                                                     
  4982              <xsl:when 
  4983               test="stri ng-length( $valueResu lt)>0"
  4984              >
  4985                                                                                                               
  4986               <xsl:call- template 
  4987                name="flyo verSpan"
  4988               >
  4989                                                                                                                         
  4990                <xsl:with- param 
  4991                 name="data
  4992                 select="$v alueResult "
  4993                />
  4994                                                                                                                
  4995               </xsl:call -template>
  4996                                                                                                      
  4997              </xsl:when >
  4998                                                                                                     
  4999              <xsl:other wise>
  5000                                                                                                               
  5001               <xsl:call- template 
  5002                name="na"
  5003               />
  5004                                                                                                      
  5005              </xsl:othe rwise>
  5006                                                                                             
  5007             </xsl:choo se>
  5008                                                                                   
  5009            </div>
  5010                                                                         
  5011           </td>
  5012                                                                        
  5013           <!-- inter pretation  -->
  5014                                                                        
  5015           <td>
  5016                                                                                  
  5017            <div 
  5018             style="ove rflow:hidd en; white- space:nowr ap; width: 120px;"
  5019            >
  5020                                                                                            
  5021             <xsl:varia ble 
  5022              name="inte rpResult1"
  5023             >
  5024                                                                                                     
  5025              <xsl:call- template 
  5026               name="getI nterpretat ion2"
  5027              >
  5028                                                                                                               
  5029               <xsl:with- param 
  5030                name="obse rvation" 
  5031                select="$r ow/n1:obse rvation"
  5032               />
  5033                                                                                                      
  5034              </xsl:call -template>
  5035                                                                                             
  5036             </xsl:vari able>
  5037                                                                                            
  5038             <xsl:choos e>
  5039                                                                                                     
  5040              <xsl:when 
  5041               test="stri ng-length( $interpRes ult1)>0"
  5042              >
  5043                                                                                                               
  5044               <xsl:call- template 
  5045                name="flyo verSpan"
  5046               >
  5047                                                                                                                         
  5048                <xsl:with- param 
  5049                 name="data
  5050                 select="$i nterpResul t1"
  5051                />
  5052                                                                                                                
  5053               </xsl:call -template>
  5054                                                                                                      
  5055              </xsl:when >
  5056                                                                                                     
  5057              <xsl:other wise>
  5058                                                                                                               
  5059               <xsl:varia ble 
  5060                name="inte rpResult2"
  5061               >
  5062                                                                                                                         
  5063                <xsl:call- template 
  5064                 name="getI nterpretat ion"
  5065                >
  5066                                                                                                                                   
  5067                 <xsl:with- param 
  5068                  name="obse rvation" 
  5069                  select="$r ow/n1:obse rvation"
  5070                 />
  5071                                                                                                                          
  5072                </xsl:call -template>
  5073                                                                                                                
  5074               </xsl:vari able>
  5075                                                                                                               
  5076               <xsl:choos e>
  5077                                                                                                                         
  5078                <xsl:when 
  5079                 test="stri ng-length( $interpRes ult2)>0"
  5080                >
  5081                                                                                                                                   
  5082                 <xsl:call- template 
  5083                  name="flyo verSpan"
  5084                 >
  5085                                                                                                                                             
  5086                  <xsl:with- param 
  5087                   name="data
  5088                   select="$i nterpResul t2"
  5089                  />
  5090                                                                                                                                    
  5091                 </xsl:call -template>
  5092                                                                                                                          
  5093                </xsl:when >
  5094                                                                                                                         
  5095                <xsl:other wise>
  5096                                                                                                                                   
  5097                 <xsl:call- template 
  5098                  name="na"
  5099                 />
  5100                                                                                                                          
  5101                </xsl:othe rwise>
  5102                                                                                                                
  5103               </xsl:choo se>
  5104                                                                                                      
  5105              </xsl:othe rwise>
  5106                                                                                             
  5107             </xsl:choo se>
  5108                                                                                   
  5109            </div>
  5110                                                                         
  5111           </td>
  5112                                                                        
  5113           <!-- ref r ange -->
  5114                                                                        
  5115           <td>
  5116                                                                                  
  5117            <div 
  5118             style="ove rflow:hidd en; white- space:nowr ap; width: 120px;"
  5119            >
  5120                                                                                            
  5121             <xsl:varia ble 
  5122              name="ref"
  5123             >
  5124                                                                                                     
  5125              <xsl:call- template 
  5126               name="getR efRange"
  5127              >
  5128                                                                                                               
  5129               <xsl:with- param 
  5130                name="obse rvation" 
  5131                select="$r ow/n1:obse rvation"
  5132               />
  5133                                                                                                      
  5134              </xsl:call -template>
  5135                                                                                             
  5136             </xsl:vari able>
  5137                                                                                            
  5138             <xsl:choos e>
  5139                                                                                                     
  5140              <xsl:when 
  5141               test="stri ng-length( $ref)>0"
  5142              >
  5143                                                                                                               
  5144               <xsl:call- template 
  5145                name="flyo verSpan"
  5146               >
  5147                                                                                                                         
  5148                <xsl:with- param 
  5149                 name="data
  5150                 select="$r ef"
  5151                />
  5152                                                                                                                
  5153               </xsl:call -template>
  5154                                                                                                      
  5155              </xsl:when >
  5156                                                                                                     
  5157              <xsl:other wise>
  5158                                                                                                               
  5159               <xsl:call- template 
  5160                name="na"
  5161               />
  5162                                                                                                      
  5163              </xsl:othe rwise>
  5164                                                                                             
  5165             </xsl:choo se>
  5166                                                                                   
  5167            </div>
  5168                                                                         
  5169           </td>
  5170                                                                        
  5171           <!-- Resul t Status - ->
  5172                                                                        
  5173           <td>
  5174                                                                                  
  5175            <div 
  5176             style="ove rflow:hidd en; white- space:nowr ap; width: 80px;"
  5177            >
  5178                                                                                            
  5179             <xsl:choos e>
  5180                                                                                                     
  5181              <xsl:when 
  5182               test="stri ng-length( $row/n1:ob servation/ n1:statusC ode/@code) >0"
  5183              >
  5184                                                                                                               
  5185               <xsl:call- template 
  5186                name="flyo verSpan"
  5187               >
  5188                                                                                                                         
  5189                <xsl:with- param 
  5190                 name="data
  5191                 select="$r ow/n1:obse rvation/n1 :statusCod e/@code"
  5192                />
  5193                                                                                                                
  5194               </xsl:call -template>
  5195                                                                                                      
  5196              </xsl:when >
  5197                                                                                                     
  5198              <xsl:other wise>
  5199                                                                                                               
  5200               <xsl:call- template 
  5201                name="na"
  5202               />
  5203                                                                                                      
  5204              </xsl:othe rwise>
  5205                                                                                             
  5206             </xsl:choo se>
  5207                                                                                   
  5208            </div>
  5209                                                                         
  5210           </td>
  5211                                                                        
  5212           <td>
  5213                                                                                  
  5214            <xsl:call- template 
  5215             name="na"
  5216            />
  5217                                                                         
  5218           </td>
  5219                                                               
  5220          </tr>
  5221                                                     
  5222         </xsl:when >
  5223                                            
  5224        </xsl:choo se>
  5225                                  
  5226       </xsl:othe rwise>
  5227                        
  5228      </xsl:choo se>
  5229              
  5230     </xsl:temp late>
  5231    
  5232             
  5233     <!-- immun ization en try row -- >
  5234             
  5235     <xsl:templ ate 
  5236      name="immu nizationsR ow"
  5237     >
  5238                       
  5239      <xsl:param  
  5240       name="row"
  5241      />
  5242                       
  5243      <xsl:varia ble 
  5244       name="rowD ata" 
  5245       select="$r ow/n1:subs tanceAdmin istration/ n1:consuma ble/n1:man ufacturedP roduct/n1: manufactur edMaterial "
  5246      />
  5247                       
  5248      <xsl:varia ble 
  5249       name="rowS ubj" 
  5250       select="$r ow/n1:subs tanceAdmin istration/ n1:entryRe lationship [@typeCode ='SUBJ']/n 1:observat ion"
  5251      />
  5252                       
  5253      <xsl:varia ble 
  5254       name="rowC ause" 
  5255       select="$r ow/n1:subs tanceAdmin istration/ n1:entryRe lationship [@typeCode ='CAUS']/n 1:observat ion"
  5256      />
  5257                       
  5258      <xsl:varia ble 
  5259       name="subs tanceAdmin istration"  
  5260       select="$r ow/n1:subs tanceAdmin istration"
  5261      />
  5262     
  5263                       
  5264      <tr 
  5265       class="sec ond"
  5266      >
  5267                                 
  5268       <!-- name  -->
  5269                                 
  5270       <td>
  5271                                           
  5272        <div 
  5273         style="ove rflow:hidd en; white- space:nowr ap; width: 200px;"
  5274        >
  5275                                                    
  5276         <xsl:varia ble 
  5277          name="immu nizationRe sult"
  5278         >
  5279                                                              
  5280          <xsl:call- template 
  5281           name="getI mmunizatio n"
  5282          >
  5283                                                                        
  5284           <xsl:with- param 
  5285            name="subs tanceAdmin istration"  
  5286            select="$s ubstanceAd ministrati on"
  5287           />
  5288                                                               
  5289          </xsl:call -template>
  5290                                                     
  5291         </xsl:vari able>
  5292                                                    
  5293         <xsl:choos e>
  5294                                                              
  5295          <xsl:when 
  5296           test="stri ng-length( $immunizat ionResult) >0"
  5297          >
  5298                                                                        
  5299           <xsl:call- template 
  5300            name="flyo verSpan"
  5301           >
  5302                                                                                  
  5303            <xsl:with- param 
  5304             name="data
  5305             select="$i mmunizatio nResult"
  5306            />
  5307                                                                         
  5308           </xsl:call -template>
  5309                                                               
  5310          </xsl:when >
  5311                                                              
  5312          <xsl:other wise>
  5313                                                                        
  5314           <xsl:call- template 
  5315            name="na"
  5316           />
  5317                                                               
  5318          </xsl:othe rwise>
  5319                                                     
  5320         </xsl:choo se>
  5321                                            
  5322        </div>
  5323                                  
  5324       </td>
  5325                                 
  5326       <!-- serie s -->
  5327                                 
  5328       <td>
  5329                                           
  5330        <div 
  5331         style="ove rflow:hidd en; white- space:nowr ap; width: 100px;"
  5332        >
  5333                                                    
  5334         <xsl:call- template 
  5335          name="flyo verSpan"
  5336         >
  5337                                                              
  5338          <xsl:with- param 
  5339           name="data
  5340           select="$r owSubj/n1: value"
  5341          />
  5342                                                     
  5343         </xsl:call -template>
  5344                                            
  5345        </div>
  5346                                  
  5347       </td>
  5348                                 
  5349       <!--  effe ctive date  -->
  5350                                 
  5351       <td>
  5352                                           
  5353        <div 
  5354         style="ove rflow:hidd en; white- space:nowr ap; width: 100px;"
  5355        >
  5356                                                    
  5357         <xsl:choos e>
  5358                                                              
  5359          <xsl:when 
  5360           test="stri ng-length( $row/n1:su bstanceAdm inistratio n/n1:effec tiveTime/@ value)=0"
  5361          >
  5362                                                                        
  5363           <xsl:text>
  5364            -- Not Ava ilable --
  5365           </xsl:text >
  5366                                                               
  5367          </xsl:when >
  5368                                                              
  5369          <xsl:other wise>
  5370                                                                        
  5371           <xsl:call- template 
  5372            name="form atDateShor t"
  5373           >
  5374                                                                                  
  5375            <xsl:with- param 
  5376             name="date String" 
  5377             select="$r ow/n1:subs tanceAdmin istration/ n1:effecti veTime/@va lue"
  5378            />
  5379                                                                         
  5380           </xsl:call -template>
  5381                                                               
  5382          </xsl:othe rwise>
  5383                                                     
  5384         </xsl:choo se>
  5385                                            
  5386        </div>
  5387                                  
  5388       </td>
  5389                                 
  5390       <!-- react ion -->
  5391                                 
  5392       <td>
  5393                                           
  5394        <xsl:value -of 
  5395         select="$r owCause/n1 :id//@exte nsion"
  5396        />
  5397                                           
  5398        <div 
  5399         style="ove rflow:hidd en; white- space:nowr ap; width: 260px;"
  5400        >
  5401                                                    
  5402         <xsl:varia ble 
  5403          name="reac tionRefere nce" 
  5404          select="$r owCause/n1 :id/@exten sion"
  5405         />
  5406                                                    
  5407         <xsl:varia ble 
  5408          name="reac tion" 
  5409          select=".. /n1:text// n1:content [@ID=$reac tionRefere nce]"
  5410         />
  5411                                                    
  5412         <xsl:call- template 
  5413          name="flyo verSpan"
  5414         >
  5415                                                              
  5416          <xsl:with- param 
  5417           name="data
  5418           select="$r eaction"
  5419          />
  5420                                                     
  5421         </xsl:call -template>
  5422                                            
  5423        </div>
  5424                                  
  5425       </td>
  5426                                 
  5427       <!-- comme nts -->
  5428                                 
  5429       <td>
  5430                                           
  5431        <xsl:varia ble 
  5432         name="comm entReferen ce" 
  5433         select="$r ow/n1:subs tanceAdmin istration/ n1:text/n1 :reference /@value"
  5434        />
  5435                                           
  5436        <div 
  5437         style="ove rflow:hidd en; white- space:nowr ap; width: 240px;"
  5438        >
  5439                                                    
  5440         <xsl:call- template 
  5441          name="flyo verSpan"
  5442         >
  5443                                                              
  5444          <xsl:with- param 
  5445           name="data
  5446           select=".. /n1:text// n1:content [@ID=$comm entReferen ce]"
  5447          />
  5448                                                     
  5449         </xsl:call -template>
  5450                                            
  5451        </div>
  5452                                  
  5453       </td>
  5454                        
  5455      </tr>
  5456              
  5457     </xsl:temp late>
  5458    
  5459             
  5460     <!-- vital s entry ro w -->
  5461             
  5462     <xsl:templ ate 
  5463      name="vita lsRow"
  5464     >
  5465                       
  5466      <xsl:param  
  5467       name="row"
  5468      />
  5469                       
  5470      <xsl:varia ble 
  5471       name="rowD ata" 
  5472       select="$r ow/n1:orga nizer/n1:c omponent/n 1:observat ion"
  5473      />
  5474                       
  5475      <xsl:varia ble 
  5476       name="heig ht" 
  5477       select="$r ow/n1:orga nizer/n1:c omponent/n 1:observat ion[n1:cod e/@code=$l oincHeight ]"
  5478      />
  5479                       
  5480      <xsl:varia ble 
  5481       name="weig ht" 
  5482       select="$r ow/n1:orga nizer/n1:c omponent/n 1:observat ion[n1:cod e/@code=$l oincWeight ]"
  5483      />
  5484                       
  5485      <xsl:varia ble 
  5486       name="syst olic" 
  5487       select="$r ow/n1:orga nizer/n1:c omponent/n 1:observat ion[n1:cod e/@code=$l oincBpSyst olic]"
  5488      />
  5489                       
  5490      <xsl:varia ble 
  5491       name="dias tolic" 
  5492       select="$r ow/n1:orga nizer/n1:c omponent/n 1:observat ion[n1:cod e/@code=$l oincBpDias tolic]"
  5493      />
  5494                       
  5495      <xsl:varia ble 
  5496       name="temp
  5497       select="$r ow/n1:orga nizer/n1:c omponent/n 1:observat ion[n1:cod e/@code=$l oincTemper ature]"
  5498      />
  5499                       
  5500      <xsl:varia ble 
  5501       name="puls e" 
  5502       select="$r ow/n1:orga nizer/n1:c omponent/n 1:observat ion[n1:cod e/@code=$l oincPulse] "
  5503      />
  5504                       
  5505      <xsl:varia ble 
  5506       name="resp
  5507       select="$r ow/n1:orga nizer/n1:c omponent/n 1:observat ion[n1:cod e/@code=$l oincRespir ation]"
  5508      />
  5509                       
  5510      <xsl:varia ble 
  5511       name="pox"  
  5512       select="$r ow/n1:orga nizer/n1:c omponent/n 1:observat ion[n1:cod e/@code=$l oincPulseO ximetry]"
  5513      />
  5514                       
  5515      <xsl:varia ble 
  5516       name="bloo dPressure"  
  5517       select="$r ow/n1:orga nizer/n1:c omponent/n 1:observat ion[n1:cod e/@code=$l oincBloodP ressure]"
  5518      />
  5519                       
  5520      <xsl:varia ble 
  5521       name="body HtLying" 
  5522       select="$r ow/n1:orga nizer/n1:c omponent/n 1:observat ion[n1:cod e/@code=$l oincBodyHt Lying]"
  5523      />
  5524                       
  5525      <xsl:varia ble 
  5526       name="head CircumOCF"  
  5527       select="$r ow/n1:orga nizer/n1:c omponent/n 1:observat ion[n1:cod e/@code=$l oincOCF]"
  5528      />
  5529                       
  5530      <xsl:varia ble 
  5531       name="weig ht2" 
  5532       select="$r ow/n1:orga nizer/n1:c omponent/n 1:observat ion[n1:cod e/@code=$l oincWeight 2]"
  5533      />
  5534                       
  5535      <tr 
  5536       class="sec ond"
  5537      >
  5538                                 
  5539       <!-- Date  -->
  5540                                 
  5541       <td>
  5542                                           
  5543        <div 
  5544         style="ove rflow:hidd en; white- space:nowr ap; width: 80px;"
  5545        >
  5546                                                    
  5547         <xsl:choos e>
  5548                                                              
  5549          <xsl:when 
  5550           test="stri ng-length( $rowData/n 1:effectiv eTime/@val ue)=0"
  5551          >
  5552                                                                        
  5553           <xsl:text>
  5554            -- Not Ava ilable --
  5555           </xsl:text >
  5556                                                               
  5557          </xsl:when >
  5558                                                              
  5559          <xsl:other wise>
  5560                                                                        
  5561           <xsl:call- template 
  5562            name="form atDateShor t"
  5563           >
  5564                                                                                  
  5565            <xsl:with- param 
  5566             name="date String" 
  5567             select="$r owData/n1: effectiveT ime/@value "
  5568            />
  5569                                                                         
  5570           </xsl:call -template>
  5571                                                               
  5572          </xsl:othe rwise>
  5573                                                     
  5574         </xsl:choo se>
  5575                                            
  5576        </div>
  5577                                  
  5578       </td>                     
  5579                                 
  5580       <!-- temp  -->
  5581                                 
  5582       <td>
  5583                                           
  5584        <div 
  5585         style="ove rflow:hidd en; white- space:nowr ap; width: 70px;"
  5586        >
  5587                                                    
  5588         <xsl:for-e ach 
  5589          select="$t emp"
  5590         >
  5591                                                              
  5592          <xsl:if 
  5593           test="posi tion()>1"
  5594          >
  5595                                                                        
  5596           <br/>
  5597                                                               
  5598          </xsl:if>
  5599                                                              
  5600          <xsl:choos e>
  5601                                                                        
  5602           <xsl:when 
  5603            test="stri ng-length( n1:value/@ value)>1"
  5604           >
  5605                                                                                  
  5606            <xsl:varia ble 
  5607             name="temp Result" 
  5608             select="n1 :value/@va lue"
  5609            />
  5610                                                                                  
  5611            <xsl:choos e>
  5612                                                                                            
  5613             <xsl:when 
  5614              test="n1:v alue/@unit "
  5615             >
  5616                                                                                                     
  5617              <xsl:call- template 
  5618               name="flyo verSpan"
  5619              >
  5620                                                                                                               
  5621               <xsl:with- param 
  5622                name="data
  5623                select="co ncat($temp Result,n1: value/@uni t)"
  5624               />
  5625                                                                                                      
  5626              </xsl:call -template>
  5627                                                                                             
  5628             </xsl:when >
  5629                                                                                            
  5630             <xsl:other wise>
  5631                                                                                                     
  5632              <xsl:call- template 
  5633               name="flyo verSpan"
  5634              >
  5635                                                                                                               
  5636               <xsl:with- param 
  5637                name="data
  5638                select="$t empResult"
  5639               />
  5640                                                                                                      
  5641              </xsl:call -template>
  5642                                                                                             
  5643             </xsl:othe rwise>
  5644                                                                                   
  5645            </xsl:choo se>
  5646                                                                         
  5647           </xsl:when >
  5648                                                                        
  5649           <xsl:other wise>
  5650                                                                                  
  5651            <xsl:call- template 
  5652             name="na"
  5653            />
  5654                                                                         
  5655           </xsl:othe rwise>
  5656                                                               
  5657          </xsl:choo se>
  5658                                                     
  5659         </xsl:for- each>
  5660                                            
  5661        </div>
  5662                                  
  5663       </td>
  5664                                 
  5665       <!-- pulse  -->
  5666                                 
  5667       <td>
  5668                                           
  5669        <div 
  5670         style="ove rflow:hidd en; white- space:nowr ap; width: 70px;"
  5671        >
  5672                                                    
  5673         <xsl:for-e ach 
  5674          select="$p ulse"
  5675         >
  5676                                                              
  5677          <xsl:if 
  5678           test="posi tion()>1"
  5679          >
  5680                                                                        
  5681           <br/>
  5682                                                               
  5683          </xsl:if>
  5684                                                              
  5685          <xsl:choos e>
  5686                                                                        
  5687           <xsl:when 
  5688            test="stri ng-length( n1:value/@ value)>1"
  5689           >
  5690                                                                                  
  5691            <xsl:varia ble 
  5692             name="puls eResult" 
  5693             select="n1 :value/@va lue"
  5694            />
  5695                                                                                  
  5696            <xsl:choos e>
  5697                                                                                            
  5698             <xsl:when 
  5699              test="n1:v alue/@unit "
  5700             >
  5701                                                                                                     
  5702              <xsl:call- template 
  5703               name="flyo verSpan"
  5704              >
  5705                                                                                                               
  5706               <xsl:with- param 
  5707                name="data
  5708                select="co ncat($puls eResult,n1 :value/@un it)"
  5709               />
  5710                                                                                                      
  5711              </xsl:call -template>
  5712                                                                                             
  5713             </xsl:when >
  5714                                                                                            
  5715             <xsl:other wise>
  5716                                                                                                     
  5717              <xsl:call- template 
  5718               name="flyo verSpan"
  5719              >
  5720                                                                                                               
  5721               <xsl:with- param 
  5722                name="data
  5723                select="$p ulseResult "
  5724               />
  5725                                                                                                      
  5726              </xsl:call -template>
  5727                                                                                             
  5728             </xsl:othe rwise>
  5729                                                                                   
  5730            </xsl:choo se>
  5731                                                                         
  5732           </xsl:when >
  5733                                                                        
  5734           <xsl:other wise>
  5735                                                                                  
  5736            <xsl:call- template 
  5737             name="na"
  5738            />
  5739                                                                         
  5740           </xsl:othe rwise>
  5741                                                               
  5742          </xsl:choo se>
  5743                                                     
  5744         </xsl:for- each>
  5745                                            
  5746        </div>
  5747                                  
  5748       </td>
  5749                                 
  5750       <!-- resp  -->
  5751                                 
  5752       <td>
  5753                                           
  5754        <div 
  5755         style="ove rflow:hidd en; white- space:nowr ap; width: 70px;"
  5756        >
  5757                                                    
  5758         <xsl:for-e ach 
  5759          select="$r esp"
  5760         >
  5761                                                              
  5762          <xsl:if 
  5763           test="posi tion()>1"
  5764          >
  5765                                                                        
  5766           <br/>
  5767                                                               
  5768          </xsl:if>
  5769                                                              
  5770          <xsl:choos e>
  5771                                                                        
  5772           <xsl:when 
  5773            test="stri ng-length( n1:value/@ value)>1"
  5774           >
  5775                                                                                  
  5776            <xsl:varia ble 
  5777             name="resp Result" 
  5778             select="n1 :value/@va lue"
  5779            />
  5780                                                                                  
  5781            <xsl:choos e>
  5782                                                                                            
  5783             <xsl:when 
  5784              test="n1:v alue/@unit "
  5785             >
  5786                                                                                                     
  5787              <xsl:call- template 
  5788               name="flyo verSpan"
  5789              >
  5790                                                                                                               
  5791               <xsl:with- param 
  5792                name="data
  5793                select="co ncat($resp Result,n1: value/@uni t)"
  5794               />
  5795                                                                                                      
  5796              </xsl:call -template>
  5797                                                                                             
  5798             </xsl:when >
  5799                                                                                            
  5800             <xsl:other wise>
  5801                                                                                                     
  5802              <xsl:call- template 
  5803               name="flyo verSpan"
  5804              >
  5805                                                                                                               
  5806               <xsl:with- param 
  5807                name="data
  5808                select="$r espResult"
  5809               />
  5810                                                                                                      
  5811              </xsl:call -template>
  5812                                                                                             
  5813             </xsl:othe rwise>
  5814                                                                                   
  5815            </xsl:choo se>
  5816                                                                         
  5817           </xsl:when >
  5818                                                                        
  5819           <xsl:other wise>
  5820                                                                                  
  5821            <xsl:call- template 
  5822             name="na"
  5823            />
  5824                                                                         
  5825           </xsl:othe rwise>
  5826                                                               
  5827          </xsl:choo se>
  5828                                                     
  5829         </xsl:for- each>
  5830                                            
  5831        </div>
  5832                                  
  5833       </td>
  5834                                 
  5835       <!-- BP  s ystolic /  diastolic  -->
  5836                                 
  5837       <td>
  5838                                           
  5839        <div 
  5840         style="ove rflow:hidd en; white- space:nowr ap; width: 70px;"
  5841        >
  5842                                                    
  5843         <xsl:choos e>
  5844                                                              
  5845          <xsl:when 
  5846           test="$sys tolic/n1:v alue/@valu e or $dias tolic/n1:v alue/@valu e or $bloo dPressure/ n1:value/@ value"
  5847          >
  5848                                                                        
  5849           <xsl:call- template 
  5850            name="bpDe tailLister "
  5851           >
  5852                                                                                  
  5853            <xsl:with- param 
  5854             name="syst olics" 
  5855             select="$s ystolic"
  5856            />
  5857                                                                                  
  5858            <xsl:with- param 
  5859             name="dias tolics" 
  5860             select="$d iastolic"
  5861            />
  5862                                                                         
  5863           </xsl:call -template>
  5864                                                                        
  5865           <xsl:if 
  5866            test="$sys tolic/n1:v alue/@valu e and $blo odPressure /n1:value/ @value"
  5867           >
  5868                                                                                  
  5869            <br/>
  5870                                                                         
  5871           </xsl:if>
  5872                                                                        
  5873           <xsl:for-e ach 
  5874            select="$b loodPressu re"
  5875           >
  5876                                                                                  
  5877            <xsl:if 
  5878             test="posi tion()>1"
  5879            >
  5880                                                                                            
  5881             <br/>
  5882                                                                                   
  5883            </xsl:if>
  5884                                                                                  
  5885            <xsl:value -of 
  5886             select="n1 :value/@va lue"
  5887            />
  5888                                                                         
  5889           </xsl:for- each>
  5890                                                               
  5891          </xsl:when >
  5892                                                              
  5893          <xsl:other wise>
  5894                                                                        
  5895           <xsl:call- template 
  5896            name="na"
  5897           />
  5898                                                               
  5899          </xsl:othe rwise>
  5900                                                     
  5901         </xsl:choo se>
  5902                                            
  5903        </div>
  5904                                  
  5905       </td>
  5906                                 
  5907       <!-- heigh t -->
  5908                                 
  5909       <td>
  5910                                           
  5911        <div 
  5912         style="ove rflow:hidd en; white- space:nowr ap; width: 70px;"
  5913        >
  5914                                                    
  5915         <xsl:for-e ach 
  5916          select="$h eight"
  5917         >
  5918                                                              
  5919          <xsl:if 
  5920           test="posi tion()>1"
  5921          >
  5922                                                                        
  5923           <br/>
  5924                                                               
  5925          </xsl:if>
  5926                                                              
  5927          <xsl:choos e>
  5928                                                                        
  5929           <xsl:when 
  5930            test="stri ng-length( n1:value/@ value)>1"
  5931           >
  5932                                                                                  
  5933            <xsl:varia ble 
  5934             name="heig htResult" 
  5935             select="n1 :value/@va lue"
  5936            />
  5937                                                                                  
  5938            <xsl:choos e>
  5939                                                                                            
  5940             <xsl:when 
  5941              test="n1:v alue/@unit "
  5942             >
  5943                                                                                                     
  5944              <xsl:call- template 
  5945               name="flyo verSpan"
  5946              >
  5947                                                                                                               
  5948               <xsl:with- param 
  5949                name="data
  5950                select="co ncat($heig htResult,n 1:value/@u nit)"
  5951               />
  5952                                                                                                      
  5953              </xsl:call -template>
  5954                                                                                             
  5955             </xsl:when >
  5956                                                                                            
  5957             <xsl:other wise>
  5958                                                                                                     
  5959              <xsl:call- template 
  5960               name="flyo verSpan"
  5961              >
  5962                                                                                                               
  5963               <xsl:with- param 
  5964                name="data
  5965                select="$h eightResul t"
  5966               />
  5967                                                                                                      
  5968              </xsl:call -template>
  5969                                                                                             
  5970             </xsl:othe rwise>
  5971                                                                                   
  5972            </xsl:choo se>
  5973                                                                         
  5974           </xsl:when >
  5975                                                                        
  5976           <xsl:other wise>
  5977                                                                                  
  5978            <xsl:call- template 
  5979             name="na"
  5980            />
  5981                                                                         
  5982           </xsl:othe rwise>
  5983                                                               
  5984          </xsl:choo se>
  5985                                                     
  5986         </xsl:for- each>
  5987                                            
  5988        </div>
  5989                                  
  5990       </td>
  5991                                 
  5992       <!-- heigh t lying-->
  5993                                 
  5994       <td>
  5995                                           
  5996        <div 
  5997         style="ove rflow:hidd en; white- space:nowr ap; width: 70px;"
  5998        >
  5999                                                    
  6000         <xsl:for-e ach 
  6001          select="$b odyHtLying "
  6002         >
  6003                                                              
  6004          <xsl:if 
  6005           test="posi tion()>1"
  6006          >
  6007                                                                        
  6008           <br/>
  6009                                                               
  6010          </xsl:if>
  6011                                                              
  6012          <xsl:choos e>
  6013                                                                        
  6014           <xsl:when 
  6015            test="stri ng-length( n1:value/@ value)>1"
  6016           >
  6017                                                                                  
  6018            <xsl:varia ble 
  6019             name="heig htLyResult
  6020             select="n1 :value/@va lue"
  6021            />
  6022                                                                                  
  6023            <xsl:choos e>
  6024                                                                                            
  6025             <xsl:when 
  6026              test="n1:v alue/@unit "
  6027             >
  6028                                                                                                     
  6029              <xsl:call- template 
  6030               name="flyo verSpan"
  6031              >
  6032                                                                                                               
  6033               <xsl:with- param 
  6034                name="data
  6035                select="co ncat($heig htLyResult ,n1:value/ @unit)"
  6036               />
  6037                                                                                                      
  6038              </xsl:call -template>
  6039                                                                                             
  6040             </xsl:when >
  6041                                                                                            
  6042             <xsl:other wise>
  6043                                                                                                     
  6044              <xsl:call- template 
  6045               name="flyo verSpan"
  6046              >
  6047                                                                                                               
  6048               <xsl:with- param 
  6049                name="data
  6050                select="$h eightLyRes ult"
  6051               />
  6052                                                                                                      
  6053              </xsl:call -template>
  6054                                                                                             
  6055             </xsl:othe rwise>
  6056                                                                                   
  6057            </xsl:choo se>
  6058                                                                         
  6059           </xsl:when >
  6060                                                                        
  6061           <xsl:other wise>
  6062                                                                                  
  6063            <xsl:call- template 
  6064             name="na"
  6065            />
  6066                                                                         
  6067           </xsl:othe rwise>
  6068                                                               
  6069          </xsl:choo se>
  6070                                                     
  6071         </xsl:for- each>
  6072                                            
  6073        </div>
  6074                                  
  6075       </td>                     
  6076                                 
  6077       <!-- weigh t -->
  6078                                 
  6079       <td>
  6080                                           
  6081        <div 
  6082         style="ove rflow:hidd en; white- space:nowr ap; width: 70px;"
  6083        >
  6084                                                    
  6085         <xsl:choos e>
  6086                                                              
  6087          <xsl:when 
  6088           test="stri ng-length( $weight2)> 1"
  6089          >
  6090                                                                        
  6091           <xsl:call- template 
  6092            name="getW eightResul t"
  6093           >
  6094                                                                                  
  6095            <xsl:with- param 
  6096             name="wt" 
  6097             select="$w eight2"
  6098            />
  6099                                                                         
  6100           </xsl:call -template>
  6101                                                               
  6102          </xsl:when >
  6103                                                              
  6104          <xsl:other wise>
  6105                                                                        
  6106           <xsl:call- template 
  6107            name="getW eightResul t"
  6108           >
  6109                                                                                  
  6110            <xsl:with- param 
  6111             name="wt" 
  6112             select="$w eight"
  6113            />
  6114                                                                         
  6115           </xsl:call -template>
  6116                                                               
  6117          </xsl:othe rwise>                                                     
  6118                                                     
  6119         </xsl:choo se>
  6120                                            
  6121        </div>
  6122                                  
  6123       </td>
  6124      
  6125      
  6126      
  6127                                 
  6128       <!-- pox - ->
  6129                                 
  6130       <td>
  6131                                           
  6132        <div 
  6133         style="ove rflow:hidd en; white- space:nowr ap; width: 70px;"
  6134        >
  6135                                                    
  6136         <xsl:for-e ach 
  6137          select="$p ox"
  6138         >
  6139                                                              
  6140          <xsl:if 
  6141           test="posi tion()>1"
  6142          >
  6143                                                                        
  6144           <br/>
  6145                                                               
  6146          </xsl:if>
  6147                                                              
  6148          <xsl:choos e>
  6149                                                                        
  6150           <xsl:when 
  6151            test="stri ng-length( n1:value/@ value)>1"
  6152           >
  6153                                                                                  
  6154            <xsl:varia ble 
  6155             name="poxR esult" 
  6156             select="n1 :value/@va lue"
  6157            />
  6158                                                                                  
  6159            <xsl:choos e>
  6160                                                                                            
  6161             <xsl:when 
  6162              test="n1:v alue/@unit "
  6163             >
  6164                                                                                                     
  6165              <xsl:call- template 
  6166               name="flyo verSpan"
  6167              >
  6168                                                                                                               
  6169               <xsl:with- param 
  6170                name="data
  6171                select="co ncat($poxR esult,n1:v alue/@unit )"
  6172               />
  6173                                                                                                      
  6174              </xsl:call -template>
  6175                                                                                             
  6176             </xsl:when >
  6177                                                                                            
  6178             <xsl:other wise>
  6179                                                                                                     
  6180              <xsl:call- template 
  6181               name="flyo verSpan"
  6182              >
  6183                                                                                                               
  6184               <xsl:with- param 
  6185                name="data
  6186                select="$p oxResult"
  6187               />
  6188                                                                                                      
  6189              </xsl:call -template>
  6190                                                                                             
  6191             </xsl:othe rwise>
  6192                                                                                   
  6193            </xsl:choo se>
  6194                                                                         
  6195           </xsl:when >
  6196                                                                        
  6197           <xsl:other wise>
  6198                                                                                  
  6199            <xsl:call- template 
  6200             name="na"
  6201            />
  6202                                                                         
  6203           </xsl:othe rwise>
  6204                                                               
  6205          </xsl:choo se>
  6206                                                     
  6207         </xsl:for- each>
  6208                                            
  6209        </div>
  6210                                  
  6211       </td>
  6212      
  6213                                 
  6214       <!-- OCF - ->
  6215                                 
  6216       <td>
  6217                                           
  6218        <div 
  6219         style="ove rflow:hidd en; white- space:nowr ap; width: 70px;"
  6220        >
  6221                                                    
  6222         <xsl:for-e ach 
  6223          select="$h eadCircumO CF"
  6224         >
  6225                                                              
  6226          <xsl:if 
  6227           test="posi tion()>1"
  6228          >
  6229                                                                        
  6230           <br/>
  6231                                                               
  6232          </xsl:if>
  6233                                                              
  6234          <xsl:choos e>
  6235                                                                        
  6236           <xsl:when 
  6237            test="stri ng-length( n1:value/@ value)>1"
  6238           >
  6239                                                                                  
  6240            <xsl:varia ble 
  6241             name="OCFR esult" 
  6242             select="n1 :value/@va lue"
  6243            />
  6244                                                                                  
  6245            <xsl:choos e>
  6246                                                                                            
  6247             <xsl:when 
  6248              test="n1:v alue/@unit "
  6249             >
  6250                                                                                                     
  6251              <xsl:call- template 
  6252               name="flyo verSpan"
  6253              >
  6254                                                                                                               
  6255               <xsl:with- param 
  6256                name="data
  6257                select="co ncat($OCFR esult,n1:v alue/@unit )"
  6258               />
  6259                                                                                                      
  6260              </xsl:call -template>
  6261                                                                                             
  6262             </xsl:when >
  6263                                                                                            
  6264             <xsl:other wise>
  6265                                                                                                     
  6266              <xsl:call- template 
  6267               name="flyo verSpan"
  6268              >
  6269                                                                                                               
  6270               <xsl:with- param 
  6271                name="data
  6272                select="$O CFResult"
  6273               />
  6274                                                                                                      
  6275              </xsl:call -template>
  6276                                                                                             
  6277             </xsl:othe rwise>
  6278                                                                                   
  6279            </xsl:choo se>
  6280                                                                         
  6281           </xsl:when >
  6282                                                                        
  6283           <xsl:other wise>
  6284                                                                                  
  6285            <xsl:call- template 
  6286             name="na"
  6287            />
  6288                                                                         
  6289           </xsl:othe rwise>
  6290                                                               
  6291          </xsl:choo se>
  6292                                                     
  6293         </xsl:for- each>
  6294                                            
  6295        </div>
  6296                                  
  6297       </td>                     
  6298                                 
  6299                                 
  6300       <!-- sourc e -->
  6301                                 
  6302       <td>
  6303                                           
  6304        <div 
  6305         style="ove rflow:hidd en; white- space:nowr ap; width: 150px;"
  6306        >
  6307                                                    
  6308         <xsl:choos e>
  6309                                                              
  6310          <xsl:when 
  6311           test="stri ng-length( $row/n1:or ganizer/n1 :author/n1 :assignedA uthor/n1:r epresented Organizati on/n1:name )>1"
  6312          >
  6313                                                                        
  6314           <xsl:call- template 
  6315            name="flyo verSpan"
  6316           >
  6317                                                                                  
  6318            <xsl:with- param 
  6319             name="data
  6320             select="$r ow/n1:orga nizer/n1:a uthor/n1:a ssignedAut hor/n1:rep resentedOr ganization /n1:name"
  6321            />
  6322                                                                         
  6323           </xsl:call -template>
  6324                                                               
  6325          </xsl:when >
  6326                                                              
  6327          <xsl:when 
  6328           test="stri ng-length( /n1:Clinic alDocument /n1:author /n1:assign edAuthor/n 1:represen tedOrganiz ation/n1:n ame)>1"
  6329          >
  6330                                                                        
  6331           <xsl:call- template 
  6332            name="flyo verSpan"
  6333           >
  6334                                                                                  
  6335            <xsl:with- param 
  6336             name="data
  6337             select="/n 1:Clinical Document/n 1:author/n 1:assigned Author/n1: represente dOrganizat ion/n1:nam e"
  6338            />
  6339                                                                         
  6340           </xsl:call -template>
  6341                                                               
  6342          </xsl:when >                                                 
  6343                                                              
  6344          <xsl:other wise>
  6345                                                                        
  6346           <xsl:call- template 
  6347            name="na"
  6348           />
  6349                                                               
  6350          </xsl:othe rwise>
  6351                                                     
  6352         </xsl:choo se>
  6353                                            
  6354        </div>
  6355                                  
  6356       </td>
  6357                        
  6358      </tr>
  6359              
  6360     </xsl:temp late>
  6361    
  6362             
  6363     <!--   fly over -->
  6364             
  6365     <xsl:templ ate 
  6366      name="flyo verSpan"
  6367     >
  6368                       
  6369      <xsl:param  
  6370       name="data "
  6371      />
  6372                       
  6373      <xsl:param  
  6374       name="free Text"
  6375      />
  6376                       
  6377      <xsl:param  
  6378       name="deSq uigglefy"
  6379      />
  6380                       
  6381      <xsl:eleme nt 
  6382       name="span "
  6383      >
  6384                                 
  6385       <xsl:attri bute 
  6386        name="onmo useover"
  6387       >
  6388                                           
  6389        <xsl:choos e>
  6390                                                    
  6391         <xsl:when 
  6392          test="$fre eText"
  6393         >
  6394                                                              
  6395          <xsl:text>
  6396           DisplayTip (this,25,- 50,1)
  6397          </xsl:text >
  6398                                                     
  6399         </xsl:when >
  6400                                                    
  6401         <xsl:other wise>
  6402                                                              
  6403          <xsl:text>
  6404           DisplayTip (this,25,- 50,0)
  6405          </xsl:text >
  6406                                                     
  6407         </xsl:othe rwise>
  6408                                            
  6409        </xsl:choo se>
  6410                                  
  6411       </xsl:attr ibute>
  6412                                 
  6413       <xsl:choos e>
  6414                                           
  6415        <xsl:when 
  6416         test="$dat a"
  6417        >
  6418                                                    
  6419         <xsl:choos e>
  6420                                                              
  6421          <xsl:when 
  6422           test="$deS quigglefy"
  6423          >
  6424                                                                        
  6425           <xsl:call- template 
  6426            name="repl aceSquiggl esWithBrea ks"
  6427           >
  6428                                                                                  
  6429            <xsl:with- param 
  6430             name="text
  6431             select="$d ata"
  6432            />
  6433                                                                         
  6434           </xsl:call -template>
  6435                                                               
  6436          </xsl:when >
  6437                                                              
  6438          <xsl:other wise>
  6439                                                                        
  6440           <xsl:value -of 
  6441            select="$d ata"
  6442           />
  6443                                                               
  6444          </xsl:othe rwise>
  6445                                                     
  6446         </xsl:choo se>
  6447                                            
  6448        </xsl:when >
  6449                                           
  6450        <xsl:other wise>
  6451                                                    
  6452         <xsl:call- template 
  6453          name="na"
  6454         />
  6455                                            
  6456        </xsl:othe rwise>
  6457                                  
  6458       </xsl:choo se>
  6459                        
  6460      </xsl:elem ent>
  6461              
  6462     </xsl:temp late>
  6463    
  6464             
  6465     <xsl:templ ate 
  6466      name="repl aceSquiggl esWithBrea ks"
  6467     >
  6468                       
  6469      <xsl:param  
  6470       name="text "
  6471      />
  6472                       
  6473      <xsl:if 
  6474       test="$tex t"
  6475      >
  6476                                 
  6477       <xsl:choos e>
  6478                                           
  6479        <xsl:when 
  6480         test="cont ains($text ,'~')"
  6481        >
  6482                                                    
  6483         <xsl:value -of 
  6484          select="su bstring-be fore($text ,'~')"
  6485         />
  6486                                                    
  6487         <br/>
  6488                                                    
  6489         <xsl:call- template 
  6490          name="repl aceSquiggl esWithBrea ks"
  6491         >
  6492                                                              
  6493          <xsl:with- param 
  6494           name="text
  6495           select="su bstring-af ter($text, '~')"
  6496          />
  6497                                                     
  6498         </xsl:call -template>
  6499                                            
  6500        </xsl:when >
  6501                                           
  6502        <xsl:other wise>
  6503                                                    
  6504         <xsl:value -of 
  6505          select="$t ext"
  6506         />
  6507                                            
  6508        </xsl:othe rwise>
  6509                                  
  6510       </xsl:choo se>
  6511                        
  6512      </xsl:if>
  6513              
  6514     </xsl:temp late>
  6515    
  6516             
  6517     <!--   Tit le  -->
  6518             
  6519     <xsl:templ ate 
  6520      match="n1: title"
  6521     >
  6522                       
  6523      <xsl:varia ble 
  6524       name="comp Found"
  6525      >
  6526                                 
  6527       <xsl:call- template 
  6528        name="comp onentFound "
  6529       >
  6530                                           
  6531        <xsl:with- param 
  6532         name="comp Section" 
  6533         select=".. /."
  6534        />
  6535                                  
  6536       </xsl:call -template>
  6537                        
  6538      </xsl:vari able>
  6539                       
  6540      <xsl:choos e>
  6541                                 
  6542       <xsl:when 
  6543        test="stri ng-length( $compFound )>0"
  6544       >
  6545                                           
  6546        <h3>
  6547                                                    
  6548         <span 
  6549          style="fon t-weight:b old;line-h eight:40%"
  6550         >
  6551                                                              
  6552          <a 
  6553           name="{gen erate-id(. )}" 
  6554           href="#toc "
  6555          >
  6556                                                                        
  6557           <xsl:value -of 
  6558            select="."
  6559           />
  6560                                                               
  6561          </a>
  6562                                                     
  6563         </span>
  6564                                            
  6565        </h3>
  6566                                  
  6567       </xsl:when >
  6568                        
  6569      </xsl:choo se>
  6570              
  6571     </xsl:temp late>
  6572    
  6573             
  6574     <!--   Tex t   -->
  6575             
  6576     <xsl:templ ate 
  6577      match="n1: text"
  6578     >
  6579                       
  6580      <xsl:apply -templates  />
  6581              
  6582     </xsl:temp late>
  6583    
  6584             
  6585     <!--   par agraph  -- >
  6586             
  6587     <xsl:templ ate 
  6588      match="n1: paragraph"
  6589     >
  6590                       
  6591      <p>
  6592                                 
  6593       <xsl:apply -templates />
  6594                        
  6595      </p>
  6596              
  6597     </xsl:temp late>
  6598    
  6599             
  6600     <!--     C ontent w/  deleted te xt is hidd en -->
  6601             
  6602     <xsl:templ ate 
  6603      match="n1: content[@r evised='de lete']"
  6604     />
  6605    
  6606             
  6607     <!--   con tent  -->
  6608             
  6609     <xsl:templ ate 
  6610      match="n1: content"
  6611     >
  6612                       
  6613      <xsl:apply -templates />
  6614              
  6615     </xsl:temp late>
  6616    
  6617    
  6618             
  6619     <!--   lis t  -->
  6620             
  6621     <xsl:templ ate 
  6622      match="n1: list"
  6623     >
  6624                       
  6625      <xsl:if 
  6626       test="n1:c aption"
  6627      >
  6628                                 
  6629       <span 
  6630        style="fon t-weight:b old; "
  6631       >
  6632                                           
  6633        <xsl:apply -templates  
  6634         select="n1 :caption"
  6635        />
  6636                                  
  6637       </span>
  6638                        
  6639      </xsl:if>
  6640                       
  6641      <ul>
  6642                                 
  6643       <xsl:for-e ach 
  6644        select="n1 :item"
  6645       >
  6646                                           
  6647        <li>
  6648                                                    
  6649         <xsl:apply -templates  />
  6650                                            
  6651        </li>
  6652                                  
  6653       </xsl:for- each>
  6654                        
  6655      </ul>
  6656              
  6657     </xsl:temp late>
  6658    
  6659             
  6660     <xsl:templ ate 
  6661      match="n1: list[@list Type='orde red']"
  6662     >
  6663                       
  6664      <xsl:if 
  6665       test="n1:c aption"
  6666      >
  6667                                 
  6668       <span 
  6669        style="fon t-weight:b old; "
  6670       >
  6671                                           
  6672        <xsl:apply -templates  
  6673         select="n1 :caption"
  6674        />
  6675                                  
  6676       </span>
  6677                        
  6678      </xsl:if>
  6679                       
  6680      <ol>
  6681                                 
  6682       <xsl:for-e ach 
  6683        select="n1 :item"
  6684       >
  6685                                           
  6686        <li>
  6687                                                    
  6688         <xsl:apply -templates  />
  6689                                            
  6690        </li>
  6691                                  
  6692       </xsl:for- each>
  6693                        
  6694      </ol>
  6695              
  6696     </xsl:temp late>
  6697    
  6698    
  6699             
  6700     <!--   cap tion  -->
  6701             
  6702     <xsl:templ ate 
  6703      match="n1: caption"
  6704     >
  6705                       
  6706      <xsl:apply -templates />
  6707                       
  6708      <xsl:text>
  6709      
  6710      </xsl:text >
  6711              
  6712     </xsl:temp late>
  6713    
  6714             
  6715     <!--       Tables   - ->
  6716             
  6717     <xsl:templ ate 
  6718      match="n1: table/@*|n 1:thead/@* |n1:tfoot/ @*|n1:tbod y/@*|n1:co lgroup/@*| n1:col/@*| n1:tr/@*|n 1:th/@*|n1 :td/@*"
  6719     >
  6720                       
  6721      <xsl:copy>
  6722      
  6723                                 
  6724       <xsl:copy- of 
  6725        select="@* "
  6726       />
  6727                                 
  6728       <xsl:apply -templates />
  6729                        
  6730      </xsl:copy >
  6731              
  6732     </xsl:temp late>
  6733    
  6734             
  6735     <xsl:templ ate 
  6736      match="n1: table"
  6737     >
  6738                       
  6739      <table>
  6740      
  6741                                 
  6742       <xsl:copy- of 
  6743        select="@* "
  6744       />
  6745                                 
  6746       <xsl:apply -templates />
  6747                        
  6748      </table>
  6749              
  6750     </xsl:temp late>
  6751    
  6752             
  6753     <xsl:templ ate 
  6754      match="n1: thead"
  6755     >
  6756                       
  6757      <thead>
  6758      
  6759                                 
  6760       <xsl:copy- of 
  6761        select="@* "
  6762       />
  6763                                 
  6764       <xsl:apply -templates />
  6765                        
  6766      </thead>
  6767              
  6768     </xsl:temp late>
  6769    
  6770             
  6771     <xsl:templ ate 
  6772      match="n1: tfoot"
  6773     >
  6774                       
  6775      <tfoot>
  6776      
  6777                                 
  6778       <xsl:copy- of 
  6779        select="@* "
  6780       />
  6781                                 
  6782       <xsl:apply -templates />
  6783                        
  6784      </tfoot>
  6785              
  6786     </xsl:temp late>
  6787    
  6788             
  6789     <xsl:templ ate 
  6790      match="n1: tbody"
  6791     >
  6792                       
  6793      <tbody>
  6794      
  6795                                 
  6796       <xsl:copy- of 
  6797        select="@* "
  6798       />
  6799                                 
  6800       <xsl:apply -templates />
  6801                        
  6802      </tbody>
  6803              
  6804     </xsl:temp late>
  6805    
  6806             
  6807     <xsl:templ ate 
  6808      match="n1: colgroup"
  6809     >
  6810                       
  6811      <colgroup>
  6812      
  6813                                 
  6814       <xsl:copy- of 
  6815        select="@* "
  6816       />
  6817                                 
  6818       <xsl:apply -templates />
  6819                        
  6820      </colgroup >
  6821              
  6822     </xsl:temp late>
  6823    
  6824             
  6825     <xsl:templ ate 
  6826      match="n1: col"
  6827     >
  6828                       
  6829      <col>
  6830      
  6831                                 
  6832       <xsl:copy- of 
  6833        select="@* "
  6834       />
  6835                                 
  6836       <xsl:apply -templates />
  6837                        
  6838      </col>
  6839              
  6840     </xsl:temp late>
  6841    
  6842             
  6843     <xsl:templ ate 
  6844      match="n1: tr"
  6845     >
  6846                       
  6847      <tr>
  6848      
  6849                                 
  6850       <xsl:copy- of 
  6851        select="@* "
  6852       />
  6853                                 
  6854       <xsl:apply -templates />
  6855                        
  6856      </tr>
  6857              
  6858     </xsl:temp late>
  6859    
  6860             
  6861     <xsl:templ ate 
  6862      match="n1: th"
  6863     >
  6864                       
  6865      <th>
  6866                                 
  6867       <xsl:copy- of 
  6868        select="@* "
  6869       />
  6870                                 
  6871       <xsl:apply -templates />
  6872                        
  6873      </th>
  6874              
  6875     </xsl:temp late>
  6876    
  6877             
  6878     <xsl:templ ate 
  6879      match="n1: td"
  6880     >
  6881                       
  6882      <td>
  6883                                 
  6884       <xsl:copy- of 
  6885        select="@* "
  6886       />
  6887                                 
  6888       <xsl:apply -templates />
  6889                        
  6890      </td>
  6891              
  6892     </xsl:temp late>
  6893    
  6894             
  6895     <xsl:templ ate 
  6896      match="n1: table/n1:c aption"
  6897     >
  6898                       
  6899      <span 
  6900       style="fon t-weight:b old; "
  6901      >
  6902                                 
  6903       <xsl:apply -templates />
  6904                        
  6905      </span>
  6906              
  6907     </xsl:temp late>
  6908    
  6909             
  6910     <!--   Ren derMultiMe dia 
  6911    
  6912              t his curren tly only h andles GIF 's and JPE G's.  It c ould, howe ver,
  6913              b e extended  by includ ing other  image MIME  types in  the predic ate
  6914              a nd/or by g enerating  <object> o r <applet>  tag with  the correc t
  6915              p arams depe nding on t he media t ype  @ID   =$imageRef      refer encedObjec t
  6916      -->
  6917             
  6918     <xsl:templ ate 
  6919      match="n1: renderMult iMedia"
  6920     >
  6921                       
  6922      <xsl:varia ble 
  6923       name="imag eRef" 
  6924       select="@r eferencedO bject"
  6925      />
  6926                       
  6927      <xsl:choos e>
  6928                                 
  6929       <xsl:when 
  6930        test="//n1 :regionOfI nterest[@I D=$imageRe f]"
  6931       >
  6932                                           
  6933        <!-- Here  is where t he Region  of Interes t image re ferencing  goes -->
  6934                                           
  6935        <xsl:if 
  6936         test='//n1 :regionOfI nterest[@I D=$imageRe f]//n1:obs ervationMe dia/n1:val ue[@mediaT ype="image /gif" or @ mediaType= "image/jpe g"]'
  6937        >
  6938                                                    
  6939         <br 
  6940          clear='all '
  6941         />
  6942                                                    
  6943         <xsl:eleme nt 
  6944          name='img'
  6945         >
  6946                                                              
  6947          <xsl:attri bute 
  6948           name='src'
  6949          >
  6950                                                                        
  6951           <xsl:value -of 
  6952            select='// n1:regionO fInterest[ @ID=$image Ref]//n1:o bservation Media/n1:v alue/n1:re ference/@v alue'
  6953           />
  6954                                                               
  6955          </xsl:attr ibute>
  6956                                                     
  6957         </xsl:elem ent>
  6958                                            
  6959        </xsl:if>
  6960                                  
  6961       </xsl:when >
  6962                                 
  6963       <xsl:other wise>
  6964                                           
  6965        <!-- Here  is where t he direct  MultiMedia  image ref erencing g oes -->
  6966                                           
  6967        <xsl:if 
  6968         test='//n1 :observati onMedia[@I D=$imageRe f]/n1:valu e[@mediaTy pe="image/ gif" or @m ediaType=" image/jpeg "]'
  6969        >
  6970                                                    
  6971         <br 
  6972          clear='all '
  6973         />
  6974                                                    
  6975         <xsl:eleme nt 
  6976          name='img'
  6977         >
  6978                                                              
  6979          <xsl:attri bute 
  6980           name='src'
  6981          >
  6982                                                                        
  6983           <xsl:value -of 
  6984            select='// n1:observa tionMedia[ @ID=$image Ref]/n1:va lue/n1:ref erence/@va lue'
  6985           />
  6986                                                               
  6987          </xsl:attr ibute>
  6988                                                     
  6989         </xsl:elem ent>
  6990                                            
  6991        </xsl:if>
  6992                                  
  6993       </xsl:othe rwise>
  6994                        
  6995      </xsl:choo se>
  6996              
  6997     </xsl:temp late>
  6998    
  6999             
  7000     <!--    St ylecode pr ocessing    
  7001                Supports B old, Under line and I talics dis play
  7002    
  7003     -->
  7004    
  7005             
  7006     <xsl:templ ate 
  7007      match="//n 1:*[@style Code]"
  7008     >
  7009     
  7010                       
  7011      <xsl:if 
  7012       test="@sty leCode='Bo ld'"
  7013      >
  7014                                 
  7015       <xsl:eleme nt 
  7016        name='b'
  7017       >
  7018                                           
  7019        <xsl:apply -templates />
  7020                                  
  7021       </xsl:elem ent>
  7022                        
  7023      </xsl:if>
  7024     
  7025                       
  7026      <xsl:if 
  7027       test="@sty leCode='It alics'"
  7028      >
  7029                                 
  7030       <xsl:eleme nt 
  7031        name='i'
  7032       >
  7033                                           
  7034        <xsl:apply -templates />
  7035                                  
  7036       </xsl:elem ent>
  7037                        
  7038      </xsl:if>
  7039     
  7040                       
  7041      <xsl:if 
  7042       test="@sty leCode='Un derline'"
  7043      >
  7044                                 
  7045       <xsl:eleme nt 
  7046        name='u'
  7047       >
  7048                                           
  7049        <xsl:apply -templates />
  7050                                  
  7051       </xsl:elem ent>
  7052                        
  7053      </xsl:if>
  7054     
  7055                       
  7056      <xsl:if 
  7057       test="cont ains(@styl eCode,'Bol d') and co ntains(@st yleCode,'I talics') a nd not (co ntains(@st yleCode, ' Underline' ))"
  7058      >
  7059                                 
  7060       <xsl:eleme nt 
  7061        name='b'
  7062       >
  7063                                           
  7064        <xsl:eleme nt 
  7065         name='i'
  7066        >
  7067                                                    
  7068         <xsl:apply -templates />
  7069                                            
  7070        </xsl:elem ent>
  7071                                  
  7072       </xsl:elem ent>
  7073                        
  7074      </xsl:if>
  7075     
  7076                       
  7077      <xsl:if 
  7078       test="cont ains(@styl eCode,'Bol d') and co ntains(@st yleCode,'U nderline')  and not ( contains(@ styleCode,  'Italics' ))"
  7079      >
  7080                                 
  7081       <xsl:eleme nt 
  7082        name='b'
  7083       >
  7084                                           
  7085        <xsl:eleme nt 
  7086         name='u'
  7087        >
  7088                                                    
  7089         <xsl:apply -templates />
  7090                                            
  7091        </xsl:elem ent>
  7092                                  
  7093       </xsl:elem ent>
  7094                        
  7095      </xsl:if>
  7096     
  7097                       
  7098      <xsl:if 
  7099       test="cont ains(@styl eCode,'Ita lics') and  contains( @styleCode ,'Underlin e') and no t (contain s(@styleCo de, 'Bold' ))"
  7100      >
  7101                                 
  7102       <xsl:eleme nt 
  7103        name='i'
  7104       >
  7105                                           
  7106        <xsl:eleme nt 
  7107         name='u'
  7108        >
  7109                                                    
  7110         <xsl:apply -templates />
  7111                                            
  7112        </xsl:elem ent>
  7113                                  
  7114       </xsl:elem ent>
  7115                        
  7116      </xsl:if>
  7117     
  7118                       
  7119      <xsl:if 
  7120       test="cont ains(@styl eCode,'Ita lics') and  contains( @styleCode ,'Underlin e') and co ntains(@st yleCode, ' Bold')"
  7121      >
  7122                                 
  7123       <xsl:eleme nt 
  7124        name='b'
  7125       >
  7126                                           
  7127        <xsl:eleme nt 
  7128         name='i'
  7129        >
  7130                                                    
  7131         <xsl:eleme nt 
  7132          name='u'
  7133         >
  7134                                                              
  7135          <xsl:apply -templates />
  7136                                                     
  7137         </xsl:elem ent>
  7138                                            
  7139        </xsl:elem ent>
  7140                                  
  7141       </xsl:elem ent>
  7142                        
  7143      </xsl:if>
  7144     
  7145              
  7146     </xsl:temp late>
  7147    
  7148             
  7149     <!--    Su perscript  or Subscri pt   -->
  7150             
  7151     <xsl:templ ate 
  7152      match="n1: sup"
  7153     >
  7154                       
  7155      <xsl:eleme nt 
  7156       name='sup'
  7157      >
  7158                                 
  7159       <xsl:apply -templates />
  7160                        
  7161      </xsl:elem ent>
  7162              
  7163     </xsl:temp late>
  7164             
  7165     <xsl:templ ate 
  7166      match="n1: sub"
  7167     >
  7168                       
  7169      <xsl:eleme nt 
  7170       name='sub'
  7171      >
  7172                                 
  7173       <xsl:apply -templates />
  7174                        
  7175      </xsl:elem ent>
  7176              
  7177     </xsl:temp late>
  7178    
  7179             
  7180     <!--  Bott omline  -- >
  7181    
  7182             
  7183     <xsl:templ ate 
  7184      name="disp layBottomL ine"
  7185     >
  7186                       
  7187      <p>
  7188                                 
  7189       <xsl:varia ble 
  7190        name="foun d"
  7191       />
  7192                                 
  7193       <xsl:call- template 
  7194        name="getN ame"
  7195       >
  7196                                           
  7197        <xsl:with- param 
  7198         name="name
  7199         select="n1 :legalAuth enticator/ n1:assigne dEntity/n1 :represent edOrganiza tion/n1:na me"
  7200        />
  7201                                  
  7202       </xsl:call -template>
  7203                                 
  7204       <xsl:choos e>
  7205                                           
  7206        <xsl:when 
  7207         test="$fou nd"
  7208        >
  7209                                                    
  7210         <b>
  7211                                                              
  7212          <xsl:text>
  7213           Electronic ally gener ated by: 
  7214          </xsl:text >
  7215                                                              
  7216          <xsl:value -of 
  7217           select="$f ound"
  7218          />
  7219                                                     
  7220         </b>
  7221                                            
  7222        </xsl:when >
  7223                                           
  7224        <xsl:other wise>
  7225                                                    
  7226         <b>
  7227                                                              
  7228          <xsl:text 
  7229           disable-ou tput-escap ing="yes"
  7230          >
  7231           Electronic ally gener ated on:&a mp;nbsp; 
  7232          </xsl:text >
  7233                                                              
  7234          <xsl:value -of 
  7235           select="$f ound"
  7236          />
  7237                                                     
  7238         </b>
  7239                                            
  7240        </xsl:othe rwise>
  7241                                  
  7242       </xsl:choo se>
  7243                                 
  7244       <xsl:choos e>
  7245                                           
  7246        <xsl:when 
  7247         test="stri ng-length( n1:effecti veTime/@va lue)=0"
  7248        >
  7249                                                    
  7250         <xsl:call- template 
  7251          name="na"
  7252         />
  7253                                            
  7254        </xsl:when >
  7255                                           
  7256        <xsl:when 
  7257         test="star ts-with(n1 :effective Time/@valu e,' ')"
  7258        >
  7259                                                    
  7260         <xsl:call- template 
  7261          name="na"
  7262         />
  7263                                            
  7264        </xsl:when >
  7265                                           
  7266        <xsl:other wise>
  7267                                                    
  7268         <xsl:varia ble 
  7269          name="date Found"
  7270         />
  7271                                                    
  7272         <xsl:call- template 
  7273          name="form atDateLong "
  7274         >
  7275                                                              
  7276          <xsl:with- param 
  7277           name="date String" 
  7278           select="n1 :effective Time/@valu e"
  7279          />
  7280                                                     
  7281         </xsl:call -template>
  7282                                                    
  7283         <xsl:if 
  7284          test="($da teFound) a nd not ($f ound)"
  7285         >
  7286                                                              
  7287          <xsl:text 
  7288           disable-ou tput-escap ing="yes"
  7289          >
  7290           &amp;nbsp; on&amp;nbs p; 
  7291          </xsl:text >
  7292                                                              
  7293          <xsl:value -of 
  7294           select="$d ateFound"
  7295          />
  7296                                                     
  7297         </xsl:if>
  7298                                                    
  7299         <xsl:if 
  7300          test="($da teFound) a nd ($found )"
  7301         >
  7302                                                              
  7303          <xsl:value -of 
  7304           select="$d ateFound"
  7305          />
  7306                                                     
  7307         </xsl:if>
  7308                                            
  7309        </xsl:othe rwise>
  7310                                  
  7311       </xsl:choo se>
  7312                        
  7313      </p>
  7314                       
  7315      <div 
  7316       id="TipBox
  7317       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;"
  7318      >
  7319                                 
  7320       <xsl:text 
  7321        disable-ou tput-escap ing="yes"
  7322       >
  7323        &amp;nbsp;
  7324       </xsl:text >
  7325                        
  7326      </div>
  7327              
  7328     </xsl:temp late>
  7329    
  7330             
  7331     <xsl:templ ate 
  7332      match="n1: component/ n1:section [n1:templa teId/@root ='2.16.840 .1.113883. IP          ']/n1:text /n1:table/ n1:tbody"
  7333     >
  7334                       
  7335      <xsl:apply -templates >
  7336                                 
  7337       <xsl:sort 
  7338        select="n1 :td[3]" 
  7339        order="des cending"
  7340       />
  7341                        
  7342      </xsl:appl y-template s>
  7343              
  7344     </xsl:temp late>
  7345    
  7346             
  7347     <xsl:templ ate 
  7348      match="n1: component/ n1:section [n1:templa teId/@root ='2.16.840 .1.113883. IP         ']/n1:text /n1:table/ n1:tbody"
  7349     >
  7350                       
  7351      <xsl:apply -templates >
  7352                                 
  7353       <xsl:sort 
  7354        select="n1 :td[5]" 
  7355        order="des cending"
  7356       />
  7357                        
  7358      </xsl:appl y-template s>
  7359              
  7360     </xsl:temp late>
  7361    
  7362             
  7363     <xsl:templ ate 
  7364      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"
  7365     >
  7366                       
  7367      <xsl:apply -templates >
  7368                                 
  7369       <xsl:sort 
  7370        select="n1 :td[2]" 
  7371        order="des cending"
  7372       />
  7373                        
  7374      </xsl:appl y-template s>
  7375              
  7376     </xsl:temp late>
  7377    
  7378             
  7379     <xsl:templ ate 
  7380      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]"
  7381     >
  7382                       
  7383      <td>
  7384                                 
  7385       <xsl:call- template 
  7386        name="form atDateShor t"
  7387       >
  7388                                           
  7389        <xsl:with- param 
  7390         name="date String"
  7391                                            
  7392         select="te xt()"
  7393        />
  7394                                  
  7395       </xsl:call -template>
  7396                        
  7397      </td>
  7398              
  7399     </xsl:temp late>
  7400    
  7401             
  7402     <xsl:templ ate 
  7403      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]"
  7404     >
  7405                       
  7406      <td>
  7407                                 
  7408       <xsl:call- template 
  7409        name="form atDateShor t"
  7410       >
  7411                                           
  7412        <xsl:with- param 
  7413         name="date String"
  7414                                                     
  7415         select="te xt()"
  7416        />
  7417                                  
  7418       </xsl:call -template>
  7419                        
  7420      </td>
  7421              
  7422     </xsl:temp late>
  7423    
  7424             
  7425     <xsl:templ ate 
  7426      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]"
  7427     >
  7428                       
  7429      <td>
  7430                                 
  7431       <xsl:call- template 
  7432        name="form atDateShor t"
  7433       >
  7434                                           
  7435        <xsl:with- param 
  7436         name="date String"
  7437                                                     
  7438         select="co ncat(subst ring(text( ),1,4),sub string(tex t(),6,2),s ubstring(t ext(),9,2) )"
  7439        />
  7440                                  
  7441       </xsl:call -template>
  7442                        
  7443      </td>
  7444              
  7445     </xsl:temp late>
  7446    
  7447             
  7448     <xsl:templ ate 
  7449      name="na"
  7450     >
  7451                       
  7452      <span 
  7453       title="Not  Available "
  7454      >
  7455                                 
  7456       <xsl:text>
  7457        --
  7458       </xsl:text >
  7459                        
  7460      </span>
  7461              
  7462     </xsl:temp late>
  7463    
  7464             
  7465     <!-- free  text proce ssing -->
  7466    
  7467             
  7468     <xsl:templ ate 
  7469      name="free Text"
  7470     >
  7471                       
  7472      <xsl:param  
  7473       name="text "
  7474      />
  7475     
  7476              
  7477     </xsl:temp late>
  7478    
  7479             
  7480     <xsl:templ ate 
  7481      name="disp lay1LineBr eak"
  7482     >
  7483                       
  7484      <br/>
  7485              
  7486     </xsl:temp late>
  7487    
  7488             
  7489     <xsl:templ ate 
  7490      name="disp layVitalsM ultiSepara tor"
  7491     >
  7492                       
  7493      <xsl:call- template 
  7494       name="disp lay1LineBr eak"
  7495      />
  7496              
  7497     </xsl:temp late>
  7498    
  7499             
  7500     <xsl:templ ate 
  7501      name="disp layVitalRo w"
  7502     >
  7503                       
  7504      <xsl:param  
  7505       name="row"
  7506      />
  7507                       
  7508      <tr 
  7509       class="sec ond"
  7510      >
  7511                                 
  7512       <xsl:call- template 
  7513        name="disp layVitalIt ems"
  7514       >
  7515                                           
  7516        <xsl:with- param 
  7517         name="row"  
  7518         select="$r ow"
  7519        />
  7520                                  
  7521       </xsl:call -template>
  7522                        
  7523      </tr>
  7524              
  7525     </xsl:temp late>
  7526    
  7527             
  7528     <xsl:templ ate 
  7529      name="disp layVitalsD ateItem"
  7530     >
  7531                       
  7532      <xsl:param  
  7533       name="rowD ata"
  7534      />
  7535                       
  7536      <td>
  7537                                 
  7538       <div 
  7539        style="ove rflow:hidd en; white- space:nowr ap; width: 80px;"
  7540       >
  7541                                           
  7542        <xsl:call- template 
  7543         name="disp layVitalsD ate"
  7544        >
  7545                                                    
  7546         <xsl:with- param 
  7547          name="rowD ata" 
  7548          select="$r owData"
  7549         />
  7550                                            
  7551        </xsl:call -template>
  7552                                  
  7553       </div>
  7554                        
  7555      </td>
  7556              
  7557     </xsl:temp late>
  7558    
  7559             
  7560     <xsl:templ ate 
  7561      name="disp layVitalsT empItem"
  7562     >
  7563                       
  7564      <xsl:param  
  7565       name="temp "
  7566      />
  7567                       
  7568      <td>
  7569                                 
  7570       <div 
  7571        style="ove rflow:hidd en; white- space:nowr ap; width: 70px;"
  7572       >
  7573                                           
  7574        <xsl:call- template 
  7575         name="disp layVitalsT emp"
  7576        >
  7577                                                    
  7578         <xsl:with- param 
  7579          name="temp
  7580          select="$t emp"
  7581         />
  7582                                            
  7583        </xsl:call -template>
  7584                                  
  7585       </div>
  7586                        
  7587      </td>
  7588              
  7589     </xsl:temp late>
  7590    
  7591             
  7592     <xsl:templ ate 
  7593      name="disp layVitalsS ourceItem"
  7594     >
  7595                       
  7596      <xsl:param  
  7597       name="row"
  7598      />
  7599                       
  7600      <td>
  7601                                 
  7602       <div 
  7603        style="ove rflow:hidd en; white- space:nowr ap; width: 150px;"
  7604       >
  7605                                           
  7606        <xsl:call- template 
  7607         name="disp layVitalsS ource"
  7608        >
  7609                                                    
  7610         <xsl:with- param 
  7611          name="row"  
  7612          select="$r ow"
  7613         />
  7614                                            
  7615        </xsl:call -template>
  7616                                  
  7617       </div>
  7618                        
  7619      </td>
  7620              
  7621     </xsl:temp late>
  7622    
  7623             
  7624     <xsl:templ ate 
  7625      name="disp layVitalsP oxItem"
  7626     >
  7627                       
  7628      <xsl:param  
  7629       name="pox"
  7630      />
  7631                       
  7632      <td>
  7633                                 
  7634       <div 
  7635        style="ove rflow:hidd en; white- space:nowr ap; width: 70px;"
  7636       >
  7637                                           
  7638        <xsl:call- template 
  7639         name="disp layVitalsP ox"
  7640        >
  7641                                                    
  7642         <xsl:with- param 
  7643          name="pox"  
  7644          select="$p ox"
  7645         />
  7646                                            
  7647        </xsl:call -template>
  7648                                  
  7649       </div>
  7650                        
  7651      </td>
  7652              
  7653     </xsl:temp late>
  7654    
  7655             
  7656     <xsl:templ ate 
  7657      name="disp layVitalsW eightItem"
  7658     >
  7659                       
  7660      <xsl:param  
  7661       name="weig ht"
  7662      />
  7663                       
  7664      <td>
  7665                                 
  7666       <div 
  7667        style="ove rflow:hidd en; white- space:nowr ap; width: 70px;"
  7668       >
  7669                                           
  7670        <xsl:call- template 
  7671         name="disp layVitalsW eight"
  7672        >
  7673                                                    
  7674         <xsl:with- param 
  7675          name="weig ht" 
  7676          select="$w eight"
  7677         />
  7678                                            
  7679        </xsl:call -template>
  7680                                  
  7681       </div>
  7682                        
  7683      </td>
  7684              
  7685     </xsl:temp late>
  7686    
  7687             
  7688     <xsl:templ ate 
  7689      name="disp layVitalsH eightItem"
  7690     >
  7691                       
  7692      <xsl:param  
  7693       name="heig ht"
  7694      />
  7695                       
  7696      <td>
  7697                                 
  7698       <div 
  7699        style="ove rflow:hidd en; white- space:nowr ap; width: 70px;"
  7700       >
  7701                                           
  7702        <xsl:call- template 
  7703         name="disp layVitalsH eight"
  7704        >
  7705                                                    
  7706         <xsl:with- param 
  7707          name="heig ht" 
  7708          select="$h eight"
  7709         />
  7710                                            
  7711        </xsl:call -template>
  7712                                  
  7713       </div>
  7714                        
  7715      </td>
  7716              
  7717     </xsl:temp late>
  7718    
  7719             
  7720     <xsl:templ ate 
  7721      name="disp layVitalsB pItem"
  7722     >
  7723                       
  7724      <xsl:param  
  7725       name="row"
  7726      />
  7727                       
  7728      <td>
  7729                                 
  7730       <div 
  7731        style="ove rflow:hidd en; white- space:nowr ap; width: 70px;"
  7732       >
  7733                                           
  7734        <xsl:call- template 
  7735         name="disp layVitalsB p"
  7736        >
  7737                                                    
  7738         <xsl:with- param 
  7739          name="row"  
  7740          select="$r ow"
  7741         />
  7742                                            
  7743        </xsl:call -template>
  7744                                  
  7745       </div>
  7746                        
  7747      </td>
  7748              
  7749     </xsl:temp late>
  7750    
  7751             
  7752     <xsl:templ ate 
  7753      name="disp layVitalsR espItem"
  7754     >
  7755                       
  7756      <xsl:param  
  7757       name="resp "
  7758      />
  7759                       
  7760      <td>
  7761                                 
  7762       <div 
  7763        style="ove rflow:hidd en; white- space:nowr ap; width: 70px;"
  7764       >
  7765                                           
  7766        <xsl:call- template 
  7767         name="disp layVitalsR esp"
  7768        >
  7769                                                    
  7770         <xsl:with- param 
  7771          name="resp
  7772          select="$r esp"
  7773         />
  7774                                            
  7775        </xsl:call -template>
  7776                                  
  7777       </div>
  7778                        
  7779      </td>
  7780              
  7781     </xsl:temp late>
  7782    
  7783             
  7784     <xsl:templ ate 
  7785      name="disp layVitalsP ulseItem"
  7786     >
  7787                       
  7788      <xsl:param  
  7789       name="puls e"
  7790      />
  7791                       
  7792      <td>
  7793                                 
  7794       <div 
  7795        style="ove rflow:hidd en; white- space:nowr ap; width: 70px;"
  7796       >
  7797                                           
  7798        <xsl:call- template 
  7799         name="disp layVitalsP ulse"
  7800        >
  7801                                                    
  7802         <xsl:with- param 
  7803          name="puls e" 
  7804          select="$p ulse"
  7805         />
  7806                                            
  7807        </xsl:call -template>
  7808                                  
  7809       </div>
  7810                        
  7811      </td>
  7812              
  7813     </xsl:temp late>
  7814    
  7815             
  7816     <xsl:templ ate 
  7817      name="getW eightResul t"
  7818     >
  7819                       
  7820      <xsl:param  
  7821       name="wt" 
  7822      />
  7823                       
  7824      <xsl:for-e ach 
  7825       select="$w t"
  7826      >
  7827                                 
  7828       <xsl:if 
  7829        test="posi tion()>1"
  7830       >
  7831                                           
  7832        <br/>
  7833                                  
  7834       </xsl:if>
  7835                                 
  7836       <xsl:choos e>
  7837                                           
  7838        <xsl:when 
  7839         test="stri ng-length( n1:value/@ value)>1"
  7840        >
  7841                                                    
  7842         <xsl:varia ble 
  7843          name="weig htResult" 
  7844          select="n1 :value/@va lue"
  7845         />
  7846                                                    
  7847         <xsl:choos e>
  7848                                                              
  7849          <xsl:when 
  7850           test="n1:v alue/@unit "
  7851          >
  7852                                                                        
  7853           <xsl:call- template 
  7854            name="flyo verSpan"
  7855           >
  7856                                                                                  
  7857            <xsl:with- param 
  7858             name="data
  7859             select="co ncat($weig htResult,n 1:value/@u nit)"
  7860            />
  7861                                                                         
  7862           </xsl:call -template>
  7863                                                               
  7864          </xsl:when >
  7865                                                              
  7866          <xsl:other wise>
  7867                                                                        
  7868           <xsl:call- template 
  7869            name="flyo verSpan"
  7870           >
  7871                                                                                  
  7872            <xsl:with- param 
  7873             name="data
  7874             select="$w eightResul t"
  7875            />
  7876                                                                         
  7877           </xsl:call -template>
  7878                                                               
  7879          </xsl:othe rwise>
  7880                                                     
  7881         </xsl:choo se>
  7882                                            
  7883        </xsl:when >
  7884                                           
  7885        <xsl:other wise>
  7886                                                    
  7887         <xsl:call- template 
  7888          name="na"
  7889         />
  7890                                            
  7891        </xsl:othe rwise>
  7892                                  
  7893       </xsl:choo se>
  7894                        
  7895      </xsl:for- each>
  7896     
  7897              
  7898     </xsl:temp late>
  7899    
  7900   </xsl:styl esheet>
  7901