Пример #1
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "country":
                if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read()))
                {
                    throw new JsonException();
                }

                Country = new List <CodeableConcept>();

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

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

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

                break;

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

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

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

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

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

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

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

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

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

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

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

            case "text":
                Text = reader.GetString();
                break;

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

            default:
                ((Fhir.R4.Models.BackboneElement) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Пример #3
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "doseRange":
                DoseRange = new Fhir.R4.Models.Range();
                DoseRange.DeserializeJson(ref reader, options);
                break;

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

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

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

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

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

            default:
                ((Fhir.R4.Models.Element) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Пример #4
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "quantity":
                Quantity = new Fhir.R4.Models.Ratio();
                Quantity.DeserializeJson(ref reader, options);
                break;

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

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

            default:
                ((Fhir.R4.Models.BackboneElement) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Пример #5
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "concentration":
                Concentration = new Fhir.R4.Models.Ratio();
                Concentration.DeserializeJson(ref reader, options);
                break;

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

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

                Country = new List <CodeableConcept>();

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

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

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

                break;

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

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

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

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

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

                ReferenceStrength = new List <MedicinalProductIngredientSpecifiedSubstanceStrengthReferenceStrength>();

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

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

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

                break;

            default:
                ((Fhir.R4.Models.BackboneElement) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Пример #6
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "name":
                Name = reader.GetString();
                break;

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

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

                Part = new List <ParametersParameter>();

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

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

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

                break;

            case "resource":
                Resource = JsonSerializer.Deserialize <Fhir.R4.Models.Resource>(ref reader, options);
                break;

            case "valueBase64Binary":
                ValueBase64Binary = reader.GetString();
                break;

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

            case "valueBoolean":
                ValueBoolean = reader.GetBoolean();
                break;

            case "valueCanonical":
                ValueCanonical = reader.GetString();
                break;

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

            case "valueCode":
                ValueCode = reader.GetString();
                break;

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

            case "valueDate":
                ValueDate = reader.GetString();
                break;

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

            case "valueDateTime":
                ValueDateTime = reader.GetString();
                break;

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

            case "valueDecimal":
                ValueDecimal = reader.GetDecimal();
                break;

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

            case "valueId":
                ValueId = reader.GetString();
                break;

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

            case "valueInstant":
                ValueInstant = reader.GetString();
                break;

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

            case "valueInteger":
                ValueInteger = reader.GetInt32();
                break;

            case "valueMarkdown":
                ValueMarkdown = reader.GetString();
                break;

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

            case "valueOid":
                ValueOid = reader.GetString();
                break;

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

            case "valuePositiveInt":
                ValuePositiveInt = reader.GetUInt32();
                break;

            case "valueString":
                ValueString = reader.GetString();
                break;

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

            case "valueTime":
                ValueTime = reader.GetString();
                break;

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

            case "valueUnsignedInt":
                ValueUnsignedInt = reader.GetUInt32();
                break;

            case "valueUri":
                ValueUri = reader.GetString();
                break;

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

            case "valueUrl":
                ValueUrl = reader.GetString();
                break;

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

            case "valueUuid":
                ValueUuid = reader.GetGuid();
                break;

            case "valueAddress":
                ValueAddress = new Fhir.R4.Models.Address();
                ValueAddress.DeserializeJson(ref reader, options);
                break;

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

            case "valueAnnotation":
                ValueAnnotation = new Fhir.R4.Models.Annotation();
                ValueAnnotation.DeserializeJson(ref reader, options);
                break;

            case "valueAttachment":
                ValueAttachment = new Fhir.R4.Models.Attachment();
                ValueAttachment.DeserializeJson(ref reader, options);
                break;

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

            case "valueCoding":
                ValueCoding = new Fhir.R4.Models.Coding();
                ValueCoding.DeserializeJson(ref reader, options);
                break;

            case "valueContactPoint":
                ValueContactPoint = new Fhir.R4.Models.ContactPoint();
                ValueContactPoint.DeserializeJson(ref reader, options);
                break;

            case "valueCount":
                ValueCount = new Fhir.R4.Models.Count();
                ValueCount.DeserializeJson(ref reader, options);
                break;

            case "valueDistance":
                ValueDistance = new Fhir.R4.Models.Distance();
                ValueDistance.DeserializeJson(ref reader, options);
                break;

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

            case "valueHumanName":
                ValueHumanName = new Fhir.R4.Models.HumanName();
                ValueHumanName.DeserializeJson(ref reader, options);
                break;

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

            case "valueMoney":
                ValueMoney = new Fhir.R4.Models.Money();
                ValueMoney.DeserializeJson(ref reader, options);
                break;

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

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

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

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

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

            case "valueSampledData":
                ValueSampledData = new Fhir.R4.Models.SampledData();
                ValueSampledData.DeserializeJson(ref reader, options);
                break;

            case "valueSignature":
                ValueSignature = new Fhir.R4.Models.Signature();
                ValueSignature.DeserializeJson(ref reader, options);
                break;

            case "valueTiming":
                ValueTiming = new Fhir.R4.Models.Timing();
                ValueTiming.DeserializeJson(ref reader, options);
                break;

            case "valueContactDetail":
                ValueContactDetail = new Fhir.R4.Models.ContactDetail();
                ValueContactDetail.DeserializeJson(ref reader, options);
                break;

            case "valueContributor":
                ValueContributor = new Fhir.R4.Models.Contributor();
                ValueContributor.DeserializeJson(ref reader, options);
                break;

            case "valueDataRequirement":
                ValueDataRequirement = new Fhir.R4.Models.DataRequirement();
                ValueDataRequirement.DeserializeJson(ref reader, options);
                break;

            case "valueExpression":
                ValueExpression = new Fhir.R4.Models.Expression();
                ValueExpression.DeserializeJson(ref reader, options);
                break;

            case "valueParameterDefinition":
                ValueParameterDefinition = new Fhir.R4.Models.ParameterDefinition();
                ValueParameterDefinition.DeserializeJson(ref reader, options);
                break;

            case "valueRelatedArtifact":
                ValueRelatedArtifact = new Fhir.R4.Models.RelatedArtifact();
                ValueRelatedArtifact.DeserializeJson(ref reader, options);
                break;

            case "valueTriggerDefinition":
                ValueTriggerDefinition = new Fhir.R4.Models.TriggerDefinition();
                ValueTriggerDefinition.DeserializeJson(ref reader, options);
                break;

            case "valueUsageContext":
                ValueUsageContext = new Fhir.R4.Models.UsageContext();
                ValueUsageContext.DeserializeJson(ref reader, options);
                break;

            case "valueDosage":
                ValueDosage = new Fhir.R4.Models.Dosage();
                ValueDosage.DeserializeJson(ref reader, options);
                break;

            case "valueMeta":
                ValueMeta = new Fhir.R4.Models.Meta();
                ValueMeta.DeserializeJson(ref reader, options);
                break;

            default:
                ((Fhir.R4.Models.BackboneElement) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Пример #7
0
    /// <summary>
    /// Deserialize a JSON property
    /// </summary>
    public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
    {
      switch (propertyName)
      {
        case "amount":
          Amount = new Fhir.R4.Models.Ratio();
          Amount.DeserializeJson(ref reader, options);
          break;

        case "batch":
          Batch = new Fhir.R4.Models.MedicationBatch();
          Batch.DeserializeJson(ref reader, options);
          break;

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

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

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

          Identifier = new List<Identifier>();

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

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

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

          break;

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

          Ingredient = new List<MedicationIngredient>();

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

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

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

          break;

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

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

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

        default:
          ((Fhir.R4.Models.DomainResource)this).DeserializeJsonProperty(ref reader, options, propertyName);
          break;
      }
    }
Пример #8
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "url":
                Url = reader.GetString();
                break;

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

            case "valueBase64Binary":
                ValueBase64Binary = reader.GetString();
                break;

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

            case "valueBoolean":
                ValueBoolean = reader.GetBoolean();
                break;

            case "valueCanonical":
                ValueCanonical = reader.GetString();
                break;

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

            case "valueCode":
                ValueCode = reader.GetString();
                break;

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

            case "valueDate":
                ValueDate = reader.GetString();
                break;

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

            case "valueDateTime":
                ValueDateTime = reader.GetString();
                break;

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

            case "valueDecimal":
                ValueDecimal = reader.GetDecimal();
                break;

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

            case "valueId":
                ValueId = reader.GetString();
                break;

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

            case "valueInstant":
                ValueInstant = reader.GetString();
                break;

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

            case "valueInteger":
                ValueInteger = reader.GetInt32();
                break;

            case "valueMarkdown":
                ValueMarkdown = reader.GetString();
                break;

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

            case "valueOid":
                ValueOid = reader.GetString();
                break;

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

            case "valuePositiveInt":
                ValuePositiveInt = reader.GetUInt32();
                break;

            case "valueString":
                ValueString = reader.GetString();
                break;

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

            case "valueTime":
                ValueTime = reader.GetString();
                break;

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

            case "valueUnsignedInt":
                ValueUnsignedInt = reader.GetUInt32();
                break;

            case "valueUri":
                ValueUri = reader.GetString();
                break;

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

            case "valueUrl":
                ValueUrl = reader.GetString();
                break;

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

            case "valueUuid":
                ValueUuid = reader.GetGuid();
                break;

            case "valueAddress":
                ValueAddress = new Fhir.R4.Models.Address();
                ValueAddress.DeserializeJson(ref reader, options);
                break;

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

            case "valueAnnotation":
                ValueAnnotation = new Fhir.R4.Models.Annotation();
                ValueAnnotation.DeserializeJson(ref reader, options);
                break;

            case "valueAttachment":
                ValueAttachment = new Fhir.R4.Models.Attachment();
                ValueAttachment.DeserializeJson(ref reader, options);
                break;

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

            case "valueCoding":
                ValueCoding = new Fhir.R4.Models.Coding();
                ValueCoding.DeserializeJson(ref reader, options);
                break;

            case "valueContactPoint":
                ValueContactPoint = new Fhir.R4.Models.ContactPoint();
                ValueContactPoint.DeserializeJson(ref reader, options);
                break;

            case "valueCount":
                ValueCount = new Fhir.R4.Models.Count();
                ValueCount.DeserializeJson(ref reader, options);
                break;

            case "valueDistance":
                ValueDistance = new Fhir.R4.Models.Distance();
                ValueDistance.DeserializeJson(ref reader, options);
                break;

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

            case "valueHumanName":
                ValueHumanName = new Fhir.R4.Models.HumanName();
                ValueHumanName.DeserializeJson(ref reader, options);
                break;

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

            case "valueMoney":
                ValueMoney = new Fhir.R4.Models.Money();
                ValueMoney.DeserializeJson(ref reader, options);
                break;

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

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

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

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

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

            case "valueSampledData":
                ValueSampledData = new Fhir.R4.Models.SampledData();
                ValueSampledData.DeserializeJson(ref reader, options);
                break;

            case "valueSignature":
                ValueSignature = new Fhir.R4.Models.Signature();
                ValueSignature.DeserializeJson(ref reader, options);
                break;

            case "valueTiming":
                ValueTiming = new Fhir.R4.Models.Timing();
                ValueTiming.DeserializeJson(ref reader, options);
                break;

            case "valueContactDetail":
                ValueContactDetail = new Fhir.R4.Models.ContactDetail();
                ValueContactDetail.DeserializeJson(ref reader, options);
                break;

            case "valueContributor":
                ValueContributor = new Fhir.R4.Models.Contributor();
                ValueContributor.DeserializeJson(ref reader, options);
                break;

            case "valueDataRequirement":
                ValueDataRequirement = new Fhir.R4.Models.DataRequirement();
                ValueDataRequirement.DeserializeJson(ref reader, options);
                break;

            case "valueExpression":
                ValueExpression = new Fhir.R4.Models.Expression();
                ValueExpression.DeserializeJson(ref reader, options);
                break;

            case "valueParameterDefinition":
                ValueParameterDefinition = new Fhir.R4.Models.ParameterDefinition();
                ValueParameterDefinition.DeserializeJson(ref reader, options);
                break;

            case "valueRelatedArtifact":
                ValueRelatedArtifact = new Fhir.R4.Models.RelatedArtifact();
                ValueRelatedArtifact.DeserializeJson(ref reader, options);
                break;

            case "valueTriggerDefinition":
                ValueTriggerDefinition = new Fhir.R4.Models.TriggerDefinition();
                ValueTriggerDefinition.DeserializeJson(ref reader, options);
                break;

            case "valueUsageContext":
                ValueUsageContext = new Fhir.R4.Models.UsageContext();
                ValueUsageContext.DeserializeJson(ref reader, options);
                break;

            case "valueDosage":
                ValueDosage = new Fhir.R4.Models.Dosage();
                ValueDosage.DeserializeJson(ref reader, options);
                break;

            case "valueMeta":
                ValueMeta = new Fhir.R4.Models.Meta();
                ValueMeta.DeserializeJson(ref reader, options);
                break;

            default:
                ((Fhir.R4.Models.Element) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Пример #9
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "detailQuantity":
                DetailQuantity = new Fhir.R4.Models.Quantity();
                DetailQuantity.DeserializeJson(ref reader, options);
                break;

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

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

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

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

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

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

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

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

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

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

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

            default:
                ((Fhir.R4.Models.BackboneElement) this).DeserializeJsonProperty(ref reader, options, propertyName);
                break;
            }
        }
Пример #10
0
        /// <summary>
        /// Deserialize a JSON property
        /// </summary>
        public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName)
        {
            switch (propertyName)
            {
            case "additionalInstruction":
                if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read()))
                {
                    throw new JsonException();
                }

                AdditionalInstruction = new List <CodeableConcept>();

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

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

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

                break;

            case "asNeededBoolean":
                AsNeededBoolean = reader.GetBoolean();
                break;

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

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

                DoseAndRate = new List <DosageDoseAndRate>();

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

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

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

                break;

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

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

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

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

            case "patientInstruction":
                PatientInstruction = reader.GetString();
                break;

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

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

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

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

            case "text":
                Text = reader.GetString();
                break;

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

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

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

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

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

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

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

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

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

                TargetSpecies = new List <MedicinalProductPharmaceuticalRouteOfAdministrationTargetSpecies>();

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

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

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

                break;

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