public void AddScheduledProcedureStep(string accessionNumber, string requestedProcedureID, WCFScheduledProcedureStep procedureStep, MWLDataset ds) { ImagingServiceRequest imgRequest = new ImagingServiceRequest() { AccessionNumber = accessionNumber }; WCFRequestedProcedure reqProcedure = new WCFRequestedProcedure() { RequestedProcedureID = requestedProcedureID }; Guard.ArgumentNotNullOrEmpty(requestedProcedureID, "requestedProcedureID"); Guard.ArgumentNotNullOrEmpty(accessionNumber, "accessionNumber"); Guard.ArgumentNotNullOrEmpty(requestedProcedureID, "requestedProcedureID"); Guard.ArgumentNotNull(procedureStep.ScheduledProcedureStepStartDate_Time, "ScheduledProcedureStepStartDate_Time"); Guard.ArgumentNotNullOrEmpty(procedureStep.Modality, "Modality"); Guard.ArgumentNotNullOrEmpty(procedureStep.ScheduledProcedureStepDescription, "ScheduledProcedureStepDescription"); if (procedureStep.ScheduledProtocolCodeSequence != null) { foreach (ScheduledProtocolCodeSequence cs in procedureStep.ScheduledProtocolCodeSequence) { Guard.ArgumentNotNullOrEmpty(cs.CodeValue, "ScheduledProtocolCodeSequence.CodeValue"); Guard.ArgumentNotNullOrEmpty(cs.CodingSchemeDesignator, "ScheduledProtocolCodeSequence.CodingSchemeDesignator"); } } ds.AddScheduledProcedureStep(imgRequest, reqProcedure, procedureStep); }
public void AddScheduledProcedureStep(string userName, string accessionNumber, string requestedProcedureID, WorklistScheduledProcedureStep procedureStep) { ImagingServiceRequest imgRequest = new ImagingServiceRequest() { AccessionNumber = accessionNumber }; WorklistRequestedProcedure reqProcedure = new WorklistRequestedProcedure() { RequestedProcedureID = requestedProcedureID }; Check.ArgumentNotNullOrEmpty(requestedProcedureID, "requestedProcedureID"); Check.ArgumentNotNullOrEmpty(accessionNumber, "accessionNumber"); Check.ArgumentNotNullOrEmpty(requestedProcedureID, "requestedProcedureID"); Check.ArgumentNotNull(procedureStep.ScheduledProcedureStepStartDate_Time, "ScheduledProcedureStepStartDate_Time"); Check.ArgumentNotNullOrEmpty(procedureStep.Modality, "Modality"); Check.ArgumentNotNullOrEmpty(procedureStep.ScheduledProcedureStepDescription, "ScheduledProcedureStepDescription"); if (procedureStep.ScheduledProtocolCodeSequence != null) { foreach (ScheduledProtocolCodeSequence cs in procedureStep.ScheduledProtocolCodeSequence) { Check.ArgumentNotNullOrEmpty(cs.CodeValue, "ScheduledProtocolCodeSequence.CodeValue"); Check.ArgumentNotNullOrEmpty(cs.CodingSchemeDesignator, "ScheduledProtocolCodeSequence.CodingSchemeDesignator"); } } using (MWLDataset ds = _DataAccessAgent.Find(imgRequest, reqProcedure)) { if (ds != null && ds.RequestedProcedure.Rows.Count > 0) { ds.AddScheduledProcedureStep(imgRequest, reqProcedure, procedureStep); _DataAccessAgent.UpdateMWL(ds); } } }