Esempio n. 1
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "account":
                Account = new fhirCsR4.Models.Reference();
                Account.DeserializeJson(ref reader, options);
                break;

            case "cancelledReason":
                CancelledReason = reader.GetString();
                break;

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

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

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

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

                Identifier = new List <Identifier>();

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

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

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

                break;

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

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

                LineItem = new List <InvoiceLineItem>();

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

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

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

                break;

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

                Note = new List <Annotation>();

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

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

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

                break;

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

                Participant = new List <InvoiceParticipant>();

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

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

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

                break;

            case "paymentTerms":
                PaymentTerms = reader.GetString();
                break;

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

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

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

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

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

            case "totalGross":
                TotalGross = new fhirCsR4.Models.Money();
                TotalGross.DeserializeJson(ref reader, options);
                break;

            case "totalNet":
                TotalNet = new fhirCsR4.Models.Money();
                TotalNet.DeserializeJson(ref reader, options);
                break;

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

                TotalPriceComponent = new List <InvoiceLineItemPriceComponent>();

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

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

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

                break;

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

            default:
                ((fhirCsR4.Models.DomainResource) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
        /// <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)
                {
                    fhirCsR4.Models.Reference objIngredient = new fhirCsR4.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 fhirCsR4.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)
                {
                    fhirCsR4.Models.Reference objManufacturer = new fhirCsR4.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)
                {
                    fhirCsR4.Models.CodeableConcept objOtherCharacteristics = new fhirCsR4.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 fhirCsR4.Models.ProdCharacteristic();
                PhysicalCharacteristics.DeserializeJson(ref reader, options);
                break;

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

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

            default:
                ((fhirCsR4.Models.DomainResource) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Esempio n. 3
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)
                {
                    fhirCsR4.Models.Reference objAbout = new fhirCsR4.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)
                {
                    fhirCsR4.Models.Reference objBasedOn = new fhirCsR4.Models.Reference();
                    objBasedOn.DeserializeJson(ref reader, options);
                    BasedOn.Add(objBasedOn);

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

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

                break;

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

                Category = new List <CodeableConcept>();

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

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

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

                break;

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

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

                Identifier = new List <Identifier>();

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

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

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

                break;

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

                InResponseTo = new List <Reference>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    fhirCsR4.Models.Reference objInResponseTo = new fhirCsR4.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)
                {
                    fhirCsR4.Models.Element obj_InstantiatesCanonical = new fhirCsR4.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)
                {
                    fhirCsR4.Models.Element obj_InstantiatesUri = new fhirCsR4.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)
                {
                    fhirCsR4.Models.CodeableConcept objMedium = new fhirCsR4.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)
                {
                    fhirCsR4.Models.Annotation objNote = new fhirCsR4.Models.Annotation();
                    objNote.DeserializeJson(ref reader, options);
                    Note.Add(objNote);

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

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

                break;

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

                PartOf = new List <Reference>();

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

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

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

                break;

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

                Payload = new List <CommunicationPayload>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    fhirCsR4.Models.CommunicationPayload objPayload = new fhirCsR4.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 fhirCsR4.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)
                {
                    fhirCsR4.Models.CodeableConcept objReasonCode = new fhirCsR4.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)
                {
                    fhirCsR4.Models.Reference objReasonReference = new fhirCsR4.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 fhirCsR4.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)
                {
                    fhirCsR4.Models.Reference objRecipient = new fhirCsR4.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 fhirCsR4.Models.Reference();
                Sender.DeserializeJson(ref reader, options);
                break;

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

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

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

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

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

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

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

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

                Calibration = new List <DeviceMetricCalibration>();

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

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

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

                break;

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

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

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

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

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

                Identifier = new List <Identifier>();

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

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

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

                break;

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

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

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

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

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

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

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

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

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

                Category = new List <string>();

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

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

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

                break;

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

                _Category = new List <Element>();

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

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

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

                break;

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

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

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

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

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

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

                Identifier = new List <Identifier>();

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

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

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

                break;

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

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

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

                Note = new List <Annotation>();

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

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

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

                break;

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

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

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

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

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

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

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

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

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

                Reaction = new List <AllergyIntoleranceReaction>();

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

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

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

                break;

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

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

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

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

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

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

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

                BasedOn = new List <Reference>();

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

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

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

                break;

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

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

                Identifier = new List <Identifier>();

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

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

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

                break;

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

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

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

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

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

                PartOf = new List <Reference>();

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

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

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

                break;

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

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

                Receiver = new List <Reference>();

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

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

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

                break;

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

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

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

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

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

            default:
                ((fhirCsR4.Models.DomainResource) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Esempio 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 fhirCsR4.Models.Reference();
                Authority.DeserializeJson(ref reader, options);
                break;

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

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

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

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

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

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

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

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

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

                DoseStatusReason = new List <CodeableConcept>();

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

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

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

                break;

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

                Identifier = new List <Identifier>();

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

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

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

                break;

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

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

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

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

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

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

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

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

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

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

            default:
                ((fhirCsR4.Models.DomainResource) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Esempio n. 8
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)
                {
                    fhirCsR4.Models.MeasureReportGroupStratifierStratumComponent objComponent = new fhirCsR4.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 fhirCsR4.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)
                {
                    fhirCsR4.Models.MeasureReportGroupStratifierStratumPopulation objPopulation = new fhirCsR4.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 fhirCsR4.Models.CodeableConcept();
                Value.DeserializeJson(ref reader, options);
                break;

            default:
                ((fhirCsR4.Models.BackboneElement) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Esempio n. 9
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)
                {
                    fhirCsR4.Models.CompositionAttester objAttester = new fhirCsR4.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)
                {
                    fhirCsR4.Models.Reference objAuthor = new fhirCsR4.Models.Reference();
                    objAuthor.DeserializeJson(ref reader, options);
                    Author.Add(objAuthor);

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

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

                break;

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

                Category = new List <CodeableConcept>();

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

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

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

                break;

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

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

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

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

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

            case "encounter":
                Encounter = new fhirCsR4.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)
                {
                    fhirCsR4.Models.CompositionEvent objEvent = new fhirCsR4.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 fhirCsR4.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)
                {
                    fhirCsR4.Models.CompositionRelatesTo objRelatesTo = new fhirCsR4.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)
                {
                    fhirCsR4.Models.CompositionSection objSection = new fhirCsR4.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 fhirCsR4.Models.Element();
                _Status.DeserializeJson(ref reader, options);
                break;

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

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

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

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

            default:
                ((fhirCsR4.Models.DomainResource) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Esempio n. 10
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "administrableDoseForm":
                AdministrableDoseForm = new fhirCsR4.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)
                {
                    fhirCsR4.Models.MedicinalProductPharmaceuticalCharacteristics objCharacteristics = new fhirCsR4.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)
                {
                    fhirCsR4.Models.Reference objDevice = new fhirCsR4.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)
                {
                    fhirCsR4.Models.Identifier objIdentifier = new fhirCsR4.Models.Identifier();
                    objIdentifier.DeserializeJson(ref reader, options);
                    Identifier.Add(objIdentifier);

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

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

                break;

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

                Ingredient = new List <Reference>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    fhirCsR4.Models.Reference objIngredient = new fhirCsR4.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)
                {
                    fhirCsR4.Models.MedicinalProductPharmaceuticalRouteOfAdministration objRouteOfAdministration = new fhirCsR4.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 fhirCsR4.Models.CodeableConcept();
                UnitOfPresentation.DeserializeJson(ref reader, options);
                break;

            default:
                ((fhirCsR4.Models.DomainResource) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Esempio n. 11
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "beneficiary":
                Beneficiary = new fhirCsR4.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)
                {
                    fhirCsR4.Models.CoverageClass objClass = new fhirCsR4.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)
                {
                    fhirCsR4.Models.Reference objContract = new fhirCsR4.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)
                {
                    fhirCsR4.Models.CoverageCostToBeneficiary objCostToBeneficiary = new fhirCsR4.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 fhirCsR4.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)
                {
                    fhirCsR4.Models.Identifier objIdentifier = new fhirCsR4.Models.Identifier();
                    objIdentifier.DeserializeJson(ref reader, options);
                    Identifier.Add(objIdentifier);

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

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

                break;

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

            case "_network":
                _Network = new fhirCsR4.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)
                {
                    fhirCsR4.Models.Reference objPayor = new fhirCsR4.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 fhirCsR4.Models.Period();
                Period.DeserializeJson(ref reader, options);
                break;

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

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

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

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

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

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

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

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

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

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

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

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

            case "incidence":
                Incidence = new fhirCsR4.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)
                {
                    fhirCsR4.Models.MedicinalProductInteractionInteractant objInteractant = new fhirCsR4.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 fhirCsR4.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)
                {
                    fhirCsR4.Models.Reference objSubject = new fhirCsR4.Models.Reference();
                    objSubject.DeserializeJson(ref reader, options);
                    Subject.Add(objSubject);

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

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

                break;

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

            default:
                ((fhirCsR4.Models.DomainResource) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Esempio n. 13
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "container":
                Container = new fhirCsR4.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)
                {
                    fhirCsR4.Models.SpecimenDefinitionTypeTestedHandling objHandling = new fhirCsR4.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 fhirCsR4.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)
                {
                    fhirCsR4.Models.CodeableConcept objRejectionCriterion = new fhirCsR4.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 fhirCsR4.Models.Element();
                _Requirement.DeserializeJson(ref reader, options);
                break;

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

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

            default:
                ((fhirCsR4.Models.BackboneElement) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Esempio n. 14
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)
                {
                    fhirCsR4.Models.SpecimenDefinitionTypeTestedContainerAdditive objAdditive = new fhirCsR4.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 fhirCsR4.Models.CodeableConcept();
                Cap.DeserializeJson(ref reader, options);
                break;

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

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

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

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

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

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

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

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

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

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

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

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

                Author = new List <Reference>();

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

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

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

                break;

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

                Category = new List <CodeableConcept>();

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

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

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

                break;

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

                Content = new List <DocumentReferenceContent>();

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

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

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

                break;

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

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

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

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

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

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

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

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

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

                Identifier = new List <Identifier>();

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

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

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

                break;

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

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

                RelatesTo = new List <DocumentReferenceRelatesTo>();

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

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

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

                break;

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

                SecurityLabel = new List <CodeableConcept>();

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

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

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

                break;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                AuthorizationSupporting = new List <CodeableConcept>();

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

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

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

                break;

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

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

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

                Benefit = new List <CoverageEligibilityResponseInsuranceItemBenefit>();

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

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

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

                break;

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

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

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

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

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

                Modifier = new List <CodeableConcept>();

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

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

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

                break;

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

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

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

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

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

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

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

            default:
                ((fhirCsR4.Models.BackboneElement) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
        /// <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)
                {
                    fhirCsR4.Models.CodeableConcept objAlternateMaterial = new fhirCsR4.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)
                {
                    fhirCsR4.Models.Reference objDevice = new fhirCsR4.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)
                {
                    fhirCsR4.Models.Identifier objIdentifier = new fhirCsR4.Models.Identifier();
                    objIdentifier.DeserializeJson(ref reader, options);
                    Identifier.Add(objIdentifier);

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

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

                break;

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

                ManufacturedItem = new List <Reference>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    fhirCsR4.Models.Reference objManufacturedItem = new fhirCsR4.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)
                {
                    fhirCsR4.Models.Reference objManufacturer = new fhirCsR4.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)
                {
                    fhirCsR4.Models.CodeableConcept objMaterial = new fhirCsR4.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)
                {
                    fhirCsR4.Models.CodeableConcept objOtherCharacteristics = new fhirCsR4.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)
                {
                    fhirCsR4.Models.MedicinalProductPackagedPackageItem objPackageItem = new fhirCsR4.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 fhirCsR4.Models.ProdCharacteristic();
                PhysicalCharacteristics.DeserializeJson(ref reader, options);
                break;

            case "quantity":
                Quantity = new fhirCsR4.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)
                {
                    fhirCsR4.Models.ProductShelfLife objShelfLifeStorage = new fhirCsR4.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 fhirCsR4.Models.CodeableConcept();
                Type.DeserializeJson(ref reader, options);
                break;

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

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

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

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

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

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

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

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

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

                BodySite = new List <CodeableConcept>();

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

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

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

                break;

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

                Category = new List <CodeableConcept>();

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

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

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

                break;

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

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

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

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

                Evidence = new List <ConditionEvidence>();

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

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

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

                break;

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

                Identifier = new List <Identifier>();

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

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

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

                break;

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

                Note = new List <Annotation>();

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

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

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

                break;

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

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

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

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

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

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

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

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

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

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

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

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

                Stage = new List <ConditionStage>();

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

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

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

                break;

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

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

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

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

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

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

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

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

                Identifier = new List <Identifier>();

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

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

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

                break;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            case "collection":
                Collection = new fhirCsR4.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)
                {
                    fhirCsR4.Models.CodeableConcept objCondition = new fhirCsR4.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)
                {
                    fhirCsR4.Models.SpecimenContainer objContainer = new fhirCsR4.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)
                {
                    fhirCsR4.Models.Identifier objIdentifier = new fhirCsR4.Models.Identifier();
                    objIdentifier.DeserializeJson(ref reader, options);
                    Identifier.Add(objIdentifier);

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

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

                break;

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

                Note = new List <Annotation>();

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

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

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

                break;

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

                Parent = new List <Reference>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    fhirCsR4.Models.Reference objParent = new fhirCsR4.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)
                {
                    fhirCsR4.Models.SpecimenProcessing objProcessing = new fhirCsR4.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 fhirCsR4.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)
                {
                    fhirCsR4.Models.Reference objRequest = new fhirCsR4.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 fhirCsR4.Models.Element();
                _Status.DeserializeJson(ref reader, options);
                break;

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

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

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

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

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

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

                Manifestation = new List <CodeableConcept>();

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

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

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

                break;

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

                Note = new List <Annotation>();

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

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

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

                break;

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

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

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

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

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

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

                Coverage = new List <AccountCoverage>();

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

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

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

                break;

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

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

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

                Guarantor = new List <AccountGuarantor>();

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

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

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

                break;

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

                Identifier = new List <Identifier>();

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

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

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

                break;

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

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

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

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

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

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

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

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

                Subject = new List <Reference>();

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

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

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

                break;

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

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

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

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

                Linkage = new List <SubstanceNucleicAcidSubunitLinkage>();

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

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

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

                break;

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

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

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

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

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

                Sugar = new List <SubstanceNucleicAcidSubunitSugar>();

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

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

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

                break;

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

            default:
                ((fhirCsR4.Models.BackboneElement) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Esempio n. 26
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)
                {
                    fhirCsR4.Models.Reference objAuthor = new fhirCsR4.Models.Reference();
                    objAuthor.DeserializeJson(ref reader, options);
                    Author.Add(objAuthor);

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

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

                break;

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

                Content = new List <Reference>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    fhirCsR4.Models.Reference objContent = new fhirCsR4.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 fhirCsR4.Models.Element();
                _Created.DeserializeJson(ref reader, options);
                break;

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

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

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

                Identifier = new List <Identifier>();

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

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

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

                break;

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

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

                Recipient = new List <Reference>();

                while (reader.TokenType != JsonTokenType.EndArray)
                {
                    fhirCsR4.Models.Reference objRecipient = new fhirCsR4.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)
                {
                    fhirCsR4.Models.DocumentManifestRelated objRelated = new fhirCsR4.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 fhirCsR4.Models.Element();
                _Source.DeserializeJson(ref reader, options);
                break;

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

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

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

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

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