Ejemplo n.º 1
0
        public async Task <IActionResult> Edit(int id, [Bind("VaccineTypeId,Name")] VaccineType vaccineType)
        {
            if (id != vaccineType.VaccineTypeId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(vaccineType);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!VaccineTypeExists(vaccineType.VaccineTypeId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(vaccineType));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 백신 예방접종 현황
        /// </summary>
        /// <param name="vaccineType">all, sido</param>
        /// <returns></returns>
        public List <Vaccine> GetVaccine(VaccineType vaccineType)
        {
            RequestParams = new Dictionary <string, string>()
            {
                { "list", $"{vaccineType.ToString().ToLower()}" },
            };

            return(RequestAPI.APICaller <List <Vaccine> >(this, Method.GET));
        }
Ejemplo n.º 3
0
        public async Task <IActionResult> Create([Bind("VaccineTypeId,Name")] VaccineType vaccineType)
        {
            if (ModelState.IsValid)
            {
                _context.Add(vaccineType);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(vaccineType));
        }
Ejemplo n.º 4
0
            public override IDeepCopyable CopyTo(IDeepCopyable other)
            {
                var dest = other as ImmunizationRecommendationRecommendationComponent;

                if (dest != null)
                {
                    base.CopyTo(dest);
                    if (DateElement != null)
                    {
                        dest.DateElement = (Hl7.Fhir.Model.FhirDateTime)DateElement.DeepCopy();
                    }
                    if (VaccineType != null)
                    {
                        dest.VaccineType = (Hl7.Fhir.Model.CodeableConcept)VaccineType.DeepCopy();
                    }
                    if (DoseNumberElement != null)
                    {
                        dest.DoseNumberElement = (Hl7.Fhir.Model.PositiveInt)DoseNumberElement.DeepCopy();
                    }
                    if (ForecastStatus != null)
                    {
                        dest.ForecastStatus = (Hl7.Fhir.Model.CodeableConcept)ForecastStatus.DeepCopy();
                    }
                    if (DateCriterion != null)
                    {
                        dest.DateCriterion = new List <Hl7.Fhir.Model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent>(DateCriterion.DeepCopy());
                    }
                    if (Protocol != null)
                    {
                        dest.Protocol = (Hl7.Fhir.Model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationProtocolComponent)Protocol.DeepCopy();
                    }
                    if (SupportingImmunization != null)
                    {
                        dest.SupportingImmunization = new List <Hl7.Fhir.Model.ResourceReference>(SupportingImmunization.DeepCopy());
                    }
                    if (SupportingPatientInformation != null)
                    {
                        dest.SupportingPatientInformation = new List <Hl7.Fhir.Model.ResourceReference>(SupportingPatientInformation.DeepCopy());
                    }
                    return(dest);
                }
                else
                {
                    throw new ArgumentException("Can only copy to an object of the same type", "other");
                }
            }
Ejemplo n.º 5
0
            public override ErrorList Validate()
            {
                var result = new ErrorList();

                result.AddRange(base.Validate());

                if (RecommendationDateElement != null)
                {
                    result.AddRange(RecommendationDateElement.Validate());
                }
                if (VaccineType != null)
                {
                    result.AddRange(VaccineType.Validate());
                }
                if (DoseNumberElement != null)
                {
                    result.AddRange(DoseNumberElement.Validate());
                }
                if (ForecastStatusElement != null)
                {
                    result.AddRange(ForecastStatusElement.Validate());
                }
                if (DateCriterion != null)
                {
                    DateCriterion.ForEach(elem => result.AddRange(elem.Validate()));
                }
                if (Protocol != null)
                {
                    result.AddRange(Protocol.Validate());
                }
                if (SupportingImmunization != null)
                {
                    SupportingImmunization.ForEach(elem => result.AddRange(elem.Validate()));
                }
                if (SupportingAdverseEventReport != null)
                {
                    SupportingAdverseEventReport.ForEach(elem => result.AddRange(elem.Validate()));
                }
                if (SupportingPatientObservation != null)
                {
                    SupportingPatientObservation.ForEach(elem => result.AddRange(elem.Validate()));
                }

                return(result);
            }
        /// <summary>
        /// Validate the SCS Content for the Vaccine Cancellation Entry Component
        /// </summary>
        /// <param name="path">The path to this object as a string</param>
        /// <param name="messages">the validation messages, these may be added to within this method</param>
        public void Validate(string path, List <ValidationMessage> messages)
        {
            var vb = new ValidationBuilder(path, messages);


            if (vb.ArgumentRequiredCheck("VaccineType", VaccineType))
            {
                VaccineType.Validate("VaccineType", messages);
            }

            if (MedicareAntigenCode != null)
            {
                for (var x = 0; x < MedicareAntigenCode.Count; x++)
                {
                    MedicareAntigenCode[x].Validate(vb.Path + string.Format("MedicareAntigenCode[{0}]", x), vb.Messages);
                }
            }
        }
Ejemplo n.º 7
0
        private static void MockBCG(List <Vaccine> vaccines, Schema schemaHealthDept, Schema schemaPrivateClinic, List <SchemaVaccine> vaccineSchemaHealthDept, List <SchemaVaccine> vaccineSchemaPrivateClinic)
        {
            Vaccine vaccine = vaccines.FirstOrDefault(v => v.Name == "BCG");

            if (vaccine != null)
            {
                VaccineType vaccineType = vaccine.VaccineTypes.First(t => t.Name == "BGC");

                vaccineSchemaHealthDept.Add(new SchemaVaccine()
                {
                    SchemaId            = schemaHealthDept.SchemaId,
                    VaccineId           = vaccine.VaccineId,
                    VaccineName         = vaccine.Name,
                    VaccineTypeGroup    = "1",
                    VaccineTypeId       = vaccineType.VaccineTypeId,
                    VaccineTypeName     = vaccineType.Name,
                    DoseName            = "Dose Única",
                    DateName            = "Recem Nascidos",
                    DaysToStartOfPeriod = 0,
                    DaysToEndOfPeriod   = 2
                });

                vaccineSchemaPrivateClinic.Add(new SchemaVaccine()
                {
                    SchemaId            = schemaHealthDept.SchemaId,
                    VaccineId           = vaccine.VaccineId,
                    VaccineName         = vaccine.Name,
                    VaccineTypeGroup    = "1",
                    VaccineTypeId       = vaccineType.VaccineTypeId,
                    VaccineTypeName     = vaccineType.Name,
                    DoseName            = "Dose Única",
                    DateName            = "Recem Nascidos",
                    DaysToStartOfPeriod = 0,
                    DaysToEndOfPeriod   = 2
                });
            }
        }
Ejemplo n.º 8
0
 /// <summary>
 /// 예방접종 1,2차 현황
 /// </summary>
 /// <param name="vaccineType">all, sido</param>
 public List <Vaccine> GetVaccine(VaccineType vaccineType) => VaccineAPI.GetVaccine(vaccineType);
Ejemplo n.º 9
0
        private static void MockPolio(List <Vaccine> vaccines, Schema schemaHealthDept, Schema schemaPrivateClinic, List <SchemaVaccine> vaccineSchemaHealthDept, List <SchemaVaccine> vaccineSchemaPrivateClinic)
        {
            Vaccine vaccine = vaccines.FirstOrDefault(v => v.Name == "Poliomielite");

            if (vaccine != null)
            {
                VaccineType typeVIP = vaccine.VaccineTypes.First(t => t.Name == "VIP");
                VaccineType typeVOP = vaccine.VaccineTypes.First(t => t.Name == "VOP");

                #region Public Health Deptment Alternative 1
                vaccineSchemaHealthDept.Add(new SchemaVaccine()
                {
                    SchemaId            = schemaHealthDept.SchemaId,
                    VaccineId           = vaccine.VaccineId,
                    VaccineName         = vaccine.Name,
                    VaccineTypeGroup    = "1",
                    VaccineTypeId       = typeVIP.VaccineTypeId,
                    VaccineTypeName     = typeVIP.Name,
                    DoseName            = "1a Dose",
                    DateName            = "2 meses",
                    DaysToStartOfPeriod = 60,
                    DaysToEndOfPeriod   = 89
                });

                vaccineSchemaHealthDept.Add(new SchemaVaccine()
                {
                    SchemaId            = schemaHealthDept.SchemaId,
                    VaccineId           = vaccine.VaccineId,
                    VaccineName         = vaccine.Name,
                    VaccineTypeGroup    = "1",
                    VaccineTypeId       = typeVIP.VaccineTypeId,
                    VaccineTypeName     = typeVIP.Name,
                    DoseName            = "2a Dose",
                    DateName            = "4 meses",
                    DaysToStartOfPeriod = 120,
                    DaysToEndOfPeriod   = 149
                });

                vaccineSchemaHealthDept.Add(new SchemaVaccine()
                {
                    SchemaId            = schemaHealthDept.SchemaId,
                    VaccineId           = vaccine.VaccineId,
                    VaccineName         = vaccine.Name,
                    VaccineTypeGroup    = "1",
                    VaccineTypeId       = typeVIP.VaccineTypeId,
                    VaccineTypeName     = typeVIP.Name,
                    DoseName            = "3a Dose",
                    DateName            = "6 meses",
                    DaysToStartOfPeriod = 180,
                    DaysToEndOfPeriod   = 209
                });

                vaccineSchemaHealthDept.Add(new SchemaVaccine()
                {
                    SchemaId            = schemaHealthDept.SchemaId,
                    VaccineId           = vaccine.VaccineId,
                    VaccineName         = vaccine.Name,
                    VaccineTypeGroup    = "1",
                    VaccineTypeId       = typeVOP.VaccineTypeId,
                    VaccineTypeName     = typeVOP.Name,
                    DoseName            = "Reforço",
                    DateName            = "15 a 18 meses",
                    DaysToStartOfPeriod = 450,
                    DaysToEndOfPeriod   = 539
                });

                vaccineSchemaHealthDept.Add(new SchemaVaccine()
                {
                    SchemaId            = schemaHealthDept.SchemaId,
                    VaccineId           = vaccine.VaccineId,
                    VaccineName         = vaccine.Name,
                    VaccineTypeGroup    = "1",
                    VaccineTypeId       = typeVOP.VaccineTypeId,
                    VaccineTypeName     = typeVOP.Name,
                    DoseName            = "Reforço",
                    DateName            = "4 a 5 anos",
                    DaysToStartOfPeriod = 1460,
                    DaysToEndOfPeriod   = 2189
                });

                #endregion

                #region Public Health Deptment Alternative 1
                vaccineSchemaPrivateClinic.Add(new SchemaVaccine()
                {
                    SchemaId            = schemaHealthDept.SchemaId,
                    VaccineId           = vaccine.VaccineId,
                    VaccineName         = vaccine.Name,
                    VaccineTypeGroup    = "1",
                    VaccineTypeId       = typeVIP.VaccineTypeId,
                    VaccineTypeName     = typeVIP.Name,
                    DoseName            = "1a Dose",
                    DateName            = "2 meses",
                    DaysToStartOfPeriod = 60,
                    DaysToEndOfPeriod   = 89
                });

                vaccineSchemaPrivateClinic.Add(new SchemaVaccine()
                {
                    SchemaId            = schemaHealthDept.SchemaId,
                    VaccineId           = vaccine.VaccineId,
                    VaccineName         = vaccine.Name,
                    VaccineTypeGroup    = "1",
                    VaccineTypeId       = typeVIP.VaccineTypeId,
                    VaccineTypeName     = typeVIP.Name,
                    DoseName            = "2a Dose",
                    DateName            = "4 meses",
                    DaysToStartOfPeriod = 120,
                    DaysToEndOfPeriod   = 149
                });

                vaccineSchemaPrivateClinic.Add(new SchemaVaccine()
                {
                    SchemaId            = schemaHealthDept.SchemaId,
                    VaccineId           = vaccine.VaccineId,
                    VaccineName         = vaccine.Name,
                    VaccineTypeGroup    = "1",
                    VaccineTypeId       = typeVIP.VaccineTypeId,
                    VaccineTypeName     = typeVIP.Name,
                    DoseName            = "3a Dose",
                    DateName            = "6 meses",
                    DaysToStartOfPeriod = 180,
                    DaysToEndOfPeriod   = 209
                });

                vaccineSchemaPrivateClinic.Add(new SchemaVaccine()
                {
                    SchemaId            = schemaHealthDept.SchemaId,
                    VaccineId           = vaccine.VaccineId,
                    VaccineName         = vaccine.Name,
                    VaccineTypeGroup    = "1",
                    VaccineTypeId       = typeVIP.VaccineTypeId,
                    VaccineTypeName     = typeVIP.Name,
                    DoseName            = "Reforço",
                    DateName            = "15 a 18 meses",
                    DaysToStartOfPeriod = 450,
                    DaysToEndOfPeriod   = 539
                });

                vaccineSchemaPrivateClinic.Add(new SchemaVaccine()
                {
                    SchemaId            = schemaHealthDept.SchemaId,
                    VaccineId           = vaccine.VaccineId,
                    VaccineName         = vaccine.Name,
                    VaccineTypeGroup    = "1",
                    VaccineTypeId       = typeVIP.VaccineTypeId,
                    VaccineTypeName     = typeVIP.Name,
                    DoseName            = "Reforço",
                    DateName            = "4 a 5 anos",
                    DaysToStartOfPeriod = 1460,
                    DaysToEndOfPeriod   = 2189
                });

                #endregion
            }
        }
Ejemplo n.º 10
0
        private static void MockTripliceBact(List <Vaccine> vaccines, Schema schemaHealthDept, Schema schemaPrivateClinic, List <SchemaVaccine> vaccineSchemaHealthDept, List <SchemaVaccine> vaccineSchemaPrivateClinic)
        {
            Vaccine vaccine = vaccines.FirstOrDefault(v => v.Name == "Tríplice Bacteriana");

            if (vaccine != null)
            {
                VaccineType typeDTPw = vaccine.VaccineTypes.First(t => t.Name == "DTPw");
                VaccineType typeDTPa = vaccine.VaccineTypes.First(t => t.Name == "DTPa");
                VaccineType typedTpa = vaccine.VaccineTypes.First(t => t.Name == "dTpa");

                #region Public Health Deptment Alternative 1
                vaccineSchemaHealthDept.Add(new SchemaVaccine()
                {
                    SchemaId            = schemaHealthDept.SchemaId,
                    VaccineId           = vaccine.VaccineId,
                    VaccineName         = vaccine.Name,
                    VaccineTypeGroup    = "1",
                    VaccineTypeId       = typeDTPw.VaccineTypeId,
                    VaccineTypeName     = typeDTPw.Name,
                    DoseName            = "1a Dose",
                    DateName            = "2 meses",
                    DaysToStartOfPeriod = 60,
                    DaysToEndOfPeriod   = 89
                });

                vaccineSchemaHealthDept.Add(new SchemaVaccine()
                {
                    SchemaId            = schemaHealthDept.SchemaId,
                    VaccineId           = vaccine.VaccineId,
                    VaccineName         = vaccine.Name,
                    VaccineTypeGroup    = "1",
                    VaccineTypeId       = typeDTPw.VaccineTypeId,
                    VaccineTypeName     = typeDTPw.Name,
                    DoseName            = "2a Dose",
                    DateName            = "4 meses",
                    DaysToStartOfPeriod = 120,
                    DaysToEndOfPeriod   = 149
                });

                vaccineSchemaHealthDept.Add(new SchemaVaccine()
                {
                    SchemaId            = schemaHealthDept.SchemaId,
                    VaccineId           = vaccine.VaccineId,
                    VaccineName         = vaccine.Name,
                    VaccineTypeGroup    = "1",
                    VaccineTypeId       = typeDTPw.VaccineTypeId,
                    VaccineTypeName     = typeDTPw.Name,
                    DoseName            = "3a Dose",
                    DateName            = "6 meses",
                    DaysToStartOfPeriod = 180,
                    DaysToEndOfPeriod   = 209
                });

                vaccineSchemaHealthDept.Add(new SchemaVaccine()
                {
                    SchemaId            = schemaHealthDept.SchemaId,
                    VaccineId           = vaccine.VaccineId,
                    VaccineName         = vaccine.Name,
                    VaccineTypeGroup    = "1",
                    VaccineTypeId       = typeDTPw.VaccineTypeId,
                    VaccineTypeName     = typeDTPw.Name,
                    DoseName            = "Reforço",
                    DateName            = "4 a 5 anos",
                    DaysToStartOfPeriod = 1460,
                    DaysToEndOfPeriod   = 2189
                });

                vaccineSchemaHealthDept.Add(new SchemaVaccine()
                {
                    SchemaId            = schemaHealthDept.SchemaId,
                    VaccineId           = vaccine.VaccineId,
                    VaccineName         = vaccine.Name,
                    VaccineTypeGroup    = "1",
                    VaccineTypeId       = typedTpa.VaccineTypeId,
                    VaccineTypeName     = typedTpa.Name,
                    DoseName            = "Reforço",
                    DateName            = "9 a 10 anos",
                    DaysToStartOfPeriod = 3285,
                    DaysToEndOfPeriod   = 4014
                });

                #endregion

                #region Public Health Deptment Alternative 1
                vaccineSchemaPrivateClinic.Add(new SchemaVaccine()
                {
                    SchemaId            = schemaHealthDept.SchemaId,
                    VaccineId           = vaccine.VaccineId,
                    VaccineName         = vaccine.Name,
                    VaccineTypeGroup    = "1",
                    VaccineTypeId       = typeDTPa.VaccineTypeId,
                    VaccineTypeName     = typedTpa.Name,
                    DoseName            = "1a Dose",
                    DateName            = "2 meses",
                    DaysToStartOfPeriod = 60,
                    DaysToEndOfPeriod   = 89
                });

                vaccineSchemaPrivateClinic.Add(new SchemaVaccine()
                {
                    SchemaId            = schemaHealthDept.SchemaId,
                    VaccineId           = vaccine.VaccineId,
                    VaccineName         = vaccine.Name,
                    VaccineTypeGroup    = "1",
                    VaccineTypeId       = typeDTPa.VaccineTypeId,
                    VaccineTypeName     = typedTpa.Name,
                    DoseName            = "2a Dose",
                    DateName            = "4 meses",
                    DaysToStartOfPeriod = 120,
                    DaysToEndOfPeriod   = 149
                });

                vaccineSchemaPrivateClinic.Add(new SchemaVaccine()
                {
                    SchemaId            = schemaHealthDept.SchemaId,
                    VaccineId           = vaccine.VaccineId,
                    VaccineName         = vaccine.Name,
                    VaccineTypeGroup    = "1",
                    VaccineTypeId       = typeDTPa.VaccineTypeId,
                    VaccineTypeName     = typedTpa.Name,
                    DoseName            = "3a Dose",
                    DateName            = "6 meses",
                    DaysToStartOfPeriod = 180,
                    DaysToEndOfPeriod   = 209
                });

                vaccineSchemaPrivateClinic.Add(new SchemaVaccine()
                {
                    SchemaId            = schemaHealthDept.SchemaId,
                    VaccineId           = vaccine.VaccineId,
                    VaccineName         = vaccine.Name,
                    VaccineTypeGroup    = "1",
                    VaccineTypeId       = typeDTPa.VaccineTypeId,
                    VaccineTypeName     = typedTpa.Name,
                    DoseName            = "Reforço",
                    DateName            = "4 a 5 anos",
                    DaysToStartOfPeriod = 1460,
                    DaysToEndOfPeriod   = 2189
                });

                vaccineSchemaPrivateClinic.Add(new SchemaVaccine()
                {
                    SchemaId            = schemaHealthDept.SchemaId,
                    VaccineId           = vaccine.VaccineId,
                    VaccineName         = vaccine.Name,
                    VaccineTypeGroup    = "1",
                    VaccineTypeId       = typedTpa.VaccineTypeId,
                    VaccineTypeName     = typedTpa.Name,
                    DoseName            = "Reforço",
                    DateName            = "9 a 10 anos",
                    DaysToStartOfPeriod = 3285,
                    DaysToEndOfPeriod   = 4014
                });

                #endregion
            }
        }
Ejemplo n.º 11
0
        private static void MockHepatiteB(List <Vaccine> vaccines, Schema schemaHealthDept, Schema schemaPrivateClinic, List <SchemaVaccine> vaccineSchemaHealthDept, List <SchemaVaccine> vaccineSchemaPrivateClinic)
        {
            Vaccine vaccine = vaccines.FirstOrDefault(v => v.Name == "HEPATITE B");

            if (vaccine != null)
            {
                VaccineType typeHB          = vaccine.VaccineTypes.First(t => t.Name == "HB");
                VaccineType typeHBcombinada = vaccine.VaccineTypes.First(t => t.Name == "HB Combinada");

                #region Public Health Deptment Alternative 1
                vaccineSchemaHealthDept.Add(new SchemaVaccine()
                {
                    SchemaId            = schemaHealthDept.SchemaId,
                    VaccineId           = vaccine.VaccineId,
                    VaccineName         = vaccine.Name,
                    VaccineTypeGroup    = "1",
                    VaccineTypeId       = typeHB.VaccineTypeId,
                    VaccineTypeName     = typeHB.Name,
                    DoseName            = "1a Dose",
                    DateName            = "Recem Nascidos",
                    DaysToStartOfPeriod = 0,
                    DaysToEndOfPeriod   = 2
                });

                vaccineSchemaHealthDept.Add(new SchemaVaccine()
                {
                    SchemaId            = schemaHealthDept.SchemaId,
                    VaccineId           = vaccine.VaccineId,
                    VaccineName         = vaccine.Name,
                    VaccineTypeGroup    = "1",
                    VaccineTypeId       = typeHB.VaccineTypeId,
                    VaccineTypeName     = typeHB.Name,
                    DoseName            = "2a Dose",
                    DateName            = "2 meses",
                    DaysToStartOfPeriod = 60,
                    DaysToEndOfPeriod   = 89
                });

                vaccineSchemaHealthDept.Add(new SchemaVaccine()
                {
                    SchemaId            = schemaHealthDept.SchemaId,
                    VaccineId           = vaccine.VaccineId,
                    VaccineName         = vaccine.Name,
                    VaccineTypeGroup    = "1",
                    VaccineTypeId       = typeHB.VaccineTypeId,
                    VaccineTypeName     = typeHB.Name,
                    DoseName            = "3a Dose",
                    DateName            = "6 meses",
                    DaysToStartOfPeriod = 180,
                    DaysToEndOfPeriod   = 209
                });

                #endregion


                #region Public Health Deptment Alternative 2
                vaccineSchemaHealthDept.Add(new SchemaVaccine()
                {
                    SchemaId            = schemaHealthDept.SchemaId,
                    VaccineId           = vaccine.VaccineId,
                    VaccineName         = vaccine.Name,
                    VaccineTypeGroup    = "2",
                    VaccineTypeId       = typeHB.VaccineTypeId,
                    VaccineTypeName     = typeHB.Name,
                    DoseName            = "1a Dose",
                    DateName            = "Recem Nascidos",
                    DaysToStartOfPeriod = 0,
                    DaysToEndOfPeriod   = 2
                });

                vaccineSchemaHealthDept.Add(new SchemaVaccine()
                {
                    SchemaId            = schemaHealthDept.SchemaId,
                    VaccineId           = vaccine.VaccineId,
                    VaccineName         = vaccine.Name,
                    VaccineTypeGroup    = "2",
                    VaccineTypeId       = typeHB.VaccineTypeId,
                    VaccineTypeName     = typeHB.Name,
                    DoseName            = "2a Dose",
                    DateName            = "2 meses",
                    DaysToStartOfPeriod = 60,
                    DaysToEndOfPeriod   = 89
                });

                vaccineSchemaHealthDept.Add(new SchemaVaccine()
                {
                    SchemaId            = schemaHealthDept.SchemaId,
                    VaccineId           = vaccine.VaccineId,
                    VaccineName         = vaccine.Name,
                    VaccineTypeGroup    = "2",
                    VaccineTypeId       = typeHB.VaccineTypeId,
                    VaccineTypeName     = typeHB.Name,
                    DoseName            = "Dose Opcional",
                    Optional            = true,
                    DateName            = "4 meses",
                    DaysToStartOfPeriod = 120,
                    DaysToEndOfPeriod   = 149
                });

                vaccineSchemaHealthDept.Add(new SchemaVaccine()
                {
                    SchemaId            = schemaHealthDept.SchemaId,
                    VaccineId           = vaccine.VaccineId,
                    VaccineName         = vaccine.Name,
                    VaccineTypeGroup    = "2",
                    VaccineTypeId       = typeHB.VaccineTypeId,
                    VaccineTypeName     = typeHB.Name,
                    DoseName            = "3a Dose",
                    DateName            = "6 meses",
                    DaysToStartOfPeriod = 180,
                    DaysToEndOfPeriod   = 209
                });

                #endregion


                #region Private Clinic Alternative 1
                vaccineSchemaPrivateClinic.Add(new SchemaVaccine()
                {
                    SchemaId            = schemaHealthDept.SchemaId,
                    VaccineId           = vaccine.VaccineId,
                    VaccineName         = vaccine.Name,
                    VaccineTypeGroup    = "1",
                    VaccineTypeId       = typeHB.VaccineTypeId,
                    VaccineTypeName     = typeHB.Name,
                    DoseName            = "1a Dose",
                    DateName            = "Recem Nascidos",
                    DaysToStartOfPeriod = 0,
                    DaysToEndOfPeriod   = 2
                });

                vaccineSchemaPrivateClinic.Add(new SchemaVaccine()
                {
                    SchemaId            = schemaHealthDept.SchemaId,
                    VaccineId           = vaccine.VaccineId,
                    VaccineName         = vaccine.Name,
                    VaccineTypeGroup    = "1",
                    VaccineTypeId       = typeHB.VaccineTypeId,
                    VaccineTypeName     = typeHB.Name,
                    DoseName            = "2a Dose",
                    DateName            = "2 meses",
                    DaysToStartOfPeriod = 60,
                    DaysToEndOfPeriod   = 89
                });

                vaccineSchemaPrivateClinic.Add(new SchemaVaccine()
                {
                    SchemaId            = schemaHealthDept.SchemaId,
                    VaccineId           = vaccine.VaccineId,
                    VaccineName         = vaccine.Name,
                    VaccineTypeGroup    = "1",
                    VaccineTypeId       = typeHB.VaccineTypeId,
                    VaccineTypeName     = typeHB.Name,
                    DoseName            = "3a Dose",
                    DateName            = "6 meses",
                    DaysToStartOfPeriod = 180,
                    DaysToEndOfPeriod   = 209
                });

                #endregion


                #region Private Clinic Alternative 2
                vaccineSchemaPrivateClinic.Add(new SchemaVaccine()
                {
                    SchemaId            = schemaHealthDept.SchemaId,
                    VaccineId           = vaccine.VaccineId,
                    VaccineName         = vaccine.Name,
                    VaccineTypeGroup    = "2",
                    VaccineTypeId       = typeHB.VaccineTypeId,
                    VaccineTypeName     = typeHB.Name,
                    DoseName            = "1a Dose",
                    DateName            = "Recem Nascidos",
                    DaysToStartOfPeriod = 0,
                    DaysToEndOfPeriod   = 2
                });

                vaccineSchemaPrivateClinic.Add(new SchemaVaccine()
                {
                    SchemaId            = schemaHealthDept.SchemaId,
                    VaccineId           = vaccine.VaccineId,
                    VaccineName         = vaccine.Name,
                    VaccineTypeGroup    = "2",
                    VaccineTypeId       = typeHB.VaccineTypeId,
                    VaccineTypeName     = typeHB.Name,
                    DoseName            = "2a Dose",
                    DateName            = "2 meses",
                    DaysToStartOfPeriod = 60,
                    DaysToEndOfPeriod   = 89
                });

                vaccineSchemaPrivateClinic.Add(new SchemaVaccine()
                {
                    SchemaId            = schemaHealthDept.SchemaId,
                    VaccineId           = vaccine.VaccineId,
                    VaccineName         = vaccine.Name,
                    VaccineTypeGroup    = "2",
                    VaccineTypeId       = typeHB.VaccineTypeId,
                    VaccineTypeName     = typeHB.Name,
                    DoseName            = "Dose Opcional",
                    Optional            = true,
                    DateName            = "4 meses",
                    DaysToStartOfPeriod = 120,
                    DaysToEndOfPeriod   = 149
                });

                vaccineSchemaPrivateClinic.Add(new SchemaVaccine()
                {
                    SchemaId            = schemaHealthDept.SchemaId,
                    VaccineId           = vaccine.VaccineId,
                    VaccineName         = vaccine.Name,
                    VaccineTypeGroup    = "2",
                    VaccineTypeId       = typeHB.VaccineTypeId,
                    VaccineTypeName     = typeHB.Name,
                    DoseName            = "3a Dose",
                    DateName            = "6 meses",
                    DaysToStartOfPeriod = 180,
                    DaysToEndOfPeriod   = 209
                });

                #endregion
            }
        }
Ejemplo n.º 12
0
        public override ErrorList Validate()
        {
            var result = new ErrorList();

            result.AddRange(base.Validate());

            if (DateElement != null)
            {
                result.AddRange(DateElement.Validate());
            }
            if (VaccineType != null)
            {
                result.AddRange(VaccineType.Validate());
            }
            if (Subject != null)
            {
                result.AddRange(Subject.Validate());
            }
            if (RefusedIndicatorElement != null)
            {
                result.AddRange(RefusedIndicatorElement.Validate());
            }
            if (ReportedElement != null)
            {
                result.AddRange(ReportedElement.Validate());
            }
            if (Performer != null)
            {
                result.AddRange(Performer.Validate());
            }
            if (Requester != null)
            {
                result.AddRange(Requester.Validate());
            }
            if (Manufacturer != null)
            {
                result.AddRange(Manufacturer.Validate());
            }
            if (Location != null)
            {
                result.AddRange(Location.Validate());
            }
            if (LotNumberElement != null)
            {
                result.AddRange(LotNumberElement.Validate());
            }
            if (ExpirationDateElement != null)
            {
                result.AddRange(ExpirationDateElement.Validate());
            }
            if (Site != null)
            {
                result.AddRange(Site.Validate());
            }
            if (Route != null)
            {
                result.AddRange(Route.Validate());
            }
            if (DoseQuantity != null)
            {
                result.AddRange(DoseQuantity.Validate());
            }
            if (Explanation != null)
            {
                result.AddRange(Explanation.Validate());
            }
            if (Reaction != null)
            {
                Reaction.ForEach(elem => result.AddRange(elem.Validate()));
            }
            if (VaccinationProtocol != null)
            {
                result.AddRange(VaccinationProtocol.Validate());
            }

            return(result);
        }
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as Immunization;

            if (dest != null)
            {
                base.CopyTo(dest);
                if (Identifier != null)
                {
                    dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy());
                }
                if (DateElement != null)
                {
                    dest.DateElement = (Hl7.Fhir.Model.FhirDateTime)DateElement.DeepCopy();
                }
                if (VaccineType != null)
                {
                    dest.VaccineType = (Hl7.Fhir.Model.CodeableConcept)VaccineType.DeepCopy();
                }
                if (Patient != null)
                {
                    dest.Patient = (Hl7.Fhir.Model.ResourceReference)Patient.DeepCopy();
                }
                if (WasNotGivenElement != null)
                {
                    dest.WasNotGivenElement = (Hl7.Fhir.Model.FhirBoolean)WasNotGivenElement.DeepCopy();
                }
                if (ReportedElement != null)
                {
                    dest.ReportedElement = (Hl7.Fhir.Model.FhirBoolean)ReportedElement.DeepCopy();
                }
                if (Performer != null)
                {
                    dest.Performer = (Hl7.Fhir.Model.ResourceReference)Performer.DeepCopy();
                }
                if (Requester != null)
                {
                    dest.Requester = (Hl7.Fhir.Model.ResourceReference)Requester.DeepCopy();
                }
                if (Encounter != null)
                {
                    dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy();
                }
                if (Manufacturer != null)
                {
                    dest.Manufacturer = (Hl7.Fhir.Model.ResourceReference)Manufacturer.DeepCopy();
                }
                if (Location != null)
                {
                    dest.Location = (Hl7.Fhir.Model.ResourceReference)Location.DeepCopy();
                }
                if (LotNumberElement != null)
                {
                    dest.LotNumberElement = (Hl7.Fhir.Model.FhirString)LotNumberElement.DeepCopy();
                }
                if (ExpirationDateElement != null)
                {
                    dest.ExpirationDateElement = (Hl7.Fhir.Model.Date)ExpirationDateElement.DeepCopy();
                }
                if (Site != null)
                {
                    dest.Site = (Hl7.Fhir.Model.CodeableConcept)Site.DeepCopy();
                }
                if (Route != null)
                {
                    dest.Route = (Hl7.Fhir.Model.CodeableConcept)Route.DeepCopy();
                }
                if (DoseQuantity != null)
                {
                    dest.DoseQuantity = (Hl7.Fhir.Model.Quantity)DoseQuantity.DeepCopy();
                }
                if (Explanation != null)
                {
                    dest.Explanation = (Hl7.Fhir.Model.Immunization.ImmunizationExplanationComponent)Explanation.DeepCopy();
                }
                if (Reaction != null)
                {
                    dest.Reaction = new List <Hl7.Fhir.Model.Immunization.ImmunizationReactionComponent>(Reaction.DeepCopy());
                }
                if (VaccinationProtocol != null)
                {
                    dest.VaccinationProtocol = new List <Hl7.Fhir.Model.Immunization.ImmunizationVaccinationProtocolComponent>(VaccinationProtocol.DeepCopy());
                }
                return(dest);
            }
            else
            {
                throw new ArgumentException("Can only copy to an object of the same type", "other");
            }
        }