Exemplo n.º 1
0
        private static void returnTestResult(string cip, string strXmlMessage)
        {
            string token = SoapClient.CallSessionDiscover();

            SoapClient.CallSessionLanguage(token, "EN");
            SoapClient.CallSessionGetRoleList(token);
            SoapClient.CallSessionRole(token);
            SoapClient.CallSessionGetTeamList(token);
            SoapClient.CallSessionSetTeam(token);
            string case_id = SoapClient.CallCaseInsert(cip, token);
            Dictionary <string, string> patient_finded = SoapClient.CallCaseGet(token, case_id);
            string admission_id = SoapClient.CallAdmissionListCase(case_id, token);
            //MessageBox.Show("admission_id: " + admission_id);
            //la siguiente llamada es para añadir la tarea de PRE-CDA
            string task_id_CDA = SoapClient.CallTaskInsertByTaskCode(admission_id, token, "PRE_CDA_TASK");
            //MessageBox.Show("task_id_CDA: " + task_id_CDA);
            string task_id = SoapClient.CallTaskInsertByTaskCode(admission_id, token);
            //MessageBox.Show("task_id: " + task_id);
            string form_id = SoapClient.CallTaskFormList(task_id, token);
            //MessageBox.Show("form_id: " + form_id);
            string answer_id = SoapClient.CallFormGetSummary(form_id, token);

            //MessageBox.Show("answer_id: " + answer_id);
            SoapClient.CallFormSetAnswer(token, form_id, answer_id, admission_id, strXmlMessage);
            //MessageBox.Show("Form " + form_id + " updated.");

            form_id = "";
            Dictionary <string, string>[] data = SoapClient.CallTaskListOverdue(token);
            for (int i = 0; i < data.Length; i++)
            {
                if ((data[i] != null) && (data[i]["admission_id"].Equals(admission_id)))
                {
                    form_id = SoapClient.CallTaskFormList(data[i]["task_id"], token, "true");
                    SoapClient.CallFormSetAnswer(token, form_id, "1", data[i]["admission_id"], "S", "true");
                    //MessageBox.Show("Form bucle " + form_id + " updated.");
                }
            }
            //MessageBox.Show("Form2 " + form_id + " updated.");
        }