/// <summary> /// 作废未确认的医嘱项目 /// </summary> /// <param name="f"></param> /// <param name="cancelTime"></param> /// <param name="errText"></param> /// <returns></returns> private int CancelOrderNOConfirm(Neusoft.HISFC.Models.Registration.Register r, FeeItemList f, DateTime cancelTime, ref string errText) { if (f.NoBackQty == 0) { if (f.Item.ItemType == EnumItemType.Drug) { errText = f.Item.Name + "已发药,请终端审核后再作废医嘱!"; return(-1); } else { errText = f.Item.Name + "终端已确认,请取消确认后再作废医嘱!"; return(-1); } } #region 冲费用明细 if (CancelFeeItemList(r, f, cancelTime, ref errText) < 0) { return(-1); } #endregion #region 除申请数据 if (f.Item.ItemType == EnumItemType.Drug) { #region 除药品申请表数据 if (!f.IsConfirmed) { if (!f.Item.IsNeedConfirm) { if (pharmarcyManager.CancelApplyOutClinic(f.RecipeNO, f.SequenceNO) < 0) { errText = "作废药房发药申请失败!" + pharmarcyManager.Err; return(-1); } } } #endregion } else { #region 除非药品申请表数据 if (!f.IsConfirmed) { if (f.Item.IsNeedConfirm) { if (f.Order.ID == null || f.Order.ID == string.Empty) { f.Order.ID = orderManager.GetNewOrderID(); } if (f.Order.ID == null || f.Order.ID == string.Empty) { errText = "获得医嘱流水号出错!"; return(-1); } if (confirmIntegrate.DelTecApply(f.RecipeNO, f.SequenceNO.ToString()) < 0) { errText = "删除终端申请信息失败!" + confirmIntegrate.Err; return(-1); } } } #endregion } #endregion return(1); }