<?xml version = "1.0" encoding="UTF-8"?>
<apd SOP="1.2.on-and-on" name="DX">
<version syntax = "0.5" content="0.5"/>
<!-- ************************************************************************************** -->
<!-- *  File : DXDisplay.xml                                                              * -->
<!-- *  Description: Annotation Layout description for DX Image Display.[Edit this file   * -->
<!-- *               From an editor which understands XML - like JBuilder]                * -->
<!-- *                                                                                    * -->
<!-- *  Author : Saba Ramalingam                                                          * -->
<!-- *  REV    DATE              BY          SPR         REMARKS                          * -->
<!-- ************************************************************************************** -->
<!-- *   0     Aug 2003     Saba Ramalingam  N/A         Initial Version                  * -->
<!-- *   1     Sep 2005     Lakshmi S	     N/A         Changed to display anatomy       * -->
<!-- *   2     Aug 2006     Arun Paul	     N/A         Added Tomo Params		  * -->
<!-- *   3     Jun 2008     Raja Shanmugam   N/A         Added RRA Params                 * -->  
<!-- *   4     Jun 2010	    Sheetal P	     N/A	 Added Age ,BirthTime and gar(grid* -->
<!-- *							 line artifact.			  * -->	  
<!-- *   5     Aug 2010		SaiKumar Pennujuru  N/A   Changes to North West annotations   * -->
<!-- ************************************************************************************** -->
<!-- **************************************************************************** -->
<!-- * Copyright (c) 2003-2009 General Electric Medical Systems, All rights reserved.  -->
<!-- * File		: DXDeclarations.exp					  -->
<!-- * Description	: Contains the Variables & Expression declarations for 	  -->
<!-- *			  System Annotation of DX Images			  -->
<!-- * NOTE:::Save this file in Unix UTF-8 encoding 			- -->
<!-- **************************************************************************** -->
<!-- * REV    DATE              BY          SPR         REMARKS			  -->
<!-- **************************************************************************** -->
<!-- * 0      Jul 2003       Saba Ramalingam  N/A       Original		  -->
<!-- * 1      Jan 2004       Saba Ramalingam  N/A       Changed DOB validation    -->
<!-- * 2      Aug 2005       Arun Paul        N/A       Added DEI Parameters      -->
<!-- * 3      Sep 2005       Lakshmi S	      N/A       Changed to display Anatomy-->
<!-- * 4      Oct 2005       Lakshmi S	   XRYge63668   DEI: display should be N/A for Pasting exam images-->
<!-- * 5      Aug 2006       Arun Paul        N/A       Added Tomo Parameters     -->  
<!-- * 6      Jun 2008       Raja Shanmugam   N/A       Added RRA Params          -->
<!-- * 7      May 2009       Sachip Panda  XRYge82742   Add Space in CDExp        -->
<!-- * 8      Aug 2009       Anuj Agrawal  XRYge83290   Added spaces after UDExp  -->
<!-- * 9      Sep 2009       Varun M          N/A       Not displaying comma when LastName or FirstName are empty -->
<!-- * 10     Mar 2010       Sekhar G         N/A       Added new params for DEI V2 -->
<!-- * 11     May 2010       Sheetal P        N/A	Added the patient birth time to patient info and GAR --> 
<!-- * 12     Aug 2010       Sheetal P     XRYge85770   GLR Annotation is wrong--> 
<!-- * 13     Oct 2010       Dilwar H Laskar  N/A       Made changes to handle the DAP value -1.000 case (DAP not received from calypso)--> 
<!-- * 14     Apr 2011       Dilwar    HCSDM00064162    Made changes to handle the No or Zero (0) Dose/DAP received from calypso  --> 
<!-- * 15     Jul 2011       Sheetal P        N/A       GLR change to handle the DE/Pasting --> 
<!-- **************************************************************************** -->

    <declarations>
       <!-- ******************************************************************** -->
       <!-- *                          DICOM Variables                         * -->
       <!-- ******************************************************************** -->
       <!-- Group PatientInfo -->
       <dicomVar name="PatientName"     type="string" group="0010" element="0010" />
       <dicomVar name="PatientId"       type="string" group="0010" element="0020" />
       <dicomVar name="PatientDob"      type="string" group="0010" element="0030" />
       <dicomVar name="PatientSex"      type="string" group="0010" element="0040" />
       <dicomVar name="AccessionNum"    type="string" group="0008" element="0050" />
       <dicomVar name="Age"             type="string" group="0010" element="1010" />
       <dicomVar name="BirthTime"       type="string" group="0010" element="0032" />
       <dicomVar name="PerfPhysicianName" type="string" group="0008" element="1050" />
      
       <!-- Group Acquisition -->
       <dicomVar name="AcquisitionDate" type="string" group="0008" element="0022" />
       <dicomVar name="AcquisitionTime" type="string" group="0008" element="0032" />
       <!-- Group Hospital Info -->
       <dicomVar name="HospitalName"    type="string" group="0008" element="0080" />
       <!-- Group Dose -->
       <dicomVar name="RelativeXrayExp" type="string" group="0011" element="1006"  creator="GEMS"/>
       <dicomVar name="ImgAreaDoseProd" type="string" group="0018" element="115E" />
       <dicomVar name="Kvp"             type="string" group="0018" element="0060" />
       <dicomVar name="TubeCurrent"     type="string" group="0018" element="1151" />
       <dicomVar name="ExposureMs"      type="string" group="0018" element="1150" />
       <dicomVar name="ExposureMas"     type="float" group="0018" element="1153" />
       <dicomVar name="DI"    		type="string" group="0011" element="1073" creator="GEMS"/>
       <dicomVar name="CompDetExp"      type="string" group="0011" element="1033" creator="GEMS"/>
       <dicomVar name="EI"              type="string" group="0011" element="1074" creator="GEMS"/>
       <dicomVar name="DEIUpperLimit"	type="string" group="0011" element="1234" creator="GEMS"/>
       <dicomVar name="DEILowerLimit"	type="string" group="0011" element="1037" creator="GEMS"/>
       <dicomVar name="DEIInnerLowerLimit" type="string" group="0011" element="1236" creator="GEMS"/>
       <dicomVar name="DEIInnerUpperLimit" type="string" group="0011" element="1235" creator="GEMS"/>
       <dicomVar name="DEIStatus" type="string" group="0011" element="1080" creator="GEMS"/>
       <!-- Group AnatomyInfo -->
	<dicomVar name="Laterality"      type="string" group="0020" element="0062" />
	<dicomVar name="AnatomicalView"  type="string" group="0008" element="0104" />  
	<dicomVar name="AnatomyInfo" type="string" group="0008" element="2218" />   
       <!-- Group Processing Info -->
       <dicomVar name="ProcessingType"  type="string" group="0011" element="1046" creator="GEMS"/>
       <dicomVar name="ProcessingDate"  type="string" group="0008" element="0023" />
       <dicomVar name="ProcessingTime"  type="string" group="0008" element="0033" />
       <dicomVar name="AcqDeviceProcessingDesc"  type="string" group="0018" element="1400" />
       <dicomVar name="sliceHeight"	type="string" group="0018" element="1460" creator="GEMS"/>
       <dicomVar name="sliceInterval"	type="string" group="0011" element="1058" creator="GEMS"/>
       <dicomVar name="samplingFactor"	type="string" group="0011" element="1056" creator="GEMS"/>
      <dicomVar name="GarStatus"       type="string" group="0011" element="107D" creator="GEMS"/>
      <!-- Group Study Info -->
       <dicomVar name="StudyId"  	type="string" group="0020" element="000d" />
       <dicomVar name="SeriesNumber"	type="string" group="0020" element="0011" />
       <!-- Group Physician -->
       <dicomVar name="PerfPhysicName"	type="string" group="0008" element="1050" />
       <!-- Group Image Info -->
       <dicomVar name="ImageNumber"	type="string" group="0028" element="0013" />
     
       <!-- ******************************************************************** -->
       <!-- *                          Runtime Variables                       * -->
       <!-- ******************************************************************** -->
       <runtimeVar name="zoomFactor"       type="float"  />
       <runtimeVar name="windowWidth"      type="int"    />
       <runtimeVar name="windowLevel"      type="int"    />
       <runtimeVar name="roiResult1"       type="string" initial = "" />
       <runtimeVar name="roiResult2"       type="string" initial = "" />
       <runtimeVar name="roiResult3"       type="string" initial = "" />
       <runtimeVar name="roiResult4"       type="string" initial = "" />
       <runtimeVar name="roiResult5"       type="string" initial = "" />
       <runtimeVar name="numberOfRoi"      type="int"    />
       <runtimeVar name="cropStatus"       type="string" initial = "" />
       <runtimeVar name="deletionStat"     type="string" initial = "" />
       <runtimeVar name="tagStatus"        type="string" initial = "" />
       <runtimeVar name="reductionPercent" type="int"    />
       <runtimeVar name="imageType"	   type="string" initial = ""/>
       <runtimeVar name="minorImageType"   type="string" initial = ""/>	
       <runtimeVar name="edge"	    	   type="string" initial = "" />
       <runtimeVar name="appType"   	   type="string" initial = "" />
       <runtimeVar name="printMode"   	   type="string" initial = "" />
       <runtimeVar name="filmIndex"        type="string" initial = "" />
       <runtimeVar name="acqType"          type="string" initial = ""/>
       <runtimeVar name="rraClassification" type="string" initial = "" />
		<runtimeVar name="lang" type="string" initial = "en_US"/>
    </declarations>
    <!-- ******************************************************************** -->
    <!-- *                        Groups                                    * -->
    <!-- ******************************************************************** -->
    <groupName name="PatientInfo"   number="000"/>
    <groupName name="Dose"          number="001"/>
    <groupName name="AcqInfo"       number="002"/>
    <groupName name="Processing"    number="003"/>
    <groupName name="HospitalInfo"  number="004"/>
    <groupName name="Measurements"  number="005"/>
    <groupName name="DisplayParams" number="006"/>
    <groupName name="AnatomyInfo"   number="007"/>
    <groupName name="StudyInfo"	    number="008"/>
    <groupName name="ImageInfo"	    number="009"/>
    <groupName name="SeriesInfo"    number="010"/>
    <groupName name="RRAInfo"    number="011"/> 
    <groupName name="PreviewImageInfo"    number="012"/>
    
    <groupName name="all" number = "020">
    	<groupName name="PatientInfo"   number="000"/>
    	<groupName name="Dose"          number="001"/>
    	<groupName name="AcqInfo"       number="002"/>
    	<groupName name="Processing"    number="003"/>
    	<groupName name="HospitalInfo"  number="004"/>
    	<groupName name="Measurements"  number="005"/>
    	<groupName name="DisplayParams" number="006"/>
    	<groupName name="AnatomyInfo"   number="007"/>
    	<groupName name="StudyInfo"	    number="008"/>
    	<groupName name="ImageInfo"	    number="009"/>
    	<groupName name="SeriesInfo"    number="010"/>
    	<groupName name="RRAInfo"    number="011"/> 
    	<groupName name="PreviewImageInfo"    number="012"/>
	</groupName>
	
	<groupName name="partial" number = "022">
    	<groupName name="PatientInfo"   number="000"/>
    	<groupName name="Dose"          number="001"/>
    	<groupName name="AcqInfo"       number="002"/>
    	<groupName name="Processing"    number="003"/>
    	<groupName name="HospitalInfo"  number="004"/>
    	<groupName name="Measurements"  number="005"/>
    	<groupName name="DisplayParams" number="006"/>
    	<groupName name="AnatomyInfo"   number="007"/>
    	<groupName name="StudyInfo"	    number="008"/>
    	<groupName name="ImageInfo"	    number="009"/>
    	<groupName name="SeriesInfo"    number="010"/>
    	<groupName name="RRAInfo"    number="011"/> 
    	<groupName name="PreviewImageInfo"  number="012"/>
	</groupName>

    <expressions>
        <table name="MonthTable" type="string">
          <entry i="01" v="Jan" />
          <entry i="02" v="Feb" />
          <entry i="03" v="Mar" />
          <entry i="04" v="Apr" />
          <entry i="05" v="May" />
          <entry i="06" v="Jun" />
          <entry i="07" v="Jul" />
          <entry i="08" v="Aug" />
          <entry i="09" v="Sep" />
          <entry i="10" v="Oct" />
          <entry i="11" v="Nov" />
          <entry i="12" v="Dec" />
        </table>
       <table name="symbol" type="i18n">
 	<entry i="micro" v="\u03BC"/>
       </table>    
       <set name="DetExpUnit"> <![CDATA[
	       symbol["micro"] + "Gy"
       ]]> </set>
	
      <set name="tempPatName">
            if isvalued(PatientName) then
               if ( PatientName == "null") then
                  "ANONYMOUS^^ "
               else
                   clean(PatientName)+"^^"
               endif
            else
               "ANONYMOUS^^"
            endif
      </set>
     <set name="tempLastName">
           midstr(clean(tempPatName),0,strindex(clean(tempPatName),"^"))
      </set>
      
      <set name="tempFirstName">
	    midstr(midstr(clean(tempPatName),strindex(clean(tempPatName),"^")+1,strlen(clean(tempPatName)) - strindex(clean(tempPatName),"^")),0,strindex(midstr(clean(tempPatName),strindex(clean(tempPatName),"^")+1,strlen(clean(tempPatName)) - strindex(clean(tempPatName),"^")),"^"))
      </set>
      
       <set name="tempComma">
          if(tempLastName == "") then
              ""
          else 
             if(tempFirstName == "") then
                ""
             else
                ","
             endif
          endif
	</set>
      
      <set name="dispPatName">
     tempLastName + tempComma + tempFirstName + " "
      </set>
      <set name="dispPatientId">
            if isvalued(PatientId) then
                clean(PatientId)+" "
            else
                " "
            endif
      </set>
      <set name="dispAnatomicalView">
           if isvalued(AnatomicalView) then
                clean(AnatomicalView)+" "
           else
                " "
           endif
      </set>
      <set name="dispLaterality">
           if isvalued(Laterality) then
                clean(Laterality)+" "
           else
                " "
           endif
      </set>           
      <set name="dispAnatomy">
           if isvalued(AnatomyInfo) then
                clean(AnatomyInfo)+" " 
           else
                " "
           endif
      </set>  
      <set name="dispAcqDate">
            if isvalued(AcquisitionDate) then
                midstr(clean(AcquisitionDate),6,2)+"-"+MonthTable[midstr(clean(AcquisitionDate),4,2)]
                +"-"+midstr(clean(AcquisitionDate),0,4)+"  "
            else
                " "
            endif
      </set>
      <set name="dispAcqTime">
            if isvalued(AcquisitionTime) then
                "  "+midstr(clean(AcquisitionTime),0,2)+":"+midstr(clean(AcquisitionTime),2,2)+":"
                +midstr(clean(AcquisitionTime),4,2)+"  "
            else
                " "
            endif
      </set>
      <set name="dispDob">
            if isvalued(PatientDob) then
		if ! isblank(PatientDob) then
		  "DOB: "+midstr(clean(PatientDob),6,2)+"-"+MonthTable[midstr(clean(PatientDob),4,2)]+"-"+midstr(clean(PatientDob),0,4)+" "
		endif
            else
                " "
            endif
      </set>
      <set name="dispAge">
            if isvalued(Age) then
                if ! isblank(Age) then
                 "Age: "+int(midstr(clean(Age),0,3))+midstr(clean(Age),3,4)+" "
		endif
            else
                   " "
            endif
      </set>        
      <set name="dispBirthTime">
            if isvalued(BirthTime) then
              if ! isblank(BirthTime) then
                "BirthTime: "+midstr(clean(BirthTime),0,2)+":"+midstr(clean(BirthTime),2,2)+" "
              endif
            else
                " "
            endif
      </set>
      <set name="dispHospitalName">
            if isvalued(HospitalName) then
             clean(HospitalName)+"  "
            else
                " "
            endif
      </set>
      <set name="dispTubeCurrent">
	    if( minorImageType == "DERIVED") then
	    	" "
	    else
            	if isvalued(TubeCurrent) then
                	float(clean(TubeCurrent))%3.1f+ " mA"
            	else
                	" "
           	 endif
	    endif
      </set>
      <set name="dispKvp">
	    if( minorImageType == "DERIVED") then
	    	" "
	    else
            	if isvalued(Kvp) then
               		" "+float(clean(Kvp))%3.0f+" kVp"
            	else
                	" "
            	endif
	    endif
      </set>
      <set name="dispPatientDose">
            if( minorImageType == "DERIVED") then
                " "
            else
                if( float(clean(RelativeXrayExp))%3.3f == "0.000" ) then
                        " "
                  else if isvalued(RelativeXrayExp) then
                        float(clean(RelativeXrayExp))%3.3f+" mGy"
                  else
                        " "
                  endif
                endif
            endif
      </set>
      <set name="dispDoseProduct">
            if( minorImageType == "DERIVED") then
                " "
            else
                if( float(clean(ImgAreaDoseProd))%3.3f == "0.000" ) then
                        " "
                  else if isvalued(ImgAreaDoseProd) then
                        float(clean(ImgAreaDoseProd))%3.3f+" dGy*cm2"
                  else
                        " "
                  endif
                endif
            endif
      </set>
      <set name="dispExposureMs">
	    if( minorImageType == "DERIVED") then
		" "
	    else
            	if isvalued(ExposureMs) then
               		float(clean(ExposureMs))%3.0f+" ms"
            	else
                	" "
            	endif
	    endif
      </set>
      <set name="dispExposureMas">
	    if( minorImageType == "DERIVED") then
		" "
	    else
            	if isvalued(ExposureMas) then
               		float(ExposureMas/1000)%3.2f+" mAs"
            	else
                	" "
            	endif
	    endif
      </set>
      <set name="UnCompDetExposure">
	    if(acqType == "TOMO" || minorImageType == "DERIVED") then
		" "
	    else
            	if isvalued(EI) then
               		if ( DEIStatus == "0" || DEIStatus == "3" ) then 
               			"EI:NA "
               		else if( DEIStatus == "1" ) then
               					"EI:Err "
            			 else if (DEIStatus == "2") then
               					" EI:" + float(clean(EI))%3.2f + " "
               				  else
               					""
               				  endif
               			 endif
               		endif
            	else
                	""
            	endif
	    endif
      </set>
       <set name="CompDetExposure">
	    if(acqType == "TOMO" || minorImageType == "DERIVED") then
		" "
	    else
            	if isvalued(CompDetExp) then
               		 if (DEIStatus == "0" || CompDetExp == "-99.9") then
               			"CDExp:NA "
               		 else if(DEIStatus == "1") then
               				"CDExp:Err "
            			  else if(DEIStatus == "3" || DEIStatus == "2") then
               					"CDExp:" + float(clean(CompDetExp))%3.2f + DetExpUnit+" "
               			 	   else
               			 	  	""
               			 	   endif
               			 endif
               		endif
            	else
                	" "
            	endif
	    endif
      </set>
   <set name="DetExposureIndex">
	    if(acqType == "TOMO" || minorImageType == "DERIVED") then
		" "
	    else if isvalued(DI) then
               	 if(DEIStatus == "0" || DEIStatus == "3") then 
             	 	"DI:NA "
                 else if(DEIStatus == "1") then
                		"DI:Err "
            		  else if (DEIStatus == "2") then
               				"DI:" + float(clean(DI))%3.1f
                		  else 
                			""
                		  endif
                	 endif
                endif
           	 else
               	""
             endif
	    endif
      </set>
      <set name="DetExposureRange"><![CDATA[
	    if(acqType == "TOMO" || minorImageType == "DERIVED") then
				" "
	    else if(DEIStatus == "0" || DEIStatus == "3") then
                        " "
	    else if(DEIStatus == "1") then
                        " "
	    else if( DEIInnerLowerLimit=="0.0" || DEIInnerUpperLimit=="0.0" || DEIUpperLimit == "0.0" || DEILowerLimit == "0.0" ) then
              	""
        	 else if ( DEIInnerLowerLimit!="" && DEIInnerUpperLimit!="" && DEIUpperLimit != "" && DEILowerLimit != "" ) then
        		 	 "[" + float( clean(DEILowerLimit))%2.1f + "," + float( clean(DEIInnerLowerLimit))%2.1f + "," + float( clean(DEIInnerUpperLimit))%1.1f + "," +  float( clean(DEIUpperLimit))%1.1f + "] "
				  else
					 ""
			 	  endif
           	 endif
		endif
		endif
	    endif
        ]]></set>
	 <set name = "dispGARStatus"><![CDATA[
                if (acqType != "TOMO" && imageType != "RAW" ) then
	if ((clean(GarStatus)) == "YES" ) then	
                    " GLR" + " "
                endif
         else
                " "
         endif
      ]]></set>

      <set name="dispSliceHeight"><![CDATA[
	    if( acqType == "TOMO" && minorImageType == "DERIVED" ) then
            	if isvalued(sliceHeight) then
			"SliceHeight: " + float( clean(sliceHeight))%3f + "mm"
            	else
                	" "
            	endif
	    else
		" "
	    endif
        ]]></set>
      <set name="dispSliceInterval"><![CDATA[
	    if( acqType == "TOMO" && minorImageType == "DERIVED") then
            	if isvalued(sliceInterval) then
			" SliceInterval: " +clean(sliceInterval) + "mm"
            	else
                	" "
            	endif
	    else
		" "
	    endif
        ]]></set>
	<set name="dispSamplingFactor"><![CDATA[
            if( acqType == "TOMO" && minorImageType == "DERIVED") then
                if isvalued(samplingFactor) then
                        " SamplingFactor: " +clean(samplingFactor) 
                else
                        " "
                endif
            else
                " "
            endif
        ]]></set>
    <set name="dispWindowWidth">
            if isvalued(windowWidth) then
               "WW: "+windowWidth+" "
            else
                " "
            endif
      </set>
      <set name="dispWindowLevel">
            if isvalued(windowLevel) then
               "WC: "+windowLevel+" "
            else
                " "
            endif
      </set>
      <set name="dispZoom">
            if isvalued(zoomFactor) then
               "Zoom: "+zoomFactor%1.3f+"  "
            else
                " "
            endif
      </set>
      <set name="dispRoiResult1">
            if isvalued(roiResult1) then
               clean(roiResult1)
            else
                " "
            endif
      </set>
      <set name="dispRoiResult2">
            if isvalued(roiResult2) then
               clean(roiResult2)
            else
                " "
            endif
      </set>
      <set name="dispRoiResult3">
            if isvalued(roiResult3) then
               clean(roiResult3)
            else
                " "
            endif
      </set>
      <set name="dispRoiResult4">
            if isvalued(roiResult4) then
               clean(roiResult4)
            else
                " "
            endif
      </set>
      <set name="dispRoiResult5">
            if isvalued(roiResult5) then
               clean(roiResult5)
            else
                " "
            endif
      </set>
      <set name="dispAccessionNum">
            if isvalued(AccessionNum) then
               clean(AccessionNum)+" "
            else
                " "
            endif
      </set>
      <set name="dispPatientSex">
            if isvalued(PatientSex) then
               clean(PatientSex)
            else
                " "
            endif
      </set>
      <set name="dispProcessingType">
            if ( imageType == "PROCESSED" ) then
	            if isvalued(ProcessingType) then
        	       clean(ProcessingType)+" "
	            else
			if isvalued(AcqDeviceProcessingDesc) then
                       		clean(AcqDeviceProcessingDesc)+" "
		    	else
        	        	" "
                    	endif

                   endif
            endif
      </set>
      <set name="dispProcessingDate">
            if ( imageType == "PROCESSED" ) then
	            if isvalued(ProcessingDate) then
        	       "Processed: "+midstr(clean(ProcessingDate),6,2)+"-"+MonthTable[midstr(clean(ProcessingDate),4,2)]
                	+"-"+midstr(clean(ProcessingDate),0,4)+"  "
	            else
        	        " "
                    endif
            else
		" "
            endif
      </set>
      <set name="dispProcessingTime">
            if ( imageType == "PROCESSED" ) then
	            if isvalued(ProcessingTime) then
        	        midstr(clean(ProcessingTime),0,2)+":"+midstr(clean(ProcessingTime),2,2)+":"
                	+midstr(clean(ProcessingTime),4,2)+"  "
	            else
        	        " "
                    endif
            else
		" "
            endif
      </set>
	<set name="dispEdge">
            if ( imageType == "PROCESSED" ) then
	            if isvalued(edge) then
        	        clean(edge)
	            else
        	        " "
                    endif
            else
		" "
            endif
      </set>
      <set name="dispReductionPercent">
            if (reductionPercent != 0) then
                  "Zoom="+string(reductionPercent)+"%  "
            else
                " "
            endif
      </set>
      <set name="dispCropIndication">
            if isvalued(cropStatus) then
                 clean(cropStatus)+" "
            else
                " "
            endif
      </set>
      <set name="dispStudyId">
           if isvalued(StudyId) then
		clean(StudyId)+" "
	   else
		" "
           endif
      </set>
      <set name="dispSeriesNumber">
           if isvalued(SeriesNumber) then
		"Series #:"+clean(SeriesNumber)
	   else
		" "
           endif
      </set>
      <set name="dispImageNumber">
           if isvalued(ImageNumber) then
		"Image #:"+clean(ImageNumber)
	   else
		" "
           endif
      </set>
      <set name="tempPhyName">
            if isvalued(PerfPhysicName) then
               if ( PerfPhysicName == "null") then
                  "ANONYMOUS^^ "
               else
                   clean(PerfPhysicName)+"^^"
               endif
            else
               "ANONYMOUS^^"
            endif
      </set>
      <set name="dispPerfPhysician">
           midstr(clean(tempPhyName),0,strindex(clean(tempPhyName),"^"))+" "+
           midstr(midstr(clean(tempPhyName),strindex(clean(tempPhyName),"^")+1,strlen(clean(tempPhyName)) - strindex(clean(tempPhyName),"^")),0,strindex(midstr(clean(tempPhyName),strindex(clean(tempPhyName),"^")+1,strlen(clean(tempPhyName)) - strindex(clean(tempPhyName),"^")),"^"))+" "
      </set>
      <set name="dispPrintMode">
	   if isvalued(printMode) then
		clean(printMode)
	   else
		" "
   	   endif
      </set>
      <set name="dispSpace">
		" "
      </set>
      <set name="dispFilmIndex">
           clean(filmIndex)
      </set>
      <set name="dispRRAClassification">
                clean(rraClassification)
      </set>
      <set name="dispPreviewImage">
         "PREVIEW IMAGE"
      </set>
  </expressions>

    <layout>
       
        <annoLine location="NW" line="0" color="#FFC800" dir="H">
           <seg exp="dispPatName"    group="PatientInfo" priority="10" />
           <seg exp="dispAccessionNum" group="StudyInfo" priority="10" />
        </annoLine>
        <annoLine location="NW" line="1" color="#FFC800" dir="H">
           <seg exp="dispPatientId"  group="PatientInfo" priority="10" />
           <seg exp="dispPatientSex" group="PatientInfo" priority="10" />
        </annoLine>
        <annoLine location="NW" line="2" color="#FFC800" dir="H">
           <seg exp="dispDob"       group="PatientInfo" priority="10" />
           <seg exp="dispBirthTime"   group="PatientInfo" priority="10" />
           <seg exp="dispAge" group="PatientInfo" priority="10" />
        </annoLine>
        <annoLine location="NW" line="3" color="#FFC800" dir="H">
           <seg exp="dispAcqDate"  group="AcqInfo" priority="10" />
           <seg exp="dispAcqTime"  group="AcqInfo" priority="10" />
        </annoLine>
        <annoLine location="NW" line="4" color="#FFC800" dir="H">
           <seg exp="dispPerfPhysician"  group="PatientInfo" priority="10" />
        </annoLine>

        <annoLine location="NE" line="0" color="#FFC800" dir="H">
           <seg exp="dispHospitalName" group="HospitalInfo" priority="10" />
         </annoLine>
        <annoLine location="NE" line="1" color="#FFC800" dir="H">
           <seg exp="dispPatientDose" group="Dose" priority="10" />
           <seg exp="dispDoseProduct" group="Dose" priority="10" />
         </annoLine>
        <annoLine location="NE" line="2" color="#FFC800" dir="H">
           <seg exp="dispTubeCurrent" group="Dose" priority="10" />
           <seg exp="dispKvp"         group="Dose" priority="10" />
         </annoLine>
        <annoLine location="NE" line="3" color="#FFC800" dir="H">
           <seg exp="dispExposureMs"  group="Dose" priority="10" />
           <seg exp="dispExposureMas" group="Dose" priority="10" />
         </annoLine>
         <annoLine location="NE" line="4" color="#FFC800" dir="H">
           <seg exp="UnCompDetExposure"  group="Dose" priority="10" />
           <seg exp="CompDetExposure" group="Dose" priority="10" />
         </annoLine>
          <annoLine location="NE" line="5" color="#FFC800" dir="H">
           <seg exp="DetExposureIndex"  group="Dose" priority="10" />
           <seg exp="DetExposureRange" group="Dose" priority="10" />
         </annoLine>
     <annoLine location="SE" line="-4" color="#FFC800" dir="H">
           <seg exp="dispRoiResult1"       group="Measurements" priority="10" />
        </annoLine>
        <annoLine location="SE" line="-5" color="#FFC800" dir="H">
           <seg exp="dispRoiResult2"       group="Measurements" priority="10" />
        </annoLine>
        <annoLine location="SE" line="-6" color="#FFC800" dir="H">
           <seg exp="dispRoiResult3"       group="Measurements" priority="10" />
        </annoLine>
        <annoLine location="SE" line="-7" color="#FFC800" dir="H">
           <seg exp="dispRoiResult4"       group="Measurements" priority="10" />
        </annoLine>
        <annoLine location="SE" line="-8" color="#FFC800" dir="H">
           <seg exp="dispRoiResult5"       group="Measurements" priority="10" />
        </annoLine>
        <annoLine location="SE" line="-2" color="#FFC800" dir="H">
           <seg exp="dispZoom"         group="DisplayParams" priority="10" />
        </annoLine>
        <annoLine location="SE" line="-3" color="#FFC800" dir="H">
           <seg exp="dispWindowWidth"  group="DisplayParams" priority="10" />
           <seg exp="dispWindowLevel"  group="DisplayParams" priority="10" />
        </annoLine>
	<annoLine location="SW" line="0" color="#FFC800" dir="H">
           <seg exp="dispSliceHeight"  group="Processing" priority="10" />
           <seg exp="dispSliceInterval"  group="Processing" priority="10" />
           <seg exp="dispSamplingFactor"  group="Processing" priority="10" />
        </annoLine>
	<annoLine location="SW" line="-1" color="#FFC800" dir="H">
           <seg exp="dispLaterality"  group="AnatomyInfo" priority="10" />
           <seg exp="dispAnatomicalView"  group="AnatomyInfo" priority="10" />
           <seg exp="dispAnatomy"  group="AnatomyInfo" priority="10" />
        </annoLine>                                           
        <annoLine location="SW" line="-2" color="#FFC800" dir="H">
           <seg exp="dispProcessingDate"  group="Processing" priority="10" />
           <seg exp="dispProcessingTime"  group="Processing" priority="10" />
        </annoLine>
        <annoLine location="SW" line="-3" color="#FFC800" dir="H">
           <seg exp="dispProcessingType"  group="Processing" priority="10" />
           <seg exp="dispEdge"            group="Processing" priority="10" />
           <seg exp="dispGARStatus"       group="Processing" priority="10" />
        </annoLine>
         <annoLine location="SW" line="-4" color="#FFC800" dir="H">
           <seg exp="dispRRAClassification"  group="RRAInfo" priority="10" />
         </annoLine>
    </layout>
</apd>
