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

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

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

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

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

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

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

            case "organismType":
                OrganismType = new Fhir.R4.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)
                {
                    Fhir.R4.Models.Reference objSource = new Fhir.R4.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 Fhir.R4.Models.Identifier();
                Target.DeserializeJson(ref reader, options);
                break;

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

            default:
                ((Fhir.R4.Models.BackboneElement) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "additiveCodeableConcept":
                AdditiveCodeableConcept = new Fhir.R4.Models.CodeableConcept();
                AdditiveCodeableConcept.DeserializeJson(ref reader, options);
                break;

            case "additiveReference":
                AdditiveReference = new Fhir.R4.Models.Reference();
                AdditiveReference.DeserializeJson(ref reader, options);
                break;

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

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

            case "_description":
                _Description = new Fhir.R4.Models.Element();
                _Description.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)
                {
                    Fhir.R4.Models.Identifier objIdentifier = new Fhir.R4.Models.Identifier();
                    objIdentifier.DeserializeJson(ref reader, options);
                    Identifier.Add(objIdentifier);

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

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

                break;

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

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

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

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

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

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

            case "payee":
                Payee = new Fhir.R4.Models.Reference();
                Payee.DeserializeJson(ref reader, options);
                break;

            case "predecessor":
                Predecessor = new Fhir.R4.Models.Identifier();
                Predecessor.DeserializeJson(ref reader, options);
                break;

            case "request":
                Request = new Fhir.R4.Models.Reference();
                Request.DeserializeJson(ref reader, options);
                break;

            case "response":
                Response = new Fhir.R4.Models.Reference();
                Response.DeserializeJson(ref reader, options);
                break;

            case "responsible":
                Responsible = new Fhir.R4.Models.Reference();
                Responsible.DeserializeJson(ref reader, options);
                break;

            case "submitter":
                Submitter = new Fhir.R4.Models.Reference();
                Submitter.DeserializeJson(ref reader, options);
                break;

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

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

                AlternateMaterial = new List <CodeableConcept>();

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

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

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

                break;

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

                Device = new List <Reference>();

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

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

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

                break;

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

                Identifier = new List <Identifier>();

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

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

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

                break;

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

                ManufacturedItem = new List <Reference>();

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

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

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

                break;

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

                Manufacturer = new List <Reference>();

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

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

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

                break;

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

                Material = new List <CodeableConcept>();

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

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

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

                break;

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

                OtherCharacteristics = new List <CodeableConcept>();

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

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

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

                break;

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

                PackageItem = new List <MedicinalProductPackagedPackageItem>();

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

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

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

                break;

            case "physicalCharacteristics":
                PhysicalCharacteristics = new Fhir.R4.Models.ProdCharacteristic();
                PhysicalCharacteristics.DeserializeJson(ref reader, options);
                break;

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

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

                ShelfLifeStorage = new List <ProductShelfLife>();

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

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

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

                break;

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

            default:
                ((Fhir.R4.Models.BackboneElement) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Exemplo n.º 5
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)
                {
                    Fhir.R4.Models.Reference objBasedOn = new Fhir.R4.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 Fhir.R4.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)
                {
                    Fhir.R4.Models.Identifier objIdentifier = new Fhir.R4.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 Fhir.R4.Models.Element();
                _OccurrenceDateTime.DeserializeJson(ref reader, options);
                break;

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

            case "occurrenceTiming":
                OccurrenceTiming = new Fhir.R4.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)
                {
                    Fhir.R4.Models.Reference objPartOf = new Fhir.R4.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 Fhir.R4.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)
                {
                    Fhir.R4.Models.Reference objReceiver = new Fhir.R4.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 Fhir.R4.Models.Element();
                _Status.DeserializeJson(ref reader, options);
                break;

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

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

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

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

                Component = new List <MeasureReportGroupStratifierStratumComponent>();

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

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

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

                break;

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

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

                Population = new List <MeasureReportGroupStratifierStratumPopulation>();

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

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

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

                break;

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

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

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

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

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

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

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

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

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

            case "doseStatus":
                DoseStatus = new Fhir.R4.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)
                {
                    Fhir.R4.Models.CodeableConcept objDoseStatusReason = new Fhir.R4.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)
                {
                    Fhir.R4.Models.Identifier objIdentifier = new Fhir.R4.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 Fhir.R4.Models.Reference();
                ImmunizationEvent.DeserializeJson(ref reader, options);
                break;

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

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

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

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

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

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

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

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

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

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

                Author = new List <Reference>();

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

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

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

                break;

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

                Content = new List <Reference>();

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

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

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

                break;

            case "created":
                Created = reader.GetString();
                break;

            case "_created":
                _Created = new Fhir.R4.Models.Element();
                _Created.DeserializeJson(ref reader, options);
                break;

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

            case "_description":
                _Description = new Fhir.R4.Models.Element();
                _Description.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)
                {
                    Fhir.R4.Models.Identifier objIdentifier = new Fhir.R4.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 Fhir.R4.Models.Identifier();
                MasterIdentifier.DeserializeJson(ref reader, options);
                break;

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

                Recipient = new List <Reference>();

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

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

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

                break;

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

                Related = new List <DocumentManifestRelated>();

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

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

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

                break;

            case "source":
                Source = reader.GetString();
                break;

            case "_source":
                _Source = new Fhir.R4.Models.Element();
                _Source.DeserializeJson(ref reader, options);
                break;

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

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

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

            case "type":
                Type = new Fhir.R4.Models.CodeableConcept();
                Type.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 "administrableDoseForm":
                AdministrableDoseForm = new Fhir.R4.Models.CodeableConcept();
                AdministrableDoseForm.DeserializeJson(ref reader, options);
                break;

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

                Characteristics = new List <MedicinalProductPharmaceuticalCharacteristics>();

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

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

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

                break;

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

                Device = new List <Reference>();

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

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

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

                break;

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

                Identifier = new List <Identifier>();

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

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

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

                break;

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

                Ingredient = new List <Reference>();

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

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

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

                break;

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

                RouteOfAdministration = new List <MedicinalProductPharmaceuticalRouteOfAdministration>();

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

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

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

                break;

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

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

                Ingredient = new List <Reference>();

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

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

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

                break;

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

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

                Manufacturer = new List <Reference>();

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

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

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

                break;

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

                OtherCharacteristics = new List <CodeableConcept>();

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

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

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

                break;

            case "physicalCharacteristics":
                PhysicalCharacteristics = new Fhir.R4.Models.ProdCharacteristic();
                PhysicalCharacteristics.DeserializeJson(ref reader, options);
                break;

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

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

            default:
                ((Fhir.R4.Models.DomainResource) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Exemplo n.º 11
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "container":
                Container = new Fhir.R4.Models.SpecimenDefinitionTypeTestedContainer();
                Container.DeserializeJson(ref reader, options);
                break;

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

                Handling = new List <SpecimenDefinitionTypeTestedHandling>();

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

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

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

                break;

            case "isDerived":
                IsDerived = reader.GetBoolean();
                break;

            case "preference":
                Preference = reader.GetString();
                break;

            case "_preference":
                _Preference = new Fhir.R4.Models.Element();
                _Preference.DeserializeJson(ref reader, options);
                break;

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

                RejectionCriterion = new List <CodeableConcept>();

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

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

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

                break;

            case "requirement":
                Requirement = reader.GetString();
                break;

            case "_requirement":
                _Requirement = new Fhir.R4.Models.Element();
                _Requirement.DeserializeJson(ref reader, options);
                break;

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

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

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

                Additive = new List <SpecimenDefinitionTypeTestedContainerAdditive>();

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

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

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

                break;

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

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

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

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

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

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

            case "minimumVolumeString":
                MinimumVolumeString = reader.GetString();
                break;

            case "_minimumVolumeString":
                _MinimumVolumeString = new Fhir.R4.Models.Element();
                _MinimumVolumeString.DeserializeJson(ref reader, options);
                break;

            case "preparation":
                Preparation = reader.GetString();
                break;

            case "_preparation":
                _Preparation = new Fhir.R4.Models.Element();
                _Preparation.DeserializeJson(ref reader, options);
                break;

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

            default:
                ((Fhir.R4.Models.BackboneElement) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Exemplo n.º 13
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "fivePrime":
                FivePrime = new Fhir.R4.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)
                {
                    Fhir.R4.Models.SubstanceNucleicAcidSubunitLinkage objLinkage = new Fhir.R4.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 Fhir.R4.Models.Element();
                _Sequence.DeserializeJson(ref reader, options);
                break;

            case "sequenceAttachment":
                SequenceAttachment = new Fhir.R4.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)
                {
                    Fhir.R4.Models.SubstanceNucleicAcidSubunitSugar objSugar = new Fhir.R4.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 Fhir.R4.Models.CodeableConcept();
                ThreePrime.DeserializeJson(ref reader, options);
                break;

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

            case "collection":
                Collection = new Fhir.R4.Models.SpecimenCollection();
                Collection.DeserializeJson(ref reader, options);
                break;

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

                Condition = new List <CodeableConcept>();

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

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

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

                break;

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

                Container = new List <SpecimenContainer>();

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

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

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

                break;

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

                Identifier = new List <Identifier>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.Identifier objIdentifier = new Fhir.R4.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)
                {
                    Fhir.R4.Models.Annotation objNote = new Fhir.R4.Models.Annotation();
                    objNote.DeserializeJson(ref reader, options);
                    Note.Add(objNote);

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

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

                break;

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

                Parent = new List <Reference>();

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

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

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

                break;

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

                Processing = new List <SpecimenProcessing>();

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

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

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

                break;

            case "receivedTime":
                ReceivedTime = reader.GetString();
                break;

            case "_receivedTime":
                _ReceivedTime = new Fhir.R4.Models.Element();
                _ReceivedTime.DeserializeJson(ref reader, options);
                break;

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

                Request = new List <Reference>();

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

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

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

                break;

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

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

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

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

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

                About = new List <Reference>();

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

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

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

                break;

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

                BasedOn = new List <Reference>();

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

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

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

                break;

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

                Category = new List <CodeableConcept>();

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

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

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

                break;

            case "encounter":
                Encounter = new Fhir.R4.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)
                {
                    Fhir.R4.Models.Identifier objIdentifier = new Fhir.R4.Models.Identifier();
                    objIdentifier.DeserializeJson(ref reader, options);
                    Identifier.Add(objIdentifier);

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

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

                break;

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

                InResponseTo = new List <Reference>();

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

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

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

                break;

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

                InstantiatesCanonical = new List <string>();

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

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

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

                break;

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

                _InstantiatesCanonical = new List <Element>();

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

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

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

                break;

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

                InstantiatesUri = new List <string>();

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

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

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

                break;

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

                _InstantiatesUri = new List <Element>();

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

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

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

                break;

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

                Medium = new List <CodeableConcept>();

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

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

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

                break;

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

                Note = new List <Annotation>();

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

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

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

                break;

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

                PartOf = new List <Reference>();

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

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

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

                break;

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

                Payload = new List <CommunicationPayload>();

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

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

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

                break;

            case "priority":
                Priority = reader.GetString();
                break;

            case "_priority":
                _Priority = new Fhir.R4.Models.Element();
                _Priority.DeserializeJson(ref reader, options);
                break;

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

                ReasonCode = new List <CodeableConcept>();

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

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

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

                break;

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

                ReasonReference = new List <Reference>();

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

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

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

                break;

            case "received":
                Received = reader.GetString();
                break;

            case "_received":
                _Received = new Fhir.R4.Models.Element();
                _Received.DeserializeJson(ref reader, options);
                break;

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

                Recipient = new List <Reference>();

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

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

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

                break;

            case "sender":
                Sender = new Fhir.R4.Models.Reference();
                Sender.DeserializeJson(ref reader, options);
                break;

            case "sent":
                Sent = reader.GetString();
                break;

            case "_sent":
                _Sent = new Fhir.R4.Models.Element();
                _Sent.DeserializeJson(ref reader, options);
                break;

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

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

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

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

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

            default:
                ((Fhir.R4.Models.DomainResource) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Exemplo n.º 16
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)
                {
                    Fhir.R4.Models.DeviceMetricCalibration objCalibration = new Fhir.R4.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 Fhir.R4.Models.Element();
                _Category.DeserializeJson(ref reader, options);
                break;

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

            case "_color":
                _Color = new Fhir.R4.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)
                {
                    Fhir.R4.Models.Identifier objIdentifier = new Fhir.R4.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 Fhir.R4.Models.Timing();
                MeasurementPeriod.DeserializeJson(ref reader, options);
                break;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            default:
                ((Fhir.R4.Models.BackboneElement) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Exemplo n.º 18
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "authenticator":
                Authenticator = new Fhir.R4.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)
                {
                    Fhir.R4.Models.Reference objAuthor = new Fhir.R4.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)
                {
                    Fhir.R4.Models.CodeableConcept objCategory = new Fhir.R4.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)
                {
                    Fhir.R4.Models.DocumentReferenceContent objContent = new Fhir.R4.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 Fhir.R4.Models.DocumentReferenceContext();
                Context.DeserializeJson(ref reader, options);
                break;

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

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

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

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

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

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

            case "_docStatus":
                _DocStatus = new Fhir.R4.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)
                {
                    Fhir.R4.Models.Identifier objIdentifier = new Fhir.R4.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 Fhir.R4.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)
                {
                    Fhir.R4.Models.DocumentReferenceRelatesTo objRelatesTo = new Fhir.R4.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)
                {
                    Fhir.R4.Models.CodeableConcept objSecurityLabel = new Fhir.R4.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 Fhir.R4.Models.Element();
                _Status.DeserializeJson(ref reader, options);
                break;

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

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

            default:
                ((Fhir.R4.Models.DomainResource) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Exemplo n.º 19
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "code":
                Code = new Fhir.R4.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)
                {
                    Fhir.R4.Models.Annotation objNote = new Fhir.R4.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 Fhir.R4.Models.Age();
                OnsetAge.DeserializeJson(ref reader, options);
                break;

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

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

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

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

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

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

                Attester = new List <CompositionAttester>();

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

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

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

                break;

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

                Author = new List <Reference>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    Fhir.R4.Models.Reference objAuthor = new Fhir.R4.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)
                {
                    Fhir.R4.Models.CodeableConcept objCategory = new Fhir.R4.Models.CodeableConcept();
                    objCategory.DeserializeJson(ref reader, options);
                    Category.Add(objCategory);

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

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

                break;

            case "confidentiality":
                Confidentiality = reader.GetString();
                break;

            case "_confidentiality":
                _Confidentiality = new Fhir.R4.Models.Element();
                _Confidentiality.DeserializeJson(ref reader, options);
                break;

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

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

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

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

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

                Event = new List <CompositionEvent>();

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

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

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

                break;

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

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

                RelatesTo = new List <CompositionRelatesTo>();

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

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

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

                break;

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

                Section = new List <CompositionSection>();

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

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

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

                break;

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

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

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

            case "title":
                Title = reader.GetString();
                break;

            case "_title":
                _Title = new Fhir.R4.Models.Element();
                _Title.DeserializeJson(ref reader, options);
                break;

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

            default:
                ((Fhir.R4.Models.DomainResource) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Exemplo n.º 21
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 Fhir.R4.Models.Element();
                _Description.DeserializeJson(ref reader, options);
                break;

            case "exposureRoute":
                ExposureRoute = new Fhir.R4.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)
                {
                    Fhir.R4.Models.CodeableConcept objManifestation = new Fhir.R4.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)
                {
                    Fhir.R4.Models.Annotation objNote = new Fhir.R4.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 Fhir.R4.Models.Element();
                _Onset.DeserializeJson(ref reader, options);
                break;

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

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

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

            default:
                ((Fhir.R4.Models.BackboneElement) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Exemplo 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)
                {
                    Fhir.R4.Models.CodeableConcept objAuthorizationSupporting = new Fhir.R4.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 Fhir.R4.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)
                {
                    Fhir.R4.Models.CoverageEligibilityResponseInsuranceItemBenefit objBenefit = new Fhir.R4.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 Fhir.R4.Models.CodeableConcept();
                Category.DeserializeJson(ref reader, options);
                break;

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

            case "_description":
                _Description = new Fhir.R4.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)
                {
                    Fhir.R4.Models.CodeableConcept objModifier = new Fhir.R4.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 Fhir.R4.Models.Element();
                _Name.DeserializeJson(ref reader, options);
                break;

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

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

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

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

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

            default:
                ((Fhir.R4.Models.BackboneElement) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Exemplo 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 Fhir.R4.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)
                {
                    Fhir.R4.Models.Element obj_Category = new Fhir.R4.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 Fhir.R4.Models.CodeableConcept();
                ClinicalStatus.DeserializeJson(ref reader, options);
                break;

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

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

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

            case "encounter":
                Encounter = new Fhir.R4.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)
                {
                    Fhir.R4.Models.Identifier objIdentifier = new Fhir.R4.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 Fhir.R4.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)
                {
                    Fhir.R4.Models.Annotation objNote = new Fhir.R4.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 Fhir.R4.Models.Element();
                _OnsetDateTime.DeserializeJson(ref reader, options);
                break;

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

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

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

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

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

            case "patient":
                Patient = new Fhir.R4.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)
                {
                    Fhir.R4.Models.AllergyIntoleranceReaction objReaction = new Fhir.R4.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 Fhir.R4.Models.Element();
                _RecordedDate.DeserializeJson(ref reader, options);
                break;

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

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

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

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

            default:
                ((Fhir.R4.Models.DomainResource) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Exemplo n.º 24
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "beneficiary":
                Beneficiary = new Fhir.R4.Models.Reference();
                Beneficiary.DeserializeJson(ref reader, options);
                break;

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

                Class = new List <CoverageClass>();

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

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

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

                break;

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

                Contract = new List <Reference>();

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

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

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

                break;

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

                CostToBeneficiary = new List <CoverageCostToBeneficiary>();

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

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

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

                break;

            case "dependent":
                Dependent = reader.GetString();
                break;

            case "_dependent":
                _Dependent = new Fhir.R4.Models.Element();
                _Dependent.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)
                {
                    Fhir.R4.Models.Identifier objIdentifier = new Fhir.R4.Models.Identifier();
                    objIdentifier.DeserializeJson(ref reader, options);
                    Identifier.Add(objIdentifier);

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

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

                break;

            case "network":
                Network = reader.GetString();
                break;

            case "_network":
                _Network = new Fhir.R4.Models.Element();
                _Network.DeserializeJson(ref reader, options);
                break;

            case "order":
                Order = reader.GetUInt32();
                break;

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

                Payor = new List <Reference>();

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

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

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

                break;

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

            case "policyHolder":
                PolicyHolder = new Fhir.R4.Models.Reference();
                PolicyHolder.DeserializeJson(ref reader, options);
                break;

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

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

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

            case "subrogation":
                Subrogation = reader.GetBoolean();
                break;

            case "subscriber":
                Subscriber = new Fhir.R4.Models.Reference();
                Subscriber.DeserializeJson(ref reader, options);
                break;

            case "subscriberId":
                SubscriberId = reader.GetString();
                break;

            case "_subscriberId":
                _SubscriberId = new Fhir.R4.Models.Element();
                _SubscriberId.DeserializeJson(ref reader, options);
                break;

            case "type":
                Type = new Fhir.R4.Models.CodeableConcept();
                Type.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 "description":
                Description = reader.GetString();
                break;

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

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

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

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

                Interactant = new List <MedicinalProductInteractionInteractant>();

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

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

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

                break;

            case "management":
                Management = new Fhir.R4.Models.CodeableConcept();
                Management.DeserializeJson(ref reader, options);
                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 "type":
                Type = new Fhir.R4.Models.CodeableConcept();
                Type.DeserializeJson(ref reader, options);
                break;

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