<?xml version="1.0" encoding="UTF-8"?>
<apd SOP="1.2.on-and-on" name="OEC">
<version syntax = "0.5" content = "0.5"/>
<declarations>
<dicomVar name="AccessionNumber" type="string" group="0008" element="0050"/>
<dicomVar name="patname" type="string" group="0010" element="0010"/>
<dicomVar name="ex_no" type="string" group="0020" element="0010"/>
<dicomVar name="ImageInstanceNumber" type="string" group="0020" element="0013"/>
<dicomVar name="patid" type="string" group="0010" element="0020"/>
<dicomVar name="patdob" type="string" group="0010" element="0030"/>
<dicomVar name="Physician_Name" type="string" group="0008" element="1050"/>
<dicomVar name="patsex" type="string" group="0010" element="0040"/>
<dicomVar name="Procedure_Protocol" type="string" group="0008" element="1030"/>
<dicomVar name="comments" type="string" group="0010" element="4000"/>
<dicomVar name="kvolt" type="string" group="0018" element="0060"/>
<dicomVar name="XRay_Tube_Current" type="string" group="0018" element="1151"/>
<dicomVar name="Image_Number" type="string" group="0010" element="0040"/>
<dicomVar name="hospname" type="string" group="0008" element="0080"/>
<dicomVar name="totalFrameNumber" type="int" group="0028" element="0008"/>
<dicomVar name="Acquisition_DateTime" type="string" group="0008" element="002A"/>
<dicomVar name="Acquisition_Date" type="string" group="0008" element="0022"/>
<dicomVar name="Acquisition_Time" type="string" group="0008" element="0032"/>

<runtimeVar name="lang" type="string" initial = "en_US"/>
<runtimeVar name="timedateFormat" type="string" initial="1"/>
<runtimeVar name="windowLevel" type="int" initial = "50"/>
<runtimeVar name="windowWidth" type="int" initial = "50"/>
<runtimeVar name="frameIndex" type="int" initial = "1"/>
<runtimeVar name="frameType" type="string" initial = ""/>
<runtimeVar name="roiResult1" type="string" initial = ""/>
<runtimeVar name="roiResult2" type="string" initial = ""/>
<runtimeVar name="roiResult3" type="string" initial = ""/>
<runtimeVar name="zoomFactor" type="float" initial = "1.0"/>
<runtimeVar name="currentOrientation" type="string" initial = "   "/>
<runtimeVar name="zoomFactor" type="float" initial = "1.0"/>
<runtimeVar name="rasNorth" type="string" initial = " "/>
<runtimeVar name="rasSouth" type="string" initial = " "/>
<runtimeVar name="rasEast" type="string" initial = " "/>
<runtimeVar name="rasWest" type="string" initial = " "/>
<runtimeVar name="reportPixel_R" type="string" initial = " "/>
<runtimeVar name="reportPixel_A" type="string" initial = " "/>
<runtimeVar name="reportPixel_S" type="string" initial = " "/>
<runtimeVar name="reportPixel_V" type="string" initial = " "/>
<runtimeVar name="currentFilterDescription" type="string" initial = "   "/>
<runtimeVar name="stretchDescription" type="string" initial = "   "/>
</declarations>

<expressions>

<table name="FlipPossibilities" type = "string">
<entry i="0F" v="LR"/>
<entry i="90F" v="LR"/>
<entry i="180F" v="TB"/>
<entry i="270F" v="TB"/>
</table>
<table name="RotatePossibilities" type = "string">
<entry i="90" v="90"/>
<entry i="180" v="180"/>
<entry i="270" v="270"/>
<entry i="90F" v="90"/>
<entry i="270F" v="90"/>
</table>

<set name="AWindowWidth"> <![CDATA[
        "W:" + (windowWidth)%i + " " ]]> 
</set>

<set name="AWindowCenter"> <![CDATA[
        "L:" + (windowLevel)%i  ]]> 
 </set>

<set name="AFrameIndex"> <![CDATA[
	if(isvalued(totalFrameNumber) && totalFrameNumber > 0)
	then
        "C: " + (frameIndex) + "/" + (totalFrameNumber)
    else
    	""
    endif
    ]]> 
 </set>
<set name="AFrameType"> <![CDATA[
	if(isvalued(totalFrameNumber) && totalFrameNumber > 0)
	then
        " ("+ (frameType)+")"
    else
    	""
    endif
    ]]> 
 </set>"

<set name="ArasN"> <![CDATA[
rasNorth  ]]> </set>

<set name="ArasS"> <![CDATA[
rasSouth  ]]> </set>

<set name="ArasE"> <![CDATA[
rasEast  ]]> </set>

<set name="ArasW"> <![CDATA[
rasWest  ]]> </set>
 
 <set name="ARoiResult3"> <![CDATA[
		roiResult3  
	]]> </set>
  <set name="ARoiResult2"> <![CDATA[
		roiResult2  
	]]> </set>
    <set name="ARoiResult1"> <![CDATA[
		roiResult1  
	]]> </set>
	
<set name="AcurrentROT"> <![CDATA[
        if(!isblank(RotatePossibilities[currentOrientation]))
          then
          "Ro:" + RotatePossibilities[currentOrientation]
        endif
  ]]> </set>
  
  <set name="AcurrentFL"> <![CDATA[
        if(!isblank(FlipPossibilities[currentOrientation]))
          then
          "Fl:" + FlipPossibilities[currentOrientation]
        endif
  ]]> </set>
  
  <set name="AzoomFactor"> <![CDATA[
          "MF:" + (zoomFactor)%.1f
  ]]> </set>
  
 
 <set name="ACommentsLen"> <![CDATA[
        strlen(comments)  ]]> 
 </set>
 
 <set name="Acomments"> <![CDATA[
 	if(isvalued(comments))
 		then if(ACommentsLen > 25)
 				then midstr(comments,0,25) + "..."
 			 endif
 	else
 		"  "
 	endif	
         ]]></set>
 
 <set name="AAccessionNumber"> <![CDATA[
        if(isvalued(AccessionNumber) && clean(AccessionNumber) != "")
          then
            "Acc Num:" + clean(AccessionNumber)
          else
          ""
        endif
  ]]> </set>
  
  <set name="patientName"> <![CDATA[
        if(isvalued(patname))
          then
         clean(patname)
          else
          ""
        endif
  ]]> </set>
  
  
  <set name="Apatdob"> <![CDATA[
        if(isvalued(patdob))
          then
           patdob   
        endif
  ]]> </set>
  
   <set name="Comments"> <![CDATA[
        Acomments
  ]]> </set> 
  
  
  <set name="ALongPatientName"> <![CDATA[
        if(isblank(patientName))
          then
          "no_name_" + if(isvalued(ex_no))
            then
            ex_no
            else
            ""
          endif
          else
          clean(replace(patname,"^"," "))
        endif
  ]]> </set>
  
  <set name="APatientID"> <![CDATA[
        if(isvalued(patid))
          then
          clean(patid)
          else
          ""
        endif
    ]]> </set>
    
    <set name="APhysicianName"> <![CDATA[
        if(isvalued(Physician_Name)) 
          then
             clean(replace(Physician_Name,"^"," "))
          else
          	 ""
        endif
  ]]> </set> 
  
  <set name="ASex"> <![CDATA[
        if(isvalued(patsex))
          then
          	clean(patsex) + " "
          else
          	""
        endif
  ]]> </set> 
  
  <set name="kvoltFloat"> <![CDATA[
    if (isvalued(kvolt))
       then
			float(kvolt)
       else
     		0.0
      endif  
]]> </set>
<set name="AKvolt"> <![CDATA[
        if( kvoltFloat > 0)
          then
          	"kVp" + " " +  (kvoltFloat)%.0f 
        endif
  ]]> </set>
  
  <set name="currentFloat"> <![CDATA[
   if (isvalued(XRay_Tube_Current))
       then
			float(XRay_Tube_Current)
       else
   			0.0
   endif 
]]> </set>

<set name="AProcedure_Protocol"> <![CDATA[
        if(isvalued(Procedure_Protocol))
          then
          	Procedure_Protocol
        endif
  ]]> </set>
  
<set name="ACurrent"> <![CDATA[
        if(currentFloat > 0)
          then
          	"mA " + (currentFloat)%.0f
        endif
  ]]> </set>
  
   <set name="AIm"> <![CDATA[ 
            "Im: " + ImageInstanceNumber
         ]]></set>
 <set name="AHospName"> <![CDATA[
	clean(hospname)  
]]> </set>

<set name="AAcqDate"> <![CDATA[
		if (isvalued(Acquisition_DateTime))
		then
		    midstr(Acquisition_DateTime, 0, 8)
		else
            if (isvalued(Acquisition_Date))
            then
        	    Acquisition_Date
            endif
        endif
  ]]> </set>
  
  <set name="AAcqTime"> <![CDATA[
      if (isvalued(Acquisition_DateTime))
		then
		    midstr(Acquisition_DateTime, 8, strlen(Acquisition_DateTime))
		else
            if (isvalued(Acquisition_Time))
            then
        	    Acquisition_Time
            endif
        endif
  ]]> </set>
  
</expressions>

<groupName name="all" number="0">
  <groupName name="Hospital_Name" number="1">
          <i18n lang="en_US" string=""/>
  </groupName>
  <groupName name="Patient_Name" number="2">
          <i18n lang="en_US" string=""/>
  </groupName>
  
  <groupName name="Patient_Id" number="3">
          <i18n lang="en_US" string=""/>      
  </groupName>
  
  <groupName name="ESI_Information" number="4">
          <i18n lang="en_US" string=""/>
  </groupName>

  <groupName name="Scan_Date" number = "6">
          <i18n lang="en_US" string=""/>
  </groupName>
  
  <groupName name="Scan_Time" number = "15">
          <i18n lang="en_US" string=""/>
  </groupName>
  
  <groupName name="Scan_Parameters" number = "55">
          <i18n lang="en_US" string=""/>
  </groupName> 
   <groupName name="View_Parameters" number = "18">
          <i18n lang="en_US" string=""/>
  </groupName> 
  
  <groupName name="Graphic_Results" number = "21">
          <i18n lang="en_US" string=""/>
  </groupName> 
    
  <groupName name="Windowing" number="50"/>
  <groupName name="Accession_Number" number="57"/> 
      

</groupName>

<groupName name="partial" number = "22">
  <groupName name="Hospital_Name"/>
  <groupName name="Patient_Name"/>
  <groupName name="Patient_Id"/>      
  <groupName name="ESI_Information"/>
  <groupName name="Scan_Date"/>
  <groupName name="Scan_Time"/>
  <groupName name="Scan_Parameters"/>
  <groupName name="View_Parameters"/>
  <groupName name="Graphic_Results"/>
  <groupName name="Windowing"/>
  <groupName name="Accession_Number"/> 
</groupName>
     
<layout>

 <annoLine location="NE" line="9" dir="H">
     <seg exp="AcurrentFL" group="View_Parameters" priority="9">
  		<desc>
    		<i18n lang="en_US" string=""/>
    		<i18n lang="fr" string=""/>
    		<i18n lang="de" string=""/>
    		<i18n lang="it" string=""/>
    		<i18n lang="es_MX" string=""/>
    		<i18n lang="pt_BR" string=""/>
  		</desc>
     </seg>
</annoLine> 

<annoLine location="NE" line="10" dir="H">
     <seg exp="AcurrentROT" group="View_Parameters" priority="9">
  		<desc>
    		<i18n lang="en_US" string=""/>
    		<i18n lang="fr" string=""/>
    		<i18n lang="de" string=""/>
   		    <i18n lang="it" string=""/>
    		<i18n lang="es_MX" string=""/>
    		<i18n lang="pt_BR" string=""/>
  		</desc>
     </seg>
 </annoLine>
 
 <annoLine location="NE" line="8" dir="H">
     <seg exp="AzoomFactor" group="View_Parameters" priority="9">
  		<desc>
    		<i18n lang="en_US" string=""/>
    		<i18n lang="fr" string=""/>
    		<i18n lang="de" string=""/>
    		<i18n lang="it" string=""/>
    		<i18n lang="es_MX" string=""/>
    		<i18n lang="pt_BR" string=""/>
  		</desc>
     </seg>
 </annoLine>
 
<annoLine location="SE" line="-4" dir="H">
     <seg exp="ARoiResult3" group="Graphic_Results" priority="9">
		  <desc>
    		<i18n lang="en_US" string = ""/>
    		<i18n lang="fr" string=""/>
    		<i18n lang="de" string=""/>
    		<i18n lang="it" string=""/>
    		<i18n lang="es_MX" string=""/>
    		<i18n lang="pt_BR" string=""/>
  		</desc>
     </seg>
</annoLine>

<annoLine location="SE" line="-5" dir="H">
     <seg exp="ARoiResult2" group="Graphic_Results" priority="9">
  		<desc>
    		<i18n lang="en_US" string=""/>
    		<i18n lang="fr" string=""/>
    		<i18n lang="de" string=""/>
    		<i18n lang="it" string=""/>
    		<i18n lang="es_MX" string=""/>
    		<i18n lang="pt_BR" string=""/>
  		</desc>
     </seg>
</annoLine>

<annoLine location="SE" line="-6" dir="H">
     <seg exp="ARoiResult1" group="Graphic_Results" priority="9">
  		<desc>
    		<i18n lang="en_US" string=""/>
    		<i18n lang="fr" string=""/>
    		<i18n lang="de" string=""/>
    		<i18n lang="it" string=""/>
    		<i18n lang="es_MX" string=""/>
    		<i18n lang="pt_BR" string=""/>
  		</desc>
     </seg>
</annoLine>
 
<annoLine location="NW" line="7" dir="H">
    <seg exp="AAccessionNumber" group="Accession_Number" priority="7">
        <desc>
	    	<i18n lang="en_US" string=""/>
	    	<i18n lang="nb_NO" string=""/>
	    	<i18n lang="fr" string=""/>
	    	<i18n lang="de" string=""/>
	    	<i18n lang="it" string=""/>
    	</desc>
    </seg>
</annoLine>

<annoLine location="NW" line="0" dir="H">
    <seg exp="ALongPatientName" group="Patient_Name" priority="9">
  		<desc>
    		<i18n lang="en_US" string=""/>
   		 	<i18n lang="fr" string=""/>
    		<i18n lang="de" string=""/>
    		<i18n lang="it" string=""/>
    		<i18n lang="es_MX" string=""/>
    		<i18n lang="pt_BR" string=""/>
  		</desc>
    </seg>
</annoLine>

<annoLine location="NW" line="6" dir="H">
    <seg exp="Apatdob" group="Patient_Name" priority="9">
  		<desc>
    		<i18n lang="en_US" string=""/>
   		 	<i18n lang="fr" string=""/>
    		<i18n lang="de" string=""/>
    		<i18n lang="it" string=""/>
    		<i18n lang="es_MX" string=""/>
    		<i18n lang="pt_BR" string=""/>
  		</desc>
    </seg>
</annoLine>

<annoLine location="NW" line="3" dir="H">
<seg exp="APatientID" group="Patient_Id" priority = "5">
    	<desc>
      		<i18n lang="en_US" string=""/>
      		<i18n lang="fr" string=""/>
      		<i18n lang="de" string=""/>
      		<i18n lang="it" string=""/>
      		<i18n lang="es_MX" string=""/>
      		<i18n lang="pt_BR" string=""/>
    	</desc>
  </seg>
</annoLine>  

<annoLine location="NW" line="4" dir="H">
<seg exp="AProcedure_Protocol" group="Patient_Id" priority = "5">
    	<desc>
      		<i18n lang="en_US" string=""/>
    	</desc>
  </seg>
</annoLine> 

<annoLine location="NW" line="5" dir="H">
<seg exp="Comments" group="Patient_Id" priority = "5">
    	<desc>
      		<i18n lang="en_US" string=""/>
    	</desc>
  </seg>
</annoLine>  

<annoLine location="NW" line="2" dir="H">
  <seg exp="APhysicianName" group="Hospital_Name" priority="7">
  	<desc>
    	<i18n lang="en_US" string=""/>
    	<i18n lang="fr" string=""/>
    	<i18n lang="de" string=""/>
    	<i18n lang="it" string=""/>
    	<i18n lang="es_MX" string=""/>
    	<i18n lang="pt_BR" string=""/>
  	</desc>
  </seg>
</annoLine>


<annoLine location="NE" line="1" dir="H">
  <seg exp="AHospName" group="Hospital_Name" priority="7">
  	<desc>
    	<i18n lang="en_US" string=""/>
    	<i18n lang="fr" string=""/>
    	<i18n lang="de" string=""/>
    	<i18n lang="it" string=""/>
    	<i18n lang="es_MX" string=""/>
    	<i18n lang="pt_BR" string=""/>
  	</desc>
  </seg>
</annoLine>

<annoLine location="NE" line="2" dir="H">
  <seg exp="AAcqDate" group="Hospital_Name" priority="7">
  	<desc>
    	<i18n lang="en_US" string=""/>
    	<i18n lang="fr" string=""/>
    	<i18n lang="de" string=""/>
    	<i18n lang="it" string=""/>
    	<i18n lang="es_MX" string=""/>
    	<i18n lang="pt_BR" string=""/>
  	</desc>
  </seg>
</annoLine>

<annoLine location="NE" line="3" dir="H">
  <seg exp="AAcqTime" group="Hospital_Name" priority="7">
  	<desc>
    	<i18n lang="en_US" string=""/>
    	<i18n lang="fr" string=""/>
    	<i18n lang="de" string=""/>
    	<i18n lang="it" string=""/>
    	<i18n lang="es_MX" string=""/>
    	<i18n lang="pt_BR" string=""/>
  	</desc>
  </seg>
</annoLine>

<annoLine location="NW" line="8" dir="H">
	<seg exp="ASex" group="Patient_Id" priority = "5">
    	<desc>
      		<i18n lang="en_US" string=""/>
      		<i18n lang="fr" string=""/>
      		<i18n lang="de" string=""/>
      		<i18n lang="it" string=""/>
      		<i18n lang="es_MX" string=""/>
      		<i18n lang="pt_BR" string=""/>
    	</desc>
  </seg>
</annoLine> 



<annoLine location="SW" line="-6" dir="H"> 
  <seg exp="AKvolt" group="Scan_Parameters" priority="7">
  	<desc>
    	<i18n lang="en_US" string=""/>
    	<i18n lang="fr" string=""/>
    	<i18n lang="de" string=""/>
    	<i18n lang="it" string=""/>
    	<i18n lang="es_MX" string=""/>
    	<i18n lang="pt_BR" string=""/>
   </desc>
  </seg> 
</annoLine>

<annoLine location="SW" line="-5" dir="H"> 
  <seg exp="ACurrent" group="Scan_Parameters" priority="7">
    <desc>
    	<i18n lang="en_US" string=""/>
    	<i18n lang="fr" string=""/>
    	<i18n lang="de" string=""/>
    	<i18n lang="it" string=""/>
    	<i18n lang="es_MX" string=""/>
    	<i18n lang="pt_BR" string=""/>
    </desc>
  </seg> 
</annoLine>

<annoLine location="SW" line="-2" dir="H">
     <seg exp="AIm" group="ESI_Information" priority="9">
  		<desc>
    		<i18n lang="en_US" string=""/>
    		<i18n lang="fr" string=""/>
    		<i18n lang="de" string=""/>
    		<i18n lang="it" string=""/>
    		<i18n lang="es_MX" string=""/>
    		<i18n lang="pt_BR" string=""/>
       </desc>
     </seg>
</annoLine>

<annoLine location="SE" line="0" dir="H">
     <seg exp="AWindowWidth" group="Windowing" priority="10">
  		<desc>
    		<i18n lang="en_US" string=""/>
        </desc>
     </seg>
     <seg exp="AWindowCenter" group="Windowing" priority="10">
  		<desc>
    		<i18n lang="en_US" string=""/>
       </desc>
     </seg>
</annoLine>

<annoLine location="SW" line="0" dir="H">
     <seg exp="AFrameIndex" group="ESI_Information" priority="9">
  		<desc>
    		<i18n lang="en_US" string=""/>
        </desc>
     </seg>
     <seg exp="AFrameType" group="ESI_Information" priority="9">
  		<desc>
    		<i18n lang="en_US" string=""/>
        </desc>
     </seg>
</annoLine>

</layout>
</apd>

