/// <summary> /// Deserialize a JSON property /// </summary> public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName) { switch (propertyName) { case "about": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } About = new List <Reference>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.Reference objAbout = new Fhir.R4.Models.Reference(); objAbout.DeserializeJson(ref reader, options); About.Add(objAbout); if (!reader.Read()) { throw new JsonException(); } } if (About.Count == 0) { About = null; } break; case "authoredOn": AuthoredOn = reader.GetString(); break; case "_authoredOn": _AuthoredOn = new Fhir.R4.Models.Element(); _AuthoredOn.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) { Fhir.R4.Models.Reference objBasedOn = new Fhir.R4.Models.Reference(); objBasedOn.DeserializeJson(ref reader, options); BasedOn.Add(objBasedOn); if (!reader.Read()) { throw new JsonException(); } } if (BasedOn.Count == 0) { BasedOn = null; } break; case "category": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Category = new List <CodeableConcept>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.CodeableConcept objCategory = new Fhir.R4.Models.CodeableConcept(); objCategory.DeserializeJson(ref reader, options); Category.Add(objCategory); if (!reader.Read()) { throw new JsonException(); } } if (Category.Count == 0) { Category = null; } break; case "doNotPerform": DoNotPerform = reader.GetBoolean(); break; case "encounter": Encounter = new Fhir.R4.Models.Reference(); Encounter.DeserializeJson(ref reader, options); break; case "groupIdentifier": GroupIdentifier = new Fhir.R4.Models.Identifier(); GroupIdentifier.DeserializeJson(ref reader, options); break; case "identifier": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Identifier = new List <Identifier>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.Identifier objIdentifier = new Fhir.R4.Models.Identifier(); objIdentifier.DeserializeJson(ref reader, options); Identifier.Add(objIdentifier); if (!reader.Read()) { throw new JsonException(); } } if (Identifier.Count == 0) { Identifier = null; } break; case "medium": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Medium = new List <CodeableConcept>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.CodeableConcept objMedium = new Fhir.R4.Models.CodeableConcept(); objMedium.DeserializeJson(ref reader, options); Medium.Add(objMedium); if (!reader.Read()) { throw new JsonException(); } } if (Medium.Count == 0) { Medium = null; } break; case "note": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Note = new List <Annotation>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.Annotation objNote = new Fhir.R4.Models.Annotation(); objNote.DeserializeJson(ref reader, options); Note.Add(objNote); if (!reader.Read()) { throw new JsonException(); } } if (Note.Count == 0) { Note = null; } break; case "occurrenceDateTime": OccurrenceDateTime = reader.GetString(); break; case "_occurrenceDateTime": _OccurrenceDateTime = new Fhir.R4.Models.Element(); _OccurrenceDateTime.DeserializeJson(ref reader, options); break; case "occurrencePeriod": OccurrencePeriod = new Fhir.R4.Models.Period(); OccurrencePeriod.DeserializeJson(ref reader, options); break; case "payload": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Payload = new List <CommunicationRequestPayload>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.CommunicationRequestPayload objPayload = new Fhir.R4.Models.CommunicationRequestPayload(); objPayload.DeserializeJson(ref reader, options); Payload.Add(objPayload); if (!reader.Read()) { throw new JsonException(); } } if (Payload.Count == 0) { Payload = null; } break; case "priority": Priority = reader.GetString(); break; case "_priority": _Priority = new Fhir.R4.Models.Element(); _Priority.DeserializeJson(ref reader, options); break; case "reasonCode": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } ReasonCode = new List <CodeableConcept>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.CodeableConcept objReasonCode = new Fhir.R4.Models.CodeableConcept(); objReasonCode.DeserializeJson(ref reader, options); ReasonCode.Add(objReasonCode); if (!reader.Read()) { throw new JsonException(); } } if (ReasonCode.Count == 0) { ReasonCode = null; } break; case "reasonReference": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } ReasonReference = new List <Reference>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.Reference objReasonReference = new Fhir.R4.Models.Reference(); objReasonReference.DeserializeJson(ref reader, options); ReasonReference.Add(objReasonReference); if (!reader.Read()) { throw new JsonException(); } } if (ReasonReference.Count == 0) { ReasonReference = null; } break; case "recipient": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Recipient = new List <Reference>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.Reference objRecipient = new Fhir.R4.Models.Reference(); objRecipient.DeserializeJson(ref reader, options); Recipient.Add(objRecipient); if (!reader.Read()) { throw new JsonException(); } } if (Recipient.Count == 0) { Recipient = null; } break; case "replaces": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Replaces = new List <Reference>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.Reference objReplaces = new Fhir.R4.Models.Reference(); objReplaces.DeserializeJson(ref reader, options); Replaces.Add(objReplaces); if (!reader.Read()) { throw new JsonException(); } } if (Replaces.Count == 0) { Replaces = null; } break; case "requester": Requester = new Fhir.R4.Models.Reference(); Requester.DeserializeJson(ref reader, options); break; case "sender": Sender = new Fhir.R4.Models.Reference(); Sender.DeserializeJson(ref reader, options); break; case "status": Status = reader.GetString(); break; case "_status": _Status = new Fhir.R4.Models.Element(); _Status.DeserializeJson(ref reader, options); break; case "statusReason": StatusReason = new Fhir.R4.Models.CodeableConcept(); StatusReason.DeserializeJson(ref reader, options); break; case "subject": Subject = new Fhir.R4.Models.Reference(); Subject.DeserializeJson(ref reader, options); break; default: ((Fhir.R4.Models.DomainResource) this).DeserializeJsonProperty(ref reader, options, propertyName); break; } }
/// <summary> /// Deserialize a JSON property /// </summary> public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName) { switch (propertyName) { case "dataRequirement": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } DataRequirement = new List <DataRequirement>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.DataRequirement objDataRequirement = new Fhir.R4.Models.DataRequirement(); objDataRequirement.DeserializeJson(ref reader, options); DataRequirement.Add(objDataRequirement); if (!reader.Read()) { throw new JsonException(); } } if (DataRequirement.Count == 0) { DataRequirement = null; } break; case "encounter": Encounter = new Fhir.R4.Models.Reference(); Encounter.DeserializeJson(ref reader, options); break; case "evaluationMessage": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } EvaluationMessage = new List <Reference>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.Reference objEvaluationMessage = new Fhir.R4.Models.Reference(); objEvaluationMessage.DeserializeJson(ref reader, options); EvaluationMessage.Add(objEvaluationMessage); if (!reader.Read()) { throw new JsonException(); } } if (EvaluationMessage.Count == 0) { EvaluationMessage = null; } break; case "identifier": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Identifier = new List <Identifier>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.Identifier objIdentifier = new Fhir.R4.Models.Identifier(); objIdentifier.DeserializeJson(ref reader, options); Identifier.Add(objIdentifier); if (!reader.Read()) { throw new JsonException(); } } if (Identifier.Count == 0) { Identifier = null; } break; case "moduleUri": ModuleUri = reader.GetString(); break; case "_moduleUri": _ModuleUri = new Fhir.R4.Models.Element(); _ModuleUri.DeserializeJson(ref reader, options); break; case "moduleCanonical": ModuleCanonical = reader.GetString(); break; case "_moduleCanonical": _ModuleCanonical = new Fhir.R4.Models.Element(); _ModuleCanonical.DeserializeJson(ref reader, options); break; case "moduleCodeableConcept": ModuleCodeableConcept = new Fhir.R4.Models.CodeableConcept(); ModuleCodeableConcept.DeserializeJson(ref reader, options); break; case "note": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Note = new List <Annotation>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.Annotation objNote = new Fhir.R4.Models.Annotation(); objNote.DeserializeJson(ref reader, options); Note.Add(objNote); if (!reader.Read()) { throw new JsonException(); } } if (Note.Count == 0) { Note = null; } break; case "occurrenceDateTime": OccurrenceDateTime = reader.GetString(); break; case "_occurrenceDateTime": _OccurrenceDateTime = new Fhir.R4.Models.Element(); _OccurrenceDateTime.DeserializeJson(ref reader, options); break; case "outputParameters": OutputParameters = new Fhir.R4.Models.Reference(); OutputParameters.DeserializeJson(ref reader, options); break; case "performer": Performer = new Fhir.R4.Models.Reference(); Performer.DeserializeJson(ref reader, options); break; case "reasonCode": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } ReasonCode = new List <CodeableConcept>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.CodeableConcept objReasonCode = new Fhir.R4.Models.CodeableConcept(); objReasonCode.DeserializeJson(ref reader, options); ReasonCode.Add(objReasonCode); if (!reader.Read()) { throw new JsonException(); } } if (ReasonCode.Count == 0) { ReasonCode = null; } break; case "reasonReference": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } ReasonReference = new List <Reference>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.Reference objReasonReference = new Fhir.R4.Models.Reference(); objReasonReference.DeserializeJson(ref reader, options); ReasonReference.Add(objReasonReference); if (!reader.Read()) { throw new JsonException(); } } if (ReasonReference.Count == 0) { ReasonReference = null; } break; case "requestIdentifier": RequestIdentifier = new Fhir.R4.Models.Identifier(); RequestIdentifier.DeserializeJson(ref reader, options); break; case "result": Result = new Fhir.R4.Models.Reference(); Result.DeserializeJson(ref reader, options); break; case "status": Status = reader.GetString(); break; case "_status": _Status = new Fhir.R4.Models.Element(); _Status.DeserializeJson(ref reader, options); break; case "subject": Subject = new Fhir.R4.Models.Reference(); Subject.DeserializeJson(ref reader, options); break; default: ((Fhir.R4.Models.DomainResource) this).DeserializeJsonProperty(ref reader, options, propertyName); break; } }
/// <summary> /// Deserialize a JSON property /// </summary> public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName) { switch (propertyName) { case "encounter": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Encounter = new List <Reference>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.Reference objEncounter = new Fhir.R4.Models.Reference(); objEncounter.DeserializeJson(ref reader, options); Encounter.Add(objEncounter); if (!reader.Read()) { throw new JsonException(); } } if (Encounter.Count == 0) { Encounter = null; } break; case "event": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Event = new List <CodeableConcept>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.CodeableConcept objEvent = new Fhir.R4.Models.CodeableConcept(); objEvent.DeserializeJson(ref reader, options); Event.Add(objEvent); if (!reader.Read()) { throw new JsonException(); } } if (Event.Count == 0) { Event = null; } break; case "facilityType": FacilityType = new Fhir.R4.Models.CodeableConcept(); FacilityType.DeserializeJson(ref reader, options); break; case "period": Period = new Fhir.R4.Models.Period(); Period.DeserializeJson(ref reader, options); break; case "practiceSetting": PracticeSetting = new Fhir.R4.Models.CodeableConcept(); PracticeSetting.DeserializeJson(ref reader, options); break; case "related": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Related = new List <Reference>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.Reference objRelated = new Fhir.R4.Models.Reference(); objRelated.DeserializeJson(ref reader, options); Related.Add(objRelated); if (!reader.Read()) { throw new JsonException(); } } if (Related.Count == 0) { Related = null; } break; case "sourcePatientInfo": SourcePatientInfo = new Fhir.R4.Models.Reference(); SourcePatientInfo.DeserializeJson(ref reader, options); break; default: ((Fhir.R4.Models.BackboneElement) this).DeserializeJsonProperty(ref reader, options, propertyName); break; } }
/// <summary> /// Deserialize a JSON property /// </summary> public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName) { switch (propertyName) { case "actualArm": ActualArm = reader.GetString(); break; case "_actualArm": _ActualArm = new Fhir.R4.Models.Element(); _ActualArm.DeserializeJson(ref reader, options); break; case "assignedArm": AssignedArm = reader.GetString(); break; case "_assignedArm": _AssignedArm = new Fhir.R4.Models.Element(); _AssignedArm.DeserializeJson(ref reader, options); break; case "consent": Consent = new Fhir.R4.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) { Fhir.R4.Models.Identifier objIdentifier = new Fhir.R4.Models.Identifier(); objIdentifier.DeserializeJson(ref reader, options); Identifier.Add(objIdentifier); if (!reader.Read()) { throw new JsonException(); } } if (Identifier.Count == 0) { Identifier = null; } break; case "individual": Individual = new Fhir.R4.Models.Reference(); Individual.DeserializeJson(ref reader, options); break; case "period": Period = new Fhir.R4.Models.Period(); Period.DeserializeJson(ref reader, options); break; case "status": Status = reader.GetString(); break; case "_status": _Status = new Fhir.R4.Models.Element(); _Status.DeserializeJson(ref reader, options); break; case "study": Study = new Fhir.R4.Models.Reference(); Study.DeserializeJson(ref reader, options); break; default: ((Fhir.R4.Models.DomainResource) this).DeserializeJsonProperty(ref reader, options, propertyName); break; } }
/// <summary> /// Deserialize a JSON property /// </summary> public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName) { switch (propertyName) { case "communicationMethod": CommunicationMethod = new Fhir.R4.Models.CodeableConcept(); CommunicationMethod.DeserializeJson(ref reader, options); break; case "date": Date = reader.GetString(); break; case "_date": _Date = new Fhir.R4.Models.Element(); _Date.DeserializeJson(ref reader, options); break; case "onBehalfOf": OnBehalfOf = new Fhir.R4.Models.Reference(); OnBehalfOf.DeserializeJson(ref reader, options); break; case "proxyIdentityCertificate": ProxyIdentityCertificate = reader.GetString(); break; case "_proxyIdentityCertificate": _ProxyIdentityCertificate = new Fhir.R4.Models.Element(); _ProxyIdentityCertificate.DeserializeJson(ref reader, options); break; case "proxySignature": ProxySignature = new Fhir.R4.Models.Signature(); ProxySignature.DeserializeJson(ref reader, options); break; case "sourceIdentityCertificate": SourceIdentityCertificate = reader.GetString(); break; case "_sourceIdentityCertificate": _SourceIdentityCertificate = new Fhir.R4.Models.Element(); _SourceIdentityCertificate.DeserializeJson(ref reader, options); break; case "sourceSignature": SourceSignature = new Fhir.R4.Models.Signature(); SourceSignature.DeserializeJson(ref reader, options); break; case "who": Who = new Fhir.R4.Models.Reference(); Who.DeserializeJson(ref reader, options); break; default: ((Fhir.R4.Models.BackboneElement) this).DeserializeJsonProperty(ref reader, options, propertyName); break; } }
/// <summary> /// Deserialize a JSON property /// </summary> public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName) { switch (propertyName) { case "author": Author = new Fhir.R4.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) { Fhir.R4.Models.CodeableConcept objCategory = new Fhir.R4.Models.CodeableConcept(); objCategory.DeserializeJson(ref reader, options); Category.Add(objCategory); if (!reader.Read()) { throw new JsonException(); } } if (Category.Count == 0) { Category = null; } break; case "code": Code = new Fhir.R4.Models.CodeableConcept(); Code.DeserializeJson(ref reader, options); break; case "encounter": Encounter = new Fhir.R4.Models.Reference(); Encounter.DeserializeJson(ref reader, options); break; case "identifier": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Identifier = new List <Identifier>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.Identifier objIdentifier = new Fhir.R4.Models.Identifier(); objIdentifier.DeserializeJson(ref reader, options); Identifier.Add(objIdentifier); if (!reader.Read()) { throw new JsonException(); } } if (Identifier.Count == 0) { Identifier = null; } break; case "period": Period = new Fhir.R4.Models.Period(); Period.DeserializeJson(ref reader, options); break; case "status": Status = reader.GetString(); break; case "_status": _Status = new Fhir.R4.Models.Element(); _Status.DeserializeJson(ref reader, options); break; case "subject": Subject = new Fhir.R4.Models.Reference(); Subject.DeserializeJson(ref reader, options); break; default: ((Fhir.R4.Models.DomainResource) this).DeserializeJsonProperty(ref reader, options, propertyName); break; } }
/// <summary> /// Deserialize a JSON property /// </summary> public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName) { switch (propertyName) { case "identifier": Identifier = new Fhir.R4.Models.Identifier(); Identifier.DeserializeJson(ref reader, options); break; case "issued": Issued = reader.GetString(); break; case "_issued": _Issued = new Fhir.R4.Models.Element(); _Issued.DeserializeJson(ref reader, options); break; case "name": Name = reader.GetString(); break; case "_name": _Name = new Fhir.R4.Models.Element(); _Name.DeserializeJson(ref reader, options); break; case "participant": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Participant = new List <TestReportParticipant>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.TestReportParticipant objParticipant = new Fhir.R4.Models.TestReportParticipant(); objParticipant.DeserializeJson(ref reader, options); Participant.Add(objParticipant); if (!reader.Read()) { throw new JsonException(); } } if (Participant.Count == 0) { Participant = null; } break; case "result": Result = reader.GetString(); break; case "_result": _Result = new Fhir.R4.Models.Element(); _Result.DeserializeJson(ref reader, options); break; case "score": Score = reader.GetDecimal(); break; case "_score": _Score = new Fhir.R4.Models.Element(); _Score.DeserializeJson(ref reader, options); break; case "setup": Setup = new Fhir.R4.Models.TestReportSetup(); Setup.DeserializeJson(ref reader, options); break; case "status": Status = reader.GetString(); break; case "_status": _Status = new Fhir.R4.Models.Element(); _Status.DeserializeJson(ref reader, options); break; case "teardown": Teardown = new Fhir.R4.Models.TestReportTeardown(); Teardown.DeserializeJson(ref reader, options); break; case "test": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Test = new List <TestReportTest>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.TestReportTest objTest = new Fhir.R4.Models.TestReportTest(); objTest.DeserializeJson(ref reader, options); Test.Add(objTest); if (!reader.Read()) { throw new JsonException(); } } if (Test.Count == 0) { Test = null; } break; case "tester": Tester = reader.GetString(); break; case "_tester": _Tester = new Fhir.R4.Models.Element(); _Tester.DeserializeJson(ref reader, options); break; case "testScript": TestScript = new Fhir.R4.Models.Reference(); TestScript.DeserializeJson(ref reader, options); break; default: ((Fhir.R4.Models.DomainResource) this).DeserializeJsonProperty(ref reader, options, propertyName); break; } }
/// <summary> /// Deserialize a JSON property /// </summary> public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName) { switch (propertyName) { case "active": Active = reader.GetBoolean(); break; case "description": Description = reader.GetString(); break; case "_description": _Description = new Fhir.R4.Models.Element(); _Description.DeserializeJson(ref reader, options); break; case "identifier": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Identifier = new List <Identifier>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.Identifier objIdentifier = new Fhir.R4.Models.Identifier(); objIdentifier.DeserializeJson(ref reader, options); Identifier.Add(objIdentifier); if (!reader.Read()) { throw new JsonException(); } } if (Identifier.Count == 0) { Identifier = null; } break; case "image": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Image = new List <Attachment>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.Attachment objImage = new Fhir.R4.Models.Attachment(); objImage.DeserializeJson(ref reader, options); Image.Add(objImage); if (!reader.Read()) { throw new JsonException(); } } if (Image.Count == 0) { Image = null; } break; case "location": Location = new Fhir.R4.Models.CodeableConcept(); Location.DeserializeJson(ref reader, options); break; case "locationQualifier": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } LocationQualifier = new List <CodeableConcept>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.CodeableConcept objLocationQualifier = new Fhir.R4.Models.CodeableConcept(); objLocationQualifier.DeserializeJson(ref reader, options); LocationQualifier.Add(objLocationQualifier); if (!reader.Read()) { throw new JsonException(); } } if (LocationQualifier.Count == 0) { LocationQualifier = null; } break; case "morphology": Morphology = new Fhir.R4.Models.CodeableConcept(); Morphology.DeserializeJson(ref reader, options); break; case "patient": Patient = new Fhir.R4.Models.Reference(); Patient.DeserializeJson(ref reader, options); break; default: ((Fhir.R4.Models.DomainResource) this).DeserializeJsonProperty(ref reader, options, propertyName); break; } }
/// <summary> /// Deserialize a JSON property /// </summary> public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName) { switch (propertyName) { case "item": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Item = new List <QuestionnaireResponseItem>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.QuestionnaireResponseItem objItem = new Fhir.R4.Models.QuestionnaireResponseItem(); objItem.DeserializeJson(ref reader, options); Item.Add(objItem); if (!reader.Read()) { throw new JsonException(); } } if (Item.Count == 0) { Item = null; } break; case "valueBoolean": ValueBoolean = reader.GetBoolean(); break; case "valueDecimal": ValueDecimal = reader.GetDecimal(); break; case "_valueDecimal": _ValueDecimal = new Fhir.R4.Models.Element(); _ValueDecimal.DeserializeJson(ref reader, options); break; case "valueInteger": ValueInteger = reader.GetInt32(); break; case "valueDate": ValueDate = reader.GetString(); break; case "_valueDate": _ValueDate = new Fhir.R4.Models.Element(); _ValueDate.DeserializeJson(ref reader, options); break; case "valueDateTime": ValueDateTime = reader.GetString(); break; case "_valueDateTime": _ValueDateTime = new Fhir.R4.Models.Element(); _ValueDateTime.DeserializeJson(ref reader, options); break; case "valueTime": ValueTime = reader.GetString(); break; case "_valueTime": _ValueTime = new Fhir.R4.Models.Element(); _ValueTime.DeserializeJson(ref reader, options); break; case "valueString": ValueString = reader.GetString(); break; case "_valueString": _ValueString = new Fhir.R4.Models.Element(); _ValueString.DeserializeJson(ref reader, options); break; case "valueUri": ValueUri = reader.GetString(); break; case "_valueUri": _ValueUri = new Fhir.R4.Models.Element(); _ValueUri.DeserializeJson(ref reader, options); break; case "valueAttachment": ValueAttachment = new Fhir.R4.Models.Attachment(); ValueAttachment.DeserializeJson(ref reader, options); break; case "valueCoding": ValueCoding = new Fhir.R4.Models.Coding(); ValueCoding.DeserializeJson(ref reader, options); break; case "valueQuantity": ValueQuantity = new Fhir.R4.Models.Quantity(); ValueQuantity.DeserializeJson(ref reader, options); break; case "valueReference": ValueReference = new Fhir.R4.Models.Reference(); ValueReference.DeserializeJson(ref reader, options); break; default: ((Fhir.R4.Models.BackboneElement) this).DeserializeJsonProperty(ref reader, options, propertyName); break; } }
/// <summary> /// Deserialize a JSON property /// </summary> public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName) { switch (propertyName) { case "author": Author = new Fhir.R4.Models.Reference(); Author.DeserializeJson(ref reader, options); break; case "authored": Authored = reader.GetString(); break; case "_authored": _Authored = new Fhir.R4.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) { Fhir.R4.Models.Reference objBasedOn = new Fhir.R4.Models.Reference(); objBasedOn.DeserializeJson(ref reader, options); BasedOn.Add(objBasedOn); if (!reader.Read()) { throw new JsonException(); } } if (BasedOn.Count == 0) { BasedOn = null; } break; case "encounter": Encounter = new Fhir.R4.Models.Reference(); Encounter.DeserializeJson(ref reader, options); break; case "identifier": Identifier = new Fhir.R4.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) { Fhir.R4.Models.QuestionnaireResponseItem objItem = new Fhir.R4.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) { Fhir.R4.Models.Reference objPartOf = new Fhir.R4.Models.Reference(); objPartOf.DeserializeJson(ref reader, options); PartOf.Add(objPartOf); if (!reader.Read()) { throw new JsonException(); } } if (PartOf.Count == 0) { PartOf = null; } break; case "questionnaire": Questionnaire = reader.GetString(); break; case "_questionnaire": _Questionnaire = new Fhir.R4.Models.Element(); _Questionnaire.DeserializeJson(ref reader, options); break; case "source": Source = new Fhir.R4.Models.Reference(); Source.DeserializeJson(ref reader, options); break; case "status": Status = reader.GetString(); break; case "_status": _Status = new Fhir.R4.Models.Element(); _Status.DeserializeJson(ref reader, options); break; case "subject": Subject = new Fhir.R4.Models.Reference(); Subject.DeserializeJson(ref reader, options); break; default: ((Fhir.R4.Models.DomainResource) this).DeserializeJsonProperty(ref reader, options, propertyName); break; } }
/// <summary> /// Deserialize a JSON property /// </summary> public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName) { switch (propertyName) { case "data": Data = reader.GetString(); break; case "_data": _Data = new Fhir.R4.Models.Element(); _Data.DeserializeJson(ref reader, options); break; case "onBehalfOf": OnBehalfOf = new Fhir.R4.Models.Reference(); OnBehalfOf.DeserializeJson(ref reader, options); break; case "sigFormat": SigFormat = reader.GetString(); break; case "_sigFormat": _SigFormat = new Fhir.R4.Models.Element(); _SigFormat.DeserializeJson(ref reader, options); break; case "targetFormat": TargetFormat = reader.GetString(); break; case "_targetFormat": _TargetFormat = new Fhir.R4.Models.Element(); _TargetFormat.DeserializeJson(ref reader, options); break; case "type": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Type = new List <Coding>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.Coding objType = new Fhir.R4.Models.Coding(); objType.DeserializeJson(ref reader, options); Type.Add(objType); if (!reader.Read()) { throw new JsonException(); } } if (Type.Count == 0) { Type = null; } break; case "when": When = reader.GetString(); break; case "_when": _When = new Fhir.R4.Models.Element(); _When.DeserializeJson(ref reader, options); break; case "who": Who = new Fhir.R4.Models.Reference(); Who.DeserializeJson(ref reader, options); break; default: ((Fhir.R4.Models.Element) 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": BasedOn = new Fhir.R4.Models.Reference(); BasedOn.DeserializeJson(ref reader, options); break; case "basis": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Basis = new List <Reference>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.Reference objBasis = new Fhir.R4.Models.Reference(); objBasis.DeserializeJson(ref reader, options); Basis.Add(objBasis); if (!reader.Read()) { throw new JsonException(); } } if (Basis.Count == 0) { Basis = null; } break; case "code": Code = new Fhir.R4.Models.CodeableConcept(); Code.DeserializeJson(ref reader, options); break; case "condition": Condition = new Fhir.R4.Models.Reference(); Condition.DeserializeJson(ref reader, options); break; case "encounter": Encounter = new Fhir.R4.Models.Reference(); Encounter.DeserializeJson(ref reader, options); break; case "identifier": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Identifier = new List <Identifier>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.Identifier objIdentifier = new Fhir.R4.Models.Identifier(); objIdentifier.DeserializeJson(ref reader, options); Identifier.Add(objIdentifier); if (!reader.Read()) { throw new JsonException(); } } if (Identifier.Count == 0) { Identifier = null; } break; case "method": Method = new Fhir.R4.Models.CodeableConcept(); Method.DeserializeJson(ref reader, options); break; case "mitigation": Mitigation = reader.GetString(); break; case "_mitigation": _Mitigation = new Fhir.R4.Models.Element(); _Mitigation.DeserializeJson(ref reader, options); break; case "note": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Note = new List <Annotation>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.Annotation objNote = new Fhir.R4.Models.Annotation(); objNote.DeserializeJson(ref reader, options); Note.Add(objNote); if (!reader.Read()) { throw new JsonException(); } } if (Note.Count == 0) { Note = null; } break; case "occurrenceDateTime": OccurrenceDateTime = reader.GetString(); break; case "_occurrenceDateTime": _OccurrenceDateTime = new Fhir.R4.Models.Element(); _OccurrenceDateTime.DeserializeJson(ref reader, options); break; case "occurrencePeriod": OccurrencePeriod = new Fhir.R4.Models.Period(); OccurrencePeriod.DeserializeJson(ref reader, options); break; case "parent": Parent = new Fhir.R4.Models.Reference(); Parent.DeserializeJson(ref reader, options); break; case "performer": Performer = new Fhir.R4.Models.Reference(); Performer.DeserializeJson(ref reader, options); break; case "prediction": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Prediction = new List <RiskAssessmentPrediction>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.RiskAssessmentPrediction objPrediction = new Fhir.R4.Models.RiskAssessmentPrediction(); objPrediction.DeserializeJson(ref reader, options); Prediction.Add(objPrediction); if (!reader.Read()) { throw new JsonException(); } } if (Prediction.Count == 0) { Prediction = null; } break; case "reasonCode": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } ReasonCode = new List <CodeableConcept>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.CodeableConcept objReasonCode = new Fhir.R4.Models.CodeableConcept(); objReasonCode.DeserializeJson(ref reader, options); ReasonCode.Add(objReasonCode); if (!reader.Read()) { throw new JsonException(); } } if (ReasonCode.Count == 0) { ReasonCode = null; } break; case "reasonReference": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } ReasonReference = new List <Reference>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.Reference objReasonReference = new Fhir.R4.Models.Reference(); objReasonReference.DeserializeJson(ref reader, options); ReasonReference.Add(objReasonReference); if (!reader.Read()) { throw new JsonException(); } } if (ReasonReference.Count == 0) { ReasonReference = null; } break; case "status": Status = reader.GetString(); break; case "_status": _Status = new Fhir.R4.Models.Element(); _Status.DeserializeJson(ref reader, options); break; case "subject": Subject = new Fhir.R4.Models.Reference(); Subject.DeserializeJson(ref reader, options); break; default: ((Fhir.R4.Models.DomainResource) this).DeserializeJsonProperty(ref reader, options, propertyName); break; } }
/// <summary> /// Deserialize a JSON property /// </summary> public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName) { switch (propertyName) { case "basedOn": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } BasedOn = new List <Reference>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.Reference objBasedOn = new Fhir.R4.Models.Reference(); objBasedOn.DeserializeJson(ref reader, options); BasedOn.Add(objBasedOn); if (!reader.Read()) { throw new JsonException(); } } if (BasedOn.Count == 0) { BasedOn = null; } break; case "category": Category = new Fhir.R4.Models.CodeableConcept(); Category.DeserializeJson(ref reader, options); break; case "context": Context = new Fhir.R4.Models.Reference(); Context.DeserializeJson(ref reader, options); break; case "dateAsserted": DateAsserted = reader.GetString(); break; case "_dateAsserted": _DateAsserted = new Fhir.R4.Models.Element(); _DateAsserted.DeserializeJson(ref reader, options); break; case "derivedFrom": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } DerivedFrom = new List <Reference>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.Reference objDerivedFrom = new Fhir.R4.Models.Reference(); objDerivedFrom.DeserializeJson(ref reader, options); DerivedFrom.Add(objDerivedFrom); if (!reader.Read()) { throw new JsonException(); } } if (DerivedFrom.Count == 0) { DerivedFrom = null; } break; case "dosage": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Dosage = new List <Dosage>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.Dosage objDosage = new Fhir.R4.Models.Dosage(); objDosage.DeserializeJson(ref reader, options); Dosage.Add(objDosage); if (!reader.Read()) { throw new JsonException(); } } if (Dosage.Count == 0) { Dosage = null; } break; case "effectiveDateTime": EffectiveDateTime = reader.GetString(); break; case "_effectiveDateTime": _EffectiveDateTime = new Fhir.R4.Models.Element(); _EffectiveDateTime.DeserializeJson(ref reader, options); break; case "effectivePeriod": EffectivePeriod = new Fhir.R4.Models.Period(); EffectivePeriod.DeserializeJson(ref reader, options); break; case "identifier": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Identifier = new List <Identifier>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.Identifier objIdentifier = new Fhir.R4.Models.Identifier(); objIdentifier.DeserializeJson(ref reader, options); Identifier.Add(objIdentifier); if (!reader.Read()) { throw new JsonException(); } } if (Identifier.Count == 0) { Identifier = null; } break; case "informationSource": InformationSource = new Fhir.R4.Models.Reference(); InformationSource.DeserializeJson(ref reader, options); break; case "medicationCodeableConcept": MedicationCodeableConcept = new Fhir.R4.Models.CodeableConcept(); MedicationCodeableConcept.DeserializeJson(ref reader, options); break; case "medicationReference": MedicationReference = new Fhir.R4.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) { Fhir.R4.Models.Annotation objNote = new Fhir.R4.Models.Annotation(); objNote.DeserializeJson(ref reader, options); Note.Add(objNote); if (!reader.Read()) { throw new JsonException(); } } if (Note.Count == 0) { Note = null; } break; case "partOf": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } PartOf = new List <Reference>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.Reference objPartOf = new Fhir.R4.Models.Reference(); objPartOf.DeserializeJson(ref reader, options); PartOf.Add(objPartOf); if (!reader.Read()) { throw new JsonException(); } } if (PartOf.Count == 0) { PartOf = null; } break; case "reasonCode": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } ReasonCode = new List <CodeableConcept>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.CodeableConcept objReasonCode = new Fhir.R4.Models.CodeableConcept(); objReasonCode.DeserializeJson(ref reader, options); ReasonCode.Add(objReasonCode); if (!reader.Read()) { throw new JsonException(); } } if (ReasonCode.Count == 0) { ReasonCode = null; } break; case "reasonReference": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } ReasonReference = new List <Reference>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.Reference objReasonReference = new Fhir.R4.Models.Reference(); objReasonReference.DeserializeJson(ref reader, options); ReasonReference.Add(objReasonReference); if (!reader.Read()) { throw new JsonException(); } } if (ReasonReference.Count == 0) { ReasonReference = null; } break; case "status": Status = reader.GetString(); break; case "_status": _Status = new Fhir.R4.Models.Element(); _Status.DeserializeJson(ref reader, options); break; case "statusReason": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } StatusReason = new List <CodeableConcept>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.CodeableConcept objStatusReason = new Fhir.R4.Models.CodeableConcept(); objStatusReason.DeserializeJson(ref reader, options); StatusReason.Add(objStatusReason); if (!reader.Read()) { throw new JsonException(); } } if (StatusReason.Count == 0) { StatusReason = null; } break; case "subject": Subject = new Fhir.R4.Models.Reference(); Subject.DeserializeJson(ref reader, options); break; default: ((Fhir.R4.Models.DomainResource) this).DeserializeJsonProperty(ref reader, options, propertyName); break; } }
/// <summary> /// Deserialize a JSON property /// </summary> public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName) { switch (propertyName) { case "basedOn": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } BasedOn = new List <Reference>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.Reference objBasedOn = new Fhir.R4.Models.Reference(); objBasedOn.DeserializeJson(ref reader, options); BasedOn.Add(objBasedOn); if (!reader.Read()) { throw new JsonException(); } } if (BasedOn.Count == 0) { BasedOn = null; } break; case "category": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Category = new List <CodeableConcept>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.CodeableConcept objCategory = new Fhir.R4.Models.CodeableConcept(); objCategory.DeserializeJson(ref reader, options); Category.Add(objCategory); if (!reader.Read()) { throw new JsonException(); } } if (Category.Count == 0) { Category = null; } break; case "code": Code = new Fhir.R4.Models.CodeableConcept(); Code.DeserializeJson(ref reader, options); break; case "conclusion": Conclusion = reader.GetString(); break; case "_conclusion": _Conclusion = new Fhir.R4.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) { Fhir.R4.Models.CodeableConcept objConclusionCode = new Fhir.R4.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 Fhir.R4.Models.Element(); _EffectiveDateTime.DeserializeJson(ref reader, options); break; case "effectivePeriod": EffectivePeriod = new Fhir.R4.Models.Period(); EffectivePeriod.DeserializeJson(ref reader, options); break; case "encounter": Encounter = new Fhir.R4.Models.Reference(); Encounter.DeserializeJson(ref reader, options); break; case "identifier": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Identifier = new List <Identifier>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.Identifier objIdentifier = new Fhir.R4.Models.Identifier(); objIdentifier.DeserializeJson(ref reader, options); Identifier.Add(objIdentifier); if (!reader.Read()) { throw new JsonException(); } } if (Identifier.Count == 0) { Identifier = null; } break; case "imagingStudy": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } ImagingStudy = new List <Reference>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.Reference objImagingStudy = new Fhir.R4.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 Fhir.R4.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) { Fhir.R4.Models.DiagnosticReportMedia objMedia = new Fhir.R4.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) { Fhir.R4.Models.Reference objPerformer = new Fhir.R4.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) { Fhir.R4.Models.Attachment objPresentedForm = new Fhir.R4.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) { Fhir.R4.Models.Reference objResult = new Fhir.R4.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) { Fhir.R4.Models.Reference objResultsInterpreter = new Fhir.R4.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) { Fhir.R4.Models.Reference objSpecimen = new Fhir.R4.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 Fhir.R4.Models.Element(); _Status.DeserializeJson(ref reader, options); break; case "subject": Subject = new Fhir.R4.Models.Reference(); Subject.DeserializeJson(ref reader, options); break; default: ((Fhir.R4.Models.DomainResource) this).DeserializeJsonProperty(ref reader, options, propertyName); break; } }
/// <summary> /// Deserialize a JSON property /// </summary> public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName) { switch (propertyName) { case "canPushUpdates": CanPushUpdates = new Fhir.R4.Models.CodeableConcept(); CanPushUpdates.DeserializeJson(ref reader, options); break; case "communicationMethod": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } CommunicationMethod = new List <CodeableConcept>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.CodeableConcept objCommunicationMethod = new Fhir.R4.Models.CodeableConcept(); objCommunicationMethod.DeserializeJson(ref reader, options); CommunicationMethod.Add(objCommunicationMethod); if (!reader.Read()) { throw new JsonException(); } } if (CommunicationMethod.Count == 0) { CommunicationMethod = null; } break; case "pushTypeAvailable": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } PushTypeAvailable = new List <CodeableConcept>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.CodeableConcept objPushTypeAvailable = new Fhir.R4.Models.CodeableConcept(); objPushTypeAvailable.DeserializeJson(ref reader, options); PushTypeAvailable.Add(objPushTypeAvailable); if (!reader.Read()) { throw new JsonException(); } } if (PushTypeAvailable.Count == 0) { PushTypeAvailable = null; } break; case "type": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Type = new List <CodeableConcept>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.CodeableConcept objType = new Fhir.R4.Models.CodeableConcept(); objType.DeserializeJson(ref reader, options); Type.Add(objType); if (!reader.Read()) { throw new JsonException(); } } if (Type.Count == 0) { Type = null; } break; case "validationDate": ValidationDate = reader.GetString(); break; case "_validationDate": _ValidationDate = new Fhir.R4.Models.Element(); _ValidationDate.DeserializeJson(ref reader, options); break; case "validationStatus": ValidationStatus = new Fhir.R4.Models.CodeableConcept(); ValidationStatus.DeserializeJson(ref reader, options); break; case "who": Who = new Fhir.R4.Models.Reference(); Who.DeserializeJson(ref reader, options); break; default: ((Fhir.R4.Models.BackboneElement) this).DeserializeJsonProperty(ref reader, options, propertyName); break; } }
/// <summary> /// Deserialize a JSON property /// </summary> public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName) { switch (propertyName) { case "basedOn": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } BasedOn = new List <Reference>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.Reference objBasedOn = new Fhir.R4.Models.Reference(); objBasedOn.DeserializeJson(ref reader, options); BasedOn.Add(objBasedOn); if (!reader.Read()) { throw new JsonException(); } } if (BasedOn.Count == 0) { BasedOn = null; } break; case "description": Description = reader.GetString(); break; case "_description": _Description = new Fhir.R4.Models.Element(); _Description.DeserializeJson(ref reader, options); break; case "encounter": Encounter = new Fhir.R4.Models.Reference(); Encounter.DeserializeJson(ref reader, options); break; case "endpoint": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Endpoint = new List <Reference>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.Reference objEndpoint = new Fhir.R4.Models.Reference(); objEndpoint.DeserializeJson(ref reader, options); Endpoint.Add(objEndpoint); if (!reader.Read()) { throw new JsonException(); } } if (Endpoint.Count == 0) { Endpoint = null; } break; case "identifier": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Identifier = new List <Identifier>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.Identifier objIdentifier = new Fhir.R4.Models.Identifier(); objIdentifier.DeserializeJson(ref reader, options); Identifier.Add(objIdentifier); if (!reader.Read()) { throw new JsonException(); } } if (Identifier.Count == 0) { Identifier = null; } break; case "interpreter": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Interpreter = new List <Reference>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.Reference objInterpreter = new Fhir.R4.Models.Reference(); objInterpreter.DeserializeJson(ref reader, options); Interpreter.Add(objInterpreter); if (!reader.Read()) { throw new JsonException(); } } if (Interpreter.Count == 0) { Interpreter = null; } break; case "location": Location = new Fhir.R4.Models.Reference(); Location.DeserializeJson(ref reader, options); break; case "modality": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Modality = new List <Coding>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.Coding objModality = new Fhir.R4.Models.Coding(); objModality.DeserializeJson(ref reader, options); Modality.Add(objModality); if (!reader.Read()) { throw new JsonException(); } } if (Modality.Count == 0) { Modality = null; } break; case "note": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Note = new List <Annotation>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.Annotation objNote = new Fhir.R4.Models.Annotation(); objNote.DeserializeJson(ref reader, options); Note.Add(objNote); if (!reader.Read()) { throw new JsonException(); } } if (Note.Count == 0) { Note = null; } break; case "numberOfInstances": NumberOfInstances = reader.GetUInt32(); break; case "numberOfSeries": NumberOfSeries = reader.GetUInt32(); break; case "procedureCode": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } ProcedureCode = new List <CodeableConcept>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.CodeableConcept objProcedureCode = new Fhir.R4.Models.CodeableConcept(); objProcedureCode.DeserializeJson(ref reader, options); ProcedureCode.Add(objProcedureCode); if (!reader.Read()) { throw new JsonException(); } } if (ProcedureCode.Count == 0) { ProcedureCode = null; } break; case "procedureReference": ProcedureReference = new Fhir.R4.Models.Reference(); ProcedureReference.DeserializeJson(ref reader, options); break; case "reasonCode": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } ReasonCode = new List <CodeableConcept>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.CodeableConcept objReasonCode = new Fhir.R4.Models.CodeableConcept(); objReasonCode.DeserializeJson(ref reader, options); ReasonCode.Add(objReasonCode); if (!reader.Read()) { throw new JsonException(); } } if (ReasonCode.Count == 0) { ReasonCode = null; } break; case "reasonReference": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } ReasonReference = new List <Reference>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.Reference objReasonReference = new Fhir.R4.Models.Reference(); objReasonReference.DeserializeJson(ref reader, options); ReasonReference.Add(objReasonReference); if (!reader.Read()) { throw new JsonException(); } } if (ReasonReference.Count == 0) { ReasonReference = null; } break; case "referrer": Referrer = new Fhir.R4.Models.Reference(); Referrer.DeserializeJson(ref reader, options); break; case "series": if ((reader.TokenType != JsonTokenType.StartArray) || (!reader.Read())) { throw new JsonException(); } Series = new List <ImagingStudySeries>(); while (reader.TokenType != JsonTokenType.EndArray) { Fhir.R4.Models.ImagingStudySeries objSeries = new Fhir.R4.Models.ImagingStudySeries(); objSeries.DeserializeJson(ref reader, options); Series.Add(objSeries); if (!reader.Read()) { throw new JsonException(); } } if (Series.Count == 0) { Series = null; } break; case "started": Started = reader.GetString(); break; case "_started": _Started = new Fhir.R4.Models.Element(); _Started.DeserializeJson(ref reader, options); break; case "status": Status = reader.GetString(); break; case "_status": _Status = new Fhir.R4.Models.Element(); _Status.DeserializeJson(ref reader, options); break; case "subject": Subject = new Fhir.R4.Models.Reference(); Subject.DeserializeJson(ref reader, options); break; default: ((Fhir.R4.Models.DomainResource) this).DeserializeJsonProperty(ref reader, options, propertyName); break; } }
/// <summary> /// Deserialize a JSON property /// </summary> public new void DeserializeJsonProperty(ref Utf8JsonReader reader, JsonSerializerOptions options, string propertyName) { switch (propertyName) { case "abnormalCodedValueSet": AbnormalCodedValueSet = new Fhir.R4.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) { Fhir.R4.Models.CodeableConcept objCategory = new Fhir.R4.Models.CodeableConcept(); objCategory.DeserializeJson(ref reader, options); Category.Add(objCategory); if (!reader.Read()) { throw new JsonException(); } } if (Category.Count == 0) { Category = null; } break; case "code": Code = new Fhir.R4.Models.CodeableConcept(); Code.DeserializeJson(ref reader, options); break; case "criticalCodedValueSet": CriticalCodedValueSet = new Fhir.R4.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) { Fhir.R4.Models.Identifier objIdentifier = new Fhir.R4.Models.Identifier(); objIdentifier.DeserializeJson(ref reader, options); Identifier.Add(objIdentifier); if (!reader.Read()) { throw new JsonException(); } } if (Identifier.Count == 0) { Identifier = null; } break; case "method": Method = new Fhir.R4.Models.CodeableConcept(); Method.DeserializeJson(ref reader, options); break; case "multipleResultsAllowed": MultipleResultsAllowed = reader.GetBoolean(); break; case "normalCodedValueSet": NormalCodedValueSet = new Fhir.R4.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) { Fhir.R4.Models.Element obj_PermittedDataType = new Fhir.R4.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 Fhir.R4.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) { Fhir.R4.Models.ObservationDefinitionQualifiedInterval objQualifiedInterval = new Fhir.R4.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 Fhir.R4.Models.ObservationDefinitionQuantitativeDetails(); QuantitativeDetails.DeserializeJson(ref reader, options); break; case "validCodedValueSet": ValidCodedValueSet = new Fhir.R4.Models.Reference(); ValidCodedValueSet.DeserializeJson(ref reader, options); break; default: ((Fhir.R4.Models.DomainResource) this).DeserializeJsonProperty(ref reader, options, propertyName); break; } }