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

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

            case "timeDateTime":
                TimeDateTime = reader.GetString();
                break;

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

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

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

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

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

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

                Country = new List <CodeableConcept>();

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

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

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

                break;

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

            case "dateOfFirstAuthorization":
                DateOfFirstAuthorization = reader.GetString();
                break;

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

            case "holder":
                Holder = new fhirCsR4.Models.Reference();
                Holder.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 "internationalBirthDate":
                InternationalBirthDate = reader.GetString();
                break;

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

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

                Jurisdiction = new List <CodeableConcept>();

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

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

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

                break;

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

                JurisdictionalAuthorization = new List <MedicinalProductAuthorizationJurisdictionalAuthorization>();

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

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

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

                break;

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

            case "procedure":
                Procedure = new fhirCsR4.Models.MedicinalProductAuthorizationProcedure();
                Procedure.DeserializeJson(ref reader, options);
                break;

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

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

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

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

            case "statusDate":
                StatusDate = reader.GetString();
                break;

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

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

            case "validityPeriod":
                ValidityPeriod = new fhirCsR4.Models.Period();
                ValidityPeriod.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 "country":
                Country = new fhirCsR4.Models.CodeableConcept();
                Country.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 "jurisdiction":
                if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read()))
                {
                    throw new JsonException();
                }

                Jurisdiction = new List <CodeableConcept>();

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

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

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

                break;

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

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

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

                Additive = new List <Reference>();

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

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

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

                break;

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

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

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

            case "timeDateTime":
                TimeDateTime = reader.GetString();
                break;

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

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

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

                Code = new List <CodeableConcept>();

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

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

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

                break;

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

                Detail = new List <Reference>();

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

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

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

                break;

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

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