public override void InitializeEntity()
        {
            SampleDataCache.GenerateRandomDateTime rdt = new SampleDataCache.GenerateRandomDateTime(2010, 1, 1, DateTime.Today);

            DateTime startDate = rdt.Next();
            DateTime endDate   = rdt.AddYears(startDate, 5, 10);

            StartDateTime = startDate;
            EndDateTime   = endDate;
        }
        public override sealed void InitializeEntity()
        {
            Name = SampleDataCache.PractitionerRoles[SampleDataCache.SelectRandomItem.Next(0, SampleDataCache.PractitionerRoles.Count - 1)];

            SampleDataCache.GenerateRandomDateTime rdt = new SampleDataCache.GenerateRandomDateTime(2010, 1, 1, DateTime.Today);

            DateTime startDate = rdt.Next();
            DateTime endDate   = rdt.AddYears(startDate, 5, 10);

            PeriodStartDate = startDate;
            PeriodEndDate   = endDate;
        }
Ejemplo n.º 3
0
        public override void InitializeEntity()
        {
            SampleDataCache.GenerateRandomDateTime rdt = new SampleDataCache.GenerateRandomDateTime(2018, 1, 1, DateTime.Today);
            OccurrenceDateTime = rdt.Next();

            SubjectType          = (int)HealthCDMEnums.RiskAssessment_Subjecttype.Patient;
            RiskAssessmentNumber = GenerateRandomNumber();
            ReasonType           = (int)HealthCDMEnums.RiskAssessment_Reasontype.CodeableConcept;
            ContextType          = (int)HealthCDMEnums.RiskAssessment_Contexttype.Encounter;
            PerformerType        = (int)HealthCDMEnums.RiskAssessment_Performertype.Pratitioner;
            OccurrenceType       = (int)HealthCDMEnums.RiskAssessment_Occurrencetype.Time;
        }
        public override void InitializeEntity()
        {
            TaskPriority      = (int)HealthCDMEnums.Task_Taskpriority.Routine;
            RequestorAgent    = (int)HealthCDMEnums.Task_Requesteragent.Patient;
            Intent            = (int)HealthCDMEnums.Task_Performerownertype.Patient;
            DurationInMinutes = int.Parse(GenerateRandomNumber(2));

            OwnerType = (int)HealthCDMEnums.Task_Performerownertype.Patient;

            SampleDataCache.GenerateRandomDateTime rdt = new SampleDataCache.GenerateRandomDateTime(2018, 1, 1, DateTime.Today);
            ScheduledTime = rdt.Next();
        }
        public override void InitializeEntity()
        {
            Description = SampleDataCache.Procedures[SampleDataCache.SelectRandomItem.Next(0, SampleDataCache.Procedures.Count - 1)];
            Status      = HealthCDMEnums.RandomEnumInt <HealthCDMEnums.Procedure_Status>();
            SubjectType = (int)HealthCDMEnums.Procedure_Subjecttype.Patient;

            SampleDataCache.GenerateRandomDateTime rdt = new SampleDataCache.GenerateRandomDateTime(2017, 1, 1, (DateTime.Today.AddDays(90)));

            ProcedureDateTime = rdt.Next();
            identifier        = GenerateRandomNumber(8);

            NotDone = int.Parse(GenerateRandomNumber(1)) > 5 ? true : false;
        }
Ejemplo n.º 6
0
        public override void InitializeEntity()
        {
            ContextType = (int)HealthCDMEnums.CarePlan_Contexttype.Encounter;
            SubjectType = (int)HealthCDMEnums.CarePlan_Subjecttype.Patient;
            Intent      = HealthCDMEnums.RandomEnumInt <HealthCDMEnums.CarePlan_Planintent>();

            SampleDataCache.GenerateRandomDateTime rdt = new SampleDataCache.GenerateRandomDateTime(2013, 1, 1, DateTime.Today);

            DateTime startDate = rdt.Next();
            DateTime endDate   = rdt.AddYears(startDate, 5, 10);

            StartDate = startDate;
            EndDate   = endDate;
        }
        public new void InitializeEntity()
        {
            SampleDataCache.InitializeDataCache();
            SampleDataCache.GenerateRandomDateTime rdt = new SampleDataCache.GenerateRandomDateTime(2018, 1, 1, DateTime.Today);

            DateTime startDate = rdt.Next();
            DateTime endDate   = rdt.AddYears(startDate, 5, 10);

            ValidFromDateTime = startDate;
            ValidToDateTime   = endDate;

            Name    = SampleDataCache.Medications[SampleDataCache.SelectRandomItem.Next(0, SampleDataCache.Medications.Count - 1)];
            Subject = SampleDataCache.Medications[SampleDataCache.SelectRandomItem.Next(0, SampleDataCache.Medications.Count - 1)];
        }
Ejemplo n.º 8
0
        public override void InitializeEntity()
        {
            Description           = SampleDataCache.ReferralRequests[SampleDataCache.SelectRandomItem.Next(0, SampleDataCache.ReferralRequests.Count - 1)];
            Status                = HealthCDMEnums.RandomEnumInt <HealthCDMEnums.ReferralRequest_Status>();
            Intent                = HealthCDMEnums.RandomEnumInt <HealthCDMEnums.ReferralRequest_Intent>();
            Priority              = HealthCDMEnums.RandomEnumInt <HealthCDMEnums.ReferralRequest_Priority>();
            ContextType           = HealthCDMEnums.RandomEnumInt <HealthCDMEnums.ReferralRequest_Contexttype>();
            Subject               = (int)HealthCDMEnums.ReferralRequest_Subject.Patient;
            ReferralRequestNumber = GenerateRandomNumber(8);
            RequestAgent          = (int)HealthCDMEnums.ReferralRequest_Requesteragent.Practitioner;
            OccurrenceType        = (int)HealthCDMEnums.ReferralRequest_Occurrencetype.Date;

            SampleDataCache.GenerateRandomDateTime rdt = new SampleDataCache.GenerateRandomDateTime(2017, 1, 1, (DateTime.Today.AddDays(90)));
            OccurrendateDate = rdt.Next();
        }
        public override void InitializeEntity()
        {
            EncounterClass = HealthCDMEnums.RandomEnumInt <HealthCDMEnums.Encounter_Class>();

            HospitalizationPreadmissionNumber = GenerateRandomNumber(12);
            EncounterIdentifier = GenerateRandomNumber(15);

            SampleDataCache.GenerateRandomDateTime rdt = new SampleDataCache.GenerateRandomDateTime(2017, 1, 1, DateTime.Today);

            DateTime startDate = rdt.Next();
            DateTime endDate   = rdt.AddYears(startDate, 1, 2);

            EncounterStartDate = startDate;
            EncounterEndDate   = endDate;
        }
Ejemplo n.º 10
0
        public override void InitializeEntity()
        {
            DosageDose         = int.Parse(GenerateRandomNumber(1));
            DosageRateQuantity = 1;

            DosageRateType = HealthCDMEnums.RandomEnumInt <HealthCDMEnums.Dosage_Dosetype>();

            SubjectType = (int)HealthCDMEnums.MedicationAdministration_Subjecttype.Patient;

            SampleDataCache.GenerateRandomDateTime rdt = new SampleDataCache.GenerateRandomDateTime(2017, 1, 1, DateTime.Today);

            DateTime startDate = rdt.Next();
            DateTime endDate   = rdt.AddDays(startDate, 10, 20);

            StartDate = startDate;
            EndDate   = endDate;
        }
Ejemplo n.º 11
0
        public override void InitializeEntity()
        {
            SampleDataCache.GenerateRandomDateTime rdt = new SampleDataCache.GenerateRandomDateTime(2010, 1, 1, DateTime.Today);

            receivedDateTime  = rdt.Next();
            collectedDateTime = rdt.Next();

            SpecimenNumber    = GenerateRandomNumber();
            AccessionNumber   = GenerateRandomNumber();
            SubjectType       = (int)HealthCDMEnums.Specimen_Subjecttype.Patient;
            CollectedType     = (int)HealthCDMEnums.Specimen_Collectioncollectedtype.Datetime;
            CollectedQuantity = int.Parse(GenerateRandomNumber(1));

            CollectedMethod = SampleDataCache.CodeableConcepts[HealthCDMEnums.CodeableConcept_Type.SpecimenCollectionMethod.ToString()]
                              .Values.ElementAt(SampleDataCache.SelectRandomItem.Next(0, SampleDataCache.CodeableConcepts[HealthCDMEnums.CodeableConcept_Type.SpecimenCollectionMethod.ToString()]
                                                                                      .Values.Count - 1)).Key;
        }
Ejemplo n.º 12
0
        public override void InitializeEntity()
        {
            DeviceNumber = GenerateDeviceNumber();
            Version      = GenerateDeviceVersion();
            Model        = SampleDataCache.DeviceModels[SampleDataCache.SelectRandomItem.Next(0, SampleDataCache.DeviceModels.Count - 1)];;
            Manufacturer = SampleDataCache.Manufacturers[SampleDataCache.SelectRandomItem.Next(0, SampleDataCache.Manufacturers.Count - 1)];;

            SampleDataCache.GenerateRandomDateTime rdt = new SampleDataCache.GenerateRandomDateTime(2017, 1, 1, new DateTime(2022, 1, 1));

            ExpirationDate   = rdt.Next();
            ManufacturedDate = rdt.Next();

            Name         = SampleDataCache.Devices[SampleDataCache.SelectRandomItem.Next(0, SampleDataCache.Devices.Count - 1)];
            DeviceStatus = HealthCDMEnums.RandomEnumInt <HealthCDMEnums.Device_Devicestatus>();

            CarrierAIDC = GenerateCarrierAIDC();
        }
        public override void InitializeEntity()
        {
            SampleDataCache.GenerateRandomDateTime rdt = new SampleDataCache.GenerateRandomDateTime(2017, 1, 1, DateTime.Today);

            orderName = SampleDataCache.NutrionOrders[SampleDataCache.SelectRandomItem.Next(0, SampleDataCache.NutrionOrders.Count - 1)];

            DateTime requestedDateTime = rdt.Next();

            orderDateTime = requestedDateTime;

            OrderStatus = HealthCDMEnums.RandomEnumInt <HealthCDMEnums.NutritionOrder_Status>();

            NutritioOrderNumber = GenerateRandomNumber(8);

            MaxVolumeToDeliver = int.Parse(GenerateRandomNumber(1));

            CaloricDensity = int.Parse(GenerateRandomNumber(2));
        }
        public override void InitializeEntity()
        {
            SampleDataCache.GenerateRandomDateTime rdt = new SampleDataCache.GenerateRandomDateTime(2010, 1, 1, DateTime.Today);

            DateTime startDate = rdt.Next();

            subjectType = (int)HealthCDMEnums.Condition_Subjecttype.Patient;
            OnsetDate   = startDate;

            Description = SampleDataCache.Conditions[SampleDataCache.SelectRandomItem.Next(0, SampleDataCache.Conditions.Count - 1)];
            OnsetType   = (int)HealthCDMEnums.Condition_Onsettype.Age;

            OnsetAge = int.Parse(GenerateRandomNumber(2));

            ContextType    = HealthCDMEnums.RandomEnumInt <HealthCDMEnums.Condition_Contexttype>();
            ClinicalStatus = HealthCDMEnums.RandomEnumInt <HealthCDMEnums.Condition_Clinicalstatus>();

            AsserterId = PatientId;
            AssertDate = DateTime.Now;
        }
        public override void InitializeEntity()
        {
            SampleDataCache.GenerateRandomDateTime rdt = new SampleDataCache.GenerateRandomDateTime(2017, 1, 1, DateTime.Today);

            DateTime startDate = rdt.Next();
            DateTime endDate   = rdt.AddHours(startDate, 1, 2);

            AppointmentStartDateTime = startDate;
            AppointmentEndDateTime   = endDate;

            ParticipantActorType = (int)HealthCDMEnums.AppointmentEMRParticipant_Participantactortype.Patient;
            ParticipantStatus    = (int)HealthCDMEnums.AppointmentEMR_Participantstatus.Accepted;

            Priority     = int.Parse(GenerateRandomNumber(1));
            PriorityCode = HealthCDMEnums.RandomEnumInt <HealthCDMEnums.AppointmentEMR_Prioritycode>();

            MinutesDuration = int.Parse(GenerateRandomNumber(2));

            Instructions      = "Enter through location specified to office";
            regardingObjectId = patientId;
        }
        public override void InitializeEntity()
        {
            SampleDataCache.GenerateRandomDateTime rdt = new SampleDataCache.GenerateRandomDateTime(2018, 1, 1, DateTime.Today);

            DateTime startDate = rdt.Next();
            DateTime endDate   = rdt.AddDays(startDate, 5, 10);

            StartDate = startDate;
            EndDate   = endDate;

            IssuedDate = rdt.Next();

            DeviceType = (int)HealthCDMEnums.Observation_Devicetype.Device;

            ValueTypeQuantityComparator = HealthCDMEnums.RandomEnumInt <HealthCDMEnums.Observation_Valuerationumeratorcomparator>();
            ValueTypeQuantityValue      = int.Parse(GenerateRandomNumber(2));

            EffectiveType     = (int)HealthCDMEnums.Observation_Effectivetype.Datetime;
            EffectiveDateTime = rdt.Next();

            ContextType = HealthCDMEnums.RandomEnumInt <HealthCDMEnums.Observation_Contexttype>();
        }
        public override void InitializeEntity()
        {
            Name           = SampleDataCache.Medications[SampleDataCache.SelectRandomItem.Next(0, SampleDataCache.Medications.Count - 1)];
            Status         = HealthCDMEnums.RandomEnumInt <HealthCDMEnums.MedicationRequest_Status>();
            Priority       = HealthCDMEnums.RandomEnumInt <HealthCDMEnums.MedicationRequest_Priority>();
            MedicationType = (int)HealthCDMEnums.MedicationRequest_Medicationtype.MedicationReference;

            SampleDataCache.GenerateRandomDateTime rdt = new SampleDataCache.GenerateRandomDateTime(2017, 1, 1, DateTime.Today);
            authoredOn = rdt.Next();

            SubjectType        = (int)HealthCDMEnums.MedicationRequest_Subjecttype.Patient;
            RequestorAgentType = (int)HealthCDMEnums.MedicationRequest_Requesteragenttype.Practitioner;
            intent             = HealthCDMEnums.RandomEnumInt <HealthCDMEnums.MedicationRequest_Intent>();

            DateTime startDate = rdt.Next();
            DateTime endDate   = rdt.AddYears(startDate, 1, 2);

            PeriodStartDate = startDate;
            PeriodEndDate   = endDate;

            Refills       = SampleDataCache.SelectRandomItem.Next(1, 3);
            DispenseCount = SampleDataCache.SelectRandomItem.Next(1, 2);
        }
Ejemplo n.º 18
0
        public static new List <Profile> GenerateProfilesByCount(int profiles, object configuration)
        {
            try
            {
                string accountsFile = (string)configuration;

                SampleDataCache.InitializeDataCache();
                SampleDataCache.GenerateRandomDateTime rdt = new SampleDataCache.GenerateRandomDateTime(2010, 1, 1, DateTime.Today);

                List <Profile>      listAccounts = new List <Profile>();
                List <Organization> listOrganizations;

                for (int i = 0; i < profiles; i++)
                {
                    Location a = new Location();

                    SampleDataCache.AddressInfo addressInfo = SampleDataCache.AddressInfos[SampleDataCache.SelectRandomItem.Next(0, SampleDataCache.AddressInfos.Count - 1)];

                    a.Name = SampleDataCache.Accounts[SampleDataCache.SelectRandomItem.Next(0, SampleDataCache.Accounts.Count - 1)];

                    a.Address1City            = addressInfo.City;
                    a.Address1Country         = addressInfo.Country;
                    a.Address1Line1           = addressInfo.Address;
                    a.Address1PostalCode      = addressInfo.Zipcode;
                    a.Address1StateOrProvince = addressInfo.State;

                    a.PeriodStart = rdt.Next();
                    a.PeriodEnd   = rdt.AddYears(a.PeriodStart, 5, 10);

                    a.AddressType = HealthCDMEnums.RandomEnumInt <HealthCDMEnums.Location_Addresstype>();
                    a.AddressUse  = HealthCDMEnums.RandomEnumInt <HealthCDMEnums.Location_Addressuse>();

                    a.LocationNumber = GenerateRandomNumber(10);

                    a.Mode = (int)HealthCDMEnums.Location_Mode.instance;
                    //a.OrganizationId = (string)configuration;

                    a.OperationalStatus = HealthCDMEnums.RandomEnumInt <HealthCDMEnums.Location_Operationalstatus>();

                    //a.LocationType = SampleDataCache.Accounts[SampleDataCache.SelectRandomItem.Next(0, SampleDataCache.Accounts.Count - 1)];
                    a.LocationType = SampleDataCache.CodeableConcepts[HealthCDMEnums.CodeableConcept_Type.LocationType.ToString()]
                                     .Values.ElementAt(SampleDataCache.SelectRandomItem.Next(0, SampleDataCache.CodeableConcepts[HealthCDMEnums.CodeableConcept_Type.LocationType.ToString()]
                                                                                             .Values.Count - 1)).Key;

                    if (!string.IsNullOrEmpty(accountsFile))
                    {
                        listOrganizations = Organization.ImportProfiles(accountsFile);

                        if (listOrganizations != null)
                        {
                            Organization account = listOrganizations[SampleDataCache.SelectRandomItem.Next(0, listOrganizations.Count - 1)];

                            a.OrganizationId = account.OrganizationId;
                        }
                    }

                    listAccounts.Add(a);
                }

                return(listAccounts);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.ToString());
            }
        }