Пример #1
0
        public PatientLabTest AddLabTest(DateTime testDate, string testResult, LabTest labTest, LabTestUnit testUnit, string labValue, string referenceLower, string referenceUpper)
        {
            if (DateOfBirth.HasValue)
            {
                if (testDate.Date < DateOfBirth.Value.Date)
                {
                    throw new DomainException("Test Date should be after patient Date Of Birth");
                }
            }

            var newPatientLabTest = new PatientLabTest(testDate, testResult, labTest, testUnit, labValue, referenceLower, referenceUpper, labTest.Description);

            PatientLabTests.Add(newPatientLabTest);
            return(newPatientLabTest);
        }
Пример #2
0
        public PatientLabTest(DateTime testDate, string testResult, LabTest labTest, LabTestUnit testUnit, string labValue, string referenceLower, string referenceUpper, string labTestSource)
        {
            PatientLabTestGuid = Guid.NewGuid();
            Archived           = false;

            TestDate   = testDate;
            TestResult = testResult;
            LabTestId  = labTest.Id;
            LabTest    = labTest;

            if (testUnit != null)
            {
                TestUnitId = testUnit.Id;
                TestUnit   = testUnit;
            }

            LabValue       = labValue;
            ReferenceLower = referenceLower;
            ReferenceUpper = referenceUpper;
            LabTestSource  = labTestSource;
        }