<definitions>
	<defineiod name="Segmentation" sopclass="1.2.840.10008.5.1.4.1.1.66.4">
		<invokemodule name="FileMetaInformationModule"							type="M"/>
		<invokemodule name="PatientModule"										type="M"/>
		<invokemodule name="ClinicalTrialSubjectModule"							type="U" condition="count(ClinicalTrialSponsorName) &gt; 0 or count(ClinicalTrialProtocolID) &gt; 0
												 or count(ClinicalTrialProtocolName) &gt; 0 or count(ClinicalTrialSiteID) &gt; 0
												 or count(ClinicalTrialSiteName) &gt; 0 or count(ClinicalTrialSubjectID) &gt; 0
												 or count(ClinicalTrialSubjectReadingID) &gt; 0"/>
		<invokemodule name="GeneralStudyModule"									type="M"/>
		<invokemodule name="PatientStudyModule"									type="U" condition="count(AdmittingDiagnosesDescription) &gt; 0 or count(AdmittingDiagnosesCodeSequence) &gt; 0
												 or count(PatientAge) &gt; 0 or count(PatientSize) &gt; 0
												 or count(PatientWeight) &gt; 0 or count(PatientSizeCodeSequence) &gt; 0 or count(Occupation) &gt; 0
												 or count(AdditionalPatientHistory) &gt; 0"/>
		<invokemodule name="ClinicalTrialStudyModule" 							type="U" condition="count(ClinicalTrialTimePointID) &gt; 0 or count(ClinicalTrialTimePointDescription) &gt; 0"/>
		<invokemodule name="GeneralSeriesModule"								type="M"/>
		<invokemodule name="SegmentationSeriesModule"							type="M"/>
		<invokemodule name="ClinicalTrialSeriesModule"							type="U" condition="count(ClinicalTrialCoordinatingCenterName) &gt; 0"/>
		<invokemodule name="FrameOfReferenceModule"								type="C" condition="count(//DerivationImageSequence) = 0 or count(FrameOfReferenceUID) &gt; 0"/>
		<invokemodule name="GeneralEquipmentModule"								type="M"/>
		<invokemodule name="EnhancedGeneralEquipmentModule"						type="M"/>
		<invokemodule name="GeneralImageModule"									type="M"/>
		<invokemodule name="ImagePixelModule"									type="M"/>
		<invokemodule name="SegmentationImageModule"							type="M"/>
		<invokemodule name="MultiFrameFunctionalGroupsCommonModule"				type="M"/>
		<invokemodule name="MultiFrameFunctionalGroupsForSegmentationModule"	type="M"/>
		<invokemodule name="MultiFrameDimensionModule"							type="M"/>
		<invokemodule name="SpecimenModule"										type="U" condition="count(ContainerIdentifier) &gt; 0 or count(IssuerOfTheContainerIdentifierSequence) &gt; 0 or count(AlternateContainerIdentifierSequence) &gt; 0 or count(ContainerTypeCodeSequence) &gt; 0 or count(ContainerDescription) &gt; 0 or count(ContainerComponentSequence) &gt; 0 or count(SpecimenDescriptionSequence) &gt; 0"/>
		<invokemodule name="CommonInstanceReferenceModule"						type="C" condition="count(//DerivationImageSequence) &gt; 0 or count(ReferencedSeriesSequence) &gt; 0 or count(StudiesContainingOtherReferencedInstancesSequence) &gt; 0"/>
		<invokemodule name="SOPCommonModule"									type="M"/>
		<invokemodule name="FrameExtractionModule"								type="C" condition="count(FrameExtractionSequence) &gt; 0"/>
	</defineiod>

	<defineiod name="RawData" sopclass="1.2.840.10008.5.1.4.1.1.66">
		<invokemodule name="FileMetaInformationModule"			type="M"/>
		<invokemodule name="PatientModule"				type="M"/>
		<invokemodule name="ClinicalTrialSubjectModule"			type="U" condition="count(ClinicalTrialSponsorName) &gt; 0 or count(ClinicalTrialProtocolID) &gt; 0
												 or count(ClinicalTrialProtocolName) &gt; 0 or count(ClinicalTrialSiteID) &gt; 0
												 or count(ClinicalTrialSiteName) &gt; 0 or count(ClinicalTrialSubjectID) &gt; 0
												 or count(ClinicalTrialSubjectReadingID) &gt; 0"/>
		<invokemodule name="GeneralStudyModule"				type="M"/>
		<invokemodule name="PatientStudyModule"				type="U" condition="count(AdmittingDiagnosesDescription) &gt; 0 or count(AdmittingDiagnosesCodeSequence) &gt; 0
												 or count(PatientAge) &gt; 0 or count(PatientSize) &gt; 0
												 or count(PatientWeight) &gt; 0 or count(PatientSizeCodeSequence) &gt; 0 or count(Occupation) &gt; 0
												 or count(AdditionalPatientHistory) &gt; 0"/>
		<invokemodule name="ClinicalTrialStudyModule" 			type="U" condition="count(ClinicalTrialTimePointID) &gt; 0 or count(ClinicalTrialTimePointDescription) &gt; 0"/>
		<invokemodule name="GeneralSeriesModule"			type="M"/>
		<invokemodule name="ClinicalTrialSeriesModule"			type="U" condition="count(ClinicalTrialCoordinatingCenterName) &gt; 0"/>
		<invokemodule name="FrameOfReferenceModule"			type="M"/>
		<invokemodule name="SynchronizationModule" 			type="C" condition="count(SynchronizationFrameOfReferenceUID) &gt; 0 or count(SynchronizationTrigger) &gt; 0
												 or count(TriggerSourceOrType) &gt; 0 or count(SynchronizationChannel) &gt; 0
												 or count(AcquisitionTimeSynchronized) &gt; 0 or count(TimeSource) &gt; 0
												 or count(TimeDistributionProtocol) &gt; 0"/>
		<invokemodule name="GeneralEquipmentModule"			type="M"/>
		<invokemodule name="AcquisitionContextModule"		type="M"/>
		<invokemodule name="SpecimenModule"						type="U" condition="count(ContainerIdentifier) &gt; 0 or count(IssuerOfTheContainerIdentifierSequence) &gt; 0 or count(AlternateContainerIdentifierSequence) &gt; 0 or count(ContainerTypeCodeSequence) &gt; 0 or count(ContainerDescription) &gt; 0 or count(ContainerComponentSequence) &gt; 0 or count(SpecimenDescriptionSequence) &gt; 0"/>
		<invokemodule name="RawDataModule"					type="M"/>
		<invokemodule name="SOPCommonModule"				type="M"/>
	</defineiod>

	<defineiod name="EnhancedCTImage" sopclass="1.2.840.10008.5.1.4.1.1.2.1">
		<invokemodule name="FileMetaInformationModule"			type="M"/>
		<invokemodule name="PatientModule"				type="M"/>
		<invokemodule name="ClinicalTrialSubjectModule"			type="U" condition="count(ClinicalTrialSponsorName) &gt; 0 or count(ClinicalTrialProtocolID) &gt; 0
												 or count(ClinicalTrialProtocolName) &gt; 0 or count(ClinicalTrialSiteID) &gt; 0
												 or count(ClinicalTrialSiteName) &gt; 0 or count(ClinicalTrialSubjectID) &gt; 0
												 or count(ClinicalTrialSubjectReadingID) &gt; 0"/>
		<invokemodule name="GeneralStudyModule"				type="M"/>
		<invokemodule name="PatientStudyModule"				type="U" condition="count(AdmittingDiagnosesDescription) &gt; 0 or count(AdmittingDiagnosesCodeSequence) &gt; 0
												 or count(PatientAge) &gt; 0 or count(PatientSize) &gt; 0
												 or count(PatientWeight) &gt; 0 or count(PatientSizeCodeSequence) &gt; 0 or count(Occupation) &gt; 0
												 or count(AdditionalPatientHistory) &gt; 0"/>
		<invokemodule name="ClinicalTrialStudyModule" 			type="U" condition="count(ClinicalTrialTimePointID) &gt; 0 or count(ClinicalTrialTimePointDescription) &gt; 0"/>
		<invokemodule name="GeneralSeriesModule"			type="M"/>
		<invokemodule name="ClinicalTrialSeriesModule"			type="U" condition="count(ClinicalTrialCoordinatingCenterName) &gt; 0"/>
		<invokemodule name="CTSeriesModule"				type="M"/>
		<invokemodule name="FrameOfReferenceModule"			type="M"/>
		<invokemodule name="SynchronizationModule" 			type="C" condition="count(SynchronizationFrameOfReferenceUID) &gt; 0 or count(SynchronizationTrigger) &gt; 0
												 or count(TriggerSourceOrType) &gt; 0 or count(SynchronizationChannel) &gt; 0
												 or count(AcquisitionTimeSynchronized) &gt; 0 or count(TimeSource) &gt; 0
												 or count(TimeDistributionProtocol) &gt; 0"/>
		<invokemodule name="GeneralEquipmentModule"			type="M"/>
		<invokemodule name="EnhancedGeneralEquipmentModule"			type="M"/>
		<invokemodule name="ImagePixelModule"				type="M"/>
		<invokemodule name="EnhancedContrastBolusModule"		type="C" condition="count(ContrastBolusAgentSequence) &gt; 0 or count(//ContrastBolusUsageSequence) &gt; 0
												 or count(ContrastBolusAgent) &gt; 0 or count(ContrastBolusAgentSequence) &gt; 0
												 or count(ContrastBolusRoute) &gt; 0 or count(ContrastBolusAdministrationRouteSequence) &gt; 0
												 or count(ContrastBolusVolume) &gt; 0 or count(ContrastBolusStartTime) &gt; 0
												 or count(ContrastBolusStopTime) &gt; 0 or count(ContrastBolusTotalDose) &gt; 0
												 or count(ContrastBolusFlowRate) &gt; 0 or count(ContrastBolusDuration) &gt; 0
												 or count(ContrastBolusIngredient) &gt; 0 or count(ContrastBolusIngredientConcentration) &gt; 0"/>
		<invokemodule name="ContrastBolusModuleNotWanted"		type="C" condition="count(ContrastBolusAgent) &gt; 0 or count(ContrastBolusAgentSequence) &gt; 0
												 or count(ContrastBolusRoute) &gt; 0 or count(ContrastBolusAdministrationRouteSequence) &gt; 0
												 or count(ContrastBolusVolume) &gt; 0 or count(ContrastBolusStartTime) &gt; 0
												 or count(ContrastBolusStopTime) &gt; 0 or count(ContrastBolusTotalDose) &gt; 0
												 or count(ContrastBolusFlowRate) &gt; 0 or count(ContrastBolusDuration) &gt; 0
												 or count(ContrastBolusIngredient) &gt; 0 or count(ContrastBolusIngredientConcentration) &gt; 0"/>
		<invokemodule name="MultiFrameFunctionalGroupsCommonModule"	type="M"/>
		<invokemodule name="MultiFrameFunctionalGroupsForEnhancedCTImageModule"		type="M"/>
		<invokemodule name="MultiFrameDimensionModule"			type="M"/>
		<invokemodule name="CardiacSynchronizationModule"		type="C" condition="count(CardiacSynchronizationTechnique) &gt; 0 or count(CardiacSignalSource) &gt; 0
												 or count(CardiacRRIntervalSpecified) &gt; 0 or count(CardiacBeatRejectionTechnique) &gt; 0
												 or count(LowRRValue) &gt; 0 or count(HighRRValue) &gt; 0
												 or count(IntervalsAcquired) &gt; 0 or count(IntervalsRejected) &gt; 0
												 or count(//CardiacSynchronizationSequence) &gt; 0"/>
		<invokemodule name="RespiratorySynchronizationModule"		type="C" condition="count(RespiratoryMotionCompensationTechnique) &gt; 0 or count(RespiratorySignalSource) &gt; 0"/>
		<invokemodule name="SupplementalPaletteColorLookupTableModule"	type="C" condition="PixelPresentation/value[@number=1]='COLOR' or PixelPresentation/value[@number=1]='MIXED'"/>
		<invokemodule name="AcquisitionContextModule"			type="M"/>
		<invokemodule name="DeviceModule"						type="U" condition="count(DeviceSequence) &gt; 0"/>
		<invokemodule name="SpecimenModule"						type="U" condition="count(ContainerIdentifier) &gt; 0 or count(IssuerOfTheContainerIdentifierSequence) &gt; 0 or count(AlternateContainerIdentifierSequence) &gt; 0 or count(ContainerTypeCodeSequence) &gt; 0 or count(ContainerDescription) &gt; 0 or count(ContainerComponentSequence) &gt; 0 or count(SpecimenDescriptionSequence) &gt; 0"/>
		<invokemodule name="EnhancedCTImageModule"				type="M"/>
		<invokemodule name="SOPCommonModule"					type="M"/>
		<invokemodule name="CommonInstanceReferenceModule"		type="U" condition="count(ReferencedSeriesSequence) &gt; 0 or count(StudiesContainingOtherReferencedInstancesSequence) &gt; 0"/>
		<invokemodule name="FrameExtractionModule"				type="C" condition="count(FrameExtractionSequence) &gt; 0"/>
	</defineiod>

	<defineiod name="LegacyConvertedEnhancedCTImage" sopclass="1.2.840.10008.5.1.4.1.1.2.2">
		<invokemodule name="FileMetaInformationModule"			type="M"/>
		<invokemodule name="PatientModule"				type="M"/>
		<invokemodule name="ClinicalTrialSubjectModule"			type="U" condition="count(ClinicalTrialSponsorName) &gt; 0 or count(ClinicalTrialProtocolID) &gt; 0
												 or count(ClinicalTrialProtocolName) &gt; 0 or count(ClinicalTrialSiteID) &gt; 0
												 or count(ClinicalTrialSiteName) &gt; 0 or count(ClinicalTrialSubjectID) &gt; 0
												 or count(ClinicalTrialSubjectReadingID) &gt; 0"/>
		<invokemodule name="GeneralStudyModule"				type="M"/>
		<invokemodule name="PatientStudyModule"				type="U" condition="count(AdmittingDiagnosesDescription) &gt; 0 or count(AdmittingDiagnosesCodeSequence) &gt; 0
												 or count(PatientAge) &gt; 0 or count(PatientSize) &gt; 0
												 or count(PatientWeight) &gt; 0 or count(PatientSizeCodeSequence) &gt; 0 or count(Occupation) &gt; 0
												 or count(AdditionalPatientHistory) &gt; 0"/>
		<invokemodule name="ClinicalTrialStudyModule" 			type="U" condition="count(ClinicalTrialTimePointID) &gt; 0 or count(ClinicalTrialTimePointDescription) &gt; 0"/>
		<invokemodule name="GeneralSeriesModule"			type="M"/>
		<invokemodule name="ClinicalTrialSeriesModule"			type="U" condition="count(ClinicalTrialCoordinatingCenterName) &gt; 0"/>
		<invokemodule name="CTSeriesModule"				type="M"/>
		<invokemodule name="FrameOfReferenceModule"			type="M"/>
		<invokemodule name="SynchronizationModule" 			type="U" condition="count(SynchronizationFrameOfReferenceUID) &gt; 0 or count(SynchronizationTrigger) &gt; 0
												 or count(TriggerSourceOrType) &gt; 0 or count(SynchronizationChannel) &gt; 0
												 or count(AcquisitionTimeSynchronized) &gt; 0 or count(TimeSource) &gt; 0
												 or count(TimeDistributionProtocol) &gt; 0"/>
		<invokemodule name="GeneralEquipmentModule"			type="M"/>
		<invokemodule name="EnhancedGeneralEquipmentModule"	type="U"/>	<!-- no condition, since any of its attributes may optionally be present in GeneralEquipmentModule -->
		<invokemodule name="ImagePixelModule"				type="M"/>
		<invokemodule name="ContrastBolusModule"			type="U" condition="count(ContrastBolusAgent) &gt; 0 or count(ContrastBolusAgentSequence) &gt; 0
												 or count(ContrastBolusRoute) &gt; 0 or count(ContrastBolusAdministrationRouteSequence) &gt; 0
												 or count(ContrastBolusVolume) &gt; 0 or count(ContrastBolusStartTime) &gt; 0
												 or count(ContrastBolusStopTime) &gt; 0 or count(ContrastBolusTotalDose) &gt; 0
												 or count(ContrastBolusFlowRate) &gt; 0 or count(ContrastBolusDuration) &gt; 0
												 or count(ContrastBolusIngredient) &gt; 0 or count(ContrastBolusIngredientConcentration) &gt; 0"/>
		<invokemodule name="EnhancedContrastBolusModule"	type="U" condition="count(ContrastBolusAgentSequence/ContrastBolusAgentNumber) &gt; 0"/>
		<invokemodule name="MultiFrameFunctionalGroupsCommonModule"	type="M"/>
		<invokemodule name="MultiFrameFunctionalGroupsForLegacyConvertedEnhancedCTImageModule"		type="M"/>
		<invokemodule name="MultiFrameDimensionModule"			type="U"  condition="count(DimensionOrganizationSequence) &gt; 0 or count(DimensionIndexSequence) &gt; 0 or count(//DimensionIndexValues) &gt; 0"/>
		<invokemodule name="CardiacSynchronizationModule"		type="U" condition="count(CardiacSynchronizationTechnique) &gt; 0 or count(CardiacSignalSource) &gt; 0
												 or count(CardiacRRIntervalSpecified) &gt; 0 or count(CardiacBeatRejectionTechnique) &gt; 0
												 or count(LowRRValue) &gt; 0 or count(HighRRValue) &gt; 0
												 or count(IntervalsAcquired) &gt; 0 or count(IntervalsRejected) &gt; 0
												 or count(//CardiacSynchronizationSequence) &gt; 0"/>
		<invokemodule name="RespiratorySynchronizationModule"	type="U" condition="count(RespiratoryMotionCompensationTechnique) &gt; 0 or count(RespiratorySignalSource) &gt; 0"/>
		<invokemodule name="AcquisitionContextModule"			type="M"/>
		<invokemodule name="DeviceModule"						type="U" condition="count(DeviceSequence) &gt; 0"/>
		<invokemodule name="SpecimenModule"						type="U" condition="count(ContainerIdentifier) &gt; 0 or count(IssuerOfTheContainerIdentifierSequence) &gt; 0 or count(AlternateContainerIdentifierSequence) &gt; 0 or count(ContainerTypeCodeSequence) &gt; 0 or count(ContainerDescription) &gt; 0 or count(ContainerComponentSequence) &gt; 0 or count(SpecimenDescriptionSequence) &gt; 0"/>
		<invokemodule name="EnhancedCTImageModule"				type="M"/>
		<invokemodule name="SOPCommonModule"					type="M"/>
		<invokemodule name="CommonInstanceReferenceModule"		type="U" condition="count(ReferencedSeriesSequence) &gt; 0 or count(StudiesContainingOtherReferencedInstancesSequence) &gt; 0"/>
		<invokemodule name="FrameExtractionModule"				type="C" condition="count(FrameExtractionSequence) &gt; 0"/>
	</defineiod>

	<defineiod name="EnhancedMRImage" sopclass="1.2.840.10008.5.1.4.1.1.4.1">
		<invokemodule name="FileMetaInformationModule"			type="M"/>
		<invokemodule name="PatientModule"				type="M"/>
		<invokemodule name="ClinicalTrialSubjectModule"			type="U" condition="count(ClinicalTrialSponsorName) &gt; 0 or count(ClinicalTrialProtocolID) &gt; 0
												 or count(ClinicalTrialProtocolName) &gt; 0 or count(ClinicalTrialSiteID) &gt; 0
												 or count(ClinicalTrialSiteName) &gt; 0 or count(ClinicalTrialSubjectID) &gt; 0
												 or count(ClinicalTrialSubjectReadingID) &gt; 0"/>
		<invokemodule name="GeneralStudyModule"				type="M"/>
		<invokemodule name="PatientStudyModule"				type="U" condition="count(AdmittingDiagnosesDescription) &gt; 0 or count(AdmittingDiagnosesCodeSequence) &gt; 0
												 or count(PatientAge) &gt; 0 or count(PatientSize) &gt; 0
												 or count(PatientWeight) &gt; 0 or count(PatientSizeCodeSequence) &gt; 0 or count(Occupation) &gt; 0
												 or count(AdditionalPatientHistory) &gt; 0"/>
		<invokemodule name="ClinicalTrialStudyModule" 			type="U" condition="count(ClinicalTrialTimePointID) &gt; 0 or count(ClinicalTrialTimePointDescription) &gt; 0"/>
		<invokemodule name="GeneralSeriesModule"			type="M"/>
		<invokemodule name="ClinicalTrialSeriesModule"			type="U" condition="count(ClinicalTrialCoordinatingCenterName) &gt; 0"/>
		<invokemodule name="MRSeriesModule"				type="M"/>
		<invokemodule name="FrameOfReferenceModule"			type="M"/>
		<invokemodule name="SynchronizationModule" 			type="C" condition="count(SynchronizationFrameOfReferenceUID) &gt; 0 or count(SynchronizationTrigger) &gt; 0
												 or count(TriggerSourceOrType) &gt; 0 or count(SynchronizationChannel) &gt; 0
												 or count(AcquisitionTimeSynchronized) &gt; 0 or count(TimeSource) &gt; 0
												 or count(TimeDistributionProtocol) &gt; 0"/>
		<invokemodule name="GeneralEquipmentModule"			type="M"/>
		<invokemodule name="EnhancedGeneralEquipmentModule"			type="M"/>
		<invokemodule name="ImagePixelModule"				type="M"/>
		<invokemodule name="EnhancedContrastBolusModule"		type="C" condition="count(ContrastBolusAgentSequence) &gt; 0 or count(//ContrastBolusUsageSequence) &gt; 0
												 or count(ContrastBolusAgent) &gt; 0 or count(ContrastBolusAgentSequence) &gt; 0
												 or count(ContrastBolusRoute) &gt; 0 or count(ContrastBolusAdministrationRouteSequence) &gt; 0
												 or count(ContrastBolusVolume) &gt; 0 or count(ContrastBolusStartTime) &gt; 0
												 or count(ContrastBolusStopTime) &gt; 0 or count(ContrastBolusTotalDose) &gt; 0
												 or count(ContrastBolusFlowRate) &gt; 0 or count(ContrastBolusDuration) &gt; 0
												 or count(ContrastBolusIngredient) &gt; 0 or count(ContrastBolusIngredientConcentration) &gt; 0"/>
		<invokemodule name="ContrastBolusModuleNotWanted"		type="C" condition="count(ContrastBolusAgent) &gt; 0 or count(ContrastBolusAgentSequence) &gt; 0
												 or count(ContrastBolusRoute) &gt; 0 or count(ContrastBolusAdministrationRouteSequence) &gt; 0
												 or count(ContrastBolusVolume) &gt; 0 or count(ContrastBolusStartTime) &gt; 0
												 or count(ContrastBolusStopTime) &gt; 0 or count(ContrastBolusTotalDose) &gt; 0
												 or count(ContrastBolusFlowRate) &gt; 0 or count(ContrastBolusDuration) &gt; 0
												 or count(ContrastBolusIngredient) &gt; 0 or count(ContrastBolusIngredientConcentration) &gt; 0"/>
		<invokemodule name="MultiFrameFunctionalGroupsCommonModule"	type="M"/>
		<invokemodule name="MultiFrameFunctionalGroupsForEnhancedMRImageModule"		type="M"/>
		<invokemodule name="MultiFrameDimensionModule"			type="M"/>
		<invokemodule name="CardiacSynchronizationModule"		type="C" condition="count(CardiacSynchronizationTechnique) &gt; 0 or count(CardiacSignalSource) &gt; 0
												 or count(CardiacRRIntervalSpecified) &gt; 0 or count(CardiacBeatRejectionTechnique) &gt; 0
												 or count(LowRRValue) &gt; 0 or count(HighRRValue) &gt; 0
												 or count(IntervalsAcquired) &gt; 0 or count(IntervalsRejected) &gt; 0
												 or count(//CardiacSynchronizationSequence) &gt; 0"/>
		<invokemodule name="RespiratorySynchronizationModule"		type="C" condition="count(RespiratoryMotionCompensationTechnique) &gt; 0 or count(RespiratorySignalSource) &gt; 0"/>
		<invokemodule name="BulkMotionSynchronizationModule"		type="C" condition="count(BulkMotionCompensationTechnique) &gt; 0 or count(BulkMotionSignalSource) &gt; 0"/>
		<invokemodule name="SupplementalPaletteColorLookupTableModule"	type="C" condition="PixelPresentation/value[@number=1]='COLOR' or PixelPresentation/value[@number=1]='MIXED'"/>
		<invokemodule name="AcquisitionContextModule"			type="M"/>
		<invokemodule name="DeviceModule"						type="U" condition="count(DeviceSequence) &gt; 0"/>
		<invokemodule name="SpecimenModule"						type="U" condition="count(ContainerIdentifier) &gt; 0 or count(IssuerOfTheContainerIdentifierSequence) &gt; 0 or count(AlternateContainerIdentifierSequence) &gt; 0 or count(ContainerTypeCodeSequence) &gt; 0 or count(ContainerDescription) &gt; 0 or count(ContainerComponentSequence) &gt; 0 or count(SpecimenDescriptionSequence) &gt; 0"/>
		<invokemodule name="EnhancedMRImageModule"				type="M"/>
		<invokemodule name="MRPulseSequenceModule"				type="C" condition="ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED'
												 or count(PulseSequenceName) &gt; 0 or count(MRAcquisitionType) &gt; 0
												 or count(EchoPulseSequence) &gt; 0 or count(MultipleSpinEcho) &gt; 0
												 or count(MultiPlanarExcitation) &gt; 0 or count(PhaseContrast) &gt; 0
												 or count(TimeOfFlightContrast) &gt; 0 or count(SteadyStatePulseSequence) &gt; 0
												 or count(EchoPlanarPulseSequence) &gt; 0 or count(SaturationRecovery) &gt; 0
												 or count(SpectrallySelectedSuppression) &gt; 0 or count(OversamplingPhase) &gt; 0
												 or count(GeometryOfKSpaceTraversal) &gt; 0 or count(RectilinearPhaseEncodeReordering) &gt; 0
												 or count(SegmentedKSpaceTraversal) &gt; 0 or count(CoverageOfKSpace) &gt; 0
												 or count(NumberOfKSpaceTrajectories) &gt; 0"/>
		<invokemodule name="SOPCommonModule"					type="M"/>
		<invokemodule name="CommonInstanceReferenceModule"		type="U" condition="count(ReferencedSeriesSequence) &gt; 0 or count(StudiesContainingOtherReferencedInstancesSequence) &gt; 0"/>
		<invokemodule name="FrameExtractionModule"				type="C" condition="count(FrameExtractionSequence) &gt; 0"/>
	</defineiod>

	<defineiod name="LegacyConvertedEnhancedMRImage" sopclass="1.2.840.10008.5.1.4.1.1.4.4">
		<invokemodule name="FileMetaInformationModule"			type="M"/>
		<invokemodule name="PatientModule"				type="M"/>
		<invokemodule name="ClinicalTrialSubjectModule"			type="U" condition="count(ClinicalTrialSponsorName) &gt; 0 or count(ClinicalTrialProtocolID) &gt; 0
												 or count(ClinicalTrialProtocolName) &gt; 0 or count(ClinicalTrialSiteID) &gt; 0
												 or count(ClinicalTrialSiteName) &gt; 0 or count(ClinicalTrialSubjectID) &gt; 0
												 or count(ClinicalTrialSubjectReadingID) &gt; 0"/>
		<invokemodule name="GeneralStudyModule"				type="M"/>
		<invokemodule name="PatientStudyModule"				type="U" condition="count(AdmittingDiagnosesDescription) &gt; 0 or count(AdmittingDiagnosesCodeSequence) &gt; 0
												 or count(PatientAge) &gt; 0 or count(PatientSize) &gt; 0
												 or count(PatientWeight) &gt; 0 or count(PatientSizeCodeSequence) &gt; 0 or count(Occupation) &gt; 0
												 or count(AdditionalPatientHistory) &gt; 0"/>
		<invokemodule name="ClinicalTrialStudyModule" 			type="U" condition="count(ClinicalTrialTimePointID) &gt; 0 or count(ClinicalTrialTimePointDescription) &gt; 0"/>
		<invokemodule name="GeneralSeriesModule"			type="M"/>
		<invokemodule name="ClinicalTrialSeriesModule"		type="U" condition="count(ClinicalTrialCoordinatingCenterName) &gt; 0"/>
		<invokemodule name="MRSeriesModule"					type="M"/>
		<invokemodule name="FrameOfReferenceModule"			type="M"/>
		<invokemodule name="SynchronizationModule" 			type="U" condition="count(SynchronizationFrameOfReferenceUID) &gt; 0 or count(SynchronizationTrigger) &gt; 0
												 or count(TriggerSourceOrType) &gt; 0 or count(SynchronizationChannel) &gt; 0
												 or count(AcquisitionTimeSynchronized) &gt; 0 or count(TimeSource) &gt; 0
												 or count(TimeDistributionProtocol) &gt; 0"/>
		<invokemodule name="GeneralEquipmentModule"			type="M"/>
		<invokemodule name="EnhancedGeneralEquipmentModule"	type="U"/>	<!-- no condition, since any of its attributes may optionally be present in GeneralEquipmentModule -->
		<invokemodule name="ImagePixelModule"				type="M"/>
		<invokemodule name="ContrastBolusModule"			type="U" condition="count(ContrastBolusAgent) &gt; 0 or count(ContrastBolusAgentSequence) &gt; 0
												 or count(ContrastBolusRoute) &gt; 0 or count(ContrastBolusAdministrationRouteSequence) &gt; 0
												 or count(ContrastBolusVolume) &gt; 0 or count(ContrastBolusStartTime) &gt; 0
												 or count(ContrastBolusStopTime) &gt; 0 or count(ContrastBolusTotalDose) &gt; 0
												 or count(ContrastBolusFlowRate) &gt; 0 or count(ContrastBolusDuration) &gt; 0
												 or count(ContrastBolusIngredient) &gt; 0 or count(ContrastBolusIngredientConcentration) &gt; 0"/>
		<invokemodule name="EnhancedContrastBolusModule"	type="U" condition="count(ContrastBolusAgentSequence/ContrastBolusAgentNumber) &gt; 0"/>
		<invokemodule name="MultiFrameFunctionalGroupsCommonModule"	type="M"/>
		<invokemodule name="MultiFrameFunctionalGroupsForLegacyConvertedEnhancedMRImageModule"		type="M"/>
		<invokemodule name="MultiFrameDimensionModule"			type="U"  condition="count(DimensionOrganizationSequence) &gt; 0 or count(DimensionIndexSequence) &gt; 0 or count(//DimensionIndexValues) &gt; 0"/>
		<invokemodule name="CardiacSynchronizationModule"		type="U" condition="count(CardiacSynchronizationTechnique) &gt; 0 or count(CardiacSignalSource) &gt; 0
												 or count(CardiacRRIntervalSpecified) &gt; 0 or count(CardiacBeatRejectionTechnique) &gt; 0
												 or count(LowRRValue) &gt; 0 or count(HighRRValue) &gt; 0
												 or count(IntervalsAcquired) &gt; 0 or count(IntervalsRejected) &gt; 0
												 or count(//CardiacSynchronizationSequence) &gt; 0"/>
		<invokemodule name="RespiratorySynchronizationModule"	type="U" condition="count(RespiratoryMotionCompensationTechnique) &gt; 0 or count(RespiratorySignalSource) &gt; 0"/>
		<invokemodule name="BulkMotionSynchronizationModule"	type="U" condition="count(BulkMotionCompensationTechnique) &gt; 0 or count(BulkMotionSignalSource) &gt; 0"/>
		<invokemodule name="AcquisitionContextModule"			type="M"/>
		<invokemodule name="DeviceModule"						type="U" condition="count(DeviceSequence) &gt; 0"/>
		<invokemodule name="SpecimenModule"						type="U" condition="count(ContainerIdentifier) &gt; 0 or count(IssuerOfTheContainerIdentifierSequence) &gt; 0 or count(AlternateContainerIdentifierSequence) &gt; 0 or count(ContainerTypeCodeSequence) &gt; 0 or count(ContainerDescription) &gt; 0 or count(ContainerComponentSequence) &gt; 0 or count(SpecimenDescriptionSequence) &gt; 0"/>
		<invokemodule name="EnhancedMRImageModule"				type="M"/>
		<invokemodule name="SOPCommonModule"					type="M"/>
		<invokemodule name="CommonInstanceReferenceModule"		type="U" condition="count(ReferencedSeriesSequence) &gt; 0 or count(StudiesContainingOtherReferencedInstancesSequence) &gt; 0"/>
		<invokemodule name="FrameExtractionModule"				type="C" condition="count(FrameExtractionSequence) &gt; 0"/>
	</defineiod>

	<defineiod name="MRSpectroscopy" sopclass="1.2.840.10008.5.1.4.1.1.4.2">
		<invokemodule name="FileMetaInformationModule"			type="M"/>
		<invokemodule name="PatientModule"				type="M"/>
		<invokemodule name="ClinicalTrialSubjectModule"			type="U" condition="count(ClinicalTrialSponsorName) &gt; 0 or count(ClinicalTrialProtocolID) &gt; 0
												 or count(ClinicalTrialProtocolName) &gt; 0 or count(ClinicalTrialSiteID) &gt; 0
												 or count(ClinicalTrialSiteName) &gt; 0 or count(ClinicalTrialSubjectID) &gt; 0
												 or count(ClinicalTrialSubjectReadingID) &gt; 0"/>
		<invokemodule name="GeneralStudyModule"				type="M"/>
		<invokemodule name="PatientStudyModule"				type="U" condition="count(AdmittingDiagnosesDescription) &gt; 0 or count(AdmittingDiagnosesCodeSequence) &gt; 0
												 or count(PatientAge) &gt; 0 or count(PatientSize) &gt; 0
												 or count(PatientWeight) &gt; 0 or count(PatientSizeCodeSequence) &gt; 0 or count(Occupation) &gt; 0
												 or count(AdditionalPatientHistory) &gt; 0"/>
		<invokemodule name="ClinicalTrialStudyModule" 			type="U" condition="count(ClinicalTrialTimePointID) &gt; 0 or count(ClinicalTrialTimePointDescription) &gt; 0"/>
		<invokemodule name="GeneralSeriesModule"			type="M"/>
		<invokemodule name="ClinicalTrialSeriesModule"			type="U" condition="count(ClinicalTrialCoordinatingCenterName) &gt; 0"/>
		<invokemodule name="MRSeriesModule"				type="M"/>
		<invokemodule name="FrameOfReferenceModule"			type="M"/>
		<invokemodule name="SynchronizationModule" 			type="C" condition="count(SynchronizationFrameOfReferenceUID) &gt; 0 or count(SynchronizationTrigger) &gt; 0
												 or count(TriggerSourceOrType) &gt; 0 or count(SynchronizationChannel) &gt; 0
												 or count(AcquisitionTimeSynchronized) &gt; 0 or count(TimeSource) &gt; 0
												 or count(TimeDistributionProtocol) &gt; 0"/>
		<invokemodule name="GeneralEquipmentModule"			type="M"/>
		<invokemodule name="EnhancedGeneralEquipmentModule"			type="M"/>
		<invokemodule name="EnhancedContrastBolusModule"		type="C" condition="count(ContrastBolusAgentSequence) &gt; 0 or count(//ContrastBolusUsageSequence) &gt; 0
												 or count(ContrastBolusAgent) &gt; 0 or count(ContrastBolusAgentSequence) &gt; 0
												 or count(ContrastBolusRoute) &gt; 0 or count(ContrastBolusAdministrationRouteSequence) &gt; 0
												 or count(ContrastBolusVolume) &gt; 0 or count(ContrastBolusStartTime) &gt; 0
												 or count(ContrastBolusStopTime) &gt; 0 or count(ContrastBolusTotalDose) &gt; 0
												 or count(ContrastBolusFlowRate) &gt; 0 or count(ContrastBolusDuration) &gt; 0
												 or count(ContrastBolusIngredient) &gt; 0 or count(ContrastBolusIngredientConcentration) &gt; 0"/>
		<invokemodule name="ContrastBolusModuleNotWanted"		type="C" condition="count(ContrastBolusAgent) &gt; 0 or count(ContrastBolusAgentSequence) &gt; 0
												 or count(ContrastBolusRoute) &gt; 0 or count(ContrastBolusAdministrationRouteSequence) &gt; 0
												 or count(ContrastBolusVolume) &gt; 0 or count(ContrastBolusStartTime) &gt; 0
												 or count(ContrastBolusStopTime) &gt; 0 or count(ContrastBolusTotalDose) &gt; 0
												 or count(ContrastBolusFlowRate) &gt; 0 or count(ContrastBolusDuration) &gt; 0
												 or count(ContrastBolusIngredient) &gt; 0 or count(ContrastBolusIngredientConcentration) &gt; 0"/>
		<invokemodule name="MultiFrameFunctionalGroupsCommonModule"	type="M"/>
		<invokemodule name="MultiFrameFunctionalGroupsForMRImageSpectroscopyModule"		type="M"/>
		<invokemodule name="MultiFrameDimensionModule"			type="M"/>
		<invokemodule name="CardiacSynchronizationModule"		type="C" condition="count(CardiacSynchronizationTechnique) &gt; 0 or count(CardiacSignalSource) &gt; 0
												 or count(CardiacRRIntervalSpecified) &gt; 0 or count(CardiacBeatRejectionTechnique) &gt; 0
												 or count(LowRRValue) &gt; 0 or count(HighRRValue) &gt; 0
												 or count(IntervalsAcquired) &gt; 0 or count(IntervalsRejected) &gt; 0
												 or count(//CardiacSynchronizationSequence) &gt; 0"/>
		<invokemodule name="RespiratorySynchronizationModule"		type="C" condition="count(RespiratoryMotionCompensationTechnique) &gt; 0 or count(RespiratorySignalSource) &gt; 0"/>
		<invokemodule name="BulkMotionSynchronizationModule"		type="C" condition="count(BulkMotionCompensationTechnique) &gt; 0 or count(BulkMotionSignalSource) &gt; 0"/>
		<invokemodule name="SupplementalPaletteColorLookupTableModule"	type="C" condition="PixelPresentation/value[@number=1]='COLOR' or PixelPresentation/value[@number=1]='MIXED'"/>
		<invokemodule name="AcquisitionContextModule"			type="M"/>
		<invokemodule name="SpecimenModule"						type="U" condition="count(ContainerIdentifier) &gt; 0 or count(IssuerOfTheContainerIdentifierSequence) &gt; 0 or count(AlternateContainerIdentifierSequence) &gt; 0 or count(ContainerTypeCodeSequence) &gt; 0 or count(ContainerDescription) &gt; 0 or count(ContainerComponentSequence) &gt; 0 or count(SpecimenDescriptionSequence) &gt; 0"/>
		<invokemodule name="MRSpectroscopyModule"			type="M"/>
		<invokemodule name="MRSpectroscopyPulseSequenceModule"		type="C" condition="ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED'
												 or count(PulseSequenceName) &gt; 0 or count(MRSpectroscopyAcquisitionType) &gt; 0
												 or count(EchoPulseSequence) &gt; 0 or count(MultipleSpinEcho) &gt; 0
												 or count(MultiPlanarExcitation) &gt; 0 or count(SteadyStatePulseSequence) &gt; 0
												 or count(EchoPlanarPulseSequence) &gt; 0 or count(SpectrallySelectedSuppression) &gt; 0
												 or count(GeometryOfKSpaceTraversal) &gt; 0 or count(RectilinearPhaseEncodeReordering) &gt; 0
												 or count(SegmentedKSpaceTraversal) &gt; 0 or count(CoverageOfKSpace) &gt; 0
												 or count(NumberOfKSpaceTrajectories) &gt; 0"/>
		<invokemodule name="MRSpectroscopyDataModule"			type="M"/>
		<invokemodule name="SOPCommonModule"					type="M"/>
		<invokemodule name="CommonInstanceReferenceModule"		type="U" condition="count(ReferencedSeriesSequence) &gt; 0 or count(StudiesContainingOtherReferencedInstancesSequence) &gt; 0"/>
		<invokemodule name="FrameExtractionModule"				type="C" condition="count(FrameExtractionSequence) &gt; 0"/>
	</defineiod>

	<definemodule name="FileMetaInformationModule">
		<attribute name="FileMetaInformationGroupLength"		vr="UL" type="1" vmmin="1" vmmax="1"/>
		<attribute name="FileMetaInformationVersion"			vr="OB" type="1" vmmin="1" vmmax="1"/>
		<attribute name="MediaStorageSOPInstanceUID"			vr="UI" type="1" vmmin="1" vmmax="1"/>
		<attribute name="TransferSyntaxUID"				vr="UI" type="1" vmmin="1" vmmax="1"/>
		<attribute name="ImplementationClassUID"			vr="UI" type="1" vmmin="1" vmmax="1"/>
		<attribute name="ImplementationVersionName"			vr="SH" type="3" vmmin="1" vmmax="1"/>
		<attribute name="SourceApplicationEntityTitle"			vr="AE" type="3" vmmin="1" vmmax="1"/>
		<attribute name="PrivateInformationCreatorUID"			vr="UI" type="3" vmmin="1" vmmax="1"/>
		<attribute name="PrivateInformation"				vr="OB" type="1C" vmmin="1" vmmax="1" condition="count(PrivateInformationCreatorUID) &gt; 0" mbpo="F"/>
	</definemodule>

	<definemodule name="PatientModule">
		<attribute name="PatientName"					vr="PN" type="2" vmmin="1" vmmax="1"/>
		<attribute name="PatientID"						vr="LO" type="2" vmmin="1" vmmax="1"/>
		<includemacro name="IssuerOfPatientIDMacro"/>
		<attribute name="PatientBirthDate"				vr="DA" type="2" vmmin="1" vmmax="1"/>
		<attribute name="PatientSex"					vr="CS" type="2" vmmin="1" vmmax="1">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="M"/>
				<enumeratedvalue value="F"/>
				<enumeratedvalue value="O"/>
			</enumeratedvalueslist>
		</attribute>
		<sequence name="ReferencedPatientSequence"			vr="SQ" type="3" vmmin="1" vmmax="1">
			<attribute name="ReferencedSOPClassUID"			vr="UI" type="1" vmmin="1" vmmax="1"/>
			<attribute name="ReferencedSOPInstanceUID"		vr="UI" type="1" vmmin="1" vmmax="1"/>
		</sequence>
		<attribute name="PatientBirthTime"				vr="TM" type="3" vmmin="1" vmmax="1"/>
		<attribute name="OtherPatientIDs"				vr="LO" type="3" vmmin="1" vmmax="n"/>
		<sequence name="OtherPatientIDsSequence"			vr="SQ" type="3" vmmin="1" vmmax="n">
			<attribute name="PatientID"					vr="LO" type="2" vmmin="1" vmmax="1"/>
			<includemacro name="IssuerOfPatientIDMacro"/>
			<attribute name="TypeOfPatientID"			vr="CS" type="1" vmmin="1" vmmax="1">
				<definedtermslist valueselector="1">
					<definedterm value="TEXT"/>
					<definedterm value="RFID"/>
					<definedterm value="BARCODE"/>
				</definedtermslist>
			</attribute>
		</sequence>
		<attribute name="OtherPatientNames"				vr="PN" type="3" vmmin="1" vmmax="n"/>
		<attribute name="EthnicGroup"					vr="SH" type="3" vmmin="1" vmmax="1"/>
		<attribute name="PatientComments"				vr="LT" type="3" vmmin="1" vmmax="1"/>
		<attribute name="PatientSpeciesDescription"		vr="LO" type="1C" vmmin="1" vmmax="1" condition="count(PatientSpeciesCodeSequence) = 0 and (count(PatientSpeciesDescription) &gt; 0 or count(PatientBreedDescription) &gt; 0 or count(PatientBreedCodeSequence) &gt; 0 or count(BreedRegistrationSequence) &gt; 0 or count(StrainDescription) &gt; 0 or count(StrainNomenclature) &gt; 0 or count(StrainCodeSequence) &gt; 0 or count(StrainAdditionalInformation) &gt; 0 or count(StrainStockSequence) &gt; 0)" mbpo="T"/>
		<sequence name="PatientSpeciesCodeSequence"		vr="SQ" type="1C" vmmin="1" vmmax="1" condition="count(PatientSpeciesDescription) = 0 and (count(PatientSpeciesCodeSequence) &gt; 0 or count(PatientBreedDescription) &gt; 0 or count(PatientBreedCodeSequence) &gt; 0 or count(BreedRegistrationSequence) &gt; 0 or count(StrainDescription) &gt; 0 or count(StrainNomenclature) &gt; 0 or count(StrainCodeSequence) &gt; 0 or count(StrainAdditionalInformation) &gt; 0 or count(StrainStockSequence) &gt; 0)" mbpo="T">
			<includemacro name="CodeSequenceMacro"/>
		</sequence>
		<attribute name="PatientBreedDescription"		vr="LO" type="2C" vmmin="1" vmmax="1" condition="count(PatientBreedCodeSequence/Item) = 0 and (count(PatientSpeciesDescription) &gt; 0 or count(PatientSpeciesCodeSequence) &gt; 0 or count(PatientBreedDescription) &gt; 0 or count(PatientBreedCodeSequence) &gt; 0 or count(BreedRegistrationSequence) &gt; 0 or count(StrainDescription) &gt; 0 or count(StrainNomenclature) &gt; 0 or count(StrainCodeSequence) &gt; 0 or count(StrainAdditionalInformation) &gt; 0 or count(StrainStockSequence) &gt; 0)" mbpo="T"/>
		<sequence name="PatientBreedCodeSequence"		vr="SQ" type="2C" vmmin="0" vmmax="1" condition="count(PatientSpeciesDescription) &gt; 0 or count(PatientSpeciesCodeSequence) &gt; 0 or count(PatientBreedDescription) &gt; 0 or count(PatientBreedCodeSequence) &gt; 0 or count(BreedRegistrationSequence) &gt; 0 or count(StrainDescription) &gt; 0 or count(StrainNomenclature) &gt; 0 or count(StrainCodeSequence) &gt; 0 or count(StrainAdditionalInformation) &gt; 0 or count(StrainStockSequence) &gt; 0" mbpo="F">
			<includemacro name="CodeSequenceMacro"/>
		</sequence>
		<sequence name="BreedRegistrationSequence"		vr="SQ" type="2C" vmmin="0" vmmax="1" condition="count(PatientSpeciesDescription) &gt; 0 or count(PatientSpeciesCodeSequence) &gt; 0 or count(PatientBreedDescription) &gt; 0 or count(PatientBreedCodeSequence) &gt; 0 or count(BreedRegistrationSequence) &gt; 0 or count(StrainDescription) &gt; 0 or count(StrainNomenclature) &gt; 0 or count(StrainCodeSequence) &gt; 0 or count(StrainAdditionalInformation) &gt; 0 or count(StrainStockSequence) &gt; 0" mbpo="F">
			<attribute name="BreedRegistrationNumber"	vr="LO" type="1" vmmin="1" vmmax="n"/>
			<sequence name="BreedRegistryCodeSequence"	vr="SQ" type="1" vmmin="1" vmmax="1">
				<includemacro name="CodeSequenceMacro"/>
			</sequence>
		</sequence>
		<attribute name="StrainDescription"				vr="UC" type="3" vmmin="1" vmmax="1"/>
		<attribute name="StrainNomenclature"			vr="LO" type="3" vmmin="1" vmmax="1"/>
		<sequence  name="StrainCodeSequence"			vr="SQ" type="3" vmmin="1" vmmax="n">
			<includemacro name="CodeSequenceMacro"/>
		</sequence>
		<attribute name="StrainAdditionalInformation"	vr="UT" type="3" vmmin="1" vmmax="1"/>
		<sequence  name="StrainStockSequence"			vr="SQ" type="3" vmmin="1" vmmax="1">
			<attribute name="StrainStockNumber"			vr="LO" type="3" vmmin="1" vmmax="1"/>
			<attribute name="StrainSource"				vr="LO" type="3" vmmin="1" vmmax="1"/>
			<sequence  name="StrainSourceRegistryCodeSequence"	vr="SQ" type="3" vmmin="1" vmmax="1">
				<includemacro name="CodeSequenceMacro"/>
			</sequence>
		</sequence>
		<attribute name="ResponsiblePerson"				vr="PN" type="2C" vmmin="1" vmmax="1" condition="count(PatientSpeciesDescription) &gt; 0 or count(PatientSpeciesCodeSequence) &gt; 0 or count(PatientBreedDescription) &gt; 0 or count(PatientBreedCodeSequence) &gt; 0 or count(BreedRegistrationSequence) &gt; 0" mbpo="T"/>
		<attribute name="ResponsiblePersonRole"			vr="CS" type="1C" vmmin="1" vmmax="1" condition="count(ResponsiblePerson) &gt; 0 and string-length(ResponsiblePerson/value[@number=1]) &gt; 0" mbpo="F">
			<definedtermslist valueselector="1">
				<definedterm value="OWNER"/>
				<definedterm value="PARENT"/>
				<definedterm value="CHILD"/>
				<definedterm value="SPOUSE"/>
				<definedterm value="SIBLING"/>
				<definedterm value="RELATIVE"/>
				<definedterm value="GUARDIAN"/>
				<definedterm value="CUSTODIAN"/>
				<definedterm value="AGENT"/>
				<definedterm value="INVESTIGATOR"/>
				<definedterm value="VETERINARIAN"/>
			</definedtermslist>
		</attribute>
		<attribute name="ResponsibleOrganization"		vr="LO" type="2C" vmmin="1" vmmax="1" condition="count(PatientSpeciesDescription) &gt; 0 or count(PatientSpeciesCodeSequence) &gt; 0 or count(PatientBreedDescription) &gt; 0 or count(PatientBreedCodeSequence) &gt; 0 or count(BreedRegistrationSequence) &gt; 0" mbpo="T"/>
		<attribute name="PatientIdentityRemoved"		vr="CS" type="3" vmmin="1" vmmax="1">
			<definedtermslist valueselector="1">
				<definedterm value="YES"/>
				<definedterm value="NO"/>
			</definedtermslist>
		</attribute>
		<attribute name="DeidentificationMethod"			vr="LO" type="1C" vmmin="1" vmmax="n" condition="PatientIdentityRemoved/value[@number=1] = 'YES' and count(DeidentificationMethodCodeSequence) = 0" mbpo="T"/>
		<sequence name="DeidentificationMethodCodeSequence"	vr="SQ" type="1C" vmmin="1" vmmax="n" condition="PatientIdentityRemoved/value[@number=1] = 'YES' and count(DeidentificationMethod) = 0" mbpo="T">
			<includemacro name="CodeSequenceMacro"/>
		</sequence>
		<includemacro name="PatientGroupMacro"/>
	</definemodule>
	
	<definemodule name="ClinicalTrialSubjectModule">
		<attribute name="ClinicalTrialSponsorName"			vr="LO" type="1"  vmmin="1" vmmax="1"/>
		<attribute name="ClinicalTrialProtocolID"			vr="LO" type="1"  vmmin="1" vmmax="1"/>
		<attribute name="ClinicalTrialProtocolName"			vr="LO" type="2"  vmmin="1" vmmax="1"/>
		<attribute name="ClinicalTrialSiteID"				vr="LO" type="2"  vmmin="1" vmmax="1"/>
		<attribute name="ClinicalTrialSiteName"				vr="LO" type="2"  vmmin="1" vmmax="1"/>
		<attribute name="ClinicalTrialSubjectID"			vr="LO" type="1C" vmmin="1" vmmax="1" condition="count(ClinicalTrialSubjectReadingID) = 0" mbpo="T"/>
		<attribute name="ClinicalTrialSubjectReadingID"			vr="LO" type="1C" vmmin="1" vmmax="1" condition="count(ClinicalTrialSubjectID) = 0" mbpo="T"/>
	</definemodule>
	
	<definemodule name="GeneralStudyModule">
		<attribute name="StudyInstanceUID"				vr="UI" type="1" vmmin="1" vmmax="1"/>
		<attribute name="StudyDate"					vr="DA" type="2" vmmin="1" vmmax="1"/>
		<attribute name="StudyTime"					vr="TM" type="2" vmmin="1" vmmax="1"/>
		<attribute name="ReferringPhysicianName"			vr="PN" type="2" vmmin="1" vmmax="1"/>
		<sequence  name="ReferringPhysicianIdentificationSequence"	vr="SQ" type="3" vmmin="1" vmmax="1">
			<includemacro name="PersonIdentificationMacro"/>
		</sequence>
		<attribute name="StudyID"					vr="SH" type="2" vmmin="1" vmmax="1"/>
		<attribute name="AccessionNumber"				vr="SH" type="2" vmmin="1" vmmax="1"/>
		<sequence  name="IssuerOfAccessionNumberSequence"	vr="SQ" type="3" vmmin="1" vmmax="1">
			<includemacro name="HL7v2HierarchicDesignatorMacro"/>
		</sequence>
		<attribute name="StudyDescription"				vr="LO" type="3" vmmin="1" vmmax="1"/>
		<attribute name="PhysiciansOfRecord"				vr="PN" type="3" vmmin="1" vmmax="n"/>
		<sequence  name="PhysiciansOfRecordIdentificationSequence"	vr="SQ" type="3" vmmin="1" vmmax="n">
			<includemacro name="PersonIdentificationMacro"/>
		</sequence>
		<attribute name="NameOfPhysiciansReadingStudy"				vr="PN" type="3" vmmin="1" vmmax="n"/>
		<sequence  name="PhysiciansReadingStudyIdentificationSequence"	vr="SQ" type="3" vmmin="1" vmmax="n">
			<includemacro name="PersonIdentificationMacro"/>
		</sequence>
		<sequence name="ReferencedStudySequence"			vr="SQ" type="3" vmmin="0" vmmax="n">
			<attribute name="ReferencedSOPClassUID"			vr="UI" type="1" vmmin="1" vmmax="1"/>
			<attribute name="ReferencedSOPInstanceUID"		vr="UI" type="1" vmmin="1" vmmax="1"/>
		</sequence>
		<sequence name="ProcedureCodeSequence"				vr="SQ" type="3" vmmin="1" vmmax="n">
			<includemacro name="CodeSequenceMacro"/>
		</sequence>
	</definemodule>
	
	<definemodule name="PatientStudyModule">
		<attribute name="AdmittingDiagnosesDescription"			vr="LO" type="3" vmmin="1" vmmax="n"/>
		<sequence  name="AdmittingDiagnosesCodeSequence"		vr="SQ" type="3" vmmin="1" vmmax="n">
			<includemacro name="CodeSequenceMacro"/>
		</sequence>
		<attribute name="PatientAge"					vr="AS" type="3" vmmin="1" vmmax="1"/>
		<attribute name="PatientSize"					vr="DS" type="3" vmmin="1" vmmax="1"/>
		<attribute name="PatientWeight"					vr="DS" type="3" vmmin="1" vmmax="1"/>
		<sequence  name="PatientSizeCodeSequence"		vr="SQ" type="3" vmmin="1" vmmax="n">
			<includemacro name="CodeSequenceMacro"/>
		</sequence>
		<attribute name="Occupation"					vr="SH" type="3" vmmin="1" vmmax="1"/>
		<attribute name="AdditionalPatientHistory"		vr="LT" type="3" vmmin="1" vmmax="1"/>

		<attribute name="AdmissionID"					vr="LO" type="3" vmmin="1" vmmax="1"/>
		<sequence  name="IssuerOfAdmissionIDSequence"	vr="SQ" type="3" vmmin="1" vmmax="1">
			<includemacro name="HL7v2HierarchicDesignatorMacro"/>
		</sequence>
		<attribute name="ServiceEpisodeID"				vr="LO" type="3" vmmin="1" vmmax="1"/>
		<sequence  name="IssuerOfServiceEpisodeIDSequence"	vr="SQ" type="3" vmmin="1" vmmax="1">
			<includemacro name="HL7v2HierarchicDesignatorMacro"/>
		</sequence>
		<attribute name="ServiceEpisodeDescription"		vr="LO" type="3" vmmin="1" vmmax="1"/>
		<attribute name="PatientSexNeutered"			vr="CS" type="2C" vmmin="1" vmmax="1" condition="count(PatientSpeciesDescription) &gt; 0 or count(PatientSpeciesCodeSequence) &gt; 0 or count(PatientBreedDescription) &gt; 0 or count(PatientBreedCodeSequence) &gt; 0 or count(BreedRegistrationSequence) &gt; 0" mbpo="T">
			<definedtermslist valueselector="1">
				<definedterm value="ALTERED"/>
				<definedterm value="UNALTERED"/>
			</definedtermslist>
		</attribute>
	</definemodule>
	
	<definemodule name="ClinicalTrialStudyModule">
		<attribute name="ClinicalTrialTimePointID"			vr="LO" type="2" vmmin="1" vmmax="1"/>
		<attribute name="ClinicalTrialTimePointDescription"		vr="ST" type="3" vmmin="1" vmmax="1"/>
	</definemodule>
	
	<definemodule name="GeneralSeriesModule">
		<attribute name="Modality"					vr="CS" type="1"  vmmin="1" vmmax="1">
			<definedtermslist valueselector="1">
				<definedterm value="CR"/>
				<definedterm value="CT"/>
				<definedterm value="MR"/>
				<definedterm value="NM"/>
				<definedterm value="US"/>
				<definedterm value="OT"/>
				<definedterm value="BI"/>
				<definedterm value="CD"/>
				<definedterm value="DD"/>
				<definedterm value="DG"/>
				<definedterm value="ES"/>
				<definedterm value="LS"/>
				<definedterm value="PT"/>
				<definedterm value="RG"/>
				<definedterm value="ST"/>
				<definedterm value="TG"/>
				<definedterm value="XA"/>
				<definedterm value="RF"/>
				<definedterm value="RTIMAGE"/>
				<definedterm value="RTDOSE"/>
				<definedterm value="RTSTRUCT"/>
				<definedterm value="RTPLAN"/>
				<definedterm value="RTRECORD"/>
				<definedterm value="HC"/>
				<definedterm value="DX"/>
				<definedterm value="MG"/>
				<definedterm value="IO"/>
				<definedterm value="PX"/>
				<definedterm value="GM"/>
				<definedterm value="SM"/>
				<definedterm value="XC"/>
				<definedterm value="PR"/>
				<definedterm value="AU"/>
				<definedterm value="ECG"/>
				<definedterm value="EPS"/>
				<definedterm value="HD"/>
				<definedterm value="SR"/>
				<definedterm value="IVUS"/>
				<definedterm value="SEG"/>
			</definedtermslist>
		</attribute>
		<attribute name="SeriesInstanceUID"				vr="UI" type="1"  vmmin="1" vmmax="1"/>
		<attribute name="SeriesNumber"					vr="IS" type="2"  vmmin="1" vmmax="1"/>
		<attribute name="Laterality"					vr="CS" type="2C" vmmin="1" vmmax="1" condition="count(ImageLaterality) = 0 and count(//FrameLaterality) = 0" mbpo="F">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="R"/>
				<enumeratedvalue value="L"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="SeriesDate"					vr="DA" type="3"  vmmin="1" vmmax="1"/>
		<attribute name="SeriesTime"					vr="TM" type="3"  vmmin="1" vmmax="1"/>
		<attribute name="PerformingPhysicianName"			vr="PN" type="3"  vmmin="1" vmmax="n"/>
		<sequence  name="PerformingPhysicianIdentificationSequence"	vr="SQ" type="3"  vmmin="1" vmmax="n">
			<includemacro name="PersonIdentificationMacro"/>
		</sequence>
		<attribute name="ProtocolName"					vr="LO" type="3"  vmmin="1" vmmax="1"/>
		<attribute name="SeriesDescription"				vr="LO" type="3"  vmmin="1" vmmax="1"/>
		<attribute name="OperatorsName"					vr="PN" type="3"  vmmin="1" vmmax="n"/>
		<sequence  name="OperatorIdentificationSequence"		vr="SQ" type="3"  vmmin="1" vmmax="n">
			<includemacro name="PersonIdentificationMacro"/>
		</sequence>
		<sequence name="ReferencedPerformedProcedureStepSequence"	vr="SQ" type="3" vmmin="0" vmmax="1">
			<includemacro name="SOPInstanceReferenceMacro"/>
		</sequence>
		<attribute name="BodyPartExamined"				vr="CS" type="3"  vmmin="1" vmmax="1">
			<definedtermslist valueselector="1">
				<definedterm value="ABDOMENPELVIS"/>
				<definedterm value="ADRENAL"/>
				<definedterm value="ANKLE"/>
				<definedterm value="AORTA"/>
				<definedterm value="ARM"/>
				<definedterm value="AXILLA"/>
				<definedterm value="BACK"/>
				<definedterm value="BLADDER"/>
				<definedterm value="BRAIN"/>
				<definedterm value="BREAST"/>
				<definedterm value="BRONCHUS"/>
				<definedterm value="BUTTOCK"/>
				<definedterm value="CALCANEUS"/>
				<definedterm value="CALF"/>
				<definedterm value="CAROTID"/>
				<definedterm value="CEREBELLUM"/>
				<definedterm value="CERVIX"/>
				<definedterm value="CHEEK"/>
				<definedterm value="CHEST"/>
				<definedterm value="CHESTABDOMEN"/>
				<definedterm value="CHESTABDPELVIS"/>
				<definedterm value="CIRCLEOFWILLIS"/>
				<definedterm value="CLAVICLE"/>
				<definedterm value="COCCYX"/>
				<definedterm value="COLON"/>
				<definedterm value="CORNEA"/>
				<definedterm value="CORONARYARTERY"/>
				<definedterm value="CSPINE"/>
				<definedterm value="CTSPINE"/>
				<definedterm value="DUODENUM"/>
				<definedterm value="EAR"/>
				<definedterm value="ELBOW"/>
				<definedterm value="ESOPHAGUS"/>
				<definedterm value="EXTREMITY"/>
				<definedterm value="EYE"/>
				<definedterm value="EYELID"/>
				<definedterm value="FACE"/>
				<definedterm value="FEMUR"/>
				<definedterm value="FINGER"/>
				<definedterm value="FOOT"/>
				<definedterm value="GALLBLADDER"/>
				<definedterm value="HAND"/>
				<definedterm value="HEAD"/>
				<definedterm value="HEADNECK"/>
				<definedterm value="HEART"/>
				<definedterm value="HIP"/>
				<definedterm value="HUMERUS"/>
				<definedterm value="IAC"/>
				<definedterm value="ILEUM"/>
				<definedterm value="ILIUM"/>
				<definedterm value="JAW"/>
				<definedterm value="JAW"/>
				<definedterm value="JEJUNUM"/>
				<definedterm value="KIDNEY"/>
				<definedterm value="KNEE"/>
				<definedterm value="LARYNX"/>
				<definedterm value="LEG"/>
				<definedterm value="LIVER"/>
				<definedterm value="LSPINE"/>
				<definedterm value="LSSPINE"/>
				<definedterm value="LUNG"/>
				<definedterm value="MAXILLA"/>
				<definedterm value="MEDIASTINUM"/>
				<definedterm value="MOUTH"/>
				<definedterm value="NECK"/>
				<definedterm value="NECKCHEST"/>
				<definedterm value="NECKCHESTABDOMEN"/>
				<definedterm value="NECKCHESTABDPELV"/>
				<definedterm value="NOSE"/>
				<definedterm value="ORBIT"/>
				<definedterm value="OVARY"/>
				<definedterm value="PANCREAS"/>
				<definedterm value="PAROTID"/>
				<definedterm value="PATELLA"/>
				<definedterm value="PELVIS"/>
				<definedterm value="PENIS"/>
				<definedterm value="PHARYNX"/>
				<definedterm value="PROSTATE"/>
				<definedterm value="RECTUM"/>
				<definedterm value="RIB"/>
				<definedterm value="SCALP"/>
				<definedterm value="SCAPULA"/>
				<definedterm value="SCLERA"/>
				<definedterm value="SCROTUM"/>
				<definedterm value="SHOULDER"/>
				<definedterm value="SKULL"/>
				<definedterm value="SPINE"/>
				<definedterm value="SPLEEN"/>
				<definedterm value="SSPINE"/>
				<definedterm value="STERNUM"/>
				<definedterm value="STOMACH"/>
				<definedterm value="SUBMANDIBULAR"/>
				<definedterm value="TESTIS"/>
				<definedterm value="THIGH"/>
				<definedterm value="THUMB"/>
				<definedterm value="THYMUS"/>
				<definedterm value="THYROID"/>
				<definedterm value="TLSPINE"/>
				<definedterm value="TMJ"/>
				<definedterm value="TOE"/>
				<definedterm value="TONGUE"/>
				<definedterm value="TRACHEA"/>
				<definedterm value="TSPINE"/>
				<definedterm value="URETER"/>
				<definedterm value="URETHRA"/>
				<definedterm value="UTERUS"/>
				<definedterm value="VAGINA"/>
				<definedterm value="VULVA"/>
				<definedterm value="WHOLEBODY"/>
				<definedterm value="WRIST"/>
				<definedterm value="ZYGOMA"/>
			</definedtermslist>
		</attribute>
		<attribute name="PatientPosition"				vr="CS" type="2C" vmmin="1" vmmax="1" condition="count(PatientOrientationCodeSequence) = 0 and (Modality/value[@number=1]='CT' or Modality/value[@number=1]='MR')" mbpo="T">
			<definedtermslist valueselector="1">
				<definedterm value="HFP"/>
				<definedterm value="HFS"/>
				<definedterm value="HFDR"/>
				<definedterm value="HFDL"/>
				<definedterm value="FFDR"/>
				<definedterm value="FFDL"/>
				<definedterm value="FFP"/>
				<definedterm value="FFS"/>
				<definedterm value="LFP"/>
				<definedterm value="LFS"/>
				<definedterm value="RFP"/>
				<definedterm value="RFS"/>
				<definedterm value="AFDR"/>
				<definedterm value="AFDL"/>
				<definedterm value="PFDR"/>
				<definedterm value="PFDL"/>
			</definedtermslist>
		</attribute>
		<attribute name="SmallestPixelValueInSeries"			vr="XS" type="3"  vmmin="1" vmmax="1"/>
		<attribute name="LargestPixelValueInSeries"			vr="XS" type="3"  vmmin="1" vmmax="1"/>
		<sequence  name="RequestAttributesSequence"			vr="SQ" type="3"  vmmin="1" vmmax="n">
			<includemacro name="RequestAttributesMacro"/>
		</sequence>
		<attribute name="PerformedProcedureStepID"			vr="SH" type="3"  vmmin="1" vmmax="1"/>
		<attribute name="PerformedProcedureStepStartDate"		vr="DA" type="3"  vmmin="1" vmmax="1"/>
		<attribute name="PerformedProcedureStepStartTime"		vr="TM" type="3"  vmmin="1" vmmax="1"/>
		<attribute name="PerformedProcedureStepDescription"		vr="LO" type="3"  vmmin="1" vmmax="1"/>
		<sequence  name="PerformedProtocolCodeSequence"			vr="SQ" type="3"  vmmin="1" vmmax="n">
			<includemacro name="CodeSequenceMacro"/>
		</sequence>
		<attribute name="CommentsOnThePerformedProcedureStep"		vr="ST" type="3"  vmmin="1" vmmax="1"/>
	</definemodule>
	
	<definemodule name="ClinicalTrialSeriesModule">
		<attribute name="ClinicalTrialCoordinatingCenterName"		vr="LO" type="2"  vmmin="1" vmmax="1"/>
		<attribute name="ClinicalTrialSeriesID"						vr="LO" type="3"  vmmin="1" vmmax="1"/>
		<attribute name="ClinicalTrialSeriesDescription"			vr="LO" type="3"  vmmin="1" vmmax="1"/>
	</definemodule>
	
	<definemodule name="MRSeriesModule">
		<attribute name="Modality"					vr="CS" type="1"  vmmin="1" vmmax="1">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="MR"/>
			</enumeratedvalueslist>
		</attribute>
		<sequence name="ReferencedPerformedProcedureStepSequence"	vr="SQ" type="1C" vmmin="1" vmmax="1" nocondition="">
			<includemacro name="SOPInstanceReferenceMacro"/>
		</sequence>
	</definemodule>
	
	<definemodule name="FrameOfReferenceModule">
		<attribute name="FrameOfReferenceUID"				vr="UI" type="1"  vmmin="1" vmmax="1"/>
		<attribute name="PositionReferenceIndicator"			vr="LO" type="2"  vmmin="1" vmmax="1"/>
	</definemodule>
	
	<definemodule name="SynchronizationModule">
		<attribute name="SynchronizationFrameOfReferenceUID"		vr="UI" type="1"  vmmin="1" vmmax="1"/>
		<attribute name="SynchronizationTrigger"			vr="CS" type="1"  vmmin="1" vmmax="1">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="SOURCE"/>
				<enumeratedvalue value="EXTERNAL"/>
				<enumeratedvalue value="PASSTHRU"/>
				<enumeratedvalue value="NO TRIGGER"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="TriggerSourceOrType"				vr="LO" type="3"  vmmin="1" vmmax="1"/>
		<attribute name="SynchronizationChannel"			vr="US" type="1C" vmmin="1" vmmax="1" nocondition=""/>
		<attribute name="AcquisitionTimeSynchronized"			vr="CS" type="1"  vmmin="1" vmmax="1">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="Y"/>
				<enumeratedvalue value="N"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="TimeSource"					vr="SH" type="3"  vmmin="1" vmmax="1"/>
		<attribute name="TimeDistributionProtocol"			vr="CS" type="3"  vmmin="1" vmmax="1">
			<definedtermslist valueselector="1">
				<definedterm value="NTP"/>
				<definedterm value="IRIG"/>
				<definedterm value="GPS"/>
			</definedtermslist>
		</attribute>
	</definemodule>
	
	<definemodule name="GeneralEquipmentModule">
		<attribute name="Manufacturer"					vr="LO" type="2"  vmmin="1" vmmax="1"/>
		<attribute name="InstitutionName"				vr="LO" type="3"  vmmin="1" vmmax="1"/>
		<attribute name="InstitutionAddress"				vr="ST" type="3"  vmmin="1" vmmax="1"/>
		<attribute name="StationName"					vr="SH" type="3"  vmmin="1" vmmax="1"/>
		<attribute name="InstitutionalDepartmentName"			vr="LO" type="3"  vmmin="1" vmmax="1"/>
		<attribute name="ManufacturerModelName"				vr="LO" type="3"  vmmin="1" vmmax="1"/>
		<attribute name="DeviceSerialNumber"				vr="LO" type="3"  vmmin="1" vmmax="1"/>
		<attribute name="SoftwareVersions"				vr="LO" type="3"  vmmin="1" vmmax="n"/>
		<attribute name="SpatialResolution"				vr="DS" type="3"  vmmin="1" vmmax="1"/>
		<attribute name="DateOfLastCalibration"				vr="DA" type="3"  vmmin="1" vmmax="1"/>
		<attribute name="DateOfLastCalibration"				vr="DA" type="3"  vmmin="1" vmmax="1"/>
		<attribute name="PixelPaddingValue"				vr="XS" type="1C"  vmmin="1" vmmax="1" condition="count(PixelPaddingRangeLimit) &gt; 0" mbpo="T"/>
	</definemodule>
	
	<definemodule name="EnhancedGeneralEquipmentModule">
		<attribute name="Manufacturer"					vr="LO" type="1"  vmmin="1" vmmax="1"/>
		<attribute name="ManufacturerModelName"			vr="LO" type="1"  vmmin="1" vmmax="1"/>
		<attribute name="DeviceSerialNumber"			vr="LO" type="1"  vmmin="1" vmmax="1"/>
		<attribute name="SoftwareVersions"				vr="LO" type="1"  vmmin="1" vmmax="n"/>
	</definemodule>
	
	<definemacro name="ImagePixelMacro">
		<attribute name="SamplesPerPixel"				vr="US" type="1" vmmin="1" vmmax="1">
			<verify test="PhotometricInterpretation/value = 'MONOCHROME1' and SamplesPerPixel/value != 1" status="Error" message="Must be 1 when PhotometricInterpretation is MONOCHROME1"/>
			<verify test="PhotometricInterpretation/value = 'MONOCHROME2' and SamplesPerPixel/value != 1" status="Error" message="Must be 1 when PhotometricInterpretation is MONOCHROME2"/>
			<verify test="PhotometricInterpretation/value = 'PALETTE COLOR' and SamplesPerPixel/value != 1" status="Error" message="Must be 1 when PhotometricInterpretation is PALETTE COLOR"/>
			<verify test="PhotometricInterpretation/value = 'RGB' and SamplesPerPixel/value != 3" status="Error" message="Must be 3 when PhotometricInterpretation is RGB"/>
			<verify test="PhotometricInterpretation/value = 'HSV' and SamplesPerPixel/value != 3" status="Error" message="Must be 3 when PhotometricInterpretation is HSV"/>
			<verify test="PhotometricInterpretation/value = 'ARGB' and SamplesPerPixel/value != 4" status="Error" message="Must be 4 when PhotometricInterpretation is ARGB"/>
			<verify test="PhotometricInterpretation/value = 'CMYK' and SamplesPerPixel/value != 4" status="Error" message="Must be 4 when PhotometricInterpretation is CMYK"/>
			<verify test="PhotometricInterpretation/value = 'YBR_FULL' and SamplesPerPixel/value != 3" status="Error" message="Must be 3 when PhotometricInterpretation is YBR_FULL"/>
			<verify test="PhotometricInterpretation/value = 'YBR_FULL_422' and SamplesPerPixel/value != 3" status="Error" message="Must be 3 when PhotometricInterpretation is YBR_FULL_422"/>
			<verify test="PhotometricInterpretation/value = 'YBR_PARTIAL_422' and SamplesPerPixel/value != 3" status="Error" message="Must be 3 when PhotometricInterpretation is YBR_PARTIAL_422"/>
			<verify test="PhotometricInterpretation/value = 'YBR_ICT' and SamplesPerPixel/value != 3" status="Error" message="Must be 3 when PhotometricInterpretation is YBR_ICT"/>
			<verify test="PhotometricInterpretation/value = 'YBR_RCT' and SamplesPerPixel/value != 3" status="Error" message="Must be 3 when PhotometricInterpretation is YBR_RCT"/>
			<definedtermslist valueselector="1">
				<definedterm value="1"/>
				<definedterm value="3"/>
				<definedterm value="4"/>
			</definedtermslist>
		</attribute>
		<attribute name="PhotometricInterpretation"			vr="CS" type="1" vmmin="1" vmmax="1">
			<definedtermslist valueselector="1">
				<definedterm value="MONOCHROME1"/>
				<definedterm value="MONOCHROME2"/>
				<definedterm value="PALETTE COLOR"/>
				<definedterm value="RGB"/>
				<definedterm value="HSV"/>
				<definedterm value="ARGB"/>
				<definedterm value="CMYK"/>
				<definedterm value="YBR_FULL"/>
				<definedterm value="YBR_FULL_422"/>
				<definedterm value="YBR_PARTIAL_422"/>
				<definedterm value="YBR_ICT"/>
				<definedterm value="YBR_RCT"/>
			</definedtermslist>
		</attribute>
		<attribute name="Rows"				vr="US" type="1" vmmin="1" vmmax="1">
			<verify test="number(Rows/value)=0" status="Error" message="value of 0 is illegal"/>
		</attribute>
		<attribute name="Columns"			vr="US" type="1" vmmin="1" vmmax="1">
			<verify test="number(Columns/value)=0" status="Error" message="value of 0 is illegal"/>
		</attribute>
		<attribute name="BitsAllocated"					vr="US" type="1" vmmin="1" vmmax="1">
			<verify test="number(BitsAllocated/value)=0" status="Error" message="value of 0 is illegal"/>
		</attribute>
		<attribute name="BitsStored"					vr="US" type="1" vmmin="1" vmmax="1">
			<verify test="number(BitsStored/value)=0" status="Error" message="value of 0 is illegal"/>
		</attribute>
		<attribute name="HighBit"					vr="US" type="1" vmmin="1" vmmax="1"/>
		<attribute name="PixelRepresentation"				vr="US" type="1" vmmin="1" vmmax="1">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="0"/>
				<enumeratedvalue value="1"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="PixelData"					vr="OX" type="1C" vmmin="1" vmmax="1" nocondition=""/>
		<attribute name="PlanarConfiguration"				vr="US" type="1C" vmmin="1" vmmax="1" condition="SamplesPerPixel/value[@number=1] &gt; 1" mbpo="F">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="0"/>
				<enumeratedvalue value="1"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="PixelAspectRatio"				vr="IS" type="1C" vmmin="2" vmmax="2" nocondition="" mbpo="F">
			<verify test="count(//PixelSpacing) &gt; 0 or count(//ImagerPixelSpacing)  &gt; 0 or count(//NominalScannedPixelSpacing) &gt; 0" status="Error" message="PixelAspectRatio forbidden when PixelSpacing attributes used"/>
		</attribute>
		<attribute name="SmallestImagePixelValue"			vr="XS" type="3"  vmmin="1" vmmax="1"/>
		<attribute name="LargestImagePixelValue"			vr="XS" type="3"  vmmin="1" vmmax="1"/>
		<attribute name="RedPaletteColorLookupTableDescriptor"		vr="XS" type="1C" vmmin="3" vmmax="3" condition="PhotometricInterpretation/value[@number=1] = 'PALETTE COLOR' or PixelPresentation/value[@number=1] = 'COLOR' or PixelPresentation/value[@number=1] = 'MIXED'" mbpo="F">
			<verify test="RedPaletteColorLookupTableDescriptor/value[@number=1] != GreenPaletteColorLookupTableDescriptor/value[@number=1]" status="Error" message="PaletteColorLookupTableDescriptor values do not match - value 1 red != green"/>
			<verify test="RedPaletteColorLookupTableDescriptor/value[@number=1] != BluePaletteColorLookupTableDescriptor/value[@number=1]" status="Error" message="PaletteColorLookupTableDescriptor values do not match - value 1 red != blue"/>
			<verify test="RedPaletteColorLookupTableDescriptor/value[@number=2] != GreenPaletteColorLookupTableDescriptor/value[@number=2]" status="Error" message="PaletteColorLookupTableDescriptor values do not match - value 2 red != green"/>
			<verify test="RedPaletteColorLookupTableDescriptor/value[@number=2] != BluePaletteColorLookupTableDescriptor/value[@number=2]" status="Error" message="PaletteColorLookupTableDescriptor values do not match - value 2 red != blue"/>
			<verify test="RedPaletteColorLookupTableDescriptor/value[@number=3] != GreenPaletteColorLookupTableDescriptor/value[@number=3]" status="Error" message="PaletteColorLookupTableDescriptor values do not match - value 3 red != green"/>
			<verify test="RedPaletteColorLookupTableDescriptor/value[@number=3] != BluePaletteColorLookupTableDescriptor/value[@number=3]" status="Error" message="PaletteColorLookupTableDescriptor values do not match - value 3 red != blue"/>
		</attribute>
		<attribute name="GreenPaletteColorLookupTableDescriptor"	vr="XS" type="1C" vmmin="3" vmmax="3" condition="PhotometricInterpretation/value[@number=1] = 'PALETTE COLOR' or PixelPresentation/value[@number=1] = 'COLOR' or PixelPresentation/value[@number=1] = 'MIXED'" mbpo="F"/>
		<attribute name="BluePaletteColorLookupTableDescriptor"		vr="XS" type="1C" vmmin="3" vmmax="3" condition="PhotometricInterpretation/value[@number=1] = 'PALETTE COLOR' or PixelPresentation/value[@number=1] = 'COLOR' or PixelPresentation/value[@number=1] = 'MIXED'" mbpo="F"/>
		<attribute name="RedPaletteColorLookupTableData"		vr="OW" type="1C" vmmin="1" vmmax="1" condition="PhotometricInterpretation/value[@number=1] = 'PALETTE COLOR' or PixelPresentation/value[@number=1] = 'COLOR' or PixelPresentation/value[@number=1] = 'MIXED'" mbpo="F"/>
		<attribute name="GreenPaletteColorLookupTableData"		vr="OW" type="1C" vmmin="1" vmmax="1" condition="PhotometricInterpretation/value[@number=1] = 'PALETTE COLOR' or PixelPresentation/value[@number=1] = 'COLOR' or PixelPresentation/value[@number=1] = 'MIXED'" mbpo="F"/>
		<attribute name="BluePaletteColorLookupTableData"		vr="OW" type="1C" vmmin="1" vmmax="1" condition="PhotometricInterpretation/value[@number=1] = 'PALETTE COLOR' or PixelPresentation/value[@number=1] = 'COLOR' or PixelPresentation/value[@number=1] = 'MIXED'" mbpo="F"/>
	</definemacro>

	<definemodule name="ImagePixelModule">
		<includemacro name="ImagePixelMacro"/>
		<attribute name="PixelDataProviderURL"					vr="UT" type="1C"  vmmin="1" vmmax="1" condition="SOPClassUID/value[@number=1] = '1.2.840.10008.1.2.4.94' or SOPClassUID/value[@number=1] = '1.2.840.10008.1.2.4.95'"/>
		<attribute name="PixelPaddingRangeLimit"				vr="XS" type="1C"  vmmin="1" vmmax="1" nocondition=""/>
	</definemodule>

	<definemodule name="ContrastBolusModule">
		<attribute name="ContrastBolusAgent"				vr="LO" type="2"  vmmin="1" vmmax="1"/>
		<sequence  name="ContrastBolusAgentSequence"			vr="SQ" type="3"  vmmin="1" vmmax="n">
			<includemacro name="CodeSequenceMacro"/>
		</sequence>
		<attribute name="ContrastBolusRoute"				vr="LO" type="3"  vmmin="1" vmmax="1"/>
		<sequence  name="ContrastBolusAdministrationRouteSequence"	vr="SQ" type="3"  vmmin="1" vmmax="n">
			<includemacro name="CodeSequenceMacro"/>
			<sequence  name="AdditionalDrugSequence"		vr="SQ" type="3"  vmmin="1" vmmax="n">
				<includemacro name="CodeSequenceMacro"/>
			</sequence>
		</sequence>
		<attribute name="ContrastBolusVolume"				vr="DS" type="3"  vmmin="1" vmmax="1"/>
		<attribute name="ContrastBolusStartTime"			vr="TM" type="3"  vmmin="1" vmmax="1"/>
		<attribute name="ContrastBolusStopTime"				vr="TM" type="3"  vmmin="1" vmmax="1"/>
		<attribute name="ContrastBolusTotalDose"			vr="DS" type="3"  vmmin="1" vmmax="1"/>
		<attribute name="ContrastFlowRate"				vr="DS" type="3"  vmmin="1" vmmax="n"/>
		<attribute name="ContrastFlowDuration"				vr="DS" type="3"  vmmin="1" vmmax="n"/>
		<attribute name="ContrastBolusIngredient"			vr="CS" type="3"  vmmin="1" vmmax="1"/>
		<attribute name="ContrastBolusIngredientConcentration"		vr="DS" type="3"  vmmin="1" vmmax="1"/>
	</definemodule>
	
	<definemodule name="ContrastBolusModuleNotWanted">
		<attribute name="ContrastBolusAgent"				vr="LO" type="3"  vmmin="1" vmmax="1">
			<verify test="count(ContrastBolusAgent) &gt; 0"
				status="Error" message="should not be present; Enhanced Contrast Bolus Module required"/>
		</attribute>
		<sequence  name="ContrastBolusAgentSequence"			vr="SQ" type="3"  vmmin="1" vmmax="n">
			<verify test="count(ContrastBolusAgentSequence) &gt; 0"
				status="Error" message="should not be present; Enhanced Contrast Bolus Module required"/>
		</sequence>
		<attribute name="ContrastBolusRoute"				vr="LO" type="3"  vmmin="1" vmmax="1">
			<verify test="count(ContrastBolusRoute) &gt; 0"
				status="Error" message="should not be present; Enhanced Contrast Bolus Module required"/>
		</attribute>
		<sequence  name="ContrastBolusAdministrationRouteSequence"	vr="SQ" type="3"  vmmin="1" vmmax="n">
			<verify test="count(ContrastBolusAdministrationRouteSequence) &gt; 0"
				status="Error" message="should not be present; Enhanced Contrast Bolus Module required"/>
		</sequence>
		<attribute name="ContrastBolusVolume"				vr="DS" type="3"  vmmin="1" vmmax="1">
			<verify test="count(ContrastBolusVolume) &gt; 0"
				status="Error" message="should not be present; Enhanced Contrast Bolus Module required"/>
		</attribute>
		<attribute name="ContrastBolusStartTime"			vr="TM" type="3"  vmmin="1" vmmax="1">
			<verify test="count(ContrastBolusStartTime) &gt; 0"
				status="Error" message="should not be present; Enhanced Contrast Bolus Module required"/>
		</attribute>
		<attribute name="ContrastBolusStopTime"				vr="TM" type="3"  vmmin="1" vmmax="1">
			<verify test="count(ContrastBolusStopTime) &gt; 0"
				status="Error" message="should not be present; Enhanced Contrast Bolus Module required"/>
		</attribute>
		<attribute name="ContrastBolusTotalDose"			vr="DS" type="3"  vmmin="1" vmmax="1">
			<verify test="count(ContrastBolusTotalDose) &gt; 0"
				status="Error" message="should not be present; Enhanced Contrast Bolus Module required"/>
		</attribute>
		<attribute name="ContrastFlowRate"				vr="DS" type="3"  vmmin="1" vmmax="n">
			<verify test="count(ContrastFlowRate) &gt; 0"
				status="Error" message="should not be present; Enhanced Contrast Bolus Module required"/>
		</attribute>
		<attribute name="ContrastFlowDuration"				vr="DS" type="3"  vmmin="1" vmmax="n">
			<verify test="count(ContrastFlowDuration) &gt; 0"
				status="Error" message="should not be present; Enhanced Contrast Bolus Module required"/>
		</attribute>
		<attribute name="ContrastBolusIngredient"			vr="CS" type="3"  vmmin="1" vmmax="1">
			<verify test="count(ContrastBolusIngredient) &gt; 0"
				status="Error" message="should not be present; Enhanced Contrast Bolus Module required"/>
		</attribute>
		<attribute name="ContrastBolusIngredientConcentration"		vr="DS" type="3"  vmmin="1" vmmax="1">
			<verify test="count(ContrastBolusIngredientConcentration) &gt; 0"
				status="Error" message="should not be present; Enhanced Contrast Bolus Module required"/>
		</attribute>
	</definemodule>
	
	<definemodule name="EnhancedContrastBolusModule">
		<sequence  name="ContrastBolusAgentSequence"					vr="SQ" type="1"  vmmin="1" vmmax="n">
			<includemacro name="CodeSequenceMacro"/>
			<attribute name="ContrastBolusAgentNumber"					vr="US" type="1"  vmmin="1" vmmax="1"/>
			<sequence  name="ContrastBolusAdministrationRouteSequence"	vr="SQ" type="1"  vmmin="1" vmmax="1">
				<includemacro name="CodeSequenceMacro"/>
			</sequence>
			<sequence  name="ContrastBolusIngredientCodeSequence"		vr="SQ" type="2"  vmmin="0" vmmax="n">
				<includemacro name="CodeSequenceMacro"/>
			</sequence>
			<attribute name="ContrastBolusVolume"						vr="DS" type="2"  vmmin="1" vmmax="1"/>
			<attribute name="ContrastBolusIngredientConcentration"		vr="DS" type="2"  vmmin="1" vmmax="1"/>
			<attribute name="ContrastBolusIngredientOpaque"				vr="CS" type="3"  vmmin="1" vmmax="1">
				<enumeratedvalueslist valueselector="1">
					<enumeratedvalue value="YES"/>
					<enumeratedvalue value="NO"/>
				</enumeratedvalueslist>
			</attribute>
			<sequence name="ContrastAdministrationProfileSequence"		vr="SQ" type="3"  vmmin="1" vmmax="n">
				<attribute name="ContrastBolusVolume"					vr="DS" type="2"  vmmin="0" vmmax="1"/>
				<attribute name="ContrastBolusStartTime"				vr="TM" type="3"  vmmin="1" vmmax="1"/>
				<attribute name="ContrastBolusStopTime"					vr="TM" type="3"  vmmin="1" vmmax="1"/>
				<attribute name="ContrastFlowRate"						vr="DS" type="3"  vmmin="1" vmmax="1"/>
				<attribute name="ContrastFlowDuration"					vr="DS" type="3"  vmmin="1" vmmax="1"/>
			</sequence>
		</sequence>
	</definemodule>
	
	<definemodule name="MultiFrameFunctionalGroupsCommonModule">
		<attribute name="InstanceNumber"				vr="IS" type="1" vmmin="1" vmmax="1"/>
		<attribute name="ContentDate"					vr="DA" type="1" vmmin="1" vmmax="1"/>
		<attribute name="ContentTime"					vr="TM" type="1" vmmin="1" vmmax="1"/>
		<attribute name="NumberOfFrames"				vr="IS" type="1" vmmin="1" vmmax="1">
			<verify test="number(NumberOfFrames/value)=0" status="Error" message="value of 0 is illegal"/>
		</attribute>
		<attribute name="StereoPairsPresent"			vr="CS" type="3" vmmin="1" vmmax="1">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="YES"/>
				<enumeratedvalue value="NO"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="ConcatenationFrameOffsetNumber"		vr="UL" type="1C" vmmin="1" vmmax="1" condition="count(ConcatenationUID) &gt; 0" mbpo="F"/>
		<attribute name="RepresentativeFrameNumber"			vr="US" type="3" vmmin="1" vmmax="1"/>
		<attribute name="ConcatenationUID"				vr="UI" type="1C" vmmin="1" vmmax="1" nocondition=""/>
		<attribute name="SOPInstanceUIDOfConcatenationSource"	vr="UI" type="1C" vmmin="1" vmmax="1" condition="count(ConcatenationUID) &gt; 0" mbpo="F"/>
		<attribute name="InConcatenationNumber"				vr="US" type="1C" vmmin="1" vmmax="1" condition="count(ConcatenationUID) &gt; 0" mbpo="F"/>
		<attribute name="InConcatenationTotalNumber"			vr="US" type="3C" vmmin="1" vmmax="1" condition="count(ConcatenationUID) &gt; 0"/>
	</definemodule>
	
	<definemodule name="MultiFrameFunctionalGroupsForSegmentationModule">
		<sequence  name="SharedFunctionalGroupsSequence"		vr="SQ" type="1"  vmmin="1" vmmax="1">
			<includemacro name="PixelMeasuresMacro"			type="C" condition="count(//DerivationImageSequence) = 0 or count(PixelMeasuresSequence) &gt; 0" mbpo="T"/>
			<verifyanywhere test="count(PixelMeasuresSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PixelMeasuresSequence) &gt; 0" status="Error" message="PixelMeasuresSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="PlanePositionMacro"			type="C" condition="count(//DerivationImageSequence) = 0 or count(PlanePositionSequence) &gt; 0" mbpo="T"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PlanePositionSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PlanePositionSequence) &gt; 0" status="Error" message="PlanePositionSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="PlaneOrientationMacro"		type="C" condition="count(//DerivationImageSequence) = 0 or count(PlaneOrientationSequence) &gt; 0" mbpo="T"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PlaneOrientationSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PlaneOrientationSequence) &gt; 0" status="Error" message="PlaneOrientationSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="DerivationImageMacro"		type="C" condition="count(//PixelMeasuresSequence) = 0 or count(//PlanePositionSequence) = 0 or count(//PlaneOrientationSequence) = 0" mbpo="T"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/DerivationImageSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/DerivationImageSequence) &gt; 0" status="Error" message="DerivationImageSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/FrameContentSequence) &gt; 0" status="Error" message="FrameContentSequence cannot be in SharedFunctionalGroupsSequence"/>
			<includemacro name="SegmentationMacro"			type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/SegmentIdentificationSequence) = 0 or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/SegmentIdentificationSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/SegmentIdentificationSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/SegmentIdentificationSequence) &gt; 0" status="Error" message="SegmentIdentificationSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
		</sequence>
		<verifyanywhere test="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item) != /DicomObject/NumberOfFrames/value[@number=1]" status="Error" message="Number of PerFrameFunctionalGroupsSequence Items must equal NumberOfFrames"/>
		<sequence  name="PerFrameFunctionalGroupsSequence"		vr="SQ" type="1"  vmmin="1" vmmax="n">
			<includemacro name="PixelMeasuresMacro"			type="C" condition="count(//DerivationImageSequence) = 0 or count(PixelMeasuresSequence) &gt; 0" mbpo="T"/>
			<includemacro name="PlanePositionMacro"			type="C" condition="count(//DerivationImageSequence) = 0 or count(PlanePositionSequence) &gt; 0" mbpo="T"/>
			<includemacro name="PlaneOrientationMacro"		type="C" condition="count(//DerivationImageSequence) = 0 or count(PlaneOrientationSequence) &gt; 0" mbpo="T"/>
			<includemacro name="DerivationImageMacro"		type="C" condition="count(//PixelMeasuresSequence) = 0 or count(//PlanePositionSequence) = 0 or count(//PlaneOrientationSequence) = 0" mbpo="T"/>
			<includemacro name="FrameContentMacro"			type="M"/>
			<includemacro name="SegmentationMacro"			type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/SegmentIdentificationSequence) = 0 or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/SegmentIdentificationSequence) &gt; 0"/>
		</sequence>
	</definemodule>

	<definemodule name="MultiFrameFunctionalGroupsForEnhancedCTImageModule">
		<sequence  name="SharedFunctionalGroupsSequence"		vr="SQ" type="1"  vmmin="1" vmmax="1">
			<includemacro name="PixelMeasuresMacro"			type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PixelMeasuresSequence) = 0 or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PixelMeasuresSequence) &gt; 0"/>
			<verifyanywhere test="count(PixelMeasuresSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PixelMeasuresSequence) &gt; 0" status="Error" message="PixelMeasuresSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/FrameContentSequence) &gt; 0" status="Error" message="FrameContentSequence cannot be in SharedFunctionalGroupsSequence"/>
			<includemacro name="PlanePositionMacro"			type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PlanePositionSequence) = 0 or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PlanePositionSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PlanePositionSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PlanePositionSequence) &gt; 0" status="Error" message="PlanePositionSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="PlaneOrientationMacro"		type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PlaneOrientationSequence) = 0 or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PlaneOrientationSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PlaneOrientationSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PlaneOrientationSequence) &gt; 0" status="Error" message="PlaneOrientationSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="ReferencedImageMacro"		type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/ReferencedImageSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/ReferencedImageSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/ReferencedImageSequence) &gt; 0" status="Error" message="ReferencedImageSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="DerivationImageMacro"		type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/DerivationImageSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/DerivationImageSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/DerivationImageSequence) &gt; 0" status="Error" message="DerivationImageSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="CardiacSynchronizationMacro"		type="C" condition="(((count(/DicomObject/CardiacSynchronizationTechnique) &gt; 0 and /DicomObject/CardiacSynchronizationTechnique/value[@number=1] != 'NONE') and (/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED')) and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CardiacSynchronizationSequence) = 0) or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CardiacSynchronizationSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CardiacSynchronizationSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CardiacSynchronizationSequence) &gt; 0" status="Error" message="CardiacSynchronizationSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="FrameAnatomyMacro"			type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/FrameAnatomySequence) = 0 or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/FrameAnatomySequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/FrameAnatomySequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/FrameAnatomySequence) &gt; 0" status="Error" message="FrameAnatomySequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="FrameVOILUTMacro"			type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/FrameVOILUTSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/FrameVOILUTSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/FrameVOILUTSequence) &gt; 0" status="Error" message="FrameVOILUTSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="RealWorldValueMappingMacro"		type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/RealWorldValueMappingSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/RealWorldValueMappingSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/RealWorldValueMappingSequence) &gt; 0" status="Error" message="RealWorldValueMappingSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="ContrastBolusUsageMacro"		type="C" condition="count(/DicomObject/ContrastBolusAgentSequence) &gt; 0 and (count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/ContrastBolusUsageSequence) = 0 or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/ContrastBolusUsageSequence) &gt; 0)"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/ContrastBolusAgentSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/ContrastBolusAgentSequence) &gt; 0" status="Error" message="ContrastBolusAgentSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="RespiratorySynchronizationMacro"		type="C" condition="(((count(/DicomObject/RespiratoryMotionCompensationTechnique) &gt; 0 and /DicomObject/RespiratoryMotionCompensationTechnique/value[@number=1] != 'NONE' and /DicomObject/RespiratoryMotionCompensationTechnique/value[@number=1] != 'REALTIME' and /DicomObject/RespiratoryMotionCompensationTechnique/value[@number=1] != 'BREATH_HOLD') and (/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED')) and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/RespiratorySynchronizationSequence) = 0) or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/RespiratorySynchronizationSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/RespiratorySynchronizationSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/RespiratorySynchronizationSequence) &gt; 0" status="Error" message="RespiratorySynchronizationSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="IrradiationEventIdentificationMacro"			type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/IrradiationEventIdentificationSequence) = 0 or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/IrradiationEventIdentificationSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/IrradiationEventIdentificationSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/IrradiationEventIdentificationSequence) &gt; 0" status="Error" message="IrradiationEventIdentificationSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="CTImageFrameTypeMacro"		type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTImageFrameTypeSequence) = 0 or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTImageFrameTypeSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTImageFrameTypeSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTImageFrameTypeSequence) &gt; 0" status="Error" message="CTImageFrameTypeSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="CTAcquisitionTypeMacro"	type="C" condition="((/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED') and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTAcquisitionTypeSequence) = 0) or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTAcquisitionTypeSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTAcquisitionTypeSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTAcquisitionTypeSequence) &gt; 0" status="Error" message="CTAcquisitionTypeSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="CTAcquisitionDetailsMacro"			type="C" condition="((/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED') and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTAcquisitionDetailsSequence) = 0) or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTAcquisitionDetailsSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTAcquisitionDetailsSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTAcquisitionDetailsSequence) &gt; 0" status="Error" message="CTAcquisitionDetailsSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="CTTableDynamicsMacro"			type="C" condition="((/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED') and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTTableDynamicsSequence) = 0) or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTTableDynamicsSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTTableDynamicsSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTTableDynamicsSequence) &gt; 0" status="Error" message="CTTableDynamicsSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="CTPositionMacro"			type="C" condition="((/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED') and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTPositionSequence) = 0) or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTPositionSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTPositionSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTPositionSequence) &gt; 0" status="Error" message="CTPositionSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="CTGeometryMacro"			type="C" condition="((/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED') and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTGeometrySequence) = 0) or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTGeometrySequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTGeometrySequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTGeometrySequence) &gt; 0" status="Error" message="CTGeometrySequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="CTReconstructionMacro"			type="C" condition="((/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTAcquisitionTypeSequence/Item[@number=1]/AcquisitionType/value[@number=1] != 'CONSTANT_ANGLE' or /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTAcquisitionTypeSequence/Item[@number=1]/AcquisitionType/value[@number=1] != 'CONSTANT_ANGLE') and ((/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED') and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTReconstructionSequence) = 0)) or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTReconstructionSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTReconstructionSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTReconstructionSequence) &gt; 0" status="Error" message="CTReconstructionSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="CTExposureMacro"			type="C" condition="((/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED') and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTExposureSequence) = 0) or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTExposureSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTExposureSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTExposureSequence) &gt; 0" status="Error" message="CTExposureSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="CTXRayDetailsMacro"			type="C" condition="((/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED') and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTXRayDetailsSequence) = 0) or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTXRayDetailsSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTXRayDetailsSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTXRayDetailsSequence) &gt; 0" status="Error" message="CTXRayDetailsSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="CTPixelValueTransformationMacro"	type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PixelValueTransformationSequence) = 0 or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PixelValueTransformationSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PixelValueTransformationSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PixelValueTransformationSequence) &gt; 0" status="Error" message="PixelValueTransformationSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="CTAdditionalXRaySourceMacro"	type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTAdditionalXRaySourceSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTAdditionalXRaySourceSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTAdditionalXRaySourceSequence) &gt; 0" status="Error" message="CTAdditionalXRaySourceSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="TemporalPositionMacro"	type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/TemporalPositionSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/TemporalPositionSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/TemporalPositionSequence) &gt; 0" status="Error" message="TemporalPositionSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
		</sequence>
		<verifyanywhere test="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item) != /DicomObject/NumberOfFrames/value[@number=1]" status="Error" message="Number of PerFrameFunctionalGroupsSequence Items must equal NumberOfFrames"/>
		<sequence  name="PerFrameFunctionalGroupsSequence"		vr="SQ" type="1"  vmmin="1" vmmax="n">
			<includemacro name="PixelMeasuresMacro"			type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PixelMeasuresSequence) = 0 or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PixelMeasuresSequence) &gt; 0"/>
			<includemacro name="FrameContentMacro"			type="M"/>
			<includemacro name="PlanePositionMacro"			type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PlanePositionSequence) = 0 or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PlanePositionSequence) &gt; 0"/>
			<includemacro name="PlaneOrientationMacro"		type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PlaneOrientationSequence) = 0 or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PlaneOrientationSequence) &gt; 0"/>
			<includemacro name="ReferencedImageMacro"		type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/ReferencedImageSequence) &gt; 0"/>
			<includemacro name="DerivationImageMacro"		type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/DerivationImageSequence) &gt; 0"/>
			<includemacro name="CardiacSynchronizationMacro"		type="C" condition="(((count(/DicomObject/CardiacSynchronizationTechnique) &gt; 0 and /DicomObject/CardiacSynchronizationTechnique/value[@number=1] != 'NONE') and (/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED')) and count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CardiacSynchronizationSequence) = 0) or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CardiacSynchronizationSequence) &gt; 0"/>
			<includemacro name="FrameAnatomyMacro"			type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/FrameAnatomySequence) = 0 or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/FrameAnatomySequence) &gt; 0"/>
			<includemacro name="FrameVOILUTMacro"			type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/FrameVOILUTSequence) &gt; 0"/>
			<includemacro name="RealWorldValueMappingMacro"		type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/RealWorldValueMappingSequence) &gt; 0"/>
			<includemacro name="ContrastBolusUsageMacro"		type="C" condition="count(/DicomObject/ContrastBolusAgentSequence) &gt; 0 and (count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/ContrastBolusUsageSequence) = 0 or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/ContrastBolusUsageSequence) &gt; 0)"/>
			<includemacro name="RespiratorySynchronizationMacro"		type="C" condition="(((count(/DicomObject/RespiratoryMotionCompensationTechnique) &gt; 0 and /DicomObject/RespiratoryMotionCompensationTechnique/value[@number=1] != 'NONE' and /DicomObject/RespiratoryMotionCompensationTechnique/value[@number=1] != 'REALTIME' and /DicomObject/RespiratoryMotionCompensationTechnique/value[@number=1] != 'BREATH_HOLD') and (/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED')) and count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/RespiratorySynchronizationSequence) = 0) or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/RespiratorySynchronizationSequence) &gt; 0"/>
			<includemacro name="IrradiationEventIdentificationMacro"			type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/IrradiationEventIdentificationSequence) = 0 or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/IrradiationEventIdentificationSequence) &gt; 0"/>
			<includemacro name="CTImageFrameTypeMacro"		type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTImageFrameTypeSequence) = 0 or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTImageFrameTypeSequence) &gt; 0"/>
			<includemacro name="CTAcquisitionTypeMacro"	type="C" condition="((/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED') and count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTAcquisitionTypeSequence) = 0) or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTAcquisitionTypeSequence) &gt; 0"/>
			<includemacro name="CTAcquisitionDetailsMacro"			type="C" condition="((/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED') and count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTAcquisitionDetailsSequence) = 0) or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTAcquisitionDetailsSequence) &gt; 0"/>
			<includemacro name="CTTableDynamicsMacro"			type="C" condition="((/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED') and count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTTableDynamicsSequence) = 0) or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTTableDynamicsSequence) &gt; 0"/>
			<includemacro name="CTPositionMacro"			type="C" condition="((/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED') and count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTPositionSequence) = 0) or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTPositionSequence) &gt; 0"/>
			<includemacro name="CTGeometryMacro"			type="C" condition="((/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED') and count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTGeometrySequence) = 0) or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTGeometrySequence) &gt; 0"/>
			<includemacro name="CTReconstructionMacro"			type="C" condition="((/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTAcquisitionTypeSequence/Item[@number=1]/AcquisitionType/value[@number=1] != 'CONSTANT_ANGLE' or /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTAcquisitionTypeSequence/Item[@number=1]/AcquisitionType/value[@number=1] != 'CONSTANT_ANGLE') and ((/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED') and count(/DicomObject/SharedFunctionalGroupsSequence/Item[*]/CTReconstructionSequence) = 0)) or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[@number=1]/CTReconstructionSequence) &gt; 0"/>
			<includemacro name="CTExposureMacro"			type="C" condition="((/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED') and count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTExposureSequence) = 0) or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTExposureSequence) &gt; 0"/>
			<includemacro name="CTXRayDetailsMacro"			type="C" condition="((/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED') and count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTXRayDetailsSequence) = 0) or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTXRayDetailsSequence) &gt; 0"/>
			<includemacro name="CTPixelValueTransformationMacro"	type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PixelValueTransformationSequence) = 0 or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PixelValueTransformationSequence) &gt; 0"/>
			<includemacro name="CTAdditionalXRaySourceMacro"	type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTAdditionalXRaySourceSequence) &gt; 0"/>
			<includemacro name="TemporalPositionMacro"		type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/TemporalPositionSequence) &gt; 0"/>
		</sequence>
	</definemodule>
	
	<definemodule name="MultiFrameFunctionalGroupsForLegacyConvertedEnhancedCTImageModule">
		<sequence  name="SharedFunctionalGroupsSequence"		vr="SQ" type="1"  vmmin="1" vmmax="1">
			<includemacro name="PixelMeasuresMacro"			type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PixelMeasuresSequence) = 0 or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PixelMeasuresSequence) &gt; 0"/>
			<verifyanywhere test="count(PixelMeasuresSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PixelMeasuresSequence) &gt; 0" status="Error" message="PixelMeasuresSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/FrameContentSequence) &gt; 0" status="Error" message="FrameContentSequence cannot be in SharedFunctionalGroupsSequence"/>
			<includemacro name="PlanePositionMacro"			type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PlanePositionSequence) = 0 or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PlanePositionSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PlanePositionSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PlanePositionSequence) &gt; 0" status="Error" message="PlanePositionSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="PlaneOrientationMacro"		type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PlaneOrientationSequence) = 0 or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PlaneOrientationSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PlaneOrientationSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PlaneOrientationSequence) &gt; 0" status="Error" message="PlaneOrientationSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="ReferencedImageMacro"		type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/ReferencedImageSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/ReferencedImageSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/ReferencedImageSequence) &gt; 0" status="Error" message="ReferencedImageSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="DerivationImageMacro"		type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/DerivationImageSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/DerivationImageSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/DerivationImageSequence) &gt; 0" status="Error" message="DerivationImageSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="CardiacSynchronizationMacro"		type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CardiacSynchronizationSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CardiacSynchronizationSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CardiacSynchronizationSequence) &gt; 0" status="Error" message="CardiacSynchronizationSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="FrameAnatomyMacro"			type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/FrameAnatomySequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/FrameAnatomySequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/FrameAnatomySequence) &gt; 0" status="Error" message="FrameAnatomySequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="FrameVOILUTMacro"			type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/FrameVOILUTSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/FrameVOILUTSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/FrameVOILUTSequence) &gt; 0" status="Error" message="FrameVOILUTSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="ContrastBolusUsageMacro"		type="C" condition="count(/DicomObject/ContrastBolusAgentSequence) &gt; 0 and (count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/ContrastBolusUsageSequence) = 0 or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/ContrastBolusUsageSequence) &gt; 0)"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/ContrastBolusAgentSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/ContrastBolusAgentSequence) &gt; 0" status="Error" message="ContrastBolusAgentSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="RespiratorySynchronizationMacro"		type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/RespiratorySynchronizationSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/RespiratorySynchronizationSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/RespiratorySynchronizationSequence) &gt; 0" status="Error" message="RespiratorySynchronizationSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="IrradiationEventIdentificationMacro"			type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/IrradiationEventIdentificationSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/IrradiationEventIdentificationSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/IrradiationEventIdentificationSequence) &gt; 0" status="Error" message="IrradiationEventIdentificationSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="CTImageFrameTypeMacro"		type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTImageFrameTypeSequence) = 0 or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTImageFrameTypeSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTImageFrameTypeSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTImageFrameTypeSequence) &gt; 0" status="Error" message="CTImageFrameTypeSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="CTPixelValueTransformationMacro"	type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PixelValueTransformationSequence) = 0 or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PixelValueTransformationSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PixelValueTransformationSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PixelValueTransformationSequence) &gt; 0" status="Error" message="PixelValueTransformationSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="TemporalPositionMacro"	type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/TemporalPositionSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/TemporalPositionSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/TemporalPositionSequence) &gt; 0" status="Error" message="TemporalPositionSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="UnassignedSharedConvertedAttributesMacro"	type="M"/>
		</sequence>
		<verifyanywhere test="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item) != /DicomObject/NumberOfFrames/value[@number=1]" status="Error" message="Number of PerFrameFunctionalGroupsSequence Items must equal NumberOfFrames"/>
		<sequence  name="PerFrameFunctionalGroupsSequence"		vr="SQ" type="1"  vmmin="1" vmmax="n">
			<includemacro name="PixelMeasuresMacro"			type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PixelMeasuresSequence) = 0 or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PixelMeasuresSequence) &gt; 0"/>
			<includemacro name="FrameContentMacro"			type="M"/>
			<includemacro name="PlanePositionMacro"			type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PlanePositionSequence) = 0 or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PlanePositionSequence) &gt; 0"/>
			<includemacro name="PlaneOrientationMacro"		type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PlaneOrientationSequence) = 0 or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PlaneOrientationSequence) &gt; 0"/>
			<includemacro name="ReferencedImageMacro"		type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/ReferencedImageSequence) &gt; 0"/>
			<includemacro name="DerivationImageMacro"		type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/DerivationImageSequence) &gt; 0"/>
			<includemacro name="CardiacSynchronizationMacro"		type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CardiacSynchronizationSequence) &gt; 0"/>
			<includemacro name="FrameAnatomyMacro"			type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/FrameAnatomySequence) &gt; 0"/>
			<includemacro name="FrameVOILUTMacro"			type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/FrameVOILUTSequence) &gt; 0"/>
			<includemacro name="ContrastBolusUsageMacro"		type="C" condition="count(/DicomObject/ContrastBolusAgentSequence) &gt; 0 and (count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/ContrastBolusUsageSequence) = 0 or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/ContrastBolusUsageSequence) &gt; 0)"/>
			<includemacro name="RespiratorySynchronizationMacro"		type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/RespiratorySynchronizationSequence) &gt; 0"/>
			<includemacro name="IrradiationEventIdentificationMacro"			type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/IrradiationEventIdentificationSequence) &gt; 0"/>
			<includemacro name="CTImageFrameTypeMacro"		type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTImageFrameTypeSequence) = 0 or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTImageFrameTypeSequence) &gt; 0"/>
			<includemacro name="CTPixelValueTransformationMacro"	type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PixelValueTransformationSequence) = 0 or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PixelValueTransformationSequence) &gt; 0"/>
			<includemacro name="TemporalPositionMacro"		type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/TemporalPositionSequence) &gt; 0"/>
			<includemacro name="UnassignedPerFrameConvertedAttributesMacro"	type="M"/>
			<includemacro name="ImageFrameConversionSourceMacro"	type="M"/>
		</sequence>
	</definemodule>
	
	<definemodule name="MultiFrameFunctionalGroupsForEnhancedMRImageModule">
		<sequence  name="SharedFunctionalGroupsSequence"		vr="SQ" type="1"  vmmin="1" vmmax="1">
			<includemacro name="PixelMeasuresMacro"			type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PixelMeasuresSequence) = 0 or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PixelMeasuresSequence) &gt; 0"/>
			<verifyanywhere test="count(PixelMeasuresSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PixelMeasuresSequence) &gt; 0" status="Error" message="PixelMeasuresSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/FrameContentSequence) &gt; 0" status="Error" message="FrameContentSequence cannot be in SharedFunctionalGroupsSequence"/>
			<includemacro name="PlanePositionMacro"			type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PlanePositionSequence) = 0 or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PlanePositionSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PlanePositionSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PlanePositionSequence) &gt; 0" status="Error" message="PlanePositionSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="PlaneOrientationMacro"		type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PlaneOrientationSequence) = 0 or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PlaneOrientationSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PlaneOrientationSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PlaneOrientationSequence) &gt; 0" status="Error" message="PlaneOrientationSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="ReferencedImageMacro"		type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/ReferencedImageSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/ReferencedImageSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/ReferencedImageSequence) &gt; 0" status="Error" message="ReferencedImageSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="DerivationImageMacro"		type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/DerivationImageSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/DerivationImageSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/DerivationImageSequence) &gt; 0" status="Error" message="DerivationImageSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="CardiacSynchronizationMacro"		type="C" condition="(((count(/DicomObject/CardiacSynchronizationTechnique) &gt; 0 and /DicomObject/CardiacSynchronizationTechnique/value[@number=1] != 'NONE') and (/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED')) and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CardiacSynchronizationSequence) = 0) or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CardiacSynchronizationSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CardiacSynchronizationSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CardiacSynchronizationSequence) &gt; 0" status="Error" message="CardiacSynchronizationSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="FrameAnatomyMacro"			type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/FrameAnatomySequence) = 0 or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/FrameAnatomySequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/FrameAnatomySequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/FrameAnatomySequence) &gt; 0" status="Error" message="FrameAnatomySequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="PixelValueTransformationMacro"	type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PixelValueTransformationSequence) = 0 or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PixelValueTransformationSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PixelValueTransformationSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PixelValueTransformationSequence) &gt; 0" status="Error" message="PixelValueTransformationSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="FrameVOILUTMacro"			type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/FrameVOILUTSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/FrameVOILUTSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/FrameVOILUTSequence) &gt; 0" status="Error" message="FrameVOILUTSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="RealWorldValueMappingMacro"		type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/RealWorldValueMappingSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/RealWorldValueMappingSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/RealWorldValueMappingSequence) &gt; 0" status="Error" message="RealWorldValueMappingSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="ContrastBolusUsageMacro"		type="C" condition="count(/DicomObject/ContrastBolusAgentSequence) &gt; 0 and (count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/ContrastBolusUsageSequence) = 0 or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/ContrastBolusUsageSequence) &gt; 0)"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/ContrastBolusAgentSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/ContrastBolusAgentSequence) &gt; 0" status="Error" message="ContrastBolusAgentSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="RespiratorySynchronizationMacro"		type="C" condition="(((count(/DicomObject/RespiratoryMotionCompensationTechnique) &gt; 0 and /DicomObject/RespiratoryMotionCompensationTechnique/value[@number=1] != 'NONE' and /DicomObject/RespiratoryMotionCompensationTechnique/value[@number=1] != 'REALTIME' and /DicomObject/RespiratoryMotionCompensationTechnique/value[@number=1] != 'BREATH_HOLD') and (/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED')) and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/RespiratorySynchronizationSequence) = 0) or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/RespiratorySynchronizationSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/RespiratorySynchronizationSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/RespiratorySynchronizationSequence) &gt; 0" status="Error" message="RespiratorySynchronizationSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="MRImageFrameTypeMacro"		type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence) = 0 or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence) &gt; 0" status="Error" message="MRImageFrameTypeSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="MRTimingAndRelatedParametersMacro"	type="C" condition="((/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED') and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRTimingAndRelatedParametersSequence) = 0) or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRTimingAndRelatedParametersSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRTimingAndRelatedParametersSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRTimingAndRelatedParametersSequence) &gt; 0" status="Error" message="MRTimingAndRelatedParametersSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="MRFOVGeometryMacro"			type="C" condition="(((count(/DicomObject/GeometryOfKSpaceTraversal) &gt; 0 and /DicomObject/GeometryOfKSpaceTraversal/value[@number=1] = 'RECTILINEAR') and (/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED')) and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRFOVGeometrySequence) = 0) or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRFOVGeometrySequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRFOVGeometrySequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRFOVGeometrySequence) &gt; 0" status="Error" message="MRFOVGeometrySequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="MREchoMacro"			type="C" condition="((/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED') and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MREchoSequence) = 0) or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MREchoSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MREchoSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MREchoSequence) &gt; 0" status="Error" message="MREchoSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="MRModifierMacro"			type="C" condition="((/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED') and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRModifierSequence) = 0) or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRModifierSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRModifierSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRModifierSequence) &gt; 0" status="Error" message="MRModifierSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="MRImagingModifierMacro"		type="C" condition="((/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED') and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImagingModifierSequence) = 0) or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImagingModifierSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImagingModifierSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImagingModifierSequence) &gt; 0" status="Error" message="MRImagingModifierSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="MRReceiveCoilMacro"			type="C" condition="((/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED') and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRReceiveCoilSequence) = 0) or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRReceiveCoilSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRReceiveCoilSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRReceiveCoilSequence) &gt; 0" status="Error" message="MRReceiveCoilSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="MRTransmitCoilMacro"		type="C" condition="((/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED') and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRTransmitCoilSequence) = 0) or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRTransmitCoilSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRTransmitCoilSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRTransmitCoilSequence) &gt; 0" status="Error" message="MRTransmitCoilSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="MRDiffusionMacro"			type="C" condition="(((/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/AcquisitionContrast/value[@number=1] = 'DIFFUSION' or /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/AcquisitionContrast/value[@number=1] = 'DIFFUSION') and (/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED')) or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRDiffusionSequence) &gt; 0) and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRDiffusionSequence) = 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRDiffusionSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRDiffusionSequence) &gt; 0" status="Error" message="MRDiffusionSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="MRAveragesMacro"			type="C" condition="((/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED') and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRAveragesSequence) = 0) or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRAveragesSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRAveragesSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRAveragesSequence) &gt; 0" status="Error" message="MRAveragesSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="MRSpatialSaturationMacro"		type="C" condition="(((/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRModifierSequence/Item[@number=1]/SpatialPresaturation/value[@number=1] = 'SLAB' or /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRModifierSequence/Item[@number=1]/SpatialPresaturation/value[@number=1] = 'SLAB') and (/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED')) and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRSpatialSaturationSequence) = 0) or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRSpatialSaturationSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRSpatialSaturationSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRSpatialSaturationSequence) &gt; 0" status="Error" message="MRSpatialSaturationSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="MRMetaboliteMapMacro"		type="C" condition="(/DicomObject/ImageType/value[@number=3] = 'METABOLITE_MAP' and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRMetaboliteMapSequence) = 0) or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRMetaboliteMapSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRMetaboliteMapSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRMetaboliteMapSequence) &gt; 0" status="Error" message="MRMetaboliteMapSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="MRVelocityEncodingMacro"		type="C" condition="((/DicomObject/PhaseContrast/value[@number=1] = 'YES' and (/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED')) and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRVelocityEncodingSequence) = 0) or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRVelocityEncodingSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRVelocityEncodingSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRVelocityEncodingSequence) &gt; 0" status="Error" message="MRVelocityEncodingSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="MRArterialSpinLabelingMacro"		type="C" condition="(/DicomObject/ImageType/value[@number=3] = 'ASL' and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRArterialSpinLabelingSequence) = 0) or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRArterialSpinLabelingSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRArterialSpinLabelingSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRArterialSpinLabelingSequence) &gt; 0" status="Error" message="MRArterialSpinLabelingSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="TemporalPositionMacro"	type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/TemporalPositionSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/TemporalPositionSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/TemporalPositionSequence) &gt; 0" status="Error" message="TemporalPositionSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
		</sequence>
		<verifyanywhere test="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item) != /DicomObject/NumberOfFrames/value[@number=1]" status="Error" message="Number of PerFrameFunctionalGroupsSequence Items must equal NumberOfFrames"/>
		<sequence  name="PerFrameFunctionalGroupsSequence"		vr="SQ" type="1"  vmmin="1" vmmax="n">
			<includemacro name="PixelMeasuresMacro"			type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PixelMeasuresSequence) = 0 or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PixelMeasuresSequence) &gt; 0"/>
			<includemacro name="FrameContentMacro"			type="M"/>
			<includemacro name="PlanePositionMacro"			type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PlanePositionSequence) = 0 or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PlanePositionSequence) &gt; 0"/>
			<includemacro name="PlaneOrientationMacro"		type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PlaneOrientationSequence) = 0 or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PlaneOrientationSequence) &gt; 0"/>
			<includemacro name="ReferencedImageMacro"		type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/ReferencedImageSequence) &gt; 0"/>
			<includemacro name="DerivationImageMacro"		type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/DerivationImageSequence) &gt; 0"/>
			<includemacro name="CardiacSynchronizationMacro"		type="C" condition="(((count(/DicomObject/CardiacSynchronizationTechnique) &gt; 0 and /DicomObject/CardiacSynchronizationTechnique/value[@number=1] != 'NONE') and (/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED')) and count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CardiacSynchronizationSequence) = 0) or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CardiacSynchronizationSequence) &gt; 0"/>
			<includemacro name="FrameAnatomyMacro"			type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/FrameAnatomySequence) = 0 or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/FrameAnatomySequence) &gt; 0"/>
			<includemacro name="PixelValueTransformationMacro"	type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PixelValueTransformationSequence) = 0 or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PixelValueTransformationSequence) &gt; 0"/>
			<includemacro name="FrameVOILUTMacro"			type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/FrameVOILUTSequence) &gt; 0"/>
			<includemacro name="RealWorldValueMappingMacro"		type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/RealWorldValueMappingSequence) &gt; 0"/>
			<includemacro name="ContrastBolusUsageMacro"		type="C" condition="count(/DicomObject/ContrastBolusAgentSequence) &gt; 0 and (count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/ContrastBolusUsageSequence) = 0 or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/ContrastBolusUsageSequence) &gt; 0)"/>
			<includemacro name="RespiratorySynchronizationMacro"		type="C" condition="(((count(/DicomObject/RespiratoryMotionCompensationTechnique) &gt; 0 and /DicomObject/RespiratoryMotionCompensationTechnique/value[@number=1] != 'NONE' and /DicomObject/RespiratoryMotionCompensationTechnique/value[@number=1] != 'REALTIME' and /DicomObject/RespiratoryMotionCompensationTechnique/value[@number=1] != 'BREATH_HOLD') and (/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED')) and count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/RespiratorySynchronizationSequence) = 0) or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/RespiratorySynchronizationSequence) &gt; 0"/>
			<includemacro name="MRImageFrameTypeMacro"		type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence) = 0 or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence) &gt; 0"/>
			<includemacro name="MRTimingAndRelatedParametersMacro"	type="C" condition="((/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED') and count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRTimingAndRelatedParametersSequence) = 0) or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRTimingAndRelatedParametersSequence) &gt; 0"/>
			<includemacro name="MRFOVGeometryMacro"			type="C" condition="(((count(/DicomObject/GeometryOfKSpaceTraversal) &gt; 0 and /DicomObject/GeometryOfKSpaceTraversal/value[@number=1] = 'RECTILINEAR') and (/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED')) and count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRFOVGeometrySequence) = 0) or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRFOVGeometrySequence) &gt; 0"/>
			<includemacro name="MREchoMacro"			type="C" condition="((/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED') and count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MREchoSequence) = 0) or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MREchoSequence) &gt; 0"/>
			<includemacro name="MRModifierMacro"			type="C" condition="((/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED') and count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRModifierSequence) = 0) or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRModifierSequence) &gt; 0"/>
			<includemacro name="MRImagingModifierMacro"		type="C" condition="((/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED') and count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImagingModifierSequence) = 0) or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImagingModifierSequence) &gt; 0"/>
			<includemacro name="MRReceiveCoilMacro"			type="C" condition="((/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED') and count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRReceiveCoilSequence) = 0) or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRReceiveCoilSequence) &gt; 0"/>
			<includemacro name="MRTransmitCoilMacro"		type="C" condition="((/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED') and count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRTransmitCoilSequence) = 0) or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRTransmitCoilSequence) &gt; 0"/>
			<includemacro name="MRDiffusionMacro"			type="C" condition="(((/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/AcquisitionContrast/value[@number=1] = 'DIFFUSION' or /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/AcquisitionContrast/value[@number=1] = 'DIFFUSION') and (/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED')) and count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRDiffusionSequence) = 0) or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRDiffusionSequence) &gt; 0"/>
			<includemacro name="MRSpatialSaturationMacro"		type="C" condition="(((/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRModifierSequence/Item[@number=1]/SpatialPresaturation/value[@number=1] = 'SLAB' or /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRModifierSequence/Item[@number=1]/SpatialPresaturation/value[@number=1] = 'SLAB') and (/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED')) and count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRSpatialSaturationSequence) = 0) or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRSpatialSaturationSequence) &gt; 0"/>
			<includemacro name="MRMetaboliteMapMacro"		type="C" condition="(/DicomObject/ImageType/value[@number=3] = 'METABOLITE_MAP' and count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRMetaboliteMapSequence) = 0) or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRMetaboliteMapSequence) &gt; 0"/>
			<includemacro name="MRVelocityEncodingMacro"		type="C" condition="((/DicomObject/PhaseContrast/value[@number=1] = 'YES' and (/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED')) and count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRVelocityEncodingSequence) = 0) or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRVelocityEncodingSequence) &gt; 0"/>
			<includemacro name="MRArterialSpinLabelingMacro"	type="C" condition="(/DicomObject/ImageType/value[@number=3] = 'ASL' and count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRArterialSpinLabelingSequence) = 0) or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRArterialSpinLabelingSequence) &gt; 0"/>
			<includemacro name="TemporalPositionMacro"		type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/TemporalPositionSequence) &gt; 0"/>
		</sequence>
	</definemodule>
	
	<definemodule name="MultiFrameFunctionalGroupsForLegacyConvertedEnhancedMRImageModule">
		<sequence  name="SharedFunctionalGroupsSequence"		vr="SQ" type="1"  vmmin="1" vmmax="1">
			<includemacro name="PixelMeasuresMacro"			type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PixelMeasuresSequence) = 0 or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PixelMeasuresSequence) &gt; 0"/>
			<verifyanywhere test="count(PixelMeasuresSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PixelMeasuresSequence) &gt; 0" status="Error" message="PixelMeasuresSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/FrameContentSequence) &gt; 0" status="Error" message="FrameContentSequence cannot be in SharedFunctionalGroupsSequence"/>
			<includemacro name="PlanePositionMacro"			type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PlanePositionSequence) = 0 or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PlanePositionSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PlanePositionSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PlanePositionSequence) &gt; 0" status="Error" message="PlanePositionSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="PlaneOrientationMacro"		type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PlaneOrientationSequence) = 0 or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PlaneOrientationSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PlaneOrientationSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PlaneOrientationSequence) &gt; 0" status="Error" message="PlaneOrientationSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="ReferencedImageMacro"		type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/ReferencedImageSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/ReferencedImageSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/ReferencedImageSequence) &gt; 0" status="Error" message="ReferencedImageSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="DerivationImageMacro"		type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/DerivationImageSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/DerivationImageSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/DerivationImageSequence) &gt; 0" status="Error" message="DerivationImageSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="CardiacSynchronizationMacro"		type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CardiacSynchronizationSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CardiacSynchronizationSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CardiacSynchronizationSequence) &gt; 0" status="Error" message="CardiacSynchronizationSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="FrameAnatomyMacro"			type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/FrameAnatomySequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/FrameAnatomySequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/FrameAnatomySequence) &gt; 0" status="Error" message="FrameAnatomySequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="PixelValueTransformationMacro"	type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PixelValueTransformationSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PixelValueTransformationSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PixelValueTransformationSequence) &gt; 0" status="Error" message="PixelValueTransformationSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="FrameVOILUTMacro"			type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/FrameVOILUTSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/FrameVOILUTSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/FrameVOILUTSequence) &gt; 0" status="Error" message="FrameVOILUTSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="RealWorldValueMappingMacro"		type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/RealWorldValueMappingSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/RealWorldValueMappingSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/RealWorldValueMappingSequence) &gt; 0" status="Error" message="RealWorldValueMappingSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="ContrastBolusUsageMacro"		type="C" condition="count(/DicomObject/ContrastBolusAgentSequence) &gt; 0 and (count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/ContrastBolusUsageSequence) = 0 or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/ContrastBolusUsageSequence) &gt; 0)"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/ContrastBolusAgentSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/ContrastBolusAgentSequence) &gt; 0" status="Error" message="ContrastBolusAgentSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="RespiratorySynchronizationMacro"		type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/RespiratorySynchronizationSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/RespiratorySynchronizationSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/RespiratorySynchronizationSequence) &gt; 0" status="Error" message="RespiratorySynchronizationSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="MRImageFrameTypeMacro"		type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence) = 0 or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTImageFrameTypeSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTImageFrameTypeSequence) &gt; 0" status="Error" message="CTImageFrameTypeSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="TemporalPositionMacro"	type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/TemporalPositionSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/TemporalPositionSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/TemporalPositionSequence) &gt; 0" status="Error" message="TemporalPositionSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="UnassignedSharedConvertedAttributesMacro"	type="M"/>
		</sequence>
		<verifyanywhere test="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item) != /DicomObject/NumberOfFrames/value[@number=1]" status="Error" message="Number of PerFrameFunctionalGroupsSequence Items must equal NumberOfFrames"/>
		<sequence  name="PerFrameFunctionalGroupsSequence"		vr="SQ" type="1"  vmmin="1" vmmax="n">
			<includemacro name="PixelMeasuresMacro"			type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PixelMeasuresSequence) = 0 or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PixelMeasuresSequence) &gt; 0"/>
			<includemacro name="FrameContentMacro"			type="M"/>
			<includemacro name="PlanePositionMacro"			type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PlanePositionSequence) = 0 or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PlanePositionSequence) &gt; 0"/>
			<includemacro name="PlaneOrientationMacro"		type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PlaneOrientationSequence) = 0 or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PlaneOrientationSequence) &gt; 0"/>
			<includemacro name="ReferencedImageMacro"		type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/ReferencedImageSequence) &gt; 0"/>
			<includemacro name="DerivationImageMacro"		type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/DerivationImageSequence) &gt; 0"/>
			<includemacro name="CardiacSynchronizationMacro"		type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CardiacSynchronizationSequence) &gt; 0"/>
			<includemacro name="FrameAnatomyMacro"			type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/FrameAnatomySequence) &gt; 0"/>
			<includemacro name="PixelValueTransformationMacro"	type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PixelValueTransformationSequence) &gt; 0"/>
			<includemacro name="FrameVOILUTMacro"			type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/FrameVOILUTSequence) &gt; 0"/>
			<includemacro name="RealWorldValueMappingMacro"	type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/RealWorldValueMappingSequence) &gt; 0"/>
			<includemacro name="ContrastBolusUsageMacro"		type="C" condition="count(/DicomObject/ContrastBolusAgentSequence) &gt; 0 and (count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/ContrastBolusUsageSequence) = 0 or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/ContrastBolusUsageSequence) &gt; 0)"/>
			<includemacro name="RespiratorySynchronizationMacro"		type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/RespiratorySynchronizationSequence) &gt; 0"/>
			<includemacro name="MRImageFrameTypeMacro"		type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence) = 0 or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence) &gt; 0"/>
			<includemacro name="TemporalPositionMacro"		type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/TemporalPositionSequence) &gt; 0"/>
			<includemacro name="UnassignedPerFrameConvertedAttributesMacro"	type="M"/>
			<includemacro name="ImageFrameConversionSourceMacro"	type="M"/>
		</sequence>
	</definemodule>
	
	<definemodule name="MultiFrameFunctionalGroupsForMRImageSpectroscopyModule">
		<sequence  name="SharedFunctionalGroupsSequence"		vr="SQ" type="1"  vmmin="1" vmmax="1">
			<includemacro name="PixelMeasuresMacro"			type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PixelMeasuresSequence) = 0 or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PixelMeasuresSequence) &gt; 0"/>
			<verifyanywhere test="count(PixelMeasuresSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PixelMeasuresSequence) &gt; 0" status="Error" message="PixelMeasuresSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/FrameContentSequence) &gt; 0" status="Error" message="FrameContentSequence cannot be in SharedFunctionalGroupsSequence"/>
			<includemacro name="PlanePositionMacro"			type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PlanePositionSequence) = 0 or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PlanePositionSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PlanePositionSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PlanePositionSequence) &gt; 0" status="Error" message="PlanePositionSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="PlaneOrientationMacro"		type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PlaneOrientationSequence) = 0 or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PlaneOrientationSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PlaneOrientationSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PlaneOrientationSequence) &gt; 0" status="Error" message="PlaneOrientationSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="ReferencedImageMacro"		type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/ReferencedImageSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/ReferencedImageSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/ReferencedImageSequence) &gt; 0" status="Error" message="ReferencedImageSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="DerivationImageMacro"		type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/DerivationImageSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/DerivationImageSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/DerivationImageSequence) &gt; 0" status="Error" message="DerivationImageSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="CardiacSynchronizationMacro"		type="C" condition="(((count(/DicomObject/CardiacSynchronizationTechnique) &gt; 0 and /DicomObject/CardiacSynchronizationTechnique/value[@number=1] != 'NONE') and (/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED')) and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CardiacSynchronizationSequence) = 0) or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CardiacSynchronizationSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CardiacSynchronizationSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CardiacSynchronizationSequence) &gt; 0" status="Error" message="CardiacSynchronizationSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="FrameAnatomyMacro"			type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/FrameAnatomySequence) = 0 or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/FrameAnatomySequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/FrameAnatomySequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/FrameAnatomySequence) &gt; 0" status="Error" message="FrameAnatomySequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="ContrastBolusUsageMacro"		type="C" condition="count(/DicomObject/ContrastBolusAgentSequence) &gt; 0 and (count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/ContrastBolusUsageSequence) = 0 or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/ContrastBolusUsageSequence) &gt; 0)"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/ContrastBolusAgentSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/ContrastBolusAgentSequence) &gt; 0" status="Error" message="ContrastBolusAgentSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="RespiratorySynchronizationMacro"		type="C" condition="(((count(/DicomObject/RespiratoryMotionCompensationTechnique) &gt; 0 and /DicomObject/RespiratoryMotionCompensationTechnique/value[@number=1] != 'NONE' and /DicomObject/RespiratoryMotionCompensationTechnique/value[@number=1] != 'REALTIME' and /DicomObject/RespiratoryMotionCompensationTechnique/value[@number=1] != 'BREATH_HOLD') and (/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED')) and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/RespiratorySynchronizationSequence) = 0) or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/RespiratorySynchronizationSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/RespiratorySynchronizationSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/RespiratorySynchronizationSequence) &gt; 0" status="Error" message="RespiratorySynchronizationSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="MRSpectroscopyFrameTypeMacro"		type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRSpectroscopyFrameTypeSequence) = 0 or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRSpectroscopyFrameTypeSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRSpectroscopyFrameTypeSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRSpectroscopyFrameTypeSequence) &gt; 0" status="Error" message="MRSpectroscopyFrameTypeSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="MRTimingAndRelatedParametersMacro"	type="C" condition="((/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED') and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRTimingAndRelatedParametersSequence) = 0) or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRTimingAndRelatedParametersSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRTimingAndRelatedParametersSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRTimingAndRelatedParametersSequence) &gt; 0" status="Error" message="MRTimingAndRelatedParametersSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="MRSpectroscopyFOVGeometryMacro"	type="C" condition="(((count(/DicomObject/GeometryOfKSpaceTraversal) &gt; 0 and /DicomObject/GeometryOfKSpaceTraversal/value[@number=1] = 'RECTILINEAR') and (/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED')) and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRSpectroscopyFOVGeometrySequence) = 0) or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRSpectroscopyFOVGeometrySequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRSpectroscopyFOVGeometrySequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRSpectroscopyFOVGeometrySequence) &gt; 0" status="Error" message="MRSpectroscopyFOVGeometrySequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="MREchoMacro"			type="C" condition="((/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED') and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MREchoSequence) = 0) or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MREchoSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MREchoSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MREchoSequence) &gt; 0" status="Error" message="MREchoSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="MRModifierMacro"			type="C" condition="((/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED') and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRModifierSequence) = 0) or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRModifierSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRModifierSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRModifierSequence) &gt; 0" status="Error" message="MRModifierSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="MRReceiveCoilMacro"			type="C" condition="((/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED') and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRReceiveCoilSequence) = 0) or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRReceiveCoilSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRReceiveCoilSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRReceiveCoilSequence) &gt; 0" status="Error" message="MRReceiveCoilSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="MRTransmitCoilMacro"		type="C" condition="((/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED') and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRTransmitCoilSequence) = 0) or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRTransmitCoilSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRTransmitCoilSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRTransmitCoilSequence) &gt; 0" status="Error" message="MRTransmitCoilSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="MRDiffusionMacro"			type="C" condition="(((/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/AcquisitionContrast/value[@number=1] = 'DIFFUSION' or /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/AcquisitionContrast/value[@number=1] = 'DIFFUSION') and (/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED')) or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRDiffusionSequence) &gt; 0) and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRDiffusionSequence) = 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRDiffusionSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRDiffusionSequence) &gt; 0" status="Error" message="MRDiffusionSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="MRAveragesMacro"			type="C" condition="((/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED') and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRAveragesSequence) = 0) or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRAveragesSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRAveragesSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRAveragesSequence) &gt; 0" status="Error" message="MRAveragesSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="MRSpatialSaturationMacro"		type="C" condition="(((/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRModifierSequence/Item[@number=1]/SpatialPresaturation/value[@number=1] = 'SLAB' or /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRModifierSequence/Item[@number=1]/SpatialPresaturation/value[@number=1] = 'SLAB') and (/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED')) and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRSpatialSaturationSequence) = 0) or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRSpatialSaturationSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRSpatialSaturationSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRSpatialSaturationSequence) &gt; 0" status="Error" message="MRSpatialSaturationSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
			<includemacro name="MRVelocityEncodingMacro"		type="C" condition="((/DicomObject/PhaseContrast/value[@number=1] = 'YES' and (/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED')) and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRVelocityEncodingSequence) = 0) or count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRVelocityEncodingSequence) &gt; 0"/>
			<verifyanywhere test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRVelocityEncodingSequence) &gt; 0 and count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRVelocityEncodingSequence) &gt; 0" status="Error" message="MRVelocityEncodingSequence cannot be in both Shared and PerFrame FunctionalGroupsSequence"/>
		</sequence>
		
		<verifyanywhere test="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item) != /DicomObject/NumberOfFrames/value[@number=1]" status="Error" message="Number of PerFrameFunctionalGroupsSequence Items must equal NumberOfFrames"/>
		<sequence  name="PerFrameFunctionalGroupsSequence"		vr="SQ" type="1"  vmmin="1" vmmax="n">
			<includemacro name="PixelMeasuresMacro"			type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PixelMeasuresSequence) = 0 or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PixelMeasuresSequence) &gt; 0"/>
			<includemacro name="FrameContentMacro"			type="M"/>
			<includemacro name="PlanePositionMacro"			type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PlanePositionSequence) = 0 or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PlanePositionSequence) &gt; 0"/>
			<includemacro name="PlaneOrientationMacro"		type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/PlaneOrientationSequence) = 0 or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/PlaneOrientationSequence) &gt; 0"/>
			<includemacro name="ReferencedImageMacro"		type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/ReferencedImageSequence) &gt; 0"/>
			<includemacro name="DerivationImageMacro"		type="C" condition="count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/DerivationImageSequence) &gt; 0"/>
			<includemacro name="CardiacSynchronizationMacro"		type="C" condition="(((count(/DicomObject/CardiacSynchronizationTechnique) &gt; 0 and /DicomObject/CardiacSynchronizationTechnique/value[@number=1] != 'NONE') and (/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED')) and count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CardiacSynchronizationSequence) = 0) or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CardiacSynchronizationSequence) &gt; 0"/>
			<includemacro name="FrameAnatomyMacro"			type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/FrameAnatomySequence) = 0 or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/FrameAnatomySequence) &gt; 0"/>
			<includemacro name="ContrastBolusUsageMacro"		type="C" condition="count(/DicomObject/ContrastBolusAgentSequence) &gt; 0 and (count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/ContrastBolusUsageSequence) = 0 or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/ContrastBolusUsageSequence) &gt; 0)"/>
			<includemacro name="RespiratorySynchronizationMacro"		type="C" condition="(((count(/DicomObject/RespiratoryMotionCompensationTechnique) &gt; 0 and /DicomObject/RespiratoryMotionCompensationTechnique/value[@number=1] != 'NONE' and /DicomObject/RespiratoryMotionCompensationTechnique/value[@number=1] != 'REALTIME' and /DicomObject/RespiratoryMotionCompensationTechnique/value[@number=1] != 'BREATH_HOLD') and (/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED')) and count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/RespiratorySynchronizationSequence) = 0) or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/RespiratorySynchronizationSequence) &gt; 0"/>
			<includemacro name="MRSpectroscopyFrameTypeMacro"		type="C" condition="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRSpectroscopyFrameTypeSequence) = 0 or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRSpectroscopyFrameTypeSequence) &gt; 0"/>
			<includemacro name="MRTimingAndRelatedParametersMacro"	type="C" condition="((/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED') and count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRTimingAndRelatedParametersSequence) = 0) or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRTimingAndRelatedParametersSequence) &gt; 0"/>
			<includemacro name="MRSpectroscopyFOVGeometryMacro"	type="C" condition="(((count(/DicomObject/GeometryOfKSpaceTraversal) &gt; 0 and /DicomObject/GeometryOfKSpaceTraversal/value[@number=1] = 'RECTILINEAR') and (/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED')) and count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRSpectroscopyFOVGeometrySequence) = 0) or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRSpectroscopyFOVGeometrySequence) &gt; 0"/>
			<includemacro name="MREchoMacro"			type="C" condition="((/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED') and count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MREchoSequence) = 0) or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MREchoSequence) &gt; 0"/>
			<includemacro name="MRModifierMacro"			type="C" condition="((/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED') and count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRModifierSequence) = 0) or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRModifierSequence) &gt; 0"/>
			<includemacro name="MRReceiveCoilMacro"			type="C" condition="((/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED') and count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRReceiveCoilSequence) = 0) or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRReceiveCoilSequence) &gt; 0"/>
			<includemacro name="MRTransmitCoilMacro"		type="C" condition="((/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED') and count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRTransmitCoilSequence) = 0) or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRTransmitCoilSequence) &gt; 0"/>
			<includemacro name="MRDiffusionMacro"			type="C" condition="(((/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/AcquisitionContrast/value[@number=1] = 'DIFFUSION' or /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/AcquisitionContrast/value[@number=1] = 'DIFFUSION') and (/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED')) and count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRDiffusionSequence) = 0) or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRDiffusionSequence) &gt; 0"/>
			<includemacro name="MRSpatialSaturationMacro"		type="C" condition="(((/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRModifierSequence/Item[@number=1]/SpatialPresaturation/value[@number=1] = 'SLAB' or /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRModifierSequence/Item[@number=1]/SpatialPresaturation/value[@number=1] = 'SLAB') and (/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED')) and count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRSpatialSaturationSequence) = 0) or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRSpatialSaturationSequence) &gt; 0"/>
			<includemacro name="MRVelocityEncodingMacro"		type="C" condition="((/DicomObject/PhaseContrast/value[@number=1] = 'YES' and (/DicomObject/ImageType/value[@number=1] = 'ORIGINAL' or /DicomObject/ImageType/value[@number=1] = 'MIXED')) and count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRVelocityEncodingSequence) = 0) or count(/DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRVelocityEncodingSequence) &gt; 0"/>
		</sequence>
	</definemodule>

	<definemodule name="MultiFrameDimensionModule">
		<sequence  name="DimensionOrganizationSequence"		vr="SQ" type="1"  vmmin="1" vmmax="n">
			<attribute name="DimensionOrganizationUID"		vr="UI" type="1"  vmmin="1" vmmax="1"/>
		</sequence>
		<attribute name="DimensionOrganizationType"			vr="CS" type="3"  vmmin="1" vmmax="1">
			<definedtermslist valueselector="1">
				<definedterm value="3D"/>
				<definedterm value="3D_TEMPORAL"/>
			</definedtermslist>
		</attribute>
		<sequence  name="DimensionIndexSequence"			vr="SQ" type="1"  vmmin="1" vmmax="n">
			<attribute name="DimensionIndexPointer"			vr="AT" type="1"  vmmin="1" vmmax="1"/>
			<attribute name="DimensionIndexPrivateCreator"	vr="LO" type="1C" vmmin="1" vmmax="1" nocondition=""/>
			<attribute name="FunctionalGroupPointer"		vr="AT" type="1C" vmmin="1" vmmax="1" condition="
				    DimensionIndexPointer/value[@number=1] != 'CTAcquisitionDetailsSequence'
				and DimensionIndexPointer/value[@number=1] != 'CTAcquisitionTypeSequence'
				and DimensionIndexPointer/value[@number=1] != 'CTExposureSequence'
				and DimensionIndexPointer/value[@number=1] != 'CTGeometrySequence'
				and DimensionIndexPointer/value[@number=1] != 'CTImageFrameTypeSequence'
				and DimensionIndexPointer/value[@number=1] != 'CTPositionSequence'
				and DimensionIndexPointer/value[@number=1] != 'CTReconstructionSequence'
				and DimensionIndexPointer/value[@number=1] != 'CTTableDynamicsSequence'
				and DimensionIndexPointer/value[@number=1] != 'CTXRayDetailsSequence'
				and DimensionIndexPointer/value[@number=1] != 'CalibrationSequence'
				and DimensionIndexPointer/value[@number=1] != 'CardiacSynchronizationSequence'
				and DimensionIndexPointer/value[@number=1] != 'CollimatorShapeSequence'
				and DimensionIndexPointer/value[@number=1] != 'ContrastBolusUsageSequence'
				and DimensionIndexPointer/value[@number=1] != 'DerivationImageSequence'
				and DimensionIndexPointer/value[@number=1] != 'ExposureControlSensingRegionsSequence'
				and DimensionIndexPointer/value[@number=1] != 'FieldOfViewSequence'
				and DimensionIndexPointer/value[@number=1] != 'FrameAcquisitionSequence'
				and DimensionIndexPointer/value[@number=1] != 'FrameAnatomySequence'
				and DimensionIndexPointer/value[@number=1] != 'FrameDetectorParametersSequence'
				and DimensionIndexPointer/value[@number=1] != 'FrameDisplayShutterSequence'
				and DimensionIndexPointer/value[@number=1] != 'FramePixelDataPropertiesSequence'
				and DimensionIndexPointer/value[@number=1] != 'FramePixelShiftSequence'
				and DimensionIndexPointer/value[@number=1] != 'FrameVOILUTSequence'
				and DimensionIndexPointer/value[@number=1] != 'IrradiationEventIdentificationSequence'
				and DimensionIndexPointer/value[@number=1] != 'IsocenterReferenceSystemSequence'
				and DimensionIndexPointer/value[@number=1] != 'MRAveragesSequence'
				and DimensionIndexPointer/value[@number=1] != 'MRDiffusionSequence'
				and DimensionIndexPointer/value[@number=1] != 'MREchoSequence'
				and DimensionIndexPointer/value[@number=1] != 'MRFOVGeometrySequence'
				and DimensionIndexPointer/value[@number=1] != 'MRImageFrameTypeSequence'
				and DimensionIndexPointer/value[@number=1] != 'MRImagingModifierSequence'
				and DimensionIndexPointer/value[@number=1] != 'MRMetaboliteMapSequence'
				and DimensionIndexPointer/value[@number=1] != 'MRModifierSequence'
				and DimensionIndexPointer/value[@number=1] != 'MRReceiveCoilSequence'
				and DimensionIndexPointer/value[@number=1] != 'MRSpatialSaturationSequence'
				and DimensionIndexPointer/value[@number=1] != 'MRSpectroscopyFOVGeometrySequence'
				and DimensionIndexPointer/value[@number=1] != 'MRSpectroscopyFrameTypeSequence'
				and DimensionIndexPointer/value[@number=1] != 'MRTimingAndRelatedParametersSequence'
				and DimensionIndexPointer/value[@number=1] != 'MRTransmitCoilSequence'
				and DimensionIndexPointer/value[@number=1] != 'MRVelocityEncodingSequence'
				and DimensionIndexPointer/value[@number=1] != 'ObjectThicknessSequence'
				and DimensionIndexPointer/value[@number=1] != 'PatientOrientationInFrameSequence'
				and DimensionIndexPointer/value[@number=1] != 'PixelIntensityRelationshipLUTSequence'
				and DimensionIndexPointer/value[@number=1] != 'PixelMeasuresSequence'
				and DimensionIndexPointer/value[@number=1] != 'PixelValueTransformationSequence'
				and DimensionIndexPointer/value[@number=1] != 'PlaneOrientationSequence'
				and DimensionIndexPointer/value[@number=1] != 'PlanePositionSequence'
				and DimensionIndexPointer/value[@number=1] != 'PositionerPositionSequence'
				and DimensionIndexPointer/value[@number=1] != 'ProjectionPixelCalibrationSequence'
				and DimensionIndexPointer/value[@number=1] != 'RealWorldValueMappingSequence'
				and DimensionIndexPointer/value[@number=1] != 'ReferencedImageSequence'
				and DimensionIndexPointer/value[@number=1] != 'RespiratorySynchronizationSequence'
				and DimensionIndexPointer/value[@number=1] != 'TablePositionSequence'
				and DimensionIndexPointer/value[@number=1] != 'XRayGeometrySequence'
				and DimensionIndexPointer/value[@number=1] != 'XAXRFFrameCharacteristicsSequence' 
			"/>
			<attribute name="FunctionalGroupPrivateCreator"		vr="LO" type="1C" vmmin="1" vmmax="1" nocondition=""/>
			<attribute name="DimensionOrganizationUID"		vr="UI" type="1" vmmin="1" vmmax="1"/>
			<attribute name="DimensionDescriptionLabel"		vr="LO" type="3"  vmmin="1" vmmax="1"/>
		</sequence>
	</definemodule>
	
	<definemodule name="CardiacSynchronizationModule">
		<attribute name="CardiacSynchronizationTechnique"		vr="CS" type="1C"  vmmin="1" vmmax="1" condition="ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED'" mbpo="T">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="NONE"/>
				<enumeratedvalue value="REALTIME"/>
				<enumeratedvalue value="PROSPECTIVE"/>
				<enumeratedvalue value="RETROSPECTIVE"/>
				<enumeratedvalue value="PACED"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="CardiacSignalSource"				vr="CS" type="1C"  vmmin="1" vmmax="1" condition="count(CardiacSynchronizationTechnique) &gt; 0 and CardiacSynchronizationTechnique/value[@number=1]!='NONE' and (ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED')" mbpo="T">
			<verify test="CardiacSynchronizationTechnique/value[@number=1]='NONE'" status="Error" message="may not be present when CardiacSynchronizationTechnique is NONE"/>
			<definedtermslist valueselector="1">
				<definedterm value="ECG"/>
				<definedterm value="VCG"/>
				<definedterm value="PP"/>
				<definedterm value="MR"/>
			</definedtermslist>
		</attribute>
		<attribute name="CardiacRRIntervalSpecified"			vr="FD" type="1C"  vmmin="1" vmmax="1" condition="count(CardiacSynchronizationTechnique) &gt; 0 and CardiacSynchronizationTechnique/value[@number=1]!='NONE' and (ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED')" mbpo="T">
			<verify test="CardiacSynchronizationTechnique/value[@number=1]='NONE'" status="Error" message="may not be present when CardiacSynchronizationTechnique is NONE"/>
		</attribute>
		<attribute name="CardiacBeatRejectionTechnique"			vr="CS" type="1C"  vmmin="1" vmmax="1" condition="count(CardiacSynchronizationTechnique) &gt; 0 and (CardiacSynchronizationTechnique/value[@number=1]='PROSPECTIVE' or CardiacSynchronizationTechnique/value[@number=1]='RETROSPECTIVE') and (ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED')" mbpo="T">
			<verify test="CardiacSynchronizationTechnique/value[@number=1]!='PROSPECTIVE' and CardiacSynchronizationTechnique/value[@number=1]!='RETROSPECTIVE'" status="Error" message="may not be present when CardiacSynchronizationTechnique is other than PROSPECTIVE or RETROSPECTIVE"/>
			<definedtermslist valueselector="1">
				<definedterm value="NONE"/>
				<definedterm value="RR_INTERVAL"/>
				<definedterm value="QRS_LOOP"/>
				<definedterm value="PVC"/>
			</definedtermslist>
		</attribute>
		<attribute name="LowRRValue"					vr="IS" type="2C"  vmmin="0" vmmax="1" condition="count(CardiacSynchronizationTechnique) &gt; 0 and (CardiacSynchronizationTechnique/value[@number=1]='PROSPECTIVE' or CardiacSynchronizationTechnique/value[@number=1]='RETROSPECTIVE') and (ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED')" mbpo="T">
			<verify test="CardiacSynchronizationTechnique/value[@number=1]!='PROSPECTIVE' and CardiacSynchronizationTechnique/value[@number=1]!='RETROSPECTIVE'" status="Error" message="may not be present when CardiacSynchronizationTechnique is other than PROSPECTIVE or RETROSPECTIVE"/>
		</attribute>
		<attribute name="HighRRValue"					vr="IS" type="2C"  vmmin="0" vmmax="1" condition="count(CardiacSynchronizationTechnique) &gt; 0 and (CardiacSynchronizationTechnique/value[@number=1]='PROSPECTIVE' or CardiacSynchronizationTechnique/value[@number=1]='RETROSPECTIVE') and (ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED')" mbpo="T">
			<verify test="CardiacSynchronizationTechnique/value[@number=1]!='PROSPECTIVE' and CardiacSynchronizationTechnique/value[@number=1]!='RETROSPECTIVE'" status="Error" message="may not be present when CardiacSynchronizationTechnique is other than PROSPECTIVE or RETROSPECTIVE"/>
		</attribute>
		<attribute name="IntervalsAcquired"				vr="IS" type="2C"  vmmin="0" vmmax="1" condition="count(CardiacSynchronizationTechnique) &gt; 0 and CardiacSynchronizationTechnique/value[@number=1]!='NONE' and (ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED')" mbpo="T">
			<verify test="CardiacSynchronizationTechnique/value[@number=1]='NONE'" status="Error" message="may not be present when CardiacSynchronizationTechnique is NONE"/>
		</attribute>
		<attribute name="IntervalsRejected"				vr="IS" type="2C"  vmmin="0" vmmax="1" condition="count(CardiacSynchronizationTechnique) &gt; 0 and CardiacSynchronizationTechnique/value[@number=1]!='NONE' and (ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED')" mbpo="T">
			<verify test="CardiacSynchronizationTechnique/value[@number=1]='NONE'" status="Error" message="may not be present when CardiacSynchronizationTechnique is NONE"/>
		</attribute>
		<attribute name="SkipBeats"						vr="IS" type="3"  vmmin="1" vmmax="1"/>
		<attribute name="CardiacFramingType"			vr="LO" type="1C" vmmin="1" vmmax="1" nocondition="">
			<definedtermslist valueselector="1">
				<definedterm value="FORW"/>
				<definedterm value="BACK"/>
				<definedterm value="PCNT"/>
			</definedtermslist>
		</attribute>
	</definemodule>
	
	<definemodule name="RespiratorySynchronizationModule">
		<attribute name="RespiratoryMotionCompensationTechnique"	vr="CS" type="1C"  vmmin="1" vmmax="1" condition="ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED'" mbpo="T">
			<definedtermslist valueselector="1">
				<definedterm value="NONE"/>
				<definedterm value="BREATH_HOLD"/>
				<definedterm value="REALTIME"/>
				<definedterm value="GATING"/>
				<definedterm value="TRACKING"/>
				<definedterm value="PHASE_ORDERING"/>
				<definedterm value="PHASE_RESCANNING"/>
				<definedterm value="RETROSPECTIVE"/>
				<definedterm value="CORRECTION"/>
			</definedtermslist>
		</attribute>
		<attribute name="RespiratorySignalSource"			vr="CS" type="1C"  vmmin="1" vmmax="1" condition="count(RespiratoryMotionCompensationTechnique) &gt; 0 and RespiratoryMotionCompensationTechnique/value[@number=1]!='NONE' and (ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED')" mbpo="T">
			<verify test="RespiratoryMotionCompensationTechnique/value[@number=1]='NONE'" status="Error" message="may not be present when RespiratoryMotionCompensationTechnique is NONE"/>
			<definedtermslist valueselector="1">
				<definedterm value="NONE"/>
				<definedterm value="BELT"/>
				<definedterm value="NASAL_PROBE"/>
				<definedterm value="CO2_SENSOR"/>
				<definedterm value="NAVIGATOR"/>
				<definedterm value="MR_PHASE"/>
				<definedterm value="ECG"/>
			</definedtermslist>
		</attribute>
		<attribute name="RespiratoryTriggerType"			vr="CS" type="1C" vmmin="1" vmmax="1" nocondition="">
			<definedtermslist valueselector="1">
				<definedterm value="TIME"/>
				<definedterm value="AMPLITUDE"/>
				<definedterm value="BOTH"/>
			</definedtermslist>
		</attribute>
	</definemodule>
	
	<definemodule name="BulkMotionSynchronizationModule">
		<attribute name="BulkMotionCompensationTechnique"		vr="CS" type="1C"  vmmin="1" vmmax="1" condition="ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED'" mbpo="T">
			<definedtermslist valueselector="1">
				<definedterm value="NONE"/>
				<definedterm value="REALTIME"/>
				<definedterm value="GATING"/>
				<definedterm value="TRACKING"/>
				<definedterm value="RETROSPECTIVE"/>
				<definedterm value="CORRECTION"/>
			</definedtermslist>
		</attribute>
		<attribute name="BulkMotionSignalSource"			vr="CS" type="1C"  vmmin="1" vmmax="1" condition="count(BulkMotionCompensationTechnique) &gt; 0 and BulkMotionCompensationTechnique/value[@number=1]!='NONE' and (ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED')" mbpo="T">
			<verify test="BulkMotionCompensationTechnique/value[@number=1]='NONE'" status="Error" message="may not be present when BulkMotionCompensationTechnique is NONE"/>
			<definedtermslist valueselector="1">
				<definedterm value="JOINT"/>
				<definedterm value="NAVIGATOR"/>
				<definedterm value="MR_PHASE"/>
			</definedtermslist>
		</attribute>
	</definemodule>
	
	<definemodule name="SupplementalPaletteColorLookupTableModule">
		<attribute name="RedPaletteColorLookupTableDescriptor"		vr="XS" type="1" vmmin="3" vmmax="3"/>
		<attribute name="GreenPaletteColorLookupTableDescriptor"	vr="XS" type="1" vmmin="3" vmmax="3"/>
		<attribute name="BluePaletteColorLookupTableDescriptor"		vr="XS" type="1" vmmin="3" vmmax="3"/>
		<attribute name="RedPaletteColorLookupTableData"		vr="OW" type="1" vmmin="1" vmmax="1"/>
		<attribute name="GreenPaletteColorLookupTableData"		vr="OW" type="1" vmmin="1" vmmax="1"/>
		<attribute name="BluePaletteColorLookupTableData"		vr="OW" type="1" vmmin="1" vmmax="1"/>
	</definemodule>
	
	<definemodule name="AcquisitionContextModule">
		<sequence  name="AcquisitionContextSequence"			vr="SQ" type="2"  vmmin="0" vmmax="n">
			<sequence  name="ConceptNameCodeSequence"		vr="SQ" type="1"  vmmin="1" vmmax="1">
				<includemacro name="CodeSequenceMacro"/>
			</sequence>
			<attribute name="ReferencedFrameNumbers"		vr="US" type="1C" vmmin="1" vmmax="n" nocondition="">
				<verify test="count(DicomObject/NumberOfFrames) = 0 or DicomObject/NumberOfFrames/value[@number=1] = 0" status="Error" message="May not be present unless this is a Multi-frame SOP Instance"/>
			</attribute>
			<attribute name="NumericValue"				vr="DS" type="1C" vmmin="1" vmmax="n" condition="count(Date) = 0 and count(Time) = 0 and count(PersonName) = 0 and count(TextValue) = 0 and count(ConceptCodeSequence) = 0" mbpo="F"/>
			<sequence  name="MeasurementUnitsCodeSequence"		vr="SQ" type="1C" vmmin="1" vmmax="1" condition="count(NumericValue) &gt; 0" mbpo="F">
				<includemacro name="CodeSequenceMacro"/>
			</sequence>
			<attribute name="Date"					vr="DA" type="1C" vmmin="1" vmmax="1" condition="count(NumericValue) = 0 and count(Time) = 0 and count(PersonName) = 0 and count(TextValue) = 0 and count(ConceptCodeSequence) = 0" mbpo="F"/>
			<attribute name="Time"					vr="TM" type="1C" vmmin="1" vmmax="1" condition="count(NumericValue) = 0 and count(Date) = 0 and count(PersonName) = 0 and count(TextValue) = 0 and count(ConceptCodeSequence) = 0" mbpo="F"/>
			<attribute name="PersonName"				vr="PN" type="1C" vmmin="1" vmmax="1" condition="count(NumericValue) = 0 and count(Date) = 0 and count(Time) = 0 and count(TextValue) = 0 and count(ConceptCodeSequence) = 0" mbpo="F"/>
			<attribute name="TextValue"				vr="UT" type="1C" vmmin="1" vmmax="1" condition="count(NumericValue) = 0 and count(Date) = 0 and count(Time) = 0 and count(PersonName) = 0 and count(ConceptCodeSequence) = 0" mbpo="F"/>
			<sequence  name="ConceptCodeSequence"			vr="SQ" type="1C" vmmin="1" vmmax="1" condition="count(NumericValue) = 0 and count(Date) = 0 and count(Time) = 0 and count(PersonName) = 0 and count(TextValue) = 0" mbpo="F">
				<includemacro name="CodeSequenceMacro"/>
			</sequence>
			<attribute name="AcquisitionContextDescription"		vr="ST" type="3" vmmin="1" vmmax="1"/>
		</sequence>
	</definemodule>
	
	<definemodule name="EnhancedMRImageModule">
		<includemacro name="MRImageAndMRSpectroscopyInstanceMacro"/>
		<attribute name="ImageType"					vr="CS" type="1" vmmin="4" vmmax="4">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="ORIGINAL"/>
				<enumeratedvalue value="DERIVED"/>
				<enumeratedvalue value="MIXED"/>
			</enumeratedvalueslist>
			<enumeratedvalueslist valueselector="2">
				<enumeratedvalue value="PRIMARY"/>
			</enumeratedvalueslist>
			<definedtermslist valueselector="3">
				<definedterm value="ANGIO"/>
				<definedterm value="CARDIAC"/>
				<definedterm value="CARDIAC_GATED"/>
				<definedterm value="CARDRESP_GATED"/>
				<definedterm value="DYNAMIC"/>
				<definedterm value="FLUOROSCOPY"/>
				<definedterm value="LOCALIZER"/>
				<definedterm value="MOTION"/>
				<definedterm value="PERFUSION"/>
				<definedterm value="PRE_CONTRAST"/>
				<definedterm value="POST_CONTRAST"/>
				<definedterm value="RESP_GATED"/>
				<definedterm value="REST"/>
				<definedterm value="STATIC"/>
				<definedterm value="STRESS"/>
				<definedterm value="VOLUME"/>
				<definedterm value="NON_PARALLEL"/>
				<definedterm value="PARALLEL"/>
				<definedterm value="WHOLE_BODY"/>
				<definedterm value="ANGIO_TIME"/>
				<definedterm value="ASL"/>
				<definedterm value="CINE"/>
				<definedterm value="DIFFUSION"/>
				<definedterm value="DIXON"/>
				<definedterm value="FLOW_ENCODED"/>
				<definedterm value="FLUID_ATTENUATED"/>
				<definedterm value="FMRI"/>
				<definedterm value="MAX_IP"/>
				<definedterm value="MIN_IP"/>
				<definedterm value="M_MODE"/>
				<definedterm value="METABOLITE_MAP"/>
				<definedterm value="MULTIECHO"/>
				<definedterm value="PROTON_DENSITY"/>
				<definedterm value="REALTIME"/>
				<definedterm value="STIR"/>
				<definedterm value="TAGGING"/>
				<definedterm value="TEMPERATURE"/>
				<definedterm value="T1"/>
				<definedterm value="T2"/>
				<definedterm value="T2_STAR"/>
				<definedterm value="TOF"/>
				<definedterm value="VELOCITY"/>
			</definedtermslist>
			<definedtermslist valueselector="4">
				<definedterm value="ADDITION"/>
				<definedterm value="DIVISION"/>
				<definedterm value="MASKED"/>
				<definedterm value="MAXIMUM"/>
				<definedterm value="MEAN"/>
				<definedterm value="MINIMUM"/>
				<definedterm value="MTT"/>
				<definedterm value="MULTIPLICATION"/>
				<definedterm value="RCBF"/>
				<definedterm value="RCBV"/>
				<definedterm value="RESAMPLED"/>
				<definedterm value="STD_DEVIATION"/>
				<definedterm value="SUBTRACTION"/>
				<definedterm value="T_TEST"/>
				<definedterm value="TTP"/>
				<definedterm value="Z_SCORE"/>
				<definedterm value="NONE"/>
				<definedterm value="ADC"/>
				<definedterm value="DIFFUSION"/>
				<definedterm value="DIFFUSION_ANISO"/>
				<definedterm value="DIFFUSION_ATTNTD"/>
				<definedterm value="DIFFUSION_ISO"/>
				<definedterm value="FAT"/>
				<definedterm value="FAT_FRACTION"/>
				<definedterm value="FIELD_MAP"/>
				<definedterm value="IN_PHASE"/>
				<definedterm value="METABOLITE_MAP"/>
				<definedterm value="NEI"/>
				<definedterm value="OUT_OF_PHASE"/>
				<definedterm value="PERFUSION_ASL"/>
				<definedterm value="R_COEFFICIENT"/>
				<definedterm value="R2_MAP"/>
				<definedterm value="R2_STAR_MAP"/>
				<definedterm value="RHO"/>
				<definedterm value="SCM"/>
				<definedterm value="SNR_MAP"/>
				<definedterm value="T1_MAP"/>
				<definedterm value="T2_STAR_MAP"/>
				<definedterm value="T2_MAP"/>
				<definedterm value="TCS"/>
				<definedterm value="TEMPERATURE"/>
				<definedterm value="VELOCITY"/>
				<definedterm value="WATER"/>
				<definedterm value="WATER_FRACTION"/>
				<definedterm value="MIXED"/>
			</definedtermslist>
			<verify test="ImageType/value[@number=1]='ORIGINAL' and ImageType/value[@number=4]!='NONE'" status="Error" message="value 4 must be NONE when value 1 is ORIGINAL"/>
			<verify test="ImageType/value[@number=1]='DERIVED' and ImageType/value[@number=4]='NONE'" status="Error" message="value 4 must not be NONE when value 1 is DERIVED"/>
			<verify test="ImageType/value[@number=1]='MIXED' and ImageType/value[@number=4]!='MIXED'" status="Error" message="value 4 must be MIXED when value 1 is MIXED"/>
		</attribute>
		<includemacro name="CommonCTMRImageDescriptionAtImageLevelMacro"/>
		<includemacro name="MRImageDescriptionAtImageLevelMacro"/>
		<attribute name="SamplesPerPixel"				vr="US" type="1" vmmin="1" vmmax="1">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="1"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="PhotometricInterpretation"			vr="CS" type="1" vmmin="1" vmmax="1">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="MONOCHROME2"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="LargestMonochromePixelValue"			vr="US" type="3" vmmin="1" vmmax="1">
			<verify test="count(LargestMonochromePixelValue) != 0" status="Warning" message="LargestMonochromePixelValue is retired and should not be used"/>
			<verify test="LargestMonochromePixelValue/value + 1 != RedPaletteColorLookupTableDescriptor/value[@number=2]" status="Error" message="LargestMonochromePixelValue should be one less than RedPaletteColorLookupTableDescriptor value 2"/>
			<verify test="LargestMonochromePixelValue/value + 1 != GreenPaletteColorLookupTableDescriptor/value[@number=2]" status="Error" message="LargestMonochromePixelValue should be one less than GreenPaletteColorLookupTableDescriptor value 2"/>
			<verify test="LargestMonochromePixelValue/value + 1 != BluePaletteColorLookupTableDescriptor/value[@number=2]" status="Error" message="LargestMonochromePixelValue should be one less than BluePaletteColorLookupTableDescriptor value 2"/>
		</attribute>
		<attribute name="BitsAllocated" vr="US" type="1" vmmin="1" vmmax="1">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="8"/>
				<enumeratedvalue value="16"/>
			</enumeratedvalueslist>
			<verify test="BitsStored/value = 8 and BitsAllocated/value != 8" status="Error" message="Must be 8 when BitsStored is 8"/>
			<verify test="(BitsStored/value = 12 or BitsStored/value = 16) and BitsAllocated/value != 16" status="Error" message="Must be 16 when BitsStored is 12 or 16"/>
		</attribute>
		<attribute name="BitsStored"					vr="US" type="1" vmmin="1" vmmax="1">
			<enumeratedvalueslist valueselector="1"><enumeratedvalue value="8"/><enumeratedvalue value="12"/><enumeratedvalue value="16"/></enumeratedvalueslist>
		</attribute>
		<attribute name="HighBit"					vr="US" type="1" vmmin="1" vmmax="1">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="7"/>
				<enumeratedvalue value="11"/>
				<enumeratedvalue value="15"/>
			</enumeratedvalueslist>
			<verify test="BitsStored/value != (HighBit/value + 1)" status="Error" message="Must be one less than BitsStored"/>
		</attribute>
		<attribute name="SpacingBetweenSlices"				vr="DS" type="3" vmmin="1" vmmax="1"/>
		<attribute name="BurnedInAnnotation"				vr="CS" type="1C" vmmin="1" vmmax="1" condition="/DicomObject/SOPClassUID != '1.2.840.10008.5.1.4.1.1.4.4'" mbpo="T">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="NO"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="RecognizableVisualFeatures"		vr="CS" type="3" vmmin="1" vmmax="1">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="YES"/>
				<enumeratedvalue value="NO"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="LossyImageCompression"				vr="CS" type="1C" vmmin="1" vmmax="1" condition="/DicomObject/SOPClassUID != '1.2.840.10008.5.1.4.1.1.4.4'" mbpo="T">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="00"/>
				<enumeratedvalue value="01"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="LossyImageCompressionRatio"			vr="DS" type="1C" vmmin="1" vmmax="n" condition="LossyImageCompression/value='01'"/>
		<attribute name="LossyImageCompressionMethod"			vr="CS" type="1C" vmmin="1" vmmax="n" condition="LossyImageCompression/value='01'"/>
		<attribute name="PresentationLUTShape"					vr="CS" type="1" vmmin="1" vmmax="1">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="IDENTITY"/>
			</enumeratedvalueslist>
		</attribute>
		<includemacro name="OptionalViewAndSliceProgressionDirectionMacro"/>
	</definemodule>
	
	<definemodule name="MRPulseSequenceModule">
		<attribute name="PulseSequenceName"				vr="SH" type="1C" vmmin="1" vmmax="1" condition="ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED'" mbpo="T"/>
		<attribute name="MRAcquisitionType"				vr="CS" type="1C" vmmin="1" vmmax="1" condition="ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED'" mbpo="T">
			<definedtermslist valueselector="1">
				<definedterm value="1D"/>
				<definedterm value="2D"/>
				<definedterm value="3D"/>
			</definedtermslist>
		</attribute>
		<attribute name="EchoPulseSequence"				vr="CS" type="1C" vmmin="1" vmmax="1" condition="ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED'" mbpo="T">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="SPIN"/>
				<enumeratedvalue value="GRADIENT"/>
				<enumeratedvalue value="BOTH"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="MultipleSpinEcho"				vr="CS" type="1C" vmmin="1" vmmax="1" condition="(ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED')
														     and (EchoPulseSequence/value[@number=1]='SPIN' or EchoPulseSequence/value[@number=1]='BOTH')" mbpo="T">
			<verify test="EchoPulseSequence/value[@number=1]!='SPIN' and EchoPulseSequence/value[@number=1]!='BOTH'" status="Error" message="Can only be present when EchoPulseSequence is SPIN or BOTH"/>
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="YES"/>
				<enumeratedvalue value="NO"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="MultiPlanarExcitation"				vr="CS" type="1C" vmmin="1" vmmax="1" condition="ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED'" mbpo="T">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="YES"/>
				<enumeratedvalue value="NO"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="PhaseContrast"					vr="CS" type="1C" vmmin="1" vmmax="1" condition="ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED'" mbpo="T">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="YES"/>
				<enumeratedvalue value="NO"/>
			</enumeratedvalueslist>
		</attribute>
		<sequence  name="VelocityEncodingAcquisitionSequence"	vr="SQ" type="1C" vmmin="1" vmmax="n" condition="PhaseContrast/value[@number=1]='YES'" mbpo="F">
			<attribute name="VelocityEncodingDirection"			vr="FD" type="1"  vmmin="3" vmmax="3"/>
		</sequence>
		<attribute name="TimeOfFlightContrast"				vr="CS" type="1C" vmmin="1" vmmax="1" condition="ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED'" mbpo="T">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="YES"/>
				<enumeratedvalue value="NO"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="ArterialSpinLabelingContrast"		vr="CS" type="1C" vmmin="1" vmmax="1" condition="ImageType/value[@number=3]='ASL'" mbpo="T">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="CONTINUOUS "/>
				<enumeratedvalue value="PSEUDOCONTINUOUS "/>
				<enumeratedvalue value="PULSED "/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="SteadyStatePulseSequence"			vr="CS" type="1C" vmmin="1" vmmax="1" condition="ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED'" mbpo="T">
			<definedtermslist valueselector="1">
				<definedterm value="FREE_PRECESSION"/>
				<definedterm value="TRANSVERSE"/>
				<definedterm value="TIME_REVERSED"/>
				<definedterm value="LONGITUDINAL"/>
				<definedterm value="NONE"/>
			</definedtermslist>
		</attribute>
		<attribute name="EchoPlanarPulseSequence"			vr="CS" type="1C" vmmin="1" vmmax="1" condition="ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED'" mbpo="T">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="YES"/>
				<enumeratedvalue value="NO"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="SaturationRecovery"				vr="CS" type="1C" vmmin="1" vmmax="1" condition="ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED'" mbpo="T">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="YES"/>
				<enumeratedvalue value="NO"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="SpectrallySelectedSuppression"			vr="CS" type="1C" vmmin="1" vmmax="1" condition="ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED'" mbpo="T">
			<definedtermslist valueselector="1">
				<definedterm value="FAT"/>
				<definedterm value="WATER"/>
				<definedterm value="FAT_AND_WATER"/>
				<definedterm value="SILICON_GEL"/>
				<definedterm value="NONE"/>
			</definedtermslist>
		</attribute>
		<attribute name="OversamplingPhase"				vr="CS" type="1C" vmmin="1" vmmax="1" condition="ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED'" mbpo="T">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="2D"/>
				<enumeratedvalue value="3D"/>
				<enumeratedvalue value="2D_3D"/>
				<enumeratedvalue value="NONE"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="GeometryOfKSpaceTraversal"			vr="CS" type="1C" vmmin="1" vmmax="1" condition="ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED'" mbpo="T">
			<definedtermslist valueselector="1">
				<definedterm value="RECTILINEAR"/>
				<definedterm value="RADIAL"/>
				<definedterm value="SPIRAL"/>
			</definedtermslist>
		</attribute>
		<attribute name="RectilinearPhaseEncodeReordering"		vr="CS" type="1C" vmmin="1" vmmax="1" condition="(ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED')
														     and  GeometryOfKSpaceTraversal/value[@number=1]='RECTILINEAR'" mbpo="T">
			<verify test="GeometryOfKSpaceTraversal/value[@number=1]!='RECTILINEAR'" status="Error" message="Can only be present when GeometryOfKSpaceTraversal is RECTILINEAR"/>
			<definedtermslist valueselector="1">
				<definedterm value="LINEAR"/>
				<definedterm value="CENTRIC"/>
				<definedterm value="SEGMENTED"/>
				<definedterm value="REVERSE_LINEAR"/>
				<definedterm value="REVERSE_CENTRIC"/>
			</definedtermslist>
		</attribute>
		<attribute name="SegmentedKSpaceTraversal"			vr="CS" type="1C" vmmin="1" vmmax="1" condition="ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED'" mbpo="T">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="SINGLE"/>
				<enumeratedvalue value="PARTIAL"/>
				<enumeratedvalue value="FULL"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="CoverageOfKSpace"				vr="CS" type="1C" vmmin="1" vmmax="1" condition="(ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED')
															     and  MRAcquisitionType/value[@number=1]='3D'" mbpo="T">
			<verify test="MRAcquisitionType/value[@number=1]!='3D'" status="Error" message="Can only be present when MRAcquisitionType is 3D"/>
			<definedtermslist valueselector="1">
				<definedterm value="FULL"/>
				<definedterm value="CYLINDRICAL"/>
				<definedterm value="ELLIPSOIDAL"/>
				<definedterm value="WEIGHTED"/>
			</definedtermslist>
		</attribute>
		<attribute name="NumberOfKSpaceTrajectories"			vr="US" type="1C" vmmin="1" vmmax="1" condition="ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED'" mbpo="T"/>
	</definemodule>
	
	<definemodule name="SoftcopyPresentationLUTModule">
		<sequence name="PresentationLUTSequence"			vr="SQ" type="1C" vmmin="1" vmmax="1" condition="count(PresentationLUTShape) = 0" mbpo="F">
			<attribute name="LUTDescriptor"				vr="US" type="1" vmmin="3" vmmax="3"/>
			<attribute name="LUTExplanation"			vr="LO" type="3" vmmin="1" vmmax="1"/>
			<attribute name="LUTData"				vr="US" type="1" vmmin="1" vmmax="n"/>
		</sequence>
		<attribute name="PresentationLUTShape"				vr="CS" type="1C" vmmin="1" vmmax="1" condition="count(PresentationLUTSequence) = 0" mbpo="F">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="IDENTITY"/>
				<enumeratedvalue value="INVERSE"/>
			</enumeratedvalueslist>
		</attribute>
	</definemodule>
	
	<definemodule name="SOPCommonModule">
		<attribute name="SOPClassUID"					vr="UI" type="1" vmmin="1" vmmax="1"/>
		<attribute name="SOPInstanceUID"				vr="UI" type="1" vmmin="1" vmmax="1"/>
		<attribute name="SpecificCharacterSet"			vr="CS" type="3" vmmin="1" vmmax="n">	<!-- is really 1C, but if use nocondition, bitches about empty value 1 when value 2 present -->
			<definedtermslist valueselector="1">
				<definedterm value=""/>
				<definedterm value="ISO_IR 100"/>
				<definedterm value="ISO_IR 101"/>
				<definedterm value="ISO_IR 109"/>
				<definedterm value="ISO_IR 110"/>
				<definedterm value="ISO_IR 144"/>
				<definedterm value="ISO_IR 127"/>
				<definedterm value="ISO_IR 126"/>
				<definedterm value="ISO_IR 138"/>
				<definedterm value="ISO_IR 148"/>
				<definedterm value="ISO_IR 13"/>
				<definedterm value="ISO_IR 166"/>
				<definedterm value="ISO 2022 IR 6"/>
				<definedterm value="ISO 2022 IR 100"/>
				<definedterm value="ISO 2022 IR 101"/>
				<definedterm value="ISO 2022 IR 109"/>
				<definedterm value="ISO 2022 IR 110"/>
				<definedterm value="ISO 2022 IR 144"/>
				<definedterm value="ISO 2022 IR 127"/>
				<definedterm value="ISO 2022 IR 126"/>
				<definedterm value="ISO 2022 IR 138"/>
				<definedterm value="ISO 2022 IR 148"/>
				<definedterm value="ISO 2022 IR 13"/>
				<definedterm value="ISO 2022 IR 166"/>
			</definedtermslist>
			<definedtermslist valueselector="2">
				<definedterm value=""/>
				<definedterm value="ISO 2022 IR 87"/>
				<definedterm value="ISO 2022 IR 159"/>
				<definedterm value="ISO 2022 IR 149"/>
				<definedterm value="ISO 2022 IR 58"/>
			</definedtermslist>
			<definedtermslist valueselector="3">
				<definedterm value=""/>
				<definedterm value="ISO 2022 IR 87"/>
				<definedterm value="ISO 2022 IR 159"/>
				<definedterm value="ISO 2022 IR 149"/>
				<definedterm value="ISO 2022 IR 58"/>
			</definedtermslist>
		</attribute>
		<attribute name="InstanceCreationDate"				vr="DA" type="3"  vmmin="1" vmmax="1"/>
		<attribute name="InstanceCreationTime"				vr="TM" type="3"  vmmin="1" vmmax="1"/>
		<attribute name="InstanceCreatorUID"				vr="UI" type="3"  vmmin="1" vmmax="1"/>
		<sequence name="CodingSchemeIdentificationSequence"		vr="SQ" type="3"  vmmin="1" vmmax="n">
			<attribute name="CodingSchemeDesignator"		vr="SH" type="1"  vmmin="1" vmmax="1"/>
			<attribute name="CodingSchemeRegistry"			vr="LO" type="1C" vmmin="1" vmmax="1" nocondition="">
				<definedtermslist valueselector="1">
					<definedterm value="HL7"/>
				</definedtermslist>
			</attribute>
			<attribute name="CodingSchemeUID"			vr="UI" type="1C" vmmin="1" vmmax="1" nocondition=""/>
			<attribute name="CodingSchemeExternalID"		vr="ST" type="1C" vmmin="1" vmmax="1" nocondition="">
				<verify test="count(CodingSchemeUID) &gt; 0" status="Error" message="May only be present when CodingSchemeUID is not"/>
			</attribute>
			<attribute name="CodingSchemeName"			vr="ST" type="3" vmmin="1" vmmax="1"/>
			<attribute name="CodingSchemeVersion"			vr="SH" type="3" vmmin="1" vmmax="1"/>
			<attribute name="ResponsibleOrganization"		vr="ST" type="3" vmmin="1" vmmax="1"/>
		</sequence>
		<attribute name="TimezoneOffsetFromUTC"				vr="SH" type="3" vmmin="1" vmmax="1"/>
		<sequence name="ContributingEquipmentSequence"			vr="SQ" type="3"  vmmin="1" vmmax="n">
			<sequence  name="PurposeOfReferenceCodeSequence"	vr="SQ" type="1" vmmin="1" vmmax="1">
				<includemacro name="CodeSequenceMacro"/>
			</sequence>
			<attribute name="Manufacturer"				vr="LO" type="3"  vmmin="1" vmmax="1"/>
			<attribute name="InstitutionName"			vr="LO" type="3"  vmmin="1" vmmax="1"/>
			<attribute name="InstitutionAddress"			vr="ST" type="3"  vmmin="1" vmmax="1"/>
			<attribute name="StationName"				vr="SH" type="3"  vmmin="1" vmmax="1"/>
			<attribute name="InstitutionalDepartmentName"		vr="LO" type="3"  vmmin="1" vmmax="1"/>
			<attribute name="ManufacturerModelName"			vr="LO" type="3"  vmmin="1" vmmax="1"/>
			<attribute name="DeviceSerialNumber"			vr="LO" type="3"  vmmin="1" vmmax="1"/>
			<attribute name="SoftwareVersions"			vr="LO" type="3"  vmmin="1" vmmax="n"/>
			<attribute name="SpatialResolution"			vr="DS" type="3"  vmmin="1" vmmax="1"/>
			<attribute name="DateOfLastCalibration"			vr="DA" type="3"  vmmin="1" vmmax="1"/>
			<attribute name="DateOfLastCalibration"			vr="DA" type="3"  vmmin="1" vmmax="1"/>
			<attribute name="ContributionDateTime"			vr="DT" type="3" vmmin="1" vmmax="1"/>
			<attribute name="ContributionDescription"		vr="ST" type="3" vmmin="1" vmmax="1"/>
		</sequence>
		<attribute name="InstanceNumber"				vr="IS" type="3" vmmin="1" vmmax="1"/>
		<attribute name="SOPInstanceStatus"				vr="CS" type="3" vmmin="1" vmmax="1">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="NS"/>
				<enumeratedvalue value="OR"/>
				<enumeratedvalue value="AO"/>
				<enumeratedvalue value="AC"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="SOPAuthorizationDateTime"			vr="DT" type="3" vmmin="1" vmmax="1"/>
		<attribute name="SOPAuthorizationComment"			vr="LT" type="3" vmmin="1" vmmax="1"/>
		<attribute name="AuthorizationEquipmentCertificationNumber"	vr="LO" type="3" vmmin="1" vmmax="1"/>
		<includemacro name="DigitalSignaturesMacro"/>
		<sequence name="EncryptedAttributesSequence"			vr="SQ" type="1C"  vmmin="1" vmmax="n" nocondition="">
			<attribute name="EncryptedContentTransferSyntaxUID"	vr="UI" type="1" vmmin="1" vmmax="1"/>
			<attribute name="EncryptedContent"			vr="OB" type="1" vmmin="1" vmmax="1"/>
		</sequence>
		<attribute name="LongitudinalTemporalInformationModified"		vr="CS" type="3" vmmin="1" vmmax="1">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="UNMODIFIED"/>
				<enumeratedvalue value="MODIFIED"/>
				<enumeratedvalue value="REMOVED"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="InstanceOriginStatus"		vr="CS" type="3" vmmin="1" vmmax="1">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="LOCAL"/>
				<enumeratedvalue value="IMPORTED"/>
			</enumeratedvalueslist>
		</attribute>
	</definemodule>

	<definemacro name="DigitalSignaturesMacro">
		<sequence name="MACParametersSequence"				vr="SQ" type="3"  vmmin="1" vmmax="n">
			<attribute name="MACIDNumber"				vr="US" type="1" vmmin="1" vmmax="1"/>
			<attribute name="MACCalculationTransferSyntaxUID"	vr="UI" type="1" vmmin="1" vmmax="1"/>
			<attribute name="MACAlgorithm"				vr="CS" type="1" vmmin="1" vmmax="1">
				<definedtermslist valueselector="1">
					<definedterm value="RIPEMD160"/>
					<definedterm value="MD5"/>
					<definedterm value="SHA"/>
				</definedtermslist>
			</attribute>
			<attribute name="DataElementsSigned"			vr="AT" type="1" vmmin="1" vmmax="n"/>
		</sequence>
		<sequence name="MACParametersSequence"				vr="SQ" type="3"  vmmin="1" vmmax="n">
			<attribute name="MACIDNumber"				vr="US" type="1"  vmmin="1" vmmax="1"/>
			<attribute name="DigitalSignatureUID"			vr="UI" type="1"  vmmin="1" vmmax="1"/>
			<attribute name="DigitalSignatureDateTime"		vr="DT" type="1"  vmmin="1" vmmax="1"/>
			<attribute name="CertificateType"			vr="CS" type="1"  vmmin="1" vmmax="1"/>
			<attribute name="CertificateOfSigner"			vr="OB" type="1"  vmmin="1" vmmax="1"/>
			<attribute name="Signature"				vr="OB" type="1"  vmmin="1" vmmax="1"/>
			<attribute name="CertifiedTimestampType"		vr="CS" type="1C" vmmin="1" vmmax="1" condition="count(CertifiedTimestamp) &gt; 0">
				<definedtermslist valueselector="1">
					<definedterm value="CMS_TSP"/>
				</definedtermslist>
			</attribute>
			<attribute name="CertifiedTimestamp"			vr="OB" type="3" vmmin="1" vmmax="1"/>
		</sequence>
	</definemacro>

	<definemacro name="MRImageAndMRSpectroscopyInstanceMacro">
		<attribute name="AcquisitionNumber"				vr="IS" type="3" vmmin="1" vmmax="1"/>
		<attribute name="AcquisitionDateTime"				vr="DT" type="1C" vmmin="1" vmmax="1" condition="(ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED') and /DicomObject/SOPClassUID != '1.2.840.10008.5.1.4.1.1.4.4'" mbpo="T"/>
		<attribute name="AcquisitionDuration"				vr="FD" type="1C" vmmin="1" vmmax="1" condition="(ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED') and /DicomObject/SOPClassUID != '1.2.840.10008.5.1.4.1.1.4.4'" mbpo="T">
			<verify test="number(AcquisitionDuration/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
		</attribute>
		<sequence name="ReferencedRawDataSequence"			vr="SQ" type="3" vmmin="" vmmax="">
			<includemacro name="HierarchicalSOPInstanceReferenceMacro"/>
		</sequence>
		<sequence name="ReferencedWaveformSequence"			vr="SQ" type="3" vmmin="" vmmax="">
			<includemacro name="HierarchicalSOPInstanceReferenceMacro"/>
		</sequence>
		<sequence name="ReferencedImageEvidenceSequence"		vr="SQ" type="1C" vmmin="" vmmax="" condition="count(//ReferencedImageSequence) &gt; 0" mbpo="F">
			<includemacro name="HierarchicalSOPInstanceReferenceMacro"/>
		</sequence>
		<sequence name="SourceImageEvidenceSequence"			vr="SQ" type="1C" vmmin="" vmmax="" condition="count(//SourceImageSequence) &gt; 0" mbpo="F">
			<includemacro name="HierarchicalSOPInstanceReferenceMacro"/>
		</sequence>
		<sequence name="ReferencedPresentationStateSequence"	vr="SQ" type="1C" vmmin="" vmmax="" nocondition="">
			<includemacro name="HierarchicalSOPInstanceReferenceMacro"/>
		</sequence>
		<attribute name="ContentQualification"				vr="CS" type="1C" vmmin="1" vmmax="1" condition="/DicomObject/SOPClassUID != '1.2.840.10008.5.1.4.1.1.4.4'" mbpo="T">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="PRODUCT"/>
				<enumeratedvalue value="RESEARCH"/>
				<enumeratedvalue value="SERVICE"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="ResonantNucleus"				vr="CS" type="1C" vmmin="1" vmmax="1" condition="(ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED') and /DicomObject/SOPClassUID != '1.2.840.10008.5.1.4.1.1.4.4'" mbpo="T">
			<definedtermslist valueselector="1">
				<definedterm value="1H"/>
				<definedterm value="3HE"/>
				<definedterm value="7LI"/>
				<definedterm value="13C"/>
				<definedterm value="19F"/>
				<definedterm value="23NA"/>
				<definedterm value="31P"/>
				<definedterm value="129XE"/>
			</definedtermslist>
		</attribute>
		<attribute name="KSpaceFiltering"				vr="CS" type="1C"  vmmin="1" vmmax="1" condition="(ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED') and /DicomObject/SOPClassUID != '1.2.840.10008.5.1.4.1.1.4.4'" mbpo="T">
			<definedtermslist valueselector="1">
				<definedterm value="COSINE"/>
				<definedterm value="COSINE_SQUARED"/>
				<definedterm value="FERMI"/>
				<definedterm value="GAUSSIAN"/>
				<definedterm value="HAMMING"/>
				<definedterm value="HANNING"/>
				<definedterm value="LORENTZIAN"/>
				<definedterm value="LRNTZ_GSS_TRNSFM"/>
				<definedterm value="RIESZ"/>
				<definedterm value="TUKEY"/>
				<definedterm value="NONE"/>
			</definedtermslist>
		</attribute>
		<attribute name="MagneticFieldStrength"				vr="DS" type="1C" vmmin="1" vmmax="1" condition="(ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED') and /DicomObject/SOPClassUID != '1.2.840.10008.5.1.4.1.1.4.4'" mbpo="T"/>
		<attribute name="ApplicableSafetyStandardAgency"	vr="CS" type="1C" vmmin="1" vmmax="1" condition="/DicomObject/SOPClassUID != '1.2.840.10008.5.1.4.1.1.4.4'" mbpo="T">
			<definedtermslist valueselector="1">
				<definedterm value="IEC"/>
				<definedterm value="FDA"/>
				<definedterm value="MHW"/>
			</definedtermslist>
		</attribute>
		<attribute name="ApplicableSafetyStandardDescription"		vr="LO" type="3" vmmin="1" vmmax="1C" condition="/DicomObject/SOPClassUID != '1.2.840.10008.5.1.4.1.1.4.4'" mbpo="T"/>
		<attribute name="ImageComments"					vr="LT" type="3" vmmin="1" vmmax="1"/>
	</definemacro>

	<definemacro name="CommonCTMRImageDescriptionAtImageLevelMacro">
		<attribute name="PixelPresentation"				vr="CS" type="1" vmmin="1" vmmax="1">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="COLOR"/>
				<enumeratedvalue value="MONOCHROME"/>
				<enumeratedvalue value="MIXED"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="VolumetricProperties"				vr="CS" type="1" vmmin="1" vmmax="1">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="VOLUME"/>
				<enumeratedvalue value="SAMPLED"/>
				<enumeratedvalue value="DISTORTED"/>
				<enumeratedvalue value="MIXED"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="VolumeBasedCalculationTechnique"		vr="CS" type="1" vmmin="1" vmmax="1">
			<definedtermslist valueselector="1">
				<definedterm value="MAX_IP"/>
				<definedterm value="MIN_IP"/>
				<definedterm value="VOLUME_RENDER"/>
				<definedterm value="SURFACE_RENDER"/>
				<definedterm value="MPR"/>
				<definedterm value="CURVED_MPR"/>
				<definedterm value="NONE"/>
				<definedterm value="MIXED"/>
			</definedtermslist>
			<verify test="ImageType/value[@number=1]='ORIGINAL' and VolumeBasedCalculationTechnique/value[@number=1]!='NONE'" status="Error" message="must be NONE when ImageType value 1 is ORIGINAL"/>
		</attribute>
	</definemacro>

	<definemacro name="MRImageDescriptionAtImageLevelMacro">
		<attribute name="ComplexImageComponent"				vr="CS" type="1C" vmmin="1" vmmax="1" condition="/DicomObject/SOPClassUID != '1.2.840.10008.5.1.4.1.1.4.4'" mbpo="T">
			<definedtermslist valueselector="1">
				<definedterm value="MAGNITUDE"/>
				<definedterm value="PHASE"/>
				<definedterm value="REAL"/>
				<definedterm value="IMAGINARY"/>
				<definedterm value="MIXED"/>
			</definedtermslist>
		</attribute>
		<attribute name="AcquisitionContrast"				vr="CS" type="1C" vmmin="1" vmmax="1" condition="/DicomObject/SOPClassUID != '1.2.840.10008.5.1.4.1.1.4.4'" mbpo="T">
			<definedtermslist valueselector="1">
				<definedterm value="DIFFUSION"/>
				<definedterm value="FLOW_ENCODED"/>
				<definedterm value="FLUID_ATTENUATED"/>
				<definedterm value="PERFUSION"/>
				<definedterm value="PROTON_DENSITY"/>
				<definedterm value="STIR"/>
				<definedterm value="TAGGING"/>
				<definedterm value="T1"/>
				<definedterm value="T2"/>
				<definedterm value="T2_STAR"/>
				<definedterm value="TOF"/>
				<definedterm value="UNKNOWN"/>
				<definedterm value="MIXED"/>
			</definedtermslist>
		</attribute>
	</definemacro>
	
	<definemacro name="CommonCTMRImageDescriptionAtFrameLevelMacro">
		<attribute name="PixelPresentation"				vr="CS" type="1" vmmin="1" vmmax="1">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="COLOR"/>
				<enumeratedvalue value="MONOCHROME"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="VolumetricProperties"				vr="CS" type="1" vmmin="1" vmmax="1">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="VOLUME"/>
				<enumeratedvalue value="SAMPLED"/>
				<enumeratedvalue value="DISTORTED"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="VolumeBasedCalculationTechnique"		vr="CS" type="1" vmmin="1" vmmax="1">
			<definedtermslist valueselector="1">
				<definedterm value="MAX_IP"/>
				<definedterm value="MIN_IP"/>
				<definedterm value="VOLUME_RENDER"/>
				<definedterm value="SURFACE_RENDER"/>
				<definedterm value="MPR"/>
				<definedterm value="CURVED_MPR"/>
				<definedterm value="NONE"/>
			</definedtermslist>
			<verify test="FrameType/value[@number=1]='ORIGINAL' and VolumeBasedCalculationTechnique/value[@number=1]!='NONE'" status="Error" message="must be NONE when FrameType value 1 is ORIGINAL"/>
		</attribute>
	</definemacro>
	
	<definemacro name="MRImageDescriptionAtFrameLevelMacro">
		<attribute name="ComplexImageComponent"				vr="CS" type="1C" vmmin="1" vmmax="1" condition="/DicomObject/SOPClassUID != '1.2.840.10008.5.1.4.1.1.4.4'" mbpo="T">
			<definedtermslist valueselector="1">
				<definedterm value="MAGNITUDE"/>
				<definedterm value="PHASE"/>
				<definedterm value="REAL"/>
				<definedterm value="IMAGINARY"/>
			</definedtermslist>
		</attribute>
		<attribute name="AcquisitionContrast"				vr="CS" type="1C" vmmin="1" vmmax="1" condition="/DicomObject/SOPClassUID != '1.2.840.10008.5.1.4.1.1.4.4'" mbpo="T">
			<definedtermslist valueselector="1">
				<definedterm value="DIFFUSION"/>
				<definedterm value="FLOW_ENCODED"/>
				<definedterm value="FLUID_ATTENUATED"/>
				<definedterm value="PERFUSION"/>
				<definedterm value="PROTON_DENSITY"/>
				<definedterm value="STIR"/>
				<definedterm value="TAGGING"/>
				<definedterm value="T1"/>
				<definedterm value="T2"/>
				<definedterm value="T2_STAR"/>
				<definedterm value="TOF"/>
				<definedterm value="UNKNOWN"/>
			</definedtermslist>
		</attribute>
	</definemacro>

	<definemacro name="MRSpectroscopyDescriptionAtImageLevelMacro">
		<attribute name="VolumetricProperties"				vr="CS" type="1" vmmin="1" vmmax="1">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="VOLUME"/>
				<enumeratedvalue value="SAMPLED"/>
				<enumeratedvalue value="DISTORTED"/>
				<enumeratedvalue value="MIXED"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="VolumeBasedCalculationTechnique"		vr="CS" type="1" vmmin="1" vmmax="1">
			<definedtermslist valueselector="1">
				<definedterm value="MAX_IP"/>
				<definedterm value="MIN_IP"/>
				<definedterm value="NONE"/>
				<definedterm value="MIXED"/>
			</definedtermslist>
		</attribute>
		<attribute name="ComplexImageComponent"				vr="CS" type="1" vmmin="1" vmmax="1">
			<definedtermslist valueselector="1">
				<definedterm value="MAGNITUDE"/>
				<definedterm value="PHASE"/>
				<definedterm value="REAL"/>
				<definedterm value="IMAGINARY"/>
				<definedterm value="COMPLEX"/>
				<definedterm value="MIXED"/>
			</definedtermslist>
		</attribute>
		<attribute name="AcquisitionContrast"				vr="CS" type="1" vmmin="1" vmmax="1">
			<definedtermslist valueselector="1">
				<definedterm value="PROTON_DENSITY"/>
				<definedterm value="T1"/>
				<definedterm value="T2"/>
				<definedterm value="UNKNOWN"/>
				<definedterm value="MIXED"/>
			</definedtermslist>
		</attribute>
	</definemacro>
	
	<definemacro name="MRSpectroscopyDescriptionAtFrameLevelMacro">
		<attribute name="VolumetricProperties"				vr="CS" type="1" vmmin="1" vmmax="1">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="VOLUME"/>
				<enumeratedvalue value="SAMPLED"/>
				<enumeratedvalue value="DISTORTED"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="VolumeBasedCalculationTechnique"		vr="CS" type="1" vmmin="1" vmmax="1">
			<definedtermslist valueselector="1">
				<definedterm value="MAX_IP"/>
				<definedterm value="MIN_IP"/>
				<definedterm value="NONE"/>
			</definedtermslist>
		</attribute>
		<attribute name="ComplexImageComponent"				vr="CS" type="1" vmmin="1" vmmax="1">
			<definedtermslist valueselector="1">
				<definedterm value="MAGNITUDE"/>
				<definedterm value="PHASE"/>
				<definedterm value="REAL"/>
				<definedterm value="IMAGINARY"/>
				<definedterm value="COMPLEX"/>
			</definedtermslist>
		</attribute>
		<attribute name="AcquisitionContrast"				vr="CS" type="1" vmmin="1" vmmax="1">
			<definedtermslist valueselector="1">
				<definedterm value="PROTON_DENSITY"/>
				<definedterm value="T1"/>
				<definedterm value="T2"/>
				<definedterm value="UNKNOWN"/>
			</definedtermslist>
		</attribute>
	</definemacro>

	<definemacro name="ImageSOPInstanceReferenceMacro">
		<includemacro name="SOPInstanceReferenceMacro"/>
		<attribute name="ReferencedFrameNumber"				vr="IS" type="1C" vmmin="1" vmmax="1" nocondition="">
			<verify test="count(ReferencedSegmentNumber) &gt; 0" status="Error" message="ReferencedFrameNumber may not be present when ReferencedSegmentNumber is present"/>
		</attribute>
		<attribute name="ReferencedSegmentNumber"			vr="US" type="1C" vmmin="1" vmmax="1" nocondition="">
			<verify test="count(ReferencedSegmentNumber) &gt; 0" status="Error" message="ReferencedSegmentNumber may not be present when ReferencedFrameNumber is present"/>
		</attribute>
	</definemacro>

	<definemacro name="SOPInstanceReferenceMacro">
		<attribute name="ReferencedSOPClassUID"		vr="UI" type="1" vmmin="1" vmmax="1"/>
		<attribute name="ReferencedSOPInstanceUID"	vr="UI" type="1" vmmin="1" vmmax="1"/>
	</definemacro>

	<definemacro name="HierarchicalSOPInstanceReferenceMacro">
		<attribute name="StudyInstanceUID"				vr="UI" type="1" vmmin="1" vmmax="1"/>
		<sequence name="ReferencedSeriesSequence"		vr="SQ" type="1" vmmin="1" vmmax="n">
			<includemacro name="HierarchicalSeriesReferenceMacro"/>
		</sequence>
	</definemacro>

	<definemacro name="HierarchicalSeriesReferenceMacro">
		<attribute name="SeriesInstanceUID"							vr="UI" type="1" vmmin="1" vmmax="1"/>
		<attribute name="RetrieveAETitle"							vr="AE" type="3" vmmin="1" vmmax="1"/>
		<attribute name="RetrieveLocationUID"						vr="UI" type="3" vmmin="1" vmmax="1"/>
		<attribute name="StorageMediaFileSetID"						vr="SH" type="3" vmmin="1" vmmax="1"/>
		<attribute name="StorageMediaFileSetUID"					vr="UI" type="3" vmmin="1" vmmax="1"/>
		<sequence name="ReferencedSOPSequence"						vr="SQ" type="1" vmmin="" vmmax="">
			<includemacro name="SOPInstanceReferenceMacro"/>
			<sequence name="PurposeOfReferenceCodeSequence"			vr="SQ" type="3" vmmin="1" vmmax="n">
				<includemacro name="CodeSequenceMacro"/>
			</sequence>
			<sequence name="ReferencedDigitalSignaturesSequence"		vr="SQ" type="3" vmmin="1" vmmax="n">
				<attribute name="DigitalSignatureUID"					vr="UI" type="1" vmmin="1" vmmax="1"/>
				<attribute name="Signature"								vr="OB" type="1" vmmin="1" vmmax="1"/>
				<sequence name="ReferencedSOPInstanceMACSequence"		vr="SQ" type="3" vmmin="1" vmmax="1">
					<attribute name="MACCalculationTransferSyntaxUID"	vr="UI" type="1" vmmin="1" vmmax="1"/>
					<attribute name="MACAlgorithm"						vr="CS" type="1" vmmin="1" vmmax="1">
						<definedtermslist valueselector="1">
							<definedterm value="RIPEMD160"/>
							<definedterm value="MD5"/>
							<definedterm value="SHA1"/>
							<definedterm value="SHA256"/>
							<definedterm value="SHA384"/>
							<definedterm value="SHA512"/>
						</definedtermslist>
					</attribute>
					<attribute name="DataElementsSigned"				vr="AT" type="1" vmmin="1" vmmax="n"/>
					<attribute name="MAC"								vr="OB" type="1" vmmin="1" vmmax="1"/>
				</sequence>
			</sequence>
		</sequence>
	</definemacro>

	<definemacro name="CodeSequenceMacro">
		<attribute name="CodeValue"					vr="SH" type="1"  vmmin="1" vmmax="1"/>
		<attribute name="CodingSchemeDesignator"			vr="SH" type="1"  vmmin="1" vmmax="1"/>
		<attribute name="CodingSchemeVersion"				vr="SH" type="1C" vmmin="1" vmmax="1"
			condition="CodingSchemeDesignator/value[@number=1]='BI'
					or CodingSchemeDesignator/value[@number=1]='SCPECG'
					or CodingSchemeDesignator/value[@number=1]='BARI'
					or CodingSchemeDesignator/value[@number=1]='UCUM'
					or CodingSchemeDesignator/value[@number=1]='NCDR'"/>
		<attribute name="CodeMeaning"					vr="LO" type="1"  vmmin="1" vmmax="1"/>
		<attribute name="ContextIdentifier"				vr="CS" type="3"  vmmin="1" vmmax="1"/>
		<attribute name="MappingResource"				vr="CS" type="1C" vmmin="1" vmmax="1" condition="count(ContextIdentifier) &gt; 0" mbpo="F"/>
		<attribute name="ContextGroupVersion"				vr="DT" type="1C" vmmin="1" vmmax="1" condition="count(ContextIdentifier) &gt; 0" mbpo="F"/>
		<attribute name="ContextGroupExtensionFlag"			vr="CS" type="3"  vmmin="1" vmmax="1">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="Y"/>
				<enumeratedvalue value="N"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="ContextGroupLocalVersion"			vr="DT" type="1C" vmmin="1" vmmax="1" condition="ContextGroupExtensionFlag/value[@number=1]='Y'" mbpo="F"/>
		<attribute name="ContextGroupExtensionCreatorUID"		vr="UI" type="1C" vmmin="1" vmmax="1" condition="ContextGroupExtensionFlag/value[@number=1]='Y'" mbpo="F"/>
	</definemacro>

	<definemacro name="PersonIdentificationMacro">
		<sequence  name="PersonIdentificationCodeSequence"		vr="SQ" type="1"  vmmin="1" vmmax="n">
			<includemacro name="CodeSequenceMacro"/>
		</sequence>
		<attribute name="PersonAddress"					vr="ST" type="3"  vmmin="1" vmmax="1"/>
		<attribute name="PersonTelephoneNumbers"			vr="LO" type="3"  vmmin="1" vmmax="n"/>
		<attribute name="InstitutionName"				vr="LO" type="1C" vmmin="1" vmmax="1" condition="count(InstitutionCodeSequence) = 0" mbpo="F"/>
		<attribute name="InstitutionAddress"				vr="ST" type="3"  vmmin="1" vmmax="1"/>
		<sequence  name="InstitutionCodeSequence"			vr="SQ" type="1C" vmmin="1" vmmax="1" condition="count(InstitutionName) = 0" mbpo="F">
			<includemacro name="CodeSequenceMacro"/>
		</sequence>
	</definemacro>

	<definemacro name="ContentItemMacro">
		<attribute name="ValueType"						vr="CS" type="1" vmmin="1" vmmax="1">
			<definedtermslist valueselector="1">
				<definedterm value="DATETIME"/>
				<definedterm value="DATE"/>
				<definedterm value="TIME"/>
				<definedterm value="PNAME"/>
				<definedterm value="UIDREF"/>
				<definedterm value="TEXT"/>
				<definedterm value="CODE"/>
				<definedterm value="NUMERIC"/>
			</definedtermslist>
		</attribute>
		<sequence  name="ConceptNameCodeSequence"		vr="SQ" type="1" vmmin="1" vmmax="1" >
			<includemacro name="CodeSequenceMacro"/>
		</sequence>
		<attribute name="DateTime"						vr="DT" type="1C"  vmmin="1" vmmax="1" condition="ValueType/value[@number=1]='DATETIME'" mbpo="F"/>
		<attribute name="Date"							vr="DA" type="1C"  vmmin="1" vmmax="1" condition="ValueType/value[@number=1]='DATE'" mbpo="F"/>
		<attribute name="Time"							vr="TM" type="1C"  vmmin="1" vmmax="1" condition="ValueType/value[@number=1]='TIME'" mbpo="F"/>
		<attribute name="PersonName"					vr="PN" type="1C"  vmmin="1" vmmax="1" condition="ValueType/value[@number=1]='PNAME'" mbpo="F"/>
		<attribute name="UID"							vr="UI" type="1C"  vmmin="1" vmmax="1" condition="ValueType/value[@number=1]='UIDREF'" mbpo="F"/>
		<attribute name="TextValue"						vr="UT" type="1C"  vmmin="1" vmmax="1" condition="ValueType/value[@number=1]='TEXT'" mbpo="F"/>
		<sequence  name="ConceptNameCodeSequence"		vr="SQ" type="1C"  vmmin="1" vmmax="1" condition="ValueType/value[@number=1]='CODE'" mbpo="F">
			<includemacro name="CodeSequenceMacro"/>
		</sequence>
		<attribute name="NumericValue"					vr="DS" type="1C"  vmmin="1" vmmax="1" condition="ValueType/value[@number=1]='NUMERIC'" mbpo="F"/>
		<sequence  name="MeasurementUnitsCodeSequence"	vr="SQ" type="1C"  vmmin="1" vmmax="1" condition="ValueType/value[@number=1]='NUMERIC'" mbpo="F">
			<includemacro name="CodeSequenceMacro"/>
		</sequence>
	</definemacro>
	
	<definemacro name="RequestAttributesMacro">
		<attribute name="RequestedProcedureID"						vr="SH" type="1C"  vmmin="1" vmmax="1" nocondition="" mbpo="T"/>
		<attribute name="AccessionNumber"							vr="SH" type="3" vmmin="1" vmmax="1"/>
		<sequence  name="IssuerOfAccessionNumberSequence"			vr="SQ" type="3"  vmmin="1" vmmax="1">
			<includemacro name="HL7v2HierarchicDesignatorMacro"/>
		</sequence>
		<attribute name="StudyInstanceUID"							vr="UI" type="3" vmmin="1" vmmax="1"/>
		<sequence name="ReferencedStudySequence"					vr="SQ" type="3" vmmin="1" vmmax="n">
			<attribute name="ReferencedSOPClassUID"					vr="UI" type="1" vmmin="1" vmmax="1"/>
			<attribute name="ReferencedSOPInstanceUID"				vr="UI" type="1" vmmin="1" vmmax="1"/>
		</sequence>
		<attribute name="RequestedProcedureDescription"				vr="LO" type="3" vmmin="1" vmmax="1"/>
		<sequence name="RequestedProcedureCodeSequence"				vr="SQ" type="3" vmmin="1" vmmax="1">
			<includemacro name="CodeSequenceMacro"/>
		</sequence>
		<attribute name="ReasonForTheRequestedProcedure"				vr="LO" type="3" vmmin="1" vmmax="1"/>
		<sequence name="ReasonForRequestedProcedureCodeSequence"	vr="SQ" type="3" vmmin="1" vmmax="1">
			<includemacro name="CodeSequenceMacro"/>
		</sequence>
		<attribute name="ScheduledProcedureStepID"					vr="SH" type="1C"  vmmin="1" vmmax="1" nocondition="" mbpo="T"/>
		<attribute name="ScheduledProcedureStepDescription"			vr="LO" type="3"  vmmin="1" vmmax="1"/>
		<sequence  name="ScheduledProtocolCodeSequence"				vr="SQ" type="3"  vmmin="1" vmmax="n">
			<includemacro name="CodeSequenceMacro"/>
			<sequence  name="ProtocolContextSequence"				vr="SQ" type="3"  vmmin="1" vmmax="n">
				<includemacro name="ContentItemMacro"/>
				<sequence  name="ContentItemModifierSequence"		vr="SQ" type="3"  vmmin="1" vmmax="n">
					<includemacro name="ContentItemMacro"/>
				</sequence>
			</sequence>
		</sequence>
	</definemacro>

	<definemacro name="HL7v2HierarchicDesignatorMacro">
		<attribute name="LocalNamespaceEntityID"					vr="UT" type="1C"  vmmin="1" vmmax="1" condition="count(UniversalEntityID) = 0" mbpo="T"/>
		<attribute name="UniversalEntityID"							vr="UT" type="1C"  vmmin="1" vmmax="1" condition="count(LocalNamespaceEntityID) = 0" mbpo="T"/>
		<attribute name="UniversalEntityIDType"						vr="CS" type="1C"  vmmin="1" vmmax="1" condition="count(UniversalEntityID) &gt; 0">
			<definedtermslist valueselector="1">
				<definedterm value="DNS"/>
				<definedterm value="EUI64"/>
				<definedterm value="ISO"/>
				<definedterm value="URI"/>
				<definedterm value="UUID"/>
				<definedterm value="X400"/>
				<definedterm value="X500"/>
			</definedtermslist>
		</attribute>
	</definemacro>

	<definemacro name="IssuerOfPatientIDMacro">
		<attribute name="IssuerOfPatientID"							vr="LO" type="3"  vmmin="1" vmmax="1"/>
		<sequence  name="IssuerOfPatientIDQualifiersSequence"		vr="SQ" type="3"  vmmin="1" vmmax="1">
			<attribute name="UniversalEntityID"						vr="UT" type="3"  vmmin="1" vmmax="1"/>
			<attribute name="UniversalEntityIDType"					vr="CS" type="3"  vmmin="1" vmmax="1">
				<definedtermslist valueselector="1">
					<definedterm value="DNS"/>
					<definedterm value="EUI64"/>
					<definedterm value="ISO"/>
					<definedterm value="URI"/>
					<definedterm value="UUID"/>
					<definedterm value="X400"/>
					<definedterm value="X500"/>
				</definedtermslist>
			</attribute>
			<attribute name="IdentifierTypeCode"					vr="CS" type="3"  vmmin="1" vmmax="1">
				<definedtermslist valueselector="1">
					<definedterm value="AM"/>
					<definedterm value="AN"/>
					<definedterm value="ANON"/>
					<definedterm value="ANC"/>
					<definedterm value="AND"/>
					<definedterm value="ANT"/>
					<definedterm value="APRN"/>
					<definedterm value="BA"/>
					<definedterm value="BC"/>
					<definedterm value="BR"/>
					<definedterm value="BRN"/>
					<definedterm value="CC"/>
					<definedterm value="CY"/>
					<definedterm value="DDS"/>
					<definedterm value="DEA"/>
					<definedterm value="DI"/>
					<definedterm value="DFN"/>
					<definedterm value="DL"/>
					<definedterm value="DN"/>
					<definedterm value="DPM"/>
					<definedterm value="DO"/>
					<definedterm value="DR"/>
					<definedterm value="DS"/>
					<definedterm value="EI"/>
					<definedterm value="EN"/>
					<definedterm value="FI"/>
					<definedterm value="GI"/>
					<definedterm value="GL"/>
					<definedterm value="GN"/>
					<definedterm value="HC"/>
					<definedterm value="JHN"/>
					<definedterm value="IND"/>
					<definedterm value="LI"/>
					<definedterm value="LN"/>
					<definedterm value="LR"/>
					<definedterm value="MA"/>
					<definedterm value="MB"/>
					<definedterm value="MC"/>
					<definedterm value="MCD"/>
					<definedterm value="MCN"/>
					<definedterm value="MCR"/>
					<definedterm value="MD"/>
					<definedterm value="MI"/>
					<definedterm value="MR"/>
					<definedterm value="MRT"/>
					<definedterm value="MS"/>
					<definedterm value="NE"/>
					<definedterm value="NH"/>
					<definedterm value="NI"/>
					<definedterm value="NII"/>
					<definedterm value="NIIP"/>
					<definedterm value="NNxxx"/>
					<definedterm value="NNUSA"/>
					<definedterm value="NP"/>
					<definedterm value="NPI"/>
					<definedterm value="OD"/>
					<definedterm value="PA"/>
					<definedterm value="PCN"/>
					<definedterm value="PE"/>
					<definedterm value="PEN"/>
					<definedterm value="PI"/>
					<definedterm value="PN"/>
					<definedterm value="PNT"/>
					<definedterm value="PPN"/>
					<definedterm value="PRC"/>
					<definedterm value="PRN"/>
					<definedterm value="PT"/>
					<definedterm value="QA"/>
					<definedterm value="RI"/>
					<definedterm value="RPH"/>
					<definedterm value="RN"/>
					<definedterm value="RR"/>
					<definedterm value="RRI"/>
					<definedterm value="SL"/>
					<definedterm value="SN"/>
					<definedterm value="SR"/>
					<definedterm value="SS"/>
					<definedterm value="TAX"/>
					<definedterm value="TN"/>
					<definedterm value="U"/>
					<definedterm value="UPIN"/>
					<definedterm value="VN"/>
					<definedterm value="VS"/>
					<definedterm value="WC"/>
					<definedterm value="WCN"/>
					<definedterm value="XX"/>
				</definedtermslist>
			</attribute>
			<sequence  name="AssigningFacilitySequence"					vr="SQ" type="3"  vmmin="1" vmmax="1">
				<includemacro name="HL7v2HierarchicDesignatorMacro"/>
			</sequence>
			<sequence  name="AssigningJurisdictionCodeSequence"			vr="SQ" type="3"  vmmin="1" vmmax="1">
				<includemacro name="CodeSequenceMacro"/>
			</sequence>
			<sequence  name="AssigningAgencyOrDepartmentCodeSequence"	vr="SQ" type="3"  vmmin="1" vmmax="1">
				<includemacro name="CodeSequenceMacro"/>
			</sequence>
		</sequence>
	</definemacro>

	<definemacro name="PatientGroupMacro">
		<sequence name="SourcePatientGroupIdentificationSequence"		vr="SQ" type="3" vmmin="1" vmmax="1">
			<attribute name="PatientID"									vr="LO" type="2" vmmin="1" vmmax="1"/>
			<includemacro name="IssuerOfPatientIDMacro"/>
		</sequence>
		<sequence name="GroupOfPatientsIdentificationSequence"			vr="SQ" type="3" vmmin="1" vmmax="n">
			<attribute name="PatientID"									vr="LO" type="2" vmmin="1" vmmax="1"/>
			<includemacro name="IssuerOfPatientIDMacro"/>
			<attribute name="SubjectRelativePositionInImage"			vr="US" type="3" vmmin="1" vmmax="n"/>
			<attribute name="PatientPosition"							vr="CS" type="3" vmmin="1" vmmax="1">
				<definedtermslist valueselector="1">
					<definedterm value="HFP"/>
					<definedterm value="HFS"/>
					<definedterm value="HFDR"/>
					<definedterm value="HFDL"/>
					<definedterm value="FFDR"/>
					<definedterm value="FFDL"/>
					<definedterm value="FFP"/>
					<definedterm value="FFS"/>
					<definedterm value="LFP"/>
					<definedterm value="LFS"/>
					<definedterm value="RFP"/>
					<definedterm value="RFS"/>
					<definedterm value="AFDR"/>
					<definedterm value="AFDL"/>
					<definedterm value="PFDR"/>
					<definedterm value="PFDL"/>
				</definedtermslist>
			</attribute>
		</sequence>
	</definemacro>

	<definemacro name="PixelMeasuresMacro">
		<sequence name="PixelMeasuresSequence"				vr="SQ" type="1"  vmmin="1" vmmax="1">
			<attribute name="PixelSpacing"				vr="DS" type="1C" vmmin="2" vmmax="2" condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/VolumetricProperties/value[@number=1]='VOLUME' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/VolumetricProperties/value[@number=1]='VOLUME') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item/MRImageFrameTypeSequence/Item[*]/VolumetricProperties/value[@number=1]='VOLUME') or (/DicomObject/SOPClassUID = '1.2.840.10008.5.1.4.1.1.66.4' and count(/DicomObject/FrameOfReferenceUID) &gt; 0)" mbpo="T">
				<verify test="number(PixelSpacing/value[@number=1])=0 and //Rows/value &gt; 1" status="Error" message="first value of 0 is illegal when more than one Row"/>
				<verify test="number(PixelSpacing/value[@number=2])=0 and //Columns/value &gt; 1" status="Error" message="second value of 0 is  illegal when more than one Column"/>
			</attribute>
			<attribute name="SliceThickness"			vr="DS" type="1C" vmmin="1" vmmax="1" condition="(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/VolumetricProperties/value[@number=1]='VOLUME' or /DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/VolumetricProperties/value[@number=1]='SAMPLED') or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and (../../MRImageFrameTypeSequence/Item[@number=1]/VolumetricProperties/value[@number=1]='VOLUME' or ../../MRImageFrameTypeSequence/Item[@number=1]/VolumetricProperties/value[@number=1]='SAMPLED')) or (name(../../..) = 'SharedFunctionalGroupsSequence' and (/DicomObject/PerFrameFunctionalGroupsSequence/Item/MRImageFrameTypeSequence/Item[*]/VolumetricProperties/value[@number=1]='VOLUME' or /DicomObject/PerFrameFunctionalGroupsSequence/Item/MRImageFrameTypeSequence/Item[*]/VolumetricProperties/value[@number=1]='SAMPLED')) or (/DicomObject/SOPClassUID = '1.2.840.10008.5.1.4.1.1.66.4' and count(/DicomObject/FrameOfReferenceUID) &gt; 0)"  mbpo="T">
				<verify test="number(SliceThickness/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			</attribute>
			<attribute name="SpacingBetweenSlices"		vr="DS" type="3" vmmin="1" vmmax="1">
				<verify test="number(SpacingBetweenSlices/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			</attribute>
		</sequence>
	</definemacro>

	<definemacro name="FrameContentMacro">
		<sequence name="FrameContentSequence"				vr="SQ" type="1" vmmin="1" vmmax="1">
			<attribute name="FrameAcquisitionNumber"		vr="US" type="3"  vmmin="1" vmmax="1"/>
			<attribute name="FrameReferenceDateTime"		vr="DT" type="1C" vmmin="1" vmmax="1" condition="(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')) and /DicomObject/SOPClassUID != '1.2.840.10008.5.1.4.1.1.2.2' and /DicomObject/SOPClassUID != '1.2.840.10008.5.1.4.1.1.4.4' and /DicomObject/SOPClassUID != '1.2.840.10008.5.1.4.1.1.128.1'" mbpo="T"/>
			<attribute name="FrameAcquisitionDateTime"		vr="DT" type="1C" vmmin="1" vmmax="1" condition="(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')) and /DicomObject/SOPClassUID != '1.2.840.10008.5.1.4.1.1.2.2' and /DicomObject/SOPClassUID != '1.2.840.10008.5.1.4.1.1.4.4' and /DicomObject/SOPClassUID != '1.2.840.10008.5.1.4.1.1.128.1'" mbpo="T"/>
			<attribute name="FrameAcquisitionDuration"		vr="FD" type="1C" vmmin="1" vmmax="1" condition="(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')) and /DicomObject/SOPClassUID != '1.2.840.10008.5.1.4.1.1.2.2' and /DicomObject/SOPClassUID != '1.2.840.10008.5.1.4.1.1.4.4' and /DicomObject/SOPClassUID != '1.2.840.10008.5.1.4.1.1.128.1'" mbpo="T">
				<verify test="number(FrameAcquisitionDuration/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			</attribute>
			<attribute name="CardiacCyclePosition"			vr="CS" type="3"  vmmin="1" vmmax="1">
				<definedtermslist valueselector="1">
					<definedterm value="END_SYSTOLE"/>
					<definedterm value="END_DIASTOLE"/>
					<definedterm value="UNDETERMINED"/>
				</definedtermslist>
			</attribute>
			<attribute name="RespiratoryCyclePosition"		vr="CS" type="3"  vmmin="1" vmmax="1">
				<definedtermslist valueselector="1">
					<definedterm value="START_RESPIR"/>
					<definedterm value="END_RESPIR"/>
					<definedterm value="UNDETERMINED"/>
				</definedtermslist>
			</attribute>
			<attribute name="DimensionIndexValues"			vr="UL" type="1C" vmmin="1" vmmax="n" condition="count(/DicomObject/DimensionIndexSequence) &gt; 0" mbpo="F">
				<verify test="count(DimensionIndexValues/value) != count(/DicomObject/DimensionIndexSequence/Item)" status="Error" message="DimensionIndexValues must have Value Multiplicity = number of items in DimensionIndexSequence"/>
				<verify test="number(DimensionIndexValues/value[@number=1])=0" status="Error" message="value of 0 is not permitted"/>
				<verify test="number(DimensionIndexValues/value[@number=2])=0" status="Error" message="value of 0 is not permitted"/>
				<verify test="number(DimensionIndexValues/value[@number=3])=0" status="Error" message="value of 0 is not permitted"/>
			</attribute>
			<attribute name="TemporalPositionIndex"			vr="UL" type="3"  vmmin="1" vmmax="1"/>
			<attribute name="StackID"				vr="SH" type="3"  vmmin="1" vmmax="1"/>
			<attribute name="InStackPositionNumber"			vr="UL" type="1C" vmmin="1" vmmax="1" condition="count(StackID) &gt; 0" mbpo="F">
				<verify test="number(InStackPositionNumber/value)=0" status="Error" message="value of 0 is not permitted"/>
			</attribute>
			<attribute name="FrameComments"				vr="LT" type="3"  vmmin="1" vmmax="1"/>
		</sequence>
	</definemacro>

	<definemacro name="PlanePositionMacro">
		<sequence name="PlanePositionSequence"				vr="SQ" type="1"  vmmin="1" vmmax="1">
			<attribute name="ImagePositionPatient"			vr="DS" type="1C" vmmin="3" vmmax="3" condition="((/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/VolumetricProperties/value[@number=1]='VOLUME' or /DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/VolumetricProperties/value[@number=1]='SAMPLED') or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and (../../MRImageFrameTypeSequence/Item[@number=1]/VolumetricProperties/value[@number=1]='VOLUME' or ../../MRImageFrameTypeSequence/Item[@number=1]/VolumetricProperties/value[@number=1]='SAMPLED')) or (name(../../..) = 'SharedFunctionalGroupsSequence' and (/DicomObject/PerFrameFunctionalGroupsSequence/Item/MRImageFrameTypeSequence/Item[*]/VolumetricProperties/value[@number=1]='VOLUME' or /DicomObject/PerFrameFunctionalGroupsSequence/Item/MRImageFrameTypeSequence/Item[*]/VolumetricProperties/value[@number=1]='SAMPLED')))
														     and (/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL'))
															  or (/DicomObject/SOPClassUID = '1.2.840.10008.5.1.4.1.1.66.4' and count(/DicomObject/FrameOfReferenceUID) &gt; 0)" mbpo="T"/>
		</sequence>
	</definemacro>

	<definemacro name="PlaneOrientationMacro">
		<sequence name="PlaneOrientationSequence"			vr="SQ" type="1"  vmmin="1" vmmax="1">
			<attribute name="ImageOrientationPatient"		vr="DS" type="1C" vmmin="6" vmmax="6" condition="((/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/VolumetricProperties/value[@number=1]='VOLUME' or /DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/VolumetricProperties/value[@number=1]='SAMPLED') or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and (../../MRImageFrameTypeSequence/Item[@number=1]/VolumetricProperties/value[@number=1]='VOLUME' or ../../MRImageFrameTypeSequence/Item[@number=1]/VolumetricProperties/value[@number=1]='SAMPLED')) or (name(../../..) = 'SharedFunctionalGroupsSequence' and (/DicomObject/PerFrameFunctionalGroupsSequence/Item/MRImageFrameTypeSequence/Item[*]/VolumetricProperties/value[@number=1]='VOLUME' or /DicomObject/PerFrameFunctionalGroupsSequence/Item/MRImageFrameTypeSequence/Item[*]/VolumetricProperties/value[@number=1]='SAMPLED')))
														     and (/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL'))
															  or (/DicomObject/SOPClassUID = '1.2.840.10008.5.1.4.1.1.66.4' and count(/DicomObject/FrameOfReferenceUID) &gt; 0)" mbpo="T"/>
		</sequence>
	</definemacro>

	<definemacro name="ReferencedImageMacro">
		<sequence  name="ReferencedImageSequence"			vr="SQ" type="2"  vmmin="0" vmmax="n">
			<attribute name="ReferencedSOPClassUID"			vr="UI" type="1"  vmmin="1" vmmax="1"/>
			<attribute name="ReferencedSOPInstanceUID"		vr="UI" type="1"  vmmin="1" vmmax="1"/>
			<attribute name="ReferencedFrameNumber"			vr="IS" type="1C" vmmin="1" vmmax="n" condition="count(ReferencedFrameNumber) &gt; 0"/>
			<sequence  name="PurposeOfReferenceCodeSequence"	vr="SQ" type="1"  vmmin="1" vmmax="1">
				<includemacro name="CodeSequenceMacro"/>
			</sequence>
		</sequence>
	</definemacro>

	<definemacro name="DerivationImageMacro">
		<sequence name="DerivationImageSequence"				vr="SQ" type="2" vmmin="0" vmmax="n">
			<attribute name="DerivationDescription"				vr="ST" type="3"  vmmin="1" vmmax="1"/>
			<sequence  name="DerivationCodeSequence"			vr="SQ" type="1" vmmin="1" vmmax="1">
				<includemacro name="CodeSequenceMacro"/>
			</sequence>
			<sequence  name="SourceImageSequence"				vr="SQ" type="2"  vmmin="0" vmmax="n">
				<attribute name="ReferencedSOPClassUID"			vr="UI" type="1"  vmmin="1" vmmax="1"/>
				<attribute name="ReferencedSOPInstanceUID"		vr="UI" type="1"  vmmin="1" vmmax="1"/>
				<attribute name="ReferencedFrameNumber"			vr="IS" type="1C" vmmin="1" vmmax="1" condition="count(ReferencedFrameNumber) &gt; 0"/>
				<sequence  name="PurposeOfReferenceCodeSequence"	vr="SQ" type="1" vmmin="1" vmmax="1">
					<includemacro name="CodeSequenceMacro"/>
				</sequence>
			</sequence>
		</sequence>
	</definemacro>

	<definemacro name="CardiacSynchronizationMacro">
		<sequence name="CardiacSynchronizationSequence"			vr="SQ" type="1"  vmmin="1" vmmax="1">
			<attribute name="NominalPercentageOfCardiacPhase"	vr="FL" type="1C" vmmin="1" vmmax="1" condition="/DicomObject/DimensionIndexSequence/Item[*]/DimensionIndexPointer/value[@number=1] = 'NominalPercentageOfCardiacPhase'" mbpo="T"/>
			<attribute name="NominalCardiacTriggerDelayTime"	vr="FD" type="1"  vmmin="1" vmmax="1"/>
			<attribute name="ActualCardiacTriggerDelayTime"		vr="FD" type="1C"  vmmin="1" vmmax="1" condition="count(IntervalsAcquired) &gt; 0 and number(IntervalsAcquired/value[@number=1]) = 1" mbpo="T"/>
			<attribute name="IntervalsAcquired"					vr="IS" type="3"  vmmin="1" vmmax="1"/>
			<attribute name="IntervalsRejected"					vr="IS" type="3"  vmmin="1" vmmax="1"/>
			<attribute name="HeartRate"							vr="IS" type="3"  vmmin="1" vmmax="1"/>
			<attribute name="RRIntervalTimeNominal"				vr="FD" type="1C" vmmin="1" vmmax="1" condition="count(/DicomObject/CardiacSynchronizationTechnique) &gt; 0 and /DicomObject/CardiacSynchronizationTechnique/value[@number=1] != 'NONE' and /DicomObject/CardiacSynchronizationTechnique/value[@number=1] != 'REALTIME'" mbpo="T" />
			<attribute name="LowRRValue"						vr="IS" type="3"  vmmin="1" vmmax="1"/>
			<attribute name="HighRRValue"						vr="IS" type="3"  vmmin="1" vmmax="1"/>
		</sequence>
	</definemacro>
	
	<definemacro name="PrimaryAnatomicStructureMacro">
		<sequence  name="PrimaryAnatomicStructureSequence"				vr="SQ" type="3" vmmin="1" vmmax="n">
			<includemacro name="CodeSequenceMacro"/>
			<sequence  name="PrimaryAnatomicStructureModifierSequence"	vr="SQ" type="3" vmmin="1" vmmax="n">
				<includemacro name="CodeSequenceMacro"/>
			</sequence>
		</sequence>
	</definemacro>

	<definemacro name="GeneralAnatomyMandatoryMacro">
		<sequence  name="AnatomicRegionSequence"					vr="SQ" type="1" vmmin="0" vmmax="1">
			<includemacro name="CodeSequenceMacro"/>
			<sequence  name="AnatomicRegionModifierSequence"		vr="SQ" type="3" vmmin="1" vmmax="n">
				<includemacro name="CodeSequenceMacro"/>
			</sequence>
		</sequence>
		<includemacro name="PrimaryAnatomicStructureMacro"/>
	</definemacro>

	<definemacro name="GeneralAnatomyRequiredMacro">
		<verifyanywhere test="count(AnatomicRegionSequence) &gt; 0 and count(AnatomicRegionSequence/Item) = 0" status="Warning" message="empty AnatomicRegionSequence is not illegal, but extremely undesirable"/>
		<sequence  name="AnatomicRegionSequence"					vr="SQ" type="2" vmmin="0" vmmax="1">
			<includemacro name="CodeSequenceMacro"/>
			<sequence  name="AnatomicRegionModifierSequence"		vr="SQ" type="3" vmmin="1" vmmax="n">
				<includemacro name="CodeSequenceMacro"/>
			</sequence>
		</sequence>
		<includemacro name="PrimaryAnatomicStructureMacro"/>
	</definemacro>

	<definemacro name="GeneralAnatomyOptionalMacro">
		<verifyanywhere test="count(AnatomicRegionSequence) &gt; 0 and count(AnatomicRegionSequence/Item) = 0" status="Warning" message="empty AnatomicRegionSequence is not illegal, but extremely undesirable"/>
		<sequence  name="AnatomicRegionSequence"					vr="SQ" type="3" vmmin="0" vmmax="1">
			<includemacro name="CodeSequenceMacro"/>
			<sequence  name="AnatomicRegionModifierSequence"		vr="SQ" type="3" vmmin="1" vmmax="n">
				<includemacro name="CodeSequenceMacro"/>
			</sequence>
		</sequence>
		<includemacro name="PrimaryAnatomicStructureMacro"/>
	</definemacro>

	<definemacro name="FrameAnatomyMacro">
		<sequence name="FrameAnatomySequence"						vr="SQ" type="1" vmmin="1" vmmax="1">
			<attribute name="FrameLaterality"						vr="CS" type="1" vmmin="1" vmmax="1">
				<enumeratedvalueslist valueselector="1">
					<enumeratedvalue value="R"/>
					<enumeratedvalue value="L"/>
					<enumeratedvalue value="U"/>
					<enumeratedvalue value="B"/>
				</enumeratedvalueslist>
			</attribute>
			<includemacro name="GeneralAnatomyMandatoryMacro"/>
		</sequence>
	</definemacro>
	
	<definemacro name="PixelValueTransformationMacro">
		<sequence name="PixelValueTransformationSequence"			vr="SQ" type="1"  vmmin="1" vmmax="1">
			<attribute name="RescaleIntercept"				vr="DS" type="1"  vmmin="1" vmmax="1"/>
			<attribute name="RescaleSlope"					vr="DS" type="1"  vmmin="1" vmmax="1">
				<verify test="number(RescaleSlope/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			</attribute>
			<attribute name="RescaleType"					vr="LO" type="1"  vmmin="1" vmmax="1">
				<enumeratedvalueslist valueselector="1">
					<enumeratedvalue value="US"/>
				</enumeratedvalueslist>
			</attribute>
		</sequence>
	</definemacro>
	
	<definemacro name="FrameVOILUTMacro">
		<sequence name="FrameVOILUTSequence"					vr="SQ" type="1"  vmmin="1" vmmax="1">
			<attribute name="WindowCenter"					vr="DS" type="1"  vmmin="1" vmmax="n">
				<verify test="number(WindowCenter/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			</attribute>
			<attribute name="WindowWidth"					vr="DS" type="1"  vmmin="1" vmmax="n">
				<verify test="number(WindowWidth/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			</attribute>
			<attribute name="WindowCenterWidthExplanation"			vr="LO" type="3"  vmmin="1" vmmax="n">
				<definedtermslist>
					<definedterm value="BRAIN"/>
					<definedterm value="SOFT_TISSUE"/>
					<definedterm value="LUNG"/>
					<definedterm value="BONE"/>
				</definedtermslist>
			</attribute>
		</sequence>
	</definemacro>
	
	<definemacro name="RealWorldValueMappingItemMacro">
		<attribute name="RealWorldValueFirstValueMapped"		vr="XS" type="1"  vmmin="1" vmmax="1"/>
		<attribute name="RealWorldValueLastValueMapped"			vr="XS" type="1"  vmmin="1" vmmax="1"/>
		<attribute name="RealWorldValueIntercept"			vr="FD" type="1C" vmmin="1" vmmax="1" condition="count(RealWorldValueLUTData) = 0" mbpo="F"/>
		<attribute name="RealWorldValueSlope"				vr="FD" type="1C" vmmin="1" vmmax="1" condition="count(RealWorldValueLUTData) = 0" mbpo="F">
			<verify test="number(RealWorldValueSlope/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
		</attribute>
		<attribute name="RealWorldValueLUTData"				vr="FD" type="1C" vmmin="1" vmmax="n" condition="count(RealWorldValueIntercept) = 0" mbpo="F"/>
		<attribute name="LUTExplanation"				vr="LO" type="1"  vmmin="1" vmmax="1"/>
		<attribute name="LUTLabel"					vr="SH" type="1"  vmmin="1" vmmax="1"/>
		<sequence  name="MeasurementUnitsCodeSequence"			vr="SQ" type="1" vmmin="1" vmmax="1">
			<includemacro name="CodeSequenceMacro"/>
		</sequence>
	</definemacro>

	<definemacro name="RealWorldValueMappingMacro">
		<sequence name="RealWorldValueMappingSequence"				vr="SQ" type="1" vmmin="1" vmmax="1">
			<includemacro name="RealWorldValueMappingItemMacro"/>
		</sequence>
	</definemacro>

	<definemacro name="ContrastBolusUsageMacro">
		<sequence name="ContrastBolusUsageSequence"				vr="SQ" type="1" vmmin="1" vmmax="n">
			<attribute name="ContrastBolusAgentNumber"			vr="US" type="1"  vmmin="1" vmmax="1"/>
			<attribute name="ContrastBolusAgentAdministered"		vr="CS" type="1"  vmmin="1" vmmax="1">
				<enumeratedvalueslist valueselector="1">
					<enumeratedvalue value="YES"/>
					<enumeratedvalue value="NO"/>
				</enumeratedvalueslist>
			</attribute>
			<attribute name="ContrastBolusAgentDetected"			vr="CS" type="2"  vmmin="1" vmmax="1">
				<enumeratedvalueslist valueselector="1">
					<enumeratedvalue value="YES"/>
					<enumeratedvalue value="NO"/>
				</enumeratedvalueslist>
			</attribute>
			<attribute name="ContrastBolusAgentPhase"			vr="CS" type="2C"  vmmin="1" vmmax="1"
				condition="ContrastBolusAgentNumber/value[@number=1] = 
								/DicomObject/ContrastBolusAgentSequence/Item[@number=1]/ContrastBolusAgentNumber/value[@number=1]
							and (/DicomObject/ContrastBolusAgentSequence/Item[@number=1]/ContrastBolusAdministrationRouteSequence/Item[@number=1]/CodingSchemeDesignator/value[@number=1] = 'SNM3'
							 or  /DicomObject/ContrastBolusAgentSequence/Item[@number=1]/ContrastBolusAdministrationRouteSequence/Item[@number=1]/CodingSchemeDesignator/value[@number=1] = 'SRT')
							and /DicomObject/ContrastBolusAgentSequence/Item[@number=1]/ContrastBolusAdministrationRouteSequence/Item[@number=1]/CodeValue/value[@number=1] = 'G-D101'
						or
							ContrastBolusAgentNumber/value[@number=2] = /DicomObject/ContrastBolusAgentSequence/Item[@number=2]/ContrastBolusAgentNumber/value[@number=1]
							and (/DicomObject/ContrastBolusAgentSequence/Item[@number=2]/ContrastBolusAdministrationRouteSequence/Item[@number=1]/CodingSchemeDesignator/value[@number=1] = 'SNM3'
							 or  /DicomObject/ContrastBolusAgentSequence/Item[@number=2]/ContrastBolusAdministrationRouteSequence/Item[@number=1]/CodingSchemeDesignator/value[@number=1] = 'SRT')
							and /DicomObject/ContrastBolusAgentSequence/Item[@number=2]/ContrastBolusAdministrationRouteSequence/Item[@number=1]/CodeValue/value[@number=1] = 'G-D101'
						or
							ContrastBolusAgentNumber/value[@number=3] = /DicomObject/ContrastBolusAgentSequence/Item[@number=3]/ContrastBolusAgentNumber/value[@number=1]
							and (/DicomObject/ContrastBolusAgentSequence/Item[@number=3]/ContrastBolusAdministrationRouteSequence/Item[@number=1]/CodingSchemeDesignator/value[@number=1] = 'SNM3'
							 or  /DicomObject/ContrastBolusAgentSequence/Item[@number=3]/ContrastBolusAdministrationRouteSequence/Item[@number=1]/CodingSchemeDesignator/value[@number=1] = 'SRT')
							and /DicomObject/ContrastBolusAgentSequence/Item[@number=3]/ContrastBolusAdministrationRouteSequence/Item[@number=1]/CodeValue/value[@number=1] = 'G-D101'"
						mbpo="T">
				<definedtermslist valueselector="1">
					<definedterm value="PRE_CONTRAST"/>
					<definedterm value="POST_CONTRAST"/>
					<definedterm value="IMMEDIATE"/>
					<definedterm value="DYNAMIC"/>
					<definedterm value="STEADY_STATE"/>
					<definedterm value="DELAYED"/>
					<definedterm value="ARTERIAL"/>
					<definedterm value="CAPILLARY"/>
					<definedterm value="VENOUS"/>
					<definedterm value="PORTAL_VENOUS"/>
				</definedtermslist>
			</attribute>
		</sequence>
	</definemacro>

	<definemacro name="RespiratorySynchronizationMacro">
		<sequence name="RespiratorySynchronizationSequence"			vr="SQ" type="1" vmmin="1" vmmax="1">
			<attribute name="RespiratoryIntervalTime"				vr="FD" type="1C"  vmmin="1" vmmax="1"
				condition="(count(/DicomObject/RespiratoryCompensationTechnique) &gt; 0 and /DicomObject/RespiratoryCompensationTechnique/value[@number=1] != 'NONE' and /DicomObject/RespiratoryCompensationTechnique/value[@number=1] != 'REALTIME')
					and (/DicomObject/RespiratoryTriggerType = 0 or /DicomObject/RespiratoryTriggerType/value[@number=1] = 'TIME' or /DicomObject/RespiratoryTriggerType/value[@number=1] = 'BOTH')" mbpo="F"/>
			<attribute name="NominalPercentageOfRespiratoryPhase"	vr="FL" type="1C" vmmin="1" vmmax="1" condition="/DicomObject/DimensionIndexSequence/Item[*]/DimensionIndexPointer/value[@number=1] = 'NominalPercentageOfRespiratoryPhase'" mbpo="T"/>
			<attribute name="NominalRespiratoryTriggerDelayTime"	vr="FD" type="1"  vmmin="1" vmmax="1"/>
			<attribute name="ActualRespiratoryTriggerDelayTime"		vr="FD" type="1C" vmmin="1" vmmax="1" condition="/DicomObject/RespiratoryTriggerType/value[@number=1] = 'TIME' or /DicomObject/RespiratoryTriggerType/value[@number=1] = 'BOTH'" mbpo="F"/>
			<attribute name="StartingRespiratoryAmplitude"			vr="CS" type="1C" vmmin="1" vmmax="1" condition="/DicomObject/RespiratoryTriggerType/value[@number=1] = 'AMPLITUDE' or /DicomObject/RespiratoryTriggerType/value[@number=1] = 'BOTH'" mbpo="F"/>
			<attribute name="StartingRespiratoryPhase"				vr="FL" type="1C" vmmin="1" vmmax="1" condition="count(StartingRespiratoryAmplitude) &gt; 0" mbpo="F">
				<enumeratedvalueslist valueselector="1">
					<enumeratedvalue value="INSPIRATION"/>
					<enumeratedvalue value="MAXIMUM"/>
					<enumeratedvalue value="EXPIRATION"/>
					<enumeratedvalue value="MINIMUM"/>
				</enumeratedvalueslist>
			</attribute>
			<attribute name="EndingRespiratoryAmplitude"			vr="FL" type="1C" vmmin="1" vmmax="1" condition="/DicomObject/RespiratoryTriggerType/value[@number=1] = 'AMPLITUDE' or /DicomObject/RespiratoryTriggerType/value[@number=1] = 'BOTH'" mbpo="F"/>
			<attribute name="EndingRespiratoryPhase"				vr="FL" type="1C" vmmin="1" vmmax="1" condition="count(EndingRespiratoryAmplitude) &gt; 0" mbpo="F">
				<enumeratedvalueslist valueselector="1">
					<enumeratedvalue value="INSPIRATION"/>
					<enumeratedvalue value="MAXIMUM"/>
					<enumeratedvalue value="EXPIRATION"/>
					<enumeratedvalue value="MINIMUM"/>
				</enumeratedvalueslist>
			</attribute>
		</sequence>
	</definemacro>

	<definemacro name="IrradiationEventIdentificationMacro">
		<sequence name="IrradiationEventIdentificationSequence"		vr="SQ" type="1" vmmin="1" vmmax="1">
			<attribute name="IrradiationEventUID"					vr="UI" type="1"  vmmin="1" vmmax="1"/>
		</sequence>
	</definemacro>
	
	<definemacro name="MRImageFrameTypeMacro">
		<sequence name="MRImageFrameTypeSequence"				vr="SQ" type="1" vmmin="1" vmmax="1">
			<attribute name="FrameType"					vr="CS" type="1" vmmin="4" vmmax="4">
				<enumeratedvalueslist valueselector="1">
					<enumeratedvalue value="ORIGINAL"/>
					<enumeratedvalue value="DERIVED"/>
				</enumeratedvalueslist>
				<enumeratedvalueslist valueselector="2">
					<enumeratedvalue value="PRIMARY"/>
				</enumeratedvalueslist>
				<definedtermslist valueselector="3">
					<definedterm value="ANGIO"/>
					<definedterm value="CARDIAC"/>
					<definedterm value="CARDIAC_GATED"/>
					<definedterm value="CARDRESP_GATED"/>
					<definedterm value="DYNAMIC"/>
					<definedterm value="FLUOROSCOPY"/>
					<definedterm value="LOCALIZER"/>
					<definedterm value="MOTION"/>
					<definedterm value="PERFUSION"/>
					<definedterm value="PRE_CONTRAST"/>
					<definedterm value="POST_CONTRAST"/>
					<definedterm value="RESP_GATED"/>
					<definedterm value="REST"/>
					<definedterm value="STATIC"/>
					<definedterm value="STRESS"/>
					<definedterm value="VOLUME"/>
					<definedterm value="NON_PARALLEL"/>
					<definedterm value="PARALLEL"/>
					<definedterm value="WHOLE_BODY"/>
					<definedterm value="ANGIO_TIME"/>
					<definedterm value="ASL"/>
					<definedterm value="CINE"/>
					<definedterm value="DIFFUSION"/>
					<definedterm value="DIXON"/>
					<definedterm value="FLOW_ENCODED"/>
					<definedterm value="FLUID_ATTENUATED"/>
					<definedterm value="FMRI"/>
					<definedterm value="MAX_IP"/>
					<definedterm value="MIN_IP"/>
					<definedterm value="M_MODE"/>
					<definedterm value="METABOLITE_MAP"/>
					<definedterm value="MULTIECHO"/>
					<definedterm value="PROTON_DENSITY"/>
					<definedterm value="REALTIME"/>
					<definedterm value="STIR"/>
					<definedterm value="TAGGING"/>
					<definedterm value="TEMPERATURE"/>
					<definedterm value="T1"/>
					<definedterm value="T2"/>
					<definedterm value="T2_STAR"/>
					<definedterm value="TOF"/>
					<definedterm value="VELOCITY"/>
				</definedtermslist>
				<definedtermslist valueselector="4">
					<definedterm value="ADDITION"/>
					<definedterm value="DIVISION"/>
					<definedterm value="MASKED"/>
					<definedterm value="MAXIMUM"/>
					<definedterm value="MEAN"/>
					<definedterm value="MINIMUM"/>
					<definedterm value="MTT"/>
					<definedterm value="MULTIPLICATION"/>
					<definedterm value="RCBF"/>
					<definedterm value="RCBV"/>
					<definedterm value="RESAMPLED"/>
					<definedterm value="STD_DEVIATION"/>
					<definedterm value="SUBTRACTION"/>
					<definedterm value="T_TEST"/>
					<definedterm value="TTP"/>
					<definedterm value="Z_SCORE"/>
					<definedterm value="NONE"/>
					<definedterm value="ADC"/>
					<definedterm value="DIFFUSION"/>
					<definedterm value="DIFFUSION_ANISO"/>
					<definedterm value="DIFFUSION_ATTNTD"/>
					<definedterm value="DIFFUSION_ISO"/>
					<definedterm value="FAT"/>
					<definedterm value="FAT_FRACTION"/>
					<definedterm value="FIELD_MAP"/>
					<definedterm value="IN_PHASE"/>
					<definedterm value="METABOLITE_MAP"/>
					<definedterm value="NEI"/>
					<definedterm value="OUT_OF_PHASE"/>
					<definedterm value="PERFUSION_ASL"/>
					<definedterm value="R_COEFFICIENT"/>
					<definedterm value="R2_MAP"/>
					<definedterm value="R2_STAR_MAP"/>
					<definedterm value="RHO"/>
					<definedterm value="SCM"/>
					<definedterm value="SNR_MAP"/>
					<definedterm value="T1_MAP"/>
					<definedterm value="T2_STAR_MAP"/>
					<definedterm value="T2_MAP"/>
					<definedterm value="TCS"/>
					<definedterm value="TEMPERATURE"/>
					<definedterm value="VELOCITY"/>
					<definedterm value="WATER"/>
					<definedterm value="WATER_FRACTION"/>
				</definedtermslist>
				<verify test="FrameType/value[@number=1]='ORIGINAL' and FrameType/value[@number=4]!='NONE'" status="Error" message="value 4 must be NONE when value 1 is ORIGINAL"/>
				<verify test="FrameType/value[@number=1]='DERIVED' and FrameType/value[@number=4]='NONE'" status="Error" message="value 4 must not be NONE when value 1 is DERIVED"/>
			</attribute>
			<includemacro name="CommonCTMRImageDescriptionAtFrameLevelMacro"/>
			<includemacro name="MRImageDescriptionAtFrameLevelMacro"/>
		</sequence>
	</definemacro>

	<definemacro name="MRTimingAndRelatedParametersMacro">
		<sequence name="MRTimingAndRelatedParametersSequence"			vr="SQ" type="1" vmmin="1" vmmax="1">
			<attribute name="RepetitionTime"				vr="DS" type="1C"  vmmin="1" vmmax="1" condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
				<verify test="number(RepetitionTime/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			</attribute>
			<attribute name="FlipAngle"					vr="DS" type="1C"  vmmin="1" vmmax="1" condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
				<verify test="number(FlipAngle/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			</attribute>
			<attribute name="EchoTrainLength"				vr="IS" type="1C"  vmmin="1" vmmax="1" condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
				<verify test="number(EchoTrainLength/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			</attribute>
			<attribute name="RFEchoTrainLength"				vr="US" type="1C"  vmmin="1" vmmax="1" condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
				<verify test="number(RFEchoTrainLength/value)=0 and number(GradientEchoTrainLength/value)=0" status="Warning" message="value of 0 is not illegal, but 0 for both GradientEchoTrainLength and RFEchoTrainLength is unlikely to be correct"/>
			</attribute>
			<attribute name="GradientEchoTrainLength"			vr="US" type="1C"  vmmin="1" vmmax="1" condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
				<verify test="number(GradientEchoTrainLength/value)=0 and number(RFEchoTrainLength/value)=0" status="Warning" message="value of 0 is not illegal, but 0 for both GradientEchoTrainLength and RFEchoTrainLength is unlikely to be correct"/>
			</attribute>
			<sequence  name="SpecificAbsorptionRateSequence"		vr="SQ" type="1C" vmmin="1" vmmax="n" condition="count(SpecificAbsorptionRateSequence) &gt; 0" mbpo="F">
				<attribute name="SpecificAbsorptionRateDefinition"	vr="CS" type="1" vmmin="1" vmmax="1">
					<definedtermslist valueselector="1">
						<definedterm value="IEC_WHOLE_BODY"/>
						<definedterm value="IEC_PARTIAL_BODY"/>
						<definedterm value="IEC_HEAD"/>
						<definedterm value="IEC_LOCAL"/>
					</definedtermslist>
				</attribute>
				<attribute name="SpecificAbsorptionRateValue"		vr="FD" type="1"  vmmin="1" vmmax="1">
					<verify test="number(SpecificAbsorptionRateValue/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
				</attribute>
			</sequence>
			<attribute name="GradientOutputType"				vr="CS" type="1C" vmmin="1" vmmax="1" condition="count(GradientOutputType) &gt; 0" mbpo="F">
				<definedtermslist valueselector="1">
					<definedterm value="DB_DT"/>
					<definedterm value="ELECTRIC_FIELD"/>
					<definedterm value="PER_NERVE_STIM"/>
				</definedtermslist>
			</attribute>
			<attribute name="GradientOutput"				vr="FD" type="1C" vmmin="1" vmmax="1" condition="count(GradientOutput) &gt; 0" mbpo="F">
				<verify test="number(GradientOutput/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			</attribute>
			<sequence  name="OperatingModeSequence"				vr="SQ" type="1C" vmmin="1" vmmax="n" condition="count(OperatingModeSequence) &gt; 0" mbpo="F">
				<attribute name="OperatingModeType"			vr="CS" type="1" vmmin="1" vmmax="1">
					<definedtermslist valueselector="1">
						<definedterm value="STATIC FIELD"/>
						<definedterm value="RF"/>
						<definedterm value="GRADIENT"/>
					</definedtermslist>
				</attribute>
				<attribute name="OperatingMode"				vr="CS" type="1" vmmin="1" vmmax="1">
					<definedtermslist valueselector="1">
						<definedterm value="IEC_NORMAL"/>
						<definedterm value="IEC_FIRST_LEVEL"/>
						<definedterm value="IEC_SECOND_LEVEL"/>
					</definedtermslist>
				</attribute>
			</sequence>
		</sequence>
	</definemacro>
	
	<definemacro name="MRFOVGeometryMacro">
		<sequence name="MRFOVGeometrySequence"					vr="SQ" type="1" vmmin="1" vmmax="1">
			<attribute name="InPlanePhaseEncodingDirection"			vr="CS" type="1C"  vmmin="1" vmmax="1" condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
				<enumeratedvalueslist valueselector="1">
					<enumeratedvalue value="COLUMN"/>
					<enumeratedvalue value="ROW"/>
					<enumeratedvalue value="OTHER"/>
				</enumeratedvalueslist>
			</attribute>
			<attribute name="MRAcquisitionFrequencyEncodingSteps"		vr="US" type="1C"  vmmin="1" vmmax="1" condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
				<verify test="number(MRAcquisitionFrequencyEncodingSteps/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			</attribute>
			<attribute name="MRAcquisitionPhaseEncodingStepsInPlane"	vr="US" type="1C"  vmmin="1" vmmax="1" condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
				<verify test="number(MRAcquisitionPhaseEncodingStepsInPlane/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			</attribute>
			<attribute name="MRAcquisitionPhaseEncodingStepsOutOfPlane"	vr="US" type="1C"  vmmin="1" vmmax="1" condition="/DicomObject/MRAcquisitionType/value[@number=1]='3D' and (/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL'))" mbpo="T">
				<verify test="number(MRAcquisitionPhaseEncodingStepsOutOfPlane/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			</attribute>
			<attribute name="PercentSampling"				vr="DS" type="1C"  vmmin="1" vmmax="1" condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
				<verify test="number(PercentSampling/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			</attribute>
			<attribute name="PercentPhaseFieldOfView"			vr="DS" type="1C"  vmmin="1" vmmax="1" condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
				<verify test="number(PercentPhaseFieldOfView/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			</attribute>
		</sequence>
	</definemacro>
	
	<definemacro name="MREchoMacro">
		<sequence name="MREchoSequence"						vr="SQ" type="1"  vmmin="1" vmmax="1">
			<attribute name="EffectiveEchoTime"				vr="FD" type="1C" vmmin="1" vmmax="1" condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
				<verify test="number(EffectiveEchoTime/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			</attribute>
		</sequence>
	</definemacro>
	
	<definemacro name="MRModifierMacro">
		<sequence name="MRModifierSequence"					vr="SQ" type="1" vmmin="1" vmmax="1">
			<attribute name="InversionRecovery"				vr="CS" type="1C"  vmmin="1" vmmax="1" condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
				<enumeratedvalueslist valueselector="1">
					<enumeratedvalue value="YES"/>
					<enumeratedvalue value="NO"/>
				</enumeratedvalueslist>
			</attribute>
			<attribute name="InversionTimes"				vr="FD" type="1C"  vmmin="1" vmmax="n" condition="InversionRecovery/value[@number=1]='YES' and (/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL'))" mbpo="T">
				<verify test="InversionRecovery/value[@number=1]!='YES'" status="Error" message="May not be present unless InversionRecovery is YES"/>
			</attribute>
			<attribute name="FlowCompensation"				vr="CS" type="1C"  vmmin="1" vmmax="1" condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
				<definedtermslist valueselector="1">
					<definedterm value="ACCELERATION"/>
					<definedterm value="VELOCITY"/>
					<definedterm value="OTHER"/>
					<definedterm value="NONE"/>
				</definedtermslist>
			</attribute>
			<attribute name="FlowCompensationDirection"			vr="CS" type="1C"  vmmin="1" vmmax="1" condition="(count(FlowCompensation) &gt; 0 and FlowCompensation/value[@number=1]!='NONE') and (/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL'))" mbpo="F">
				<verify test="FlowCompensation/value[@number=1]='NONE'" status="Error" message="May not be present unless FlowCompensation is other than NONE"/>
				<enumeratedvalueslist valueselector="1">
					<enumeratedvalue value="PHASE"/>
					<enumeratedvalue value="FREQUENCY"/>
					<enumeratedvalue value="SLICE_SELECT"/>
					<enumeratedvalue value="SLICE_AND_FREQ"/>
					<enumeratedvalue value="SLICE_FREQ_PHASE"/>
					<enumeratedvalue value="PHASE_AND_FREQ"/>
					<enumeratedvalue value="SLICE_AND_PHASE"/>
					<enumeratedvalue value="OTHER"/>
				</enumeratedvalueslist>
			</attribute>
			<attribute name="Spoiling"					vr="CS" type="1C"  vmmin="1" vmmax="1" condition="(/DicomObject/EchoPulseSequence/value[@number=1]='GRADIENT' or /DicomObject/EchoPulseSequence/value[@number=1]='BOTH') and (/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL'))" mbpo="T">
				<verify test="/DicomObject/EchoPulseSequence/value[@number=1]!='GRADIENT' and /DicomObject/EchoPulseSequence/value[@number=1]!='BOTH'" status="Error" message="May not be present unless EchoPulseSequence is GRADIENT or BOTH"/>
				<enumeratedvalueslist valueselector="1">
					<enumeratedvalue value="RF"/>
					<enumeratedvalue value="GRADIENT"/>
					<enumeratedvalue value="RF_AND_GRADIENT"/>
					<enumeratedvalue value="NONE"/>
				</enumeratedvalueslist>
			</attribute>
			<attribute name="T2Preparation"					vr="CS" type="1C"  vmmin="1" vmmax="1" condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
				<enumeratedvalueslist valueselector="1">
					<enumeratedvalue value="YES"/>
					<enumeratedvalue value="NO"/>
				</enumeratedvalueslist>
			</attribute>
			<attribute name="SpectrallySelectedExcitation"			vr="CS" type="1C"  vmmin="1" vmmax="1" condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
				<enumeratedvalueslist valueselector="1">
					<enumeratedvalue value="WATER"/>
					<enumeratedvalue value="FAT"/>
					<enumeratedvalue value="NONE"/>
				</enumeratedvalueslist>
			</attribute>
			<attribute name="SpatialPresaturation"				vr="CS" type="1C"  vmmin="1" vmmax="1" condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
				<definedtermslist valueselector="1">
					<definedterm value="SLAB"/>
					<definedterm value="NONE"/>
				</definedtermslist>
			</attribute>
			<attribute name="PartialFourier"				vr="CS" type="1C"  vmmin="1" vmmax="1" condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
				<enumeratedvalueslist valueselector="1">
					<enumeratedvalue value="YES"/>
					<enumeratedvalue value="NO"/>
				</enumeratedvalueslist>
			</attribute>
			<attribute name="PartialFourierDirection"			vr="CS" type="1C"  vmmin="1" vmmax="1" condition="(count(PartialFourier) &gt; 0 and PartialFourier/value[@number=1]='YES') and (/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL'))" mbpo="T">
				<verify test="PartialFourier/value[@number=1]!='YES'" status="Error" message="May not be present unless PartialFourier is YES"/>
				<enumeratedvalueslist valueselector="1">
					<enumeratedvalue value="PHASE"/>
					<enumeratedvalue value="FREQUENCY"/>
					<enumeratedvalue value="SLICE_SELECT"/>
					<enumeratedvalue value="COMBINATION"/>
				</enumeratedvalueslist>
			</attribute>
			<attribute name="ParallelAcquisition"				vr="CS" type="1C"  vmmin="1" vmmax="1" condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
				<enumeratedvalueslist valueselector="1">
					<enumeratedvalue value="YES"/>
					<enumeratedvalue value="NO"/>
				</enumeratedvalueslist>
			</attribute>
			<attribute name="ParallelAcquisitionTechnique"			vr="CS" type="1C"  vmmin="1" vmmax="1" condition="(count(ParallelAcquisition) &gt; 0 and ParallelAcquisition/value[@number=1]='YES') and (/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL'))" mbpo="T">
				<verify test="ParallelAcquisition/value[@number=1]!='YES'" status="Error" message="May not be present unless ParallelAcquisition is YES"/>
				<enumeratedvalueslist valueselector="1">
					<enumeratedvalue value="PILS"/>
					<enumeratedvalue value="SENSE"/>
					<enumeratedvalue value="SMASH"/>
					<enumeratedvalue value="OTHER"/>
				</enumeratedvalueslist>
			</attribute>
			<attribute name="ParallelReductionFactorInPlane"		vr="FD" type="1C"  vmmin="1" vmmax="1" condition="(count(ParallelAcquisition) &gt; 0 and ParallelAcquisition/value[@number=1]='YES') and (/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL'))" mbpo="T">
				<verify test="ParallelAcquisition/value[@number=1]!='YES'" status="Error" message="May not be present unless ParallelAcquisition is YES"/>
			</attribute>
			<attribute name="ParallelReductionFactorOutOfPlane"		vr="FD" type="1C"  vmmin="1" vmmax="1" condition="(count(ParallelAcquisition) &gt; 0 and ParallelAcquisition/value[@number=1]='YES') and (/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL'))" mbpo="T">
				<verify test="ParallelAcquisition/value[@number=1]!='YES'" status="Error" message="May not be present unless ParallelAcquisition is YES"/>
			</attribute>
			<attribute name="ParallelReductionFactorSecondInPlane"		vr="FD" type="1C"  vmmin="1" vmmax="1" condition="(count(ParallelAcquisition) &gt; 0 and ParallelAcquisition/value[@number=1]='YES' and SOPClassUID/value[@number=1]='1.2.740.10008.5.1.4.1.1.4.2') and (/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL'))" mbpo="T">
				<verify test="ParallelAcquisition/value[@number=1]!='YES'" status="Error" message="May not be present unless ParallelAcquisition is YES"/>
				<verify test="SOPClassUID/value[@number=1]!='1.2.740.10008.5.1.4.1.1.4.2'" status="Error" message="May not be present unless SOP Class is Spectroscopy"/>
			</attribute>
		</sequence>
	</definemacro>
	
	<definemacro name="MRImagingModifierMacro">
		<sequence name="MRImagingModifierSequence"				vr="SQ" type="1" vmmin="1" vmmax="1">
			<attribute name="MagnetizationTransfer"				vr="CS" type="1C"  vmmin="1" vmmax="1" condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
				<enumeratedvalueslist valueselector="1">
					<enumeratedvalue value="ON_RESONANCE"/>
					<enumeratedvalue value="OFF_RESONANCE"/>
					<enumeratedvalue value="NONE"/>
				</enumeratedvalueslist>
			</attribute>
			<attribute name="BloodSignalNulling"				vr="CS" type="1C"  vmmin="1" vmmax="1" condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
				<enumeratedvalueslist valueselector="1">
					<enumeratedvalue value="YES"/>
					<enumeratedvalue value="NO"/>
				</enumeratedvalueslist>
			</attribute>
			<attribute name="Tagging"					vr="CS" type="1C"  vmmin="1" vmmax="1" condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
				<definedtermslist valueselector="1">
					<definedterm value="GRID"/>
					<definedterm value="LINE"/>
					<definedterm value="NONE"/>
				</definedtermslist>
			</attribute>
			<attribute name="TagSpacingFirstDimension"			vr="FD" type="1C"  vmmin="1" vmmax="1" condition="(Tagging/value[@number=1]='GRID' or Tagging/value[@number=1]='LINE') and (/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL'))" mbpo="T">
				<verify test="Tagging/value[@number=1]!='GRID' and Tagging/value[@number=1]!='LINE'" status="Error" message="May not be present unless Tagging is GRID or LINE"/>
			</attribute>
			<attribute name="TagSpacingSecondDimension"			vr="FD" type="1C"  vmmin="1" vmmax="1" condition="(Tagging/value[@number=1]='GRID') and (/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL'))" mbpo="T">
				<verify test="Tagging/value[@number=1]!='GRID'" status="Error" message="May not be present unless Tagging is GRID"/>
			</attribute>
			<attribute name="TagAngleFirstAxis"				vr="FD" type="1C"  vmmin="1" vmmax="1" condition="(Tagging/value[@number=1]='GRID' or Tagging/value[@number=1]='LINE') and (/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL'))" mbpo="T">
				<verify test="Tagging/value[@number=1]!='GRID' and Tagging/value[@number=1]!='LINE'" status="Error" message="May not be present unless Tagging is GRID or LINE"/>
			</attribute>
			<attribute name="TagAngleSecondAxis"				vr="SS" type="1C"  vmmin="1" vmmax="1" condition="(Tagging/value[@number=1]='GRID') and (/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL'))" mbpo="T">
				<verify test="Tagging/value[@number=1]!='GRID'" status="Error" message="May not be present unless Tagging is GRID"/>
			</attribute>
			<attribute name="TagThickness"					vr="FD" type="1C"  vmmin="1" vmmax="1" condition="(Tagging/value[@number=1]='GRID' or Tagging/value[@number=1]='LINE') and (/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL'))" mbpo="T">
				<verify test="Tagging/value[@number=1]!='GRID' and Tagging/value[@number=1]!='LINE'" status="Error" message="May not be present unless Tagging is GRID or LINE"/>
				<verify test="number(TagThickness/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			</attribute>
			<attribute name="TaggingDelay"					vr="FD" type="3"  vmmin="1" vmmax="1"/>
			<attribute name="TransmitterFrequency"				vr="FD" type="1C"  vmmin="1" vmmax="1" condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
				<verify test="number(TransmitterFrequency/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			</attribute>
			<attribute name="PixelBandwidth"				vr="DS" type="1C"  vmmin="1" vmmax="1" condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
				<verify test="number(PixelBandwidth/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			</attribute>
		</sequence>
	</definemacro>
	
	<definemacro name="MRReceiveCoilMacro">
		<sequence name="MRReceiveCoilSequence"					vr="SQ" type="1"  vmmin="1" vmmax="n">
			<attribute name="ReceiveCoilName"				vr="SH" type="1C" vmmin="1" vmmax="1"	condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')
																											or /DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRSpectroscopyFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRSpectroscopyFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRSpectroscopyFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T"/>
			<attribute name="ReceiveCoilManufacturerName"			vr="LO" type="2C" vmmin="1" vmmax="1"	condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')
																													or /DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRSpectroscopyFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRSpectroscopyFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRSpectroscopyFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T"/>
			<attribute name="ReceiveCoilType"				vr="CS" type="1C" vmmin="1" vmmax="1"	condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')
																											or /DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRSpectroscopyFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRSpectroscopyFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRSpectroscopyFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
				<definedtermslist valueselector="1">
					<definedterm value="BODY"/>
					<definedterm value="VOLUME"/>
					<definedterm value="SURFACE"/>
					<definedterm value="MULTICOIL"/>
				</definedtermslist>
			</attribute>
			<attribute name="QuadratureReceiveCoil"				vr="CS" type="1C" vmmin="1" vmmax="1"	condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')
																												or /DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRSpectroscopyFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRSpectroscopyFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRSpectroscopyFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
				<enumeratedvalueslist valueselector="1">
					<enumeratedvalue value="YES"/>
					<enumeratedvalue value="NO"/>
				</enumeratedvalueslist>
			</attribute>
			<sequence name="MultiCoilDefinitionSequence"			vr="SQ" type="1C" vmmin="1" vmmax="n" condition="ReceiveCoilType/value[@number=1] = 'MULTICOIL' and (/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')
																																									  or /DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRSpectroscopyFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRSpectroscopyFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRSpectroscopyFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL'))" mbpo="T">
				<attribute name="MultiCoilElementName"			vr="SH" type="1"  vmmin="1" vmmax="1"/>
				<attribute name="MultiCoilElementUsed"			vr="CS" type="1"  vmmin="1" vmmax="1">
					<enumeratedvalueslist valueselector="1">
						<enumeratedvalue value="YES"/>
						<enumeratedvalue value="NO"/>
					</enumeratedvalueslist>
				</attribute>
			</sequence>
			<attribute name="MultiCoilConfiguration"		vr="LO" type="3"  vmmin="1" vmmax="1"/>
		</sequence>
	</definemacro>
	
	<definemacro name="MRTransmitCoilMacro">
		<sequence name="MRTransmitCoilSequence"					vr="SQ" type="1" vmmin="1" vmmax="1">
			<attribute name="TransmitCoilName"				vr="SH" type="1C" vmmin="1" vmmax="1"	condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')
																											or /DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRSpectroscopyFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRSpectroscopyFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRSpectroscopyFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T"/>
			<attribute name="TransmitCoilManufacturerName"			vr="LO" type="2C" vmmin="1" vmmax="1"	condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')
																													or /DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRSpectroscopyFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRSpectroscopyFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRSpectroscopyFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T"/>
			<attribute name="TransmitCoilType"				vr="CS" type="1C" vmmin="1" vmmax="1"	condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')
																											or /DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRSpectroscopyFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRSpectroscopyFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRSpectroscopyFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
				<definedtermslist valueselector="1">
					<definedterm value="BODY"/>
					<definedterm value="VOLUME"/>
					<definedterm value="SURFACE"/>
				</definedtermslist>
			</attribute>
		</sequence>
	</definemacro>
	
	<definemacro name="MRDiffusionMacro">
		<sequence name="MRDiffusionSequence"					vr="SQ" type="1"  vmmin="1" vmmax="1">
			<attribute name="DiffusionBValue"				vr="FD" type="1C" vmmin="1" vmmax="1" condition="(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
			</attribute>
			<attribute name="DiffusionDirectionality"			vr="CS" type="1C" vmmin="1" vmmax="1" condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL'" mbpo="T">
				<definedtermslist valueselector="1">
					<definedterm value="DIRECTIONAL"/>
					<definedterm value="BMATRIX"/>
					<definedterm value="ISOTROPIC"/>
					<definedterm value="NONE"/>
				</definedtermslist>
				<verify test="DiffusionDirectionality/value[@number=1] != 'NONE' and (DiffusionBValue/value[@number=1] = 0 or (/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=4]='DIFFUSION_ANISO' or ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=4]='DIFFUSION_ANISO'))" status="Error" message="DiffusionDirectionality must be NONE when DiffusionBValue is 0 or FrameType value 4 is DIFFUSION_ANISO"/>
			</attribute>
			<sequence name="DiffusionGradientDirectionSequence"		vr="SQ" type="1C" vmmin="1" vmmax="1" condition="DiffusionDirectionality/value[@number=1] = 'DIRECTIONAL'" mbpo="T">
				<attribute name="DiffusionGradientOrientation"		vr="FD" type="1C" vmmin="3" vmmax="3" condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL'" mbpo="T"/>
			</sequence>
			<verify test="count(DiffusionGradientDirectionSequence) &gt; 0 and not (DiffusionDirectionality/value[@number=1] = 'DIRECTIONAL' or DiffusionDirectionality/value[@number=1] = 'BMATRIX')" status="Error" message="DiffusionGradientDirectionSequence may only be present if DiffusionDirectionality is DIRECTIONAL or BMATRIX"/>
			<sequence name="DiffusionBMatrixSequence"			vr="SQ" type="1C" vmmin="1" vmmax="1" condition="DiffusionDirectionality/value[@number=1] = 'BMATRIX'">
				<attribute name="DiffusionBValueXX"		vr="FD" type="1"  vmmin="1" vmmax="1"/>
				<attribute name="DiffusionBValueXY"		vr="FD" type="1"  vmmin="1" vmmax="1"/>
				<attribute name="DiffusionBValueXZ"		vr="FD" type="1"  vmmin="1" vmmax="1"/>
				<attribute name="DiffusionBValueYY"		vr="FD" type="1"  vmmin="1" vmmax="1"/>
				<attribute name="DiffusionBValueYZ"		vr="FD" type="1"  vmmin="1" vmmax="1"/>
				<attribute name="DiffusionBValueZZ"		vr="FD" type="1"  vmmin="1" vmmax="1"/>
			</sequence>
			<attribute name="DiffusionAnisotropyType"			vr="CS" type="1C" vmmin="1" vmmax="1" condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=4]='DIFFUSION_ANISO' or ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=4]='DIFFUSION_ANISO'" mbpo="F">
				<definedtermslist valueselector="1">
					<definedterm value="FRACTIONAL"/>
					<definedterm value="RELATIVE"/>
					<definedterm value="VOLUME_RATIO"/>
				</definedtermslist>
			</attribute>
		</sequence>
	</definemacro>
	
	<definemacro name="MRAveragesMacro">
		<sequence name="MRAveragesSequence"					vr="SQ" type="1"  vmmin="1" vmmax="1">
			<attribute name="NumberOfAverages"				vr="DS" type="1C" vmmin="1" vmmax="1"	condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
				<verify test="number(NumberOfAverages/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			</attribute>
		</sequence>
	</definemacro>
	
	<definemacro name="MRSpatialSaturationMacro">
		<sequence name="MRSpatialSaturationSequence"				vr="SQ" type="2"  vmmin="0" vmmax="n">
			<attribute name="SlabThickness"					vr="FD" type="1"  vmmin="1" vmmax="1">
				<verify test="number(SlabThickness/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			</attribute>
			<attribute name="SlabOrientation"				vr="FD" type="1"  vmmin="3" vmmax="3"/>
			<attribute name="MidSlabPosition"				vr="FD" type="1"  vmmin="3" vmmax="3"/>
		</sequence>
	</definemacro>
	
	<definemacro name="MRMetaboliteMapMacro">
		<sequence name="MRMetaboliteMapSequence"				vr="SQ" type="1"  vmmin="1" vmmax="1">
			<attribute name="MetaboliteMapDescription"			vr="ST" type="1C" vmmin="1" vmmax="1"	condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T"/>
			<sequence name="MetaboliteMapCodeSequence"				vr="SQ" type="3"  vmmin="1" vmmax="1">
				<includemacro name="CodeSequenceMacro"/>
			</sequence>
			<sequence  name="ChemicalShiftSequence"				vr="SQ" type="3"  vmmin="1" vmmax="n">
				<attribute name="ChemicalShiftMinimumIntegrationLimitInppm"	vr="FD" type="1"  vmmin="1" vmmax="1">
					<verify test="number(ChemicalShiftMinimumIntegrationLimitInppm/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
				</attribute>
				<attribute name="ChemicalShiftMaximumIntegrationLimitInppm"	vr="FD" type="1"  vmmin="1" vmmax="1">
					<verify test="number(ChemicalShiftMaximumIntegrationLimitInppm/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
				</attribute>
			</sequence>
		</sequence>
	</definemacro>
	
	<definemacro name="MRVelocityEncodingMacro">
		<sequence name="MRVelocityEncodingSequence"				vr="SQ" type="1"  vmmin="1" vmmax="n">
			<attribute name="VelocityEncodingDirection"			vr="FD" type="1C" vmmin="3" vmmax="3"	condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T"/>
			<attribute name="VelocityEncodingMinimumValue"			vr="FD" type="1C" vmmin="1" vmmax="1"	condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T"/>
			<attribute name="VelocityEncodingMaximumValue"			vr="FD" type="1C" vmmin="1" vmmax="1"	condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
				<verify test="number(VelocityEncodingMaximumValue/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			</attribute>
		</sequence>
	</definemacro>	
	
	<definemacro name="MRArterialSpinLabelingMacro">
		<sequence name="MRArterialSpinLabelingSequence"		vr="SQ" type="1"  vmmin="1" vmmax="n">
			<attribute name="ASLTechniqueDescription"		vr="LO" type="2"  vmmin="1" vmmax="1"/>
			<attribute name="ASLContext"					vr="CS" type="1C" vmmin="1" vmmax="1" condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
				<enumeratedvalueslist valueselector="1">
					<enumeratedvalue value="CONTROL"/>
					<enumeratedvalue value="LABEL"/>
					<enumeratedvalue value="M_ZERO_SCAN"/>
				</enumeratedvalueslist>
			</attribute>
			<sequence name="ASLSlabSequence"				vr="SQ" type="1C" vmmin="1" vmmax="n" condition="ASLContext/value[@number=1]='CONTROL' or ASLContext/value[@number=1]='LABEL'" mbpo="T">
				<attribute name="ASLSlabNumber"				vr="US" type="1"  vmmin="1" vmmax="1"/>
				<includemacro name="GeneralAnatomyOptionalMacro"/>
				<attribute name="ASLSlabThickness"			vr="FD" type="1"  vmmin="1" vmmax="1"/>
				<attribute name="ASLSlabOrientation"		vr="FD" type="1"  vmmin="3" vmmax="3"/>
				<attribute name="ASLMidSlabPosition"		vr="FD" type="1"  vmmin="3" vmmax="3"/>
				<attribute name="ASLPulseTrainDuration"		vr="UL" type="1"  vmmin="1" vmmax="1"/>
			</sequence>
			<attribute name="ASLCrusherFlag"				vr="CS" type="1"  vmmin="1" vmmax="1">
				<enumeratedvalueslist valueselector="1">
					<enumeratedvalue value="YES"/>
					<enumeratedvalue value="NO"/>
				</enumeratedvalueslist>
			</attribute>
			<attribute name="ASLCrusherFlowLimit"			vr="FD" type="1C" vmmin="1" vmmax="1" condition="ASLCrusherFlag/value[@number=1]='YES'"/>
			<attribute name="ASLCrusherDescription"			vr="LO" type="1C" vmmin="1" vmmax="1" condition="ASLCrusherFlag/value[@number=1]='YES'"/>
			<attribute name="ASLBolusCutoffFlag"			vr="CS" type="1"  vmmin="1" vmmax="1">
				<enumeratedvalueslist valueselector="1">
					<enumeratedvalue value="ORIGINAL"/>
					<enumeratedvalue value="DERIVED"/>
					<enumeratedvalue value="MIXED"/>
				</enumeratedvalueslist>
			</attribute>
			<sequence name="ASLBolusCutoffTimingSequence"	vr="SQ" type="1C" vmmin="1" vmmax="1" condition="ASLBolusCutoffFlag/value[@number=1]='YES'">
				<attribute name="ASLBolusCutoffDelayTime"	vr="UL" type="1"  vmmin="1" vmmax="1"/>
				<attribute name="ASLBolusCutoffTechnique"	vr="LO" type="2"  vmmin="1" vmmax="1"/>
			</sequence>
		</sequence>
	</definemacro>
	
	<definemodule name="MRSpectroscopyModule">
		<includemacro name="MRImageAndMRSpectroscopyInstanceMacro"/>
		<attribute name="ImageType"					vr="CS" type="1" vmmin="4" vmmax="4">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="ORIGINAL"/>
				<enumeratedvalue value="DERIVED"/>
				<enumeratedvalue value="MIXED"/>
			</enumeratedvalueslist>
			<enumeratedvalueslist valueselector="2">
				<enumeratedvalue value="PRIMARY"/>
			</enumeratedvalueslist>
			<definedtermslist valueselector="3">
				<definedterm value="SPECTROSCOPY"/>
			</definedtermslist>
			<definedtermslist valueselector="4">
				<definedterm value="ADDITION"/>
				<definedterm value="DIVISION"/>
				<definedterm value="MAXIMUM"/>
				<definedterm value="MEAN"/>
				<definedterm value="MINIMUM"/>
				<definedterm value="MULTIPLICATION"/>
				<definedterm value="STD_DEVIATION"/>
				<definedterm value="SUBTRACTION"/>
				<definedterm value="NONE"/>
				<definedterm value="MIXED"/>
			</definedtermslist>
			<verify test="ImageType/value[@number=1]='ORIGINAL' and ImageType/value[@number=4]!='NONE'" status="Error" message="value 4 must be NONE when value 1 is ORIGINAL"/>
			<verify test="ImageType/value[@number=1]='DERIVED' and ImageType/value[@number=4]='NONE'" status="Error" message="value 4 must not be NONE when value 1 is DERIVED"/>
			<verify test="ImageType/value[@number=1]='MIXED' and ImageType/value[@number=4]!='MIXED'" status="Error" message="value 4 must be MIXED when value 1 is MIXED"/>
		</attribute>
		<includemacro name="MRSpectroscopyDescriptionAtImageLevelMacro"/>
		<attribute name="TransmitterFrequency"		vr="FD" type="1C"  vmmin="1" vmmax="2" condition="ImageType/value[@number=1]='ORIGINAL'" mbpo="T">
			<verify test="count(TransmitterFrequency/value) != DataPointRows/value[@number=1]" status="Error" message="VM must equal value of Data Point Rows"/>
			<verify test="number(TransmitterFrequency/value[@number=1])=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			<verify test="number(TransmitterFrequency/value[@number=2])=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
		</attribute>
		<attribute name="SpectralWidth"			vr="FD" type="1C"  vmmin="1" vmmax="2" condition="ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED'" mbpo="T">
			<verify test="count(SpectralWidth/value) != DataPointRows/value[@number=1]" status="Error" message="VM must equal value of Data Point Rows"/>
			<verify test="number(SpectralWidth/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
		</attribute>
		<attribute name="ChemicalShiftReference"	vr="FD" type="1C"  vmmin="1" vmmax="2" condition="ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED'" mbpo="T">
			<verify test="count(ChemicalShiftReference/value) != DataPointRows/value[@number=1]" status="Error" message="VM must equal value of Data Point Rows"/>
		</attribute>
		<attribute name="VolumeLocalizationTechnique"	vr="CS" type="1C"  vmmin="1" vmmax="1" condition="ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED'" mbpo="T">
			<definedtermslist valueselector="1">
				<definedterm value="ILOPS"/>
				<definedterm value="ISIS"/>
				<definedterm value="PRIME"/>
				<definedterm value="PRESS"/>
				<definedterm value="SLIM"/>
				<definedterm value="SLOOP"/>
				<definedterm value="STEAM"/>
				<definedterm value="NONE"/>
			</definedtermslist>
		</attribute>
		<sequence name="VolumeLocalizationSequence"	vr="SQ" type="1C" vmmin="1" vmmax="n" condition="VolumeLocalizationTechnique/value[@number=1] != 'NONE' and (ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED')" mbpo="T">
			<verify test="VolumeLocalizationTechnique/value[@number=1]='NONE'" status="Error" message="may not be present when VolumeLocalizationTechnique is NONE"/>
			<attribute name="SlabThickness"		vr="FD" type="1"  vmmin="1" vmmax="1"/>
			<attribute name="SlabOrientation"	vr="FD" type="1"  vmmin="3" vmmax="3"/>
			<attribute name="MidSlabPosition"	vr="FD" type="1"  vmmin="3" vmmax="3"/>
		</sequence>
		<attribute name="Decoupling"			vr="CS" type="1C" vmmin="1" vmmax="1" condition="ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED'" mbpo="T">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="YES"/>
				<enumeratedvalue value="NO"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="DecoupledNucleus"		vr="CS" type="1C"  vmmin="1" vmmax="2" condition="Decoupling/value[@number=1]='YES'" mbpo="F">
			<verify test="count(DecoupledNucleus/value) != DataPointRows/value[@number=1]" status="Error" message="VM must equal value of Data Point Rows"/>
			<definedtermslist valueselector="1">
				<definedterm value="1H"/>
				<definedterm value="3HE"/>
				<definedterm value="7LI"/>
				<definedterm value="13C"/>
				<definedterm value="19F"/>
				<definedterm value="23NA"/>
				<definedterm value="31P"/>
				<definedterm value="129XE"/>
			</definedtermslist>
			<definedtermslist valueselector="2">
				<definedterm value="1H"/>
				<definedterm value="3HE"/>
				<definedterm value="7LI"/>
				<definedterm value="13C"/>
				<definedterm value="19F"/>
				<definedterm value="23NA"/>
				<definedterm value="31P"/>
				<definedterm value="129XE"/>
			</definedtermslist>
		</attribute>
		<attribute name="DecouplingFrequency"		vr="FD" type="1C"  vmmin="1" vmmax="2" condition="Decoupling/value[@number=1]='YES'" mbpo="F">
			<verify test="count(DecouplingFrequency/value) != DataPointRows/value[@number=1]" status="Error" message="VM must equal value of Data Point Rows"/>
			<verify test="number(DecouplingFrequency/value[@number=1])=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			<verify test="number(DecouplingFrequency/value[@number=2])=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
		</attribute>
		<attribute name="DecouplingMethod"		vr="CS" type="1C"  vmmin="1" vmmax="1" condition="Decoupling/value[@number=1]='YES'" mbpo="F">
			<definedtermslist valueselector="1">
				<definedterm value="MLEV"/>
				<definedterm value="WALTZ"/>
				<definedterm value="NARROWBAND"/>
			</definedtermslist>
		</attribute>
		<attribute name="DecouplingChemicalShiftReference"	vr="FD" type="1C"  vmmin="1" vmmax="2" condition="Decoupling/value[@number=1]='YES'" mbpo="F">
			<verify test="count(DecouplingChemicalShiftReference/value) != DataPointRows/value[@number=1]" status="Error" message="VM must equal value of Data Point Rows"/>
		</attribute>
		<attribute name="TimeDomainFiltering"		vr="CS" type="1C"  vmmin="1" vmmax="2" condition="ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED'" mbpo="T">
			<verify test="count(TimeDomainFiltering/value) != DataPointRows/value[@number=1]" status="Error" message="VM must equal value of Data Point Rows"/>
			<definedtermslist>
				<definedterm value="COSINE"/>
				<definedterm value="COSINE_SQUARED"/>
				<definedterm value="EXPONENTIAL"/>
				<definedterm value="GAUSSIAN"/>
				<definedterm value="HAMMING"/>
				<definedterm value="HANNING"/>
				<definedterm value="LORENTZIAN"/>
				<definedterm value="LRNTZ_GSS_TRNSFM"/>
				<definedterm value="NONE"/>
			</definedtermslist>
		</attribute>
		<attribute name="NumberOfZeroFills"		vr="US" type="1C"  vmmin="1" vmmax="2" condition="ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED'" mbpo="T">
			<verify test="count(NumberOfZeroFills/value) != DataPointRows/value[@number=1]" status="Error" message="VM must equal value of Data Point Rows"/>
		</attribute>
		<attribute name="BaselineCorrection"		vr="CS" type="1C"  vmmin="1" vmmax="1" condition="ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED'" mbpo="T">
			<definedtermslist valueselector="1">
				<definedterm value="LINEAR_TILT"/>
				<definedterm value="LOCAL_LINEAR_FIT"/>
				<definedterm value="POLYNOMIAL_FIT"/>
				<definedterm value="SINC_DECONVOLUTION"/>
				<definedterm value="TIME_DOMAIN_FIT"/>
				<definedterm value="SPLINE"/>
				<definedterm value="NONE"/>
			</definedtermslist>
		</attribute>
		<attribute name="FrequencyCorrection"		vr="CS" type="1C"  vmmin="1" vmmax="1" condition="ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED'" mbpo="T">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="YES"/>
				<enumeratedvalue value="NO"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="FirstOrderPhaseCorrection"	vr="CS" type="1C"  vmmin="1" vmmax="1" condition="ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED'" mbpo="T">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="YES"/>
				<enumeratedvalue value="NO"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="WaterReferencedPhaseCorrection"	vr="CS" type="1C"  vmmin="1" vmmax="1" condition="ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED'" mbpo="T">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="YES"/>
				<enumeratedvalue value="NO"/>
			</enumeratedvalueslist>
		</attribute>
	</definemodule>

	<definemodule name="MRSpectroscopyPulseSequenceModule">
		<attribute name="PulseSequenceName"		vr="SH" type="1C" vmmin="1" vmmax="1" condition="ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED'" mbpo="T"/>
		<attribute name="MRSpectroscopyAcquisitionType"	vr="CS" type="1C" vmmin="1" vmmax="1" condition="ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED'" mbpo="T">
			<definedtermslist valueselector="1">
				<definedterm value="SINGLE_VOXEL"/>
				<definedterm value="ROW"/>
				<definedterm value="PLANE"/>
				<definedterm value="VOLUME"/>
			</definedtermslist>
		</attribute>
		<attribute name="EchoPulseSequence"		vr="CS" type="1C" vmmin="1" vmmax="1" condition="ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED'" mbpo="T">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="SPIN"/>
				<enumeratedvalue value="GRADIENT"/>
				<enumeratedvalue value="BOTH"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="MultipleSpinEcho"		vr="CS" type="1C" vmmin="1" vmmax="1" condition="(ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED')
														     and (EchoPulseSequence/value[@number=1]='SPIN' or EchoPulseSequence/value[@number=1]='BOTH')" mbpo="T">
			<verify test="EchoPulseSequence/value[@number=1]!='SPIN' and EchoPulseSequence/value[@number=1]!='BOTH'" status="Error" message="Can only be present when EchoPulseSequence is SPIN or BOTH"/>
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="YES"/>
				<enumeratedvalue value="NO"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="MultiPlanarExcitation"		vr="CS" type="1C" vmmin="1" vmmax="1" condition="ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED'" mbpo="T">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="YES"/>
				<enumeratedvalue value="NO"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="SteadyStatePulseSequence"	vr="CS" type="1C" vmmin="1" vmmax="1" condition="ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED'" mbpo="T">
			<definedtermslist valueselector="1">
				<definedterm value="FREE_PRECESSION"/>
				<definedterm value="TRANSVERSE"/>
				<definedterm value="TIME_REVERSED"/>
				<definedterm value="LONGITUDINAL"/>
				<definedterm value="NONE"/>
			</definedtermslist>
		</attribute>
		<attribute name="EchoPlanarPulseSequence"	vr="CS" type="1C" vmmin="1" vmmax="1" condition="ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED'" mbpo="T">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="YES"/>
				<enumeratedvalue value="NO"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="SpectrallySelectedSuppression"	vr="CS" type="1C" vmmin="1" vmmax="1" condition="ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED'" mbpo="T">
			<definedtermslist valueselector="1">
				<definedterm value="FAT"/>
				<definedterm value="WATER"/>
				<definedterm value="FAT_AND_WATER"/>
				<definedterm value="SILICON_GEL"/>
				<definedterm value="NONE"/>
			</definedtermslist>
		</attribute>
		<attribute name="GeometryOfKSpaceTraversal"	vr="CS" type="1C" vmmin="1" vmmax="1" condition="ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED'" mbpo="T">
			<definedtermslist valueselector="1">
				<definedterm value="RECTILINEAR"/>
				<definedterm value="RADIAL"/>
				<definedterm value="SPIRAL"/>
			</definedtermslist>
		</attribute>
		<attribute name="RectilinearPhaseEncodeReordering"	vr="CS" type="1C" vmmin="1" vmmax="1" condition="(ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED')
														     and  GeometryOfKSpaceTraversal/value[@number=1]='RECTILINEAR'" mbpo="T">
			<verify test="GeometryOfKSpaceTraversal/value[@number=1]!='RECTILINEAR'" status="Error" message="Can only be present when GeometryOfKSpaceTraversal is RECTILINEAR"/>
			<definedtermslist valueselector="1">
				<definedterm value="LINEAR"/>
				<definedterm value="CENTRIC"/>
				<definedterm value="SEGMENTED"/>
				<definedterm value="REVERSE_LINEAR"/>
				<definedterm value="REVERSE_CENTRIC"/>
			</definedtermslist>
		</attribute>
		<attribute name="SegmentedKSpaceTraversal"	vr="CS" type="1C" vmmin="1" vmmax="1" condition="ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED'" mbpo="T">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="SINGLE"/>
				<enumeratedvalue value="PARTIAL"/>
				<enumeratedvalue value="FULL"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="CoverageOfKSpace"		vr="CS" type="1C" vmmin="1" vmmax="1" condition="(ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED')
															     and  MRSpectroscopyAcquisitionType/value[@number=1]='VOLUME'" mbpo="T">
			<verify test="MRAcquisitionType/value[@number=1]!='VOLUME'" status="Error" message="Can only be present when MRSpectroscopyAcquisitionType is VOLUME"/>
			<definedtermslist valueselector="1">
				<definedterm value="FULL"/>
				<definedterm value="CYLINDRICAL"/>
				<definedterm value="ELLIPSOIDAL"/>
				<definedterm value="WEIGHTED"/>
			</definedtermslist>
		</attribute>
		<attribute name="NumberOfKSpaceTrajectories"	vr="US" type="1C" vmmin="1" vmmax="1" condition="ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED'" mbpo="T"/>
	</definemodule>

	<definemodule name="MRSpectroscopyDataModule">
		<attribute name="Rows"				vr="US" type="1" vmmin="1" vmmax="1">
			<verify test="number(Rows/value)=0" status="Error" message="value of 0 is illegal"/>
		</attribute>
		<attribute name="Columns"			vr="US" type="1" vmmin="1" vmmax="1">
			<verify test="number(Columns/value)=0" status="Error" message="value of 0 is illegal"/>
		</attribute>
		<attribute name="DataPointRows"			vr="UL" type="1" vmmin="1" vmmax="1">
			<verify test="number(DataPointRows/value)=0" status="Error" message="value of 0 is illegal"/>
		</attribute>
		<attribute name="DataPointColumns"		vr="UL" type="1" vmmin="1" vmmax="1">
			<verify test="number(DataPointColumns/value)=0" status="Error" message="value of 0 is illegal"/>
		</attribute>
		<attribute name="DataRepresentation"		vr="CS" type="1" vmmin="1" vmmax="1">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="COMPLEX"/>
				<enumeratedvalue value="REAL"/>
				<enumeratedvalue value="IMAGINARY"/>
				<enumeratedvalue value="MAGNITUDE"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="SignalDomainColumns"		vr="CS" type="1" vmmin="1" vmmax="1">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="FREQUENCY"/>
				<enumeratedvalue value="TIME"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="SignalDomainRows"		vr="CS" type="1C" vmmin="1" vmmax="1" condition="DataPointRows/value[@number=1] &gt; 1 or ImageType/value[@number=1]='MIXED'" mbpo="F">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="FREQUENCY"/>
				<enumeratedvalue value="TIME"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="FirstOrderPhaseCorrectionAngle"	vr="OF" type="1C" vmmin="1" vmmax="1" condition="FirstOrderPhaseCorrection/value[@number=1] = 'YES'" mbpo="F"/>
		<attribute name="SpectroscopyData"			vr="OF" type="1"  vmmin="1" vmmax="1"/>
	</definemodule>

	<definemacro name="MRSpectroscopyFrameTypeMacro">
		<sequence name="MRSpectroscopyFrameTypeSequence"	vr="SQ" type="1" vmmin="1" vmmax="1">
			<attribute name="FrameType"			vr="CS" type="1" vmmin="4" vmmax="4">
				<enumeratedvalueslist valueselector="1">
					<enumeratedvalue value="ORIGINAL"/>
					<enumeratedvalue value="DERIVED"/>
				</enumeratedvalueslist>
				<enumeratedvalueslist valueselector="2">
					<enumeratedvalue value="PRIMARY"/>
				</enumeratedvalueslist>
				<definedtermslist valueselector="3">
					<definedterm value="SPECTROSCOPY"/>
				</definedtermslist>
				<definedtermslist valueselector="4">
					<definedterm value="ADDITION"/>
					<definedterm value="DIVISION"/>
					<definedterm value="MAXIMUM"/>
					<definedterm value="MEAN"/>
					<definedterm value="MINIMUM"/>
					<definedterm value="MULTIPLICATION"/>
					<definedterm value="STD_DEVIATION"/>
					<definedterm value="SUBTRACTION"/>
					<definedterm value="NONE"/>
				</definedtermslist>
				<verify test="FrameType/value[@number=1]='ORIGINAL' and FrameType/value[@number=4]!='NONE'" status="Error" message="value 4 must be NONE when value 1 is ORIGINAL"/>
				<verify test="FrameType/value[@number=1]='DERIVED' and FrameType/value[@number=4]='NONE'" status="Error" message="value 4 must not be NONE when value 1 is DERIVED"/>
			</attribute>
			<includemacro name="MRSpectroscopyDescriptionAtFrameLevelMacro"/>
		</sequence>
	</definemacro>

	<definemacro name="MRSpectroscopyFOVGeometryMacro">
		<sequence name="MRSpectroscopyFOVGeometrySequence"			vr="SQ" type="1" vmmin="1" vmmax="1">
			<attribute name="SpectroscopyAcquisitionDataColumns"		vr="UL" type="1C"  vmmin="1" vmmax="1" condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T"/>
			<attribute name="SpectroscopyAcquisitionPhaseRows"		vr="UL" type="1C"  vmmin="1" vmmax="1" condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T"/>
			<attribute name="SpectroscopyAcquisitionPhaseColumns"		vr="UL" type="1C"  vmmin="1" vmmax="1" condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T"/>
			<attribute name="SpectroscopyAcquisitionOutOfPlanePhaseSteps"	vr="UL" type="1C"  vmmin="1" vmmax="1" condition="/DicomObject/MRAcquisitionType/value[@number=1]='PLANE' and (/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL'))" mbpo="T"/>
			<attribute name="PercentSampling"				vr="DS" type="1C"  vmmin="1" vmmax="1" condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T"/>
			<attribute name="PercentPhaseFieldOfView"			vr="DS" type="1C"  vmmin="1" vmmax="1" condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/MRImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T"/>
		</sequence>
	</definemacro>

	<definemodule name="CTSeriesModule">
		<attribute name="Modality"					vr="CS" type="1"  vmmin="1" vmmax="1">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="CT"/>
			</enumeratedvalueslist>
		</attribute>
		<sequence name="ReferencedPerformedProcedureStepSequence"	vr="SQ" type="1C" vmmin="1" vmmax="1" nocondition="">
			<includemacro name="SOPInstanceReferenceMacro"/>
		</sequence>
	</definemodule>
	
	
	<definemodule name="EnhancedCTImageModule">
		<attribute name="ImageType"					vr="CS" type="1" vmmin="4" vmmax="4">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="ORIGINAL"/>
				<enumeratedvalue value="DERIVED"/>
				<enumeratedvalue value="MIXED"/>
			</enumeratedvalueslist>
			<enumeratedvalueslist valueselector="2">
				<enumeratedvalue value="PRIMARY"/>
			</enumeratedvalueslist>
			<definedtermslist valueselector="3">
				<definedterm value="ANGIO"/>
				<definedterm value="CARDIAC"/>
				<definedterm value="CARDIAC_GATED"/>
				<definedterm value="CARDRESP_GATED"/>
				<definedterm value="DYNAMIC"/>
				<definedterm value="FLUOROSCOPY"/>
				<definedterm value="LOCALIZER"/>
				<definedterm value="MOTION"/>
				<definedterm value="PERFUSION"/>
				<definedterm value="PRE_CONTRAST"/>
				<definedterm value="POST_CONTRAST"/>
				<definedterm value="RESP_GATED"/>
				<definedterm value="REST"/>
				<definedterm value="STATIC"/>
				<definedterm value="STRESS"/>
				<definedterm value="VOLUME"/>
				<definedterm value="NON_PARALLEL"/>
				<definedterm value="PARALLEL"/>
				<definedterm value="WHOLE_BODY"/>
				<definedterm value="ATTENUATION"/>
				<definedterm value="CARDIAC_CTA"/>
				<definedterm value="CARDIAC_CASCORE"/>
				<definedterm value="REFERENCE"/>
			</definedtermslist>
			<definedtermslist valueselector="4">
				<definedterm value="FILTERED"/>
				<definedterm value="MEDIAN"/>
				<definedterm value="ENERGY_PROP_WT"/>
				<definedterm value="ADDITION"/>
				<definedterm value="DIVISION"/>
				<definedterm value="MASKED"/>
				<definedterm value="MAXIMUM"/>
				<definedterm value="MEAN"/>
				<definedterm value="MINIMUM"/>
				<definedterm value="MTT"/>
				<definedterm value="MULTIPLICATION"/>
				<definedterm value="RCBF"/>
				<definedterm value="RCBV"/>
				<definedterm value="RESAMPLED"/>
				<definedterm value="STD_DEVIATION"/>
				<definedterm value="SUBTRACTION"/>
				<definedterm value="T_TEST"/>
				<definedterm value="TTP"/>
				<definedterm value="Z_SCORE"/>
				<definedterm value="NONE"/>
				<definedterm value="MIXED"/>
			</definedtermslist>
			<verify test="ImageType/value[@number=1]='ORIGINAL' and ImageType/value[@number=4]!='NONE'" status="Error" message="value 4 must be NONE when value 1 is ORIGINAL"/>
			<verify test="ImageType/value[@number=1]='DERIVED' and ImageType/value[@number=4]='NONE'" status="Error" message="value 4 must not be NONE when value 1 is DERIVED"/>
			<verify test="ImageType/value[@number=1]='MIXED' and ImageType/value[@number=4]!='MIXED'" status="Error" message="value 4 must be MIXED when value 1 is MIXED"/>
		</attribute>
		<includemacro name="CommonCTMRImageDescriptionAtImageLevelMacro"/>
		<attribute name="AcquisitionNumber"				vr="IS" type="3" vmmin="1" vmmax="1"/>
		<attribute name="AcquisitionDateTime"				vr="DT" type="1C" vmmin="1" vmmax="1" condition="(ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED') and /DicomObject/SOPClassUID != '1.2.840.10008.5.1.4.1.1.2.2'" mbpo="T"/>
		<attribute name="AcquisitionDuration"				vr="FD" type="2C" vmmin="1" vmmax="1" condition="(ImageType/value[@number=1]='ORIGINAL' or ImageType/value[@number=1]='MIXED') and /DicomObject/SOPClassUID != '1.2.840.10008.5.1.4.1.1.2.2'" mbpo="T">
			<verify test="number(AcquisitionDuration/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
		</attribute>
		<sequence name="ReferencedRawDataSequence"			vr="SQ" type="3" vmmin="" vmmax="">
			<includemacro name="HierarchicalSOPInstanceReferenceMacro"/>
		</sequence>
		<sequence name="ReferencedWaveformSequence"			vr="SQ" type="3" vmmin="" vmmax="">
			<includemacro name="HierarchicalSOPInstanceReferenceMacro"/>
		</sequence>
		<sequence name="ReferencedImageEvidenceSequence"		vr="SQ" type="1C" vmmin="" vmmax="" condition="count(//ReferencedImageSequence) &gt; 0" mbpo="F">
			<includemacro name="HierarchicalSOPInstanceReferenceMacro"/>
		</sequence>
		<sequence name="SourceImageEvidenceSequence"			vr="SQ" type="1C" vmmin="" vmmax="" condition="count(//SourceImageSequence) &gt; 0" mbpo="F">
			<includemacro name="HierarchicalSOPInstanceReferenceMacro"/>
		</sequence>
		<sequence name="ReferencedPresentationStateSequence"	vr="SQ" type="1C" vmmin="" vmmax="" nocondition="">
			<includemacro name="HierarchicalSOPInstanceReferenceMacro"/>
		</sequence>
		<attribute name="SamplesPerPixel"				vr="US" type="1" vmmin="1" vmmax="1">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="1"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="PhotometricInterpretation"			vr="CS" type="1" vmmin="1" vmmax="1">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="MONOCHROME2"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="LargestMonochromePixelValue"			vr="US" type="3" vmmin="1" vmmax="1">
			<verify test="count(LargestMonochromePixelValue) != 0" status="Warning" message="LargestMonochromePixelValue is retired and should not be used"/>
			<verify test="LargestMonochromePixelValue/value + 1 != RedPaletteColorLookupTableDescriptor/value[@number=2]" status="Error" message="LargestMonochromePixelValue should be one less than RedPaletteColorLookupTableDescriptor value 2"/>
			<verify test="LargestMonochromePixelValue/value + 1 != GreenPaletteColorLookupTableDescriptor/value[@number=2]" status="Error" message="LargestMonochromePixelValue should be one less than GreenPaletteColorLookupTableDescriptor value 2"/>
			<verify test="LargestMonochromePixelValue/value + 1 != BluePaletteColorLookupTableDescriptor/value[@number=2]" status="Error" message="LargestMonochromePixelValue should be one less than BluePaletteColorLookupTableDescriptor value 2"/>
		</attribute>
		<attribute name="BitsAllocated" vr="US" type="1" vmmin="1" vmmax="1">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="16"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="BitsStored"					vr="US" type="1" vmmin="1" vmmax="1">
			<enumeratedvalueslist valueselector="1"><enumeratedvalue value="12"/><enumeratedvalue value="16"/></enumeratedvalueslist>
		</attribute>
		<attribute name="HighBit"					vr="US" type="1" vmmin="1" vmmax="1">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="11"/>
				<enumeratedvalue value="15"/>
			</enumeratedvalueslist>
			<verify test="BitsStored/value != (HighBit/value + 1)" status="Error" message="Must be one less than BitsStored"/>
		</attribute>
		<attribute name="ContentQualification"				vr="CS" type="1C" vmmin="1" vmmax="1" condition="/DicomObject/SOPClassUID != '1.2.840.10008.5.1.4.1.1.2.2'" mbpo="T">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="PRODUCT"/>
				<enumeratedvalue value="RESEARCH"/>
				<enumeratedvalue value="SERVICE"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="ImageComments"						vr="LT" type="3"  vmmin="1" vmmax="1"/>
		<attribute name="BurnedInAnnotation"				vr="CS" type="1C" vmmin="1" vmmax="1" condition="/DicomObject/SOPClassUID != '1.2.840.10008.5.1.4.1.1.2.2'" mbpo="T">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="NO"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="RecognizableVisualFeatures"		vr="CS" type="3" vmmin="1" vmmax="1">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="YES"/>
				<enumeratedvalue value="NO"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="LossyImageCompression"				vr="CS" type="1C" vmmin="1" vmmax="1" condition="/DicomObject/SOPClassUID != '1.2.840.10008.5.1.4.1.1.2.2'" mbpo="T">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="00"/>
				<enumeratedvalue value="01"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="LossyImageCompressionRatio"			vr="DS" type="1C" vmmin="1" vmmax="n" condition="LossyImageCompression/value='01'"/>
		<attribute name="LossyImageCompressionMethod"			vr="CS" type="1C" vmmin="1" vmmax="n" condition="LossyImageCompression/value='01'"/>
		<attribute name="PresentationLUTShape"					vr="CS" type="1" vmmin="1" vmmax="1">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="IDENTITY"/>
			</enumeratedvalueslist>
		</attribute>
		<includemacro name="OptionalViewAndSliceProgressionDirectionMacro"/>
	</definemodule>
	
	<definemacro name="CTImageFrameTypeMacro">
		<sequence name="CTImageFrameTypeSequence"				vr="SQ" type="1" vmmin="1" vmmax="1">
			<attribute name="FrameType"					vr="CS" type="1" vmmin="4" vmmax="4">
				<enumeratedvalueslist valueselector="1">
					<enumeratedvalue value="ORIGINAL"/>
					<enumeratedvalue value="DERIVED"/>
				</enumeratedvalueslist>
				<enumeratedvalueslist valueselector="2">
					<enumeratedvalue value="PRIMARY"/>
				</enumeratedvalueslist>
					<definedtermslist valueselector="3">
					<definedterm value="ANGIO"/>
					<definedterm value="CARDIAC"/>
					<definedterm value="CARDIAC_GATED"/>
					<definedterm value="CARDRESP_GATED"/>
					<definedterm value="DYNAMIC"/>
					<definedterm value="FLUOROSCOPY"/>
					<definedterm value="LOCALIZER"/>
					<definedterm value="MOTION"/>
					<definedterm value="PERFUSION"/>
					<definedterm value="PRE_CONTRAST"/>
					<definedterm value="POST_CONTRAST"/>
					<definedterm value="RESP_GATED"/>
					<definedterm value="REST"/>
					<definedterm value="STATIC"/>
					<definedterm value="STRESS"/>
					<definedterm value="VOLUME"/>
					<definedterm value="NON_PARALLEL"/>
					<definedterm value="PARALLEL"/>
					<definedterm value="WHOLE_BODY"/>
					<definedterm value="ATTENUATION"/>
					<definedterm value="CARDIAC_CTA"/>
					<definedterm value="CARDIAC_CASCORE"/>
					<definedterm value="REFERENCE"/>
				</definedtermslist>
				<definedtermslist valueselector="4">
					<definedterm value="FILTERED"/>
					<definedterm value="MEDIAN"/>
					<definedterm value="ENERGY_PROP_WT"/>
					<definedterm value="ADDITION"/>
					<definedterm value="DIVISION"/>
					<definedterm value="MASKED"/>
					<definedterm value="MAXIMUM"/>
					<definedterm value="MEAN"/>
					<definedterm value="MINIMUM"/>
					<definedterm value="MTT"/>
					<definedterm value="MULTIPLICATION"/>
					<definedterm value="RCBF"/>
					<definedterm value="RCBV"/>
					<definedterm value="RESAMPLED"/>
					<definedterm value="STD_DEVIATION"/>
					<definedterm value="SUBTRACTION"/>
					<definedterm value="T_TEST"/>
					<definedterm value="TTP"/>
					<definedterm value="Z_SCORE"/>
					<definedterm value="NONE"/>
				</definedtermslist>
				<verify test="FrameType/value[@number=1]='ORIGINAL' and FrameType/value[@number=4]!='NONE'" status="Error" message="value 4 must be NONE when value 1 is ORIGINAL"/>
				<verify test="FrameType/value[@number=1]='DERIVED' and FrameType/value[@number=4]='NONE'" status="Error" message="value 4 must not be NONE when value 1 is DERIVED"/>
			</attribute>
			<includemacro name="CommonCTMRImageDescriptionAtFrameLevelMacro"/>
		</sequence>
	</definemacro>

	<definemacro name="CTAcquisitionTypeMacro">
		<sequence name="CTAcquisitionTypeSequence"				vr="SQ" type="1"  vmmin="1" vmmax="1">
			<attribute name="AcquisitionType"				vr="CS" type="1C" vmmin="1" vmmax="1"	condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
				<definedtermslist valueselector="1">
					<definedterm value="SEQUENCED"/>
					<definedterm value="SPIRAL"/>
					<definedterm value="CONSTANT_ANGLE"/>
					<definedterm value="STATIONARY"/>
					<definedterm value="FREE"/>
				</definedtermslist>
				<verify test="AcquisitionType/value!='CONSTANT_ANGLE' and ../../CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=3]='LOCALIZER'" status="Warning" message="expect AcquisitionType to be CONSTANT_ANGLE when FrameType value 3 is LOCALIZER"/>
			</attribute>
			<attribute name="TubeAngle"					vr="FD" type="1C" vmmin="1" vmmax="1"	condition="(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')) and AcquisitionType/value='CONSTANT_ANGLE'" mbpo="T">
				<verify test="AcquisitionType/value!='CONSTANT_ANGLE'" status="Error" message="should not be present unless AcquisitionType is CONSTANT_ANGLE"/>
				<verify test="TubeAngle/value &lt; 0 and TubeAngle/value &gt; 360" status="Error" message="value should be between 0 and +360 degrees inclusive"/>
			</attribute>
			<attribute name="ConstantVolumeFlag"				vr="CS" type="1C" vmmin="1" vmmax="1"	condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
				<enumeratedvalueslist valueselector="1">
					<enumeratedvalue value="YES"/>
					<enumeratedvalue value="NO"/>
				</enumeratedvalueslist>
			</attribute>
			<attribute name="FluoroscopyFlag"				vr="CS" type="1C" vmmin="1" vmmax="1"	condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
				<enumeratedvalueslist valueselector="1">
					<enumeratedvalue value="YES"/>
					<enumeratedvalue value="NO"/>
				</enumeratedvalueslist>
			</attribute>
		</sequence>
	</definemacro>

	<definemacro name="CTAcquisitionDetailsMacro">
		<sequence name="CTAcquisitionDetailsSequence"				vr="SQ" type="1"  vmmin="1" vmmax="1">
			<attribute name="RotationDirection"				vr="CS" type="1C" vmmin="1" vmmax="1"	condition="(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')) and not (/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTAcquisitionTypeSequence/Item[@number=1]/AcquisitionType/value='CONSTANT_ANGLE' or
(name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTAcquisitionTypeSequence/Item[@number=1]/AcquisitionType/value='CONSTANT_ANGLE') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item/CTAcquisitionTypeSequence/Item[@number=1]/AcquisitionType/value='CONSTANT_ANGLE'))" mbpo="T">
				<verify test="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTAcquisitionTypeSequence/Item[@number=1]/AcquisitionType/value='CONSTANT_ANGLE' or
(name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTAcquisitionTypeSequence/Item[@number=1]/AcquisitionType/value='CONSTANT_ANGLE') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item/CTAcquisitionTypeSequence/Item[@number=1]/AcquisitionType/value='CONSTANT_ANGLE')" status="Error" message="should not be present if AcquisitionType is CONSTANT_ANGLE"/>
				<enumeratedvalueslist valueselector="1">
					<enumeratedvalue value="CW"/>
					<enumeratedvalue value="CC"/>
				</enumeratedvalueslist>
			</attribute>
			<attribute name="RevolutionTime"				vr="FD" type="1C" vmmin="1" vmmax="1"	condition="(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')) and not (/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTAcquisitionTypeSequence/Item[@number=1]/AcquisitionType/value='CONSTANT_ANGLE' or
(name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTAcquisitionTypeSequence/Item[@number=1]/AcquisitionType/value='CONSTANT_ANGLE') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item/CTAcquisitionTypeSequence/Item[@number=1]/AcquisitionType/value='CONSTANT_ANGLE'))" mbpo="T">
				<verify test="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTAcquisitionTypeSequence/Item[@number=1]/AcquisitionType/value='CONSTANT_ANGLE' or
(name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTAcquisitionTypeSequence/Item[@number=1]/AcquisitionType/value='CONSTANT_ANGLE') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item/CTAcquisitionTypeSequence/Item[@number=1]/AcquisitionType/value='CONSTANT_ANGLE')" status="Error" message="should not be present if AcquisitionType is CONSTANT_ANGLE"/>
				<verify test="number(RevolutionTime/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			</attribute>
			<attribute name="SingleCollimationWidth"			vr="FD" type="1C" vmmin="1" vmmax="1"	condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
				<verify test="number(SingleCollimationWidth/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			</attribute>
			<attribute name="TotalCollimationWidth"				vr="FD" type="1C" vmmin="1" vmmax="1"	condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
				<verify test="number(TotalCollimationWidth/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			</attribute>
			<attribute name="TableHeight"					vr="DS" type="1C" vmmin="1" vmmax="1"	condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
				<verify test="number(TableHeight/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			</attribute>
			<attribute name="GantryDetectorTilt"				vr="DS" type="1C" vmmin="1" vmmax="1"	condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
				<verify test="GantryDetectorTilt/value &lt; -90 and GantryDetectorTilt/value &gt; 90" status="Error" message="value should be between -90 and +90 degrees inclusive"/>
			</attribute>
			<attribute name="DataCollectionDiameter"			vr="DS" type="1C" vmmin="1" vmmax="1"	condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
				<verify test="number(DataCollectionDiameter/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			</attribute>
		</sequence>
	</definemacro>

	<definemacro name="CTTableDynamicsMacro">
		<sequence name="CTTableDynamicsSequence"			vr="SQ" type="1"  vmmin="1" vmmax="1">
			<attribute name="TableSpeed"				vr="FD" type="1C" vmmin="1" vmmax="1"	condition="(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')) and ((/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTAcquisitionTypeSequence/Item[@number=1]/AcquisitionType/value='CONSTANT_ANGLE' or
(name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTAcquisitionTypeSequence/Item[@number=1]/AcquisitionType/value='CONSTANT_ANGLE') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item/CTAcquisitionTypeSequence/Item[@number=1]/AcquisitionType/value='CONSTANT_ANGLE')) or (/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTAcquisitionTypeSequence/Item[@number=1]/AcquisitionType/value='SPIRAL' or
(name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTAcquisitionTypeSequence/Item[@number=1]/AcquisitionType/value='SPIRAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item/CTAcquisitionTypeSequence/Item[@number=1]/AcquisitionType/value='SPIRAL')))" mbpo="T">
				<verify test="not (/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTAcquisitionTypeSequence/Item[@number=1]/AcquisitionType/value='CONSTANT_ANGLE' or
(name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTAcquisitionTypeSequence/Item[@number=1]/AcquisitionType/value='CONSTANT_ANGLE') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item/CTAcquisitionTypeSequence/Item[@number=1]/AcquisitionType/value='CONSTANT_ANGLE')) and not (/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTAcquisitionTypeSequence/Item[@number=1]/AcquisitionType/value='SPIRAL' or
(name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTAcquisitionTypeSequence/Item[@number=1]/AcquisitionType/value='SPIRAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item/CTAcquisitionTypeSequence/Item[@number=1]/AcquisitionType/value='SPIRAL'))" status="Error" message="should not be present if AcquisitionType is not CONSTANT_ANGLE or SPIRAL"/>
				<verify test="number(TableSpeed/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			</attribute>
			<attribute name="TableFeedPerRotation"			vr="FD" type="1C" vmmin="1" vmmax="1"	condition="(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')) and (/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTAcquisitionTypeSequence/Item[@number=1]/AcquisitionType/value='SPIRAL' or
(name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTAcquisitionTypeSequence/Item[@number=1]/AcquisitionType/value='SPIRAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item/CTAcquisitionTypeSequence/Item[@number=1]/AcquisitionType/value='SPIRAL'))" mbpo="T">
				<verify test="not (/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTAcquisitionTypeSequence/Item[@number=1]/AcquisitionType/value='SPIRAL' or
(name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTAcquisitionTypeSequence/Item[@number=1]/AcquisitionType/value='SPIRAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item/CTAcquisitionTypeSequence/Item[@number=1]/AcquisitionType/value='SPIRAL'))" status="Error" message="should not be present if AcquisitionType is not SPIRAL"/>
				<verify test="number(TableFeedPerRotation/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			</attribute>
			<attribute name="SpiralPitchFactor"			vr="FD" type="1C" vmmin="1" vmmax="1"	condition="(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')) and (/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTAcquisitionTypeSequence/Item[@number=1]/AcquisitionType/value='SPIRAL' or
(name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTAcquisitionTypeSequence/Item[@number=1]/AcquisitionType/value='SPIRAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item/CTAcquisitionTypeSequence/Item[@number=1]/AcquisitionType/value='SPIRAL'))" mbpo="T">
				<verify test="not (/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTAcquisitionTypeSequence/Item[@number=1]/AcquisitionType/value='SPIRAL' or
(name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTAcquisitionTypeSequence/Item[@number=1]/AcquisitionType/value='SPIRAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item/CTAcquisitionTypeSequence/Item[@number=1]/AcquisitionType/value='SPIRAL'))" status="Error" message="should not be present if AcquisitionType is not SPIRAL"/>
				<verify test="number(SpiralPitchFactor/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
				<verify test="count(../../CTAcquisitionDetailsSequence) &gt; 0
					  and not (round(number(SpiralPitchFactor/value) * 100) = round(number(TableFeedPerRotation/value)
						div number(../../CTAcquisitionDetailsSequence/Item[@number=1]/TotalCollimationWidth/value)
						* 100))"
					  status="Warning" message="value inconsistent with TableFeedPerRotation and TotalCollimationWidth"/>
				<verify test="count(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTAcquisitionDetailsSequence) &gt; 0
					  and count(../../CTAcquisitionDetailsSequence) = 0
					  and not (round(number(SpiralPitchFactor/value) * 100) = round(number(TableFeedPerRotation/value)
						div number(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTAcquisitionDetailsSequence/Item[@number=1]/TotalCollimationWidth/value)
						* 100))"
					  status="Warning" message="value inconsistent with TableFeedPerRotation and TotalCollimationWidth"/>
			</attribute>
		</sequence>
	</definemacro>

	<definemacro name="CTPositionMacro">
		<sequence name="CTPositionSequence"				vr="SQ" type="1"  vmmin="1" vmmax="1">
			<attribute name="TablePosition"				vr="FD" type="1C" vmmin="1" vmmax="1"	condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T"/>
			<attribute name="DataCollectionCenterPatient"		vr="FD" type="1C" vmmin="3" vmmax="3"	condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T"/>
			<attribute name="ReconstructionTargetCenterPatient"	vr="FD" type="1C" vmmin="3" vmmax="3"	condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T"/>
		</sequence>
	</definemacro>

	<definemacro name="CTGeometryMacro">
		<sequence name="CTGeometrySequence"				vr="SQ" type="1"  vmmin="1" vmmax="1">
			<attribute name="DistanceSourceToDetector"		vr="DS" type="1C" vmmin="1" vmmax="1"	condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
				<verify test="number(DistanceSourceToDetector/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			</attribute>
			<attribute name="DistanceSourceToDataCollectionCenter"	vr="FD" type="1C" vmmin="1" vmmax="1"	condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
				<verify test="number(DistanceSourceToDataCollectionCenter/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			</attribute>
		</sequence>
	</definemacro>

	<definemacro name="CTReconstructionMacro">
		<sequence name="CTReconstructionSequence"			vr="SQ" type="1"  vmmin="1" vmmax="1">
			<attribute name="ReconstructionAlgorithm"		vr="CS" type="1C" vmmin="1" vmmax="1"	condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
				<definedtermslist valueselector="1">
					<definedterm value="FILTER_BACK_PROJ"/>
					<definedterm value="ITERATIVE"/>
				</definedtermslist>
			</attribute>
			<attribute name="ConvolutionKernel"			vr="SH" type="1C" vmmin="1" vmmax="1"	condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T"/>
			<attribute name="ConvolutionKernelGroup"		vr="CS" type="1C" vmmin="1" vmmax="1"	condition="count(ConvolutionKernel) &gt; 0" mbpo="T">
				<definedtermslist valueselector="1">
					<definedterm value="BRAIN"/>
					<definedterm value="SOFT_TISSUE"/>
					<definedterm value="LUNG"/>
					<definedterm value="BONE"/>
					<definedterm value="CONSTANT_ANGLE"/>
				</definedtermslist>
			</attribute>
			<attribute name="ReconstructionDiameter"		vr="DS" type="1C" vmmin="1" vmmax="1"	condition="(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')) and count(ReconstructionFieldOfView)=0" mbpo="T">
				<verify test="count(ReconstructionFieldOfView) &gt; 0" status="Error" message="should not be present if ReconstructionFieldOfView is present"/>
				<verify test="number(ReconstructionFieldOfView/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			</attribute>
			<attribute name="ReconstructionFieldOfView"		vr="FD" type="1C" vmmin="2" vmmax="2"	condition="(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')) and count(ReconstructionDiameter)=0" mbpo="T">
				<verify test="count(ReconstructionDiameter) &gt; 0" status="Error" message="should not be present if ReconstructionDiameter is present"/>
				<verify test="number(ReconstructionDiameter/value[@number=1])=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
				<verify test="number(ReconstructionDiameter/value[@number=2])=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			</attribute>
			<attribute name="ReconstructionPixelSpacing"		vr="FD" type="1C" vmmin="2" vmmax="2"	condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
				<verify test="number(ReconstructionPixelSpacing/value[@number=1])=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
				<verify test="number(ReconstructionPixelSpacing/value[@number=2])=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			</attribute>
			<attribute name="ReconstructionAngle"			vr="FD" type="1C" vmmin="1" vmmax="1"	condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
				<verify test="not (/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTAcquisitionTypeSequence/Item[@number=1]/AcquisitionType/value='CONSTANT_ANGLE' or
(name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTAcquisitionTypeSequence/Item[@number=1]/AcquisitionType/value='CONSTANT_ANGLE') or /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTAcquisitionTypeSequence/Item[@number=1]/AcquisitionType/value='CONSTANT_ANGLE') and number(ReconstructionAngle/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct since AcquisitionType is not CONSTANT_ANGLE"/>
				<verify test="(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTAcquisitionTypeSequence/Item[@number=1]/AcquisitionType/value='CONSTANT_ANGLE' or
(name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTAcquisitionTypeSequence/Item[@number=1]/AcquisitionType/value='CONSTANT_ANGLE') or /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTAcquisitionTypeSequence/Item[@number=1]/AcquisitionType/value='CONSTANT_ANGLE') and number(ReconstructionAngle/value)!=0" status="Warning" message="value of other than 0 is not illegal, but is unlikely to be correct since AcquisitionType is CONSTANT_ANGLE"/>
			</attribute>
			<attribute name="ImageFilter"				vr="SH" type="1C" vmmin="1" vmmax="1"	condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T"/>
		</sequence>
	</definemacro>

	<definemacro name="CTExposureMacro">
		<sequence name="CTExposureSequence"				vr="SQ" type="1"  vmmin="1" vmmax="1">
			<attribute name="ExposureTimeInms"			vr="FD" type="1C" vmmin="1" vmmax="1"	condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
				<verify test="number(ExposureTimeInms/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			</attribute>
			<attribute name="XRayTubeCurrentInmA"			vr="FD" type="1C" vmmin="1" vmmax="1"	condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
				<verify test="number(XRayTubeCurrentInmA/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			</attribute>
			<attribute name="ExposureInmAs"				vr="FD" type="1C" vmmin="1" vmmax="1"	condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
				<verify test="number(ExposureInmAs/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			</attribute>
			<attribute name="ExposureModulationType"		vr="CS" type="1C" vmmin="1" vmmax="1"	condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
				<definedtermslist valueselector="1">
					<definedterm value="NONE"/>
				</definedtermslist>
			</attribute>
			<attribute name="EstimatedDoseSaving"			vr="FD" type="2C" vmmin="1" vmmax="1"	condition="(/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')) and ExposureModulationType/value!='NONE'" mbpo="T">
				<verify test="ExposureModulationType/value='NONE'" status="Error" message="should not be present if ExposureModulationType is NONE"/>
			</attribute>
			<attribute name="CTDIvol"				vr="FD" type="2C" vmmin="1" vmmax="1"	condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
				<verify test="number(CTDIvol/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			</attribute>
			<sequence  name="CTDIPhantomTypeCodeSequence"	vr="SQ" type="3"  vmmin="1" vmmax="1">
				<includemacro name="CodeSequenceMacro"/>
			</sequence>
		</sequence>
	</definemacro>

	<definemacro name="CTXRayDetailsMacro">
		<sequence name="CTXRayDetailsSequence"				vr="SQ" type="1"  vmmin="1" vmmax="1">
			<attribute name="KVP"					vr="DS" type="1C" vmmin="1" vmmax="1"	condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
				<verify test="number(KVP/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			</attribute>
			<attribute name="FocalSpots"				vr="DS" type="1C" vmmin="1" vmmax="2"	condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
				<verify test="number(FocalSpots/value[@number=1])=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
				<verify test="number(FocalSpots/value[@number=2])=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			</attribute>
			<attribute name="FilterType"				vr="SH" type="1C" vmmin="1" vmmax="1"	condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
				<definedtermslist valueselector="1">
					<definedterm value="WEDGE"/>
					<definedterm value="BUTTERFLY"/>
					<definedterm value="MULTIPLE"/>
					<definedterm value="FLAT"/>
					<definedterm value="SHAPED"/>
					<definedterm value="NONE"/>
				</definedtermslist>
			</attribute>
			<attribute name="FilterMaterial"				vr="CS" type="1C" vmmin="1" vmmax="n"	condition="/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL')" mbpo="T">
				<definedtermslist valueselector="1">
					<definedterm value="MOLYBDENUM"/>
					<definedterm value="ALUMINUM"/>
					<definedterm value="COPPER"/>
					<definedterm value="RHODIUM"/>
					<definedterm value="NIOBIUM"/>
					<definedterm value="EUROPIUM"/>
					<definedterm value="LEAD"/>
					<definedterm value="MIXED"/>
				</definedtermslist>
			</attribute>
			<attribute name="CalciumScoringMassFactorPatient"				vr="FL" type="3"  vmmin="1" vmmax="1">
				<verify test="number(CalciumScoringMassFactorPatient/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			</attribute>
			<attribute name="CalciumScoringMassFactorDevice"				vr="FL" type="3"  vmmin="3" vmmax="3">
				<verify test="number(CalciumScoringMassFactorDevice/value[@number=1])=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
				<verify test="number(CalciumScoringMassFactorDevice/value[@number=2])=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
				<verify test="number(CalciumScoringMassFactorDevice/value[@number=3])=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			</attribute>
			<attribute name="EnergyWeightingFactor"		vr="FL" type="1C" vmmin="1" vmmax="1"	condition="(name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=4]='ENERGY_PROP_WT') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=4]='ENERGY_PROP_WT')" mbpo="T">
				<verify test="number(EnergyWeightingFactor/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			</attribute>
		</sequence>
	</definemacro>

	<definemacro name="CTPixelValueTransformationMacro">
		<sequence name="PixelValueTransformationSequence"			vr="SQ" type="1"  vmmin="1" vmmax="1">
			<attribute name="RescaleIntercept"				vr="DS" type="1"  vmmin="1" vmmax="1"/>
			<attribute name="RescaleSlope"					vr="DS" type="1"  vmmin="1" vmmax="1">
				<verify test="number(RescaleSlope/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			</attribute>
			<attribute name="RescaleType"					vr="LO" type="1"  vmmin="1" vmmax="1">
				<verify test="RescaleType/value != 'HU' and ((/DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' and /DicomObject/SharedFunctionalGroupsSequence/Item[@number=1]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=3]!='LOCALIZER') or (name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' and ../../CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=3]!='LOCALIZER') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=1]='ORIGINAL' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=3]!='LOCALIZER'))" status="Error" message="Only HU allowed for ORIGINAL images and frames unless LOCALIZERs"/>
			</attribute>
		</sequence>
	</definemacro>

	<definemacro name="CTAdditionalXRaySourceMacro">
		<sequence name="CTAdditionalXRaySourceSequence"	vr="SQ" type="1"  vmmin="1" vmmax="n">
			<attribute name="KVP"						vr="DS" type="1" vmmin="1" vmmax="1">
				<verify test="number(KVP/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			</attribute>
			<attribute name="XRayTubeCurrentInmA"		vr="FD" type="1" vmmin="1" vmmax="1">
				<verify test="number(XRayTubeCurrentInmA/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			</attribute>
			<attribute name="DataCollectionDiameter"	vr="DS" type="1" vmmin="1" vmmax="1">
				<verify test="number(DataCollectionDiameter/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			</attribute>
			<attribute name="FocalSpots"				vr="DS" type="1" vmmin="1" vmmax="2">
				<verify test="number(FocalSpots/value[@number=1])=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
				<verify test="number(FocalSpots/value[@number=2])=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			</attribute>
			<attribute name="FilterType"				vr="SH" type="1" vmmin="1" vmmax="1">
				<definedtermslist valueselector="1">
					<definedterm value="WEDGE"/>
					<definedterm value="BUTTERFLY"/>
					<definedterm value="MULTIPLE"/>
					<definedterm value="FLAT"/>
					<definedterm value="SHAPED"/>
					<definedterm value="NONE"/>
				</definedtermslist>
			</attribute>
			<attribute name="FilterMaterial"				vr="CS" type="1" vmmin="1" vmmax="n">
				<definedtermslist valueselector="1">
					<definedterm value="MOLYBDENUM"/>
					<definedterm value="ALUMINUM"/>
					<definedterm value="COPPER"/>
					<definedterm value="RHODIUM"/>
					<definedterm value="NIOBIUM"/>
					<definedterm value="EUROPIUM"/>
					<definedterm value="LEAD"/>
					<definedterm value="MIXED"/>
				</definedtermslist>
			</attribute>
			<attribute name="ExposureInmAs"				vr="FD" type="1" vmmin="1" vmmax="1">
				<verify test="number(ExposureInmAs/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			</attribute>
			<attribute name="EnergyWeightingFactor"		vr="FL" type="1C" vmmin="1" vmmax="1"	condition="(name(../../..) = 'PerFrameFunctionalGroupsSequence' and ../../CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=4]='ENERGY_PROP_WT') or (name(../../..) = 'SharedFunctionalGroupsSequence' and /DicomObject/PerFrameFunctionalGroupsSequence/Item[*]/CTImageFrameTypeSequence/Item[@number=1]/FrameType/value[@number=4]='ENERGY_PROP_WT')" mbpo="T">
				<verify test="number(EnergyWeightingFactor/value)=0" status="Warning" message="value of 0 is not illegal, but is unlikely to be correct"/>
			</attribute>
		</sequence>
	</definemacro>

	<definemodule name="RawDataModule">
		<attribute name="InstanceNumber"				vr="IS" type="1" vmmin="1" vmmax="1"/>
		<attribute name="ContentDate"					vr="DA" type="1" vmmin="1" vmmax="1"/>
		<attribute name="ContentTime"					vr="TM" type="1" vmmin="1" vmmax="1"/>
		<attribute name="AcquisitionDateTime"			vr="DT" type="3" vmmin="1" vmmax="1"/>
		<attribute name="ContentLabel"					vr="CS" type="3" vmmin="1" vmmax="1"/>
		<attribute name="ContentDescription"			vr="LO" type="3" vmmin="1" vmmax="1"/>
		<sequence  name="ConceptNameCodeSequence"		vr="SQ" type="3" vmmin="1" vmmax="1">
			<includemacro name="CodeSequenceMacro"/>
		</sequence>
		<attribute name="CreatorVersionUID"				vr="UI" type="1" vmmin="1" vmmax="1"/>
		<sequence  name="ReferencedInstanceSequence"			vr="SQ" type="3"  vmmin="1" vmmax="n">
			<attribute name="ReferencedSOPClassUID"			vr="UI" type="1"  vmmin="1" vmmax="1"/>
			<attribute name="ReferencedSOPInstanceUID"		vr="UI" type="1"  vmmin="1" vmmax="1"/>
			<attribute name="ReferencedFrameNumber"			vr="IS" type="1C" vmmin="1" vmmax="n" condition="count(ReferencedFrameNumber) &gt; 0"/>
			<sequence  name="PurposeOfReferenceCodeSequence"	vr="SQ" type="1"  vmmin="1" vmmax="1">
				<includemacro name="CodeSequenceMacro"/>
			</sequence>
		</sequence>
	</definemodule>

	<definemacro name="OptionalViewAndSliceProgressionDirectionMacro">
		<sequence name="ViewCodeSequence"	vr="SQ" type="3"  vmmin="1" vmmax="1">
			<includemacro name="CodeSequenceMacro"/>
			<sequence name="ViewCodeSequence"	vr="SQ" type="3"  vmmin="1" vmmax="n">
				<includemacro name="CodeSequenceMacro"/>
			</sequence>
		</sequence>
	</definemacro>

	<definemacro name="UnassignedSharedConvertedAttributesMacro">
		<sequence name="UnassignedSharedConvertedAttributesSequence"	vr="SQ" type="1C"  vmmin="1" vmmax="1" nocondition="">
		</sequence>
	</definemacro>

	<definemacro name="UnassignedPerFrameConvertedAttributesMacro">
		<sequence name="UnassignedSharedConvertedAttributesSequence"	vr="SQ" type="1C"  vmmin="1" vmmax="1" nocondition="">
		</sequence>
	</definemacro>
	
	<definemacro name="ImageFrameConversionSourceMacro">
		<sequence name="ConversionSourceAttributesSequence"	vr="SQ" type="1"  vmmin="1" vmmax="1">
			<includemacro name="ImageSOPInstanceReferenceMacro"/>
		</sequence>
	</definemacro>
	
	<definemacro name="SeriesAndInstanceReferenceMacro">
		<sequence  name="ReferencedSeriesSequence"			vr="SQ" type="1" vmmin="1" vmmax="n">
			<attribute name="SeriesInstanceUID"				vr="UI" type="1"  vmmin="1" vmmax="1"/>
			<sequence  name="ReferencedInstanceSequence"	vr="SQ" type="1"  vmmin="1" vmmax="n">
				<includemacro name="SOPInstanceReferenceMacro"/>
			</sequence>
		</sequence>
	</definemacro>

	<definemodule name="CommonInstanceReferenceModule">
		<sequence  name="ReferencedSeriesSequence"			vr="SQ" type="1C" vmmin="1" vmmax="n" condition="count(//ReferencedSOPInstanceUID) &gt; 0 and count(StudiesContainingOtherReferencedInstancesSequence) = 0" mbpo="T">	<!-- standard does not say mbpo, but we need this since we do not know what ReferencedSOPInstanceUID reference -->
			<attribute name="SeriesInstanceUID"				vr="UI" type="1"  vmmin="1" vmmax="1"/>
			<sequence  name="ReferencedInstanceSequence"	vr="SQ" type="1"  vmmin="1" vmmax="n">
				<includemacro name="SOPInstanceReferenceMacro"/>
			</sequence>
		</sequence>
		<sequence  name="StudiesContainingOtherReferencedInstancesSequence"		vr="SQ" type="1C" vmmin="1" vmmax="n" condition="count(//ReferencedSOPInstanceUID) &gt; 0 and count(ReferencedSeriesSequence) = 0" mbpo="T">	<!-- standard does not say mbpo, but we need this since we do not know what ReferencedSOPInstanceUID reference -->
			<attribute name="StudyInstanceUID"				vr="UI" type="1"  vmmin="1" vmmax="1"/>
			<includemacro name="SeriesAndInstanceReferenceMacro"/>
		</sequence>
	</definemodule>

	<definemodule name="FrameExtractionModule">
		<sequence  name="FrameExtractionSequence"				vr="SQ" type="1" vmmin="1" vmmax="n">
			<attribute name="MultiFrameSourceSOPInstanceUID"	vr="UI" type="1"  vmmin="1" vmmax="1"/>
			<attribute name="SimpleFrameList"					vr="UL" type="1C"  vmmin="1" vmmax="1" condition="count(CalculatedFrameList) = 0 and count(TimeRange) = 0"/>
			<attribute name="CalculatedFrameList"				vr="UL" type="1C"  vmmin="1" vmmax="1" condition="count(SimpleFrameList) = 0 and count(TimeRange) = 0"/>
			<attribute name="TimeRange"							vr="FD" type="1C"  vmmin="1" vmmax="1" condition="count(SimpleFrameList) = 0 and count(CalculatedFrameList) = 0"/>
		</sequence>
	</definemodule>

	<definemodule name="SpecimenModule">
		<includemacro name="SpecimenMacro"/>
	</definemodule>

	<definemacro name="SpecimenMacro">
		<attribute name="ContainerIdentifier"						vr="LO" type="1"  vmmin="1" vmmax="1"/>
		<sequence name="IssuerOfTheContainerIdentifierSequence"		vr="SQ" type="2"  vmmin="0" vmmax="1">
			<includemacro name="HL7v2HierarchicDesignatorMacro"/>
		</sequence>
        <sequence name="AlternateContainerIdentifierSequence"		vr="SQ" type="3"  vmmin="1" vmmax="1">
			<attribute name="ContainerIdentifier"					vr="LO" type="1"  vmmin="1" vmmax="1"/>
			<sequence name="IssuerOfTheContainerIdentifierSequence"	vr="SQ" type="2"  vmmin="0" vmmax="1">
				<includemacro name="HL7v2HierarchicDesignatorMacro"/>
			</sequence>
		</sequence>
		<sequence name="ContainerTypeCodeSequence"					vr="SQ" type="2"  vmmin="0" vmmax="1">
			<includemacro name="CodeSequenceMacro"/>
		</sequence>
		<attribute name="ContainerDescription"						vr="LO" type="1"  vmmin="1" vmmax="1"/>
		<sequence name="ContainerComponentSequence"					vr="SQ" type="3"  vmmin="1" vmmax="n">
			<sequence name="ContainerComponentTypeCodeSequence"		vr="SQ" type="1"  vmmin="1" vmmax="1">
				<includemacro name="CodeSequenceMacro"/>
			</sequence>
			<attribute name="Manufacturer"							vr="LO" type="3"  vmmin="1" vmmax="1"/>
			<attribute name="ManufacturerModelName"					vr="LO" type="3"  vmmin="1" vmmax="1"/>
			<attribute name="ContainerComponentID"					vr="LO" type="3"  vmmin="1" vmmax="1"/>
			<attribute name="ContainerComponentLength"				vr="FD" type="3"  vmmin="1" vmmax="1"/>
			<attribute name="ContainerComponentWidth"				vr="FD" type="3"  vmmin="1" vmmax="1"/>
			<attribute name="ContainerComponentDiameter"			vr="FD" type="3"  vmmin="1" vmmax="1"/>
			<attribute name="ContainerComponentThickness"			vr="FD" type="3"  vmmin="1" vmmax="1"/>
			<attribute name="ContainerComponentMaterial"			vr="CS" type="3"  vmmin="1" vmmax="1">
					<definedtermslist valueselector="1">
					<definedterm value="GLASS"/>
					<definedterm value="PLASTIC"/>
					<definedterm value="METAL"/>
				</definedtermslist>
			</attribute>
			<attribute name="ContainerComponentDescription"					vr="LO" type="3"  vmmin="1" vmmax="1"/>
		</sequence>
		<sequence name="SpecimenDescriptionSequence"						vr="SQ" type="1"  vmmin="1" vmmax="n">
			<attribute name="SpecimenIdentifier"							vr="LO" type="1"  vmmin="1" vmmax="1"/>
			<sequence name="IssuerOfTheSpecimenIdentifierSequence"			vr="SQ" type="2"  vmmin="0" vmmax="1">
				<includemacro name="HL7v2HierarchicDesignatorMacro"/>
			</sequence>
            <attribute name="SpecimenUID"									vr="UI" type="1"  vmmin="1" vmmax="1"/>
            <sequence name="SpecimenTypeCodeSequence"						vr="SQ" type="3"  vmmin="1" vmmax="1">
				<includemacro name="CodeSequenceMacro"/>
			</sequence>
			<attribute name="SpecimenShortDescription"						vr="LO" type="3"  vmmin="1" vmmax="1"/>
			<attribute name="SpecimenDetailedDescription"					vr="UT" type="3"  vmmin="1" vmmax="1"/>
			<sequence name="SpecimenPreparationSequence"					vr="SQ" type="2"  vmmin="0" vmmax="n">
				<sequence name="SpecimenPreparationStepContentItemSequence"	vr="SQ" type="1"  vmmin="1" vmmax="n">
					<includemacro name="ContentItemMacro"/>
				</sequence>
			</sequence>
			<includemacro name="PrimaryAnatomicStructureMacro"/>
			<sequence name="SpecimenLocalizationContentItemSequence"		vr="SQ" type="1C"  vmmin="1" vmmax="n" nocondition="">
				<includemacro name="ContentItemMacro"/>
			</sequence>
		</sequence>
	</definemacro>

	<definemodule name="DeviceModule">
		<sequence name="DeviceSequence"								vr="SQ" type="1"  vmmin="1" vmmax="n">
			<includemacro name="CodeSequenceMacro"/>
			<attribute name="Manufacturer"							vr="LO" type="3"  vmmin="1" vmmax="1"/>
			<attribute name="ManufacturerModelName"					vr="LO" type="3"  vmmin="1" vmmax="1"/>
			<attribute name="DeviceSerialNumber"					vr="LO" type="3"  vmmin="1" vmmax="1"/>
			<attribute name="DeviceID"								vr="LO" type="3"  vmmin="1" vmmax="1"/>
			<attribute name="DeviceLength"							vr="DS" type="3"  vmmin="1" vmmax="1"/>
			<attribute name="DeviceDiameter"						vr="DS" type="3"  vmmin="1" vmmax="1"/>
			<attribute name="DeviceDiameterUnits"					vr="CS" type="1C" vmmin="1" vmmax="1" condition="count(DeviceDiameter) &gt; 0">
					<definedtermslist valueselector="1">
					<definedterm value="FR"/>
					<definedterm value="GA"/>
					<definedterm value="IN"/>
					<definedterm value="MM"/>
				</definedtermslist>
			</attribute>
			<attribute name="DeviceVolume"							vr="DS" type="3"  vmmin="1" vmmax="1"/>
			<attribute name="InterMarkerDistance"					vr="DS" type="3"  vmmin="1" vmmax="1"/>
			<attribute name="DeviceDescription"						vr="LO" type="3"  vmmin="1" vmmax="1"/>
		</sequence>
	</definemodule>
	
	<definemacro name="ContentIdentificationMacro">
		<attribute name="InstanceNumber"							vr="IS" type="1" vmmin="1" vmmax="1"/>
		<attribute name="ContentLabel"								vr="CS" type="1" vmmin="1" vmmax="1"/>
		<attribute name="ContentDescription"						vr="LO" type="2" vmmin="1" vmmax="1"/>
		<sequence  name="ConceptNameCodeSequence"					vr="SQ" type="3" vmmin="1" vmmax="1">
			<includemacro name="CodeSequenceMacro"/>
		</sequence>
		<sequence name="AlternateContentDescriptionSequence"		vr="SQ" type="3" vmmin="1" vmmax="n">
			<attribute name="ContentDescription"					vr="LO" type="1" vmmin="1" vmmax="1"/>
			<sequence name="LanguageCodeSequence"					vr="SQ" type="1" vmmin="1" vmmax="1">
				<includemacro name="CodeSequenceMacro"/>
			</sequence>
			<sequence  name="ConceptNameCodeSequence"				vr="SQ" type="3" vmmin="1" vmmax="1">
				<includemacro name="CodeSequenceMacro"/>
			</sequence>
		</sequence>
		<attribute name="ContentCreatorName"						vr="PN" type="2" vmmin="1" vmmax="1"/>
		<sequence name="ContentCreatorIdentificationCodeSequence"	vr="SQ" type="3" vmmin="1" vmmax="n">
			<includemacro name="PersonIdentificationMacro"/>
		</sequence>
	</definemacro>
	
	<definemodule name="SegmentationSeriesModule">
		<attribute name="Modality"									vr="CS" type="1"  vmmin="1" vmmax="1">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="SEG"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="SeriesNumber"								vr="IS" type="1"  vmmin="1" vmmax="1"/>
		<sequence name="ReferencedPerformedProcedureStepSequence"	vr="SQ" type="1C" vmmin="1" vmmax="1" nocondition="">
			<includemacro name="SOPInstanceReferenceMacro"/>
		</sequence>
	</definemodule>
	
	<definemacro name="SegmentDescriptionMacro">
		<attribute name="SegmentNumber"								vr="US" type="1"  vmmin="1" vmmax="1"/>
		<attribute name="SegmentLabel"								vr="LO" type="1"  vmmin="1" vmmax="1"/>
		<attribute name="SegmentDescription"						vr="ST" type="3"  vmmin="1" vmmax="1"/>
		<attribute name="SegmentAlgorithmType"						vr="CS" type="1"  vmmin="1" vmmax="1">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="AUTOMATIC"/>
				<enumeratedvalue value="SEMIAUTOMATIC"/>
				<enumeratedvalue value="MANUAL"/>
			</enumeratedvalueslist>
		</attribute>
		<includemacro name="GeneralAnatomyOptionalMacro"/>
		<sequence name="SegmentedPropertyCategoryCodeSequence"		vr="SQ" type="1" vmmin="1" vmmax="1">
			<includemacro name="CodeSequenceMacro"/>
		</sequence>
		<sequence name="SegmentedPropertyTypeCodeSequence"			vr="SQ" type="1" vmmin="1" vmmax="1">
			<includemacro name="CodeSequenceMacro"/>
			<sequence name="SegmentedPropertyTypeModifierCodeSequence"	vr="SQ" type="3" vmmin="1" vmmax="n">
				<includemacro name="CodeSequenceMacro"/>
			</sequence>
		</sequence>
	</definemacro>
	
	<definemacro name="AlgorithmIdentificationMacro">
		<sequence name="AlgorithmFamilyCodeSequence"				vr="SQ" type="1" vmmin="1" vmmax="1">
			<includemacro name="CodeSequenceMacro"/>
		</sequence>
		<sequence name="AlgorithmNameCodeSequence"					vr="SQ" type="3" vmmin="1" vmmax="1">
			<includemacro name="CodeSequenceMacro"/>
		</sequence>
		<attribute name="AlgorithmName"								vr="LO" type="1"  vmmin="1" vmmax="1"/>
		<attribute name="AlgorithmVersion"							vr="LO" type="1"  vmmin="1" vmmax="1"/>
		<attribute name="AlgorithmParameters"						vr="LT" type="3"  vmmin="1" vmmax="1"/>
		<attribute name="AlgorithmSource"							vr="LO" type="3"  vmmin="1" vmmax="1"/>
	</definemacro>
	
	<definemodule name="SegmentationImageModule">
		<attribute name="ImageType"									vr="CS" type="1" vmmin="2" vmmax="2">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="DERIVED"/>
			</enumeratedvalueslist>
			<enumeratedvalueslist valueselector="2">
				<enumeratedvalue value="PRIMARY"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="SamplesPerPixel"							vr="US" type="1" vmmin="1" vmmax="1">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="1"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="PhotometricInterpretation"					vr="CS" type="1" vmmin="1" vmmax="1">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="MONOCHROME2"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="PixelRepresentation"						vr="US" type="1" vmmin="1" vmmax="1">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="0"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="BitsAllocated"								vr="US" type="1" vmmin="1" vmmax="1">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="1"/>
				<enumeratedvalue value="8"/>
			</enumeratedvalueslist>
			<verify test="SegmentationType/value  = 'BINARY' and BitsAllocated/value != 1" status="Error" message="Must be 1 when SegmentationType is BINARY"/>
			<verify test="SegmentationType/value != 'BINARY' and BitsAllocated/value != 8" status="Error" message="Must be 8 when SegmentationType is not BINARY"/>
		</attribute>
		<attribute name="BitsStored"								vr="US" type="1" vmmin="1" vmmax="1">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="1"/>
				<enumeratedvalue value="8"/>
			</enumeratedvalueslist>
			<verify test="SegmentationType/value  = 'BINARY' and BitsStored/value != 1" status="Error" message="Must be 1 when SegmentationType is BINARY"/>
			<verify test="SegmentationType/value != 'BINARY' and BitsStored/value != 8" status="Error" message="Must be 8 when SegmentationType is not BINARY"/>
		</attribute>
		<attribute name="HighBit"									vr="US" type="1" vmmin="1" vmmax="1">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="0"/>
				<enumeratedvalue value="7"/>
			</enumeratedvalueslist>
			<verify test="SegmentationType/value  = 'BINARY' and HighBit/value != 0" status="Error" message="Must be 0 when SegmentationType is BINARY"/>
			<verify test="SegmentationType/value != 'BINARY' and HighBit/value != 7" status="Error" message="Must be 7 when SegmentationType is not BINARY"/>
			<verify test="BitsStored/value != (HighBit/value + 1)" status="Error" message="Must be one less than BitsStored"/>
		</attribute>
		<attribute name="LossyImageCompression"						vr="CS" type="1" vmmin="1" vmmax="1">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="00"/>
				<enumeratedvalue value="01"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="LossyImageCompressionRatio"				vr="DS" type="1C" vmmin="1" vmmax="n" condition="LossyImageCompression/value='01'"/>
		<attribute name="LossyImageCompressionMethod"				vr="CS" type="1C" vmmin="1" vmmax="n" condition="LossyImageCompression/value='01'"/>
		<attribute name="SegmentationType"							vr="CS" type="1" vmmin="1" vmmax="1">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="BINARY"/>
				<enumeratedvalue value="FRACTIONAL"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="SegmentationFractionalType"				vr="CS" type="1C" vmmin="1" vmmax="1" condition="SegmentationType/value = 'FRACTIONAL'">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="PROBABILITY"/>
				<enumeratedvalue value="OCCUPANCY"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="MaximumFractionalValue"					vr="US" type="1C" vmmin="1" vmmax="1" condition="SegmentationType/value = 'FRACTIONAL'"/>
		<sequence name="SegmentSequence"							vr="SQ" type="1"  vmmin="1" vmmax="n">
			<includemacro name="SegmentDescriptionMacro"/>
			<attribute name="SegmentAlgorithmName"					vr="LO" type="1C"  vmmin="1" vmmax="1" condition="SegmentAlgorithmType/value != 'MANUAL'"/>
			<sequence name="SegmentationAlgorithmIdentificationSequence"	vr="SQ" type="3"  vmmin="1" vmmax="1">
				<includemacro name="AlgorithmIdentificationMacro"/>
			</sequence>
			<attribute name="RecommendedDisplayGrayscaleValue"		vr="US" type="3"  vmmin="1" vmmax="1"/>
			<attribute name="RecommendedDisplayCIELabValue"			vr="US" type="3"  vmmin="3" vmmax="3"/>
		</sequence>
	</definemodule>
	
	<definemodule name="GeneralImageModule">
		<attribute name="InstanceNumber"							vr="IS" type="2"  vmmin="1" vmmax="1"/>
		<attribute name="PatientOrientation"						vr="CS" type="2C" vmmin="1" vmmax="1" condition="count(//ImagePositionPatient) = 0 or count(//ImageOrientationPatient) = 0" mbpo="T"/>
		<attribute name="ContentDate"								vr="DA" type="2C" vmmin="1" vmmax="1" nocondition=""/>
		<attribute name="ContentTime"								vr="TM" type="2C" vmmin="1" vmmax="1" nocondition=""/>
		<attribute name="ImageType"									vr="CS" type="3" vmmin="1" vmmax="n">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="ORIGINAL"/>
				<enumeratedvalue value="DERIVED"/>
			</enumeratedvalueslist>
			<enumeratedvalueslist valueselector="2">
				<enumeratedvalue value="PRIMARY"/>
				<enumeratedvalue value="SECONDARY"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="AcquisitionNumber"							vr="IS" type="3" vmmin="1" vmmax="1"/>
		<attribute name="AcquisitionDate"							vr="DA" type="3" vmmin="1" vmmax="1"/>
		<attribute name="AcquisitionTime"							vr="TM" type="3" vmmin="1" vmmax="1"/>
		<attribute name="AcquisitionDateTime"						vr="DT" type="3" vmmin="1" vmmax="1"/>
		<sequence name="ReferencedImageSequence"					vr="SQ" type="3" vmmin="1" vmmax="n">
			<includemacro name="ImageSOPInstanceReferenceMacro"/>
			<sequence  name="PurposeOfReferenceCodeSequence"		vr="SQ" type="3" vmmin="1" vmmax="1">
				<includemacro name="CodeSequenceMacro"/>
			</sequence>
		</sequence>
		<attribute name="DerivationDescription"						vr="ST" type="3" vmmin="1" vmmax="1"/>
		<sequence  name="DerivationCodeSequence"					vr="SQ" type="3" vmmin="1" vmmax="1">
			<includemacro name="CodeSequenceMacro"/>
		</sequence>
		<sequence  name="SourceImageSequence"						vr="SQ" type="3"  vmmin="0" vmmax="n">
			<includemacro name="ImageSOPInstanceReferenceMacro"/>
			<sequence  name="PurposeOfReferenceCodeSequence"		vr="SQ" type="3" vmmin="1" vmmax="1">
				<includemacro name="CodeSequenceMacro"/>
			</sequence>
			<attribute name="SpatialLocationsPreserved"				vr="CS" type="3" vmmin="1" vmmax="1">
				<enumeratedvalueslist valueselector="1">
					<enumeratedvalue value="YES"/>
					<enumeratedvalue value="NO"/>
					<enumeratedvalue value="REORIENTED_ONLY"/>
				</enumeratedvalueslist>
			</attribute>
			<attribute name="PatientOrientation"					vr="CS" type="1C" vmmin="1" vmmax="1" condition="SpatialLocationsPreserved/value = 'REORIENTED_ONLY'" mbpo="T"/>
		</sequence>
		<sequence name="ReferencedInstanceSequence"					vr="SQ" type="3" vmmin="1" vmmax="n">
			<includemacro name="SOPInstanceReferenceMacro"/>
			<sequence  name="PurposeOfReferenceCodeSequence"		vr="SQ" type="3" vmmin="1" vmmax="1">
				<includemacro name="CodeSequenceMacro"/>
			</sequence>
		</sequence>
		<attribute name="ImagesInAcquisition"						vr="IS" type="3" vmmin="1" vmmax="1"/>
		<attribute name="ImageComments"								vr="LT" type="3" vmmin="1" vmmax="1"/>
		<attribute name="QualityControlImage"						vr="CS" type="3" vmmin="1" vmmax="1" >
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="YES"/>
				<enumeratedvalue value="NO"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="BurnedInAnnotation"						vr="CS" type="3" vmmin="1" vmmax="1">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="YES"/>
				<enumeratedvalue value="NO"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="RecognizableVisualFeatures"				vr="CS" type="3" vmmin="1" vmmax="1">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="YES"/>
				<enumeratedvalue value="NO"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="LossyImageCompression"						vr="CS" type="3" vmmin="1" vmmax="1">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="00"/>
				<enumeratedvalue value="01"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="LossyImageCompressionRatio"				vr="DS" type="3" vmmin="1" vmmax="n"/>
		<attribute name="LossyImageCompressionMethod"				vr="CS" type="3" vmmin="1" vmmax="n"/>
		<sequence name="IconImageSequence"							vr="SQ" type="3" vmmin="1" vmmax="n">
			<includemacro name="ImagePixelMacro"/>
		</sequence>
		<attribute name="PresentationLUTShape"						vr="CS" type="3" vmmin="1" vmmax="1">
			<enumeratedvalueslist valueselector="1">
				<enumeratedvalue value="IDENTITY"/>
				<enumeratedvalue value="INVERSE"/>
			</enumeratedvalueslist>
		</attribute>
		<attribute name="IrradiationEventUID"						vr="UI" type="3" vmmin="1" vmmax="1"/>
		<sequence name="RealWorldValueMappingSequence"				vr="SQ" type="3" vmmin="1" vmmax="1">
			<includemacro name="RealWorldValueMappingItemMacro"/>
		</sequence>
	</definemodule>

	<definemacro name="SegmentationMacro">
		<sequence name="SegmentIdentificationSequence"				vr="SQ" type="1"  vmmin="1" vmmax="1">
			<attribute name="ReferencedSegmentNumber"				vr="US" type="1"  vmmin="1" vmmax="1"/>
		</sequence>
	</definemacro>

	<definemacro name="TemporalPositionMacro">
		<sequence name="TemporalPositionSequence"					vr="SQ" type="1"  vmmin="1" vmmax="1">
			<attribute name="TemporalPositionTimeOffset"			vr="FD" type="1"  vmmin="1" vmmax="1"/>
		</sequence>
	</definemacro>

</definitions>
