<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">


<xsl:template match="/">	

<HTML>
<HEAD>
<TITLE>Results</TITLE>
</HEAD>
<BODY background="datcard_bg.gif">

<xsl:for-each select="Study">

	<hr/>
	<center>
		<font face="arial" size="4" color="#FF0000"><strong>RESULTS</strong></font>
	</center>
	<hr/>	
	

	<table border="0" cellspacing="10">	

	<tr>
		<td>
			<xsl:attribute name="nowrap"/>
			<font face="arial" size="2"><strong>NAME:</strong></font> 
				    <font face="arial" size="1"><xsl:value-of select="PatientsName"/></font>
		</td>
		<td>
			<xsl:attribute name="nowrap"/>
			<font face="arial" size="2"><strong>MR #:</strong></font>
				    <font face="arial" size="1"><xsl:value-of select="PatientID"/></font>
		</td>
		<td>
			<xsl:attribute name="nowrap"/>
			<font face="arial" size="2"><strong>ACCESSION #:</strong></font> 
				    <font face="arial" size="1"><xsl:value-of select="AccessionNumber"/></font>
		</td>
	</tr>
	<tr>
		<td>
			<xsl:attribute name="nowrap"/>
			<font face="arial" size="2"><strong>DATE OF EXAM:</strong></font>
				    <font face="arial" size="1"><xsl:value-of select="StudyDate"/></font>
		</td>		
		<td colspan="2">
			<xsl:attribute name="nowrap"/>
			<font face="arial" size="2"><strong>PHYSICIAN:</strong></font> 
				    <font face="arial" size="1"><xsl:value-of select="ReferringPhysiciansName"/></font>
		</td>
	</tr>
	
	</table>
	
	<xsl:if test="ErrorMessage">
		<hr/>
		<br/><br/>
		<center><font face="arial" size="2" color="#0000FF">
		<xsl:value-of select="ErrorMessage"/>
		</font></center>
		<br/><br/>
	</xsl:if>

</xsl:for-each>


<xsl:for-each select="Study/Results">
	<hr/>

	<table>
	<tr>
	<td width="50%">
	<font face="arial" size="2"><strong><u>
	<xsl:choose>
      <xsl:when test="RequestedProcedureDescription"><xsl:value-of select="RequestedProcedureDescription"/></xsl:when>
      <xsl:otherwise>(PROCEDURE)</xsl:otherwise>
    </xsl:choose>	
	  AT <xsl:value-of select="StudyTime"/> HOURS
	</u></strong></font>
	</td>
	<td align="right" width="50%">
	<font face="arial" size="1"><strong>
	<xsl:choose>
      <xsl:when test="InterpretationTypeID='REPORT'"> [REPORT] </xsl:when>
      <xsl:when test="InterpretationTypeID='AMENDMENT'"> [ADDENDUM] </xsl:when>
      <xsl:otherwise>(Report </xsl:otherwise>
    </xsl:choose>
    </strong></font>
    </td>

	</tr>
	</table>
	<br/>


	<xsl:if test="InterpretationText">

		<xsl:if test="InterpretationStatusID!='APPROVED'">
			<br/>
			<center>
			<font face="arial" size="2" color="#FF0000">
				  ********** PRELIMINARY **********  
			</font>
			</center>
			<br/><br/>
		</xsl:if>

		<table border="0" cellspacing="10">
		<tr>	
			<td colspan="3">
	
			<font face="arial" size="1"><xsl:copy-of select="InterpretationText"/></font>
			</td>
		</tr>
		</table>
		<br/>
			
		<table border="0">
			<tr>
				<td width="60%" valign="bottom">
					<xsl:attribute name="nowrap"/>
					<font face="arial" size="1">Transcribed By:     <xsl:value-of select="InterpretationTranscriber"/> :     
					<xsl:value-of select="InterpretationTranscriptionDate"/> :     
					<xsl:value-of select="InterpretationTranscriptionTime"/>
					<br/>
					Approved By:     
					</font>
				</td>
				<td>  </td>
			</tr>
			<tr>
				<td width="60%">  </td>
				<td valign="top" align="right">
					<xsl:attribute name="nowrap"/>
					<font face="arial" size="2">
					Radiologist:     
					<u><xsl:value-of select="InterpretationAuthor"/></u>
					</font>
				</td>
			</tr>
		</table>

	</xsl:if>
	
</xsl:for-each>

	

</BODY>
</HTML>

</xsl:template>
</xsl:stylesheet>
