예제 #1
0
        private ClientOrderDetail MakeNewDetail(string clientOrderId, string containerId)
        {
            string            objectId = MongoDB.Bson.ObjectId.GenerateNewId().ToString();
            ClientOrderDetail result   = new ClientOrderDetail(YellowstonePathology.Business.Persistence.PersistenceModeEnum.AddNewObject, objectId);

            result.Description = "None";
            result.SpecimenTrackingInitiated = "Ypii Lab";
            return(result);
        }
예제 #2
0
        public YellowstonePathology.Business.ClientOrder.Model.ClientOrderDetail GetClientOrderDetail(string containerId)
        {
            ClientOrderDetail result = null;

            foreach (ClientOrder clientOrder in this)
            {
                if (clientOrder.ClientOrderDetailCollection.ExistsByContainerId(containerId))
                {
                    result = clientOrder.ClientOrderDetailCollection.GetByContainerId(containerId);
                    break;
                }
            }
            return(result);
        }
        public YellowstonePathology.Business.Validation.ValidationResult IsDomainValid(ClientOrderDetail clientOrderDetail)
        {
            Business.Validation.ValidationResult result = new Business.Validation.ValidationResult();
            result.IsValid = true;
            List<YellowstonePathology.Business.Validation.ValidationResult> validationResults = new List<Business.Validation.ValidationResult>();
            validationResults.Add(this.IsContainerIdNotADuplicate(clientOrderDetail.ClientOrderDetailId, clientOrderDetail.ContainerId));

            foreach (Business.Validation.ValidationResult validationResult in validationResults)
            {
                if (validationResult.IsValid == false)
                {
                    result = validationResult;
                    break;
                }
            }
            return result;
        }
 public static ClientOrderDetail GetClientOrderDetail(string orderDetailTypeCode, YellowstonePathology.Business.Persistence.PersistenceModeEnum persistenceMode)
 {
     ClientOrderDetail clientOrderDetail = null;
     switch (orderDetailTypeCode)
     {
         case "SRGCL":
         case "BPSY":
             clientOrderDetail = new SurgicalClientOrderDetail(persistenceMode);
             break;
         case "PLCNT":
             clientOrderDetail = new PlacentaClientOrderDetail(persistenceMode);
             break;
         default:
             clientOrderDetail = new ClientOrderDetail(persistenceMode);
             break;
     }
     return clientOrderDetail;
 }
        public YellowstonePathology.Business.Validation.ValidationResult IsContainerIdNotADuplicate(string clientOrderDetailId, string containerId)
        {
            YellowstonePathology.Business.Validation.ValidationResult validationResult = new Business.Validation.ValidationResult();
            validationResult.IsValid = true;
            if (ExistsByContainerId(containerId) == true)
            {
                ClientOrderDetail matchClientOrderDetail = GetByContainerId(containerId);
                if (matchClientOrderDetail.ClientOrderDetailId != clientOrderDetailId)
                {
                    validationResult.IsValid = false;
                }
            }

            if (validationResult.IsValid == false)
            {
                validationResult.Message = "The container scanned is part of an existing order and can't be used again. Are you sure you have scanned the correct container?";
            }
            return(validationResult);
        }
예제 #6
0
        public static ClientOrderDetail GetClientOrderDetail(string orderDetailTypeCode, YellowstonePathology.Business.Persistence.PersistenceModeEnum persistenceMode)
        {
            ClientOrderDetail clientOrderDetail = null;

            switch (orderDetailTypeCode)
            {
            case "SRGCL":
            case "BPSY":
                clientOrderDetail = new SurgicalClientOrderDetail(persistenceMode);
                break;

            case "PLCNT":
                clientOrderDetail = new PlacentaClientOrderDetail(persistenceMode);
                break;

            default:
                clientOrderDetail = new ClientOrderDetail(persistenceMode);
                break;
            }
            return(clientOrderDetail);
        }
 public ClientOrderDetailView(ClientOrderDetail clientOrderDetail)
 {
 }
예제 #8
0
 private ClientOrderDetail MakeNewDetail(string clientOrderId, string containerId)
 {
     string objectId = MongoDB.Bson.ObjectId.GenerateNewId().ToString();
     ClientOrderDetail result = new ClientOrderDetail(YellowstonePathology.Business.Persistence.PersistenceModeEnum.AddNewObject, objectId);
     result.Description = "None";
     result.SpecimenTrackingInitiated = "Ypii Lab";
     return result;
 }
예제 #9
0
 public void Join(ClientOrderDetail objectToReadFrom)
 {
     YellowstonePathology.Business.Persistence.ObjectPropertyWriter objectPropertyWriter = new Persistence.ObjectPropertyWriter(this, objectToReadFrom);
     objectPropertyWriter.WriteProperties();
 }
예제 #10
0
 public ClientOrderMedia(ClientOrderDetail clientOrderDetail)
 {
     this.m_ClientOrderMediaEnum = ClientOrderMediaEnum.Specimen;
     this.SetDefaults();
     this.ContainerId = clientOrderDetail.ContainerId;
 }
        public YellowstonePathology.Business.Validation.ValidationResult IsDomainValid(ClientOrderDetail clientOrderDetail)
        {
            Business.Validation.ValidationResult result = new Business.Validation.ValidationResult();
            result.IsValid = true;
            List <YellowstonePathology.Business.Validation.ValidationResult> validationResults = new List <Business.Validation.ValidationResult>();

            validationResults.Add(this.IsContainerIdNotADuplicate(clientOrderDetail.ClientOrderDetailId, clientOrderDetail.ContainerId));

            foreach (Business.Validation.ValidationResult validationResult in validationResults)
            {
                if (validationResult.IsValid == false)
                {
                    result = validationResult;
                    break;
                }
            }
            return(result);
        }
예제 #12
0
 public ClientOrderMedia(ClientOrderDetail clientOrderDetail)
 {
     this.m_ClientOrderMediaEnum = ClientOrderMediaEnum.Specimen;
     this.SetDefaults();
     this.ContainerId = clientOrderDetail.ContainerId;
 }
예제 #13
0
 public ClientOrderDetailView(ClientOrderDetail clientOrderDetail)
 {
 }
예제 #14
0
 public void Join(ClientOrderDetail objectToReadFrom)
 {
     YellowstonePathology.Business.Persistence.ObjectPropertyWriter objectPropertyWriter = new Persistence.ObjectPropertyWriter(this, objectToReadFrom);
     objectPropertyWriter.WriteProperties();
 }