Esempio n. 1
0
        public IProfileContract BuildProfile(Period period)
        {
            IContractEmploy employContract = EmployHistory.ResolveContract(period);
            IContractTaxing taxingContract = TaxingHistory.ResolveContract(period);
            IContractHealth healthContract = HealthHistory.ResolveContract(period);
            IContractSocial socialContract = SocialHistory.ResolveContract(period);

            return(new ProfileContract(period, employContract, taxingContract, healthContract, socialContract));
        }
Esempio n. 2
0
        /**************************************************************************************************/
        private void LoadOrGetSocialHx()
        {
            //  get active patinet object from session manager
            socialHx = SessionManager.Instance.GetActivePatient().SocialHx;

            if (socialHx != null)
            {
                socialHx.AddHandlersWithLoad(SocialHxChanged, SocialHxLoaded, null);
            }
        }
Esempio n. 3
0
        /// <summary>
        /// Revises the and calculate.
        /// </summary>
        /// <param name="haveYouUsedDrugsIndicator">The have you used drugs indicator.</param>
        /// <param name="doYouAbuseMoreThanOneDrugIndicator">The do you abuse more than one drug indicator.</param>
        /// <param name="areYouAbleToStopUsingDrugsIndicator">The are you able to stop using drugs indicator.</param>
        /// <param name="haveYouHadBlackoutsOrFlashbacksIndicator">The have you had blackouts or flashbacks indicator.</param>
        /// <param name="doYouFeelBadOrGuiltyIndicator">The do you feel bad or guilty indicator.</param>
        /// <param name="doesYourSpouseOrParentComplainIndicator">The does your spouse or parent complain indicator.</param>
        /// <param name="haveYouNeglectedYourFamilyIndicator">The have you neglected your family indicator.</param>
        /// <param name="haveYouEngagedInIllegalActivitiesIndicator">The have you engaged in illegal activities indicator.</param>
        /// <param name="haveYouEverExperiencedWithdrawalSymptomsIndicator">The have you ever experienced withdrawal symptoms indicator.</param>
        /// <param name="haveYouHadMedicalProblemsIndicator">The have you had medical problems indicator.</param>
        public virtual void ReviseAndCalculate(bool?haveYouUsedDrugsIndicator,
                                               bool?doYouAbuseMoreThanOneDrugIndicator,
                                               bool?areYouAbleToStopUsingDrugsIndicator,
                                               bool?haveYouHadBlackoutsOrFlashbacksIndicator,
                                               bool?doYouFeelBadOrGuiltyIndicator,
                                               bool?doesYourSpouseOrParentComplainIndicator,
                                               bool?haveYouNeglectedYourFamilyIndicator,
                                               bool?haveYouEngagedInIllegalActivitiesIndicator,
                                               bool?haveYouEverExperiencedWithdrawalSymptomsIndicator,
                                               bool?haveYouHadMedicalProblemsIndicator)
        {
            HaveYouUsedDrugsIndicator                         = haveYouUsedDrugsIndicator;
            DoYouAbuseMoreThanOneDrugIndicator                = doYouAbuseMoreThanOneDrugIndicator;
            AreYouAbleToStopUsingDrugsIndicator               = areYouAbleToStopUsingDrugsIndicator;
            HaveYouHadBlackoutsOrFlashbacksIndicator          = haveYouHadBlackoutsOrFlashbacksIndicator;
            DoYouFeelBadOrGuiltyIndicator                     = doYouFeelBadOrGuiltyIndicator;
            DoesYourSpouseOrParentComplainIndicator           = doesYourSpouseOrParentComplainIndicator;
            HaveYouNeglectedYourFamilyIndicator               = haveYouNeglectedYourFamilyIndicator;
            HaveYouEngagedInIllegalActivitiesIndicator        = haveYouEngagedInIllegalActivitiesIndicator;
            HaveYouEverExperiencedWithdrawalSymptomsIndicator = haveYouEverExperiencedWithdrawalSymptomsIndicator;
            HaveYouHadMedicalProblemsIndicator                = haveYouHadMedicalProblemsIndicator;

            SeverityScore = InterpretAnswer(_haveYouUsedDrugsIndicator)
                            + InterpretAnswer(_doYouAbuseMoreThanOneDrugIndicator)
                            + InterpretAnswer(_areYouAbleToStopUsingDrugsIndicator, true)
                            + InterpretAnswer(_haveYouHadBlackoutsOrFlashbacksIndicator)
                            + InterpretAnswer(_doYouFeelBadOrGuiltyIndicator)
                            + InterpretAnswer(_doesYourSpouseOrParentComplainIndicator)
                            + InterpretAnswer(_haveYouNeglectedYourFamilyIndicator)
                            + InterpretAnswer(_haveYouEngagedInIllegalActivitiesIndicator)
                            + InterpretAnswer(_haveYouEverExperiencedWithdrawalSymptomsIndicator)
                            + InterpretAnswer(_haveYouHadMedicalProblemsIndicator);

            NidaDrugQuestionnaire nidaDrugQuestionnaire = null;

            if (SeverityScore > 0)
            {
                nidaDrugQuestionnaire = ScheduleNidaDrugQuestionnaire();
            }
            else
            {
                var           socialHistoryRepository = IoC.CurrentContainer.Resolve <ISocialHistoryRepository> ();
                SocialHistory socialHistory           = socialHistoryRepository.GetSocialHistoryInVisit(Visit.Key);

                if (socialHistory != null && socialHistory.SocialHistoryDast10.Dast10TimesPastYearUsedIllegalDrugOrPrescriptionMedicationForNonMedicalReasonsNumber.GetValueOrDefault() > 0)
                {
                    nidaDrugQuestionnaire = ScheduleNidaDrugQuestionnaire();
                }
            }

            SetDast10Result(nidaDrugQuestionnaire);
        }
        public SocialHistory UpdatePatient(SocialHistory SocialHistory)
        {
            var session = HttpContext.Current.Session;

            if (session["UserId"] != null)
            {
                userId = session["UserId"].ToString();
            }
            SocialHistory   sochist = _sochist.UpdatePatient(SocialHistory);
            EncounterReport erp     = new EncounterReport();

            erp.RefId     = sochist._id;
            erp.PatientId = sochist.UserId;
            erp.UpdateBy  = userId;
            erp.Action    = "update SocialHistory";
            var encreports = encrepo.AddEncReport(erp);

            return(sochist);
        }
        public string FillSocialHistory(ClinicalDocument clinicalDoc, Factory hl7factory, III hl7III, PatientClinicalInformation patientinfo)
        {
            string clinicdetais = string.Empty;

            ptSocialHistory = new SocialHistory();
            CreateComponent(ptSocialHistory, clinicalDoc, hl7III);// Manage Problem Component
            FillSocialHistoryContent(patientinfo.ptSocialHistory, hl7factory);

            //CreateSocialHistoryBody(patientinfo.ptSocialHistory);
            // Creating Social History Table Body with Table Structure
            int idCount = 1;

            ///''' For Smoking Status ''''''

            if (patientinfo.ptSocialHistory != null)
            {
                GenerateSocialHistoryEntry(patientinfo.ptSocialHistory.Smoker, ref idCount, "Smoking", hl7III, hl7factory);
            }
            else
            {
                GenerateSocialHistoryEmpty(hl7III, hl7factory);
            }
            ///''' For Alcohol Status '''''
            if (patientinfo.ptSocialHistory != null)
            {
                if (!string.IsNullOrEmpty(patientinfo.ptSocialHistory.Alcohol))
                {
                    GenerateSocialHistoryEntry(patientinfo.ptSocialHistory.Alcohol, ref idCount, "Alcohol", hl7III, hl7factory);
                }

                if (!string.IsNullOrEmpty(patientinfo.ptSocialHistory.Drugs))
                {
                    GenerateSocialHistoryEntry(patientinfo.ptSocialHistory.Drugs, ref idCount, "Drugs", hl7III, hl7factory);
                }

                if (!string.IsNullOrEmpty(patientinfo.ptSocialHistory.Tobacoo))
                {
                    GenerateSocialHistoryEntry(patientinfo.ptSocialHistory.Tobacoo, ref idCount, "Tobacoo", hl7III, hl7factory);
                }
            }
            return(clinicalDoc.Xml);
        }
        private void CreateComponent(SocialHistory ptSocialHistory, ClinicalDocument clinicalDoc, III hl7III)
        {
            hl7Body          = clinicalDoc.Component.AsStructuredBody;
            functionalStatus = hl7Body.Component.Append();
            hl7III           = functionalStatus.Section.TemplateId.Append();
            if (ptSocialHistory.root != null)
            {
                hl7III.Init(ptSocialHistory.root);
            }

            //if (dictionary.ContainsKey(Root2))
            //{
            //    hl7III = functionalStatus.Section.TemplateId.Append;
            //    hl7III.Init(dictionary.Item(Root2));
            //}

            if (ptSocialHistory.code != null)
            {
                functionalStatus.Section.Code.Code = ptSocialHistory.code;
            }

            if (ptSocialHistory.codeSystem != null)
            {
                functionalStatus.Section.Code.CodeSystem = ptSocialHistory.codeSystem;
            }

            if (ptSocialHistory.codeSystemName != null)
            {
                functionalStatus.Section.Code.CodeSystemName = ptSocialHistory.codeSystemName;
            }

            if (ptSocialHistory.displayName != null)
            {
                functionalStatus.Section.Code.DisplayName = ptSocialHistory.displayName;
            }

            if (ptSocialHistory.title != null)
            {
                functionalStatus.Section.Title.Text = ptSocialHistory.title;
            }
        }
Esempio n. 7
0
        /// <summary>
        /// Processes the single aggregate.
        /// </summary>
        /// <param name="socialHistoryDto">The social history dto.</param>
        /// <param name="socialHistory">The social history.</param>
        /// <returns>A <see cref="System.Boolean"/></returns>
        protected override bool ProcessSingleAggregate(SocialHistoryDto socialHistoryDto, SocialHistory socialHistory)
        {
            // register for various 'created' events
            DomainEvent.Register <Phq9CreatedEvent> (e => _isPhq9Created     = true);
            DomainEvent.Register <AuditCCreatedEvent> (e => _isAuditCCreated = true);
            DomainEvent.Register <Dast10CreatedEvent> (e => _isDast10Created = true);

            var socialHistoryPhq2 = new SocialHistoryPhq2(
                socialHistoryDto.Phq2LittleInterestInDoingThingsAnswerNumber,
                socialHistoryDto.Phq2FeelingDownAnswerNumber,
                socialHistoryDto.Phq2Score);

            socialHistory.ReviseSocialHistoryPhq2(socialHistoryPhq2);

            var socialHistoryAuditC = new SocialHistoryAuditC(
                socialHistoryDto.AuditCDrinkBeerWineOrOtherAlcoholicBeveragesIndicator);

            socialHistory.ReviseSocialHistoryAuditC(socialHistoryAuditC);

            var socialHistoryDast10 = new SocialHistoryDast10(
                socialHistoryDto.Dast10TimesPastYearUsedIllegalDrugOrPrescriptionMedicationForNonMedicalReasonsNumber);

            socialHistory.ReviseSocialHistoryDast10(socialHistoryDast10);

            var smokingStatus        = _mappingHelper.MapLookupField <SmokingStatus> (socialHistoryDto.SmokingStatus);
            var socialHistorySmoking = new SocialHistorySmoking(
                smokingStatus,
                socialHistoryDto.SmokingStatusAreYouWillingToQuitIndicator,
                socialHistoryDto.SmokingStatusAreYouWillingToQuitDate);

            socialHistory.ReviseSocialHistorySmoking(socialHistorySmoking);

            return(true);
        }