private void Btn_SaveProcedure_Click(object sender, RoutedEventArgs e) { if (isEdit) { AppMgr.HospitalManagement.UpdateProcedure(EditProcedure, SourceProcedure); } else { ProcedureType newProcedure = (ProcedureType)EditProcedure.Clone(); AppMgr.HospitalManagement.AddNewProcedure(newProcedure); AllProcedures.Add(newProcedure); } EditProcedure = new ProcedureType("", "", new List <Role>()); TxtBox_ProcId.IsEnabled = false; TxtBox_ProcName.IsEnabled = false; Chk_Admin.IsEnabled = false; Chk_DataRecorder.IsEnabled = false; Chk_Doctor.IsEnabled = false; Chk_Laboratorian.IsEnabled = false; Chk_Nurse.IsEnabled = false; Btn_SaveProcedure.IsEnabled = false; isEdit = false; ListBox_AllProcedures.Items.Refresh(); ListBox_ChosenProcedures.Items.Refresh(); }
public ParameterAttribute(string parameterName, ProcedureType type, int order) { ParameterName = parameterName; Order = order; IsID = false; Type = type; }
public override void GetOutPut(TextWriter tw) { StringBuilder s = new StringBuilder(); int curr = 0; int total = messageDef.structures.Length + 1; ProgressEventArgs progressArgs; progressArgs = new ProgressEventArgs(curr, total); OnProgress(progressArgs); ProcedureType[] procedureList = new ProcedureType[messageDef.structures.Length]; int i = 0; foreach (StructureType structure in messageDef.structures) { ProcedureType aProcedure = GetProcedure(structure.baseTable); procedureList[i++] = aProcedure; progressArgs.Update(++curr); OnProgress(progressArgs); } Package p = new Package(); p.procedures = procedureList; XmlSerializer serializer = new XmlSerializer(typeof(Package)); serializer.Serialize(tw, p); progressArgs.Update(total); OnProgress(progressArgs); }
public static string GetProcedureName(ProcedureType type) { string result = string.Empty; switch (type) { case ProcedureType.WithoutSystem: result = "Без застосування електронної системи"; break; case ProcedureType.Limited: result = "Допорогова закупівля"; break; case ProcedureType.ContractReport: result = "Звіт про укладений договір"; break; case ProcedureType.Open: result = "Відкриті торги"; break; case ProcedureType.Private: result = "Переговорна процедура"; break; case ProcedureType.Dialog: result = "Конкурентний діалог"; break; } return(result); }
private void ListBox_AllProcedures_GotFocus(object sender, RoutedEventArgs e) { if (AllProceduresSelected != null) { EditProcedure = new ProcedureType(AllProceduresSelected.Id, AllProceduresSelected.Name, ProcedureType.GenerateRoles(AllProceduresSelected)); } }
public Prior(Report r, Procedure rp, ProcedureType pt, Order o) { this.Report = r; this.Procedure = rp; this.ProcedureType = pt; this.Order = o; }
public Prior(Report r, Procedure rp, ProcedureType pt, Order o) { this.Report = r; this.Procedure = rp; this.ProcedureType = pt; this.Order = o; }
public void UpdateProcedureType(ProcedureType procType, ProcedureTypeDetail detail, IPersistenceContext context) { procType.Id = detail.Id; procType.Name = detail.Name; procType.BaseType = detail.CustomProcedurePlan && detail.BaseType != null ? context.Load <ProcedureType>(detail.BaseType.ProcedureTypeRef, EntityLoadFlags.Proxy) : null; procType.DefaultDuration = detail.DefaultDuration; procType.Deactivated = detail.Deactivated; try { if (detail.CustomProcedurePlan) { procType.Plan = new ProcedurePlan(detail.PlanXml); } else { var modality = context.Load <Modality>(detail.DefaultModality.ModalityRef); procType.Plan = ProcedurePlan.CreateDefaultPlan(detail.Name, modality); } } catch (XmlException e) { throw new RequestValidationException(string.Format("Procedure plan XML is invalid: {0}", e.Message)); } }
public Register(Type type, ProcedureType procType, int pos = -1, dynamic value = null) { this.type = type; this.procType = procType; this.pos = pos; this.value = value; }
private void ListBox_ChosenProcedures_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (ChosenProceduresSelected != null) { EditProcedure = new ProcedureType(ChosenProceduresSelected.Id, ChosenProceduresSelected.Name, ProcedureType.GenerateRoles(ChosenProceduresSelected)); } }
/// <summary> /// Applies the rule. /// </summary> /// <param name="node">The node instance to modify.</param> /// <param name="data">Private data from CheckConsistency().</param> public override void Apply(IProcedureFeature node, object data) { IClass EmbeddingClass = node.EmbeddingClass; ITypeName BaseTypeName = EmbeddingClass.ResolvedClassTypeName.Item; IClassType BaseType = EmbeddingClass.ResolvedClassType.Item; IList <ICommandOverloadType> OverloadList = new List <ICommandOverloadType>(); foreach (ICommandOverload Item in node.OverloadList) { OverloadList.Add(Item.ResolvedAssociatedType.Item); } ProcedureType.ResolveType(EmbeddingClass.TypeTable, BaseTypeName, BaseType.SourceType, BaseType, OverloadList, out ITypeName ResolvedProcedureTypeName, out IProcedureType ResolvedProcedureType); node.ResolvedAgentTypeName.Item = ResolvedProcedureTypeName; node.ResolvedAgentType.Item = ResolvedProcedureType; node.ResolvedFeature.Item = node; #if COVERAGE string TypeString = ResolvedProcedureType.ToString(); Debug.Assert(!node.ResolvedEffectiveTypeName.IsAssigned); Debug.Assert(!node.ResolvedEffectiveType.IsAssigned); #endif }
public ParameterAttribute(string parameterName, ProcedureType type, int order, bool isid) { ParameterName = parameterName; Order = order; IsID = isid; Type = type; }
private IList <ProcedureType> GetRelevantTypes(ProcedureType procType) { var q = this.GetNamedHqlQuery("relevantProcedureTypes"); q.SetCacheable(true); q.SetParameter(0, procType); return(q.List <ProcedureType>()); }
public DataTable GetProcedures(string spName, ProcedureType procType) { StringBuilder sql = new StringBuilder(); StringBuilder where = new StringBuilder(); FbCommand select = new FbCommand(this.connection); ISQLCursor cursor = null; DataTable schema = BdpMetaDataHelper.GetProcedures(); short resultCols = 0; sql.Append( @"SELECT " + "rdb$procedure_name AS ProcName, " + "rdb$procedure_inputs AS Inputs, " + "rdb$procedure_outputs AS Outputs " + "FROM " + "rdb$procedures"); if (spName != null && spName.Length > 0) { where.AppendFormat("rdb$procedure_name = '{0}'", spName); } if (where.Length > 0) { sql.AppendFormat(" WHERE {0} ", where.ToString()); } sql.Append(" ORDER BY rdb$procedure_name"); // Prepare and execute the command select.Prepare(sql.ToString(), 0); select.Execute(out cursor, ref resultCols); int recno = 0; while (cursor.Next() != -1) { DataRow row = schema.NewRow(); row["Recno"] = recno++; row["CatalogName"] = null; row["SchemaName"] = null; row["ProcName"] = ((FbCursor)cursor).GetValue(0).ToString().Trim(); row["ProcType"] = procType; row["InParams"] = ((FbCursor)cursor).GetValue(1); row["OutParams"] = ((FbCursor)cursor).GetValue(2); schema.Rows.Add(row); } cursor.Release(); select.Release(); return(schema); }
public void UpdateProcedure(ProcedureType source, ProcedureType target) { target.AllowedAdministrator = source.AllowedAdministrator; target.AllowedDataRecorder = source.AllowedDataRecorder; target.AllowedDoctor = source.AllowedDoctor; target.AllowedLaboratorian = source.AllowedLaboratorian; target.AllowedNurse = source.AllowedNurse; target.Name = source.Name; AppManager.ApplicationDb.SaveChanges(); }
public override int GetHashCode() { unchecked { int hash = 17; hash = hash * 23 + NodeID.GetHashCode(); hash = hash * 23 + ProcedureType.GetHashCode(); return(hash); } }
private string DoService(string robotName, int procedureTime, ProcedureType procedureType, string autotemplate) { IRobot robot = GetRobotByName(robotName); IProcedure procedure = procedures[procedureType]; procedure.DoService(robot, procedureTime); string message = String.Format(autotemplate, robotName); return(message); }
private string DoService(string robotName, int procedureTime, ProcedureType procedureType, string outputTemplate) { IRobot robot = this.GetRobotByName(robotName); IProcedure procedure = this.procedures[procedureType]; procedure.DoService(robot, procedureTime); string outputMsg = string.Format(outputTemplate, robot.Name); return(outputMsg); }
internal static DiagnosticService CreateDiagnosticService(int numReqProcs) { // create a bunch of dummy procedure types (without procedure plans) HashedSet<ProcedureType> procedureTypes = new HashedSet<ProcedureType>(); for (int p = 0; p < numReqProcs; p++) { ProcedureType pt = new ProcedureType("20" + p, "Procedure 20" + p); procedureTypes.Add(pt); } return new DiagnosticService("301", "Diagnostic Service 301", procedureTypes); }
public void Test_Constructor() { var procedureType = new ProcedureType(); var procedure = new Procedure(procedureType, "111", "1.111"); Assert.AreEqual(procedureType, procedure.Type); Assert.AreEqual(0, procedure.ProcedureSteps.Count); Assert.IsNotNull(procedure.ProcedureCheckIn); Assert.AreEqual(0, procedure.Reports.Count); Assert.AreEqual(0, procedure.Protocols.Count); }
internal static DiagnosticService CreateDiagnosticService(int numReqProcs) { // create a bunch of dummy procedure types (without procedure plans) HashedSet <ProcedureType> procedureTypes = new HashedSet <ProcedureType>(); for (int p = 0; p < numReqProcs; p++) { ProcedureType pt = new ProcedureType("20" + p, "Procedure 20" + p); procedureTypes.Add(pt); } return(new DiagnosticService("301", "Diagnostic Service 301", procedureTypes)); }
/// <summary> /// Generates a method call based on the return type of the procedure. /// </summary> /// <param name="procedureName">The name of the procedure</param> /// <param name="resultType">The type the method should return</param> /// <param name="procedureType">The type of the procedure</param> /// <param name="parameterArray">The procedure parameters local</param> /// <param name="fields">The fields of the generated class</param> /// <param name="generator">The generator used for code generation</param> public void Generate(string procedureName, Type resultType, ProcedureType procedureType, LocalBuilder parameterArray, FieldInfo[] fields, ILGenerator generator) { IProcedureCall procedureCall = ProcedureCallFactory.Create(procedureType, resultType); procedureCall.Call(procedureName, resultType, generator); // If we don't return a value from this method, pop the result from the stack so we don't run into issues if (resultType == typeof(void)) { generator.Emit(OpCodes.Pop); } }
public ExamController(Appointment appointment) { this.loggedPhysitian = appointment.Physitian; this.SelectedPatient = appointment.Patient; ProcedureType procedure = appointment.ProcedureType; reportService = new ReportService(); String patientConditions = this.GetPatientConditions(); this.CurrentReport = new Report(DateTime.Today, "", selectedPatient, loggedPhysitian, patientConditions); }
public void ChangeProcedure(ProcedureType type) { if (m_CurrentProcedure.GetProcedureType() == type) { return; } m_CurrentProcedure.OnLeave(this); Debug.Log("Leave procedure : " + m_CurrentProcedure.GetProcedureType().ToString()); m_CurrentProcedure = m_ProcedureList[type]; Debug.Log("Enter procedure : " + m_CurrentProcedure.GetProcedureType().ToString()); m_CurrentProcedure.OnEnter(this); }
public List <Physitian> GetPhysitiansByProcedureType(ProcedureType procedureType) { List <Physitian> physitians = new List <Physitian>(); foreach (Physitian physitian in GetAll()) { if (physitian.Specialization.Contains(procedureType.Specialization)) { physitians.Add(physitian); } } return(physitians); }
public List <Room> GetRoomsByProcedureType(ProcedureType procedureType) { List <Room> rooms = new List <Room>(); foreach (Room room in GetAll()) { if (room.ContainsAllEquipment(procedureType.RequiredEquipment)) { rooms.Add(room); } } return(rooms); }
/// <summary> /// Applies the rule. /// </summary> /// <param name="node">The node instance to modify.</param> /// <param name="data">Private data from CheckConsistency().</param> public override void Apply(IProcedureType node, object data) { IClass EmbeddingClass = node.EmbeddingClass; IObjectType BaseType = (IObjectType)node.BaseType; ITypeName BaseTypeName = BaseType.ResolvedTypeName.Item; ICompiledTypeWithFeature ResolvedBaseType = BaseType.ResolvedType.Item as ICompiledTypeWithFeature; Debug.Assert(BaseType != null); ProcedureType.ResolveType(EmbeddingClass.TypeTable, BaseTypeName, BaseType, ResolvedBaseType, node.OverloadList, out ITypeName ResolvedTypeName, out IProcedureType ResolvedType); node.ResolvedTypeName.Item = ResolvedTypeName; node.ResolvedType.Item = ResolvedType; }
private void Btn_NewProcedure_Click(object sender, RoutedEventArgs e) { EditProcedure = new ProcedureType("", "", new List <Role>()); TxtBox_ProcId.IsEnabled = true; TxtBox_ProcName.IsEnabled = true; Chk_Admin.IsEnabled = true; Chk_DataRecorder.IsEnabled = true; Chk_Doctor.IsEnabled = true; Chk_Laboratorian.IsEnabled = true; Chk_Nurse.IsEnabled = true; Btn_SaveProcedure.IsEnabled = true; isEdit = false; }
public void ExecuteCommand(string cmdText, ProcedureType procedureType) { try { Command = new SqlCommand(cmdText, Connection); Command.CommandType = CommandType.Text; Execute(procedureType); } catch (Exception exception) { WriteToLog(exception.ToString()); } }
public ServiceInfo(string serviceName, bool eventDrivenBubbles, bool usesMediaProgress, bool usesInternet, bool supportsBatterySavingsMode, bool delayedNotifications, Type settings, ProcedureType procedureType, params Type[] supportedBubbles) { ServiceName = serviceName; EventDrivenBubbles = eventDrivenBubbles; SupportedBubbles = supportedBubbles; Settings = settings; UsesInternet = usesInternet; UsesMediaProgress = usesMediaProgress; Procedure = procedureType; SupportsBatterySavingsMode = supportsBatterySavingsMode; DelayedNotifications = delayedNotifications; }
public ServiceInfo(string serviceName, bool eventDrivenBubbles, bool usesMediaProgress, bool usesInternet, bool supportsBatterySavingsMode, bool delayedNotifications, Type settings, ProcedureType procedureType, params Type[] supportedBubbles) { ServiceName = serviceName; EventDrivenBubbles = eventDrivenBubbles; SupportedBubbles = supportedBubbles; Settings = settings; UsesInternet = usesInternet; UsesMediaProgress = usesMediaProgress; Procedure = procedureType; SupportsBatterySavingsMode = supportsBatterySavingsMode; DelayedNotifications = delayedNotifications; }
public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } ProcedureType = await _context.ProcedureType.FirstOrDefaultAsync(m => m.ID == id); if (ProcedureType == null) { return(NotFound()); } return(Page()); }
public IList<ProtocolGroup> FindAll(ProcedureType procedureType) { if (procedureType == null) return new List<ProtocolGroup>(); string hql = "select distinct p from ProtocolGroup p" + " join p.ReadingGroups r " + " join r.ProcedureTypes t" + " where t = :requesteProcedureType"; IQuery query = this.CreateHibernateQuery(hql); query.SetParameter("requesteProcedureType", procedureType); return query.List<ProtocolGroup>(); }
private void ExecuteProcedureWithProgress(ProcedureType procedureType, Action action) { if (this.IsStopRequested) { Tracer.TraceInformation("ProgressController.ExecuteProcedureWithProgress: Stop requested. Procedure type: {0}", new object[] { procedureType }); return; } try { if (this.StatusManager.BeginProcedure(procedureType)) { ScenarioData scenarioData = ScenarioData.Current; Task task = Task.Factory.StartNew(delegate() { ScenarioData scenarioData; using (new ScenarioData(scenarioData)) { this.WaitForAndProcessProgress(); } }); Exception ex = null; try { action(); } finally { this.progressAvailable.Release(1); ex = AsynchronousTaskHandler.WaitForAsynchronousTask(task); } if (ex != null) { Tracer.TraceError("ProgressController.ExecuteProcedureWithProgress: Hitting exception in progress task. Exception: {0}", new object[] { ex }); throw ex; } } } finally { this.StatusManager.EndProcedure(); } }
/// <summary> /// Initializes a new instance of the <see cref="Procedure"/> class. /// </summary> /// <param name="codingContext">The coding context.</param> /// <param name="procedureType">Type of the procedure.</param> /// <param name="activity">The activity.</param> /// <param name="procedureCode">The procedure code.</param> /// <param name="unitCount">The unit count.</param> protected internal Procedure(CodingContext codingContext, ProcedureType procedureType, Activity activity, CodedConcept procedureCode, UnitCount unitCount) : base(codingContext) { if (procedureType == ProcedureType.Activity) { Check.IsNotNull(activity, "Activity is required for activity procedure type."); } Check.IsNotNull(procedureCode, "Procedure code is required."); CodingContext = codingContext; ProcedureType = procedureType; Activity = activity; ProcedureCode = procedureCode; BillingUnitCount = unitCount; }
private IList<ProcedureType> GetRelevantTypes(ProcedureType procType) { var q = this.GetNamedHqlQuery("relevantProcedureTypes"); q.SetCacheable(true); q.SetParameter(0, procType); return q.List<ProcedureType>(); }
/// <summary> /// Obtains the set of procedure types that are relevant to the specified procedure type. /// </summary> /// <param name="procType"></param> /// <returns></returns> public IList<ProcedureType> GetRelevantProcedureTypes(ProcedureType procType) { // by caching this query, we effectively build up a kind of in-memory index // of relevant procedure types return GetRelevantTypes(procType); }
public ProcedureInfo(ObjectName routineName, ProcedureType procedureType, RoutineParameter[] parameters) : base(routineName, parameters) { ProcedureType = procedureType; }
public ProcedureInfo(ObjectName routineName, ProcedureType procedureType) : this(routineName, procedureType, new RoutineParameter[0]) { }
public DataTable GetProcedures(string spName, ProcedureType procType) { StringBuilder sql = new StringBuilder(); StringBuilder where = new StringBuilder(); FbCommand select = new FbCommand(this.connection); ISQLCursor cursor = null; DataTable schema = BdpMetaDataHelper.GetProcedures(); short resultCols = 0; sql.Append( @"SELECT " + "rdb$procedure_name AS ProcName, " + "rdb$procedure_inputs AS Inputs, " + "rdb$procedure_outputs AS Outputs " + "FROM " + "rdb$procedures"); if (spName != null && spName.Length > 0) { where.AppendFormat("rdb$procedure_name = '{0}'", spName); } if (where.Length > 0) { sql.AppendFormat(" WHERE {0} ", where.ToString()); } sql.Append(" ORDER BY rdb$procedure_name"); // Prepare and execute the command select.Prepare(sql.ToString(), 0); select.Execute(out cursor, ref resultCols); int recno = 0; while (cursor.Next() != -1) { DataRow row = schema.NewRow(); row["Recno"] = recno++; row["CatalogName"] = null; row["SchemaName"] = null; row["ProcName"] = ((FbCursor)cursor).GetValue(0).ToString().Trim(); row["ProcType"] = procType; row["InParams"] = ((FbCursor)cursor).GetValue(1); row["OutParams"] = ((FbCursor)cursor).GetValue(2); schema.Rows.Add(row); } cursor.Release(); select.Release(); return schema; }
private void EditSelectedProcedure(ProcedureType procedure) { if (procedure != null) { SourceProcedure = procedure; EditProcedure = (ProcedureType)sourceProcedure.Clone(); TxtBox_ProcId.IsEnabled = false; TxtBox_ProcName.IsEnabled = true; Chk_Admin.IsEnabled = true; Chk_DataRecorder.IsEnabled = true; Chk_Doctor.IsEnabled = true; Chk_Laboratorian.IsEnabled = true; Chk_Nurse.IsEnabled = true; Btn_SaveProcedure.IsEnabled = true; isEdit = true; } }
private void ListBox_AllProcedures_GotFocus(object sender, RoutedEventArgs e) { if (AllProceduresSelected != null) { EditProcedure = new ProcedureType(AllProceduresSelected.Id, AllProceduresSelected.Name, ProcedureType.GenerateRoles(AllProceduresSelected)); } }
private void Btn_SaveProcedure_Click(object sender, RoutedEventArgs e) { if (isEdit) { AppMgr.HospitalManagement.UpdateProcedure(EditProcedure, SourceProcedure); } else { ProcedureType newProcedure = (ProcedureType)EditProcedure.Clone(); AppMgr.HospitalManagement.AddNewProcedure(newProcedure); AllProcedures.Add(newProcedure); } EditProcedure = new ProcedureType("", "", new List<Role>()); TxtBox_ProcId.IsEnabled = false; TxtBox_ProcName.IsEnabled = false; Chk_Admin.IsEnabled = false; Chk_DataRecorder.IsEnabled = false; Chk_Doctor.IsEnabled = false; Chk_Laboratorian.IsEnabled = false; Chk_Nurse.IsEnabled = false; Btn_SaveProcedure.IsEnabled = false; isEdit = false; ListBox_AllProcedures.Items.Refresh(); ListBox_ChosenProcedures.Items.Refresh(); }
private void ListBox_ChosenProcedures_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (ChosenProceduresSelected != null) { EditProcedure = new ProcedureType(ChosenProceduresSelected.Id, ChosenProceduresSelected.Name, ProcedureType.GenerateRoles(ChosenProceduresSelected)); } }
private void Btn_NewProcedure_Click(object sender, RoutedEventArgs e) { EditProcedure = new ProcedureType("", "", new List<Role>()); TxtBox_ProcId.IsEnabled = true; TxtBox_ProcName.IsEnabled = true; Chk_Admin.IsEnabled = true; Chk_DataRecorder.IsEnabled = true; Chk_Doctor.IsEnabled = true; Chk_Laboratorian.IsEnabled = true; Chk_Nurse.IsEnabled = true; Btn_SaveProcedure.IsEnabled = true; isEdit = false; }
public void Test_Constructor() { var procedureType = new ProcedureType(); var procedure = new Procedure(procedureType, "111", "1.111"); Assert.AreEqual(procedureType, procedure.Type); Assert.AreEqual(0, procedure.ProcedureSteps.Count); Assert.IsNotNull(procedure.ProcedureCheckIn); Assert.AreEqual(0, procedure.Reports.Count); Assert.AreEqual(0, procedure.Protocols.Count); }