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

302.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 detailCommon.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 detailCommon.xsl Mon Apr 3 14:39:54 2017 UTC

302.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 6 2764
Changed 5 10
Inserted 0 0
Removed 0 0

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

302.4 Active regular expressions

No regular expressions were active.

302.5 Comparison detail

  1   <?xml 
  2     version="1 .0" 
  3     encoding=" utf-8"
  4   ?>
  5  
  6   <xsl:style sheet 
  7     version="1 .0"
  8           
  9     xmlns:n1=" urn:hl7-or g:v3"
  10           
  11     xmlns:xsi= "http://ww w.w3.org/2 001/XMLSch ema-instan ce"
  12           
  13     xmlns:xsl= "http://ww w.w3.org/1 999/XSL/Tr ansform"
  14   >
  15    
  16       
  17     <xsl:impor
  18      href="nhin Common.xsl "
  19     />
  20       
  21     <xsl:impor
  22      href="../C ommon.xsl"
  23     />
  24    
  25       
  26     <xsl:varia ble 
  27      name="snom edCode"
  28     >
  29      2.16.840.1 .113883.6. 96
  30     </xsl:vari able>
  31       
  32     <xsl:varia ble 
  33      name="snom edProblemC ode"
  34     >
  35      55607006
  36     </xsl:vari able>
  37       
  38     <xsl:varia ble 
  39      name="snom edProblemC ode2"
  40     >
  41      404684003
  42     </xsl:vari able>
  43       
  44     <xsl:varia ble 
  45      name="snom edProblemC ode3"
  46     >
  47      418799008
  48     </xsl:vari able>
  49       
  50     <xsl:varia ble 
  51      name="snom edAllergyC ode"
  52     >
  53      416098002
  54     </xsl:vari able>
  55    
  56       
  57     <xsl:varia ble 
  58      name="loin cCode"
  59     >
  60      2.16.840.1 .113883.6. 1
  61     </xsl:vari able>
  62       
  63     <xsl:varia ble 
  64      name="loin cProblemCo de"
  65     >
  66      11450-4
  67     </xsl:vari able>
  68       
  69     <xsl:varia ble 
  70      name="loin cAllergyCo de"
  71     >
  72      48765-2
  73     </xsl:vari able>
  74       
  75     <xsl:varia ble 
  76      name="loin cMedCode"
  77     >
  78      10160-0
  79     </xsl:vari able>
  80       
  81     <xsl:varia ble 
  82      name="loin cEncounter Code"
  83     >
  84      46240-8
  85     </xsl:vari able>
  86       
  87     <xsl:varia ble 
  88      name="loin cResultsCo de"
  89     >
  90      30954-2
  91     </xsl:vari able>
  92       
  93     <xsl:varia ble 
  94      name="loin cProcedure sCode"
  95     >
  96      47519-4
  97     </xsl:vari able>
  98       
  99     <xsl:varia ble 
  100      name="loin cImmunizat ionsCode"
  101     >
  102      11369-6
  103     </xsl:vari able>
  104       
  105     <xsl:varia ble 
  106      name="loin cVitalsCod e"
  107     >
  108      8716-3
  109     </xsl:vari able>
  110    
  111       
  112     <!-- vital s -->
  113       
  114     <xsl:varia ble 
  115      name="loin cTemperatu re"
  116     >
  117      8310-5
  118     </xsl:vari able>
  119       
  120     <xsl:varia ble 
  121      name="loin cHeight"
  122     >
  123      8302-2
  124     </xsl:vari able>
  125       
  126     <xsl:varia ble 
  127      name="loin cWeight"
  128     >
  129      3141-9
  130     </xsl:vari able>
  131       
  132     <xsl:varia ble 
  133      name="loin cPulse"
  134     >
  135      8867-4
  136     </xsl:vari able>
  137       
  138     <xsl:varia ble 
  139      name="loin cRespirati on"
  140     >
  141      9279-1
  142     </xsl:vari able>
  143       
  144     <xsl:varia ble 
  145      name="loin cPulseOxim etry"
  146     >
  147      2710-2
  148     </xsl:vari able>
  149       
  150     <xsl:varia ble 
  151      name="loin cBloodGluc ose"
  152     >
  153      2339-0
  154     </xsl:vari able>
  155       
  156     <xsl:varia ble 
  157      name="loin cBloodPres sure"
  158     >
  159      55284-4
  160     </xsl:vari able>
  161       
  162     <xsl:varia ble 
  163      name="loin cBmi1"
  164     >
  165      39156-5
  166     </xsl:vari able>
  167       
  168     <xsl:varia ble 
  169      name="loin cBmi2"
  170     >
  171      41909-3
  172     </xsl:vari able>
  173       
  174     <xsl:varia ble 
  175      name="loin cCentralVe nousPressu re"
  176     >
  177      8591-0
  178     </xsl:vari able>
  179       
  180     <xsl:varia ble 
  181      name="loin cCircGirth "
  182     >
  183      8280-0
  184     </xsl:vari able>
  185       
  186     <xsl:varia ble 
  187      name="loin cFlowRate"
  188     >
  189      3151-8
  190     </xsl:vari able>
  191       
  192     <xsl:varia ble 
  193      name="loin cO2Concent ration"
  194     >
  195      3150-0
  196     </xsl:vari able>
  197       
  198     <xsl:varia ble 
  199      name="loin cPain"
  200     >
  201      32419-4
  202     </xsl:vari able>
  203       
  204     <xsl:varia ble 
  205      name="loin cBpSystoli c"
  206     >
  207      8480-6
  208     </xsl:vari able>
  209       
  210     <xsl:varia ble 
  211      name="loin cBpDiastol ic"
  212     >
  213      8462-4
  214     </xsl:vari able>
  215       
  216     <xsl:varia ble 
  217      name="loin cBodyHtLyi ng"
  218     >
  219      8306-3
  220     </xsl:vari able>
  221       
  222     <xsl:varia ble 
  223      name="loin cOCF"
  224     >
  225      8287-5
  226     </xsl:vari able>
  227       
  228     <xsl:varia ble 
  229      name="loin cWeight2"
  230     >
  231      29463-7
  232     </xsl:vari able>
  233    
  234       
  235     <xsl:varia ble 
  236      name="vita lsTemplate Code"
  237     >
  238      2.16.840.1 .113883. IP         
  239     </xsl:vari able>
  240       
  241     <xsl:varia ble 
  242      name="labs TemplateCo de"
  243     >
  244      2.16.840.1 .113883. IP         
  245     </xsl:vari able>
  246       
  247     <xsl:varia ble 
  248      name="immu nizationsT emplateCod e"
  249     >
  250      2.16.840.1 .113883. IP         
  251     </xsl:vari able>
  252       
  253     <xsl:varia ble 
  254      name="alle rgyTemplat eCode"
  255     >
  256      2.16.840.1 .113883. IP         
  257     </xsl:vari able>
  258       
  259     <xsl:varia ble 
  260      name="prob lemTemplat eCode"
  261     >
  262      2.16.840.1 .113883. IP         
  263     </xsl:vari able>
  264    
  265       
  266     <xsl:varia ble 
  267      name="row"
  268     >
  269      "ClinicalD ocument/"
  270     </xsl:vari able>
  271    
  272       
  273     <xsl:varia ble 
  274      name="titl e"
  275     >
  276          
  277      <xsl:choos e>
  278             
  279       <xsl:when 
  280        test="stri ng-length( /n1:Clinic alDocument /n1:title) =0"
  281       >
  282                
  283        <xsl:text>
  284         Clinical D ocument
  285        </xsl:text >
  286              
  287       </xsl:when >
  288             
  289       <xsl:when 
  290        test="/n1: ClinicalDo cument/n1: title"
  291       >
  292                
  293        <xsl:value -of 
  294         select="/n 1:Clinical Document/n 1:title"
  295        />
  296              
  297       </xsl:when >
  298           
  299      </xsl:choo se>
  300        
  301     </xsl:vari able>
  302    
  303       
  304     <xsl:templ ate 
  305      name="faci lityName"
  306     >
  307          
  308      <xsl:value -of 
  309       select="/n 1:Clinical Document/n 1:author/n 1:assigned Author/n1: represente dOrganizat ion/n1:nam e"
  310      />
  311        
  312     </xsl:temp late>
  313    
  314       
  315     <xsl:templ ate 
  316      name="getL ocationNam e"
  317     >
  318          
  319      <xsl:param  
  320       name="orga nizer"
  321      />
  322          
  323      <xsl:choos e>
  324             
  325       <xsl:when 
  326        test="$org anizer/n1: author/n1: assignedAu thor/n1:re presentedO rganizatio n/n1:name"
  327       >
  328                
  329        <xsl:value -of 
  330         select="$o rganizer/n 1:author/n 1:assigned Author/n1: represente dOrganizat ion/n1:nam e"
  331        />
  332              
  333       </xsl:when >
  334             
  335       <xsl:when 
  336        test="$org anizer/n1: performer/ n1:assigne dEntity/n1 :represent edOrganiza tion/n1:na me"
  337       >
  338                
  339        <xsl:value -of 
  340         select="$o rganizer/n 1:performe r/n1:assig nedEntity/ n1:represe ntedOrgani zation/n1: name"
  341        />
  342              
  343       </xsl:when >
  344           
  345      </xsl:choo se>
  346        
  347     </xsl:temp late>
  348    
  349       
  350     <!-- Medic ations -->
  351    
  352       
  353     <xsl:templ ate 
  354      name="medS tatus"
  355     >
  356          
  357      <xsl:param  
  358       name="subs tanceAdmin "
  359      />
  360          
  361      <xsl:varia ble 
  362       name="stat us"
  363      >
  364             
  365       <xsl:call- template 
  366        name="getM edStatusSt ring"
  367       >
  368                
  369        <xsl:with- param 
  370         name="subs tanceAdmin
  371         select="$s ubstanceAd min"
  372        />
  373              
  374       </xsl:call -template>
  375           
  376      </xsl:vari able>
  377          
  378      <xsl:choos e>
  379             
  380       <xsl:when 
  381        test="stri ng-length( $status)&g t;0"
  382       >
  383                
  384        <xsl:value -of 
  385         select="$s tatus"
  386        />
  387              
  388       </xsl:when >
  389             
  390       <xsl:other wise>
  391                
  392        <xsl:call- template 
  393         name="na"
  394        />
  395              
  396       </xsl:othe rwise>
  397           
  398      </xsl:choo se>
  399        
  400     </xsl:temp late>
  401    
  402       
  403     <xsl:templ ate 
  404      name="medQ uantity"
  405     >
  406          
  407      <xsl:param  
  408       name="subs tanceAdmin "
  409      />
  410          
  411      <xsl:varia ble 
  412       name="qtyS tring"
  413      >
  414             
  415       <xsl:call- template 
  416        name="getM edQuantity String"
  417       >
  418                
  419        <xsl:with- param 
  420         name="subs tanceAdmin
  421         select="$s ubstanceAd min"
  422        />
  423              
  424       </xsl:call -template>
  425           
  426      </xsl:vari able>
  427          
  428      <xsl:choos e>
  429             
  430       <xsl:when 
  431        test="stri ng-length( $qtyString )>0"
  432       >
  433                
  434        <xsl:value -of 
  435         select="$q tyString"
  436        />
  437              
  438       </xsl:when >
  439             
  440       <xsl:other wise>
  441                
  442        <xsl:call- template 
  443         name="na"
  444        />
  445              
  446       </xsl:othe rwise>
  447           
  448      </xsl:choo se>
  449        
  450     </xsl:temp late>
  451    
  452       
  453     <xsl:templ ate 
  454      name="medB egintime"
  455     >
  456          
  457      <xsl:param  
  458       name="row"
  459      />
  460          
  461      <xsl:varia ble 
  462       name="medB eginString "
  463      >
  464             
  465       <xsl:call- template 
  466        name="medD ateBeginSt ring"
  467       >
  468                
  469        <xsl:with- param 
  470         name="subs tanceAdmin
  471         select="$r ow/n1:subs tanceAdmin istration"
  472        />
  473              
  474       </xsl:call -template>
  475           
  476      </xsl:vari able>
  477          
  478      <xsl:choos e>
  479             
  480       <xsl:when 
  481        test="stri ng-length( $medBeginS tring)&gt; 1"
  482       >
  483                
  484        <xsl:call- template 
  485         name="form atDateShor t"
  486        >
  487                   
  488         <xsl:with- param 
  489          name="date String" 
  490          select="$m edBeginStr ing"
  491         />
  492                 
  493        </xsl:call -template>
  494              
  495       </xsl:when >
  496             
  497       <xsl:other wise>
  498                
  499        <xsl:call- template 
  500         name="na"
  501        />
  502              
  503       </xsl:othe rwise>
  504           
  505      </xsl:choo se>
  506        
  507     </xsl:temp late>
  508    
  509       
  510     <xsl:templ ate 
  511      name="medE xpiretime"
  512     >
  513          
  514      <xsl:param  
  515       name="subs tanceAdmin "
  516      />
  517          
  518      <xsl:varia ble 
  519       name="medE xpireStrin g"
  520      >
  521             
  522       <xsl:call- template 
  523        name="medE xpireDateS tring"
  524       >
  525                
  526        <xsl:with- param 
  527         name="subs tanceAdmin
  528         select="$s ubstanceAd min"
  529        />
  530              
  531       </xsl:call -template>
  532           
  533      </xsl:vari able>
  534          
  535      <xsl:choos e>
  536             
  537       <xsl:when 
  538        test="stri ng-length( $medExpire String)>1"
  539       >
  540                
  541        <xsl:call- template 
  542         name="form atDateShor t"
  543        >
  544                   
  545         <xsl:with- param 
  546          name="date String" 
  547          select="$m edExpireSt ring"
  548         />
  549                 
  550        </xsl:call -template>
  551              
  552       </xsl:when >
  553             
  554       <xsl:other wise>
  555                
  556        <xsl:call- template 
  557         name="na"
  558        />
  559              
  560       </xsl:othe rwise>
  561           
  562      </xsl:choo se>
  563        
  564     </xsl:temp late>
  565    
  566       
  567     <!-- Probl ems -->
  568    
  569       
  570     <xsl:templ ate 
  571      name="prob Status"
  572     >
  573          
  574      <xsl:param  
  575       name="row"
  576      />
  577          
  578      <xsl:choos e>
  579             
  580       <xsl:when 
  581        test="$row /n1:act/n1 :entryRela tionship [ @typeCode= 'SUBJ']/n1 :observati on [@moodC ode='EVN']  [@classCo de='OBS']/ n1:statusC ode/@code"
  582       >
  583                
  584        <xsl:value -of 
  585         select="$r ow/n1:act/ n1:entryRe lationship  [@typeCod e='SUBJ']/ n1:observa tion [@moo dCode='EVN '] [@class Code='OBS' ]/n1:statu sCode/@cod e"
  586        />
  587              
  588       </xsl:when >
  589             
  590       <xsl:when 
  591        test="$row /n1:act/n1 :entryRela tionship[@ typeCode=' SUBJ']/n1: observatio n/n1:entry Relationsh ip[@typeCo de='REFR'] /n1:observ ation/n1:v alue/@disp layName"
  592       >
  593                
  594        <xsl:value -of 
  595         select="$r ow/n1:act/ n1:entryRe lationship [@typeCode ='SUBJ']/n 1:observat ion/n1:ent ryRelation ship[@type Code='REFR ']/n1:obse rvation/n1 :value/@di splayName"
  596        />
  597              
  598       </xsl:when >
  599             
  600       <xsl:when 
  601        test="$row /n1:act/n1 :entryRela tionship[@ typeCode=' REFR']/n1: observatio n/n1:value /@displayN ame"
  602       >
  603                
  604        <xsl:value -of 
  605         select="$r ow/n1:act/ n1:entryRe lationship [@typeCode ='REFR']/n 1:observat ion/n1:val ue/@displa yName"
  606        />
  607              
  608       </xsl:when >
  609             
  610       <xsl:when 
  611        test="$row /n1:act/n1 :entryRela tionship[@ typeCode=' SUBJ']/n1: observatio n/n1:value /@displayN ame"
  612       >
  613                
  614        <xsl:value -of 
  615         select="$r ow/n1:act/ n1:entryRe lationship [@typeCode ='SUBJ']/n 1:observat ion/n1:val ue/@displa yName"
  616        />
  617              
  618       </xsl:when >
  619             
  620       <xsl:when 
  621        test="$row /n1:act/n1 :entryRela tionship[@ typeCode=' SUBJ']/n1: observatio n/n1:statu sCode/@cod e"
  622       >
  623                
  624        <xsl:value -of 
  625         select="$r ow/n1:act/ n1:entryRe lationship [@typeCode ='SUBJ']/n 1:observat ion/n1:sta tusCode/@c ode"
  626        />
  627              
  628       </xsl:when >
  629             
  630       <xsl:other wise>
  631                
  632        <xsl:call- template 
  633         name="na"
  634        />
  635              
  636       </xsl:othe rwise>
  637           
  638      </xsl:choo se>
  639        
  640     </xsl:temp late>
  641    
  642       
  643     <xsl:templ ate 
  644      name="prob Date"
  645     >
  646          
  647      <xsl:param  
  648       name="row"
  649      />
  650          
  651      <xsl:varia ble 
  652       name="rawD ate"
  653      >
  654             
  655       <xsl:call- template 
  656        name="getP roblemOnse tDateStrin g"
  657       >
  658                
  659        <xsl:with- param 
  660         name="act"  
  661         select="$r ow/n1:act"
  662        />
  663              
  664       </xsl:call -template>
  665           
  666      </xsl:vari able>
  667          
  668      <xsl:choos e>
  669             
  670       <xsl:when 
  671        test="stri ng-length( $rawDate)> 1"
  672       >
  673                
  674        <xsl:call- template 
  675         name="form atDateShor t"
  676        >
  677                   
  678         <xsl:with- param 
  679          name="date String" 
  680          select="$r awDate"
  681         />
  682                 
  683        </xsl:call -template>
  684              
  685       </xsl:when >
  686             
  687       <xsl:other wise>
  688                
  689        <xsl:call- template 
  690         name="na"
  691        />
  692              
  693       </xsl:othe rwise>
  694           
  695      </xsl:choo se>
  696        
  697     </xsl:temp late>
  698    
  699       
  700     <!-- Aller gies -->
  701    
  702       
  703     <xsl:templ ate 
  704      name="alle rgyType"
  705     >
  706          
  707      <xsl:param  
  708       name="obse rvation"
  709      />
  710          
  711      <xsl:choos e>
  712             
  713       <xsl:when 
  714        test="$obs ervation/n 1:code/@di splayName  and not ($ isKaiser)"
  715       >
  716                
  717        <xsl:value -of 
  718         select="$o bservation /n1:code/@ displayNam e"
  719        />
  720              
  721       </xsl:when >
  722             
  723       <xsl:other wise>
  724                
  725        <xsl:call- template 
  726         name="na"
  727        />
  728              
  729       </xsl:othe rwise>
  730           
  731      </xsl:choo se>
  732        
  733     </xsl:temp late>
  734    
  735       
  736     <xsl:templ ate 
  737      name="getR eactionStr ing"
  738     >
  739          
  740      <xsl:param  
  741       name="entr y"
  742      />
  743          
  744      <xsl:varia ble 
  745       name="path
  746       select="$e ntry/.."
  747      />
  748          
  749      <xsl:for-e ach 
  750       select="$e ntry/n1:ac t/n1:entry Relationsh ip[@typeCo de='MFST'] "
  751      >
  752             
  753       <xsl:varia ble 
  754        name="reac tionRefere nce" 
  755        select="n1 :observati on/n1:text /n1:refere nce/@value "
  756       />
  757             
  758       <xsl:varia ble 
  759        name="reac tionValue"  
  760        select="$p ath/n1:tex t//n1:cont ent[@ID=$r eactionRef erence]"
  761       />
  762             
  763       <xsl:varia ble 
  764        name="reac tionValue2
  765        select="$p ath/n1:tex t//n1:cont ent[@ID=su bstring-af ter($react ionReferen ce,'#')]"
  766       />
  767             
  768       <xsl:if 
  769        test="stri ng-length( $reactionV alue)>1 an d not($isK aiser)"
  770       >
  771                
  772        <xsl:if 
  773         test="posi tion()>1"
  774        >
  775                   
  776         <xsl:text>
  777         
  778         </xsl:text >
  779                 
  780        </xsl:if>
  781                
  782        <xsl:value -of 
  783         select="$r eactionVal ue"
  784        />
  785              
  786       </xsl:if>
  787             
  788       <xsl:if 
  789        test="stri ng-length( $reactionV alue2)>1"
  790       >
  791                
  792        <xsl:if 
  793         test="posi tion()>1"
  794        >
  795                   
  796         <xsl:text>
  797         
  798         </xsl:text >
  799                 
  800        </xsl:if>
  801                
  802        <xsl:value -of 
  803         select="$r eactionVal ue2"
  804        />
  805              
  806       </xsl:if>
  807           
  808      </xsl:for- each>
  809        
  810     </xsl:temp late>
  811    
  812       
  813     <xsl:templ ate 
  814      name="getS everityTex t"
  815     >
  816          
  817      <xsl:param  
  818       name="obse rvation"
  819      />
  820          
  821      <xsl:if 
  822       test="$obs ervation"
  823      >
  824             
  825       <xsl:varia ble 
  826        name="sevr Reference"  
  827        select="su bstring-af ter($obser vation/n1: entryRelat ionship/n1 :observati on/n1:entr yRelations hip/n1:obs ervation/n 1:text/n1: reference/ @value,'#' )"
  828       />
  829             
  830       <xsl:varia ble 
  831        name="seve rity" 
  832        select="$o bservation /../../../ ../n1:text //n1:conte nt[@ID=$se vrReferenc e]"
  833       />
  834             
  835       <xsl:if 
  836        test="stri ng-length( $severity) >1"
  837       >
  838                
  839        <xsl:value -of 
  840         select="$s everity"
  841        />
  842              
  843       </xsl:if>
  844           
  845      </xsl:if>
  846        
  847     </xsl:temp late>
  848    
  849       
  850     <xsl:templ ate 
  851      name="getC reatedOnDa te"
  852     >
  853          
  854      <xsl:choos e>
  855             
  856       <xsl:when 
  857        test="stri ng-length( /n1:Clinic alDocument /n1:effect iveTime/@v alue)=0"
  858       >
  859                
  860        <xsl:call- template 
  861         name="na"
  862        />
  863              
  864       </xsl:when >
  865             
  866       <xsl:when 
  867        test="star ts-with(/n 1:Clinical Document/n 1:effectiv eTime/@val ue,' ')"
  868       >
  869                
  870        <xsl:call- template 
  871         name="na"
  872        />
  873              
  874       </xsl:when >
  875             
  876       <xsl:other wise>
  877                
  878        <xsl:call- template 
  879         name="form atDateLong "
  880        >
  881                   
  882         <xsl:with- param 
  883          name="date String" 
  884          select="/n 1:Clinical Document/n 1:effectiv eTime/@val ue"
  885         />
  886                 
  887        </xsl:call -template>
  888              
  889       </xsl:othe rwise>
  890           
  891      </xsl:choo se>
  892        
  893     </xsl:temp late>
  894    
  895       
  896     <xsl:templ ate 
  897      name="getG enderStrin g"
  898     >
  899          
  900      <xsl:choos e>
  901             
  902       <xsl:when 
  903        test="/n1: ClinicalDo cument/n1: recordTarg et/n1:pati entRole/n1 :patient/n 1:administ rativeGend erCode/@co de"
  904       >
  905                
  906        <xsl:value -of 
  907         select="/n 1:Clinical Document/n 1:recordTa rget/n1:pa tientRole/ n1:patient /n1:admini strativeGe nderCode/@ code"
  908        />
  909              
  910       </xsl:when >
  911             
  912       <xsl:other wise>
  913                
  914        <xsl:call- template 
  915         name="gend erString"
  916        >
  917                   
  918         <xsl:with- param 
  919          name="sex"  
  920          select="/n 1:Clinical Document/n 1:recordTa rget/n1:pa tientRole/ n1:patient /n1:admini strativeGe nderCode/n 1:original Text"
  921         />
  922                 
  923        </xsl:call -template>
  924              
  925       </xsl:othe rwise>
  926           
  927      </xsl:choo se>
  928        
  929     </xsl:temp late>
  930    
  931       
  932     <!-- Labs  -->
  933    
  934       
  935     <xsl:templ ate 
  936      name="getR esultValue _detail"
  937     >
  938          
  939      <xsl:param  
  940       name="obse rvation"
  941      />
  942          
  943      <xsl:if 
  944       test="$obs ervation"
  945      >
  946             
  947       <xsl:choos e>
  948                
  949        <xsl:when 
  950         test="$obs ervation/n 1:value/@v alue"
  951        >
  952                   
  953         <xsl:value -of 
  954          select="$o bservation /n1:value/ @value"
  955         />
  956                 
  957        </xsl:when >
  958                
  959        <xsl:when 
  960         test="$obs ervation/n 1:value[@x si:type='S T']"
  961        >
  962                   
  963         <xsl:value -of 
  964          select="$o bservation /n1:value[ @xsi:type= 'ST']"
  965         />
  966                 
  967        </xsl:when >
  968                
  969        <xsl:other wise>
  970                   
  971         <xsl:call- template 
  972          name="na"
  973         />
  974                 
  975        </xsl:othe rwise>
  976              
  977       </xsl:choo se>
  978           
  979      </xsl:if>
  980        
  981     </xsl:temp late>
  982    
  983       
  984     <xsl:templ ate 
  985      name="getR esultValue Detail"
  986     >
  987          
  988      <xsl:param  
  989       name="obse rvation"
  990      />
  991          
  992      <xsl:if 
  993       test="$obs ervation"
  994      >
  995             
  996       <xsl:choos e>
  997                
  998        <xsl:when 
  999         test="$obs ervation/n 1:value/@v alue"
  1000        >
  1001                   
  1002         <xsl:value -of 
  1003          select="$o bservation /n1:value/ @value"
  1004         />
  1005                   
  1006         <xsl:if 
  1007          test="$obs ervation/n 1:value/@u nit"
  1008         >
  1009                       
  1010          <xsl:text>
  1011            
  1012          </xsl:text >
  1013                       
  1014          <xsl:value -of 
  1015           select="$o bservation /n1:value/ @unit"
  1016          />
  1017                    
  1018         </xsl:if>
  1019                 
  1020        </xsl:when >
  1021                
  1022        <xsl:other wise>
  1023                   
  1024         <xsl:call- template 
  1025          name="na"
  1026         />
  1027                 
  1028        </xsl:othe rwise>
  1029              
  1030       </xsl:choo se>
  1031           
  1032      </xsl:if>
  1033        
  1034     </xsl:temp late>
  1035    
  1036       
  1037     <xsl:templ ate 
  1038      name="getF lag"
  1039     >
  1040          
  1041      <xsl:param  
  1042       name="inte rpretation "
  1043      />
  1044          
  1045      <xsl:choos e>
  1046             
  1047       <xsl:when 
  1048        test="$int erpretatio n/@display Name"
  1049       >
  1050                
  1051        <xsl:value -of 
  1052         select="$i nterpretat ion/@displ ayName"
  1053        />
  1054              
  1055       </xsl:when >
  1056             
  1057       <xsl:when 
  1058        test="$int erpretatio n/n1:origi nalText"
  1059       >
  1060                
  1061        <xsl:value -of 
  1062         select="$i nterpretat ion/n1:ori ginalText"
  1063        />
  1064              
  1065       </xsl:when >
  1066             
  1067       <xsl:other wise>
  1068                
  1069        <xsl:call- template 
  1070         name="na"
  1071        />
  1072              
  1073       </xsl:othe rwise>
  1074           
  1075      </xsl:choo se>
  1076        
  1077     </xsl:temp late>
  1078    
  1079    
  1080    
  1081       
  1082     <xsl:templ ate 
  1083      name="getR esultUnit"
  1084     >
  1085          
  1086      <xsl:param  
  1087       name="obse rvation"
  1088      />
  1089          
  1090      <xsl:choos e>
  1091             
  1092       <xsl:when 
  1093        test="$obs ervation/n 1:value/@u nit"
  1094       >
  1095                
  1096        <xsl:value -of 
  1097         select="$o bservation /n1:value/ @unit"
  1098        />
  1099              
  1100       </xsl:when >
  1101             
  1102       <xsl:when 
  1103        test="$isK aiser"
  1104       >
  1105                
  1106        <xsl:text>
  1107        </xsl:text >
  1108              
  1109       </xsl:when >
  1110             
  1111       <xsl:other wise>
  1112                
  1113        <xsl:call- template 
  1114         name="na"
  1115        />
  1116              
  1117       </xsl:othe rwise>
  1118           
  1119      </xsl:choo se>
  1120        
  1121     </xsl:temp late>
  1122    
  1123       
  1124     <xsl:templ ate 
  1125      name="getR esultRefRa nge"
  1126     >
  1127          
  1128      <xsl:param  
  1129       name="obse rvation"
  1130      />
  1131          
  1132      <xsl:choos e>
  1133             
  1134       <xsl:when 
  1135        test="$obs ervation/n 1:referenc eRange/n1: observatio nRange/n1: text"
  1136       >
  1137                
  1138        <xsl:value -of 
  1139         select="$o bservation /n1:refere nceRange/n 1:observat ionRange/n 1:text"
  1140        />
  1141              
  1142       </xsl:when >
  1143             
  1144       <xsl:other wise>
  1145                
  1146        <xsl:call- template 
  1147         name="na"
  1148        />
  1149              
  1150       </xsl:othe rwise>
  1151           
  1152      </xsl:choo se>
  1153        
  1154     </xsl:temp late>
  1155    
  1156       
  1157     <!--Determ ine if sup ported com ponent(s)  -->
  1158       
  1159     <xsl:templ ate 
  1160      name="comp onentFound "
  1161     >
  1162          
  1163      <xsl:param  
  1164       name="comp Section"
  1165      />
  1166          
  1167      <xsl:choos e>
  1168             
  1169       <xsl:when 
  1170        test="$com pSection/n 1:code[@co de=$loincA llergyCode ]"
  1171       >
  1172                
  1173        <xsl:value -of 
  1174         select="$c ompSection /n1:code/@ code"
  1175        />
  1176              
  1177       </xsl:when >
  1178             
  1179       <xsl:when 
  1180        test="$com pSection/n 1:code[@co de=$loincE ncounterCo de]"
  1181       >
  1182                
  1183        <xsl:value -of 
  1184         select="$c ompSection /n1:code/@ code"
  1185        />
  1186              
  1187       </xsl:when >
  1188             
  1189       <xsl:when 
  1190        test="$com pSection/n 1:code[@co de=$loincI mmunizatio nsCode]"
  1191       >
  1192                
  1193        <xsl:value -of 
  1194         select="$c ompSection /n1:code/@ code"
  1195        />
  1196              
  1197       </xsl:when >
  1198             
  1199       <xsl:when 
  1200        test="$com pSection/n 1:code[@co de=$loincM edCode]"
  1201       >
  1202                
  1203        <xsl:value -of 
  1204         select="$c ompSection /n1:code/@ code"
  1205        />
  1206              
  1207       </xsl:when >
  1208             
  1209       <xsl:when 
  1210        test="$com pSection/n 1:code[@co de=$loincP roblemCode ]"
  1211       >
  1212                
  1213        <xsl:value -of 
  1214         select="$c ompSection /n1:code/@ code"
  1215        />
  1216              
  1217       </xsl:when >
  1218             
  1219       <xsl:when 
  1220        test="$com pSection/n 1:code[@co de=$loincP roceduresC ode]"
  1221       >
  1222                
  1223        <xsl:value -of 
  1224         select="$c ompSection /n1:code/@ code"
  1225        />
  1226              
  1227       </xsl:when >
  1228             
  1229       <xsl:when 
  1230        test="$com pSection/n 1:code[@co de=$loincR esultsCode ]"
  1231       >
  1232                
  1233        <xsl:value -of 
  1234         select="$c ompSection /n1:code/@ code"
  1235        />
  1236              
  1237       </xsl:when >
  1238             
  1239       <xsl:when 
  1240        test="$com pSection/n 1:code[@co de=$loincV italsCode] "
  1241       >
  1242                
  1243        <xsl:value -of 
  1244         select="$c ompSection /n1:code/@ code"
  1245        />
  1246              
  1247       </xsl:when >
  1248             
  1249       <xsl:other wise/>
  1250           
  1251      </xsl:choo se>
  1252        
  1253     </xsl:temp late>
  1254    
  1255       
  1256     <xsl:templ ate 
  1257      name="na"
  1258     >
  1259          
  1260      <xsl:text>
  1261       - Not Avai lable -
  1262      </xsl:text >
  1263        
  1264     </xsl:temp late>
  1265    
  1266       
  1267     <xsl:templ ate 
  1268      name="repl aceSquiggl esWithLine feeds"
  1269     >
  1270          
  1271      <xsl:param  
  1272       name="text "
  1273      />
  1274          
  1275      <xsl:if 
  1276       test="$tex t"
  1277      >
  1278             
  1279       <xsl:choos e>
  1280                
  1281        <xsl:when 
  1282         test="cont ains($text ,'~')"
  1283        >
  1284                   
  1285         <xsl:value -of 
  1286          select="su bstring-be fore($text ,'~')"
  1287         />
  1288                   
  1289         <xsl:text>
  1290          &#13;&#10;
  1291         </xsl:text >
  1292                   
  1293         <xsl:call- template 
  1294          name="repl aceSquiggl esWithLine feeds"
  1295         >
  1296                       
  1297          <xsl:with- param 
  1298           name="text
  1299           select="su bstring-af ter($text, '~')"
  1300          />
  1301                    
  1302         </xsl:call -template>
  1303                 
  1304        </xsl:when >
  1305                
  1306        <xsl:other wise>
  1307                   
  1308         <xsl:value -of 
  1309          select="$t ext"
  1310         />
  1311                 
  1312        </xsl:othe rwise>
  1313              
  1314       </xsl:choo se>
  1315           
  1316      </xsl:if>
  1317        
  1318     </xsl:temp late>
  1319    
  1320       
  1321     <xsl:templ ate 
  1322      name="disp layAllergy Verificati onDate"
  1323     >
  1324          
  1325      <xsl:param  
  1326       name="obse rvation"
  1327      />
  1328          
  1329      <xsl:varia ble 
  1330       name="alle rgyVerifDa te"
  1331      >
  1332             
  1333       <xsl:call- template 
  1334        name="getA llergyVeri ficationDa te"
  1335       >
  1336                
  1337        <xsl:with- param 
  1338         name="obse rvation" 
  1339         select="$o bservation "
  1340        />
  1341              
  1342       </xsl:call -template>
  1343           
  1344      </xsl:vari able>
  1345          
  1346      <xsl:choos e>
  1347             
  1348       <xsl:when 
  1349        test="stri ng-length( $allergyVe rifDate)>0 "
  1350       >
  1351                
  1352        <xsl:varia ble 
  1353         name="form attedVerif Date"
  1354        >
  1355                   
  1356         <xsl:call- template 
  1357          name="form atDateShor t"
  1358         >
  1359                       
  1360          <xsl:with- param 
  1361           name="date String" 
  1362           select="$a llergyVeri fDate"
  1363          />
  1364                    
  1365         </xsl:call -template>
  1366                 
  1367        </xsl:vari able>
  1368                
  1369        <xsl:value -of 
  1370         select="$f ormattedVe rifDate"
  1371        />
  1372              
  1373       </xsl:when >
  1374             
  1375       <xsl:other wise>
  1376                
  1377        <xsl:call- template 
  1378         name="na"
  1379        />
  1380              
  1381       </xsl:othe rwise>
  1382           
  1383      </xsl:choo se>
  1384        
  1385     </xsl:temp late>
  1386    
  1387   </xsl:styl esheet>