public async void GivenValidEncounterIdentifier_WhenResolveResourceIdentitiesAsync_ThenEncounterIdReturned_Test() { var fhirClient = Substitute.For <IFhirClient>(); var resourceService = Substitute.For <ResourceManagementService>(); var device = new Model.Device { Id = "1", Patient = new Model.ResourceReference("Patient/123"), }; var encounter = new Model.Encounter { Id = "abc", }; var mg = Substitute.For <IMeasurementGroup>(); mg.DeviceId.Returns("deviceId"); mg.EncounterId.Returns("eId"); resourceService.GetResourceByIdentityAsync <Model.Device>(Arg.Any <IFhirClient>(), Arg.Any <string>(), Arg.Any <string>()) .Returns(Task.FromResult(device)); resourceService.GetResourceByIdentityAsync <Model.Encounter>(Arg.Any <IFhirClient>(), Arg.Any <string>(), Arg.Any <string>()) .Returns(Task.FromResult(encounter)); using (var idSrv = new R4DeviceAndPatientWithEncounterLookupIdentityService(fhirClient, resourceService)) { var ids = await idSrv.ResolveResourceIdentitiesAsync(mg); Assert.Equal("1", ids[ResourceType.Device]); Assert.Equal("123", ids[ResourceType.Patient]); Assert.Equal("abc", ids[ResourceType.Encounter]); } await resourceService.Received(1).GetResourceByIdentityAsync <Model.Device>(fhirClient, "deviceId", null); await resourceService.Received(1).GetResourceByIdentityAsync <Model.Encounter>(fhirClient, "eId", null); }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as ReferralRequest; if (dest != null) { base.CopyTo(dest); if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.ReferralRequest.ReferralStatus>)StatusElement.DeepCopy(); } if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (DateElement != null) { dest.DateElement = (Hl7.Fhir.Model.FhirDateTime)DateElement.DeepCopy(); } if (Type != null) { dest.Type = (Hl7.Fhir.Model.CodeableConcept)Type.DeepCopy(); } if (Specialty != null) { dest.Specialty = (Hl7.Fhir.Model.CodeableConcept)Specialty.DeepCopy(); } if (Priority != null) { dest.Priority = (Hl7.Fhir.Model.CodeableConcept)Priority.DeepCopy(); } if (Patient != null) { dest.Patient = (Hl7.Fhir.Model.ResourceReference)Patient.DeepCopy(); } if (Requester != null) { dest.Requester = (Hl7.Fhir.Model.ResourceReference)Requester.DeepCopy(); } if (Recipient != null) { dest.Recipient = new List <Hl7.Fhir.Model.ResourceReference>(Recipient.DeepCopy()); } if (Encounter != null) { dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy(); } if (DateSentElement != null) { dest.DateSentElement = (Hl7.Fhir.Model.FhirDateTime)DateSentElement.DeepCopy(); } if (Reason != null) { dest.Reason = (Hl7.Fhir.Model.CodeableConcept)Reason.DeepCopy(); } if (DescriptionElement != null) { dest.DescriptionElement = (Hl7.Fhir.Model.FhirString)DescriptionElement.DeepCopy(); } if (ServiceRequested != null) { dest.ServiceRequested = new List <Hl7.Fhir.Model.CodeableConcept>(ServiceRequested.DeepCopy()); } if (SupportingInformation != null) { dest.SupportingInformation = new List <Hl7.Fhir.Model.ResourceReference>(SupportingInformation.DeepCopy()); } if (FulfillmentTime != null) { dest.FulfillmentTime = (Hl7.Fhir.Model.Period)FulfillmentTime.DeepCopy(); } return(dest); } else { throw new ArgumentException("Can only copy to an object of the same type", "other"); } }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as Communication; if (dest != null) { base.CopyTo(dest); if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (Category != null) { dest.Category = (Hl7.Fhir.Model.CodeableConcept)Category.DeepCopy(); } if (Sender != null) { dest.Sender = (Hl7.Fhir.Model.ResourceReference)Sender.DeepCopy(); } if (Recipient != null) { dest.Recipient = new List <Hl7.Fhir.Model.ResourceReference>(Recipient.DeepCopy()); } if (Payload != null) { dest.Payload = new List <Hl7.Fhir.Model.Communication.PayloadComponent>(Payload.DeepCopy()); } if (Medium != null) { dest.Medium = new List <Hl7.Fhir.Model.CodeableConcept>(Medium.DeepCopy()); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.Communication.CommunicationStatus>)StatusElement.DeepCopy(); } if (Encounter != null) { dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy(); } if (SentElement != null) { dest.SentElement = (Hl7.Fhir.Model.FhirDateTime)SentElement.DeepCopy(); } if (ReceivedElement != null) { dest.ReceivedElement = (Hl7.Fhir.Model.FhirDateTime)ReceivedElement.DeepCopy(); } if (Reason != null) { dest.Reason = new List <Hl7.Fhir.Model.CodeableConcept>(Reason.DeepCopy()); } if (Subject != null) { dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy(); } if (RequestDetail != null) { dest.RequestDetail = (Hl7.Fhir.Model.ResourceReference)RequestDetail.DeepCopy(); } return(dest); } else { throw new ArgumentException("Can only copy to an object of the same type", "other"); } }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as DiagnosticOrder; if (dest != null) { base.CopyTo(dest); if (Subject != null) { dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy(); } if (Orderer != null) { dest.Orderer = (Hl7.Fhir.Model.ResourceReference)Orderer.DeepCopy(); } if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (Encounter != null) { dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy(); } if (Reason != null) { dest.Reason = new List <Hl7.Fhir.Model.CodeableConcept>(Reason.DeepCopy()); } if (SupportingInformation != null) { dest.SupportingInformation = new List <Hl7.Fhir.Model.ResourceReference>(SupportingInformation.DeepCopy()); } if (Specimen != null) { dest.Specimen = new List <Hl7.Fhir.Model.ResourceReference>(Specimen.DeepCopy()); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.DiagnosticOrder.DiagnosticOrderStatus>)StatusElement.DeepCopy(); } if (PriorityElement != null) { dest.PriorityElement = (Code <Hl7.Fhir.Model.DiagnosticOrder.DiagnosticOrderPriority>)PriorityElement.DeepCopy(); } if (Event != null) { dest.Event = new List <Hl7.Fhir.Model.DiagnosticOrder.DiagnosticOrderEventComponent>(Event.DeepCopy()); } if (Item != null) { dest.Item = new List <Hl7.Fhir.Model.DiagnosticOrder.DiagnosticOrderItemComponent>(Item.DeepCopy()); } if (Note != null) { dest.Note = new List <Hl7.Fhir.Model.Annotation>(Note.DeepCopy()); } return(dest); } else { throw new ArgumentException("Can only copy to an object of the same type", "other"); } }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as Observation; if (dest != null) { base.CopyTo(dest); if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.Observation.ObservationStatus>)StatusElement.DeepCopy(); } if (Category != null) { dest.Category = (Hl7.Fhir.Model.CodeableConcept)Category.DeepCopy(); } if (Code != null) { dest.Code = (Hl7.Fhir.Model.CodeableConcept)Code.DeepCopy(); } if (Subject != null) { dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy(); } if (Encounter != null) { dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy(); } if (Effective != null) { dest.Effective = (Hl7.Fhir.Model.Element)Effective.DeepCopy(); } if (IssuedElement != null) { dest.IssuedElement = (Hl7.Fhir.Model.Instant)IssuedElement.DeepCopy(); } if (Performer != null) { dest.Performer = new List <Hl7.Fhir.Model.ResourceReference>(Performer.DeepCopy()); } if (Value != null) { dest.Value = (Hl7.Fhir.Model.Element)Value.DeepCopy(); } if (DataAbsentReason != null) { dest.DataAbsentReason = (Hl7.Fhir.Model.CodeableConcept)DataAbsentReason.DeepCopy(); } if (Interpretation != null) { dest.Interpretation = (Hl7.Fhir.Model.CodeableConcept)Interpretation.DeepCopy(); } if (CommentsElement != null) { dest.CommentsElement = (Hl7.Fhir.Model.FhirString)CommentsElement.DeepCopy(); } if (BodySite != null) { dest.BodySite = (Hl7.Fhir.Model.CodeableConcept)BodySite.DeepCopy(); } if (Method != null) { dest.Method = (Hl7.Fhir.Model.CodeableConcept)Method.DeepCopy(); } if (Specimen != null) { dest.Specimen = (Hl7.Fhir.Model.ResourceReference)Specimen.DeepCopy(); } if (Device != null) { dest.Device = (Hl7.Fhir.Model.ResourceReference)Device.DeepCopy(); } if (ReferenceRange != null) { dest.ReferenceRange = new List <Hl7.Fhir.Model.Observation.ObservationReferenceRangeComponent>(ReferenceRange.DeepCopy()); } if (Related != null) { dest.Related = new List <Hl7.Fhir.Model.Observation.ObservationRelatedComponent>(Related.DeepCopy()); } if (Component != null) { dest.Component = new List <Hl7.Fhir.Model.Observation.ObservationComponentComponent>(Component.DeepCopy()); } return(dest); } else { throw new ArgumentException("Can only copy to an object of the same type", "other"); } }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as ProcedureRequest; if (dest != null) { base.CopyTo(dest); if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (Subject != null) { dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy(); } if (Code != null) { dest.Code = (Hl7.Fhir.Model.CodeableConcept)Code.DeepCopy(); } if (BodySite != null) { dest.BodySite = new List <Hl7.Fhir.Model.CodeableConcept>(BodySite.DeepCopy()); } if (Reason != null) { dest.Reason = (Hl7.Fhir.Model.Element)Reason.DeepCopy(); } if (Scheduled != null) { dest.Scheduled = (Hl7.Fhir.Model.Element)Scheduled.DeepCopy(); } if (Encounter != null) { dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy(); } if (Performer != null) { dest.Performer = (Hl7.Fhir.Model.ResourceReference)Performer.DeepCopy(); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.ProcedureRequest.ProcedureRequestStatus>)StatusElement.DeepCopy(); } if (Notes != null) { dest.Notes = new List <Hl7.Fhir.Model.Annotation>(Notes.DeepCopy()); } if (AsNeeded != null) { dest.AsNeeded = (Hl7.Fhir.Model.Element)AsNeeded.DeepCopy(); } if (OrderedOnElement != null) { dest.OrderedOnElement = (Hl7.Fhir.Model.FhirDateTime)OrderedOnElement.DeepCopy(); } if (Orderer != null) { dest.Orderer = (Hl7.Fhir.Model.ResourceReference)Orderer.DeepCopy(); } if (PriorityElement != null) { dest.PriorityElement = (Code <Hl7.Fhir.Model.ProcedureRequest.ProcedureRequestPriority>)PriorityElement.DeepCopy(); } return(dest); } else { throw new ArgumentException("Can only copy to an object of the same type", "other"); } }
public void ValidateResourceWithIncorrectChildElement() { // First create an incomplete encounter (class not supplied) var enc = new Encounter(); validateErrorOrFail(enc, membername: "StatusElement"); validateErrorOrFail(enc,true); // recursive checking shouldn't matter enc.Status = Encounter.EncounterState.Planned; // Now, it should work DotNetAttributeValidation.Validate(enc); DotNetAttributeValidation.Validate(enc, true); // recursive checking shouldnt matter // Hide an incorrect datetime deep into the Encounter FhirDateTime dt = new FhirDateTime(); dt.Value = "Ewout Kramer"; // clearly, a wrong datetime enc.Period = new Period() { StartElement = dt }; // When we do not validate recursively, we should still be ok DotNetAttributeValidation.Validate(enc); // When we recurse, this should fail validateErrorOrFail(enc, true, membername: "Value"); }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as DiagnosticReport; if (dest == null) { throw new ArgumentException("Can only copy to an object of the same type", "other"); } base.CopyTo(dest); if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (BasedOn != null) { dest.BasedOn = new List <Hl7.Fhir.Model.ResourceReference>(BasedOn.DeepCopy()); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.DiagnosticReport.DiagnosticReportStatus>)StatusElement.DeepCopy(); } if (Category != null) { dest.Category = new List <Hl7.Fhir.Model.CodeableConcept>(Category.DeepCopy()); } if (Code != null) { dest.Code = (Hl7.Fhir.Model.CodeableConcept)Code.DeepCopy(); } if (Subject != null) { dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy(); } if (Encounter != null) { dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy(); } if (Effective != null) { dest.Effective = (Hl7.Fhir.Model.Element)Effective.DeepCopy(); } if (IssuedElement != null) { dest.IssuedElement = (Hl7.Fhir.Model.Instant)IssuedElement.DeepCopy(); } if (Performer != null) { dest.Performer = new List <Hl7.Fhir.Model.ResourceReference>(Performer.DeepCopy()); } if (ResultsInterpreter != null) { dest.ResultsInterpreter = new List <Hl7.Fhir.Model.ResourceReference>(ResultsInterpreter.DeepCopy()); } if (Specimen != null) { dest.Specimen = new List <Hl7.Fhir.Model.ResourceReference>(Specimen.DeepCopy()); } if (Result != null) { dest.Result = new List <Hl7.Fhir.Model.ResourceReference>(Result.DeepCopy()); } if (ImagingStudy != null) { dest.ImagingStudy = new List <Hl7.Fhir.Model.ResourceReference>(ImagingStudy.DeepCopy()); } if (Media != null) { dest.Media = new List <Hl7.Fhir.Model.DiagnosticReport.MediaComponent>(Media.DeepCopy()); } if (ConclusionElement != null) { dest.ConclusionElement = (Hl7.Fhir.Model.FhirString)ConclusionElement.DeepCopy(); } if (ConclusionCode != null) { dest.ConclusionCode = new List <Hl7.Fhir.Model.CodeableConcept>(ConclusionCode.DeepCopy()); } if (PresentedForm != null) { dest.PresentedForm = new List <Hl7.Fhir.Model.Attachment>(PresentedForm.DeepCopy()); } return(dest); }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as Immunization; if (dest != null) { base.CopyTo(dest); if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.MedicationAdministrationStatus>)StatusElement.DeepCopy(); } if (DateElement != null) { dest.DateElement = (Hl7.Fhir.Model.FhirDateTime)DateElement.DeepCopy(); } if (VaccineCode != null) { dest.VaccineCode = (Hl7.Fhir.Model.CodeableConcept)VaccineCode.DeepCopy(); } if (Patient != null) { dest.Patient = (Hl7.Fhir.Model.ResourceReference)Patient.DeepCopy(); } if (WasNotGivenElement != null) { dest.WasNotGivenElement = (Hl7.Fhir.Model.FhirBoolean)WasNotGivenElement.DeepCopy(); } if (ReportedElement != null) { dest.ReportedElement = (Hl7.Fhir.Model.FhirBoolean)ReportedElement.DeepCopy(); } if (Performer != null) { dest.Performer = (Hl7.Fhir.Model.ResourceReference)Performer.DeepCopy(); } if (Requester != null) { dest.Requester = (Hl7.Fhir.Model.ResourceReference)Requester.DeepCopy(); } if (Encounter != null) { dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy(); } if (Manufacturer != null) { dest.Manufacturer = (Hl7.Fhir.Model.ResourceReference)Manufacturer.DeepCopy(); } if (Location != null) { dest.Location = (Hl7.Fhir.Model.ResourceReference)Location.DeepCopy(); } if (LotNumberElement != null) { dest.LotNumberElement = (Hl7.Fhir.Model.FhirString)LotNumberElement.DeepCopy(); } if (ExpirationDateElement != null) { dest.ExpirationDateElement = (Hl7.Fhir.Model.Date)ExpirationDateElement.DeepCopy(); } if (Site != null) { dest.Site = (Hl7.Fhir.Model.CodeableConcept)Site.DeepCopy(); } if (Route != null) { dest.Route = (Hl7.Fhir.Model.CodeableConcept)Route.DeepCopy(); } if (DoseQuantity != null) { dest.DoseQuantity = (Hl7.Fhir.Model.SimpleQuantity)DoseQuantity.DeepCopy(); } if (Note != null) { dest.Note = new List <Hl7.Fhir.Model.Annotation>(Note.DeepCopy()); } if (Explanation != null) { dest.Explanation = (Hl7.Fhir.Model.Immunization.ExplanationComponent)Explanation.DeepCopy(); } if (Reaction != null) { dest.Reaction = new List <Hl7.Fhir.Model.Immunization.ReactionComponent>(Reaction.DeepCopy()); } if (VaccinationProtocol != null) { dest.VaccinationProtocol = new List <Hl7.Fhir.Model.Immunization.VaccinationProtocolComponent>(VaccinationProtocol.DeepCopy()); } return(dest); } else { throw new ArgumentException("Can only copy to an object of the same type", "other"); } }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as ClinicalImpression; if (dest == null) { throw new ArgumentException("Can only copy to an object of the same type", "other"); } base.CopyTo(dest); if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.ClinicalImpression.ClinicalImpressionStatus>)StatusElement.DeepCopy(); } if (StatusReason != null) { dest.StatusReason = (Hl7.Fhir.Model.CodeableConcept)StatusReason.DeepCopy(); } if (Code != null) { dest.Code = (Hl7.Fhir.Model.CodeableConcept)Code.DeepCopy(); } if (DescriptionElement != null) { dest.DescriptionElement = (Hl7.Fhir.Model.FhirString)DescriptionElement.DeepCopy(); } if (Subject != null) { dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy(); } if (Encounter != null) { dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy(); } if (Effective != null) { dest.Effective = (Hl7.Fhir.Model.Element)Effective.DeepCopy(); } if (DateElement != null) { dest.DateElement = (Hl7.Fhir.Model.FhirDateTime)DateElement.DeepCopy(); } if (Assessor != null) { dest.Assessor = (Hl7.Fhir.Model.ResourceReference)Assessor.DeepCopy(); } if (Previous != null) { dest.Previous = (Hl7.Fhir.Model.ResourceReference)Previous.DeepCopy(); } if (Problem != null) { dest.Problem = new List <Hl7.Fhir.Model.ResourceReference>(Problem.DeepCopy()); } if (Investigation != null) { dest.Investigation = new List <Hl7.Fhir.Model.ClinicalImpression.InvestigationComponent>(Investigation.DeepCopy()); } if (ProtocolElement != null) { dest.ProtocolElement = new List <Hl7.Fhir.Model.FhirUri>(ProtocolElement.DeepCopy()); } if (SummaryElement != null) { dest.SummaryElement = (Hl7.Fhir.Model.FhirString)SummaryElement.DeepCopy(); } if (Finding != null) { dest.Finding = new List <Hl7.Fhir.Model.ClinicalImpression.FindingComponent>(Finding.DeepCopy()); } if (PrognosisCodeableConcept != null) { dest.PrognosisCodeableConcept = new List <Hl7.Fhir.Model.CodeableConcept>(PrognosisCodeableConcept.DeepCopy()); } if (PrognosisReference != null) { dest.PrognosisReference = new List <Hl7.Fhir.Model.ResourceReference>(PrognosisReference.DeepCopy()); } if (SupportingInfo != null) { dest.SupportingInfo = new List <Hl7.Fhir.Model.ResourceReference>(SupportingInfo.DeepCopy()); } if (Note != null) { dest.Note = new List <Hl7.Fhir.Model.Annotation>(Note.DeepCopy()); } return(dest); }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as Composition; if (dest != null) { base.CopyTo(dest); if (Identifier != null) { dest.Identifier = (Hl7.Fhir.Model.Identifier)Identifier.DeepCopy(); } if (DateElement != null) { dest.DateElement = (Hl7.Fhir.Model.FhirDateTime)DateElement.DeepCopy(); } if (Type != null) { dest.Type = (Hl7.Fhir.Model.CodeableConcept)Type.DeepCopy(); } if (Class != null) { dest.Class = (Hl7.Fhir.Model.CodeableConcept)Class.DeepCopy(); } if (TitleElement != null) { dest.TitleElement = (Hl7.Fhir.Model.FhirString)TitleElement.DeepCopy(); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.Composition.CompositionStatus>)StatusElement.DeepCopy(); } if (Confidentiality != null) { dest.Confidentiality = (Hl7.Fhir.Model.Coding)Confidentiality.DeepCopy(); } if (Subject != null) { dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy(); } if (Author != null) { dest.Author = new List <Hl7.Fhir.Model.ResourceReference>(Author.DeepCopy()); } if (Attester != null) { dest.Attester = new List <Hl7.Fhir.Model.Composition.CompositionAttesterComponent>(Attester.DeepCopy()); } if (Custodian != null) { dest.Custodian = (Hl7.Fhir.Model.ResourceReference)Custodian.DeepCopy(); } if (Event != null) { dest.Event = (Hl7.Fhir.Model.Composition.CompositionEventComponent)Event.DeepCopy(); } if (Encounter != null) { dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy(); } if (Section != null) { dest.Section = new List <Hl7.Fhir.Model.Composition.SectionComponent>(Section.DeepCopy()); } return(dest); } else { throw new ArgumentException("Can only copy to an object of the same type", "other"); } }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as Procedure; if (dest != null) { base.CopyTo(dest); if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (Subject != null) { dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy(); } if (Type != null) { dest.Type = (Hl7.Fhir.Model.CodeableConcept)Type.DeepCopy(); } if (BodySite != null) { dest.BodySite = new List <Hl7.Fhir.Model.CodeableConcept>(BodySite.DeepCopy()); } if (Indication != null) { dest.Indication = new List <Hl7.Fhir.Model.CodeableConcept>(Indication.DeepCopy()); } if (Performer != null) { dest.Performer = new List <Hl7.Fhir.Model.Procedure.ProcedurePerformerComponent>(Performer.DeepCopy()); } if (Date != null) { dest.Date = (Hl7.Fhir.Model.Period)Date.DeepCopy(); } if (Encounter != null) { dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy(); } if (OutcomeElement != null) { dest.OutcomeElement = (Hl7.Fhir.Model.FhirString)OutcomeElement.DeepCopy(); } if (Report != null) { dest.Report = new List <Hl7.Fhir.Model.ResourceReference>(Report.DeepCopy()); } if (Complication != null) { dest.Complication = new List <Hl7.Fhir.Model.CodeableConcept>(Complication.DeepCopy()); } if (FollowUpElement != null) { dest.FollowUpElement = (Hl7.Fhir.Model.FhirString)FollowUpElement.DeepCopy(); } if (RelatedItem != null) { dest.RelatedItem = new List <Hl7.Fhir.Model.Procedure.ProcedureRelatedItemComponent>(RelatedItem.DeepCopy()); } if (NotesElement != null) { dest.NotesElement = (Hl7.Fhir.Model.FhirString)NotesElement.DeepCopy(); } return(dest); } else { throw new ArgumentException("Can only copy to an object of the same type", "other"); } }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as Procedure; if (dest != null) { base.CopyTo(dest); if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (Patient != null) { dest.Patient = (Hl7.Fhir.Model.ResourceReference)Patient.DeepCopy(); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.Procedure.ProcedureStatus>)StatusElement.DeepCopy(); } if (Category != null) { dest.Category = (Hl7.Fhir.Model.CodeableConcept)Category.DeepCopy(); } if (Type != null) { dest.Type = (Hl7.Fhir.Model.CodeableConcept)Type.DeepCopy(); } if (BodySite != null) { dest.BodySite = new List <Hl7.Fhir.Model.Procedure.ProcedureBodySiteComponent>(BodySite.DeepCopy()); } if (Indication != null) { dest.Indication = new List <Hl7.Fhir.Model.CodeableConcept>(Indication.DeepCopy()); } if (Performer != null) { dest.Performer = new List <Hl7.Fhir.Model.Procedure.ProcedurePerformerComponent>(Performer.DeepCopy()); } if (Performed != null) { dest.Performed = (Hl7.Fhir.Model.Element)Performed.DeepCopy(); } if (Encounter != null) { dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy(); } if (Location != null) { dest.Location = (Hl7.Fhir.Model.ResourceReference)Location.DeepCopy(); } if (Outcome != null) { dest.Outcome = (Hl7.Fhir.Model.CodeableConcept)Outcome.DeepCopy(); } if (Report != null) { dest.Report = new List <Hl7.Fhir.Model.ResourceReference>(Report.DeepCopy()); } if (Complication != null) { dest.Complication = new List <Hl7.Fhir.Model.CodeableConcept>(Complication.DeepCopy()); } if (FollowUp != null) { dest.FollowUp = new List <Hl7.Fhir.Model.CodeableConcept>(FollowUp.DeepCopy()); } if (RelatedItem != null) { dest.RelatedItem = new List <Hl7.Fhir.Model.Procedure.ProcedureRelatedItemComponent>(RelatedItem.DeepCopy()); } if (NotesElement != null) { dest.NotesElement = (Hl7.Fhir.Model.FhirString)NotesElement.DeepCopy(); } if (Device != null) { dest.Device = new List <Hl7.Fhir.Model.Procedure.ProcedureDeviceComponent>(Device.DeepCopy()); } if (Used != null) { dest.Used = new List <Hl7.Fhir.Model.ResourceReference>(Used.DeepCopy()); } return(dest); } else { throw new ArgumentException("Can only copy to an object of the same type", "other"); } }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as MedicationOrder; if (dest != null) { base.CopyTo(dest); if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (DateWrittenElement != null) { dest.DateWrittenElement = (Hl7.Fhir.Model.FhirDateTime)DateWrittenElement.DeepCopy(); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.MedicationOrder.MedicationOrderStatus>)StatusElement.DeepCopy(); } if (DateEndedElement != null) { dest.DateEndedElement = (Hl7.Fhir.Model.FhirDateTime)DateEndedElement.DeepCopy(); } if (ReasonEnded != null) { dest.ReasonEnded = (Hl7.Fhir.Model.CodeableConcept)ReasonEnded.DeepCopy(); } if (Patient != null) { dest.Patient = (Hl7.Fhir.Model.ResourceReference)Patient.DeepCopy(); } if (Prescriber != null) { dest.Prescriber = (Hl7.Fhir.Model.ResourceReference)Prescriber.DeepCopy(); } if (Encounter != null) { dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy(); } if (Reason != null) { dest.Reason = (Hl7.Fhir.Model.Element)Reason.DeepCopy(); } if (NoteElement != null) { dest.NoteElement = (Hl7.Fhir.Model.FhirString)NoteElement.DeepCopy(); } if (Medication != null) { dest.Medication = (Hl7.Fhir.Model.Element)Medication.DeepCopy(); } if (DosageInstruction != null) { dest.DosageInstruction = new List <Hl7.Fhir.Model.MedicationOrder.DosageInstructionComponent>(DosageInstruction.DeepCopy()); } if (DispenseRequest != null) { dest.DispenseRequest = (Hl7.Fhir.Model.MedicationOrder.DispenseRequestComponent)DispenseRequest.DeepCopy(); } if (Substitution != null) { dest.Substitution = (Hl7.Fhir.Model.MedicationOrder.SubstitutionComponent)Substitution.DeepCopy(); } if (PriorPrescription != null) { dest.PriorPrescription = (Hl7.Fhir.Model.ResourceReference)PriorPrescription.DeepCopy(); } return(dest); } else { throw new ArgumentException("Can only copy to an object of the same type", "other"); } }
public static void SerializeEncounter(Hl7.Fhir.Model.Encounter value, IFhirWriter writer, bool summary) { writer.WriteStartRootObject("Encounter"); writer.WriteStartComplexContent(); // Serialize element _id if (value.LocalIdElement != null) { writer.WritePrimitiveContents("_id", value.LocalIdElement, XmlSerializationHint.Attribute); } // Serialize element extension if (value.Extension != null && !summary && value.Extension.Count > 0) { writer.WriteStartArrayElement("extension"); foreach (var item in value.Extension) { writer.WriteStartArrayMember("extension"); ExtensionSerializer.SerializeExtension(item, writer, summary); writer.WriteEndArrayMember(); } writer.WriteEndArrayElement(); } // Serialize element language if (value.LanguageElement != null && !summary) { writer.WriteStartElement("language"); CodeSerializer.SerializeCode(value.LanguageElement, writer, summary); writer.WriteEndElement(); } // Serialize element text if (value.Text != null && !summary) { writer.WriteStartElement("text"); NarrativeSerializer.SerializeNarrative(value.Text, writer, summary); writer.WriteEndElement(); } // Serialize element contained if (value.Contained != null && !summary && value.Contained.Count > 0) { writer.WriteStartArrayElement("contained"); foreach (var item in value.Contained) { writer.WriteStartArrayMember("contained"); FhirSerializer.SerializeResource(item, writer, summary); writer.WriteEndArrayMember(); } writer.WriteEndArrayElement(); } // Serialize element identifier if (value.Identifier != null && value.Identifier.Count > 0) { writer.WriteStartArrayElement("identifier"); foreach (var item in value.Identifier) { writer.WriteStartArrayMember("identifier"); IdentifierSerializer.SerializeIdentifier(item, writer, summary); writer.WriteEndArrayMember(); } writer.WriteEndArrayElement(); } // Serialize element status if (value.StatusElement != null) { writer.WriteStartElement("status"); CodeSerializer.SerializeCode <Hl7.Fhir.Model.Encounter.EncounterState>(value.StatusElement, writer, summary); writer.WriteEndElement(); } // Serialize element class if (value.ClassElement != null) { writer.WriteStartElement("class"); CodeSerializer.SerializeCode <Hl7.Fhir.Model.Encounter.EncounterClass>(value.ClassElement, writer, summary); writer.WriteEndElement(); } // Serialize element type if (value.Type != null && value.Type.Count > 0) { writer.WriteStartArrayElement("type"); foreach (var item in value.Type) { writer.WriteStartArrayMember("type"); CodeableConceptSerializer.SerializeCodeableConcept(item, writer, summary); writer.WriteEndArrayMember(); } writer.WriteEndArrayElement(); } // Serialize element subject if (value.Subject != null) { writer.WriteStartElement("subject"); ResourceReferenceSerializer.SerializeResourceReference(value.Subject, writer, summary); writer.WriteEndElement(); } // Serialize element participant if (value.Participant != null && value.Participant.Count > 0) { writer.WriteStartArrayElement("participant"); foreach (var item in value.Participant) { writer.WriteStartArrayMember("participant"); EncounterSerializer.SerializeEncounterParticipantComponent(item, writer, summary); writer.WriteEndArrayMember(); } writer.WriteEndArrayElement(); } // Serialize element fulfills if (value.Fulfills != null) { writer.WriteStartElement("fulfills"); ResourceReferenceSerializer.SerializeResourceReference(value.Fulfills, writer, summary); writer.WriteEndElement(); } // Serialize element start if (value.StartElement != null && !summary) { writer.WriteStartElement("start"); FhirDateTimeSerializer.SerializeFhirDateTime(value.StartElement, writer, summary); writer.WriteEndElement(); } // Serialize element length if (value.Length != null && !summary) { writer.WriteStartElement("length"); QuantitySerializer.SerializeQuantity(value.Length, writer, summary); writer.WriteEndElement(); } // Serialize element reason if (value.Reason != null) { writer.WriteStartElement(SerializationUtil.BuildPolymorphicName("reason", value.Reason.GetType())); FhirSerializer.SerializeElement(value.Reason, writer, summary); writer.WriteEndElement(); } // Serialize element indication if (value.Indication != null && !summary) { writer.WriteStartElement("indication"); ResourceReferenceSerializer.SerializeResourceReference(value.Indication, writer, summary); writer.WriteEndElement(); } // Serialize element priority if (value.Priority != null && !summary) { writer.WriteStartElement("priority"); CodeableConceptSerializer.SerializeCodeableConcept(value.Priority, writer, summary); writer.WriteEndElement(); } // Serialize element hospitalization if (value.Hospitalization != null && !summary) { writer.WriteStartElement("hospitalization"); EncounterSerializer.SerializeEncounterHospitalizationComponent(value.Hospitalization, writer, summary); writer.WriteEndElement(); } // Serialize element location if (value.Location != null && !summary && value.Location.Count > 0) { writer.WriteStartArrayElement("location"); foreach (var item in value.Location) { writer.WriteStartArrayMember("location"); EncounterSerializer.SerializeEncounterLocationComponent(item, writer, summary); writer.WriteEndArrayMember(); } writer.WriteEndArrayElement(); } // Serialize element serviceProvider if (value.ServiceProvider != null && !summary) { writer.WriteStartElement("serviceProvider"); ResourceReferenceSerializer.SerializeResourceReference(value.ServiceProvider, writer, summary); writer.WriteEndElement(); } // Serialize element partOf if (value.PartOf != null && !summary) { writer.WriteStartElement("partOf"); ResourceReferenceSerializer.SerializeResourceReference(value.PartOf, writer, summary); writer.WriteEndElement(); } writer.WriteEndComplexContent(); writer.WriteEndRootObject(); }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as MedicationUsage; if (dest == null) { throw new ArgumentException("Can only copy to an object of the same type", "other"); } base.CopyTo(dest); if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (BasedOn != null) { dest.BasedOn = new List <Hl7.Fhir.Model.ResourceReference>(BasedOn.DeepCopy()); } if (PartOf != null) { dest.PartOf = new List <Hl7.Fhir.Model.ResourceReference>(PartOf.DeepCopy()); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.MedicationUsage.MedicationUsageStatusCodes>)StatusElement.DeepCopy(); } if (StatusReason != null) { dest.StatusReason = new List <Hl7.Fhir.Model.CodeableConcept>(StatusReason.DeepCopy()); } if (Category != null) { dest.Category = new List <Hl7.Fhir.Model.CodeableConcept>(Category.DeepCopy()); } if (Medication != null) { dest.Medication = (Hl7.Fhir.Model.CodeableReference)Medication.DeepCopy(); } if (Subject != null) { dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy(); } if (Encounter != null) { dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy(); } if (Effective != null) { dest.Effective = (Hl7.Fhir.Model.Element)Effective.DeepCopy(); } if (DateAssertedElement != null) { dest.DateAssertedElement = (Hl7.Fhir.Model.FhirDateTime)DateAssertedElement.DeepCopy(); } if (InformationSource != null) { dest.InformationSource = (Hl7.Fhir.Model.ResourceReference)InformationSource.DeepCopy(); } if (DerivedFrom != null) { dest.DerivedFrom = new List <Hl7.Fhir.Model.ResourceReference>(DerivedFrom.DeepCopy()); } if (Reason != null) { dest.Reason = new List <Hl7.Fhir.Model.CodeableReference>(Reason.DeepCopy()); } if (Note != null) { dest.Note = new List <Hl7.Fhir.Model.Annotation>(Note.DeepCopy()); } if (RenderedDosageInstructionElement != null) { dest.RenderedDosageInstructionElement = (Hl7.Fhir.Model.FhirString)RenderedDosageInstructionElement.DeepCopy(); } if (Dosage != null) { dest.Dosage = new List <Hl7.Fhir.Model.Dosage>(Dosage.DeepCopy()); } if (TakenAsOrderedElement != null) { dest.TakenAsOrderedElement = (Hl7.Fhir.Model.FhirBoolean)TakenAsOrderedElement.DeepCopy(); } return(dest); }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as Communication; if (dest == null) { throw new ArgumentException("Can only copy to an object of the same type", "other"); } base.CopyTo(dest); if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (InstantiatesCanonicalElement != null) { dest.InstantiatesCanonicalElement = new List <Hl7.Fhir.Model.Canonical>(InstantiatesCanonicalElement.DeepCopy()); } if (InstantiatesUriElement != null) { dest.InstantiatesUriElement = new List <Hl7.Fhir.Model.FhirUri>(InstantiatesUriElement.DeepCopy()); } if (BasedOn != null) { dest.BasedOn = new List <Hl7.Fhir.Model.ResourceReference>(BasedOn.DeepCopy()); } if (PartOf != null) { dest.PartOf = new List <Hl7.Fhir.Model.ResourceReference>(PartOf.DeepCopy()); } if (InResponseTo != null) { dest.InResponseTo = new List <Hl7.Fhir.Model.ResourceReference>(InResponseTo.DeepCopy()); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.EventStatus>)StatusElement.DeepCopy(); } if (StatusReason != null) { dest.StatusReason = (Hl7.Fhir.Model.CodeableConcept)StatusReason.DeepCopy(); } if (Category != null) { dest.Category = new List <Hl7.Fhir.Model.CodeableConcept>(Category.DeepCopy()); } if (PriorityElement != null) { dest.PriorityElement = (Code <Hl7.Fhir.Model.RequestPriority>)PriorityElement.DeepCopy(); } if (Medium != null) { dest.Medium = new List <Hl7.Fhir.Model.CodeableConcept>(Medium.DeepCopy()); } if (Subject != null) { dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy(); } if (Topic != null) { dest.Topic = (Hl7.Fhir.Model.CodeableConcept)Topic.DeepCopy(); } if (About != null) { dest.About = new List <Hl7.Fhir.Model.ResourceReference>(About.DeepCopy()); } if (Encounter != null) { dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy(); } if (SentElement != null) { dest.SentElement = (Hl7.Fhir.Model.FhirDateTime)SentElement.DeepCopy(); } if (ReceivedElement != null) { dest.ReceivedElement = (Hl7.Fhir.Model.FhirDateTime)ReceivedElement.DeepCopy(); } if (Recipient != null) { dest.Recipient = new List <Hl7.Fhir.Model.ResourceReference>(Recipient.DeepCopy()); } if (Sender != null) { dest.Sender = (Hl7.Fhir.Model.ResourceReference)Sender.DeepCopy(); } if (Reason != null) { dest.Reason = new List <Hl7.Fhir.Model.CodeableReference>(Reason.DeepCopy()); } if (Payload != null) { dest.Payload = new List <Hl7.Fhir.Model.Communication.PayloadComponent>(Payload.DeepCopy()); } if (Note != null) { dest.Note = new List <Hl7.Fhir.Model.Annotation>(Note.DeepCopy()); } return(dest); }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as CommunicationRequest; if (dest == null) { throw new ArgumentException("Can only copy to an object of the same type", "other"); } base.CopyTo(dest); if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (BasedOn != null) { dest.BasedOn = new List <Hl7.Fhir.Model.ResourceReference>(BasedOn.DeepCopy()); } if (Replaces != null) { dest.Replaces = new List <Hl7.Fhir.Model.ResourceReference>(Replaces.DeepCopy()); } if (GroupIdentifier != null) { dest.GroupIdentifier = (Hl7.Fhir.Model.Identifier)GroupIdentifier.DeepCopy(); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.RequestStatus>)StatusElement.DeepCopy(); } if (StatusReason != null) { dest.StatusReason = (Hl7.Fhir.Model.CodeableConcept)StatusReason.DeepCopy(); } if (Category != null) { dest.Category = new List <Hl7.Fhir.Model.CodeableConcept>(Category.DeepCopy()); } if (PriorityElement != null) { dest.PriorityElement = (Code <Hl7.Fhir.Model.RequestPriority>)PriorityElement.DeepCopy(); } if (DoNotPerformElement != null) { dest.DoNotPerformElement = (Hl7.Fhir.Model.FhirBoolean)DoNotPerformElement.DeepCopy(); } if (Medium != null) { dest.Medium = new List <Hl7.Fhir.Model.CodeableConcept>(Medium.DeepCopy()); } if (Subject != null) { dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy(); } if (About != null) { dest.About = new List <Hl7.Fhir.Model.ResourceReference>(About.DeepCopy()); } if (Encounter != null) { dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy(); } if (Payload != null) { dest.Payload = new List <Hl7.Fhir.Model.CommunicationRequest.PayloadComponent>(Payload.DeepCopy()); } if (Occurrence != null) { dest.Occurrence = (Hl7.Fhir.Model.DataType)Occurrence.DeepCopy(); } if (AuthoredOnElement != null) { dest.AuthoredOnElement = (Hl7.Fhir.Model.FhirDateTime)AuthoredOnElement.DeepCopy(); } if (Requester != null) { dest.Requester = (Hl7.Fhir.Model.ResourceReference)Requester.DeepCopy(); } if (Recipient != null) { dest.Recipient = new List <Hl7.Fhir.Model.ResourceReference>(Recipient.DeepCopy()); } if (InformationProvider != null) { dest.InformationProvider = new List <Hl7.Fhir.Model.ResourceReference>(InformationProvider.DeepCopy()); } if (Reason != null) { dest.Reason = new List <Hl7.Fhir.Model.CodeableReference>(Reason.DeepCopy()); } if (Note != null) { dest.Note = new List <Hl7.Fhir.Model.Annotation>(Note.DeepCopy()); } return(dest); }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as MedicationAdministration; if (dest != null) { base.CopyTo(dest); if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.MedicationAdministrationStatus>)StatusElement.DeepCopy(); } if (Patient != null) { dest.Patient = (Hl7.Fhir.Model.ResourceReference)Patient.DeepCopy(); } if (Practitioner != null) { dest.Practitioner = (Hl7.Fhir.Model.ResourceReference)Practitioner.DeepCopy(); } if (Encounter != null) { dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy(); } if (Prescription != null) { dest.Prescription = (Hl7.Fhir.Model.ResourceReference)Prescription.DeepCopy(); } if (WasNotGivenElement != null) { dest.WasNotGivenElement = (Hl7.Fhir.Model.FhirBoolean)WasNotGivenElement.DeepCopy(); } if (ReasonNotGiven != null) { dest.ReasonNotGiven = new List <Hl7.Fhir.Model.CodeableConcept>(ReasonNotGiven.DeepCopy()); } if (ReasonGiven != null) { dest.ReasonGiven = new List <Hl7.Fhir.Model.CodeableConcept>(ReasonGiven.DeepCopy()); } if (EffectiveTime != null) { dest.EffectiveTime = (Hl7.Fhir.Model.Element)EffectiveTime.DeepCopy(); } if (Medication != null) { dest.Medication = (Hl7.Fhir.Model.Element)Medication.DeepCopy(); } if (Device != null) { dest.Device = new List <Hl7.Fhir.Model.ResourceReference>(Device.DeepCopy()); } if (NoteElement != null) { dest.NoteElement = (Hl7.Fhir.Model.FhirString)NoteElement.DeepCopy(); } if (Dosage != null) { dest.Dosage = (Hl7.Fhir.Model.MedicationAdministration.DosageComponent)Dosage.DeepCopy(); } return(dest); } else { throw new ArgumentException("Can only copy to an object of the same type", "other"); } }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as DeviceUseRequest; if (dest != null) { base.CopyTo(dest); if (BodySite != null) { dest.BodySite = (Hl7.Fhir.Model.Element)BodySite.DeepCopy(); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.DeviceUseRequest.DeviceUseRequestStatus>)StatusElement.DeepCopy(); } if (Device != null) { dest.Device = (Hl7.Fhir.Model.ResourceReference)Device.DeepCopy(); } if (Encounter != null) { dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy(); } if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (Indication != null) { dest.Indication = new List <Hl7.Fhir.Model.CodeableConcept>(Indication.DeepCopy()); } if (NotesElement != null) { dest.NotesElement = new List <Hl7.Fhir.Model.FhirString>(NotesElement.DeepCopy()); } if (PrnReason != null) { dest.PrnReason = new List <Hl7.Fhir.Model.CodeableConcept>(PrnReason.DeepCopy()); } if (OrderedOnElement != null) { dest.OrderedOnElement = (Hl7.Fhir.Model.FhirDateTime)OrderedOnElement.DeepCopy(); } if (RecordedOnElement != null) { dest.RecordedOnElement = (Hl7.Fhir.Model.FhirDateTime)RecordedOnElement.DeepCopy(); } if (Subject != null) { dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy(); } if (Timing != null) { dest.Timing = (Hl7.Fhir.Model.Element)Timing.DeepCopy(); } if (PriorityElement != null) { dest.PriorityElement = (Code <Hl7.Fhir.Model.DeviceUseRequest.DeviceUseRequestPriority>)PriorityElement.DeepCopy(); } return(dest); } else { throw new ArgumentException("Can only copy to an object of the same type", "other"); } }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as Condition; if (dest == null) { throw new ArgumentException("Can only copy to an object of the same type", "other"); } base.CopyTo(dest); if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (ClinicalStatus != null) { dest.ClinicalStatus = (Hl7.Fhir.Model.CodeableConcept)ClinicalStatus.DeepCopy(); } if (VerificationStatus != null) { dest.VerificationStatus = (Hl7.Fhir.Model.CodeableConcept)VerificationStatus.DeepCopy(); } if (Category != null) { dest.Category = new List <Hl7.Fhir.Model.CodeableConcept>(Category.DeepCopy()); } if (Severity != null) { dest.Severity = (Hl7.Fhir.Model.CodeableConcept)Severity.DeepCopy(); } if (Code != null) { dest.Code = (Hl7.Fhir.Model.CodeableConcept)Code.DeepCopy(); } if (BodySite != null) { dest.BodySite = new List <Hl7.Fhir.Model.CodeableConcept>(BodySite.DeepCopy()); } if (Subject != null) { dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy(); } if (Encounter != null) { dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy(); } if (Onset != null) { dest.Onset = (Hl7.Fhir.Model.DataType)Onset.DeepCopy(); } if (Abatement != null) { dest.Abatement = (Hl7.Fhir.Model.DataType)Abatement.DeepCopy(); } if (RecordedDateElement != null) { dest.RecordedDateElement = (Hl7.Fhir.Model.FhirDateTime)RecordedDateElement.DeepCopy(); } if (Recorder != null) { dest.Recorder = (Hl7.Fhir.Model.ResourceReference)Recorder.DeepCopy(); } if (Asserter != null) { dest.Asserter = (Hl7.Fhir.Model.ResourceReference)Asserter.DeepCopy(); } if (Stage != null) { dest.Stage = new List <Hl7.Fhir.Model.Condition.StageComponent>(Stage.DeepCopy()); } if (Evidence != null) { dest.Evidence = new List <Hl7.Fhir.Model.Condition.EvidenceComponent>(Evidence.DeepCopy()); } if (Note != null) { dest.Note = new List <Hl7.Fhir.Model.Annotation>(Note.DeepCopy()); } return(dest); }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as Condition; if (dest != null) { base.CopyTo(dest); if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (Patient != null) { dest.Patient = (Hl7.Fhir.Model.ResourceReference)Patient.DeepCopy(); } if (Encounter != null) { dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy(); } if (Asserter != null) { dest.Asserter = (Hl7.Fhir.Model.ResourceReference)Asserter.DeepCopy(); } if (DateRecordedElement != null) { dest.DateRecordedElement = (Hl7.Fhir.Model.Date)DateRecordedElement.DeepCopy(); } if (Code != null) { dest.Code = (Hl7.Fhir.Model.CodeableConcept)Code.DeepCopy(); } if (Category != null) { dest.Category = (Hl7.Fhir.Model.CodeableConcept)Category.DeepCopy(); } if (ClinicalStatusElement != null) { dest.ClinicalStatusElement = (Hl7.Fhir.Model.Code)ClinicalStatusElement.DeepCopy(); } if (VerificationStatusElement != null) { dest.VerificationStatusElement = (Code <Hl7.Fhir.Model.Condition.ConditionVerificationStatus>)VerificationStatusElement.DeepCopy(); } if (Severity != null) { dest.Severity = (Hl7.Fhir.Model.CodeableConcept)Severity.DeepCopy(); } if (Onset != null) { dest.Onset = (Hl7.Fhir.Model.Element)Onset.DeepCopy(); } if (Abatement != null) { dest.Abatement = (Hl7.Fhir.Model.Element)Abatement.DeepCopy(); } if (Stage != null) { dest.Stage = (Hl7.Fhir.Model.Condition.StageComponent)Stage.DeepCopy(); } if (Evidence != null) { dest.Evidence = new List <Hl7.Fhir.Model.Condition.EvidenceComponent>(Evidence.DeepCopy()); } if (BodySite != null) { dest.BodySite = new List <Hl7.Fhir.Model.CodeableConcept>(BodySite.DeepCopy()); } if (NotesElement != null) { dest.NotesElement = (Hl7.Fhir.Model.FhirString)NotesElement.DeepCopy(); } return(dest); } else { throw new ArgumentException("Can only copy to an object of the same type", "other"); } }
public override ErrorList Validate() { var result = new ErrorList(); result.AddRange(base.Validate()); if (Subject != null) { result.AddRange(Subject.Validate()); } if (Encounter != null) { result.AddRange(Encounter.Validate()); } if (Asserter != null) { result.AddRange(Asserter.Validate()); } if (DateAssertedElement != null) { result.AddRange(DateAssertedElement.Validate()); } if (Code != null) { result.AddRange(Code.Validate()); } if (Category != null) { result.AddRange(Category.Validate()); } if (StatusElement != null) { result.AddRange(StatusElement.Validate()); } if (Certainty != null) { result.AddRange(Certainty.Validate()); } if (Severity != null) { result.AddRange(Severity.Validate()); } if (Onset != null) { result.AddRange(Onset.Validate()); } if (Abatement != null) { result.AddRange(Abatement.Validate()); } if (Stage != null) { result.AddRange(Stage.Validate()); } if (Evidence != null) { Evidence.ForEach(elem => result.AddRange(elem.Validate())); } if (Location != null) { Location.ForEach(elem => result.AddRange(elem.Validate())); } if (RelatedItem != null) { RelatedItem.ForEach(elem => result.AddRange(elem.Validate())); } if (NotesElement != null) { result.AddRange(NotesElement.Validate()); } return(result); }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as GuidanceResponse; if (dest == null) { throw new ArgumentException("Can only copy to an object of the same type", "other"); } base.CopyTo(dest); if (RequestIdentifier != null) { dest.RequestIdentifier = (Hl7.Fhir.Model.Identifier)RequestIdentifier.DeepCopy(); } if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (Module != null) { dest.Module = (Hl7.Fhir.Model.DataType)Module.DeepCopy(); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.GuidanceResponse.GuidanceResponseStatus>)StatusElement.DeepCopy(); } if (Subject != null) { dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy(); } if (Encounter != null) { dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy(); } if (OccurrenceDateTimeElement != null) { dest.OccurrenceDateTimeElement = (Hl7.Fhir.Model.FhirDateTime)OccurrenceDateTimeElement.DeepCopy(); } if (Performer != null) { dest.Performer = (Hl7.Fhir.Model.ResourceReference)Performer.DeepCopy(); } if (ReasonCode != null) { dest.ReasonCode = new List <Hl7.Fhir.Model.CodeableConcept>(ReasonCode.DeepCopy()); } if (ReasonReference != null) { dest.ReasonReference = new List <Hl7.Fhir.Model.ResourceReference>(ReasonReference.DeepCopy()); } if (Note != null) { dest.Note = new List <Hl7.Fhir.Model.Annotation>(Note.DeepCopy()); } if (EvaluationMessage != null) { dest.EvaluationMessage = new List <Hl7.Fhir.Model.ResourceReference>(EvaluationMessage.DeepCopy()); } if (OutputParameters != null) { dest.OutputParameters = (Hl7.Fhir.Model.ResourceReference)OutputParameters.DeepCopy(); } if (Result != null) { dest.Result = (Hl7.Fhir.Model.ResourceReference)Result.DeepCopy(); } if (DataRequirement != null) { dest.DataRequirement = new List <Hl7.Fhir.Model.DataRequirement>(DataRequirement.DeepCopy()); } return(dest); }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as Condition; if (dest != null) { base.CopyTo(dest); if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (Subject != null) { dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy(); } if (Encounter != null) { dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy(); } if (Asserter != null) { dest.Asserter = (Hl7.Fhir.Model.ResourceReference)Asserter.DeepCopy(); } if (DateAssertedElement != null) { dest.DateAssertedElement = (Hl7.Fhir.Model.Date)DateAssertedElement.DeepCopy(); } if (Code != null) { dest.Code = (Hl7.Fhir.Model.CodeableConcept)Code.DeepCopy(); } if (Category != null) { dest.Category = (Hl7.Fhir.Model.CodeableConcept)Category.DeepCopy(); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.Condition.ConditionStatus>)StatusElement.DeepCopy(); } if (Certainty != null) { dest.Certainty = (Hl7.Fhir.Model.CodeableConcept)Certainty.DeepCopy(); } if (Severity != null) { dest.Severity = (Hl7.Fhir.Model.CodeableConcept)Severity.DeepCopy(); } if (Onset != null) { dest.Onset = (Hl7.Fhir.Model.Element)Onset.DeepCopy(); } if (Abatement != null) { dest.Abatement = (Hl7.Fhir.Model.Element)Abatement.DeepCopy(); } if (Stage != null) { dest.Stage = (Hl7.Fhir.Model.Condition.ConditionStageComponent)Stage.DeepCopy(); } if (Evidence != null) { dest.Evidence = new List <Hl7.Fhir.Model.Condition.ConditionEvidenceComponent>(Evidence.DeepCopy()); } if (Location != null) { dest.Location = new List <Hl7.Fhir.Model.Condition.ConditionLocationComponent>(Location.DeepCopy()); } if (RelatedItem != null) { dest.RelatedItem = new List <Hl7.Fhir.Model.Condition.ConditionRelatedItemComponent>(RelatedItem.DeepCopy()); } if (NotesElement != null) { dest.NotesElement = (Hl7.Fhir.Model.FhirString)NotesElement.DeepCopy(); } return(dest); } else { throw new ArgumentException("Can only copy to an object of the same type", "other"); } }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as RiskAssessment; if (dest == null) { throw new ArgumentException("Can only copy to an object of the same type", "other"); } base.CopyTo(dest); if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (BasedOn != null) { dest.BasedOn = (Hl7.Fhir.Model.ResourceReference)BasedOn.DeepCopy(); } if (Parent != null) { dest.Parent = (Hl7.Fhir.Model.ResourceReference)Parent.DeepCopy(); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.ObservationStatus>)StatusElement.DeepCopy(); } if (Method != null) { dest.Method = (Hl7.Fhir.Model.CodeableConcept)Method.DeepCopy(); } if (Code != null) { dest.Code = (Hl7.Fhir.Model.CodeableConcept)Code.DeepCopy(); } if (Subject != null) { dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy(); } if (Encounter != null) { dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy(); } if (Occurrence != null) { dest.Occurrence = (Hl7.Fhir.Model.Element)Occurrence.DeepCopy(); } if (Condition != null) { dest.Condition = (Hl7.Fhir.Model.ResourceReference)Condition.DeepCopy(); } if (Performer != null) { dest.Performer = (Hl7.Fhir.Model.ResourceReference)Performer.DeepCopy(); } if (Reason != null) { dest.Reason = new List <Hl7.Fhir.Model.CodeableReference>(Reason.DeepCopy()); } if (Basis != null) { dest.Basis = new List <Hl7.Fhir.Model.ResourceReference>(Basis.DeepCopy()); } if (Prediction != null) { dest.Prediction = new List <Hl7.Fhir.Model.RiskAssessment.PredictionComponent>(Prediction.DeepCopy()); } if (MitigationElement != null) { dest.MitigationElement = (Hl7.Fhir.Model.FhirString)MitigationElement.DeepCopy(); } if (Note != null) { dest.Note = new List <Hl7.Fhir.Model.Annotation>(Note.DeepCopy()); } return(dest); }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as List; if (dest != null) { base.CopyTo(dest); if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (TitleElement != null) { dest.TitleElement = (Hl7.Fhir.Model.FhirString)TitleElement.DeepCopy(); } if (Code != null) { dest.Code = (Hl7.Fhir.Model.CodeableConcept)Code.DeepCopy(); } if (Subject != null) { dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy(); } if (Source != null) { dest.Source = (Hl7.Fhir.Model.ResourceReference)Source.DeepCopy(); } if (Encounter != null) { dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy(); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.List.ListStatus>)StatusElement.DeepCopy(); } if (DateElement != null) { dest.DateElement = (Hl7.Fhir.Model.FhirDateTime)DateElement.DeepCopy(); } if (OrderedBy != null) { dest.OrderedBy = (Hl7.Fhir.Model.CodeableConcept)OrderedBy.DeepCopy(); } if (ModeElement != null) { dest.ModeElement = (Code <Hl7.Fhir.Model.ListMode>)ModeElement.DeepCopy(); } if (NoteElement != null) { dest.NoteElement = (Hl7.Fhir.Model.FhirString)NoteElement.DeepCopy(); } if (Entry != null) { dest.Entry = new List <Hl7.Fhir.Model.List.EntryComponent>(Entry.DeepCopy()); } if (EmptyReason != null) { dest.EmptyReason = (Hl7.Fhir.Model.CodeableConcept)EmptyReason.DeepCopy(); } return(dest); } else { throw new ArgumentException("Can only copy to an object of the same type", "other"); } }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as Media; if (dest == null) { throw new ArgumentException("Can only copy to an object of the same type", "other"); } base.CopyTo(dest); if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (BasedOn != null) { dest.BasedOn = new List <Hl7.Fhir.Model.ResourceReference>(BasedOn.DeepCopy()); } if (PartOf != null) { dest.PartOf = new List <Hl7.Fhir.Model.ResourceReference>(PartOf.DeepCopy()); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.EventStatus>)StatusElement.DeepCopy(); } if (Type != null) { dest.Type = (Hl7.Fhir.Model.CodeableConcept)Type.DeepCopy(); } if (Modality != null) { dest.Modality = (Hl7.Fhir.Model.CodeableConcept)Modality.DeepCopy(); } if (View != null) { dest.View = (Hl7.Fhir.Model.CodeableConcept)View.DeepCopy(); } if (Subject != null) { dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy(); } if (Encounter != null) { dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy(); } if (Created != null) { dest.Created = (Hl7.Fhir.Model.DataType)Created.DeepCopy(); } if (IssuedElement != null) { dest.IssuedElement = (Hl7.Fhir.Model.Instant)IssuedElement.DeepCopy(); } if (Operator != null) { dest.Operator = (Hl7.Fhir.Model.ResourceReference)Operator.DeepCopy(); } if (ReasonCode != null) { dest.ReasonCode = new List <Hl7.Fhir.Model.CodeableConcept>(ReasonCode.DeepCopy()); } if (BodySite != null) { dest.BodySite = (Hl7.Fhir.Model.CodeableConcept)BodySite.DeepCopy(); } if (DeviceNameElement != null) { dest.DeviceNameElement = (Hl7.Fhir.Model.FhirString)DeviceNameElement.DeepCopy(); } if (Device != null) { dest.Device = (Hl7.Fhir.Model.ResourceReference)Device.DeepCopy(); } if (HeightElement != null) { dest.HeightElement = (Hl7.Fhir.Model.PositiveInt)HeightElement.DeepCopy(); } if (WidthElement != null) { dest.WidthElement = (Hl7.Fhir.Model.PositiveInt)WidthElement.DeepCopy(); } if (FramesElement != null) { dest.FramesElement = (Hl7.Fhir.Model.PositiveInt)FramesElement.DeepCopy(); } if (DurationElement != null) { dest.DurationElement = (Hl7.Fhir.Model.FhirDecimal)DurationElement.DeepCopy(); } if (Content != null) { dest.Content = (Hl7.Fhir.Model.Attachment)Content.DeepCopy(); } if (Note != null) { dest.Note = new List <Hl7.Fhir.Model.Annotation>(Note.DeepCopy()); } return(dest); }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as Procedure; if (dest != null) { base.CopyTo(dest); if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (Subject != null) { dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy(); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.Procedure.ProcedureStatus>)StatusElement.DeepCopy(); } if (Category != null) { dest.Category = (Hl7.Fhir.Model.CodeableConcept)Category.DeepCopy(); } if (Code != null) { dest.Code = (Hl7.Fhir.Model.CodeableConcept)Code.DeepCopy(); } if (NotPerformedElement != null) { dest.NotPerformedElement = (Hl7.Fhir.Model.FhirBoolean)NotPerformedElement.DeepCopy(); } if (ReasonNotPerformed != null) { dest.ReasonNotPerformed = new List <Hl7.Fhir.Model.CodeableConcept>(ReasonNotPerformed.DeepCopy()); } if (BodySite != null) { dest.BodySite = new List <Hl7.Fhir.Model.CodeableConcept>(BodySite.DeepCopy()); } if (Reason != null) { dest.Reason = (Hl7.Fhir.Model.Element)Reason.DeepCopy(); } if (Performer != null) { dest.Performer = new List <Hl7.Fhir.Model.Procedure.PerformerComponent>(Performer.DeepCopy()); } if (Performed != null) { dest.Performed = (Hl7.Fhir.Model.Element)Performed.DeepCopy(); } if (Encounter != null) { dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy(); } if (Location != null) { dest.Location = (Hl7.Fhir.Model.ResourceReference)Location.DeepCopy(); } if (Outcome != null) { dest.Outcome = (Hl7.Fhir.Model.CodeableConcept)Outcome.DeepCopy(); } if (Report != null) { dest.Report = new List <Hl7.Fhir.Model.ResourceReference>(Report.DeepCopy()); } if (Complication != null) { dest.Complication = new List <Hl7.Fhir.Model.CodeableConcept>(Complication.DeepCopy()); } if (FollowUp != null) { dest.FollowUp = new List <Hl7.Fhir.Model.CodeableConcept>(FollowUp.DeepCopy()); } if (Request != null) { dest.Request = (Hl7.Fhir.Model.ResourceReference)Request.DeepCopy(); } if (Notes != null) { dest.Notes = new List <Hl7.Fhir.Model.Annotation>(Notes.DeepCopy()); } if (FocalDevice != null) { dest.FocalDevice = new List <Hl7.Fhir.Model.Procedure.FocalDeviceComponent>(FocalDevice.DeepCopy()); } if (Used != null) { dest.Used = new List <Hl7.Fhir.Model.ResourceReference>(Used.DeepCopy()); } return(dest); } else { throw new ArgumentException("Can only copy to an object of the same type", "other"); } }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as CareTeam; if (dest == null) { throw new ArgumentException("Can only copy to an object of the same type", "other"); } base.CopyTo(dest); if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.CareTeam.CareTeamStatus>)StatusElement.DeepCopy(); } if (Category != null) { dest.Category = new List <Hl7.Fhir.Model.CodeableConcept>(Category.DeepCopy()); } if (NameElement != null) { dest.NameElement = (Hl7.Fhir.Model.FhirString)NameElement.DeepCopy(); } if (Subject != null) { dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy(); } if (Encounter != null) { dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy(); } if (Period != null) { dest.Period = (Hl7.Fhir.Model.Period)Period.DeepCopy(); } if (Participant != null) { dest.Participant = new List <Hl7.Fhir.Model.CareTeam.ParticipantComponent>(Participant.DeepCopy()); } if (ReasonCode != null) { dest.ReasonCode = new List <Hl7.Fhir.Model.CodeableConcept>(ReasonCode.DeepCopy()); } if (ReasonReference != null) { dest.ReasonReference = new List <Hl7.Fhir.Model.ResourceReference>(ReasonReference.DeepCopy()); } if (ManagingOrganization != null) { dest.ManagingOrganization = new List <Hl7.Fhir.Model.ResourceReference>(ManagingOrganization.DeepCopy()); } if (Telecom != null) { dest.Telecom = new List <Hl7.Fhir.Model.ContactPoint>(Telecom.DeepCopy()); } if (Note != null) { dest.Note = new List <Hl7.Fhir.Model.Annotation>(Note.DeepCopy()); } return(dest); }
public override IDeepCopyable CopyTo(IDeepCopyable other) { var dest = other as DeviceRequest; if (dest == null) { throw new ArgumentException("Can only copy to an object of the same type", "other"); } base.CopyTo(dest); if (Identifier != null) { dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy()); } if (InstantiatesCanonicalElement != null) { dest.InstantiatesCanonicalElement = new List <Hl7.Fhir.Model.Canonical>(InstantiatesCanonicalElement.DeepCopy()); } if (InstantiatesUriElement != null) { dest.InstantiatesUriElement = new List <Hl7.Fhir.Model.FhirUri>(InstantiatesUriElement.DeepCopy()); } if (BasedOn != null) { dest.BasedOn = new List <Hl7.Fhir.Model.ResourceReference>(BasedOn.DeepCopy()); } if (PriorRequest != null) { dest.PriorRequest = new List <Hl7.Fhir.Model.ResourceReference>(PriorRequest.DeepCopy()); } if (GroupIdentifier != null) { dest.GroupIdentifier = (Hl7.Fhir.Model.Identifier)GroupIdentifier.DeepCopy(); } if (StatusElement != null) { dest.StatusElement = (Code <Hl7.Fhir.Model.RequestStatus>)StatusElement.DeepCopy(); } if (IntentElement != null) { dest.IntentElement = (Code <Hl7.Fhir.Model.RequestIntent>)IntentElement.DeepCopy(); } if (PriorityElement != null) { dest.PriorityElement = (Code <Hl7.Fhir.Model.RequestPriority>)PriorityElement.DeepCopy(); } if (Code != null) { dest.Code = (Hl7.Fhir.Model.CodeableReference)Code.DeepCopy(); } if (Parameter != null) { dest.Parameter = new List <Hl7.Fhir.Model.DeviceRequest.ParameterComponent>(Parameter.DeepCopy()); } if (Subject != null) { dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy(); } if (Encounter != null) { dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy(); } if (Occurrence != null) { dest.Occurrence = (Hl7.Fhir.Model.DataType)Occurrence.DeepCopy(); } if (AuthoredOnElement != null) { dest.AuthoredOnElement = (Hl7.Fhir.Model.FhirDateTime)AuthoredOnElement.DeepCopy(); } if (Requester != null) { dest.Requester = (Hl7.Fhir.Model.ResourceReference)Requester.DeepCopy(); } if (PerformerType != null) { dest.PerformerType = (Hl7.Fhir.Model.CodeableConcept)PerformerType.DeepCopy(); } if (Performer != null) { dest.Performer = (Hl7.Fhir.Model.ResourceReference)Performer.DeepCopy(); } if (Reason != null) { dest.Reason = new List <Hl7.Fhir.Model.CodeableReference>(Reason.DeepCopy()); } if (Insurance != null) { dest.Insurance = new List <Hl7.Fhir.Model.ResourceReference>(Insurance.DeepCopy()); } if (SupportingInfo != null) { dest.SupportingInfo = new List <Hl7.Fhir.Model.ResourceReference>(SupportingInfo.DeepCopy()); } if (Note != null) { dest.Note = new List <Hl7.Fhir.Model.Annotation>(Note.DeepCopy()); } if (RelevantHistory != null) { dest.RelevantHistory = new List <Hl7.Fhir.Model.ResourceReference>(RelevantHistory.DeepCopy()); } return(dest); }
public Bundle SetBundleOrder(Order order, DiagnosticOrder diagnosticOrder, Specimen specimen, Encounter encounter, Condition condition, Observation observation, Practitioner practitioner, Coverage coverage, Patient patient) { Bundle bundle = new Bundle(); bundle.Meta = new Meta() { Profile = new string[] { MetaBundleOrder } }; bundle.Entry = new List<Bundle.BundleEntryComponent>(); if (order != null) { Bundle.BundleEntryComponent component = new Bundle.BundleEntryComponent { Resource = order, Transaction = new Bundle.BundleEntryTransactionComponent { Method = Bundle.HTTPVerb.POST, Url = "Order" } }; bundle.Entry.Add(component); } if (diagnosticOrder != null) { Bundle.BundleEntryComponent component = new Bundle.BundleEntryComponent { Resource = diagnosticOrder, Transaction = new Bundle.BundleEntryTransactionComponent() { Method = Bundle.HTTPVerb.POST, Url = "DiagnosticOrder" } }; bundle.Entry.Add(component); } if (specimen != null) { Bundle.BundleEntryComponent component = new Bundle.BundleEntryComponent { Resource = specimen, Transaction = new Bundle.BundleEntryTransactionComponent() { Method = Bundle.HTTPVerb.POST, Url = "Specimen" } }; bundle.Entry.Add(component); } if (encounter != null) { Bundle.BundleEntryComponent component = new Bundle.BundleEntryComponent { Resource = encounter, Transaction = new Bundle.BundleEntryTransactionComponent() { Method = Bundle.HTTPVerb.POST, Url = "Encounter" } }; bundle.Entry.Add(component); } if (condition != null) { Bundle.BundleEntryComponent component = new Bundle.BundleEntryComponent { Resource = condition, Transaction = new Bundle.BundleEntryTransactionComponent() { Method = Bundle.HTTPVerb.POST, Url = "Condition" } }; bundle.Entry.Add(component); } if (observation != null) { Bundle.BundleEntryComponent component = new Bundle.BundleEntryComponent { Resource = observation, Transaction = new Bundle.BundleEntryTransactionComponent() { Method = Bundle.HTTPVerb.POST, Url = "Observation" } }; bundle.Entry.Add(component); } if (practitioner != null) { Bundle.BundleEntryComponent component = new Bundle.BundleEntryComponent { Resource = practitioner, Transaction = new Bundle.BundleEntryTransactionComponent() { Method = Bundle.HTTPVerb.POST, Url = "Practitioner" } }; bundle.Entry.Add(component); } if (coverage != null) { Bundle.BundleEntryComponent component = new Bundle.BundleEntryComponent { Resource = coverage, Transaction = new Bundle.BundleEntryTransactionComponent() { Method = Bundle.HTTPVerb.POST, Url = "Coverage" } }; bundle.Entry.Add(component); } if (patient != null) { Bundle.BundleEntryComponent component = new Bundle.BundleEntryComponent { Resource = patient, Transaction = new Bundle.BundleEntryTransactionComponent() { Method = Bundle.HTTPVerb.POST, Url = "Patient" } }; bundle.Entry.Add(component); } return bundle; }