Ejemplo n.º 1
0
        public void AddData(IEntity data, EntityType entityType)
        {
            switch (entityType)
            {
            case EntityType.Person:
            {
                Persons.Enqueue((Person)data);
                break;
            }

            case EntityType.Death:
            {
                Deaths.Enqueue((Death)data);
                break;
            }

            case EntityType.PayerPlanPeriod:
            {
                PayerPlanPeriods.Enqueue((PayerPlanPeriod)data);
                break;
            }

            case EntityType.ConditionOccurrence:
            {
                ConditionOccurrences.Enqueue((ConditionOccurrence)data);
                break;
            }

            case EntityType.DrugExposure:
            {
                DrugExposures.Enqueue((DrugExposure)data);
                break;
            }

            case EntityType.ProcedureOccurrence:
            {
                ProcedureOccurrences.Enqueue((ProcedureOccurrence)data);
                break;
            }

            case EntityType.Observation:
            {
                Observations.Enqueue((Observation)data);
                break;
            }

            case EntityType.VisitOccurrence:
            {
                VisitOccurrences.Enqueue((VisitOccurrence)data);
                break;
            }

            case EntityType.Cohort:
            {
                Cohort.Enqueue((Cohort)data);
                break;
            }

            case EntityType.Measurement:
            {
                Measurements.Enqueue((Measurement)data);
                break;
            }

            case EntityType.DeviceExposure:
            {
                DeviceExposure.Enqueue((DeviceExposure)data);
                break;
            }

            case EntityType.DeviceCost:
            {
                DeviceCost.Enqueue((DeviceCost)data);
                break;
            }

            case EntityType.DrugCost:
            {
                DrugCost.Enqueue((DrugCost)data);
                break;
            }

            case EntityType.VisitCost:
            {
                VisitCost.Enqueue((VisitCost)data);
                break;
            }

            //case EntityType.Cost:
            //{

            //   break;
            //}

            case EntityType.ProcedureCost:
            {
                ProcedureCost.Enqueue((ProcedureCost)data);
                break;
            }

            case EntityType.ObservationPeriod:
            {
                ObservationPeriods.Enqueue((ObservationPeriod)data);
                break;
            }

            case EntityType.DrugEra:
            {
                DrugEra.Enqueue((EraEntity)data);
                break;
            }

            case EntityType.ConditionEra:
            {
                ConditionEra.Enqueue((EraEntity)data);
                break;
            }

            case EntityType.Note:
            {
                Note.Enqueue((Note)data);
                break;
            }
            }
        }