Exemplo n.º 1
0
        public void SetOperMaster(string patientID, int visitID, int operID, string updateName, DateTime time, int operStatus)
        {
            MED_OPERATION_MASTER operMaster = operationInfoRepository.GetOperMaster(patientID, visitID, operID).Data;

            if (operMaster != null)
            {
                operMaster.OPER_STATUS_CODE     = operStatus;
                operMaster.OUT_PACU_WHEREABORTS = operStatus;
                if (time == DateTime.MinValue)
                {
                    operMaster.SetValue(updateName, null);
                }
                else
                {
                    operMaster.SetValue(updateName, time);
                }
                Logger.Error("master表状态以及时间:" + operMaster.OPER_STATUS_CODE + "|" + operMaster.IN_PACU_DATE_TIME + "|" + operMaster.OUT_PACU_DATE_TIME);
                operationInfoRepository.SaveOperMaster(operMaster);
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// 重置主表节点时间
 /// </summary>
 private MED_OPERATION_MASTER ResetOperationMaster(MED_OPERATION_MASTER master, OperationStatus status)
 {
     foreach (string s in OperationStatusHelper.OperationStatusList)
     {
         OperationStatus StatusFile = OperationStatusHelper.OperationStatusFromString(s);
         if (StatusFile == OperationStatus.TurnToEmergency || StatusFile == OperationStatus.TurnToICU || StatusFile == OperationStatus.TurnToSickRoom ||
             StatusFile == OperationStatus.TurnToMortuary || StatusFile == OperationStatus.TurnToPACU || StatusFile == OperationStatus.OutYouDao ||
             StatusFile == OperationStatus.OperScheduled || StatusFile == OperationStatus.None || StatusFile == OperationStatus.LeftHospital ||
             StatusFile == OperationStatus.InYouDao || StatusFile == OperationStatus.CancelOperation || StatusFile == OperationStatus.Done)
         {
             continue;
         }
         if (StatusFile > status)
         {
             string dtField = OperationStatusHelper.GetTimeFieldName(StatusFile);
             master.SetValue(dtField, null);
         }
     }
     return(master);
 }
Exemplo n.º 3
0
        protected override void OnSaveData(Dictionary <string, DataTable> dataSource)//, ref bool bNeedMsg
        {
            foreach (MTextBox mtb in textBoxs)
            {
                if (string.IsNullOrEmpty(mtb.Text) && !string.IsNullOrEmpty(mtb.InputNeededMessage))
                {
                    MessageBoxFormPC.Show("*号为必填项目,请重新填写");
                    // bNeedMsg = false;
                    return;
                }
            }
            string patientID = BindControls("MED_PAT_MASTER_INDEX", "PATIENT_ID");

            if (operationMaster == null)
            {
                operationMaster = new MED_OPERATION_MASTER();
            }
            operationMaster.SetValue("PATIENT_ID", patientID);
            operationMaster.SetValue("VISIT_ID", visitID);
            operationMaster.SetValue("OPER_ID", operID);
            operationMaster.SetValue("OPER_ROOM", ExtendAppContext.CurntSelect.OperRoom);
            operationMaster.SetValue("HOSP_BRANCH", ExtendAppContext.CurntSelect.HospBranchCode);
            operationMaster.SetValue("EMERGENCY_IND", BindControls("MED_OPERATION_MASTER", "EMERGENCY_IND"));
            operationMaster.SetValue("DEPT_CODE", BindControls("MED_OPERATION_MASTER", "DEPT_CODE"));
            operationMaster.SetValue("BED_NO", BindControls("MED_OPERATION_MASTER", "BED_NO"));
            operationMaster.SetValue("SCHEDULED_DATE_TIME", BindControls("MED_OPERATION_MASTER", "SCHEDULED_DATE_TIME"));
            operationMaster.SetValue("OPER_ROOM_NO", BindControls("MED_OPERATION_MASTER", "OPER_ROOM_NO"));
            operationMaster.SetValue("SEQUENCE", BindControls("MED_OPERATION_MASTER", "SEQUENCE"));
            operationMaster.SetValue("ANES_DOCTOR", BindControls("MED_OPERATION_MASTER", "ANES_DOCTOR"));
            operationMaster.SetValue("DIAG_BEFORE_OPERATION", BindControls("MED_OPERATION_MASTER", "DIAG_BEFORE_OPERATION"));
            operationMaster.SetValue("OPERATION_NAME", BindControls("MED_OPERATION_MASTER", "OPERATION_NAME"));
            operationMaster.SetValue("OPER_STATUS_CODE", 2);

            if (currentOperSchedule != null)
            {
                currentOperSchedule.SetValue("OPER_STATUS_CODE", 2);
            }

            if (patVisit == null)
            {
                patVisit = new MED_PAT_VISIT();
            }
            patVisit.SetValue("PATIENT_ID", patientID);
            patVisit.SetValue("VISIT_ID", visitID);
            patVisit.SetValue("INP_NO", BindControls("MED_PATS_IN_HOSPITAL", "INP_NO"));

            if (patMasterIndex == null)
            {
                patMasterIndex = new MED_PAT_MASTER_INDEX();
            }
            patMasterIndex.SetValue("PATIENT_ID", patientID);
            patMasterIndex.SetValue("NAME", BindControls("MED_PAT_MASTER_INDEX", "NAME"));
            patMasterIndex.SetValue("SEX", BindControls("MED_PAT_MASTER_INDEX", "SEX"));
            patMasterIndex.SetValue("DATE_OF_BIRTH", BindControls("MED_PAT_MASTER_INDEX", "DATE_OF_BIRTH"));

            string strOperName = BindControls("MED_OPERATION_MASTER", "OPER_NAME");

            if (!string.IsNullOrEmpty(strOperName))
            {
                string[] operNameArr = strOperName.Split('+');
                for (int i = 0; i < operNameArr.Length; i++)
                {
                    MED_OPERATION_NAME operName = new MED_OPERATION_NAME();
                    operName.SetValue("PATIENT_ID", operationMaster.PATIENT_ID);
                    operName.SetValue("VISIT_ID", operationMaster.VISIT_ID);
                    operName.SetValue("OPER_ID", operationMaster.OPER_ID);
                    operName.SetValue("OPER_NO", i + 1);
                    operName.SetValue("OPER_NAME", operNameArr[i].ToString());
                    operNameNewList.Add(operName);
                }
            }

            MED_ANESTHESIA_PLAN      anesPlan     = OperationInfoService.GetAnesPlan(patientID, visitID, operID);
            MED_ANESTHESIA_PLAN_PMH  anesPlanPmh  = OperationInfoService.GetAnesPlanPmh(patientID, visitID, operID);
            MED_ANESTHESIA_PLAN_EXAM anesPlanExam = OperationInfoService.GetAnesPlanExam(patientID, visitID, operID);

            if (anesPlan == null)
            {
                anesPlan = new MED_ANESTHESIA_PLAN();
                anesPlan.SetValue("PATIENT_ID", patientID);
                anesPlan.SetValue("VISIT_ID", visitID);
                anesPlan.SetValue("OPER_ID", operID);
            }
            if (anesPlanPmh == null)
            {
                anesPlanPmh = new MED_ANESTHESIA_PLAN_PMH();
                anesPlanPmh.SetValue("PATIENT_ID", patientID);
                anesPlanPmh.SetValue("VISIT_ID", visitID);
                anesPlanPmh.SetValue("OPER_ID", operID);
            }
            if (anesPlanExam == null)
            {
                anesPlanExam = new MED_ANESTHESIA_PLAN_EXAM();
                anesPlanExam.SetValue("PATIENT_ID", patientID);
                anesPlanExam.SetValue("VISIT_ID", visitID);
                anesPlanExam.SetValue("OPER_ID", operID);
            }
            OperationInfoService.SavePatientOperation(currentOperSchedule, patVisit, patMasterIndex, null, operNameNewList, operationMaster, anesPlan, anesPlanPmh, anesPlanExam, null);
        }
Exemplo n.º 4
0
        private bool SavePatientInfo()
        {
            operationMaster.SetValue("OPER_ROOM_NO", lblRoomNo.Text);
            operationMaster.SetValue("SEQUENCE", lblSequence.Text);
            if (this.txtDeptName.Data != null)
            {
                operationMaster.SetValue("DEPT_CODE", this.txtDeptName.Data);
            }
            operationMaster.SetValue("DIAG_BEFORE_OPERATION", this.txtDiagBeforeOperation.Text.Trim());
            if (txtOperNamePlan.Data != null)
            {
                anesPlan.OPERATION_NAME = txtOperNamePlan.Data.ToString();
            }
            operationMaster.SetValue("OPER_SCALE", this.txtOperScale.Text.Trim());
            operationMaster.SetValue("OPER_POSITION", this.txtOperPosition.Text.Trim());
            switch (radioGroupEmergency.SelectedIndex)
            {
            case 0:
                operationMaster.EMERGENCY_IND = 1;
                break;

            default:
                operationMaster.EMERGENCY_IND = 0;
                break;
            }
            operationMaster.PATIENT_CONDITION = memoCondition.Text;
            if (txtFirstOperDoctor.Data != null)
            {
                operationMaster.SetValue("SURGEON", this.txtFirstOperDoctor.Data);
            }
            if (txtSecondOperDoctor.Data != null)
            {
                operationMaster.SetValue("FIRST_OPER_ASSISTANT", this.txtSecondOperDoctor.Data);
            }
            if (txtThirdOperDoctor.Data != null)
            {
                operationMaster.SetValue("SECOND_OPER_ASSISTANT", this.txtThirdOperDoctor.Data);
            }
            if (txtFourthOperDoctor.Data != null)
            {
                operationMaster.SetValue("THIRD_OPER_ASSISTANT", this.txtFourthOperDoctor.Data);
            }
            if (txtCPDDoctor.Data != null)
            {
                operationMaster.SetValue("CPB_DOCTOR", this.txtCPDDoctor.Data);
            }
            if (txtSecondCPDDoctor.Data != null)
            {
                operationMaster.SetValue("FIRST_CPB_ASSISTANT", this.txtSecondCPDDoctor.Data);
            }
            if (txtFirstOperNurse.Data != null)
            {
                operationMaster.SetValue("FIRST_OPER_NURSE", this.txtFirstOperNurse.Data);
            }
            if (txtSecondOperNurse.Data != null)
            {
                operationMaster.SetValue("SECOND_OPER_NURSE", this.txtSecondOperNurse.Data);
            }
            if (txtFirstSupplyNurse.Data != null)
            {
                operationMaster.SetValue("FIRST_SUPPLY_NURSE", this.txtFirstSupplyNurse.Data);
            }
            if (txtSecondSupplyNurse.Data != null)
            {
                operationMaster.SetValue("SECOND_SUPPLY_NURSE", this.txtSecondSupplyNurse.Data);
            }
            operationMaster.ANAESTHESIA_TYPE = txtAnesType.Text;
            operationMaster.SetValue("ANES_METHOD", this.txtAnesMethod.Text);
            if (txtAnesDoctor.Data != null)
            {
                operationMaster.SetValue("ANES_DOCTOR", this.txtAnesDoctor.Data);
            }
            if (txtSecondAnesDoctor.Data != null)
            {
                operationMaster.SetValue("FIRST_ANES_ASSISTANT", this.txtSecondAnesDoctor.Data);
            }
            if (txtThirdAnesDoctor.Data != null)
            {
                operationMaster.SetValue("SECOND_ANES_ASSISTANT", this.txtThirdAnesDoctor.Data);
            }
            if (txtFourthAnesDoctor.Data != null)
            {
                operationMaster.SetValue("THIRD_ANES_ASSISTANT", this.txtFourthAnesDoctor.Data);
            }
            operationMaster.SetValue("ASA_GRADE", this.txtASAGrade.Text);
            operationMaster.SetValue("WOUND_TYPE", this.txtWoundType.Text);
            switch (radioGroupReturn.SelectedIndex)
            {
            case 0:
                anesPlan.RETURN_TO_SURGERY = "1";
                break;

            default:
                anesPlan.RETURN_TO_SURGERY = "0";
                break;
            }
            switch (radioGroupReturn.SelectedIndex)
            {
            case 0:
                anesPlan.PLAN_WHEREABORTS = "65";
                break;

            case 1:
                anesPlan.PLAN_WHEREABORTS = "40";
                break;

            case 2:
                anesPlan.PLAN_WHEREABORTS = "60";
                break;

            case 3:
                anesPlan.PLAN_WHEREABORTS = "66";
                break;

            case 4:
                anesPlan.PLAN_WHEREABORTS = "67";
                break;

            default:
                anesPlan.PLAN_WHEREABORTS = "无计划";
                break;
            }
            return(operationInfoRepository.SavePatientOperation(new { patVisit, patMasterIndex, operationMaster, anesPlan }).Data);

            if (panelEmergency.Visible)
            {
                ExtendApplicationContext.Current.PatientInformationExtend       = _patientCard;
                ExtendApplicationContext.Current.PatientContextExtend.PatientID = operationMaster.PATIENT_ID;
                ExtendApplicationContext.Current.PatientContextExtend.VisitID   = operationMaster.VISIT_ID;
                ExtendApplicationContext.Current.PatientContextExtend.OperID    = operationMaster.OPER_ID;
            }
        }