/// <summary> /// 根据指定的医嘱类型和DataRow创建医嘱内容对象 /// </summary> /// <param name="orderKind">医嘱类别</param> /// <param name="sourceRow">包含初始数据的医嘱DataRow</param> /// <returns>合适的医嘱对象</returns> public static OrderContent CreateOrderContent(OrderContentKind orderKind, DataRow sourceRow) { OrderContent content; // 根据医嘱类别+项目类别创建医嘱项目 switch (orderKind) { case OrderContentKind.Druggery: //药品医嘱 content = new DruggeryOrderContent(sourceRow); break; case OrderContentKind.ChargeItem://普通项目医嘱 content = new ChargeItemOrderContent(sourceRow); break; case OrderContentKind.GeneralItem://常规医嘱 content = new GeneralOrderContent(sourceRow); break; case OrderContentKind.ClinicItem://临床项目医嘱 content = new ClinicItemOrderContent(sourceRow); break; case OrderContentKind.OutDruggery://出院带药 content = new OutDruggeryContent(sourceRow); break; case OrderContentKind.Operation://手术医嘱 content = new OperationOrderContent(sourceRow); break; //case OrderKindFlags.CeaseLong://停长期医嘱 // break; case OrderContentKind.TextNormal://纯医嘱(普通) content = new TextOrderContent(sourceRow); break; case OrderContentKind.TextShiftDept://纯医嘱(转科) content = new ShiftDeptOrderContent(sourceRow); break; case OrderContentKind.TextAfterOperation://纯医嘱(术后) content = new AfterOperationContent(sourceRow); break; case OrderContentKind.TextLeaveHospital://纯医嘱(出院) content = new LeaveHospitalOrderContent(sourceRow); break; default: throw new ArgumentException(MessageStringManager.GetString("ClsssNotImplement")); } content.InnerOrderKind = orderKind; return(content); }
/// <summary> /// 取药品默认的用法、频次、数量及单位 /// </summary> /// <param name="systemFlag">系统标志(区分门诊还是住院)</param> /// <param name="sqlExecutor"></param> /// <returns></returns> public DruggeryOrderContent GetDefaultUsageFrequency(SystemApplyRange systemFlag, IDataAccess sqlExecutor) { if (sqlExecutor == null) { throw new ArgumentNullException(MessageStringManager.GetString("ParameterIsNull", "SQLHelper")); } DataRow dr = sqlExecutor.GetRecord(PersistentObjectFactory.GetQuerySentenceByName("SelectDefUsageOfDruggery") , String.Format(CultureInfo.CurrentCulture, " PlaceID = {0} and Mark in (1400, {1:D})", ProductSerialNo, systemFlag) , true); DruggeryOrderContent result = new DruggeryOrderContent(); if (dr != null) { result.Initialize(dr); } return(result); }