/// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "classification":
                Classification = new Fhir.R4.Models.CodeableConcept();
                Classification.DeserializeJson(ref reader, options);
                break;

            case "frequencyOfOccurrence":
                FrequencyOfOccurrence = new Fhir.R4.Models.CodeableConcept();
                FrequencyOfOccurrence.DeserializeJson(ref reader, options);
                break;

            case "population":
                if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read()))
                {
                    throw new JsonException();
                }

                Population = new List <Population>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.Population objPopulation = new Fhir.R4.Models.Population();
                    objPopulation.DeserializeJson(ref reader, options);
                    Population.Add(objPopulation);

                    if (!reader.Read())
                    {
                        throw new JsonException();
                    }
                }

                if (Population.Count == 0)
                {
                    Population = null;
                }

                break;

            case "subject":
                if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read()))
                {
                    throw new JsonException();
                }

                Subject = new List <Reference>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.Reference objSubject = new Fhir.R4.Models.Reference();
                    objSubject.DeserializeJson(ref reader, options);
                    Subject.Add(objSubject);

                    if (!reader.Read())
                    {
                        throw new JsonException();
                    }
                }

                if (Subject.Count == 0)
                {
                    Subject = null;
                }

                break;

            case "symptomConditionEffect":
                SymptomConditionEffect = new Fhir.R4.Models.CodeableConcept();
                SymptomConditionEffect.DeserializeJson(ref reader, options);
                break;

            default:
                ((Fhir.R4.Models.DomainResource) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "comorbidity":
                if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read()))
                {
                    throw new JsonException();
                }

                Comorbidity = new List <CodeableConcept>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.CodeableConcept objComorbidity = new Fhir.R4.Models.CodeableConcept();
                    objComorbidity.DeserializeJson(ref reader, options);
                    Comorbidity.Add(objComorbidity);

                    if (!reader.Read())
                    {
                        throw new JsonException();
                    }
                }

                if (Comorbidity.Count == 0)
                {
                    Comorbidity = null;
                }

                break;

            case "diseaseStatus":
                DiseaseStatus = new Fhir.R4.Models.CodeableConcept();
                DiseaseStatus.DeserializeJson(ref reader, options);
                break;

            case "diseaseSymptomProcedure":
                DiseaseSymptomProcedure = new Fhir.R4.Models.CodeableConcept();
                DiseaseSymptomProcedure.DeserializeJson(ref reader, options);
                break;

            case "duration":
                Duration = new Fhir.R4.Models.Quantity();
                Duration.DeserializeJson(ref reader, options);
                break;

            case "intendedEffect":
                IntendedEffect = new Fhir.R4.Models.CodeableConcept();
                IntendedEffect.DeserializeJson(ref reader, options);
                break;

            case "otherTherapy":
                if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read()))
                {
                    throw new JsonException();
                }

                OtherTherapy = new List <MedicinalProductIndicationOtherTherapy>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.MedicinalProductIndicationOtherTherapy objOtherTherapy = new Fhir.R4.Models.MedicinalProductIndicationOtherTherapy();
                    objOtherTherapy.DeserializeJson(ref reader, options);
                    OtherTherapy.Add(objOtherTherapy);

                    if (!reader.Read())
                    {
                        throw new JsonException();
                    }
                }

                if (OtherTherapy.Count == 0)
                {
                    OtherTherapy = null;
                }

                break;

            case "population":
                if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read()))
                {
                    throw new JsonException();
                }

                Population = new List <Population>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.Population objPopulation = new Fhir.R4.Models.Population();
                    objPopulation.DeserializeJson(ref reader, options);
                    Population.Add(objPopulation);

                    if (!reader.Read())
                    {
                        throw new JsonException();
                    }
                }

                if (Population.Count == 0)
                {
                    Population = null;
                }

                break;

            case "subject":
                if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read()))
                {
                    throw new JsonException();
                }

                Subject = new List <Reference>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.Reference objSubject = new Fhir.R4.Models.Reference();
                    objSubject.DeserializeJson(ref reader, options);
                    Subject.Add(objSubject);

                    if (!reader.Read())
                    {
                        throw new JsonException();
                    }
                }

                if (Subject.Count == 0)
                {
                    Subject = null;
                }

                break;

            case "undesirableEffect":
                if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read()))
                {
                    throw new JsonException();
                }

                UndesirableEffect = new List <Reference>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.Reference objUndesirableEffect = new Fhir.R4.Models.Reference();
                    objUndesirableEffect.DeserializeJson(ref reader, options);
                    UndesirableEffect.Add(objUndesirableEffect);

                    if (!reader.Read())
                    {
                        throw new JsonException();
                    }
                }

                if (UndesirableEffect.Count == 0)
                {
                    UndesirableEffect = null;
                }

                break;

            default:
                ((Fhir.R4.Models.DomainResource) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }