public void AddStepToCaseStatCaseWithServiceMin() { using (TestPixServiceClient c = new TestPixServiceClient()) { PatientDto patient = (new SetData()).PatientSet(); c.AddPatient(Global.GUID, Data.idlpu, patient); } using (TestEmkServiceClient client = new TestEmkServiceClient()) { CaseStat caseStat = (new SetData()).MinCaseStatSetForCreate(); client.CreateCase(Global.GUID, caseStat); StepStat stepStat = (new SetData()).MinStepStatSet(); stepStat.MedRecords = new List <MedRecord> { (new SetData()).MinService() }; client.AddStepToCase(Global.GUID, Data.idlpu, caseStat.IdPatientMis, caseStat.IdCaseMis, stepStat); } if (Global.errors == "") { Assert.Pass(); } else { Assert.Fail(Global.errors); } }
public void forAI (StepStat nowStep) { //gameEngine.Instance.next_turn (); Property location = nowStep.property; if (nowStep.is_others_land_only ()) { gameEngine.Instance.next_turn (); } else if (nowStep.qualified_to_rent ()) { nowStep.cost = location.getRental (); gameEngine.Instance.collection_money_for_landlord (nowStep.cost, gameEngine.Instance.next_turn); } else if (nowStep.can_invest ()) { nowStep.cost = location.getInvestmentCost (); gameEngine.Instance.trade_success (nowStep.cost, gameEngine.Instance.next_turn); } else if (nowStep.from_unclaim_to_buy_action ()) { nowStep.cost = location.getInvestmentCost (); gameEngine.Instance.trade_success (nowStep.cost, gameEngine.Instance.next_turn); } else if (nowStep.dialog_for_bank) { Debug.Log ("dialog_for_bank AI"); gameEngine.Instance.ai_bank (); gameEngine.Instance.next_turn (); } else if (nowStep.functional_property ()) { Debug.Log ("functional_property AI"); gameEngine.Instance.next_turn (); } else { gameEngine.Instance.next_turn (); } }
public void AddStatStep_SameIdFull() { using (TestPixServiceClient PixClient = new TestPixServiceClient()) { PatientDto patient = (new SetData()).PatientSet(); PixClient.AddPatient(Global.GUID, Data.idlpu, patient); } using (TestEmkServiceClient EmkClient = new TestEmkServiceClient()) { CaseStat caseStat = (new SetData()).MinCaseStatSetForCreate(); EmkClient.CreateCase(Global.GUID, caseStat); StepStat stepStat = CaseStatData.otherStep; stepStat.IdStepMis = CaseStatData.step.IdStepMis; stepStat.MedRecords = new List <MedRecord> { (new SetData()).MinService(), (new SetData()).MinAppointedMedication(), (new SetData()).MinDiagnosis(), MedRecordData.clinicMainDiagnosis, MedRecordData.referral, (new SetData()).MinLaboratoryReport() }; EmkClient.AddStepToCase(Global.GUID, Data.idlpu, caseStat.IdPatientMis, caseStat.IdCaseMis, stepStat); } if (Global.errors == "") { Assert.Pass(); } else { Assert.Fail(Global.errors); } }
private void move_end () { nowStep = new StepStat (); nowStep.withLocation (landing_property); nowStep.withPlayer (gameEngine.Instance.CurrentPlayer ()); if (coming_steps > 0) { if (nowStep.station_event_trigger) { station_event (); } else { trigger_next_move (); } } else { if (_brain == Brain.HUMAN) { endEventHuman (); } else if (_brain == Brain.AI) { endEventAi (); } simple_ship_drive drive = character_stage.GetComponent<simple_ship_drive> (); if (drive != null) { drive.WaterAnimation (false); } } }
public void AddStatStep_SameIdMin() { using (TestPixServiceClient PixClient = new TestPixServiceClient()) { PatientDto patient = (new SetData()).PatientSet(); PixClient.AddPatient(Global.GUID, Data.idlpu, patient); } using (TestEmkServiceClient EmkClient = new TestEmkServiceClient()) { CaseStat caseStat = (new SetData()).MinCaseStatSetForCreate(); EmkClient.CreateCase(Global.GUID, caseStat); StepStat stepStat = (new SetData()).MinOtherStepStatSet(); stepStat.IdStepMis = CaseStatData.step.IdStepMis; EmkClient.AddStepToCase(Global.GUID, Data.idlpu, caseStat.IdPatientMis, caseStat.IdCaseMis, stepStat); } if (Global.errors == "") { Assert.Pass(); } else { Assert.Fail(Global.errors); } }
public void UpdateStatCaseRef_ToStep() { using (TestPixServiceClient PixClient = new TestPixServiceClient()) { PatientDto patient = (new SetData()).PatientSet(); PixClient.AddPatient(Global.GUID, Data.idlpu, patient); } using (TestEmkServiceClient EmkClient = new TestEmkServiceClient()) { CaseStat caseStat = (new SetData()).MinCaseStatSet(); EmkClient.AddCase(Global.GUID, caseStat); StepStat stepStat = (new SetData()).MinStepStatSet(); stepStat.MedRecords = new List <MedRecord> { MedRecordData.referral }; caseStat.Steps = new List <StepStat> { stepStat }; EmkClient.UpdateCase(Global.GUID, caseStat); } if (Global.errors == "") { Assert.Pass(); } else { Assert.Fail(Global.errors); } }
public void CreateStatCaseWithServiceFull() { using (TestPixServiceClient c = new TestPixServiceClient()) { PatientDto patient = (new SetData()).PatientSet(); c.AddPatient(Global.GUID, Data.idlpu, patient); } using (TestEmkServiceClient client = new TestEmkServiceClient()) { CaseStat caseStat = (new SetData()).MinCaseStatSetForCreate(); caseStat.MedRecords = new List <MedRecord> { MedRecordData.service }; StepStat stepStat = (new SetData()).MinStepStatSet(); stepStat.MedRecords = new List <MedRecord> { MedRecordData.service, (new SetData()).MinService() }; caseStat.Steps = new List <StepStat> { stepStat }; client.CreateCase(Global.GUID, caseStat); } if (Global.errors == "") { Assert.Pass(); } else { Assert.Fail(Global.errors); } }
public void UpdateFullStatCase_AfterClose() { using (TestPixServiceClient PixClient = new TestPixServiceClient()) { PatientDto patient = (new SetData()).PatientSet(); PixClient.AddPatient("D500E893-166B-4724-9C78-D0DBE1F1C48D", "1.2.643.5.1.13.3.25.78.118", patient); } using (TestEmkServiceClient EmkClient = new TestEmkServiceClient()) { CaseStat caseStat = (new SetData()).MinCaseStatSetForCreate(); EmkClient.CreateCase("D500E893-166B-4724-9C78-D0DBE1F1C48D", caseStat); caseStat = (new SetData()).MinCaseStatSetForClose(); EmkClient.CloseCase("D500E893-166B-4724-9C78-D0DBE1F1C48D", caseStat); CaseStat caseStatUpdate = (new SetData()).FullCaseStatSet(); SetData set = new SetData(); caseStat.MedRecords = new MedRecord[] { set.MinService(), set.MinTfomsInfo(), MedRecordData.deathInfo, set.MinDiagnosis(), MedRecordData.clinicMainDiagnosis, MedRecordData.anatomopathologicalClinicMainDiagnosis, MedRecordData.referral, MedRecordData.sickList, set.MinDischargeSummary(), set.MinLaboratoryReport(), set.MinConsultNote() }; StepStat stepStat = (new SetData()).MinStepStatSet(); stepStat.MedRecords = new MedRecord[] { set.MinService(), set.MinAppointedMedication(), set.MinDiagnosis(), MedRecordData.clinicMainDiagnosis, MedRecordData.referral, set.MinLaboratoryReport(), }; caseStat.Steps = new StepStat[] { stepStat }; EmkClient.UpdateCase("D500E893-166B-4724-9C78-D0DBE1F1C48D", caseStatUpdate); } if (Global.errors == "") { Assert.Pass(); } else { Assert.Fail(Global.errors); } }
public TestStatStep(StepStat sa, string caseLpu) { if (sa != null) { statStep = sa; step = new TestStepBase(sa, caseLpu); if (sa.MedRecords != null) { records = new List <TestMedRecord>(); foreach (object i in sa.MedRecords) { Service s = i as Service; if (s != null) { records.Add(new TestService(s, caseLpu)); } AppointedMedication am = i as AppointedMedication; if (am != null) { records.Add(new TestAppointedMedication(am, caseLpu)); } Diagnosis diag = i as Diagnosis; if ((diag != null) && (diag.DiagnosisInfo.IdDiagnosisType != TestDiagnosis.IdClinicMainDiagnosis)) { records.Add(new TestDiagnosis(diag, caseLpu)); } ClinicMainDiagnosis cmd = i as ClinicMainDiagnosis; if ((cmd != null) && (cmd.DiagnosisInfo.IdDiagnosisType == TestDiagnosis.IdClinicMainDiagnosis)) { records.Add(new TestClinicMainDiagnosis(cmd, caseLpu)); } Referral r = i as Referral; if (r != null) { records.Add(new TestReferral(r, caseLpu)); } LaboratoryReport lr = i as LaboratoryReport; if (lr != null) { records.Add(new TestLaboratoryReport(lr, caseLpu)); } Form027U form = i as Form027U; if (form != null) { records.Add(new TestForm027U(form, caseLpu)); } } } } }
public void UpdateFullStatCase_AfterClose() { using (TestPixServiceClient PixClient = new TestPixServiceClient()) { PatientDto patient = (new SetData()).PatientSet(); PixClient.AddPatient(Global.GUID, Data.idlpu, patient); } using (TestEmkServiceClient EmkClient = new TestEmkServiceClient()) { CaseStat caseStat = (new SetData()).MinCaseStatSetForCreate(); EmkClient.CreateCase(Global.GUID, caseStat); caseStat = (new SetData()).MinCaseStatSetForClose(); EmkClient.CloseCase(Global.GUID, caseStat); CaseStat caseStatUpdate = (new SetData()).FullCaseStatSet(); SetData set = new SetData(); caseStat.MedRecords = new List <MedRecord> { set.MinService(), set.MinTfomsInfo(), MedRecordData.deathInfo, set.MinDiagnosis(), MedRecordData.anatomopathologicalClinicMainDiagnosis, set.MinRefferal(), set.MinSickList(), set.MinDischargeSummary(), set.MinLaboratoryReport(), set.MinConsultNote(), MedRecordData.form027U }; StepStat stepStat = (new SetData()).MinStepStatSet(); stepStat.MedRecords = new List <MedRecord> { set.MinService(), set.MinAppointedMedication(), set.MinDiagnosis(), set.MinRefferal(), set.MinLaboratoryReport(), }; caseStat.Steps = new List <StepStat> { stepStat }; EmkClient.UpdateCase(Global.GUID, caseStatUpdate); } if (Global.errors == "") { Assert.Pass(); } else { Assert.Fail(Global.errors); } }
public void _CreateStatCase() { using (TestPixServiceClient PixClient = new TestPixServiceClient()) { PatientDto patient = (new SetData()).PatientSet(); PixClient.AddPatient(Global.GUID, "1.2.643.5.1.13.3.25.78.118", patient); } using (TestEmkServiceClient EmkClient = new TestEmkServiceClient()) { CaseStat caseStat = (new SetData()).FullCaseStatSetForCreate(); caseStat.Guardian = null; caseStat.OpenDate = new DateTime(2014, 06, 01); SetData set = new SetData(); StepStat stepStat = (new SetData()).MinStepStatSet(); caseStat.Steps = new List <StepStat> { stepStat }; caseStat.Steps[0].DateStart = new DateTime(2014, 06, 01); caseStat.Steps[0].DateEnd = new DateTime(2014, 06, 04); EmkClient.CreateCase(Global.GUID, caseStat); StepStat s = CaseStatData.otherStep; s.MedRecords = new List <MedRecord> { MedRecordData.appointedMedication, MedRecordData.service }; s.DateStart = new DateTime(2014, 06, 05); s.DateEnd = new DateTime(2014, 06, 10); EmkClient.AddStepToCase(Global.GUID, caseStat.IdLpu, caseStat.IdPatientMis, caseStat.IdCaseMis, s); caseStat = (new SetData()).FullCaseStatSetForClose(); caseStat.Guardian = null; caseStat.CloseDate = new DateTime(2014, 06, 10); caseStat.MedRecords = new List <MedRecord> { MedRecordData.clinicMainDiagnosis, GetEpic() }; EmkClient.CloseCase(Global.GUID, caseStat); } if (Global.errors == "") { Assert.Pass(); } else { Assert.Fail(Global.errors); } }
public void CancelFullStatCase() { using (TestPixServiceClient PixClient = new TestPixServiceClient()) { PatientDto patient = (new SetData()).PatientSet(); PixClient.AddPatient(Global.GUID, Data.idlpu, patient); } using (TestEmkServiceClient EmkClient = new TestEmkServiceClient()) { CaseStat caseStat = (new SetData()).FullCaseStatSetForCreate(); SetData set = new SetData(); caseStat.MedRecords = new List <MedRecord> { set.MinService(), set.MinTfomsInfo(), set.MinDiagnosis(), MedRecordData.clinicMainDiagnosis, MedRecordData.referral, MedRecordData.sickList, set.MinLaboratoryReport(), }; StepStat stepStat = (new SetData()).MinStepStatSet(); stepStat.MedRecords = new List <MedRecord> { set.MinService(), set.MinAppointedMedication(), set.MinDiagnosis(), MedRecordData.clinicMainDiagnosis, MedRecordData.referral, set.MinLaboratoryReport(), }; caseStat.Steps = new List <StepStat> { stepStat }; EmkClient.CreateCase(Global.GUID, caseStat); EmkClient.CancelCase(Global.GUID, Data.idlpu, caseStat.IdPatientMis, caseStat.IdCaseMis); } if (Global.errors == "") { Assert.Pass(); } else { Assert.Fail(Global.errors); } }
public StepStat MinOtherStepStatSet() { StepStat stepStat = new StepStat { DateStart = CaseStatData.otherStep.DateStart, DateEnd = CaseStatData.otherStep.DateEnd, IdStepMis = CaseStatData.otherStep.IdStepMis, IdPaymentType = CaseStatData.otherStep.IdPaymentType, BedProfile = CaseStatData.otherStep.BedProfile, DaySpend = CaseStatData.otherStep.DaySpend, HospitalDepartmentName = CaseStatData.otherStep.HospitalDepartmentName, IdHospitalDepartment = CaseStatData.otherStep.IdHospitalDepartment, Doctor = MinDoctorSet(), }; return(stepStat); }
public void forHuman (StepStat nowStep) { panel_helper_dialog UI = gameEngine.Instance.getUIdialog (); RichChar person = gameEngine.Instance.CurrentPlayer (); Property location = nowStep.property; if (nowStep.dialog_for_bank) { Debug.Log ("talk to the bank"); UI.setBankServiceFlow (new BankDialogDescriptor (person), gameEngine.Instance.next_turn); } else if (nowStep.dialog_related_to_land) { if (nowStep.is_others_land_only ()) { gameEngine.Instance.next_turn (); } else if (nowStep.qualified_to_rent ()) { nowStep.cost = location.getRental (); DialogDescriptor descriptor = new DialogDescriptor (DialogDescriptor.lvType.PAYRENT, nowStep.cost); UI.setMoneyLogicFlow (descriptor, person, gameEngine.Instance.next_turn); } else if (nowStep.can_invest ()) { nowStep.cost = location.getInvestmentCost (); //Debug.Log ("ask:" + formated); DialogDescriptor descriptor = new DialogDescriptor (DialogDescriptor.lvType.UPGRADE, nowStep.cost); UI.setMoneyLogicFlow (descriptor, person, gameEngine.Instance.next_turn); } else if (nowStep.from_unclaim_to_buy_action ()) { nowStep.cost = location.getInvestmentCost (); //Debug.Log ("ask:" + formated); DialogDescriptor descriptor = new DialogDescriptor (DialogDescriptor.lvType.BUYLAND, nowStep.cost); UI.setMoneyLogicFlow (descriptor, person, gameEngine.Instance.next_turn); } else { Debug.Log ("nothing is happening.. this maybe a bug.. please check nowStep action flow with the considering logic. "); gameEngine.Instance.next_turn (); } } else { Debug.Log ("there is nothing to for the human RichChar.. next turn"); gameEngine.Instance.next_turn (); } gameEngine.Instance.getPlayPanel ().closeWaiting (); }
public TestStatStep(StepStat sa, string caseLpu) { if (sa != null) { statStep = sa; step = new TestStepBase(sa, caseLpu); if (sa.MedRecords != null) { records = new List<TestMedRecord>(); foreach (object i in sa.MedRecords) { Service s = i as Service; if (s != null) records.Add(new TestService(s, caseLpu)); AppointedMedication am = i as AppointedMedication; if (am != null) records.Add(new TestAppointedMedication(am, caseLpu)); Diagnosis diag = i as Diagnosis; if ((diag != null) && (diag.DiagnosisInfo.IdDiagnosisType != TestDiagnosis.IdClinicMainDiagnosis)) records.Add(new TestDiagnosis(diag, caseLpu)); ClinicMainDiagnosis cmd = i as ClinicMainDiagnosis; if ((cmd != null) && (cmd.DiagnosisInfo.IdDiagnosisType == TestDiagnosis.IdClinicMainDiagnosis)) records.Add(new TestClinicMainDiagnosis(cmd, caseLpu)); Referral r = i as Referral; if (r != null) records.Add(new TestReferral(r, caseLpu)); LaboratoryReport lr = i as LaboratoryReport; if (lr != null) records.Add(new TestLaboratoryReport(lr, caseLpu)); Form027U form = i as Form027U; if (form != null) records.Add(new TestForm027U(form, caseLpu)); } } } }
public void CreateStatCaseWithAppointedMedicationMin() { using (TestPixServiceClient c = new TestPixServiceClient()) { PatientDto patient = (new SetData()).PatientSet(); c.AddPatient(Global.GUID, Data.idlpu, patient); } using (TestEmkServiceClient client = new TestEmkServiceClient()) { CaseStat caseStat = (new SetData()).MinCaseStatSetForCreate(); caseStat.MedRecords = new List <MedRecord> { (new SetData()).MinClinicMainDiagnosis(), MedRecordData.appointedMedication, }; caseStat.MedRecords = new List <MedRecord> { (new SetData()).MinClinicMainDiagnosis(), (new SetData()).MinAppointedMedication() }; StepStat stepStat = (new SetData()).MinStepStatSet(); stepStat.MedRecords = new List <MedRecord> { (new SetData()).MinAppointedMedication() }; caseStat.Steps = new List <StepStat> { stepStat }; client.CreateCase(Global.GUID, caseStat); } if (Global.errors == "") { Assert.Pass(); } else { Assert.Fail(Global.errors); } }
public void AddStepToCase(string guid, string idLpu, string idPatientMis, string idCaseMis, StepBase s) { try { StepAmb sa = s as StepAmb; if ((object)sa != null) { client.AddStepToCase(guid, idLpu, idPatientMis, idCaseMis, s); TestAmbStep example = new TestAmbStep(sa, idLpu); if (!example.CheckStepInDataBase(guid, idPatientMis, idLpu, idCaseMis)) { Global.errors1.AddRange(Global.errors2); } } StepStat ss = s as StepStat; if ((object)ss != null) { client.AddStepToCase(guid, idLpu, idPatientMis, idCaseMis, s); TestStatStep example = new TestStatStep(ss, idLpu); if (!example.CheckStepInDataBase(guid, idPatientMis, idLpu, idCaseMis)) { Global.errors1.AddRange(Global.errors2); } } } catch (System.ServiceModel.FaultException <List <PixServiseTests.EMKServise.RequestFault> > e) { getErrors(e.Detail); } catch (System.ServiceModel.FaultException <PixServiseTests.EMKServise.RequestFault[]> e) { getErrors(e.Detail); } catch (System.ServiceModel.FaultException <PixServiseTests.EMKServise.RequestFault> e) { Global.errors1.Add(e.Detail.PropertyName + " - " + e.Detail.Message); getErrors(e.Detail.Errors); } }
public void UpdateStatCaseWithLaboratoryReportFull() { using (TestPixServiceClient c = new TestPixServiceClient()) { PatientDto patient = (new SetData()).PatientSet(); c.AddPatient(Global.GUID, Data.idlpu, patient); } using (TestEmkServiceClient client = new TestEmkServiceClient()) { CaseStat caseStat = (new SetData()).MinCaseStatSet(); client.AddCase(Global.GUID, caseStat); caseStat.MedRecords = new List <MedRecord> { MedRecordData.LaboratoryReport, (new SetData()).MinClinicMainDiagnosis() }; StepStat stepStat = (new SetData()).MinStepStatSet(); stepStat.MedRecords = new List <MedRecord> { MedRecordData.LaboratoryReport, (new SetData()).MinLaboratoryReport() }; caseStat.Steps = new List <StepStat> { stepStat }; client.UpdateCase(Global.GUID, caseStat); } if (Global.errors == "") { Assert.Pass(); } else { Assert.Fail(Global.errors); } }
static public List <TestStatStep> BuildStatStepsFromDataBase(string idCase, string caseLpu) { List <TestStatStep> statSteps = new List <TestStatStep>(); if (idCase != string.Empty) { List <TestStepBase> steps = TestStepBase.BuildTestStepsFromDataBase(idCase, caseLpu); using (SqlConnection connection = Global.GetSqlConnection()) { foreach (TestStepBase i in steps) { string findSteps = "SELECT * FROM HospStep WHERE IdStep = '" + i.idStep + "'"; SqlCommand stepsCommand = new SqlCommand(findSteps, connection); using (SqlDataReader stepsReader = stepsCommand.ExecuteReader()) { while (stepsReader.Read()) { StepStat sa = new StepStat(); if (stepsReader["BedNo"].ToString() != "") { sa.BedNumber = Convert.ToString(stepsReader["BedNo"]); } else { sa.BedNumber = null; } if (stepsReader["IdBedProfile"].ToString() != "") { sa.BedProfile = Convert.ToByte(stepsReader["IdBedProfile"]); } else { sa.BedProfile = 0; } if (stepsReader["DaySpend"].ToString() != "") { sa.DaySpend = Convert.ToUInt16(stepsReader["DaySpend"]); } else { sa.DaySpend = 0; } if (stepsReader["HospitalDepartment"].ToString() != "") { sa.HospitalDepartmentName = Convert.ToString(stepsReader["HospitalDepartment"]); } else { sa.HospitalDepartmentName = null; } if (stepsReader["IdHospitalDepartment"].ToString() != "") { sa.IdHospitalDepartment = Convert.ToString(stepsReader["IdHospitalDepartment"]); } else { sa.IdHospitalDepartment = null; } if (stepsReader["IdRegimenType"].ToString() != "") { sa.IdRegimen = Convert.ToByte(stepsReader["IdRegimenType"]); } else { sa.IdRegimen = 0; } if (stepsReader["WardNumber"].ToString() != "") { sa.WardNumber = Convert.ToString(stepsReader["WardNumber"]); } else { sa.WardNumber = null; } TestStatStep st = new TestStatStep(sa, caseLpu); st.step = i; st.records = new List <TestMedRecord>(); List <TestService> s = TestService.BuildServiseFromDataBaseData(i.idStep); if (!Global.IsEqual(s, null)) { st.records.AddRange(s); } List <TestAppointedMedication> am = TestAppointedMedication.BuildAppointedMedicationFromDataBaseDate(i.idStep); if (!Global.IsEqual(am, null)) { st.records.AddRange(am); } List <TestDiagnosis> diag = TestDiagnosis.BuildDiagnosisFromDataBaseDate(i.idStep); if (!Global.IsEqual(diag, null)) { st.records.AddRange(diag); } TestClinicMainDiagnosis acdm = TestClinicMainDiagnosis.BuildTestClinicMainDiagnosisFromDataBaseDate(i.idStep); if (!Global.IsEqual(acdm, null)) { st.records.Add(acdm); } List <TestReferral> trl = TestReferral.BuildReferralFromDataBaseData(i.idStep); if (!Global.IsEqual(trl, null)) { st.records.AddRange(trl); } List <TestLaboratoryReport> tlr = TestLaboratoryReport.BuildLaboratoryReportFromDataBaseData(i.idStep); if (!Global.IsEqual(tlr, null)) { st.records.AddRange(tlr); } if (st.records.Count == 0) { st.records = null; } statSteps.Add(st); } } } } } if (statSteps.Count != 0) { return(statSteps); } else { return(null); } }
public StepStat MinStepStatSet() { StepStat stepStat = new StepStat { DateStart = CaseStatData.step.DateStart, DateEnd = CaseStatData.step.DateEnd, IdStepMis = CaseStatData.step.IdStepMis, IdPaymentType = CaseStatData.step.IdPaymentType, BedProfile = CaseStatData.step.BedProfile, DaySpend = CaseStatData.step.DaySpend, HospitalDepartmentName = CaseStatData.step.HospitalDepartmentName, IdHospitalDepartment = CaseStatData.step.IdHospitalDepartment, Doctor = MinDoctorSet(), }; return stepStat; }
private IEnumerator eventStepTriggerTimeEnd (StepStat newstep) { if (currentplayer.controlBy == PlayerData.Brain.HUMAN) { yield return new WaitForSeconds (2.0f); fantcam.ToFocusBuilding (newstep.property.getHolderPropertyTargetTransform ()); yield return new WaitForSeconds (2.0f); GameEvents.Instance.forHuman (nowStep); } else if (currentplayer.controlBy == PlayerData.Brain.AI) { GameEvents.Instance.forAI (nowStep); } }
public void eventStepTrigger (int instanceID, int stopID, string message) { Property landing = component_pathScanner.getbyIdProp (stopID); nowStep = new StepStat (); nowStep.withLocation (landing); nowStep.withPlayer (currentplayer); //StartCoroutine(eventStepTriggerTime(nowStep)); if (message.Equals ("complete_location_from_forward")) { StartCoroutine (eventStepTriggerTimeEnd (nowStep)); //nowStep.thinkTitle (gameEngine.Instance.CurrentPlayer ()); Debug.Log (message); } else if (message.Equals ("arrive_at_location_jit")) { //we work on this later //nowStep = new StepStat (); //nowStep.think (landing); //nowStep.thinkTitle (currentplayer); //if (nowStep.station_event_trigger) { //station_event (); //} else { //trigger_next_move (); //} Debug.Log (message); } }
public static List<TestStatStep> BuildStatStepsFromDataBase(string idCase, string caseLpu) { List<TestStatStep> statSteps = new List<TestStatStep>(); if (idCase != string.Empty) { List<TestStepBase> steps = TestStepBase.BuildTestStepsFromDataBase(idCase, caseLpu); using (SqlConnection connection = Global.GetSqlConnection()) { foreach (TestStepBase i in steps) { string findSteps = "SELECT * FROM HospStep WHERE IdStep = '" + i.idStep + "'"; SqlCommand stepsCommand = new SqlCommand(findSteps, connection); using (SqlDataReader stepsReader = stepsCommand.ExecuteReader()) { while (stepsReader.Read()) { StepStat sa = new StepStat(); if (stepsReader["BedNo"].ToString() != "") sa.BedNumber = Convert.ToString(stepsReader["BedNo"]); else sa.BedNumber = null; if (stepsReader["IdBedProfile"].ToString() != "") sa.BedProfile = Convert.ToByte(stepsReader["IdBedProfile"]); else sa.BedProfile = 0; if (stepsReader["DaySpend"].ToString() != "") sa.DaySpend = Convert.ToUInt16(stepsReader["DaySpend"]); else sa.DaySpend = 0; if (stepsReader["HospitalDepartment"].ToString() != "") sa.HospitalDepartmentName = Convert.ToString(stepsReader["HospitalDepartment"]); else sa.HospitalDepartmentName = null; if (stepsReader["IdHospitalDepartment"].ToString() != "") sa.IdHospitalDepartment = Convert.ToString(stepsReader["IdHospitalDepartment"]); else sa.IdHospitalDepartment = null; if (stepsReader["IdRegimenType"].ToString() != "") sa.IdRegimen = Convert.ToByte(stepsReader["IdRegimenType"]); else sa.IdRegimen = 0; if (stepsReader["WardNumber"].ToString() != "") sa.WardNumber = Convert.ToString(stepsReader["WardNumber"]); else sa.WardNumber = null; TestStatStep st = new TestStatStep(sa, caseLpu); st.step = i; st.records = new List<TestMedRecord>(); List<TestService> s = TestService.BuildServiseFromDataBaseData(i.idStep); if (!Global.IsEqual(s, null)) st.records.AddRange(s); List<TestAppointedMedication> am = TestAppointedMedication.BuildAppointedMedicationFromDataBaseDate(i.idStep); if (!Global.IsEqual(am, null)) st.records.AddRange(am); List<TestDiagnosis> diag = TestDiagnosis.BuildDiagnosisFromDataBaseDate(i.idStep); if (!Global.IsEqual(diag, null)) st.records.AddRange(diag); TestClinicMainDiagnosis acdm = TestClinicMainDiagnosis.BuildTestClinicMainDiagnosisFromDataBaseDate(i.idStep); if (!Global.IsEqual(acdm, null)) st.records.Add(acdm); List<TestReferral> trl = TestReferral.BuildReferralFromDataBaseData(i.idStep); if (!Global.IsEqual(trl, null)) st.records.AddRange(trl); List<TestLaboratoryReport> tlr = TestLaboratoryReport.BuildLaboratoryReportFromDataBaseData(i.idStep); if (!Global.IsEqual(tlr, null)) st.records.AddRange(tlr); if (st.records.Count == 0) st.records = null; statSteps.Add(st); } } } } } if (statSteps.Count != 0) return statSteps; else return null; }
private List<EMKServise.StepStat> ConvertStatSteps(StepStat[] cs) { if ((object)cs != null) { List<EMKServise.StepStat> l = new List<EMKServise.StepStat>(); foreach (StepStat i in cs) { EMKServise.StepStat esa = new EMKServise.StepStat(); if (i.BedNumber != "") esa.BedNumber = i.BedNumber; esa.BedProfile = i.BedProfile; if (i.Comment != "") esa.Comment = i.Comment; if (i.DateEnd != DateTime.MinValue) esa.DateEnd = i.DateEnd; if (i.DateStart != DateTime.MinValue) esa.DateStart = i.DateStart; esa.DaySpend = i.DaySpend; esa.Doctor = ConvertMedicalStaff(i.Doctor); if (i.HospitalDepartmentName != "") esa.HospitalDepartmentName = i.HospitalDepartmentName; if (i.IdHospitalDepartment != "") esa.IdHospitalDepartment = i.IdHospitalDepartment; esa.IdPaymentType = i.IdPaymentType; esa.IdRegimen = i.IdRegimen; if (i.IdStepMis != "") esa.IdStepMis = i.IdStepMis; esa.MedRecords = ConvertMedRecords(i.MedRecords); l.Add(esa); } return l; } return null; }