Exemple #1
0
        /// <summary>
        /// 美康接口检查,当前的病人信息和药品信息
        /// </summary>
        public void DoPassCheck(PassCheckType checkType)
        {
            if (!PassEnable())
            {
                _errorMessage = "接口连接不可用!";
                Trace.WriteLine(_errorMessage);
                return;
            }

            if (!HasPatient())
            {
                _errorMessage = "需要传入病人信息!";
                Trace.WriteLine(_errorMessage);
                return;
            }

            if (_currentDrugInfos == null || _currentDrugInfos.Count == 0)
            {
                _errorMessage = "需要传入药品信息/或无药品信息审查!";
                Trace.WriteLine(_errorMessage);
                return;
            }

            int commandId = (int)checkType;

            NativeMethods.PassDoCommand(commandId);

            for (int i = 0; i < _currentDrugInfos.Count; i++)
            {
                int ret = NativeMethods.PassGetWarn(i.ToString());
                MediIntfDrugInfo drug = _currentDrugInfos[i];
                drug.Warn = (PassWarnType)ret;
            }
        }
Exemple #2
0
        /// <summary>
        ///
        /// </summary>
        public bool PassSetRecipeInfo(string index, MediIntfDrugInfo drug)
        {
            if (!PassEnable())
            {
                _errorMessage = "接口连接不可用!";
                Trace.WriteLine(_errorMessage);
                return(false);
            }
            if (string.IsNullOrEmpty(_currentPatientInfo.PatientID))
            {
                _errorMessage = "需要传入病人信息!";
                Trace.WriteLine(_errorMessage);
                return(false);
            }
            int ret = NativeMethods.PassSetRecipeInfo(index,
                                                      drug.DrugCode, drug.DrugName, drug.SingleDose,
                                                      drug.DoseUnit, drug.Frequency, drug.StartDate, drug.EndDate,
                                                      drug.RouteName, drug.GroupTag, drug.OrderType,
                                                      drug.OrderDoctorId + "/" + drug.OrderDoctorName);

            _currentDrugIndex = index;
            return(true);
        }