/// <summary> /// Deserialize a JSON property /// </summary> public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName) { switch (propertyName) { case "resource": Resource = new fhirCsR4.Models.Reference(); Resource.DeserializeJson(ref reader, options); break; case "type": Type = reader.GetString(); break; case "_type": _Type = new fhirCsR4.Models.Element(); _Type.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 "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 "condition": Condition = new fhirCsR4.Models.Reference(); Condition.DeserializeJson(ref reader, options); break; case "rank": Rank = reader.GetUInt32(); break; case "role": Role = new fhirCsR4.Models.CodeableConcept(); Role.DeserializeJson(ref reader, options); break; default: ((fhirCsR4.Models.BackboneElement) this).DeserializeJsonProperty(ref reader, options, propertyName); break; } }
/// <summary> /// Deserialize a JSON property /// </summary> public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName) { switch (propertyName) { case "endpoint": Endpoint = reader.GetString(); break; case "_endpoint": _Endpoint = new fhirCsR4.Models.Element(); _Endpoint.DeserializeJson(ref reader, options); break; case "name": Name = reader.GetString(); break; case "_name": _Name = new fhirCsR4.Models.Element(); _Name.DeserializeJson(ref reader, options); break; case "receiver": Receiver = new fhirCsR4.Models.Reference(); Receiver.DeserializeJson(ref reader, options); break; case "target": Target = new fhirCsR4.Models.Reference(); Target.DeserializeJson(ref reader, options); break; default: ((fhirCsR4.Models.BackboneElement) this).DeserializeJsonProperty(ref reader, options, propertyName); break; } }
/// <summary> /// Deserialize a JSON property /// </summary> public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName) { switch (propertyName) { case "medicationCodeableConcept": MedicationCodeableConcept = new fhirCsR4.Models.CodeableConcept(); MedicationCodeableConcept.DeserializeJson(ref reader, options); break; case "medicationReference": MedicationReference = new fhirCsR4.Models.Reference(); MedicationReference.DeserializeJson(ref reader, options); break; case "therapyRelationshipType": TherapyRelationshipType = new fhirCsR4.Models.CodeableConcept(); TherapyRelationshipType.DeserializeJson(ref reader, options); break; default: ((fhirCsR4.Models.BackboneElement) this).DeserializeJsonProperty(ref reader, options, propertyName); break; } }
/// <summary> /// Deserialize a JSON property /// </summary> public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName) { switch (propertyName) { case "itemCodeableConcept": ItemCodeableConcept = new fhirCsR4.Models.CodeableConcept(); ItemCodeableConcept.DeserializeJson(ref reader, options); break; case "itemReference": ItemReference = new fhirCsR4.Models.Reference(); ItemReference.DeserializeJson(ref reader, options); break; case "quantity": Quantity = new fhirCsR4.Models.Quantity(); Quantity.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 "active": Active = reader.GetBoolean(); break; 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 "endpoint": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Endpoint = new List <Reference>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.Reference objEndpoint = new fhirCsR4.Models.Reference(); objEndpoint.DeserializeJson(ref reader, options); Endpoint.Add(objEndpoint); if (!reader.Read()) { throw new JsonException(); } } if (Endpoint.Count == 0) { Endpoint = null; } break; case "healthcareService": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } HealthcareService = new List <Reference>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.Reference objHealthcareService = new fhirCsR4.Models.Reference(); objHealthcareService.DeserializeJson(ref reader, options); HealthcareService.Add(objHealthcareService); if (!reader.Read()) { throw new JsonException(); } } if (HealthcareService.Count == 0) { HealthcareService = 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 "location": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Location = new List <Reference>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.Reference objLocation = new fhirCsR4.Models.Reference(); objLocation.DeserializeJson(ref reader, options); Location.Add(objLocation); if (!reader.Read()) { throw new JsonException(); } } if (Location.Count == 0) { Location = null; } break; case "network": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Network = new List <Reference>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.Reference objNetwork = new fhirCsR4.Models.Reference(); objNetwork.DeserializeJson(ref reader, options); Network.Add(objNetwork); if (!reader.Read()) { throw new JsonException(); } } if (Network.Count == 0) { Network = null; } break; case "organization": Organization = new fhirCsR4.Models.Reference(); Organization.DeserializeJson(ref reader, options); break; case "participatingOrganization": ParticipatingOrganization = new fhirCsR4.Models.Reference(); ParticipatingOrganization.DeserializeJson(ref reader, options); break; case "period": Period = new fhirCsR4.Models.Period(); Period.DeserializeJson(ref reader, options); break; case "specialty": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Specialty = new List <CodeableConcept>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.CodeableConcept objSpecialty = new fhirCsR4.Models.CodeableConcept(); objSpecialty.DeserializeJson(ref reader, options); Specialty.Add(objSpecialty); if (!reader.Read()) { throw new JsonException(); } } if (Specialty.Count == 0) { Specialty = null; } break; case "telecom": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Telecom = new List <ContactPoint>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.ContactPoint objTelecom = new fhirCsR4.Models.ContactPoint(); objTelecom.DeserializeJson(ref reader, options); Telecom.Add(objTelecom); if (!reader.Read()) { throw new JsonException(); } } if (Telecom.Count == 0) { Telecom = null; } 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 "reason": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Reason = new List <CodeableConcept>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.CodeableConcept objReason = new fhirCsR4.Models.CodeableConcept(); objReason.DeserializeJson(ref reader, options); Reason.Add(objReason); if (!reader.Read()) { throw new JsonException(); } } if (Reason.Count == 0) { Reason = null; } break; case "responsibleParty": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } ResponsibleParty = new List <Reference>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.Reference objResponsibleParty = new fhirCsR4.Models.Reference(); objResponsibleParty.DeserializeJson(ref reader, options); ResponsibleParty.Add(objResponsibleParty); if (!reader.Read()) { throw new JsonException(); } } if (ResponsibleParty.Count == 0) { ResponsibleParty = null; } break; case "type": Type = new fhirCsR4.Models.CodeableConcept(); Type.DeserializeJson(ref reader, options); break; case "wasSubstituted": WasSubstituted = reader.GetBoolean(); 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 "attestation": Attestation = new fhirCsR4.Models.VerificationResultAttestation(); Attestation.DeserializeJson(ref reader, options); break; case "failureAction": FailureAction = new fhirCsR4.Models.CodeableConcept(); FailureAction.DeserializeJson(ref reader, options); break; case "frequency": Frequency = new fhirCsR4.Models.Timing(); Frequency.DeserializeJson(ref reader, options); break; case "lastPerformed": LastPerformed = reader.GetString(); break; case "_lastPerformed": _LastPerformed = new fhirCsR4.Models.Element(); _LastPerformed.DeserializeJson(ref reader, options); break; case "need": Need = new fhirCsR4.Models.CodeableConcept(); Need.DeserializeJson(ref reader, options); break; case "nextScheduled": NextScheduled = reader.GetString(); break; case "_nextScheduled": _NextScheduled = new fhirCsR4.Models.Element(); _NextScheduled.DeserializeJson(ref reader, options); break; case "primarySource": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } PrimarySource = new List <VerificationResultPrimarySource>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.VerificationResultPrimarySource objPrimarySource = new fhirCsR4.Models.VerificationResultPrimarySource(); objPrimarySource.DeserializeJson(ref reader, options); PrimarySource.Add(objPrimarySource); if (!reader.Read()) { throw new JsonException(); } } if (PrimarySource.Count == 0) { PrimarySource = null; } break; case "status": Status = reader.GetString(); break; case "_status": _Status = new fhirCsR4.Models.Element(); _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 "target": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Target = new List <Reference>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.Reference objTarget = new fhirCsR4.Models.Reference(); objTarget.DeserializeJson(ref reader, options); Target.Add(objTarget); if (!reader.Read()) { throw new JsonException(); } } if (Target.Count == 0) { Target = null; } break; case "targetLocation": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } TargetLocation = new List <string>(); while (reader.TokenType != JsonTokenType.EndArray) { TargetLocation.Add(reader.GetString()); if (!reader.Read()) { throw new JsonException(); } } if (TargetLocation.Count == 0) { TargetLocation = null; } break; case "_targetLocation": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } _TargetLocation = new List <Element>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.Element obj_TargetLocation = new fhirCsR4.Models.Element(); obj_TargetLocation.DeserializeJson(ref reader, options); _TargetLocation.Add(obj_TargetLocation); if (!reader.Read()) { throw new JsonException(); } } if (_TargetLocation.Count == 0) { _TargetLocation = null; } break; case "validationProcess": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } ValidationProcess = new List <CodeableConcept>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.CodeableConcept objValidationProcess = new fhirCsR4.Models.CodeableConcept(); objValidationProcess.DeserializeJson(ref reader, options); ValidationProcess.Add(objValidationProcess); if (!reader.Read()) { throw new JsonException(); } } if (ValidationProcess.Count == 0) { ValidationProcess = null; } break; case "validationType": ValidationType = new fhirCsR4.Models.CodeableConcept(); ValidationType.DeserializeJson(ref reader, options); break; case "validator": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Validator = new List <VerificationResultValidator>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.VerificationResultValidator objValidator = new fhirCsR4.Models.VerificationResultValidator(); objValidator.DeserializeJson(ref reader, options); Validator.Add(objValidator); if (!reader.Read()) { throw new JsonException(); } } if (Validator.Count == 0) { Validator = null; } 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 "classification": Classification = new fhirCsR4.Models.CodeableConcept(); Classification.DeserializeJson(ref reader, options); break; case "frequencyOfOccurrence": FrequencyOfOccurrence = new fhirCsR4.Models.CodeableConcept(); FrequencyOfOccurrence.DeserializeJson(ref reader, options); break; case "population": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Population = new List <Population>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.Population objPopulation = new fhirCsR4.Models.Population(); objPopulation.DeserializeJson(ref reader, options); Population.Add(objPopulation); if (!reader.Read()) { throw new JsonException(); } } if (Population.Count == 0) { Population = null; } break; case "subject": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Subject = new List <Reference>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.Reference objSubject = new fhirCsR4.Models.Reference(); objSubject.DeserializeJson(ref reader, options); Subject.Add(objSubject); if (!reader.Read()) { throw new JsonException(); } } if (Subject.Count == 0) { Subject = null; } break; case "symptomConditionEffect": SymptomConditionEffect = new fhirCsR4.Models.CodeableConcept(); SymptomConditionEffect.DeserializeJson(ref reader, options); break; default: ((fhirCsR4.Models.DomainResource) this).DeserializeJsonProperty(ref reader, options, propertyName); break; } }
/// <summary> /// Deserialize a JSON property /// </summary> public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName) { switch (propertyName) { case "classification": Classification = new fhirCsR4.Models.CodeableConcept(); Classification.DeserializeJson(ref reader, options); break; case "domain": Domain = new fhirCsR4.Models.CodeableConcept(); Domain.DeserializeJson(ref reader, options); break; case "source": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Source = new List <Reference>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.Reference objSource = new fhirCsR4.Models.Reference(); objSource.DeserializeJson(ref reader, options); Source.Add(objSource); if (!reader.Read()) { throw new JsonException(); } } if (Source.Count == 0) { Source = null; } break; case "subtype": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Subtype = new List <CodeableConcept>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.CodeableConcept objSubtype = new fhirCsR4.Models.CodeableConcept(); objSubtype.DeserializeJson(ref reader, options); Subtype.Add(objSubtype); if (!reader.Read()) { throw new JsonException(); } } if (Subtype.Count == 0) { Subtype = null; } 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 "category": Category = new fhirCsR4.Models.CodeableConcept(); Category.DeserializeJson(ref reader, options); 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 "diagnosis": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Diagnosis = new List <CoverageEligibilityRequestItemDiagnosis>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.CoverageEligibilityRequestItemDiagnosis objDiagnosis = new fhirCsR4.Models.CoverageEligibilityRequestItemDiagnosis(); objDiagnosis.DeserializeJson(ref reader, options); Diagnosis.Add(objDiagnosis); if (!reader.Read()) { throw new JsonException(); } } if (Diagnosis.Count == 0) { Diagnosis = null; } break; case "facility": Facility = new fhirCsR4.Models.Reference(); Facility.DeserializeJson(ref reader, options); 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 "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 "quantity": Quantity = new fhirCsR4.Models.Quantity(); Quantity.DeserializeJson(ref reader, options); break; case "supportingInfoSequence": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } SupportingInfoSequence = new List <uint>(); while (reader.TokenType != JsonTokenType.EndArray) { SupportingInfoSequence.Add(reader.GetUInt32()); if (!reader.Read()) { throw new JsonException(); } } if (SupportingInfoSequence.Count == 0) { SupportingInfoSequence = null; } break; case "unitPrice": UnitPrice = new fhirCsR4.Models.Money(); UnitPrice.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 "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; } }
/// <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 "achievementStatus": AchievementStatus = new fhirCsR4.Models.CodeableConcept(); AchievementStatus.DeserializeJson(ref reader, options); break; case "addresses": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Addresses = new List <Reference>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.Reference objAddresses = new fhirCsR4.Models.Reference(); objAddresses.DeserializeJson(ref reader, options); Addresses.Add(objAddresses); if (!reader.Read()) { throw new JsonException(); } } if (Addresses.Count == 0) { Addresses = 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 "description": Description = new fhirCsR4.Models.CodeableConcept(); Description.DeserializeJson(ref reader, options); break; case "expressedBy": ExpressedBy = new fhirCsR4.Models.Reference(); ExpressedBy.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 "lifecycleStatus": LifecycleStatus = reader.GetString(); break; case "_lifecycleStatus": _LifecycleStatus = new fhirCsR4.Models.Element(); _LifecycleStatus.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 "outcomeCode": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } OutcomeCode = new List <CodeableConcept>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.CodeableConcept objOutcomeCode = new fhirCsR4.Models.CodeableConcept(); objOutcomeCode.DeserializeJson(ref reader, options); OutcomeCode.Add(objOutcomeCode); if (!reader.Read()) { throw new JsonException(); } } if (OutcomeCode.Count == 0) { OutcomeCode = null; } break; case "outcomeReference": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } OutcomeReference = new List <Reference>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.Reference objOutcomeReference = new fhirCsR4.Models.Reference(); objOutcomeReference.DeserializeJson(ref reader, options); OutcomeReference.Add(objOutcomeReference); if (!reader.Read()) { throw new JsonException(); } } if (OutcomeReference.Count == 0) { OutcomeReference = null; } break; case "priority": Priority = new fhirCsR4.Models.CodeableConcept(); Priority.DeserializeJson(ref reader, options); break; case "startDate": StartDate = reader.GetString(); break; case "_startDate": _StartDate = new fhirCsR4.Models.Element(); _StartDate.DeserializeJson(ref reader, options); break; case "startCodeableConcept": StartCodeableConcept = new fhirCsR4.Models.CodeableConcept(); StartCodeableConcept.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 "statusReason": StatusReason = reader.GetString(); break; case "_statusReason": _StatusReason = new fhirCsR4.Models.Element(); _StatusReason.DeserializeJson(ref reader, options); break; case "subject": Subject = new fhirCsR4.Models.Reference(); Subject.DeserializeJson(ref reader, options); break; case "target": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Target = new List <GoalTarget>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.GoalTarget objTarget = new fhirCsR4.Models.GoalTarget(); objTarget.DeserializeJson(ref reader, options); Target.Add(objTarget); if (!reader.Read()) { throw new JsonException(); } } if (Target.Count == 0) { Target = null; } 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 "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 "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 "patient": Patient = new fhirCsR4.Models.Reference(); Patient.DeserializeJson(ref reader, options); break; case "recommendation": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Recommendation = new List <ImmunizationRecommendationRecommendation>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.ImmunizationRecommendationRecommendation objRecommendation = new fhirCsR4.Models.ImmunizationRecommendationRecommendation(); objRecommendation.DeserializeJson(ref reader, options); Recommendation.Add(objRecommendation); if (!reader.Read()) { throw new JsonException(); } } if (Recommendation.Count == 0) { Recommendation = null; } 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 "created": Created = reader.GetString(); break; case "_created": _Created = new fhirCsR4.Models.Element(); _Created.DeserializeJson(ref reader, options); break; case "disposition": Disposition = reader.GetString(); break; case "_disposition": _Disposition = new fhirCsR4.Models.Element(); _Disposition.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 "organization": Organization = new fhirCsR4.Models.Reference(); Organization.DeserializeJson(ref reader, options); break; case "outcome": Outcome = reader.GetString(); break; case "_outcome": _Outcome = new fhirCsR4.Models.Element(); _Outcome.DeserializeJson(ref reader, options); break; case "request": Request = new fhirCsR4.Models.Reference(); Request.DeserializeJson(ref reader, options); break; case "requestProvider": RequestProvider = new fhirCsR4.Models.Reference(); RequestProvider.DeserializeJson(ref reader, options); break; case "status": Status = reader.GetString(); break; case "_status": _Status = new fhirCsR4.Models.Element(); _Status.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 "candidate": Candidate = new fhirCsR4.Models.Reference(); Candidate.DeserializeJson(ref reader, options); break; case "coverage": Coverage = new fhirCsR4.Models.Reference(); Coverage.DeserializeJson(ref reader, options); break; case "created": Created = reader.GetString(); break; case "_created": _Created = new fhirCsR4.Models.Element(); _Created.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 "insurer": Insurer = new fhirCsR4.Models.Reference(); Insurer.DeserializeJson(ref reader, options); break; case "provider": Provider = new fhirCsR4.Models.Reference(); Provider.DeserializeJson(ref reader, options); break; case "status": Status = reader.GetString(); break; case "_status": _Status = new fhirCsR4.Models.Element(); _Status.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 "created": Created = reader.GetString(); break; case "_created": _Created = new fhirCsR4.Models.Element(); _Created.DeserializeJson(ref reader, options); break; case "enterer": Enterer = new fhirCsR4.Models.Reference(); Enterer.DeserializeJson(ref reader, options); break; case "facility": Facility = new fhirCsR4.Models.Reference(); Facility.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 "insurance": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Insurance = new List <CoverageEligibilityRequestInsurance>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.CoverageEligibilityRequestInsurance objInsurance = new fhirCsR4.Models.CoverageEligibilityRequestInsurance(); objInsurance.DeserializeJson(ref reader, options); Insurance.Add(objInsurance); if (!reader.Read()) { throw new JsonException(); } } if (Insurance.Count == 0) { Insurance = null; } break; case "insurer": Insurer = new fhirCsR4.Models.Reference(); Insurer.DeserializeJson(ref reader, options); break; case "item": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Item = new List <CoverageEligibilityRequestItem>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.CoverageEligibilityRequestItem objItem = new fhirCsR4.Models.CoverageEligibilityRequestItem(); objItem.DeserializeJson(ref reader, options); Item.Add(objItem); if (!reader.Read()) { throw new JsonException(); } } if (Item.Count == 0) { Item = null; } break; case "patient": Patient = new fhirCsR4.Models.Reference(); Patient.DeserializeJson(ref reader, options); break; case "priority": Priority = new fhirCsR4.Models.CodeableConcept(); Priority.DeserializeJson(ref reader, options); break; case "provider": Provider = new fhirCsR4.Models.Reference(); Provider.DeserializeJson(ref reader, options); break; case "purpose": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Purpose = new List <string>(); while (reader.TokenType != JsonTokenType.EndArray) { Purpose.Add(reader.GetString()); if (!reader.Read()) { throw new JsonException(); } } if (Purpose.Count == 0) { Purpose = null; } break; case "_purpose": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } _Purpose = new List <Element>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.Element obj_Purpose = new fhirCsR4.Models.Element(); obj_Purpose.DeserializeJson(ref reader, options); _Purpose.Add(obj_Purpose); if (!reader.Read()) { throw new JsonException(); } } if (_Purpose.Count == 0) { _Purpose = null; } break; case "servicedDate": ServicedDate = reader.GetString(); break; case "_servicedDate": _ServicedDate = new fhirCsR4.Models.Element(); _ServicedDate.DeserializeJson(ref reader, options); break; case "servicedPeriod": ServicedPeriod = new fhirCsR4.Models.Period(); ServicedPeriod.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 "supportingInfo": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } SupportingInfo = new List <CoverageEligibilityRequestSupportingInfo>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.CoverageEligibilityRequestSupportingInfo objSupportingInfo = new fhirCsR4.Models.CoverageEligibilityRequestSupportingInfo(); objSupportingInfo.DeserializeJson(ref reader, options); SupportingInfo.Add(objSupportingInfo); if (!reader.Read()) { throw new JsonException(); } } if (SupportingInfo.Count == 0) { SupportingInfo = null; } 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 "author": Author = new fhirCsR4.Models.Reference(); Author.DeserializeJson(ref reader, options); break; case "authored": Authored = reader.GetString(); break; case "_authored": _Authored = new fhirCsR4.Models.Element(); _Authored.DeserializeJson(ref reader, options); 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 "encounter": Encounter = new fhirCsR4.Models.Reference(); Encounter.DeserializeJson(ref reader, options); break; case "identifier": Identifier = new fhirCsR4.Models.Identifier(); Identifier.DeserializeJson(ref reader, options); break; case "item": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Item = new List <QuestionnaireResponseItem>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.QuestionnaireResponseItem objItem = new fhirCsR4.Models.QuestionnaireResponseItem(); objItem.DeserializeJson(ref reader, options); Item.Add(objItem); if (!reader.Read()) { throw new JsonException(); } } if (Item.Count == 0) { Item = 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 "questionnaire": Questionnaire = reader.GetString(); break; case "_questionnaire": _Questionnaire = new fhirCsR4.Models.Element(); _Questionnaire.DeserializeJson(ref reader, options); break; case "source": Source = new fhirCsR4.Models.Reference(); 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; 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 "amountQuantity": AmountQuantity = new fhirCsR4.Models.Quantity(); AmountQuantity.DeserializeJson(ref reader, options); break; case "amountRange": AmountRange = new fhirCsR4.Models.Range(); AmountRange.DeserializeJson(ref reader, options); break; case "amountString": AmountString = reader.GetString(); break; case "_amountString": _AmountString = new fhirCsR4.Models.Element(); _AmountString.DeserializeJson(ref reader, options); break; case "amountType": AmountType = new fhirCsR4.Models.CodeableConcept(); AmountType.DeserializeJson(ref reader, options); break; case "interaction": Interaction = new fhirCsR4.Models.CodeableConcept(); Interaction.DeserializeJson(ref reader, options); break; case "organism": Organism = new fhirCsR4.Models.CodeableConcept(); Organism.DeserializeJson(ref reader, options); break; case "organismType": OrganismType = new fhirCsR4.Models.CodeableConcept(); OrganismType.DeserializeJson(ref reader, options); break; case "source": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Source = new List <Reference>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.Reference objSource = new fhirCsR4.Models.Reference(); objSource.DeserializeJson(ref reader, options); Source.Add(objSource); if (!reader.Read()) { throw new JsonException(); } } if (Source.Count == 0) { Source = null; } break; case "target": Target = new fhirCsR4.Models.Identifier(); Target.DeserializeJson(ref reader, options); break; case "type": Type = new fhirCsR4.Models.CodeableConcept(); Type.DeserializeJson(ref reader, options); break; default: ((fhirCsR4.Models.BackboneElement) this).DeserializeJsonProperty(ref reader, options, propertyName); break; } }
/// <summary> /// Deserialize a JSON property /// </summary> public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName) { switch (propertyName) { case "author": Author = new fhirCsR4.Models.Reference(); Author.DeserializeJson(ref reader, options); 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 "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 "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 "period": Period = new fhirCsR4.Models.Period(); Period.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; 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 "communicationMethod": CommunicationMethod = new fhirCsR4.Models.CodeableConcept(); CommunicationMethod.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 "onBehalfOf": OnBehalfOf = new fhirCsR4.Models.Reference(); OnBehalfOf.DeserializeJson(ref reader, options); break; case "proxyIdentityCertificate": ProxyIdentityCertificate = reader.GetString(); break; case "_proxyIdentityCertificate": _ProxyIdentityCertificate = new fhirCsR4.Models.Element(); _ProxyIdentityCertificate.DeserializeJson(ref reader, options); break; case "proxySignature": ProxySignature = new fhirCsR4.Models.Signature(); ProxySignature.DeserializeJson(ref reader, options); break; case "sourceIdentityCertificate": SourceIdentityCertificate = reader.GetString(); break; case "_sourceIdentityCertificate": _SourceIdentityCertificate = new fhirCsR4.Models.Element(); _SourceIdentityCertificate.DeserializeJson(ref reader, options); break; case "sourceSignature": SourceSignature = new fhirCsR4.Models.Signature(); SourceSignature.DeserializeJson(ref reader, options); break; case "who": Who = new fhirCsR4.Models.Reference(); Who.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 "arm": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Arm = new List <ResearchStudyArm>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.ResearchStudyArm objArm = new fhirCsR4.Models.ResearchStudyArm(); objArm.DeserializeJson(ref reader, options); Arm.Add(objArm); if (!reader.Read()) { throw new JsonException(); } } if (Arm.Count == 0) { Arm = 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 "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 "contact": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Contact = new List <ContactDetail>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.ContactDetail objContact = new fhirCsR4.Models.ContactDetail(); objContact.DeserializeJson(ref reader, options); Contact.Add(objContact); if (!reader.Read()) { throw new JsonException(); } } if (Contact.Count == 0) { Contact = null; } break; case "description": Description = reader.GetString(); break; case "_description": _Description = new fhirCsR4.Models.Element(); _Description.DeserializeJson(ref reader, options); break; case "enrollment": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Enrollment = new List <Reference>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.Reference objEnrollment = new fhirCsR4.Models.Reference(); objEnrollment.DeserializeJson(ref reader, options); Enrollment.Add(objEnrollment); if (!reader.Read()) { throw new JsonException(); } } if (Enrollment.Count == 0) { Enrollment = null; } break; case "focus": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Focus = new List <CodeableConcept>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.CodeableConcept objFocus = new fhirCsR4.Models.CodeableConcept(); objFocus.DeserializeJson(ref reader, options); Focus.Add(objFocus); if (!reader.Read()) { throw new JsonException(); } } if (Focus.Count == 0) { Focus = 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 "keyword": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Keyword = new List <CodeableConcept>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.CodeableConcept objKeyword = new fhirCsR4.Models.CodeableConcept(); objKeyword.DeserializeJson(ref reader, options); Keyword.Add(objKeyword); if (!reader.Read()) { throw new JsonException(); } } if (Keyword.Count == 0) { Keyword = null; } break; case "location": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Location = new List <CodeableConcept>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.CodeableConcept objLocation = new fhirCsR4.Models.CodeableConcept(); objLocation.DeserializeJson(ref reader, options); Location.Add(objLocation); if (!reader.Read()) { throw new JsonException(); } } if (Location.Count == 0) { Location = 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 "objective": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Objective = new List <ResearchStudyObjective>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.ResearchStudyObjective objObjective = new fhirCsR4.Models.ResearchStudyObjective(); objObjective.DeserializeJson(ref reader, options); Objective.Add(objObjective); if (!reader.Read()) { throw new JsonException(); } } if (Objective.Count == 0) { Objective = 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 "period": Period = new fhirCsR4.Models.Period(); Period.DeserializeJson(ref reader, options); break; case "phase": Phase = new fhirCsR4.Models.CodeableConcept(); Phase.DeserializeJson(ref reader, options); break; case "primaryPurposeType": PrimaryPurposeType = new fhirCsR4.Models.CodeableConcept(); PrimaryPurposeType.DeserializeJson(ref reader, options); break; case "principalInvestigator": PrincipalInvestigator = new fhirCsR4.Models.Reference(); PrincipalInvestigator.DeserializeJson(ref reader, options); break; case "protocol": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Protocol = new List <Reference>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.Reference objProtocol = new fhirCsR4.Models.Reference(); objProtocol.DeserializeJson(ref reader, options); Protocol.Add(objProtocol); if (!reader.Read()) { throw new JsonException(); } } if (Protocol.Count == 0) { Protocol = null; } break; case "reasonStopped": ReasonStopped = new fhirCsR4.Models.CodeableConcept(); ReasonStopped.DeserializeJson(ref reader, options); break; case "relatedArtifact": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } RelatedArtifact = new List <RelatedArtifact>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.RelatedArtifact objRelatedArtifact = new fhirCsR4.Models.RelatedArtifact(); objRelatedArtifact.DeserializeJson(ref reader, options); RelatedArtifact.Add(objRelatedArtifact); if (!reader.Read()) { throw new JsonException(); } } if (RelatedArtifact.Count == 0) { RelatedArtifact = null; } break; case "site": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Site = new List <Reference>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.Reference objSite = new fhirCsR4.Models.Reference(); objSite.DeserializeJson(ref reader, options); Site.Add(objSite); if (!reader.Read()) { throw new JsonException(); } } if (Site.Count == 0) { Site = null; } break; case "sponsor": Sponsor = new fhirCsR4.Models.Reference(); Sponsor.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 "title": Title = reader.GetString(); break; case "_title": _Title = new fhirCsR4.Models.Element(); _Title.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 "ageAge": AgeAge = new fhirCsR4.Models.Age(); AgeAge.DeserializeJson(ref reader, options); break; case "ageRange": AgeRange = new fhirCsR4.Models.Range(); AgeRange.DeserializeJson(ref reader, options); break; case "ageString": AgeString = reader.GetString(); break; case "_ageString": _AgeString = new fhirCsR4.Models.Element(); _AgeString.DeserializeJson(ref reader, options); break; case "bornPeriod": BornPeriod = new fhirCsR4.Models.Period(); BornPeriod.DeserializeJson(ref reader, options); break; case "bornDate": BornDate = reader.GetString(); break; case "_bornDate": _BornDate = new fhirCsR4.Models.Element(); _BornDate.DeserializeJson(ref reader, options); break; case "bornString": BornString = reader.GetString(); break; case "_bornString": _BornString = new fhirCsR4.Models.Element(); _BornString.DeserializeJson(ref reader, options); break; case "condition": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Condition = new List <FamilyMemberHistoryCondition>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.FamilyMemberHistoryCondition objCondition = new fhirCsR4.Models.FamilyMemberHistoryCondition(); objCondition.DeserializeJson(ref reader, options); Condition.Add(objCondition); if (!reader.Read()) { throw new JsonException(); } } if (Condition.Count == 0) { Condition = null; } break; case "dataAbsentReason": DataAbsentReason = new fhirCsR4.Models.CodeableConcept(); DataAbsentReason.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 "deceasedBoolean": DeceasedBoolean = reader.GetBoolean(); break; case "deceasedAge": DeceasedAge = new fhirCsR4.Models.Age(); DeceasedAge.DeserializeJson(ref reader, options); break; case "deceasedRange": DeceasedRange = new fhirCsR4.Models.Range(); DeceasedRange.DeserializeJson(ref reader, options); break; case "deceasedDate": DeceasedDate = reader.GetString(); break; case "_deceasedDate": _DeceasedDate = new fhirCsR4.Models.Element(); _DeceasedDate.DeserializeJson(ref reader, options); break; case "deceasedString": DeceasedString = reader.GetString(); break; case "_deceasedString": _DeceasedString = new fhirCsR4.Models.Element(); _DeceasedString.DeserializeJson(ref reader, options); break; case "estimatedAge": EstimatedAge = reader.GetBoolean(); 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 "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 "name": Name = reader.GetString(); break; case "_name": _Name = new fhirCsR4.Models.Element(); _Name.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 "patient": Patient = new fhirCsR4.Models.Reference(); Patient.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 "relationship": Relationship = new fhirCsR4.Models.CodeableConcept(); Relationship.DeserializeJson(ref reader, options); break; case "sex": Sex = new fhirCsR4.Models.CodeableConcept(); Sex.DeserializeJson(ref reader, options); break; case "status": Status = reader.GetString(); break; case "_status": _Status = new fhirCsR4.Models.Element(); _Status.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 "abnormalCodedValueSet": AbnormalCodedValueSet = new fhirCsR4.Models.Reference(); AbnormalCodedValueSet.DeserializeJson(ref reader, options); 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 "code": Code = new fhirCsR4.Models.CodeableConcept(); Code.DeserializeJson(ref reader, options); break; case "criticalCodedValueSet": CriticalCodedValueSet = new fhirCsR4.Models.Reference(); CriticalCodedValueSet.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 "method": Method = new fhirCsR4.Models.CodeableConcept(); Method.DeserializeJson(ref reader, options); break; case "multipleResultsAllowed": MultipleResultsAllowed = reader.GetBoolean(); break; case "normalCodedValueSet": NormalCodedValueSet = new fhirCsR4.Models.Reference(); NormalCodedValueSet.DeserializeJson(ref reader, options); break; case "permittedDataType": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } PermittedDataType = new List <string>(); while (reader.TokenType != JsonTokenType.EndArray) { PermittedDataType.Add(reader.GetString()); if (!reader.Read()) { throw new JsonException(); } } if (PermittedDataType.Count == 0) { PermittedDataType = null; } break; case "_permittedDataType": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } _PermittedDataType = new List <Element>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.Element obj_PermittedDataType = new fhirCsR4.Models.Element(); obj_PermittedDataType.DeserializeJson(ref reader, options); _PermittedDataType.Add(obj_PermittedDataType); if (!reader.Read()) { throw new JsonException(); } } if (_PermittedDataType.Count == 0) { _PermittedDataType = null; } break; case "preferredReportName": PreferredReportName = reader.GetString(); break; case "_preferredReportName": _PreferredReportName = new fhirCsR4.Models.Element(); _PreferredReportName.DeserializeJson(ref reader, options); break; case "qualifiedInterval": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } QualifiedInterval = new List <ObservationDefinitionQualifiedInterval>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.ObservationDefinitionQualifiedInterval objQualifiedInterval = new fhirCsR4.Models.ObservationDefinitionQualifiedInterval(); objQualifiedInterval.DeserializeJson(ref reader, options); QualifiedInterval.Add(objQualifiedInterval); if (!reader.Read()) { throw new JsonException(); } } if (QualifiedInterval.Count == 0) { QualifiedInterval = null; } break; case "quantitativeDetails": QuantitativeDetails = new fhirCsR4.Models.ObservationDefinitionQuantitativeDetails(); QuantitativeDetails.DeserializeJson(ref reader, options); break; case "validCodedValueSet": ValidCodedValueSet = new fhirCsR4.Models.Reference(); ValidCodedValueSet.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 "authorizingPrescription": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } AuthorizingPrescription = new List <Reference>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.Reference objAuthorizingPrescription = new fhirCsR4.Models.Reference(); objAuthorizingPrescription.DeserializeJson(ref reader, options); AuthorizingPrescription.Add(objAuthorizingPrescription); if (!reader.Read()) { throw new JsonException(); } } if (AuthorizingPrescription.Count == 0) { AuthorizingPrescription = null; } break; case "category": Category = new fhirCsR4.Models.CodeableConcept(); Category.DeserializeJson(ref reader, options); break; case "context": Context = new fhirCsR4.Models.Reference(); Context.DeserializeJson(ref reader, options); break; case "daysSupply": DaysSupply = new fhirCsR4.Models.Quantity(); DaysSupply.DeserializeJson(ref reader, options); break; case "destination": Destination = new fhirCsR4.Models.Reference(); Destination.DeserializeJson(ref reader, options); break; case "detectedIssue": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } DetectedIssue = new List <Reference>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.Reference objDetectedIssue = new fhirCsR4.Models.Reference(); objDetectedIssue.DeserializeJson(ref reader, options); DetectedIssue.Add(objDetectedIssue); if (!reader.Read()) { throw new JsonException(); } } if (DetectedIssue.Count == 0) { DetectedIssue = null; } break; case "dosageInstruction": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } DosageInstruction = new List <Dosage>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.Dosage objDosageInstruction = new fhirCsR4.Models.Dosage(); objDosageInstruction.DeserializeJson(ref reader, options); DosageInstruction.Add(objDosageInstruction); if (!reader.Read()) { throw new JsonException(); } } if (DosageInstruction.Count == 0) { DosageInstruction = null; } break; case "eventHistory": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } EventHistory = new List <Reference>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.Reference objEventHistory = new fhirCsR4.Models.Reference(); objEventHistory.DeserializeJson(ref reader, options); EventHistory.Add(objEventHistory); if (!reader.Read()) { throw new JsonException(); } } if (EventHistory.Count == 0) { EventHistory = 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 "location": Location = new fhirCsR4.Models.Reference(); Location.DeserializeJson(ref reader, options); break; case "medicationCodeableConcept": MedicationCodeableConcept = new fhirCsR4.Models.CodeableConcept(); MedicationCodeableConcept.DeserializeJson(ref reader, options); break; case "medicationReference": MedicationReference = new fhirCsR4.Models.Reference(); MedicationReference.DeserializeJson(ref reader, options); break; case "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 "performer": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Performer = new List <MedicationDispensePerformer>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.MedicationDispensePerformer objPerformer = new fhirCsR4.Models.MedicationDispensePerformer(); objPerformer.DeserializeJson(ref reader, options); Performer.Add(objPerformer); if (!reader.Read()) { throw new JsonException(); } } if (Performer.Count == 0) { Performer = null; } break; case "quantity": Quantity = new fhirCsR4.Models.Quantity(); Quantity.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 "statusReasonCodeableConcept": StatusReasonCodeableConcept = new fhirCsR4.Models.CodeableConcept(); StatusReasonCodeableConcept.DeserializeJson(ref reader, options); break; case "statusReasonReference": StatusReasonReference = new fhirCsR4.Models.Reference(); StatusReasonReference.DeserializeJson(ref reader, options); break; case "subject": Subject = new fhirCsR4.Models.Reference(); Subject.DeserializeJson(ref reader, options); break; case "substitution": Substitution = new fhirCsR4.Models.MedicationDispenseSubstitution(); Substitution.DeserializeJson(ref reader, options); break; case "supportingInformation": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } SupportingInformation = new List <Reference>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.Reference objSupportingInformation = new fhirCsR4.Models.Reference(); objSupportingInformation.DeserializeJson(ref reader, options); SupportingInformation.Add(objSupportingInformation); if (!reader.Read()) { throw new JsonException(); } } if (SupportingInformation.Count == 0) { SupportingInformation = null; } break; case "type": Type = new fhirCsR4.Models.CodeableConcept(); Type.DeserializeJson(ref reader, options); break; case "whenHandedOver": WhenHandedOver = reader.GetString(); break; case "_whenHandedOver": _WhenHandedOver = new fhirCsR4.Models.Element(); _WhenHandedOver.DeserializeJson(ref reader, options); break; case "whenPrepared": WhenPrepared = reader.GetString(); break; case "_whenPrepared": _WhenPrepared = new fhirCsR4.Models.Element(); _WhenPrepared.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 "actualArm": ActualArm = reader.GetString(); break; case "_actualArm": _ActualArm = new fhirCsR4.Models.Element(); _ActualArm.DeserializeJson(ref reader, options); break; case "assignedArm": AssignedArm = reader.GetString(); break; case "_assignedArm": _AssignedArm = new fhirCsR4.Models.Element(); _AssignedArm.DeserializeJson(ref reader, options); break; case "consent": Consent = new fhirCsR4.Models.Reference(); Consent.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 "individual": Individual = new fhirCsR4.Models.Reference(); Individual.DeserializeJson(ref reader, options); break; case "period": Period = new fhirCsR4.Models.Period(); Period.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 "study": Study = new fhirCsR4.Models.Reference(); Study.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 "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 "code": Code = new fhirCsR4.Models.CodeableConcept(); Code.DeserializeJson(ref reader, options); break; case "conclusion": Conclusion = reader.GetString(); break; case "_conclusion": _Conclusion = new fhirCsR4.Models.Element(); _Conclusion.DeserializeJson(ref reader, options); break; case "conclusionCode": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } ConclusionCode = new List <CodeableConcept>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.CodeableConcept objConclusionCode = new fhirCsR4.Models.CodeableConcept(); objConclusionCode.DeserializeJson(ref reader, options); ConclusionCode.Add(objConclusionCode); if (!reader.Read()) { throw new JsonException(); } } if (ConclusionCode.Count == 0) { ConclusionCode = null; } break; case "effectiveDateTime": EffectiveDateTime = reader.GetString(); break; case "_effectiveDateTime": _EffectiveDateTime = new fhirCsR4.Models.Element(); _EffectiveDateTime.DeserializeJson(ref reader, options); break; case "effectivePeriod": EffectivePeriod = new fhirCsR4.Models.Period(); EffectivePeriod.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 "imagingStudy": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } ImagingStudy = new List <Reference>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.Reference objImagingStudy = new fhirCsR4.Models.Reference(); objImagingStudy.DeserializeJson(ref reader, options); ImagingStudy.Add(objImagingStudy); if (!reader.Read()) { throw new JsonException(); } } if (ImagingStudy.Count == 0) { ImagingStudy = null; } break; case "issued": Issued = reader.GetString(); break; case "_issued": _Issued = new fhirCsR4.Models.Element(); _Issued.DeserializeJson(ref reader, options); break; case "media": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Media = new List <DiagnosticReportMedia>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.DiagnosticReportMedia objMedia = new fhirCsR4.Models.DiagnosticReportMedia(); objMedia.DeserializeJson(ref reader, options); Media.Add(objMedia); if (!reader.Read()) { throw new JsonException(); } } if (Media.Count == 0) { Media = null; } break; case "performer": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Performer = new List <Reference>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.Reference objPerformer = new fhirCsR4.Models.Reference(); objPerformer.DeserializeJson(ref reader, options); Performer.Add(objPerformer); if (!reader.Read()) { throw new JsonException(); } } if (Performer.Count == 0) { Performer = null; } break; case "presentedForm": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } PresentedForm = new List <Attachment>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.Attachment objPresentedForm = new fhirCsR4.Models.Attachment(); objPresentedForm.DeserializeJson(ref reader, options); PresentedForm.Add(objPresentedForm); if (!reader.Read()) { throw new JsonException(); } } if (PresentedForm.Count == 0) { PresentedForm = null; } break; case "result": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Result = new List <Reference>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.Reference objResult = new fhirCsR4.Models.Reference(); objResult.DeserializeJson(ref reader, options); Result.Add(objResult); if (!reader.Read()) { throw new JsonException(); } } if (Result.Count == 0) { Result = null; } break; case "resultsInterpreter": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } ResultsInterpreter = new List <Reference>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.Reference objResultsInterpreter = new fhirCsR4.Models.Reference(); objResultsInterpreter.DeserializeJson(ref reader, options); ResultsInterpreter.Add(objResultsInterpreter); if (!reader.Read()) { throw new JsonException(); } } if (ResultsInterpreter.Count == 0) { ResultsInterpreter = null; } break; case "specimen": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Specimen = new List <Reference>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.Reference objSpecimen = new fhirCsR4.Models.Reference(); objSpecimen.DeserializeJson(ref reader, options); Specimen.Add(objSpecimen); if (!reader.Read()) { throw new JsonException(); } } if (Specimen.Count == 0) { Specimen = 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; 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 "contraindicatedVaccineCode": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } ContraindicatedVaccineCode = new List <CodeableConcept>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.CodeableConcept objContraindicatedVaccineCode = new fhirCsR4.Models.CodeableConcept(); objContraindicatedVaccineCode.DeserializeJson(ref reader, options); ContraindicatedVaccineCode.Add(objContraindicatedVaccineCode); if (!reader.Read()) { throw new JsonException(); } } if (ContraindicatedVaccineCode.Count == 0) { ContraindicatedVaccineCode = null; } break; case "dateCriterion": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } DateCriterion = new List <ImmunizationRecommendationRecommendationDateCriterion>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.ImmunizationRecommendationRecommendationDateCriterion objDateCriterion = new fhirCsR4.Models.ImmunizationRecommendationRecommendationDateCriterion(); objDateCriterion.DeserializeJson(ref reader, options); DateCriterion.Add(objDateCriterion); if (!reader.Read()) { throw new JsonException(); } } if (DateCriterion.Count == 0) { DateCriterion = null; } 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 "forecastReason": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } ForecastReason = new List <CodeableConcept>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.CodeableConcept objForecastReason = new fhirCsR4.Models.CodeableConcept(); objForecastReason.DeserializeJson(ref reader, options); ForecastReason.Add(objForecastReason); if (!reader.Read()) { throw new JsonException(); } } if (ForecastReason.Count == 0) { ForecastReason = null; } break; case "forecastStatus": ForecastStatus = new fhirCsR4.Models.CodeableConcept(); ForecastStatus.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 "supportingImmunization": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } SupportingImmunization = new List <Reference>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.Reference objSupportingImmunization = new fhirCsR4.Models.Reference(); objSupportingImmunization.DeserializeJson(ref reader, options); SupportingImmunization.Add(objSupportingImmunization); if (!reader.Read()) { throw new JsonException(); } } if (SupportingImmunization.Count == 0) { SupportingImmunization = null; } break; case "supportingPatientInformation": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } SupportingPatientInformation = new List <Reference>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.Reference objSupportingPatientInformation = new fhirCsR4.Models.Reference(); objSupportingPatientInformation.DeserializeJson(ref reader, options); SupportingPatientInformation.Add(objSupportingPatientInformation); if (!reader.Read()) { throw new JsonException(); } } if (SupportingPatientInformation.Count == 0) { SupportingPatientInformation = null; } break; case "targetDisease": TargetDisease = new fhirCsR4.Models.CodeableConcept(); TargetDisease.DeserializeJson(ref reader, options); break; case "vaccineCode": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } VaccineCode = new List <CodeableConcept>(); while (reader.TokenType != JsonTokenType.EndArray) { fhirCsR4.Models.CodeableConcept objVaccineCode = new fhirCsR4.Models.CodeableConcept(); objVaccineCode.DeserializeJson(ref reader, options); VaccineCode.Add(objVaccineCode); if (!reader.Read()) { throw new JsonException(); } } if (VaccineCode.Count == 0) { VaccineCode = null; } break; default: ((fhirCsR4.Models.BackboneElement) this).DeserializeJsonProperty(ref reader, options, propertyName); break; } }