예제 #1
0
        private static void UpdateOffset(KeyMasterOffset offset)
        {
            var visitOffset = 0;

            if (offset.VisitOccurrenceIdChanged)
            {
                visitOffset = offset.VisitOccurrenceId;
            }

            var periodOffset = 0;

            if (offset.PayerPlanPeriodIdChanged)
            {
                periodOffset = offset.PayerPlanPeriodId;
            }

            var drugOffset = 0;

            if (offset.DrugExposureIdChanged)
            {
                drugOffset = offset.DrugExposureId;
            }

            var procedureOffset = 0;

            if (offset.ProcedureOccurrenceIdChanged)
            {
                procedureOffset = offset.ProcedureOccurrenceId;
            }

            var dbKeyOffset = new DbKeyOffset(Settings.Current.Building.BuilderConnectionString);

            foreach (var reader in dbKeyOffset.Update(Settings.Current.Building.Id.Value, visitOffset, periodOffset, drugOffset, procedureOffset))
            {
                offset.VisitOccurrenceOffset     = reader.GetLong("VisitOccurrence").Value - visitOffset;
                offset.PayerPlanPeriodOffset     = reader.GetLong("PayerPlanPeriod").Value - periodOffset;
                offset.DrugExposureOffset        = reader.GetLong("DrugExposure").Value - drugOffset;
                offset.ProcedureOccurrenceOffset = reader.GetLong("ProcedureOccurrence").Value - procedureOffset;
            }
        }
예제 #2
0
        private static void UpdateOffset(KeyMasterOffset offset)
        {
            var visitOffset = 0;

            if (offset.VisitOccurrenceIdChanged)
            {
                visitOffset = offset.VisitOccurrenceId;
            }

            var periodOffset = 0;

            if (offset.PayerPlanPeriodIdChanged)
            {
                periodOffset = offset.PayerPlanPeriodId;
            }

            var drugOffset = 0;

            if (offset.DrugExposureIdChanged)
            {
                drugOffset = offset.DrugExposureId;
            }

            var procedureOffset = 0;

            if (offset.ProcedureOccurrenceIdChanged)
            {
                procedureOffset = offset.ProcedureOccurrenceId;
            }

            var deviceOffset = 0;

            if (offset.DeviceExposureIdChanged)
            {
                deviceOffset = offset.DeviceExposureId;
            }



            var conditionOffset = 0;

            if (offset.ConditionOccurrenceIdChanged)
            {
                conditionOffset = offset.ConditionOccurrenceId;
            }

            var measurementOffset = 0;

            if (offset.MeasurementIdChanged)
            {
                measurementOffset = offset.MeasurementId;
            }

            var observationOffset = 0;

            if (offset.ObservationIdChanged)
            {
                observationOffset = offset.ObservationId;
            }

            var observationPeriodOffset = 0;

            if (offset.ObservationPeriodIdChanged)
            {
                observationPeriodOffset = offset.ObservationPeriodId;
            }

            var visitCostOffset = 0;

            if (offset.VisitCostIdChanged)
            {
                visitCostOffset = offset.VisitCostId;
            }

            var procedureCostOffset = 0;

            if (offset.ProcedureCostIdChanged)
            {
                procedureCostOffset = offset.ProcedureCostId;
            }

            var deviceCostOffset = 0;

            if (offset.DeviceCostIdChanged)
            {
                deviceCostOffset = offset.DeviceCostId;
            }

            var drugEraOffset = 0;

            if (offset.DrugEraIdChanged)
            {
                drugEraOffset = offset.DrugEraId;
            }

            var conditionEraOffset = 0;

            if (offset.ConditionEraIdChanged)
            {
                conditionEraOffset = offset.ConditionEraId;
            }

            var dbKeyOffset = new DbKeyOffset(Settings.Current.Building.BuilderConnectionString);

            foreach (
                var reader in
                dbKeyOffset.Update(Settings.Current.Building.Id.Value, visitOffset, periodOffset, drugOffset,
                                   procedureOffset, deviceOffset, conditionOffset, measurementOffset, observationOffset,
                                   observationPeriodOffset, visitCostOffset, procedureCostOffset, deviceCostOffset, drugEraOffset,
                                   conditionEraOffset))
            {
                offset.VisitOccurrenceOffset     = reader.GetLong("VisitOccurrence").Value - visitOffset;
                offset.PayerPlanPeriodOffset     = reader.GetLong("PayerPlanPeriod").Value - periodOffset;
                offset.DrugExposureOffset        = reader.GetLong("DrugExposure").Value - drugOffset;
                offset.ProcedureOccurrenceOffset = reader.GetLong("ProcedureOccurrence").Value - procedureOffset;
                offset.DeviceExposureOffset      = reader.GetLong("DeviceExposure").Value - deviceOffset;

                offset.ConditionOccurrenceOffset = reader.GetLong("ConditionOccurrence").Value - conditionOffset;
                offset.MeasurementOffset         = reader.GetLong("Measurement").Value - measurementOffset;
                offset.ObservationOffset         = reader.GetLong("Observation").Value - observationOffset;
                offset.ObservationPeriodOffset   = reader.GetLong("ObservationPeriod").Value - observationPeriodOffset;
                offset.VisitCostOffset           = reader.GetLong("VisitCost").Value - visitCostOffset;
                offset.ProcedureCostOffset       = reader.GetLong("ProcedureCost").Value - procedureCostOffset;
                offset.DeviceCostOffset          = reader.GetLong("DeviceCost").Value - deviceCostOffset;
                offset.DrugEraOffset             = reader.GetLong("DrugEra").Value - drugEraOffset;
                offset.ConditionEraOffset        = reader.GetLong("ConditionEra").Value - conditionEraOffset;
            }
        }
예제 #3
0
        private static void UpdateOffset(KeyMasterOffset offset)
        {
            var visitOffset = 0;
             if (offset.VisitOccurrenceIdChanged)
            visitOffset = offset.VisitOccurrenceId;

             var periodOffset = 0;
             if (offset.PayerPlanPeriodIdChanged)
            periodOffset = offset.PayerPlanPeriodId;

             var drugOffset = 0;
             if (offset.DrugExposureIdChanged)
            drugOffset = offset.DrugExposureId;

             var procedureOffset = 0;
             if (offset.ProcedureOccurrenceIdChanged)
            procedureOffset = offset.ProcedureOccurrenceId;

             var dbKeyOffset = new DbKeyOffset(Settings.Current.Building.BuilderConnectionString);
             foreach (var reader in dbKeyOffset.Update(Settings.Current.Building.Id.Value, visitOffset, periodOffset, drugOffset, procedureOffset))
             {
            offset.VisitOccurrenceOffset = reader.GetLong("VisitOccurrence").Value - visitOffset;
            offset.PayerPlanPeriodOffset = reader.GetLong("PayerPlanPeriod").Value - periodOffset;
            offset.DrugExposureOffset = reader.GetLong("DrugExposure").Value - drugOffset;
            offset.ProcedureOccurrenceOffset = reader.GetLong("ProcedureOccurrence").Value - procedureOffset;
             }
        }
예제 #4
0
        private static void UpdateOffset(KeyMasterOffset offset)
        {
            var visitOffset = 0;

            if (offset.VisitOccurrenceIdChanged)
            {
                visitOffset = offset.VisitOccurrenceId;
            }

            var periodOffset = 0;

            if (offset.PayerPlanPeriodIdChanged)
            {
                periodOffset = offset.PayerPlanPeriodId;
            }

            var drugOffset = 0;

            if (offset.DrugExposureIdChanged)
            {
                drugOffset = offset.DrugExposureId;
            }

            var procedureOffset = 0;

            if (offset.ProcedureOccurrenceIdChanged)
            {
                procedureOffset = offset.ProcedureOccurrenceId;
            }

            var deviceOffset = 0;

            if (offset.DeviceExposureIdChanged)
            {
                deviceOffset = offset.DeviceExposureId;
            }

            var conditionOffset = 0;

            if (offset.ConditionOccurrenceIdChanged)
            {
                conditionOffset = offset.ConditionOccurrenceId;
            }

            var measurementOffset = 0;

            if (offset.MeasurementIdChanged)
            {
                measurementOffset = offset.MeasurementId;
            }

            var observationOffset = 0;

            if (offset.ObservationIdChanged)
            {
                observationOffset = offset.ObservationId;
            }

            var observationPeriodOffset = 0;

            if (offset.ObservationPeriodIdChanged)
            {
                observationPeriodOffset = offset.ObservationPeriodId;
            }

            var visitCostOffset = 0;

            if (offset.VisitCostIdChanged)
            {
                visitCostOffset = offset.VisitCostId;
            }

            var procedureCostOffset = 0;

            if (offset.ProcedureCostIdChanged)
            {
                procedureCostOffset = offset.ProcedureCostId;
            }

            var deviceCostOffset = 0;

            if (offset.DeviceCostIdChanged)
            {
                deviceCostOffset = offset.DeviceCostId;
            }

            var drugEraOffset = 0;

            if (offset.DrugEraIdChanged)
            {
                drugEraOffset = offset.DrugEraId;
            }

            var conditionEraOffset = 0;

            if (offset.ConditionEraIdChanged)
            {
                conditionEraOffset = offset.ConditionEraId;
            }

            var noteOffset = 0;

            if (offset.NoteIdChanged)
            {
                noteOffset = offset.NoteId;
            }

            var dbKeyOffset = new DbKeyOffset(Settings.Current.Building.BuilderConnectionString);

            dbKeyOffset.Update(Settings.Current.Building.Id.Value, offset, visitOffset, periodOffset, drugOffset,
                               procedureOffset, deviceOffset, conditionOffset, measurementOffset, observationOffset,
                               observationPeriodOffset, visitCostOffset, procedureCostOffset, deviceCostOffset, drugEraOffset,
                               conditionEraOffset, noteOffset);
        }