--[[
    This file provides a number of common variables and function for 
    to be used by the sequence sorting scripts

     Cristian Bonciu		August 2004
	-	Created and implemented the above functionality for development testing purposes
	Mahesh Nagarajan     Oct 6, 2005
     -	Added missing definitions for PULSE_SEQ_PROP, PHASE_PROP,
		MODALITY_PROP, PROJECTION_PROP, LATERALITY_PROP, 
		MG_PROJECTION_PROP, DIFF_COEF_PROP, NM_IMAGE_TYPE_PROP,
		ID_STUDY_DATE_TAG, ID_STUDY_TIME_TAG, ECHO_TYPE_PROP and
		ECHO_NUMBER_TAG
	Mahesh Nagarajan		13 FEB 2007
	-	As part of v11.5, re-organised the "DeclareTags section owing to its messy structure
]]--

-- ////////////////////////////////////////////////////////////////////////////
-- end common scripting context 
-- ////////////////////////////////////////////////////////////////////////////

-- ////////////////////////////////////////////////////////////////////////////    
-- definitions of the DICOM elements IDs used in this script
-- and available in the context when the sequence sorting scripts are called
-- all the registered property IDs are available automatically through the dictionary 
-- as global variables
-- ////////////////////////////////////////////////////////////////////////////    

function DeclareTags()    
    
    IMAGE_TYPE_TAG = maketag("0008", "0008")	-- image type, mandatory, regulated, text
    IMAGE_UID_TAG = maketag("0008", "0018")		-- SOP instance UID
    ID_STUDY_DATE_TAG = maketag("0008","0020") -- Study Date
	SERIES_DATE_TAG = maketag("0008","0021") 
    ACQUISITON_DATE_TAG = maketag("0008","0022") 
	ACQUISITON_DATETIME_TAG = maketag("0008","002A") 
	ID_STUDY_TIME_TAG = maketag("0008","0030") -- Study Time
	SERIES_TIME_TAG = maketag("0008","0031") 
    ACQUISITON_TIME_TAG = maketag("0008","0032") 
    IMAGE_ACQUISITON_TIME_TAG = maketag("0008","0033") 
	MODALITY_TAG = maketag("0008", "0060")		-- modality, mandatory, regulated, string
    SERIES_DESC_TAG = maketag("0008", "103e")	-- series description, optional, free, text
	
	CONTRAST_TAG = maketag("0018", "0010")		-- contrast bolus/agent
	BODY_PART_EX_TAG = maketag("0018", "0015")   -- body region, conditional / optional, regulated, string	
	ECHO_NUMBER_TAG = maketag("0018","0086")
	
    SERIES_UID_TAG = maketag("0020", "000e")	-- series UID
	SERIES_NUMBER_TAG = maketag("0020", "0011")	-- series number, conditional / optional, integer
	ACQ_NUMBER_TAG = maketag( "0020", "0012" )          -- Relative Acquisition Number    
	INSTANCE_NUMBER_TAG = maketag("0020","0013") -- formerly image number
    IMAGE_POSITION_PATIENT_TAG = maketag("0020","0032") 
    IMAGE_ORIENTATION_PATIENT_TAG = maketag("0020","0037") 
	LATERALITY_TAG = maketag("0020", "0062")	-- IMAGE (not series) laterality description, optional, regulated string (L,R,U,B)
    TEMP_POSITION_IDENTIFIER_TAG = maketag("0020","0100")
	
	NUMBER_OF_FRAMES_TAG = maketag("0028", "0008") -- number of frames, conditional, positive integer
   	
	-- McKesson Private Tag Definitions
    -- CB -- July 2004, quick fix for missing functionality for declaring the ids of the properties in the global context
    ALI_IMAGE_FILENAME_TAG = maketag("3711","0001") 
    ALI_FRAME_INDEX = maketag("3711","0090") 	
    IMAGE_TYPE = maketag("3711","1101")
    VIEW_PROP = maketag("3711","1102")
    SERIES_DESC_PROP = maketag("3711","1103")
    BODY_REGION_PROP = maketag("3711","1104")
    FRAME_TYPE_PROP = maketag("3711","1105") 
    LATERALITY_PROP = maketag("3711","1108")
    PHASE_PROP = maketag("3711","1109")
    MODALITY_PROP = maketag("3711","110a") 
    PROJECTION_PROP = maketag("3711","110b")
    ECHO_TYPE_PROP = maketag("3711","110c")
    THUMBNAIL_GRP_PROP = maketag("3711","1116")
    PULSE_SEQ_PROP = maketag("3711","1301")
    DIFF_COEF_PROP = maketag("3711","1302")
	NM_IMAGE_TYPE_PROP = maketag("3711","1401")
    MG_PROJECTION_PROP = maketag("3711","1501")
	
end

-- ////////////////////////////////////////////////////////////////////////////
-- commonly used strings definitions
-- ////////////////////////////////////////////////////////////////////////////    
  
-- ////////////////////////////////////////////////////////////////////////////
-- common sorting hints (none)
-- ////////////////////////////////////////////////////////////////////////////

function Execute()
    DeclareTags()
end
