public PcpResultExportModel SetPhq9Data(PcpResultExportModel model, Phq9TestResult testResult, bool useBlankValue = false)
        {
            if (testResult.Phq9Score != null)
            {
                model.Phq9Score = testResult.Phq9Score.Reading;
            }

            model.Phq9UnabletoScreen = testResult.UnableScreenReason != null && testResult.UnableScreenReason.Count > 0 ? PcpResultExportHelper.YesString : (useBlankValue ? "" : PcpResultExportHelper.NoString);

            if ((testResult.ResultStatus != null && testResult.ResultStatus.SelfPresent) || (testResult.PhysicianInterpretation != null && testResult.PhysicianInterpretation.IsCritical))
            {
                model.Phq9Critical = PcpResultExportHelper.YesString;
            }
            else if (!useBlankValue)
            {
                model.Phq9Critical = PcpResultExportHelper.NoString;
            }

            if (testResult.PhysicianInterpretation != null)
            {
                model.Phq9PhysicianNotes = testResult.PhysicianInterpretation.Remarks;
            }

            return(model);
        }
Пример #2
0
        public override TestResult CreateActualTestResult(CustomerEventScreeningTestsEntity customerEventScreeningTestEntity)
        {
            var testResult = new Phq9TestResult(customerEventScreeningTestEntity.CustomerEventScreeningTestId);
            var customerEventReadingEntities = customerEventScreeningTestEntity.CustomerEventReading.ToList();

            testResult.Phq9Score = CreateResultReadingforInputValues((int)ReadingLabels.Phq9Score, customerEventReadingEntities);

            testResult.TechnicallyLimitedbutReadable = CreateResultReading((int)ReadingLabels.TechnicallyLimitedbutReadable, customerEventReadingEntities);
            testResult.RepeatStudy = CreateResultReading((int)ReadingLabels.RepeatStudy, customerEventReadingEntities);

            return(testResult);
        }