/// <summary> /// Initialize the DicomComparator /// </summary> /// <param name="dicomMessage"></param> /// <returns></returns> /// <returns>bool - true = template initialized, false template not initialized</returns> public bool Initialize(DvtkData.Dimse.DicomMessage dicomMessage) { DvtkData.Dimse.DimseCommand command = dicomMessage.CommandField; System.String sopClassUid = System.String.Empty; DvtkData.Dimse.Attribute attribute = dicomMessage.CommandSet.GetAttribute(DvtkData.Dimse.Tag.AFFECTED_SOP_CLASS_UID); if (attribute == null) { attribute = dicomMessage.CommandSet.GetAttribute(DvtkData.Dimse.Tag.REQUESTED_SOP_CLASS_UID); } if ((attribute != null) && (attribute.Length != 0)) { UniqueIdentifier uniqueIdentifier = (UniqueIdentifier)attribute.DicomValue; sopClassUid = uniqueIdentifier.Values[0]; } // Try to initialise a template _template = new DicomComparisonTemplate(); bool initialized = _template.Initialize(command, sopClassUid); if (initialized == true) { // Load the template with the corresponding attribute values initialized = LoadTemplate(dicomMessage.DataSet); } return(initialized); }
public bool SetUp(DvtkData.Dimse.DicomMessage dicomMessage) { DvtkData.Dimse.DimseCommand command = dicomMessage.CommandField; System.String sopClassUid = System.String.Empty; // To be fixed - why is the SOP Class UID not always filled in? // RB: TODO if (command == DvtkData.Dimse.DimseCommand.CSTORERQ) { sopClassUid = "1.2.840.10008.5.1.4.1.1.7"; } DvtkData.Dimse.Attribute attribute = dicomMessage.CommandSet.GetAttribute(DvtkData.Dimse.Tag.AFFECTED_SOP_CLASS_UID); if (attribute == null) { attribute = dicomMessage.CommandSet.GetAttribute(DvtkData.Dimse.Tag.REQUESTED_SOP_CLASS_UID); } if ((attribute != null) && (attribute.Length != 0)) { UniqueIdentifier uniqueIdentifier = (UniqueIdentifier)attribute.DicomValue; sopClassUid = uniqueIdentifier.Values[0]; } // Try to initialise a template _template = new DicomComparisonTemplate(); bool setUpDone = _template.Initialize(command, sopClassUid); return(setUpDone); }
private void InitializeModalityProcedureStepInProgress(DvtkData.Dimse.DimseCommand command) { // Generate a new MPPS Instance UID InBuiltDefaultTagValues inbuiltDefaultTagValues = new InBuiltDefaultTagValues(); System.String uidRoot = inbuiltDefaultTagValues.UidRoot; DicomTagValueAutoSetUid tagValueUid = new DicomTagValueAutoSetUid(AffectedEntityEnum.PerformedProcedureStepEntity, Tag.AFFECTED_SOP_INSTANCE_UID, uidRoot, 1); _mppsInstanceUid = tagValueUid.Value; // Create the MPPS In-Progress message _nCreateSetMppsInProgress = new DvtkHighLevelInterface.Dicom.Messages.DicomMessage(command); }
/// <summary> /// Class constructor. /// </summary> /// <param name="objectName1">Object1 name</param> /// <param name="objectName2">Object2 name</param> /// <param name="dimseCommand1">Dimse Command1</param> /// <param name="dimseCommand2">Dimse Command2</param> /// <param name="sopClassUid1">Sop Class Uid1</param> /// <param name="sopClassUid2">Sop Class Uid2</param> public MessageComparisonResults(System.String objectName1, System.String objectName2, DvtkData.Dimse.DimseCommand dimseCommand1, DvtkData.Dimse.DimseCommand dimseCommand2, System.String sopClassUid1, System.String sopClassUid2) { _ObjectName1 = objectName1; _ObjectName2 = objectName2; _DimseCommand1 = dimseCommand1; _DimseCommand2 = dimseCommand2; _SopClassUid1 = sopClassUid1; _SopClassUid2 = sopClassUid2; }
/// <summary> /// Class constructor. /// </summary> /// <param name="objectName1">Object1 name</param> /// <param name="objectName2">Object2 name</param> /// <param name="messageType1">HL7 Message Type1</param> /// <param name="dimseCommand2">Dimse Command2</param> /// <param name="messageSubType1">HL7 Message Subtype1</param> /// <param name="sopClassUid2">Sop Class Uid2</param> public MessageComparisonResults(System.String objectName1, System.String objectName2, System.String messageType1, DvtkData.Dimse.DimseCommand dimseCommand2, System.String messageSubType1, System.String sopClassUid2) { _objectName1 = objectName1; _objectName2 = objectName2; _messageType1 = messageType1; _dimseCommand2 = dimseCommand2; _messageSubType1 = messageSubType1; _sopClassUid2 = sopClassUid2; }
/// <summary> /// Class constructor. /// </summary> /// <param name="command">DIMSE Command ID</param> /// <param name="sopClassUid">SOP Class UID</param> /// <returns>bool - true = template initialized, false template not initialized</returns> public bool Initialize(DvtkData.Dimse.DimseCommand command, System.String sopClassUid) { bool initialized = true; _command = command; _sopClassUid = sopClassUid; // Only certain templates available // Use command and sopClassUid to determine if we can set one up if ((command == DvtkData.Dimse.DimseCommand.CFINDRSP) && (sopClassUid == DvtkData.Dul.AbstractSyntax.Modality_Worklist_Information_Model_FIND.UID)) { // Add the comparison tags - these tags will be used to extract the values out of the // Dicom Dataset for comparison with other Datasets containing the same tags _comparisonTags.Add(new DicomComparisonTag(Tag.SPECIFIC_CHARACTER_SET, VR.CS, new CommonStringFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.ACCESSION_NUMBER, VR.SH, new CommonIdFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.SCHEDULED_PROCEDURE_STEP_SEQUENCE, Tag.MODALITY, VR.CS, new CommonStringFormat())); // _comparisonTags.Add(new DicomComparisonTag(Tag.REFERENCED_STUDY_SEQUENCE, VR.SQ, new CommonUidFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.PATIENTS_NAME, VR.PN, new CommonNameFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.PATIENT_ID, VR.LO, new CommonIdFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.PATIENTS_BIRTH_DATE, VR.DA, new CommonDateFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.PATIENTS_SEX, VR.CS, new CommonStringFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.STUDY_INSTANCE_UID, VR.UI, new CommonUidFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.REQUESTED_PROCEDURE_ID, VR.SH, new CommonIdFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.SCHEDULED_PROCEDURE_STEP_SEQUENCE, Tag.SCHEDULED_PROCEDURE_STEP_ID, VR.SH, new CommonIdFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.REQUESTED_PROCEDURE_DESCRIPTION, VR.LO, new CommonStringFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.SCHEDULED_PROCEDURE_STEP_SEQUENCE, Tag.SCHEDULED_PROCEDURE_STEP_DESCRIPTION, VR.LO, new CommonStringFormat())); } else if (command == DvtkData.Dimse.DimseCommand.CSTORERQ) { // Add the comparison tags - these tags will be used to extract the values out of the // Dicom Dataset for comparison with other Datasets containing the same tags _comparisonTags.Add(new DicomComparisonTag(Tag.SPECIFIC_CHARACTER_SET, VR.CS, new CommonStringFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.ACCESSION_NUMBER, VR.SH, new CommonIdFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.MODALITY, VR.CS, new CommonStringFormat())); // _comparisonTags.Add(new DicomComparisonTag(Tag.REFERENCED_STUDY_SEQUENCE, VR.SQ, new CommonUidFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.PATIENTS_NAME, VR.PN, new CommonNameFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.PATIENT_ID, VR.LO, new CommonIdFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.PATIENTS_BIRTH_DATE, VR.DA, new CommonDateFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.PATIENTS_SEX, VR.CS, new CommonStringFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.STUDY_INSTANCE_UID, VR.UI, new CommonUidFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.REQUEST_ATTRIBUTES_SEQUENCE, Tag.REQUESTED_PROCEDURE_ID, VR.SH, new CommonIdFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.REQUEST_ATTRIBUTES_SEQUENCE, Tag.SCHEDULED_PROCEDURE_STEP_ID, VR.SH, new CommonIdFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.REQUEST_ATTRIBUTES_SEQUENCE, Tag.SCHEDULED_PROCEDURE_STEP_DESCRIPTION, VR.LO, new CommonStringFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.PERFORMED_PROCEDURE_STEP_ID, VR.SH, new CommonIdFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.PERFORMED_PROCEDURE_STEP_DESCRIPTION, VR.LO, new CommonStringFormat())); } else if ((command == DvtkData.Dimse.DimseCommand.NCREATERQ) && (sopClassUid == DvtkData.Dul.AbstractSyntax.Modality_Performed_Procedure_Step.UID)) { // Add the comparison tags - these tags will be used to extract the values out of the // Dicom Dataset for comparison with other Datasets containing the same tags _comparisonTags.Add(new DicomComparisonTag(Tag.SPECIFIC_CHARACTER_SET, VR.CS, new CommonStringFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.SCHEDULED_STEP_ATTRIBUTES_SEQUENCE, Tag.ACCESSION_NUMBER, VR.SH, new CommonIdFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.MODALITY, VR.CS, new CommonStringFormat())); // _comparisonTags.Add(new DicomComparisonTag(Tag.SCHEDULED_STEP_ATTRIBUTES_SEQUENCE, Tag.REFERENCED_STUDY_SEQUENCE, VR.SQ, new CommonUidFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.PATIENTS_NAME, VR.PN, new CommonNameFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.PATIENT_ID, VR.LO, new CommonIdFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.PATIENTS_BIRTH_DATE, VR.DA, new CommonDateFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.PATIENTS_SEX, VR.CS, new CommonStringFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.SCHEDULED_STEP_ATTRIBUTES_SEQUENCE, Tag.STUDY_INSTANCE_UID, VR.UI, new CommonUidFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.SCHEDULED_STEP_ATTRIBUTES_SEQUENCE, Tag.REQUESTED_PROCEDURE_ID, VR.SH, new CommonIdFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.SCHEDULED_STEP_ATTRIBUTES_SEQUENCE, Tag.SCHEDULED_PROCEDURE_STEP_ID, VR.SH, new CommonIdFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.SCHEDULED_STEP_ATTRIBUTES_SEQUENCE, Tag.REQUESTED_PROCEDURE_DESCRIPTION, VR.LO, new CommonStringFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.SCHEDULED_STEP_ATTRIBUTES_SEQUENCE, Tag.SCHEDULED_PROCEDURE_STEP_DESCRIPTION, VR.LO, new CommonStringFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.PERFORMED_PROCEDURE_STEP_ID, VR.SH, new CommonIdFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.PERFORMED_PROCEDURE_STEP_DESCRIPTION, VR.LO, new CommonStringFormat())); } else { initialized = false; } return initialized; }
/// <summary> /// Class constructor. /// </summary> /// <param name="command">DIMSE Command ID</param> /// <param name="sopClassUid">SOP Class UID</param> /// <returns>bool - true = template initialized, false template not initialized</returns> public bool Initialize(DvtkData.Dimse.DimseCommand command, System.String sopClassUid) { bool initialized = true; _command = command; _sopClassUid = sopClassUid; // Only certain templates available // Use command and sopClassUid to determine if we can set one up if ((command == DvtkData.Dimse.DimseCommand.CFINDRSP) && (sopClassUid == DvtkData.Dul.AbstractSyntax.Modality_Worklist_Information_Model_FIND.UID)) { // Add the comparison tags - these tags will be used to extract the values out of the // Dicom Dataset for comparison with other Datasets containing the same tags _comparisonTags.Add(new DicomComparisonTag(Tag.SPECIFIC_CHARACTER_SET, VR.CS, new CommonStringFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.ACCESSION_NUMBER, VR.SH, new CommonIdFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.SCHEDULED_PROCEDURE_STEP_SEQUENCE, Tag.MODALITY, VR.CS, new CommonStringFormat())); // _comparisonTags.Add(new DicomComparisonTag(Tag.REFERENCED_STUDY_SEQUENCE, VR.SQ, new CommonUidFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.PATIENTS_NAME, VR.PN, new CommonNameFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.PATIENT_ID, VR.LO, new CommonIdFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.PATIENTS_BIRTH_DATE, VR.DA, new CommonDateFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.PATIENTS_SEX, VR.CS, new CommonStringFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.STUDY_INSTANCE_UID, VR.UI, new CommonUidFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.REQUESTED_PROCEDURE_ID, VR.SH, new CommonIdFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.SCHEDULED_PROCEDURE_STEP_SEQUENCE, Tag.SCHEDULED_PROCEDURE_STEP_ID, VR.SH, new CommonIdFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.REQUESTED_PROCEDURE_DESCRIPTION, VR.LO, new CommonStringFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.SCHEDULED_PROCEDURE_STEP_SEQUENCE, Tag.SCHEDULED_PROCEDURE_STEP_DESCRIPTION, VR.LO, new CommonStringFormat())); } else if (command == DvtkData.Dimse.DimseCommand.CSTORERQ) { // Add the comparison tags - these tags will be used to extract the values out of the // Dicom Dataset for comparison with other Datasets containing the same tags _comparisonTags.Add(new DicomComparisonTag(Tag.SPECIFIC_CHARACTER_SET, VR.CS, new CommonStringFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.ACCESSION_NUMBER, VR.SH, new CommonIdFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.MODALITY, VR.CS, new CommonStringFormat())); // _comparisonTags.Add(new DicomComparisonTag(Tag.REFERENCED_STUDY_SEQUENCE, VR.SQ, new CommonUidFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.PATIENTS_NAME, VR.PN, new CommonNameFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.PATIENT_ID, VR.LO, new CommonIdFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.PATIENTS_BIRTH_DATE, VR.DA, new CommonDateFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.PATIENTS_SEX, VR.CS, new CommonStringFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.STUDY_INSTANCE_UID, VR.UI, new CommonUidFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.REQUEST_ATTRIBUTES_SEQUENCE, Tag.REQUESTED_PROCEDURE_ID, VR.SH, new CommonIdFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.REQUEST_ATTRIBUTES_SEQUENCE, Tag.SCHEDULED_PROCEDURE_STEP_ID, VR.SH, new CommonIdFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.REQUEST_ATTRIBUTES_SEQUENCE, Tag.SCHEDULED_PROCEDURE_STEP_DESCRIPTION, VR.LO, new CommonStringFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.PERFORMED_PROCEDURE_STEP_ID, VR.SH, new CommonIdFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.PERFORMED_PROCEDURE_STEP_DESCRIPTION, VR.LO, new CommonStringFormat())); } else if ((command == DvtkData.Dimse.DimseCommand.NCREATERQ) && (sopClassUid == DvtkData.Dul.AbstractSyntax.Modality_Performed_Procedure_Step.UID)) { // Add the comparison tags - these tags will be used to extract the values out of the // Dicom Dataset for comparison with other Datasets containing the same tags _comparisonTags.Add(new DicomComparisonTag(Tag.SPECIFIC_CHARACTER_SET, VR.CS, new CommonStringFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.SCHEDULED_STEP_ATTRIBUTES_SEQUENCE, Tag.ACCESSION_NUMBER, VR.SH, new CommonIdFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.MODALITY, VR.CS, new CommonStringFormat())); // _comparisonTags.Add(new DicomComparisonTag(Tag.SCHEDULED_STEP_ATTRIBUTES_SEQUENCE, Tag.REFERENCED_STUDY_SEQUENCE, VR.SQ, new CommonUidFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.PATIENTS_NAME, VR.PN, new CommonNameFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.PATIENT_ID, VR.LO, new CommonIdFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.PATIENTS_BIRTH_DATE, VR.DA, new CommonDateFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.PATIENTS_SEX, VR.CS, new CommonStringFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.SCHEDULED_STEP_ATTRIBUTES_SEQUENCE, Tag.STUDY_INSTANCE_UID, VR.UI, new CommonUidFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.SCHEDULED_STEP_ATTRIBUTES_SEQUENCE, Tag.REQUESTED_PROCEDURE_ID, VR.SH, new CommonIdFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.SCHEDULED_STEP_ATTRIBUTES_SEQUENCE, Tag.SCHEDULED_PROCEDURE_STEP_ID, VR.SH, new CommonIdFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.SCHEDULED_STEP_ATTRIBUTES_SEQUENCE, Tag.REQUESTED_PROCEDURE_DESCRIPTION, VR.LO, new CommonStringFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.SCHEDULED_STEP_ATTRIBUTES_SEQUENCE, Tag.SCHEDULED_PROCEDURE_STEP_DESCRIPTION, VR.LO, new CommonStringFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.PERFORMED_PROCEDURE_STEP_ID, VR.SH, new CommonIdFormat())); _comparisonTags.Add(new DicomComparisonTag(Tag.PERFORMED_PROCEDURE_STEP_DESCRIPTION, VR.LO, new CommonStringFormat())); } else { initialized = false; } return(initialized); }
/// <summary> /// Class constructor. /// </summary> /// <param name="command">DIMSE Command ID</param> /// <param name="sopClassUid">SOP Class UID</param> /// <returns>bool - true = template initialized, false template not initialized</returns> public bool Initialize(DvtkData.Dimse.DimseCommand command, System.String sopClassUid) { bool initialized = true; _command = command; _sopClassUid = sopClassUid; // Only certain template available // Use command and sopClassUid to determine if we can set one up if ((command == DvtkData.Dimse.DimseCommand.CFINDRSP) && (sopClassUid == DvtkData.Dul.AbstractSyntax.Modality_Worklist_Information_Model_FIND.UID)) { // Add the comparison tags - these tags will be used to extract the values out of the // Dicom Dataset for comparison with other Datasets containing the same tags _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0008, 0x0050), new CommonIdFormat())); // Accession Number _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0008, 0x0060), new CommonStringFormat())); // Modality _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0008, 0x1110), new CommonUidFormat())); // Referenced Study Sequence _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0010, 0x0010), new CommonNameFormat())); // Patient's Name _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0010, 0x0020), new CommonIdFormat())); // Patient ID _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0010, 0x0030), new CommonDateFormat())); // Patient's Birth Date _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0010, 0x0040), new CommonStringFormat())); // Patient's Sex _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0020, 0x000D), new CommonUidFormat())); // Study Instance UID _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0040, 0x1002), new CommonIdFormat())); // Requested Procedure ID _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0040, 0x0100), new Tag(0x0040, 0x0009), new CommonIdFormat())); // Scheduled Procedure Step ID _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0032, 0x1060), new CommonStringFormat())); // Requested Procedure Description _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0040, 0x0100), new Tag(0x0040, 0x0007), new CommonStringFormat())); // Scheduled Procedure Step Description } else if (command == DvtkData.Dimse.DimseCommand.CSTORERQ) { // Add the comparison tags - these tags will be used to extract the values out of the // Dicom Dataset for comparison with other Datasets containing the same tags _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0008, 0x0050), new CommonIdFormat())); // Accession Number _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0008, 0x0060), new CommonStringFormat())); // Modality _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0008, 0x1110), new CommonUidFormat())); // Referenced Study Sequence _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0010, 0x0010), new CommonNameFormat())); // Patient's Name _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0010, 0x0020), new CommonIdFormat())); // Patient ID _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0010, 0x0030), new CommonDateFormat())); // Patient's Birth Date _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0010, 0x0040), new CommonStringFormat())); // Patient's Sex _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0020, 0x000D), new CommonUidFormat())); // Study Instance UID _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0040, 0x0275), new Tag(0x0040, 0x1002), new CommonIdFormat())); // Requested Procedure ID _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0040, 0x0275), new Tag(0x0040, 0x0009), new CommonIdFormat())); // Scheduled Procedure Step ID _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0032, 0x1060), new CommonStringFormat())); // Requested Procedure Description _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0040, 0x0275), new Tag(0x0040, 0x0007), new CommonStringFormat())); // Scheduled Procedure Step Description _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0040, 0x0253), new CommonIdFormat())); // Performed Procedure Step ID _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0040, 0x0254), new CommonIdFormat())); // Performed Procedure Step Description } else if ((command == DvtkData.Dimse.DimseCommand.NCREATERQ) && (sopClassUid == DvtkData.Dul.AbstractSyntax.Modality_Performed_Procedure_Step.UID)) { // Add the comparison tags - these tags will be used to extract the values out of the // Dicom Dataset for comparison with other Datasets containing the same tags _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0040, 0x0270), new Tag(0x0008, 0x0050), new CommonIdFormat())); // Accession Number _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0008, 0x0060), new CommonStringFormat())); // Modality _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0040, 0x0270), new Tag(0x0008, 0x1110), new CommonUidFormat())); // Referenced Study Sequence _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0010, 0x0010), new CommonNameFormat())); // Patient's Name _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0010, 0x0020), new CommonIdFormat())); // Patient ID _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0010, 0x0030), new CommonDateFormat())); // Patient's Birth Date _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0010, 0x0040), new CommonStringFormat())); // Patient's Sex _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0040, 0x0270), new Tag(0x0020, 0x000D), new CommonUidFormat())); // Study Instance UID _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0040, 0x0270), new Tag(0x0040, 0x1002), new CommonIdFormat())); // Requested Procedure ID _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0040, 0x0270), new Tag(0x0040, 0x0009), new CommonIdFormat())); // Scheduled Procedure Step ID _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0040, 0x0270), new Tag(0x0032, 0x1060), new CommonStringFormat())); // Requested Procedure Description _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0040, 0x0270), new Tag(0x0040, 0x0007), new CommonStringFormat())); // Scheduled Procedure Step Description _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0040, 0x0253), new CommonIdFormat())); // Performed Procedure Step ID _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0040, 0x0254), new CommonStringFormat())); // Performed Procedure Step Description } else { initialized = false; } return initialized; }
/// <summary> /// Class constructor. /// </summary> /// <param name="command">DIMSE Command ID</param> /// <param name="sopClassUid">SOP Class UID</param> /// <returns>bool - true = template initialized, false template not initialized</returns> public bool Initialize(DvtkData.Dimse.DimseCommand command, System.String sopClassUid) { bool initialized = true; _command = command; _sopClassUid = sopClassUid; // Only certain template available // Use command and sopClassUid to determine if we can set one up if ((command == DvtkData.Dimse.DimseCommand.CFINDRSP) && (sopClassUid == DvtkData.Dul.AbstractSyntax.Modality_Worklist_Information_Model_FIND.UID)) { // Add the comparison tags - these tags will be used to extract the values out of the // Dicom Dataset for comparison with other Datasets containing the same tags _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0008, 0x0050), new CommonIdFormat())); // Accession Number _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0008, 0x0060), new CommonStringFormat())); // Modality _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0008, 0x1110), new CommonUidFormat())); // Referenced Study Sequence _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0010, 0x0010), new CommonNameFormat())); // Patient's Name _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0010, 0x0020), new CommonIdFormat())); // Patient ID _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0010, 0x0030), new CommonDateFormat())); // Patient's Birth Date _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0010, 0x0040), new CommonStringFormat())); // Patient's Sex _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0020, 0x000D), new CommonUidFormat())); // Study Instance UID _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0040, 0x1002), new CommonIdFormat())); // Requested Procedure ID _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0040, 0x0100), new Tag(0x0040, 0x0009), new CommonIdFormat())); // Scheduled Procedure Step ID _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0032, 0x1060), new CommonStringFormat())); // Requested Procedure Description _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0040, 0x0100), new Tag(0x0040, 0x0007), new CommonStringFormat())); // Scheduled Procedure Step Description } else if (command == DvtkData.Dimse.DimseCommand.CSTORERQ) { // Add the comparison tags - these tags will be used to extract the values out of the // Dicom Dataset for comparison with other Datasets containing the same tags _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0008, 0x0050), new CommonIdFormat())); // Accession Number _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0008, 0x0060), new CommonStringFormat())); // Modality _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0008, 0x1110), new CommonUidFormat())); // Referenced Study Sequence _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0010, 0x0010), new CommonNameFormat())); // Patient's Name _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0010, 0x0020), new CommonIdFormat())); // Patient ID _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0010, 0x0030), new CommonDateFormat())); // Patient's Birth Date _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0010, 0x0040), new CommonStringFormat())); // Patient's Sex _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0020, 0x000D), new CommonUidFormat())); // Study Instance UID _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0040, 0x0275), new Tag(0x0040, 0x1002), new CommonIdFormat())); // Requested Procedure ID _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0040, 0x0275), new Tag(0x0040, 0x0009), new CommonIdFormat())); // Scheduled Procedure Step ID _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0032, 0x1060), new CommonStringFormat())); // Requested Procedure Description _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0040, 0x0275), new Tag(0x0040, 0x0007), new CommonStringFormat())); // Scheduled Procedure Step Description _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0040, 0x0253), new CommonIdFormat())); // Performed Procedure Step ID _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0040, 0x0254), new CommonIdFormat())); // Performed Procedure Step Description } else if ((command == DvtkData.Dimse.DimseCommand.NCREATERQ) && (sopClassUid == DvtkData.Dul.AbstractSyntax.Modality_Performed_Procedure_Step.UID)) { // Add the comparison tags - these tags will be used to extract the values out of the // Dicom Dataset for comparison with other Datasets containing the same tags _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0040, 0x0270), new Tag(0x0008, 0x0050), new CommonIdFormat())); // Accession Number _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0008, 0x0060), new CommonStringFormat())); // Modality _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0040, 0x0270), new Tag(0x0008, 0x1110), new CommonUidFormat())); // Referenced Study Sequence _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0010, 0x0010), new CommonNameFormat())); // Patient's Name _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0010, 0x0020), new CommonIdFormat())); // Patient ID _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0010, 0x0030), new CommonDateFormat())); // Patient's Birth Date _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0010, 0x0040), new CommonStringFormat())); // Patient's Sex _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0040, 0x0270), new Tag(0x0020, 0x000D), new CommonUidFormat())); // Study Instance UID _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0040, 0x0270), new Tag(0x0040, 0x1002), new CommonIdFormat())); // Requested Procedure ID _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0040, 0x0270), new Tag(0x0040, 0x0009), new CommonIdFormat())); // Scheduled Procedure Step ID _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0040, 0x0270), new Tag(0x0032, 0x1060), new CommonStringFormat())); // Requested Procedure Description _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0040, 0x0270), new Tag(0x0040, 0x0007), new CommonStringFormat())); // Scheduled Procedure Step Description _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0040, 0x0253), new CommonIdFormat())); // Performed Procedure Step ID _comparisonTags.Add(new DicomComparisonTag(new Tag(0x0040, 0x0254), new CommonStringFormat())); // Performed Procedure Step Description } else { initialized = false; } return(initialized); }