Exemplo n.º 1
0
 /// <summary>
 /// Serves as a hash function for a particular type.
 /// </summary>
 /// <returns>
 /// A hash code for the current <see cref="T:System.Object"/>.
 /// </returns>
 /// <filterpriority>2</filterpriority>
 public override int GetHashCode()
 {
     unchecked
     {
         int result = (LabTestTypeCodedConcept != null ? LabTestTypeCodedConcept.GetHashCode() : 0);
         result = (result * 397) ^ (LabTestName != null ? LabTestName.GetHashCode() : 0);
         result = (result * 397) ^ (NormalRangeDescription != null ? NormalRangeDescription.GetHashCode() : 0);
         result = (result * 397) ^ (InterpretationCodeCodedConcept != null ? InterpretationCodeCodedConcept.GetHashCode() : 0);
         result = (result * 397) ^ (LabResultStatusCodedConcept != null ? LabResultStatusCodedConcept.GetHashCode() : 0);
         result = (result * 397) ^ (TestReportDate.HasValue ? TestReportDate.Value.GetHashCode() : 0);
         result = (result * 397) ^ (LabTestNote != null ? LabTestNote.GetHashCode() : 0);
         return(result);
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="LabTestInfo"/> class.
        /// </summary>
        /// <param name="labTestName">Name of the lab test.</param>
        /// <param name="labTestTypeCodedConcept">The lab test type coded concept.</param>
        /// <param name="normalRangeDescription">The normal range description.</param>
        /// <param name="interpretationCodeCodedConcept">The interpretation code coded concept.</param>
        /// <param name="labResultStatusCodedConcept">The lab result status coded concept.</param>
        /// <param name="testReportDate">The test report date.</param>
        /// <param name="labTestNote">The lab test note.</param>
        internal LabTestInfo(LabTestName labTestName,
                             CodedConcept labTestTypeCodedConcept,
                             string normalRangeDescription,
                             CodedConcept interpretationCodeCodedConcept,
                             CodedConcept labResultStatusCodedConcept,
                             DateTime?testReportDate,
                             string labTestNote)
        {
            Check.IsNotNull(labTestName, () => LabTestName);

            LabTestName                    = labTestName;
            LabTestTypeCodedConcept        = labTestTypeCodedConcept;
            NormalRangeDescription         = normalRangeDescription;
            InterpretationCodeCodedConcept = interpretationCodeCodedConcept;
            LabResultStatusCodedConcept    = labResultStatusCodedConcept;
            TestReportDate                 = testReportDate;
            LabTestNote                    = labTestNote;
        }
        private LabTest BuildLabTest( LabSpecimen labSpecimen, LabTestName labTestNameCodedConcept )
        {
            var labTest = labSpecimen.AddLabTest(new LabTestInfoBuilder().WithLabTestName(labTestNameCodedConcept));

            Session.SaveOrUpdate ( labTest );
            return labTest;
        }
Exemplo n.º 4
0
 /// <summary>
 /// Revises the name of the lab test.
 /// </summary>
 /// <param name="labTestName">Name of the lab test.</param>
 public virtual void ReviseLabTestName(LabTestName labTestName)
 {
     _labTestName = labTestName;
 }
Exemplo n.º 5
0
 /// <summary>
 /// Assigns the name of the lab test.
 /// </summary>
 /// <param name="labTestName">Name of the lab test.</param>
 /// <returns>A LabTestInfoBuilder.</returns>
 public LabTestInfoBuilder WithLabTestName(LabTestName labTestName)
 {
     _labTestName = labTestName;
     return this;
 }
Exemplo n.º 6
0
 /// <summary>
 /// Assigns the name of the lab test.
 /// </summary>
 /// <param name="labTestName">Name of the lab test.</param>
 /// <returns>A LabTestInfoBuilder.</returns>
 public LabTestInfoBuilder WithLabTestName(LabTestName labTestName)
 {
     _labTestName = labTestName;
     return(this);
 }