예제 #1
0
        public MemberCaseCarePlanAssessment CreateAssessment()
        {
            MemberCaseCarePlanAssessment assessment = new MemberCaseCarePlanAssessment(application);

            assessment.MemberCaseCarePlanId = this.Id;

            assessment.MemberCaseCarePlan = this;


            foreach (MemberCaseCarePlanGoal currentMemberCaseCarePlanGoal in goals)
            {
                MemberCaseCarePlanAssessmentCareMeasure assessmentCareMeasure = assessment.CareMeasure(currentMemberCaseCarePlanGoal.CareMeasureId);

                if (assessmentCareMeasure == null)
                {
                    // IF THE ASSESSMENT DOES NOT CONTAIN THE CARE MEASURE, ADD THE CARE MEASURE AND GET THE REFERENCE

                    assessmentCareMeasure = new MemberCaseCarePlanAssessmentCareMeasure(application);

                    assessmentCareMeasure.MemberCaseCarePlanAssessmentId = assessment.Id;

                    assessmentCareMeasure.MemberCaseCarePlanAssessment = assessment;

                    assessmentCareMeasure.SetCareMeasure(currentMemberCaseCarePlanGoal.CareMeasure);

                    assessment.Measures.Add(assessmentCareMeasure);
                }

                assessmentCareMeasure.AddMemberCaseCarePlanGoal(currentMemberCaseCarePlanGoal);
            }

            return(assessment);
        }
        public Boolean IsEqual(MemberCaseCarePlanAssessmentCareMeasure compareObject)
        {
            Boolean isEqual = base.IsEqual((CoreObject)compareObject);

            // TODO:

            return(isEqual);
        }
        public MemberCaseCarePlanAssessmentCareMeasure Copy()
        {
            Server.Application.MemberCaseCarePlanAssessmentCareMeasure serverObject = (Server.Application.MemberCaseCarePlanAssessmentCareMeasure)ToServerObject();

            MemberCaseCarePlanAssessmentCareMeasure copiedObject = new MemberCaseCarePlanAssessmentCareMeasure(application, serverObject);

            return(copiedObject);
        }
        public void MapFromServerObject(Server.Application.MemberCaseCarePlanAssessment serverObject)
        {
            base.MapFromServerObject((Server.Application.CoreObject)serverObject);


            MemberCaseCarePlanId = serverObject.MemberCaseCarePlanId;

            AssessmentDate = serverObject.AssessmentDate;

            Measures = new List <MemberCaseCarePlanAssessmentCareMeasure> ();

            foreach (Server.Application.MemberCaseCarePlanAssessmentCareMeasure currentServerMeasure in serverObject.Measures)
            {
                MemberCaseCarePlanAssessmentCareMeasure assessmentCareMeasure = new MemberCaseCarePlanAssessmentCareMeasure(application, currentServerMeasure);

                assessmentCareMeasure.MemberCaseCarePlanAssessment = this;

                Measures.Add(assessmentCareMeasure);
            }

            return;
        }