#region License // Copyright (c) 2006-2008, ClearCanvas Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, // are permitted provided that the following conditions are met: // // * Redistributions of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation // and/or other materials provided with the distribution. // * Neither the name of ClearCanvas Inc. nor the names of its contributors // may be used to endorse or promote products derived from this software without // specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, // OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE // GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY // OF SUCH DAMAGE. #endregion using System; using ClearCanvas.Dicom.Utilities; namespace ClearCanvas.Dicom.Iod.Modules { /// /// Patient Medical Module, as per Part 3, C.2.4 /// public class PatientMedicalModule : IodBase { #region Constructors /// /// Initializes a new instance of the class. /// public PatientMedicalModule() : base() { } /// /// Initializes a new instance of the class. /// /// The dicom attribute collection. public PatientMedicalModule(DicomAttributeCollection dicomAttributeCollection) : base(dicomAttributeCollection) { } #endregion #region Public Properties /// /// Gets or sets the medical alerts. /// /// The medical alerts. public string MedicalAlerts { get { return base.DicomAttributeProvider[DicomTags.MedicalAlerts].GetString(0, String.Empty); } set { base.DicomAttributeProvider[DicomTags.MedicalAlerts].SetString(0, value.ToString()); } } /// /// Gets or sets the patient allergies /// /// The allergies. public string Allergies { get { return base.DicomAttributeProvider[DicomTags.Allergies].GetString(0, String.Empty); } set { base.DicomAttributeProvider[DicomTags.Allergies].SetString(0, value); } } /// /// Gets or sets the smoking status. /// /// The smoking status. public SmokingStatus SmokingStatus { get { return IodBase.ParseEnum(base.DicomAttributeProvider[DicomTags.SmokingStatus].GetString(0, String.Empty), SmokingStatus.Unknown); } set { IodBase.SetAttributeFromEnum(base.DicomAttributeProvider[DicomTags.SmokingStatus], value); } } /// /// Gets or sets the additional patient history. /// /// The additional payment history. public string AdditionalPatientHistory { get { return base.DicomAttributeProvider[DicomTags.AdditionalPatientHistory].GetString(0, String.Empty); } set { base.DicomAttributeProvider[DicomTags.AdditionalPatientHistory].SetString(0, value); } } /// /// Gets or sets the responsible person role. /// /// The responsible person role. public PregnancyStatus PregnancyStatus { get { return IodBase.ParseEnum(base.DicomAttributeProvider[DicomTags.PregnancyStatus].GetString(0, String.Empty), PregnancyStatus.Unknown); } set { IodBase.SetAttributeFromEnum(base.DicomAttributeProvider[DicomTags.PregnancyStatus], value); } } /// /// Gets or sets the patients last Menstrual date (if applicable). /// /// The patients last Menstrual date. public DateTime? LastMenstrualDate { get { return DateTimeParser.ParseDateAndTime(String.Empty, base.DicomAttributeProvider[DicomTags.LastMenstrualDate].GetString(0, String.Empty), base.DicomAttributeProvider[DicomTags.LastMenstrualDate].GetString(0, String.Empty)); } set { DateTimeParser.SetDateTimeAttributeValues(value, base.DicomAttributeProvider[DicomTags.LastMenstrualDate], base.DicomAttributeProvider[DicomTags.LastMenstrualDate]); } } /// /// Gets or sets the Patient's Sex Neutered value. /// /// The Patient's Sex Neutered value public PatientsSexNeutered PatientsSexNeutered { get { return IodBase.ParseEnum(base.DicomAttributeProvider[DicomTags.PatientsSexNeutered].GetString(0, String.Empty), PatientsSexNeutered.Unaltered); } set { IodBase.SetAttributeFromEnum(base.DicomAttributeProvider[DicomTags.PatientsSexNeutered], value); } } /// /// Gets or sets the special needs field. /// /// Special Needs. public string SpecialNeeds { get { return base.DicomAttributeProvider[DicomTags.SpecialNeeds].GetString(0, String.Empty); } set { base.DicomAttributeProvider[DicomTags.SpecialNeeds].SetString(0, value); } } /// /// Gets or sets the patient's state. /// /// Patient's State. public string PatientState { get { return base.DicomAttributeProvider[DicomTags.PatientState].GetString(0, String.Empty); } set { base.DicomAttributeProvider[DicomTags.PatientState].SetString(0, value); } } //TODO: Patient's Pertinent Documents Sequence //TODO: Purposes of Code Reference Sequence /// /// Gets or sets the Document Title. /// /// Title of Referenced Document. public string DocumentTitle { get { return base.DicomAttributeProvider[DicomTags.DocumentTitle].GetString(0, String.Empty); } set { base.DicomAttributeProvider[DicomTags.DocumentTitle].SetString(0, value); } } //TODO: Patient Clinical Trials Participation Sequence. /// /// Gets or sets the Clinical Trial Sponsor Name. /// /// The name of the clinical trial sponsor. public string ClinicalTrialSponsorName { get { return base.DicomAttributeProvider[DicomTags.ClinicalTrialSponsorName].GetString(0, String.Empty); } set { base.DicomAttributeProvider[DicomTags.ClinicalTrialSponsorName].SetString(0, value); } } /// /// Gets or sets the Document Title. /// /// Identifier for the Noted Protocol. public string ClinicalTrialProtocolId { get { return base.DicomAttributeProvider[DicomTags.ClinicalTrialProtocolId].GetString(0, String.Empty); } set { base.DicomAttributeProvider[DicomTags.ClinicalTrialProtocolId].SetString(0, value); } } /// /// Gets or sets the Clinical Trial Protocol Name. /// /// The name or title of the clinical trial protocol. public string ClinicalTrialProtocolName { get { return base.DicomAttributeProvider[DicomTags.ClinicalTrialProtocolName].GetString(0, String.Empty); } set { base.DicomAttributeProvider[DicomTags.ClinicalTrialProtocolName].SetString(0, value); } } /// /// Gets or sets the Clinical Trial Site Id. /// /// Identifier of the clinical trial site public string ClinicalTrialSiteId { get { return base.DicomAttributeProvider[DicomTags.ClinicalTrialSiteId].GetString(0, String.Empty); } set { base.DicomAttributeProvider[DicomTags.ClinicalTrialSiteId].SetString(0, value); } } /// /// Gets or sets the Clinical Trial Site Name. /// /// Clinical Trial Site Name. public string ClinicalTrialSiteName { get { return base.DicomAttributeProvider[DicomTags.ClinicalTrialSiteName].GetString(0, String.Empty); } set { base.DicomAttributeProvider[DicomTags.ClinicalTrialSiteName].SetString(0, value); } } /// /// Gets or sets the Clinical Trial Subject Id. /// /// Clinical Trial Subject Id. public string ClinicalTrialSubjectId { get { return base.DicomAttributeProvider[DicomTags.ClinicalTrialSubjectId].GetString(0, String.Empty); } set { base.DicomAttributeProvider[DicomTags.ClinicalTrialSubjectId].SetString(0, value); } } /// /// Gets or sets the Clinical Trial Subject Reading Id. /// /// Clinical Trial Subject Reading Id. public string ClinicalTrialSubjectReadingId { get { return base.DicomAttributeProvider[DicomTags.ClinicalTrialSubjectReadingId].GetString(0, String.Empty); } set { base.DicomAttributeProvider[DicomTags.ClinicalTrialSubjectReadingId].SetString(0, value); } } #endregion } #region SmokingStatus Enum /// /// SmokingStatus Enumeration /// public enum SmokingStatus { /// /// Yes /// Yes, /// /// No /// No, /// /// Unknown /// Unknown } #endregion #region PregnancyStatus Enum /// /// PregnancyStatus Enumeration /// public enum PregnancyStatus { /// /// Not Pregnant /// NotPregnant, /// /// Possibly Pregnant /// PossiblyPregnant, /// /// Definitely Pregnant /// DefinitelyPregnant, /// /// Unknown /// Unknown } #endregion }