Ejemplo n.º 1
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "description":
                Description = reader.GetString();
                break;

            case "_description":
                _Description = new fhirCsR4.Models.Element();
                _Description.DeserializeJson(ref reader, options);
                break;

            case "name":
                Name = reader.GetString();
                break;

            case "_name":
                _Name = new fhirCsR4.Models.Element();
                _Name.DeserializeJson(ref reader, options);
                break;

            case "type":
                Type = new fhirCsR4.Models.CodeableConcept();
                Type.DeserializeJson(ref reader, options);
                break;

            default:
                ((fhirCsR4.Models.BackboneElement) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "ageRange":
                AgeRange = new fhirCsR4.Models.Range();
                AgeRange.DeserializeJson(ref reader, options);
                break;

            case "ageCodeableConcept":
                AgeCodeableConcept = new fhirCsR4.Models.CodeableConcept();
                AgeCodeableConcept.DeserializeJson(ref reader, options);
                break;

            case "gender":
                Gender = new fhirCsR4.Models.CodeableConcept();
                Gender.DeserializeJson(ref reader, options);
                break;

            case "physiologicalCondition":
                PhysiologicalCondition = new fhirCsR4.Models.CodeableConcept();
                PhysiologicalCondition.DeserializeJson(ref reader, options);
                break;

            case "race":
                Race = new fhirCsR4.Models.CodeableConcept();
                Race.DeserializeJson(ref reader, options);
                break;

            default:
                ((fhirCsR4.Models.BackboneElement) 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 "application":
                if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read()))
                {
                    throw new JsonException();
                }

                Application = new List <MedicinalProductAuthorizationProcedure>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    fhirCsR4.Models.MedicinalProductAuthorizationProcedure objApplication = new fhirCsR4.Models.MedicinalProductAuthorizationProcedure();
                    objApplication.DeserializeJson(ref reader, options);
                    Application.Add(objApplication);

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

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

                break;

            case "datePeriod":
                DatePeriod = new fhirCsR4.Models.Period();
                DatePeriod.DeserializeJson(ref reader, options);
                break;

            case "dateDateTime":
                DateDateTime = reader.GetString();
                break;

            case "_dateDateTime":
                _DateDateTime = new fhirCsR4.Models.Element();
                _DateDateTime.DeserializeJson(ref reader, options);
                break;

            case "identifier":
                Identifier = new fhirCsR4.Models.Identifier();
                Identifier.DeserializeJson(ref reader, options);
                break;

            case "type":
                Type = new fhirCsR4.Models.CodeableConcept();
                Type.DeserializeJson(ref reader, options);
                break;

            default:
                ((fhirCsR4.Models.BackboneElement) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "conversionFactor":
                ConversionFactor = reader.GetDecimal();
                break;

            case "_conversionFactor":
                _ConversionFactor = new fhirCsR4.Models.Element();
                _ConversionFactor.DeserializeJson(ref reader, options);
                break;

            case "customaryUnit":
                CustomaryUnit = new fhirCsR4.Models.CodeableConcept();
                CustomaryUnit.DeserializeJson(ref reader, options);
                break;

            case "decimalPrecision":
                DecimalPrecision = reader.GetInt32();
                break;

            case "unit":
                Unit = new fhirCsR4.Models.CodeableConcept();
                Unit.DeserializeJson(ref reader, options);
                break;

            default:
                ((fhirCsR4.Models.BackboneElement) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "amount":
                Amount = new fhirCsR4.Models.SubstanceAmount();
                Amount.DeserializeJson(ref reader, options);
                break;

            case "isDefining":
                IsDefining = reader.GetBoolean();
                break;

            case "material":
                Material = new fhirCsR4.Models.CodeableConcept();
                Material.DeserializeJson(ref reader, options);
                break;

            case "type":
                Type = new fhirCsR4.Models.CodeableConcept();
                Type.DeserializeJson(ref reader, options);
                break;

            default:
                ((fhirCsR4.Models.BackboneElement) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "attachment":
                Attachment = new fhirCsR4.Models.Attachment();
                Attachment.DeserializeJson(ref reader, options);
                break;

            case "representation":
                Representation = reader.GetString();
                break;

            case "_representation":
                _Representation = new fhirCsR4.Models.Element();
                _Representation.DeserializeJson(ref reader, options);
                break;

            case "type":
                Type = new fhirCsR4.Models.CodeableConcept();
                Type.DeserializeJson(ref reader, options);
                break;

            default:
                ((fhirCsR4.Models.BackboneElement) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Ejemplo n.º 7
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "country":
                if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read()))
                {
                    throw new JsonException();
                }

                Country = new List <CodeableConcept>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    fhirCsR4.Models.CodeableConcept objCountry = new fhirCsR4.Models.CodeableConcept();
                    objCountry.DeserializeJson(ref reader, options);
                    Country.Add(objCountry);

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

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

                break;

            case "measurementPoint":
                MeasurementPoint = reader.GetString();
                break;

            case "_measurementPoint":
                _MeasurementPoint = new fhirCsR4.Models.Element();
                _MeasurementPoint.DeserializeJson(ref reader, options);
                break;

            case "strength":
                Strength = new fhirCsR4.Models.Ratio();
                Strength.DeserializeJson(ref reader, options);
                break;

            case "strengthLowLimit":
                StrengthLowLimit = new fhirCsR4.Models.Ratio();
                StrengthLowLimit.DeserializeJson(ref reader, options);
                break;

            case "substance":
                Substance = new fhirCsR4.Models.CodeableConcept();
                Substance.DeserializeJson(ref reader, options);
                break;

            default:
                ((fhirCsR4.Models.BackboneElement) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Ejemplo n.º 8
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "averageMolecularFormula":
                AverageMolecularFormula = reader.GetString();
                break;

            case "_averageMolecularFormula":
                _AverageMolecularFormula = new fhirCsR4.Models.Element();
                _AverageMolecularFormula.DeserializeJson(ref reader, options);
                break;

            case "numberOfUnits":
                NumberOfUnits = reader.GetInt32();
                break;

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

                RepeatUnit = new List <SubstancePolymerRepeatRepeatUnit>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    fhirCsR4.Models.SubstancePolymerRepeatRepeatUnit objRepeatUnit = new fhirCsR4.Models.SubstancePolymerRepeatRepeatUnit();
                    objRepeatUnit.DeserializeJson(ref reader, options);
                    RepeatUnit.Add(objRepeatUnit);

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

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

                break;

            case "repeatUnitAmountType":
                RepeatUnitAmountType = new fhirCsR4.Models.CodeableConcept();
                RepeatUnitAmountType.DeserializeJson(ref reader, options);
                break;

            default:
                ((fhirCsR4.Models.BackboneElement) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Ejemplo n.º 9
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "identifier":
                Identifier = new fhirCsR4.Models.Identifier();
                Identifier.DeserializeJson(ref reader, options);
                break;

            case "period":
                Period = new fhirCsR4.Models.Quantity();
                Period.DeserializeJson(ref reader, options);
                break;

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

                SpecialPrecautionsForStorage = new List <CodeableConcept>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    fhirCsR4.Models.CodeableConcept objSpecialPrecautionsForStorage = new fhirCsR4.Models.CodeableConcept();
                    objSpecialPrecautionsForStorage.DeserializeJson(ref reader, options);
                    SpecialPrecautionsForStorage.Add(objSpecialPrecautionsForStorage);

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

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

                break;

            case "type":
                Type = new fhirCsR4.Models.CodeableConcept();
                Type.DeserializeJson(ref reader, options);
                break;

            default:
                ((fhirCsR4.Models.BackboneElement) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Ejemplo n.º 10
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "code":
                Code = new fhirCsR4.Models.CodeableConcept();
                Code.DeserializeJson(ref reader, options);
                break;

            default:
                ((fhirCsR4.Models.BackboneElement) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Ejemplo n.º 11
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "element":
                Element = new fhirCsR4.Models.Identifier();
                Element.DeserializeJson(ref reader, options);
                break;

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

                Source = new List <Reference>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    fhirCsR4.Models.Reference objSource = new fhirCsR4.Models.Reference();
                    objSource.DeserializeJson(ref reader, options);
                    Source.Add(objSource);

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

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

                break;

            case "type":
                Type = new fhirCsR4.Models.CodeableConcept();
                Type.DeserializeJson(ref reader, options);
                break;

            default:
                ((fhirCsR4.Models.BackboneElement) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Ejemplo n.º 12
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "actor":
                Actor = new fhirCsR4.Models.Reference();
                Actor.DeserializeJson(ref reader, options);
                break;

            case "function":
                Function = new fhirCsR4.Models.CodeableConcept();
                Function.DeserializeJson(ref reader, options);
                break;

            default:
                ((fhirCsR4.Models.BackboneElement) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Ejemplo n.º 13
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "amount":
                Amount = new fhirCsR4.Models.SubstanceAmount();
                Amount.DeserializeJson(ref reader, options);
                break;

            case "degree":
                Degree = new fhirCsR4.Models.CodeableConcept();
                Degree.DeserializeJson(ref reader, options);
                break;

            default:
                ((fhirCsR4.Models.BackboneElement) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Ejemplo n.º 14
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "doseRange":
                DoseRange = new fhirCsR4.Models.Range();
                DoseRange.DeserializeJson(ref reader, options);
                break;

            case "doseQuantity":
                DoseQuantity = new fhirCsR4.Models.Quantity();
                DoseQuantity.DeserializeJson(ref reader, options);
                break;

            case "rateRatio":
                RateRatio = new fhirCsR4.Models.Ratio();
                RateRatio.DeserializeJson(ref reader, options);
                break;

            case "rateRange":
                RateRange = new fhirCsR4.Models.Range();
                RateRange.DeserializeJson(ref reader, options);
                break;

            case "rateQuantity":
                RateQuantity = new fhirCsR4.Models.Quantity();
                RateQuantity.DeserializeJson(ref reader, options);
                break;

            case "type":
                Type = new fhirCsR4.Models.CodeableConcept();
                Type.DeserializeJson(ref reader, options);
                break;

            default:
                ((fhirCsR4.Models.Element) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Ejemplo n.º 15
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "country":
                Country = new fhirCsR4.Models.CodeableConcept();
                Country.DeserializeJson(ref reader, options);
                break;

            case "dateRange":
                DateRange = new fhirCsR4.Models.Period();
                DateRange.DeserializeJson(ref reader, options);
                break;

            case "jurisdiction":
                Jurisdiction = new fhirCsR4.Models.CodeableConcept();
                Jurisdiction.DeserializeJson(ref reader, options);
                break;

            case "restoreDate":
                RestoreDate = reader.GetString();
                break;

            case "_restoreDate":
                _RestoreDate = new fhirCsR4.Models.Element();
                _RestoreDate.DeserializeJson(ref reader, options);
                break;

            case "status":
                Status = new fhirCsR4.Models.CodeableConcept();
                Status.DeserializeJson(ref reader, options);
                break;

            default:
                ((fhirCsR4.Models.BackboneElement) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Ejemplo n.º 16
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "condition":
                Condition = new fhirCsR4.Models.Reference();
                Condition.DeserializeJson(ref reader, options);
                break;

            case "rank":
                Rank = reader.GetUInt32();
                break;

            case "role":
                Role = new fhirCsR4.Models.CodeableConcept();
                Role.DeserializeJson(ref reader, options);
                break;

            default:
                ((fhirCsR4.Models.BackboneElement) 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 "medicationCodeableConcept":
                MedicationCodeableConcept = new fhirCsR4.Models.CodeableConcept();
                MedicationCodeableConcept.DeserializeJson(ref reader, options);
                break;

            case "medicationReference":
                MedicationReference = new fhirCsR4.Models.Reference();
                MedicationReference.DeserializeJson(ref reader, options);
                break;

            case "therapyRelationshipType":
                TherapyRelationshipType = new fhirCsR4.Models.CodeableConcept();
                TherapyRelationshipType.DeserializeJson(ref reader, options);
                break;

            default:
                ((fhirCsR4.Models.BackboneElement) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Ejemplo n.º 18
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "classification":
                Classification = new fhirCsR4.Models.CodeableConcept();
                Classification.DeserializeJson(ref reader, options);
                break;

            case "frequencyOfOccurrence":
                FrequencyOfOccurrence = new fhirCsR4.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)
                {
                    fhirCsR4.Models.Population objPopulation = new fhirCsR4.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)
                {
                    fhirCsR4.Models.Reference objSubject = new fhirCsR4.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 fhirCsR4.Models.CodeableConcept();
                SymptomConditionEffect.DeserializeJson(ref reader, options);
                break;

            default:
                ((fhirCsR4.Models.DomainResource) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Ejemplo n.º 19
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "amountQuantity":
                AmountQuantity = new fhirCsR4.Models.Quantity();
                AmountQuantity.DeserializeJson(ref reader, options);
                break;

            case "amountRange":
                AmountRange = new fhirCsR4.Models.Range();
                AmountRange.DeserializeJson(ref reader, options);
                break;

            case "amountString":
                AmountString = reader.GetString();
                break;

            case "_amountString":
                _AmountString = new fhirCsR4.Models.Element();
                _AmountString.DeserializeJson(ref reader, options);
                break;

            case "amountType":
                AmountType = new fhirCsR4.Models.CodeableConcept();
                AmountType.DeserializeJson(ref reader, options);
                break;

            case "interaction":
                Interaction = new fhirCsR4.Models.CodeableConcept();
                Interaction.DeserializeJson(ref reader, options);
                break;

            case "organism":
                Organism = new fhirCsR4.Models.CodeableConcept();
                Organism.DeserializeJson(ref reader, options);
                break;

            case "organismType":
                OrganismType = new fhirCsR4.Models.CodeableConcept();
                OrganismType.DeserializeJson(ref reader, options);
                break;

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

                Source = new List <Reference>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    fhirCsR4.Models.Reference objSource = new fhirCsR4.Models.Reference();
                    objSource.DeserializeJson(ref reader, options);
                    Source.Add(objSource);

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

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

                break;

            case "target":
                Target = new fhirCsR4.Models.Identifier();
                Target.DeserializeJson(ref reader, options);
                break;

            case "type":
                Type = new fhirCsR4.Models.CodeableConcept();
                Type.DeserializeJson(ref reader, options);
                break;

            default:
                ((fhirCsR4.Models.BackboneElement) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Ejemplo n.º 20
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "authenticator":
                Authenticator = new fhirCsR4.Models.Reference();
                Authenticator.DeserializeJson(ref reader, options);
                break;

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

                Author = new List <Reference>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    fhirCsR4.Models.Reference objAuthor = new fhirCsR4.Models.Reference();
                    objAuthor.DeserializeJson(ref reader, options);
                    Author.Add(objAuthor);

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

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

                break;

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

                Category = new List <CodeableConcept>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    fhirCsR4.Models.CodeableConcept objCategory = new fhirCsR4.Models.CodeableConcept();
                    objCategory.DeserializeJson(ref reader, options);
                    Category.Add(objCategory);

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

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

                break;

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

                Content = new List <DocumentReferenceContent>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    fhirCsR4.Models.DocumentReferenceContent objContent = new fhirCsR4.Models.DocumentReferenceContent();
                    objContent.DeserializeJson(ref reader, options);
                    Content.Add(objContent);

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

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

                break;

            case "context":
                Context = new fhirCsR4.Models.DocumentReferenceContext();
                Context.DeserializeJson(ref reader, options);
                break;

            case "custodian":
                Custodian = new fhirCsR4.Models.Reference();
                Custodian.DeserializeJson(ref reader, options);
                break;

            case "date":
                Date = reader.GetString();
                break;

            case "_date":
                _Date = new fhirCsR4.Models.Element();
                _Date.DeserializeJson(ref reader, options);
                break;

            case "description":
                Description = reader.GetString();
                break;

            case "_description":
                _Description = new fhirCsR4.Models.Element();
                _Description.DeserializeJson(ref reader, options);
                break;

            case "docStatus":
                DocStatus = reader.GetString();
                break;

            case "_docStatus":
                _DocStatus = new fhirCsR4.Models.Element();
                _DocStatus.DeserializeJson(ref reader, options);
                break;

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

                Identifier = new List <Identifier>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    fhirCsR4.Models.Identifier objIdentifier = new fhirCsR4.Models.Identifier();
                    objIdentifier.DeserializeJson(ref reader, options);
                    Identifier.Add(objIdentifier);

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

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

                break;

            case "masterIdentifier":
                MasterIdentifier = new fhirCsR4.Models.Identifier();
                MasterIdentifier.DeserializeJson(ref reader, options);
                break;

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

                RelatesTo = new List <DocumentReferenceRelatesTo>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    fhirCsR4.Models.DocumentReferenceRelatesTo objRelatesTo = new fhirCsR4.Models.DocumentReferenceRelatesTo();
                    objRelatesTo.DeserializeJson(ref reader, options);
                    RelatesTo.Add(objRelatesTo);

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

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

                break;

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

                SecurityLabel = new List <CodeableConcept>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    fhirCsR4.Models.CodeableConcept objSecurityLabel = new fhirCsR4.Models.CodeableConcept();
                    objSecurityLabel.DeserializeJson(ref reader, options);
                    SecurityLabel.Add(objSecurityLabel);

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

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

                break;

            case "status":
                Status = reader.GetString();
                break;

            case "_status":
                _Status = new fhirCsR4.Models.Element();
                _Status.DeserializeJson(ref reader, options);
                break;

            case "subject":
                Subject = new fhirCsR4.Models.Reference();
                Subject.DeserializeJson(ref reader, options);
                break;

            case "type":
                Type = new fhirCsR4.Models.CodeableConcept();
                Type.DeserializeJson(ref reader, options);
                break;

            default:
                ((fhirCsR4.Models.DomainResource) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Ejemplo n.º 21
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "abatementDateTime":
                AbatementDateTime = reader.GetString();
                break;

            case "_abatementDateTime":
                _AbatementDateTime = new fhirCsR4.Models.Element();
                _AbatementDateTime.DeserializeJson(ref reader, options);
                break;

            case "abatementAge":
                AbatementAge = new fhirCsR4.Models.Age();
                AbatementAge.DeserializeJson(ref reader, options);
                break;

            case "abatementPeriod":
                AbatementPeriod = new fhirCsR4.Models.Period();
                AbatementPeriod.DeserializeJson(ref reader, options);
                break;

            case "abatementRange":
                AbatementRange = new fhirCsR4.Models.Range();
                AbatementRange.DeserializeJson(ref reader, options);
                break;

            case "abatementString":
                AbatementString = reader.GetString();
                break;

            case "_abatementString":
                _AbatementString = new fhirCsR4.Models.Element();
                _AbatementString.DeserializeJson(ref reader, options);
                break;

            case "asserter":
                Asserter = new fhirCsR4.Models.Reference();
                Asserter.DeserializeJson(ref reader, options);
                break;

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

                BodySite = new List <CodeableConcept>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    fhirCsR4.Models.CodeableConcept objBodySite = new fhirCsR4.Models.CodeableConcept();
                    objBodySite.DeserializeJson(ref reader, options);
                    BodySite.Add(objBodySite);

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

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

                break;

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

                Category = new List <CodeableConcept>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    fhirCsR4.Models.CodeableConcept objCategory = new fhirCsR4.Models.CodeableConcept();
                    objCategory.DeserializeJson(ref reader, options);
                    Category.Add(objCategory);

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

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

                break;

            case "clinicalStatus":
                ClinicalStatus = new fhirCsR4.Models.CodeableConcept();
                ClinicalStatus.DeserializeJson(ref reader, options);
                break;

            case "code":
                Code = new fhirCsR4.Models.CodeableConcept();
                Code.DeserializeJson(ref reader, options);
                break;

            case "encounter":
                Encounter = new fhirCsR4.Models.Reference();
                Encounter.DeserializeJson(ref reader, options);
                break;

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

                Evidence = new List <ConditionEvidence>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    fhirCsR4.Models.ConditionEvidence objEvidence = new fhirCsR4.Models.ConditionEvidence();
                    objEvidence.DeserializeJson(ref reader, options);
                    Evidence.Add(objEvidence);

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

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

                break;

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

                Identifier = new List <Identifier>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    fhirCsR4.Models.Identifier objIdentifier = new fhirCsR4.Models.Identifier();
                    objIdentifier.DeserializeJson(ref reader, options);
                    Identifier.Add(objIdentifier);

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

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

                break;

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

                Note = new List <Annotation>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    fhirCsR4.Models.Annotation objNote = new fhirCsR4.Models.Annotation();
                    objNote.DeserializeJson(ref reader, options);
                    Note.Add(objNote);

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

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

                break;

            case "onsetDateTime":
                OnsetDateTime = reader.GetString();
                break;

            case "_onsetDateTime":
                _OnsetDateTime = new fhirCsR4.Models.Element();
                _OnsetDateTime.DeserializeJson(ref reader, options);
                break;

            case "onsetAge":
                OnsetAge = new fhirCsR4.Models.Age();
                OnsetAge.DeserializeJson(ref reader, options);
                break;

            case "onsetPeriod":
                OnsetPeriod = new fhirCsR4.Models.Period();
                OnsetPeriod.DeserializeJson(ref reader, options);
                break;

            case "onsetRange":
                OnsetRange = new fhirCsR4.Models.Range();
                OnsetRange.DeserializeJson(ref reader, options);
                break;

            case "onsetString":
                OnsetString = reader.GetString();
                break;

            case "_onsetString":
                _OnsetString = new fhirCsR4.Models.Element();
                _OnsetString.DeserializeJson(ref reader, options);
                break;

            case "recordedDate":
                RecordedDate = reader.GetString();
                break;

            case "_recordedDate":
                _RecordedDate = new fhirCsR4.Models.Element();
                _RecordedDate.DeserializeJson(ref reader, options);
                break;

            case "recorder":
                Recorder = new fhirCsR4.Models.Reference();
                Recorder.DeserializeJson(ref reader, options);
                break;

            case "severity":
                Severity = new fhirCsR4.Models.CodeableConcept();
                Severity.DeserializeJson(ref reader, options);
                break;

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

                Stage = new List <ConditionStage>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    fhirCsR4.Models.ConditionStage objStage = new fhirCsR4.Models.ConditionStage();
                    objStage.DeserializeJson(ref reader, options);
                    Stage.Add(objStage);

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

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

                break;

            case "subject":
                Subject = new fhirCsR4.Models.Reference();
                Subject.DeserializeJson(ref reader, options);
                break;

            case "verificationStatus":
                VerificationStatus = new fhirCsR4.Models.CodeableConcept();
                VerificationStatus.DeserializeJson(ref reader, options);
                break;

            default:
                ((fhirCsR4.Models.DomainResource) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Ejemplo n.º 22
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "authorizationRequired":
                AuthorizationRequired = reader.GetBoolean();
                break;

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

                AuthorizationSupporting = new List <CodeableConcept>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    fhirCsR4.Models.CodeableConcept objAuthorizationSupporting = new fhirCsR4.Models.CodeableConcept();
                    objAuthorizationSupporting.DeserializeJson(ref reader, options);
                    AuthorizationSupporting.Add(objAuthorizationSupporting);

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

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

                break;

            case "authorizationUrl":
                AuthorizationUrl = reader.GetString();
                break;

            case "_authorizationUrl":
                _AuthorizationUrl = new fhirCsR4.Models.Element();
                _AuthorizationUrl.DeserializeJson(ref reader, options);
                break;

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

                Benefit = new List <CoverageEligibilityResponseInsuranceItemBenefit>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    fhirCsR4.Models.CoverageEligibilityResponseInsuranceItemBenefit objBenefit = new fhirCsR4.Models.CoverageEligibilityResponseInsuranceItemBenefit();
                    objBenefit.DeserializeJson(ref reader, options);
                    Benefit.Add(objBenefit);

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

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

                break;

            case "category":
                Category = new fhirCsR4.Models.CodeableConcept();
                Category.DeserializeJson(ref reader, options);
                break;

            case "description":
                Description = reader.GetString();
                break;

            case "_description":
                _Description = new fhirCsR4.Models.Element();
                _Description.DeserializeJson(ref reader, options);
                break;

            case "excluded":
                Excluded = reader.GetBoolean();
                break;

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

                Modifier = new List <CodeableConcept>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    fhirCsR4.Models.CodeableConcept objModifier = new fhirCsR4.Models.CodeableConcept();
                    objModifier.DeserializeJson(ref reader, options);
                    Modifier.Add(objModifier);

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

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

                break;

            case "name":
                Name = reader.GetString();
                break;

            case "_name":
                _Name = new fhirCsR4.Models.Element();
                _Name.DeserializeJson(ref reader, options);
                break;

            case "network":
                Network = new fhirCsR4.Models.CodeableConcept();
                Network.DeserializeJson(ref reader, options);
                break;

            case "productOrService":
                ProductOrService = new fhirCsR4.Models.CodeableConcept();
                ProductOrService.DeserializeJson(ref reader, options);
                break;

            case "provider":
                Provider = new fhirCsR4.Models.Reference();
                Provider.DeserializeJson(ref reader, options);
                break;

            case "term":
                Term = new fhirCsR4.Models.CodeableConcept();
                Term.DeserializeJson(ref reader, options);
                break;

            case "unit":
                Unit = new fhirCsR4.Models.CodeableConcept();
                Unit.DeserializeJson(ref reader, options);
                break;

            default:
                ((fhirCsR4.Models.BackboneElement) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Ejemplo n.º 23
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "asserter":
                Asserter = new fhirCsR4.Models.Reference();
                Asserter.DeserializeJson(ref reader, options);
                break;

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

                Category = new List <string>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Category.Add(reader.GetString());

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

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

                break;

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

                _Category = new List <Element>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    fhirCsR4.Models.Element obj_Category = new fhirCsR4.Models.Element();
                    obj_Category.DeserializeJson(ref reader, options);
                    _Category.Add(obj_Category);

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

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

                break;

            case "clinicalStatus":
                ClinicalStatus = new fhirCsR4.Models.CodeableConcept();
                ClinicalStatus.DeserializeJson(ref reader, options);
                break;

            case "code":
                Code = new fhirCsR4.Models.CodeableConcept();
                Code.DeserializeJson(ref reader, options);
                break;

            case "criticality":
                Criticality = reader.GetString();
                break;

            case "_criticality":
                _Criticality = new fhirCsR4.Models.Element();
                _Criticality.DeserializeJson(ref reader, options);
                break;

            case "encounter":
                Encounter = new fhirCsR4.Models.Reference();
                Encounter.DeserializeJson(ref reader, options);
                break;

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

                Identifier = new List <Identifier>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    fhirCsR4.Models.Identifier objIdentifier = new fhirCsR4.Models.Identifier();
                    objIdentifier.DeserializeJson(ref reader, options);
                    Identifier.Add(objIdentifier);

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

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

                break;

            case "lastOccurrence":
                LastOccurrence = reader.GetString();
                break;

            case "_lastOccurrence":
                _LastOccurrence = new fhirCsR4.Models.Element();
                _LastOccurrence.DeserializeJson(ref reader, options);
                break;

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

                Note = new List <Annotation>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    fhirCsR4.Models.Annotation objNote = new fhirCsR4.Models.Annotation();
                    objNote.DeserializeJson(ref reader, options);
                    Note.Add(objNote);

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

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

                break;

            case "onsetDateTime":
                OnsetDateTime = reader.GetString();
                break;

            case "_onsetDateTime":
                _OnsetDateTime = new fhirCsR4.Models.Element();
                _OnsetDateTime.DeserializeJson(ref reader, options);
                break;

            case "onsetAge":
                OnsetAge = new fhirCsR4.Models.Age();
                OnsetAge.DeserializeJson(ref reader, options);
                break;

            case "onsetPeriod":
                OnsetPeriod = new fhirCsR4.Models.Period();
                OnsetPeriod.DeserializeJson(ref reader, options);
                break;

            case "onsetRange":
                OnsetRange = new fhirCsR4.Models.Range();
                OnsetRange.DeserializeJson(ref reader, options);
                break;

            case "onsetString":
                OnsetString = reader.GetString();
                break;

            case "_onsetString":
                _OnsetString = new fhirCsR4.Models.Element();
                _OnsetString.DeserializeJson(ref reader, options);
                break;

            case "patient":
                Patient = new fhirCsR4.Models.Reference();
                Patient.DeserializeJson(ref reader, options);
                break;

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

                Reaction = new List <AllergyIntoleranceReaction>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    fhirCsR4.Models.AllergyIntoleranceReaction objReaction = new fhirCsR4.Models.AllergyIntoleranceReaction();
                    objReaction.DeserializeJson(ref reader, options);
                    Reaction.Add(objReaction);

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

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

                break;

            case "recordedDate":
                RecordedDate = reader.GetString();
                break;

            case "_recordedDate":
                _RecordedDate = new fhirCsR4.Models.Element();
                _RecordedDate.DeserializeJson(ref reader, options);
                break;

            case "recorder":
                Recorder = new fhirCsR4.Models.Reference();
                Recorder.DeserializeJson(ref reader, options);
                break;

            case "type":
                Type = reader.GetString();
                break;

            case "_type":
                _Type = new fhirCsR4.Models.Element();
                _Type.DeserializeJson(ref reader, options);
                break;

            case "verificationStatus":
                VerificationStatus = new fhirCsR4.Models.CodeableConcept();
                VerificationStatus.DeserializeJson(ref reader, options);
                break;

            default:
                ((fhirCsR4.Models.DomainResource) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Ejemplo n.º 24
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "description":
                Description = reader.GetString();
                break;

            case "_description":
                _Description = new fhirCsR4.Models.Element();
                _Description.DeserializeJson(ref reader, options);
                break;

            case "exposureRoute":
                ExposureRoute = new fhirCsR4.Models.CodeableConcept();
                ExposureRoute.DeserializeJson(ref reader, options);
                break;

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

                Manifestation = new List <CodeableConcept>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    fhirCsR4.Models.CodeableConcept objManifestation = new fhirCsR4.Models.CodeableConcept();
                    objManifestation.DeserializeJson(ref reader, options);
                    Manifestation.Add(objManifestation);

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

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

                break;

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

                Note = new List <Annotation>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    fhirCsR4.Models.Annotation objNote = new fhirCsR4.Models.Annotation();
                    objNote.DeserializeJson(ref reader, options);
                    Note.Add(objNote);

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

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

                break;

            case "onset":
                Onset = reader.GetString();
                break;

            case "_onset":
                _Onset = new fhirCsR4.Models.Element();
                _Onset.DeserializeJson(ref reader, options);
                break;

            case "severity":
                Severity = reader.GetString();
                break;

            case "_severity":
                _Severity = new fhirCsR4.Models.Element();
                _Severity.DeserializeJson(ref reader, options);
                break;

            case "substance":
                Substance = new fhirCsR4.Models.CodeableConcept();
                Substance.DeserializeJson(ref reader, options);
                break;

            default:
                ((fhirCsR4.Models.BackboneElement) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Ejemplo n.º 25
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "calibration":
                if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read()))
                {
                    throw new JsonException();
                }

                Calibration = new List <DeviceMetricCalibration>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    fhirCsR4.Models.DeviceMetricCalibration objCalibration = new fhirCsR4.Models.DeviceMetricCalibration();
                    objCalibration.DeserializeJson(ref reader, options);
                    Calibration.Add(objCalibration);

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

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

                break;

            case "category":
                Category = reader.GetString();
                break;

            case "_category":
                _Category = new fhirCsR4.Models.Element();
                _Category.DeserializeJson(ref reader, options);
                break;

            case "color":
                Color = reader.GetString();
                break;

            case "_color":
                _Color = new fhirCsR4.Models.Element();
                _Color.DeserializeJson(ref reader, options);
                break;

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

                Identifier = new List <Identifier>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    fhirCsR4.Models.Identifier objIdentifier = new fhirCsR4.Models.Identifier();
                    objIdentifier.DeserializeJson(ref reader, options);
                    Identifier.Add(objIdentifier);

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

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

                break;

            case "measurementPeriod":
                MeasurementPeriod = new fhirCsR4.Models.Timing();
                MeasurementPeriod.DeserializeJson(ref reader, options);
                break;

            case "operationalStatus":
                OperationalStatus = reader.GetString();
                break;

            case "_operationalStatus":
                _OperationalStatus = new fhirCsR4.Models.Element();
                _OperationalStatus.DeserializeJson(ref reader, options);
                break;

            case "parent":
                Parent = new fhirCsR4.Models.Reference();
                Parent.DeserializeJson(ref reader, options);
                break;

            case "source":
                Source = new fhirCsR4.Models.Reference();
                Source.DeserializeJson(ref reader, options);
                break;

            case "type":
                Type = new fhirCsR4.Models.CodeableConcept();
                Type.DeserializeJson(ref reader, options);
                break;

            case "unit":
                Unit = new fhirCsR4.Models.CodeableConcept();
                Unit.DeserializeJson(ref reader, options);
                break;

            default:
                ((fhirCsR4.Models.DomainResource) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Ejemplo n.º 26
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "detailQuantity":
                DetailQuantity = new fhirCsR4.Models.Quantity();
                DetailQuantity.DeserializeJson(ref reader, options);
                break;

            case "detailRange":
                DetailRange = new fhirCsR4.Models.Range();
                DetailRange.DeserializeJson(ref reader, options);
                break;

            case "detailCodeableConcept":
                DetailCodeableConcept = new fhirCsR4.Models.CodeableConcept();
                DetailCodeableConcept.DeserializeJson(ref reader, options);
                break;

            case "detailString":
                DetailString = reader.GetString();
                break;

            case "_detailString":
                _DetailString = new fhirCsR4.Models.Element();
                _DetailString.DeserializeJson(ref reader, options);
                break;

            case "detailBoolean":
                DetailBoolean = reader.GetBoolean();
                break;

            case "detailInteger":
                DetailInteger = reader.GetInt32();
                break;

            case "detailRatio":
                DetailRatio = new fhirCsR4.Models.Ratio();
                DetailRatio.DeserializeJson(ref reader, options);
                break;

            case "dueDate":
                DueDate = reader.GetString();
                break;

            case "_dueDate":
                _DueDate = new fhirCsR4.Models.Element();
                _DueDate.DeserializeJson(ref reader, options);
                break;

            case "dueDuration":
                DueDuration = new fhirCsR4.Models.Duration();
                DueDuration.DeserializeJson(ref reader, options);
                break;

            case "measure":
                Measure = new fhirCsR4.Models.CodeableConcept();
                Measure.DeserializeJson(ref reader, options);
                break;

            default:
                ((fhirCsR4.Models.BackboneElement) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Ejemplo n.º 27
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "authority":
                Authority = new fhirCsR4.Models.Reference();
                Authority.DeserializeJson(ref reader, options);
                break;

            case "date":
                Date = reader.GetString();
                break;

            case "_date":
                _Date = new fhirCsR4.Models.Element();
                _Date.DeserializeJson(ref reader, options);
                break;

            case "description":
                Description = reader.GetString();
                break;

            case "_description":
                _Description = new fhirCsR4.Models.Element();
                _Description.DeserializeJson(ref reader, options);
                break;

            case "doseNumberPositiveInt":
                DoseNumberPositiveInt = reader.GetUInt32();
                break;

            case "doseNumberString":
                DoseNumberString = reader.GetString();
                break;

            case "_doseNumberString":
                _DoseNumberString = new fhirCsR4.Models.Element();
                _DoseNumberString.DeserializeJson(ref reader, options);
                break;

            case "doseStatus":
                DoseStatus = new fhirCsR4.Models.CodeableConcept();
                DoseStatus.DeserializeJson(ref reader, options);
                break;

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

                DoseStatusReason = new List <CodeableConcept>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    fhirCsR4.Models.CodeableConcept objDoseStatusReason = new fhirCsR4.Models.CodeableConcept();
                    objDoseStatusReason.DeserializeJson(ref reader, options);
                    DoseStatusReason.Add(objDoseStatusReason);

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

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

                break;

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

                Identifier = new List <Identifier>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    fhirCsR4.Models.Identifier objIdentifier = new fhirCsR4.Models.Identifier();
                    objIdentifier.DeserializeJson(ref reader, options);
                    Identifier.Add(objIdentifier);

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

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

                break;

            case "immunizationEvent":
                ImmunizationEvent = new fhirCsR4.Models.Reference();
                ImmunizationEvent.DeserializeJson(ref reader, options);
                break;

            case "patient":
                Patient = new fhirCsR4.Models.Reference();
                Patient.DeserializeJson(ref reader, options);
                break;

            case "series":
                Series = reader.GetString();
                break;

            case "_series":
                _Series = new fhirCsR4.Models.Element();
                _Series.DeserializeJson(ref reader, options);
                break;

            case "seriesDosesPositiveInt":
                SeriesDosesPositiveInt = reader.GetUInt32();
                break;

            case "seriesDosesString":
                SeriesDosesString = reader.GetString();
                break;

            case "_seriesDosesString":
                _SeriesDosesString = new fhirCsR4.Models.Element();
                _SeriesDosesString.DeserializeJson(ref reader, options);
                break;

            case "status":
                Status = reader.GetString();
                break;

            case "_status":
                _Status = new fhirCsR4.Models.Element();
                _Status.DeserializeJson(ref reader, options);
                break;

            case "targetDisease":
                TargetDisease = new fhirCsR4.Models.CodeableConcept();
                TargetDisease.DeserializeJson(ref reader, options);
                break;

            default:
                ((fhirCsR4.Models.DomainResource) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Ejemplo n.º 28
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "code":
                Code = new fhirCsR4.Models.CodeableConcept();
                Code.DeserializeJson(ref reader, options);
                break;

            case "contributedToDeath":
                ContributedToDeath = reader.GetBoolean();
                break;

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

                Note = new List <Annotation>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    fhirCsR4.Models.Annotation objNote = new fhirCsR4.Models.Annotation();
                    objNote.DeserializeJson(ref reader, options);
                    Note.Add(objNote);

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

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

                break;

            case "onsetAge":
                OnsetAge = new fhirCsR4.Models.Age();
                OnsetAge.DeserializeJson(ref reader, options);
                break;

            case "onsetRange":
                OnsetRange = new fhirCsR4.Models.Range();
                OnsetRange.DeserializeJson(ref reader, options);
                break;

            case "onsetPeriod":
                OnsetPeriod = new fhirCsR4.Models.Period();
                OnsetPeriod.DeserializeJson(ref reader, options);
                break;

            case "onsetString":
                OnsetString = reader.GetString();
                break;

            case "_onsetString":
                _OnsetString = new fhirCsR4.Models.Element();
                _OnsetString.DeserializeJson(ref reader, options);
                break;

            case "outcome":
                Outcome = new fhirCsR4.Models.CodeableConcept();
                Outcome.DeserializeJson(ref reader, options);
                break;

            default:
                ((fhirCsR4.Models.BackboneElement) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Ejemplo n.º 29
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "fivePrime":
                FivePrime = new fhirCsR4.Models.CodeableConcept();
                FivePrime.DeserializeJson(ref reader, options);
                break;

            case "length":
                Length = reader.GetInt32();
                break;

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

                Linkage = new List <SubstanceNucleicAcidSubunitLinkage>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    fhirCsR4.Models.SubstanceNucleicAcidSubunitLinkage objLinkage = new fhirCsR4.Models.SubstanceNucleicAcidSubunitLinkage();
                    objLinkage.DeserializeJson(ref reader, options);
                    Linkage.Add(objLinkage);

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

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

                break;

            case "sequence":
                Sequence = reader.GetString();
                break;

            case "_sequence":
                _Sequence = new fhirCsR4.Models.Element();
                _Sequence.DeserializeJson(ref reader, options);
                break;

            case "sequenceAttachment":
                SequenceAttachment = new fhirCsR4.Models.Attachment();
                SequenceAttachment.DeserializeJson(ref reader, options);
                break;

            case "subunit":
                Subunit = reader.GetInt32();
                break;

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

                Sugar = new List <SubstanceNucleicAcidSubunitSugar>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    fhirCsR4.Models.SubstanceNucleicAcidSubunitSugar objSugar = new fhirCsR4.Models.SubstanceNucleicAcidSubunitSugar();
                    objSugar.DeserializeJson(ref reader, options);
                    Sugar.Add(objSugar);

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

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

                break;

            case "threePrime":
                ThreePrime = new fhirCsR4.Models.CodeableConcept();
                ThreePrime.DeserializeJson(ref reader, options);
                break;

            default:
                ((fhirCsR4.Models.BackboneElement) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Ejemplo n.º 30
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "basedOn":
                if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read()))
                {
                    throw new JsonException();
                }

                BasedOn = new List <Reference>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    fhirCsR4.Models.Reference objBasedOn = new fhirCsR4.Models.Reference();
                    objBasedOn.DeserializeJson(ref reader, options);
                    BasedOn.Add(objBasedOn);

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

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

                break;

            case "destination":
                Destination = new fhirCsR4.Models.Reference();
                Destination.DeserializeJson(ref reader, options);
                break;

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

                Identifier = new List <Identifier>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    fhirCsR4.Models.Identifier objIdentifier = new fhirCsR4.Models.Identifier();
                    objIdentifier.DeserializeJson(ref reader, options);
                    Identifier.Add(objIdentifier);

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

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

                break;

            case "occurrenceDateTime":
                OccurrenceDateTime = reader.GetString();
                break;

            case "_occurrenceDateTime":
                _OccurrenceDateTime = new fhirCsR4.Models.Element();
                _OccurrenceDateTime.DeserializeJson(ref reader, options);
                break;

            case "occurrencePeriod":
                OccurrencePeriod = new fhirCsR4.Models.Period();
                OccurrencePeriod.DeserializeJson(ref reader, options);
                break;

            case "occurrenceTiming":
                OccurrenceTiming = new fhirCsR4.Models.Timing();
                OccurrenceTiming.DeserializeJson(ref reader, options);
                break;

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

                PartOf = new List <Reference>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    fhirCsR4.Models.Reference objPartOf = new fhirCsR4.Models.Reference();
                    objPartOf.DeserializeJson(ref reader, options);
                    PartOf.Add(objPartOf);

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

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

                break;

            case "patient":
                Patient = new fhirCsR4.Models.Reference();
                Patient.DeserializeJson(ref reader, options);
                break;

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

                Receiver = new List <Reference>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    fhirCsR4.Models.Reference objReceiver = new fhirCsR4.Models.Reference();
                    objReceiver.DeserializeJson(ref reader, options);
                    Receiver.Add(objReceiver);

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

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

                break;

            case "status":
                Status = reader.GetString();
                break;

            case "_status":
                _Status = new fhirCsR4.Models.Element();
                _Status.DeserializeJson(ref reader, options);
                break;

            case "suppliedItem":
                SuppliedItem = new fhirCsR4.Models.SupplyDeliverySuppliedItem();
                SuppliedItem.DeserializeJson(ref reader, options);
                break;

            case "supplier":
                Supplier = new fhirCsR4.Models.Reference();
                Supplier.DeserializeJson(ref reader, options);
                break;

            case "type":
                Type = new fhirCsR4.Models.CodeableConcept();
                Type.DeserializeJson(ref reader, options);
                break;

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