internal override void ApplyDefaults(ProcedureRequisition procedureRequisition, OrderEditorComponent component)
            {
                // apply the defaults iff this requisition is specifically the one that was requested to be edited
                if (!EntityRef.Equals(procedureRequisition.ProcedureRef, this.ProcedureRef, true))
                {
                    return;
                }
                if (!procedureRequisition.CanModify)
                {
                    return;
                }

                if (this.Defaults.ScheduledTime.HasValue)
                {
                    procedureRequisition.ScheduledTime = this.Defaults.ScheduledTime.Value;
                }

                if (this.Defaults.ScheduledDuration.HasValue)
                {
                    procedureRequisition.ScheduledDuration = this.Defaults.ScheduledDuration.Value;
                }

                if (this.Defaults.ModalityRef != null)
                {
                    var modality = component._modalityChoices.FirstOrDefault(m => m.ModalityRef.Equals(this.Defaults.ModalityRef, true));
                    procedureRequisition.Modality = modality;
                }
            }
Exemple #2
0
 public bool Equals(WorklistItemSummaryBase other, bool ignoreVersion)
 {
     if (other == null)
     {
         return(false);
     }
     if (!EntityRef.Equals(ProcedureStepRef, other.ProcedureStepRef, ignoreVersion))
     {
         return(false);
     }
     if (!EntityRef.Equals(ProcedureRef, other.ProcedureRef, ignoreVersion))
     {
         return(false);
     }
     if (!EntityRef.Equals(OrderRef, other.OrderRef, ignoreVersion))
     {
         return(false);
     }
     if (!EntityRef.Equals(PatientRef, other.PatientRef, ignoreVersion))
     {
         return(false);
     }
     if (!EntityRef.Equals(PatientProfileRef, other.PatientProfileRef, ignoreVersion))
     {
         return(false);
     }
     return(true);
 }
            internal override void Initialize(OrderEditorComponent component)
            {
                // load the existing order
                Async.Request(component,
                              (IOrderEntryService service) =>
                              service.GetOrderRequisitionForEdit(new GetOrderRequisitionForEditRequest {
                    OrderRef = this.OrderRef, ProcedureRef = this.ProcedureRef
                }),
                              response =>
                {
                    component.OnOrderRequisitionLoaded(response.Requisition);

                    // if launched wrt a specific procedure, select it
                    if (this.ProcedureRef != null)
                    {
                        var x = component._proceduresTable.Items.Where(p => EntityRef.Equals(p.ProcedureRef, this.ProcedureRef, true));
                        component.SelectedProcedures = new Selection(x);
                    }
                });
            }