Beispiel #1
0
        static void DoSingleEvaluationOnly(string clientId, string password, string subUnitId)
        {
            // Evaluations - Use the test one I have there  need to debug some issues with this.
            var eValueEval = new EvaluationApi(clientId, password, subUnitId, "https://api.e-value.net/Evaluation_1_0b.cfc");


            // This call uses the subject user id in the parameter list - something new from EValue - yay!!
            var evaluationItems = eValueEval.GetResponsesUsingSubjectId("359140", new DateTime(2017, 1, 1), new DateTime(2018, 7, 31), 1, 263557, 1193954);

            foreach (var evaluationItem in evaluationItems.EvaluationItems)
            {
                Console.WriteLine($"----- ---- Evaluation Item: {evaluationItem.SiteName} Name: {evaluationItem.Name} Activity: {evaluationItem.ActivityId}-{evaluationItem.Abbreviation} EIMnum: {evaluationItem.Eimnum} FormType: {evaluationItem.EvaluationFormTypeId} ");
                if (evaluationItem.SubjectUserId == 1193817)
                {
                    Console.WriteLine("Here she is!!!!!");
                }
            }

            // This call uses the subject user id in the parameter list - something new from EValue - yay!!
            evaluationItems = eValueEval.GetResponsesUsingEvaluatorId("365729", new DateTime(2017, 1, 1), new DateTime(2018, 7, 31), 1, 246405, 1193575);
            foreach (var evaluationItem in evaluationItems.EvaluationItems)
            {
                Console.WriteLine($"----- ---- Evaluation Item: {evaluationItem.SiteName} {evaluationItem.Name} {evaluationItem.ActivityId} {evaluationItem.Eimnum} Type {245328}");
                if (evaluationItem.SubjectUserId == 1193817)
                {
                    Console.WriteLine("Here she is!!!!!");
                }
            }

            evaluationItems = eValueEval.GetResponses("358970", new DateTime(2017, 1, 1), new DateTime(2018, 4, 30), 1, 245328, DateTime.Now.AddDays(-7));
            foreach (var evaluationItem in evaluationItems.EvaluationItems)
            {
                Console.WriteLine($"----- ---- Evaluation Item: {evaluationItem.SiteName} {evaluationItem.Name} {evaluationItem.ActivityId} {evaluationItem.Eimnum} Type {245328}");
                if (evaluationItem.SubjectUserId == 1193817)
                {
                    Console.WriteLine("Here she is!!!!!");
                }
            }


            evaluationItems = eValueEval.GetResponses("358970", new DateTime(2017, 9, 14), new DateTime(2017, 10, 16), 1, 245328, DateTime.Now.AddDays(-30));
            foreach (var evaluationItem in evaluationItems.EvaluationItems)
            {
                Console.WriteLine($"----- ---- Evaluation Item: {evaluationItem.SiteName} {evaluationItem.Name} {evaluationItem.ActivityId} {evaluationItem.Eimnum} Type {245328}");
            }



            // Enrollment Verification - PEDS301 (359046)
            evaluationItems = eValueEval.GetResponses("359046", new DateTime(2017, 9, 1), new DateTime(2017, 10, 30), 1, 246405, DateTime.Now.AddDays(-20));
            foreach (var evaluationItem in evaluationItems.EvaluationItems)
            {
                Console.WriteLine($"----- ---- Evaluation Item: {evaluationItem.SiteName} {evaluationItem.Name} {evaluationItem.ActivityId} {evaluationItem.Eimnum} Type {245328}");
            }

            // Compentency Assessments - PEDS301 (359046)
            evaluationItems = eValueEval.GetResponses("359046", new DateTime(2017, 9, 1), new DateTime(2017, 10, 30), 1, 245328, DateTime.Now.AddDays(-30));
            foreach (var evaluationItem in evaluationItems.EvaluationItems)
            {
                Console.WriteLine($"----- ---- Evaluation Item: {evaluationItem.SiteName} {evaluationItem.Name} {evaluationItem.ActivityId} {evaluationItem.Eimnum} Type {245328}");
            }

            // Student ECR MS4 - IMED302 (358971)
            evaluationItems = eValueEval.GetResponses("358971", new DateTime(2018, 1, 1), new DateTime(2018, 1, 31), 1, 246139, DateTime.Now.AddDays(-30));
            foreach (var evaluationItem in evaluationItems.EvaluationItems)
            {
                Console.WriteLine($"----- ---- Evaluation Item: {evaluationItem.SiteName} {evaluationItem.Name} {evaluationItem.ActivityId} {evaluationItem.Eimnum} Type {245328}");
            }

            // Compentency Assessments - IMED302 (358971)
            evaluationItems = eValueEval.GetResponses("358971", new DateTime(2018, 1, 1), new DateTime(2018, 1, 31), 1, 245328, DateTime.Now.AddDays(-30));
            foreach (var evaluationItem in evaluationItems.EvaluationItems.Where(xxx => xxx.SubjectUserId == 1193826))
            {
                Console.WriteLine($"----- ---- Evaluation Item: {evaluationItem.SiteName} {evaluationItem.Name} {evaluationItem.ActivityId} {evaluationItem.Eimnum} Type {245328}");
            }

            evaluationItems = eValueEval.GetResponses("358777", new DateTime(2017, 9, 20), new DateTime(2017, 10, 30), 1, 244774, DateTime.Now.AddDays(-30));
            foreach (var evaluationItem in evaluationItems.EvaluationItems)
            {
                Console.WriteLine($"----- ---- Evaluation Item: {evaluationItem.SiteName} {evaluationItem.Name} {evaluationItem.ActivityId} {evaluationItem.Eimnum} Type {244774}");
            }

            evaluationItems = eValueEval.GetResponses("358777", new DateTime(2017, 1, 1), new DateTime(2017, 12, 31), 1, 244775, DateTime.Now.AddDays(-30));
            foreach (var evaluationItem in evaluationItems.EvaluationItems)
            {
                Console.WriteLine($"----- ---- Evaluation Item: {evaluationItem.SiteName} {evaluationItem.Name} {evaluationItem.ActivityId} {evaluationItem.Eimnum} Type {244775}");
            }


            evaluationItems = eValueEval.GetResponses("358777", new DateTime(2017, 1, 1), new DateTime(2017, 12, 31), 1, 245552, DateTime.Now.AddDays(-30));
            foreach (var evaluationItem in evaluationItems.EvaluationItems)
            {
                Console.WriteLine($"----- ---- Evaluation Item: {evaluationItem.SiteName} {evaluationItem.Name} {evaluationItem.ActivityId} {evaluationItem.Eimnum} Type {245552}");
            }

            evaluationItems = eValueEval.GetResponses("358777", new DateTime(2017, 1, 1), new DateTime(2017, 12, 31), 1, 246139, DateTime.Now.AddDays(-30));
            foreach (var evaluationItem in evaluationItems.EvaluationItems)
            {
                Console.WriteLine($"----- ---- Evaluation Item: {evaluationItem.SiteName} {evaluationItem.Name} {evaluationItem.ActivityId} {evaluationItem.Eimnum} Type {246139}");
            }

            evaluationItems = eValueEval.GetResponses("358777", new DateTime(2017, 1, 1), new DateTime(2017, 12, 31), 1, 246405, DateTime.Now.AddDays(-30));
            foreach (var evaluationItem in evaluationItems.EvaluationItems)
            {
                Console.WriteLine($"----- ---- Evaluation Item: {evaluationItem.SiteName} {evaluationItem.Name} {evaluationItem.ActivityId} {evaluationItem.Eimnum} Type {246405}");
            }



            evaluationItems = eValueEval.GetResponses("358777", new DateTime(2017, 1, 1), new DateTime(2017, 12, 31), 1, DateTime.Now.AddDays(-30));
            foreach (var evaluationItem in evaluationItems.EvaluationItems)
            {
                Console.WriteLine($"----- ---- Evaluation Item: {evaluationItem.SiteName} {evaluationItem.Name} {evaluationItem.ActivityId}");
            }

            evaluationItems = eValueEval.GetResponses("358948", new DateTime(2017, 3, 1), new DateTime(2017, 5, 1), 1, DateTime.Now.AddDays(-30));
            foreach (var evaluationItem in evaluationItems.EvaluationItems)
            {
                Console.WriteLine($"----- ---- Evaluation Item: {evaluationItem.SiteName} {evaluationItem.Name} {evaluationItem.ActivityId}");
            }
        }
        static void DoSingleEvaluationOnly(string clientId, string password, string subUnitId)
        {
            // Evaluations - Use the test one I have there  need to debug some issues with this.
            var eValueEval = new EvaluationApi(clientId, password, subUnitId, "https://api.e-value.net/Evaluation_1_0b.cfc");

            var evaluationItems = eValueEval.GetResponses("359011", new DateTime(2019, 7, 1), new DateTime(2019, 9, 28), 1);

            foreach (var evaluationItem in evaluationItems.EvaluationItems)
            {
                Console.WriteLine($"----- ---- Evaluation Item: Activity: {evaluationItem.ActivityId}-{evaluationItem.Abbreviation} EIMnum: {evaluationItem.Eimnum} FormType: {evaluationItem.EvaluationFormTypeId} : SubjectUserId {evaluationItem.SubjectUserId} : EvaluatorUserId {evaluationItem.EvaluatorUserId} ");
                if ((evaluationItem.SubjectUserId == 1229965) | (evaluationItem.EvaluatorUserId == 1229965))
                {
                    Console.WriteLine("Here she is!!!!!");
                }
            }


            evaluationItems = eValueEval.GetResponses("359011", new DateTime(2019, 7, 1), new DateTime(2019, 9, 28), 1, 275194, DateTime.Now.AddDays(-60));
            foreach (var evaluationItem in evaluationItems.EvaluationItems)
            {
                Console.WriteLine($"----- ---- Evaluation Item: Activity: {evaluationItem.ActivityId}-{evaluationItem.Abbreviation} EIMnum: {evaluationItem.Eimnum} FormType: {evaluationItem.EvaluationFormTypeId} ");
                if (evaluationItem.SubjectUserId == 1193817)
                {
                    Console.WriteLine("Here she is!!!!!");
                }
            }


            evaluationItems = eValueEval.GetResponses("359011", new DateTime(2019, 7, 1), new DateTime(2019, 9, 28), 1, 280052, DateTime.Now.AddDays(-30));
            foreach (var evaluationItem in evaluationItems.EvaluationItems)
            {
                Console.WriteLine($"----- ---- Evaluation Item: Activity: {evaluationItem.ActivityId}-{evaluationItem.Abbreviation} EIMnum: {evaluationItem.Eimnum} FormType: {evaluationItem.EvaluationFormTypeId} ");
                if (evaluationItem.SubjectUserId == 1193817)
                {
                    Console.WriteLine("Here she is!!!!!");
                }
            }

            evaluationItems = eValueEval.GetResponses("359011", new DateTime(2019, 7, 1), new DateTime(2019, 9, 28), 1, 245552, DateTime.Now.AddDays(-30));
            foreach (var evaluationItem in evaluationItems.EvaluationItems)
            {
                Console.WriteLine($"----- ---- Evaluation Item: Activity: {evaluationItem.ActivityId}-{evaluationItem.Abbreviation} EIMnum: {evaluationItem.Eimnum} FormType: {evaluationItem.EvaluationFormTypeId} ");
                if (evaluationItem.SubjectUserId == 1193817)
                {
                    Console.WriteLine("Here she is!!!!!");
                }
            }



            // This call uses the subject user id in the parameter list - something new from EValue - yay!!
            evaluationItems = eValueEval.GetResponsesUsingSubjectId("359011", new DateTime(2019, 7, 1), new DateTime(2019, 8, 30), 1, 275194, 1229965);
            foreach (var evaluationItem in evaluationItems.EvaluationItems)
            {
                Console.WriteLine($"----- ---- Evaluation Item: {evaluationItem.SiteName} Name: {evaluationItem.Name} Activity: {evaluationItem.ActivityId}-{evaluationItem.Abbreviation} EIMnum: {evaluationItem.Eimnum} FormType: {evaluationItem.EvaluationFormTypeId} ");
                if (evaluationItem.SubjectUserId == 1229965)
                {
                    Console.WriteLine("Here she is!!!!!");
                }
            }


            /******************************      Figure out issues in Aug 2019 based on changes/additions to evaluation form types **************************************************/
            // Student: Desiree Albano: 1229965

            // 275194	Student Evaluation of Clerkship
            evaluationItems = eValueEval.GetResponsesUsingEvaluatorId("359011", new DateTime(2019, 7, 1), new DateTime(2019, 8, 30), 1, 275194, 1229965);
            foreach (var evaluationItem in evaluationItems.EvaluationItems)
            {
                Console.WriteLine($"----- ---- Evaluation Item: {evaluationItem.SiteName} Name: {evaluationItem.Name} Activity: {evaluationItem.ActivityId}-{evaluationItem.Abbreviation} EIMnum: {evaluationItem.Eimnum} FormType: {evaluationItem.EvaluationFormTypeId} ");
                if (evaluationItem.EvaluatorUserId == 1229965)
                {
                    Console.WriteLine("Here she is!!!!!");
                }
            }

            // 279811	Student Evaluation of Preceptor
            evaluationItems = eValueEval.GetResponsesUsingEvaluatorId("359011", new DateTime(2019, 7, 1), new DateTime(2019, 8, 30), 1, 279811, 1229965);
            foreach (var evaluationItem in evaluationItems.EvaluationItems)
            {
                Console.WriteLine($"----- ---- Evaluation Item: {evaluationItem.SiteName} Name: {evaluationItem.Name} Activity: {evaluationItem.ActivityId}-{evaluationItem.Abbreviation} EIMnum: {evaluationItem.Eimnum} FormType: {evaluationItem.EvaluationFormTypeId} ");
                if (evaluationItem.EvaluatorUserId == 1229965)
                {
                    Console.WriteLine("Here she is!!!!!");
                }
            }

            // 280052	Clinical Competency Assessment - better not get any!!!!!!! - this one was not valid - it was expired at the time
            evaluationItems = eValueEval.GetResponsesUsingEvaluatorId("359011", new DateTime(2019, 7, 1), new DateTime(2019, 8, 30), 1, 280052, 1229965);
            foreach (var evaluationItem in evaluationItems.EvaluationItems)
            {
                Console.WriteLine($"----- ---- Evaluation Item: {evaluationItem.SiteName} Name: {evaluationItem.Name} Activity: {evaluationItem.ActivityId}-{evaluationItem.Abbreviation} EIMnum: {evaluationItem.Eimnum} FormType: {evaluationItem.EvaluationFormTypeId} ");
                if (evaluationItem.EvaluatorUserId == 1229965)
                {
                    Console.WriteLine("Here she is!!!!!");
                }
            }

            // 284652	Clinical Competency Assessment - better not get any!!!!!!! - this one was valid at the time, but Desiree is not the evaluator
            evaluationItems = eValueEval.GetResponsesUsingEvaluatorId("359011", new DateTime(2019, 7, 1), new DateTime(2019, 8, 30), 1, 284652, 1229965);
            foreach (var evaluationItem in evaluationItems.EvaluationItems)
            {
                Console.WriteLine($"----- ---- Evaluation Item: {evaluationItem.SiteName} Name: {evaluationItem.Name} Activity: {evaluationItem.ActivityId}-{evaluationItem.Abbreviation} EIMnum: {evaluationItem.Eimnum} FormType: {evaluationItem.EvaluationFormTypeId} ");
                if (evaluationItem.EvaluatorUserId == 1229965)
                {
                    Console.WriteLine("Here she is!!!!!");
                }
            }

            // 246139	Student ECR MS4
            evaluationItems = eValueEval.GetResponsesUsingEvaluatorId("359011", new DateTime(2019, 7, 1), new DateTime(2019, 8, 30), 1, 246139, 1229965);
            foreach (var evaluationItem in evaluationItems.EvaluationItems)
            {
                Console.WriteLine($"----- ---- Evaluation Item: {evaluationItem.SiteName} Name: {evaluationItem.Name} Activity: {evaluationItem.ActivityId}-{evaluationItem.Abbreviation} EIMnum: {evaluationItem.Eimnum} FormType: {evaluationItem.EvaluationFormTypeId} ");
                if (evaluationItem.EvaluatorUserId == 1229965)
                {
                    Console.WriteLine("Here she is!!!!!");
                }
            }

            // 245552	Student ECR MS3
            evaluationItems = eValueEval.GetResponsesUsingEvaluatorId("359011", new DateTime(2019, 7, 1), new DateTime(2019, 8, 30), 1, 245552, 1229965);
            foreach (var evaluationItem in evaluationItems.EvaluationItems)
            {
                Console.WriteLine($"----- ---- Evaluation Item: {evaluationItem.SiteName} Name: {evaluationItem.Name} Activity: {evaluationItem.ActivityId}-{evaluationItem.Abbreviation} EIMnum: {evaluationItem.Eimnum} FormType: {evaluationItem.EvaluationFormTypeId} ");
                if (evaluationItem.EvaluatorUserId == 1229965)
                {
                    Console.WriteLine("Here she is!!!!!");
                }
            }

            // 246405	Enrollment Verification
            evaluationItems = eValueEval.GetResponsesUsingEvaluatorId("359011", new DateTime(2019, 7, 1), new DateTime(2019, 8, 30), 1, 246405, 1229965);
            foreach (var evaluationItem in evaluationItems.EvaluationItems)
            {
                Console.WriteLine($"----- ---- Evaluation Item: {evaluationItem.SiteName} Name: {evaluationItem.Name} Activity: {evaluationItem.ActivityId}-{evaluationItem.Abbreviation} EIMnum: {evaluationItem.Eimnum} FormType: {evaluationItem.EvaluationFormTypeId} ");
                if (evaluationItem.EvaluatorUserId == 1229965)
                {
                    Console.WriteLine("Here she is!!!!!");
                }
            }



            evaluationItems = eValueEval.GetResponses("358970", new DateTime(2017, 1, 1), new DateTime(2018, 4, 30), 1, 245328, DateTime.Now.AddDays(-7));
            foreach (var evaluationItem in evaluationItems.EvaluationItems)
            {
                Console.WriteLine($"----- ---- Evaluation Item: {evaluationItem.SiteName} {evaluationItem.Name} {evaluationItem.ActivityId} {evaluationItem.Eimnum} Type {245328}");
                if (evaluationItem.SubjectUserId == 1193817)
                {
                    Console.WriteLine("Here she is!!!!!");
                }
            }


            evaluationItems = eValueEval.GetResponses("358970", new DateTime(2017, 9, 14), new DateTime(2017, 10, 16), 1, 245328, DateTime.Now.AddDays(-30));
            foreach (var evaluationItem in evaluationItems.EvaluationItems)
            {
                Console.WriteLine($"----- ---- Evaluation Item: {evaluationItem.SiteName} {evaluationItem.Name} {evaluationItem.ActivityId} {evaluationItem.Eimnum} Type {245328}");
            }



            // Enrollment Verification - PEDS301 (359046)
            evaluationItems = eValueEval.GetResponses("359046", new DateTime(2017, 9, 1), new DateTime(2017, 10, 30), 1, 246405, DateTime.Now.AddDays(-20));
            foreach (var evaluationItem in evaluationItems.EvaluationItems)
            {
                Console.WriteLine($"----- ---- Evaluation Item: {evaluationItem.SiteName} {evaluationItem.Name} {evaluationItem.ActivityId} {evaluationItem.Eimnum} Type {245328}");
            }

            // Compentency Assessments - PEDS301 (359046)
            evaluationItems = eValueEval.GetResponses("359046", new DateTime(2017, 9, 1), new DateTime(2017, 10, 30), 1, 245328, DateTime.Now.AddDays(-30));
            foreach (var evaluationItem in evaluationItems.EvaluationItems)
            {
                Console.WriteLine($"----- ---- Evaluation Item: {evaluationItem.SiteName} {evaluationItem.Name} {evaluationItem.ActivityId} {evaluationItem.Eimnum} Type {245328}");
            }

            // Student ECR MS4 - IMED302 (358971)
            evaluationItems = eValueEval.GetResponses("358971", new DateTime(2018, 1, 1), new DateTime(2018, 1, 31), 1, 246139, DateTime.Now.AddDays(-30));
            foreach (var evaluationItem in evaluationItems.EvaluationItems)
            {
                Console.WriteLine($"----- ---- Evaluation Item: {evaluationItem.SiteName} {evaluationItem.Name} {evaluationItem.ActivityId} {evaluationItem.Eimnum} Type {245328}");
            }

            // Compentency Assessments - IMED302 (358971)
            evaluationItems = eValueEval.GetResponses("358971", new DateTime(2018, 1, 1), new DateTime(2018, 1, 31), 1, 245328, DateTime.Now.AddDays(-30));
            foreach (var evaluationItem in evaluationItems.EvaluationItems.Where(xxx => xxx.SubjectUserId == 1193826))
            {
                Console.WriteLine($"----- ---- Evaluation Item: {evaluationItem.SiteName} {evaluationItem.Name} {evaluationItem.ActivityId} {evaluationItem.Eimnum} Type {245328}");
            }

            evaluationItems = eValueEval.GetResponses("358777", new DateTime(2017, 9, 20), new DateTime(2017, 10, 30), 1, 244774, DateTime.Now.AddDays(-30));
            foreach (var evaluationItem in evaluationItems.EvaluationItems)
            {
                Console.WriteLine($"----- ---- Evaluation Item: {evaluationItem.SiteName} {evaluationItem.Name} {evaluationItem.ActivityId} {evaluationItem.Eimnum} Type {244774}");
            }

            evaluationItems = eValueEval.GetResponses("358777", new DateTime(2017, 1, 1), new DateTime(2017, 12, 31), 1, 244775, DateTime.Now.AddDays(-30));
            foreach (var evaluationItem in evaluationItems.EvaluationItems)
            {
                Console.WriteLine($"----- ---- Evaluation Item: {evaluationItem.SiteName} {evaluationItem.Name} {evaluationItem.ActivityId} {evaluationItem.Eimnum} Type {244775}");
            }


            evaluationItems = eValueEval.GetResponses("358777", new DateTime(2017, 1, 1), new DateTime(2017, 12, 31), 1, 245552, DateTime.Now.AddDays(-30));
            foreach (var evaluationItem in evaluationItems.EvaluationItems)
            {
                Console.WriteLine($"----- ---- Evaluation Item: {evaluationItem.SiteName} {evaluationItem.Name} {evaluationItem.ActivityId} {evaluationItem.Eimnum} Type {245552}");
            }

            evaluationItems = eValueEval.GetResponses("358777", new DateTime(2017, 1, 1), new DateTime(2017, 12, 31), 1, 246139, DateTime.Now.AddDays(-30));
            foreach (var evaluationItem in evaluationItems.EvaluationItems)
            {
                Console.WriteLine($"----- ---- Evaluation Item: {evaluationItem.SiteName} {evaluationItem.Name} {evaluationItem.ActivityId} {evaluationItem.Eimnum} Type {246139}");
            }

            evaluationItems = eValueEval.GetResponses("358777", new DateTime(2017, 1, 1), new DateTime(2017, 12, 31), 1, 246405, DateTime.Now.AddDays(-30));
            foreach (var evaluationItem in evaluationItems.EvaluationItems)
            {
                Console.WriteLine($"----- ---- Evaluation Item: {evaluationItem.SiteName} {evaluationItem.Name} {evaluationItem.ActivityId} {evaluationItem.Eimnum} Type {246405}");
            }



            evaluationItems = eValueEval.GetResponses("358777", new DateTime(2017, 1, 1), new DateTime(2017, 12, 31), 1, DateTime.Now.AddDays(-30));
            foreach (var evaluationItem in evaluationItems.EvaluationItems)
            {
                Console.WriteLine($"----- ---- Evaluation Item: {evaluationItem.SiteName} {evaluationItem.Name} {evaluationItem.ActivityId}");
            }

            evaluationItems = eValueEval.GetResponses("358948", new DateTime(2017, 3, 1), new DateTime(2017, 5, 1), 1, DateTime.Now.AddDays(-30));
            foreach (var evaluationItem in evaluationItems.EvaluationItems)
            {
                Console.WriteLine($"----- ---- Evaluation Item: {evaluationItem.SiteName} {evaluationItem.Name} {evaluationItem.ActivityId}");
            }
        }