public ISOGuidanceAllocation ExportGuidanceAllocation(GuidanceAllocation adaptGuidanceAllocation) { ISOGuidanceAllocation gan = new ISOGuidanceAllocation(); //Group ID gan.GuidanceGroupIdRef = TaskDataMapper.InstanceIDMap.GetISOID(adaptGuidanceAllocation.GuidanceGroupId); //Allocation Stamps if (adaptGuidanceAllocation.TimeScopes.Any()) { gan.AllocationStamp = AllocationStampMapper.ExportAllocationStamps(adaptGuidanceAllocation.TimeScopes).FirstOrDefault(); } //Guidance Shift if (adaptGuidanceAllocation.GuidanceShift != null) { GuidanceShiftMapper gstMapper = new GuidanceShiftMapper(TaskDataMapper); gan.GuidanceShifts = new List <ISOGuidanceShift>() { gstMapper.ExportGuidanceShift(adaptGuidanceAllocation.GuidanceShift) }; } return(gan); }
public ISOCommentAllocation ExportCommentAllocation(Note note) { ISOCommentAllocation commentAllocation = new ISOCommentAllocation(); if (note.Value == null) { commentAllocation.FreeCommentText = note.Description; } else { if (note.Value.Representation != null) { ISOCodedComment comment = TaskDataMapper.CommentMapper.ExportCodedComment(note.Value); ISOCodedCommentListValue value = comment.CodedCommentListValues.FirstOrDefault(c => c.CodedCommentListValueDesignator == note.Value.Value.Value); if (value != null) { commentAllocation.CodedCommentListValueIdRef = value.CodedCommentListValueId; } } } //Allocation Stamps if (note.TimeStamps.Any()) { commentAllocation.AllocationStamp = AllocationStampMapper.ExportAllocationStamps(note.TimeStamps).FirstOrDefault(); } return(commentAllocation); }
public ISOWorkerAllocation ExportWorkerAllocation(PersonRole adaptWorkerAllocation) { ISOWorkerAllocation wan = new ISOWorkerAllocation(); //Worker ID wan.WorkerIdRef = TaskDataMapper.InstanceIDMap.GetISOID(adaptWorkerAllocation.PersonId); //Allocation Stamps if (adaptWorkerAllocation.TimeScopes.Any()) { wan.AllocationStamp = AllocationStampMapper.ExportAllocationStamps(adaptWorkerAllocation.TimeScopes).FirstOrDefault(); } return(wan); }