Пример #1
0
		private void btnStart_Click(object sender, EventArgs e)
		{
			txtResult.Clear();

			try
			{
				var checker = new MemberChecker();
				checker.NamePattern = txtMethodNamePattern.Text;

				foreach (var item in flvMain.Items)
				{
					var lvi = (ListViewItem)item;
					var reason = new StatusReason(Environment.NewLine);
					var path = lvi.Tag.ToString();

					txtResult.AppendText("==========" + Environment.NewLine + lvi.Text + Environment.NewLine);

					checker.CheckFile(path, reason);
					txtResult.AppendText(reason.IsOK ? "OK." : reason.Reason.ToString());
		
					txtResult.AppendText(Environment.NewLine);
					txtResult.AppendText(Environment.NewLine);
				}
			}
			catch (Exception exc)
			{
				ErrorBox.ShowError(exc);
			}
		}
 public static ReasonViewModel MapReason(StatusReason reason)
 {
     return(new ReasonViewModel
     {
         Id = reason.Id,
         Description = reason.Description
     });
 }
    private static String GetStatusText(StatusReason reasonCode)
    {
        var retVal = "Unknown";

        switch (reasonCode)
        {
        case StatusReason.StatusFiltered:
            retVal = "Filtered";
            break;
        }
        return(retVal);
    }
 /// <summary>
 /// Gets the hash code
 /// </summary>
 /// <returns>Hash code</returns>
 public override int GetHashCode()
 {
     unchecked // Overflow is fine, just wrap
     {
         var hashCode = 41;
         // Suitable nullity checks etc, of course :)
         if (Name != null)
         {
             hashCode = hashCode * 59 + Name.GetHashCode();
         }
         if (Status != null)
         {
             hashCode = hashCode * 59 + Status.GetHashCode();
         }
         if (StatusReason != null)
         {
             hashCode = hashCode * 59 + StatusReason.GetHashCode();
         }
         if (ValidFor != null)
         {
             hashCode = hashCode * 59 + ValidFor.GetHashCode();
         }
         if (EngagedParty != null)
         {
             hashCode = hashCode * 59 + EngagedParty.GetHashCode();
         }
         if (PartyRoleType != null)
         {
             hashCode = hashCode * 59 + PartyRoleType.GetHashCode();
         }
         if (Account != null)
         {
             hashCode = hashCode * 59 + Account.GetHashCode();
         }
         if (Characteristic != null)
         {
             hashCode = hashCode * 59 + Characteristic.GetHashCode();
         }
         if (CreditProfile != null)
         {
             hashCode = hashCode * 59 + CreditProfile.GetHashCode();
         }
         if (Agreement != null)
         {
             hashCode = hashCode * 59 + Agreement.GetHashCode();
         }
         if (RelatedParty != null)
         {
             hashCode = hashCode * 59 + RelatedParty.GetHashCode();
         }
         return(hashCode);
     }
 }
Пример #5
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (BillingAddress != null ? BillingAddress.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (CardBrand != null ? CardBrand.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ CardExpMonth.GetHashCode();
         hashCode = (hashCode * 397) ^ CardExpYear.GetHashCode();
         hashCode = (hashCode * 397) ^ (CardLast4 != null ? CardLast4.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ CustomerId.GetHashCode();
         hashCode = (hashCode * 397) ^ HasCardErrorInDunning.GetHashCode();
         hashCode = (hashCode * 397) ^ (PaymentType != null ? PaymentType.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ProcessorName != null ? ProcessorName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Status != null ? Status.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (StatusReason != null ? StatusReason.GetHashCode() : 0);
         return(hashCode);
     }
 }
        /// <summary>
        /// Returns true if CustomerUpdate instances are equal
        /// </summary>
        /// <param name="other">Instance of CustomerUpdate to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(CustomerUpdate other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                     ) &&
                 (
                     Status == other.Status ||
                     Status != null &&
                     Status.Equals(other.Status)
                 ) &&
                 (
                     StatusReason == other.StatusReason ||
                     StatusReason != null &&
                     StatusReason.Equals(other.StatusReason)
                 ) &&
                 (
                     ValidFor == other.ValidFor ||
                     ValidFor != null &&
                     ValidFor.Equals(other.ValidFor)
                 ) &&
                 (
                     EngagedParty == other.EngagedParty ||
                     EngagedParty != null &&
                     EngagedParty.Equals(other.EngagedParty)
                 ) &&
                 (
                     PartyRoleType == other.PartyRoleType ||
                     PartyRoleType != null &&
                     PartyRoleType.Equals(other.PartyRoleType)
                 ) &&
                 (
                     Account == other.Account ||
                     Account != null &&
                     Account.SequenceEqual(other.Account)
                 ) &&
                 (
                     Characteristic == other.Characteristic ||
                     Characteristic != null &&
                     Characteristic.SequenceEqual(other.Characteristic)
                 ) &&
                 (
                     CreditProfile == other.CreditProfile ||
                     CreditProfile != null &&
                     CreditProfile.SequenceEqual(other.CreditProfile)
                 ) &&
                 (
                     Agreement == other.Agreement ||
                     Agreement != null &&
                     Agreement.SequenceEqual(other.Agreement)
                 ) &&
                 (
                     RelatedParty == other.RelatedParty ||
                     RelatedParty != null &&
                     RelatedParty.SequenceEqual(other.RelatedParty)
                 ));
        }
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as MedicationStatement;

            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.MedicationStatement.MedicationStatusCodes>)StatusElement.DeepCopy();
            }
            if (StatusReason != null)
            {
                dest.StatusReason = new List <Hl7.Fhir.Model.CodeableConcept>(StatusReason.DeepCopy());
            }
            if (Category != null)
            {
                dest.Category = (Hl7.Fhir.Model.CodeableConcept)Category.DeepCopy();
            }
            if (Medication != null)
            {
                dest.Medication = (Hl7.Fhir.Model.Element)Medication.DeepCopy();
            }
            if (Subject != null)
            {
                dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy();
            }
            if (Context != null)
            {
                dest.Context = (Hl7.Fhir.Model.ResourceReference)Context.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 (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 (Dosage != null)
            {
                dest.Dosage = new List <Hl7.Fhir.Model.Dosage>(Dosage.DeepCopy());
            }
            return(dest);
        }
Пример #8
0
        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);
        }
Пример #9
0
        /// <summary>
        /// Serialize to a JSON object
        /// </summary>
        public new void SerializeJson(Utf8JsonWriter writer, JsonSerializerOptions options, bool includeStartObject = true)
        {
            if (includeStartObject)
            {
                writer.WriteStartObject();
            }

            if (!string.IsNullOrEmpty(ResourceType))
            {
                writer.WriteString("resourceType", (string)ResourceType !);
            }


            ((Fhir.R4.Models.DomainResource) this).SerializeJson(writer, options, false);

            if ((Identifier != null) && (Identifier.Count != 0))
            {
                writer.WritePropertyName("identifier");
                writer.WriteStartArray();

                foreach (Identifier valIdentifier in Identifier)
                {
                    valIdentifier.SerializeJson(writer, options, true);
                }

                writer.WriteEndArray();
            }

            if (!string.IsNullOrEmpty(Status))
            {
                writer.WriteString("status", (string)Status !);
            }

            if (_Status != null)
            {
                writer.WritePropertyName("_status");
                _Status.SerializeJson(writer, options);
            }

            if (StatusReason != null)
            {
                writer.WritePropertyName("statusReason");
                StatusReason.SerializeJson(writer, options);
            }

            if (Code != null)
            {
                writer.WritePropertyName("code");
                Code.SerializeJson(writer, options);
            }

            if (!string.IsNullOrEmpty(Description))
            {
                writer.WriteString("description", (string)Description !);
            }

            if (_Description != null)
            {
                writer.WritePropertyName("_description");
                _Description.SerializeJson(writer, options);
            }

            if (Subject != null)
            {
                writer.WritePropertyName("subject");
                Subject.SerializeJson(writer, options);
            }

            if (Encounter != null)
            {
                writer.WritePropertyName("encounter");
                Encounter.SerializeJson(writer, options);
            }

            if (!string.IsNullOrEmpty(EffectiveDateTime))
            {
                writer.WriteString("effectiveDateTime", (string)EffectiveDateTime !);
            }

            if (_EffectiveDateTime != null)
            {
                writer.WritePropertyName("_effectiveDateTime");
                _EffectiveDateTime.SerializeJson(writer, options);
            }

            if (EffectivePeriod != null)
            {
                writer.WritePropertyName("effectivePeriod");
                EffectivePeriod.SerializeJson(writer, options);
            }

            if (!string.IsNullOrEmpty(Date))
            {
                writer.WriteString("date", (string)Date !);
            }

            if (_Date != null)
            {
                writer.WritePropertyName("_date");
                _Date.SerializeJson(writer, options);
            }

            if (Assessor != null)
            {
                writer.WritePropertyName("assessor");
                Assessor.SerializeJson(writer, options);
            }

            if (Previous != null)
            {
                writer.WritePropertyName("previous");
                Previous.SerializeJson(writer, options);
            }

            if ((Problem != null) && (Problem.Count != 0))
            {
                writer.WritePropertyName("problem");
                writer.WriteStartArray();

                foreach (Reference valProblem in Problem)
                {
                    valProblem.SerializeJson(writer, options, true);
                }

                writer.WriteEndArray();
            }

            if ((Investigation != null) && (Investigation.Count != 0))
            {
                writer.WritePropertyName("investigation");
                writer.WriteStartArray();

                foreach (ClinicalImpressionInvestigation valInvestigation in Investigation)
                {
                    valInvestigation.SerializeJson(writer, options, true);
                }

                writer.WriteEndArray();
            }

            if ((Protocol != null) && (Protocol.Count != 0))
            {
                writer.WritePropertyName("protocol");
                writer.WriteStartArray();

                foreach (string valProtocol in Protocol)
                {
                    writer.WriteStringValue(valProtocol);
                }

                writer.WriteEndArray();
            }

            if ((_Protocol != null) && (_Protocol.Count != 0))
            {
                writer.WritePropertyName("_protocol");
                writer.WriteStartArray();

                foreach (Element val_Protocol in _Protocol)
                {
                    val_Protocol.SerializeJson(writer, options, true);
                }

                writer.WriteEndArray();
            }

            if (!string.IsNullOrEmpty(Summary))
            {
                writer.WriteString("summary", (string)Summary !);
            }

            if (_Summary != null)
            {
                writer.WritePropertyName("_summary");
                _Summary.SerializeJson(writer, options);
            }

            if ((Finding != null) && (Finding.Count != 0))
            {
                writer.WritePropertyName("finding");
                writer.WriteStartArray();

                foreach (ClinicalImpressionFinding valFinding in Finding)
                {
                    valFinding.SerializeJson(writer, options, true);
                }

                writer.WriteEndArray();
            }

            if ((PrognosisCodeableConcept != null) && (PrognosisCodeableConcept.Count != 0))
            {
                writer.WritePropertyName("prognosisCodeableConcept");
                writer.WriteStartArray();

                foreach (CodeableConcept valPrognosisCodeableConcept in PrognosisCodeableConcept)
                {
                    valPrognosisCodeableConcept.SerializeJson(writer, options, true);
                }

                writer.WriteEndArray();
            }

            if ((PrognosisReference != null) && (PrognosisReference.Count != 0))
            {
                writer.WritePropertyName("prognosisReference");
                writer.WriteStartArray();

                foreach (Reference valPrognosisReference in PrognosisReference)
                {
                    valPrognosisReference.SerializeJson(writer, options, true);
                }

                writer.WriteEndArray();
            }

            if ((SupportingInfo != null) && (SupportingInfo.Count != 0))
            {
                writer.WritePropertyName("supportingInfo");
                writer.WriteStartArray();

                foreach (Reference valSupportingInfo in SupportingInfo)
                {
                    valSupportingInfo.SerializeJson(writer, options, true);
                }

                writer.WriteEndArray();
            }

            if ((Note != null) && (Note.Count != 0))
            {
                writer.WritePropertyName("note");
                writer.WriteStartArray();

                foreach (Annotation valNote in Note)
                {
                    valNote.SerializeJson(writer, options, true);
                }

                writer.WriteEndArray();
            }

            if (includeStartObject)
            {
                writer.WriteEndObject();
            }
        }
Пример #10
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as Goal;

            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 (Start != null)
                {
                    dest.Start = (Hl7.Fhir.Model.Element)Start.DeepCopy();
                }
                if (Target != null)
                {
                    dest.Target = (Hl7.Fhir.Model.Element)Target.DeepCopy();
                }
                if (Category != null)
                {
                    dest.Category = new List <Hl7.Fhir.Model.CodeableConcept>(Category.DeepCopy());
                }
                if (DescriptionElement != null)
                {
                    dest.DescriptionElement = (Hl7.Fhir.Model.FhirString)DescriptionElement.DeepCopy();
                }
                if (StatusElement != null)
                {
                    dest.StatusElement = (Code <Hl7.Fhir.Model.Goal.GoalStatus>)StatusElement.DeepCopy();
                }
                if (StatusDateElement != null)
                {
                    dest.StatusDateElement = (Hl7.Fhir.Model.Date)StatusDateElement.DeepCopy();
                }
                if (StatusReason != null)
                {
                    dest.StatusReason = (Hl7.Fhir.Model.CodeableConcept)StatusReason.DeepCopy();
                }
                if (Author != null)
                {
                    dest.Author = (Hl7.Fhir.Model.ResourceReference)Author.DeepCopy();
                }
                if (Priority != null)
                {
                    dest.Priority = (Hl7.Fhir.Model.CodeableConcept)Priority.DeepCopy();
                }
                if (Addresses != null)
                {
                    dest.Addresses = new List <Hl7.Fhir.Model.ResourceReference>(Addresses.DeepCopy());
                }
                if (Note != null)
                {
                    dest.Note = new List <Hl7.Fhir.Model.Annotation>(Note.DeepCopy());
                }
                if (Outcome != null)
                {
                    dest.Outcome = new List <Hl7.Fhir.Model.Goal.OutcomeComponent>(Outcome.DeepCopy());
                }
                return(dest);
            }
            else
            {
                throw new ArgumentException("Can only copy to an object of the same type", "other");
            }
        }
 public NotAllowedOkResult(T content, ApiController controller, StatusReason statusReason)
     : base(content, controller)
 {
     statusReasonCode = statusReason;
 }
Пример #12
0
        /// <summary>
        /// Serialize to a JSON object
        /// </summary>
        public new void SerializeJson(Utf8JsonWriter writer, JsonSerializerOptions options, bool includeStartObject = true)
        {
            if (includeStartObject)
            {
                writer.WriteStartObject();
            }
            if (!string.IsNullOrEmpty(ResourceType))
            {
                writer.WriteString("resourceType", (string)ResourceType !);
            }


            ((fhirCsR4.Models.DomainResource) this).SerializeJson(writer, options, false);

            if ((Identifier != null) && (Identifier.Count != 0))
            {
                writer.WritePropertyName("identifier");
                writer.WriteStartArray();

                foreach (Identifier valIdentifier in Identifier)
                {
                    valIdentifier.SerializeJson(writer, options, true);
                }

                writer.WriteEndArray();
            }

            if ((InstantiatesCanonical != null) && (InstantiatesCanonical.Count != 0))
            {
                writer.WritePropertyName("instantiatesCanonical");
                writer.WriteStartArray();

                foreach (string valInstantiatesCanonical in InstantiatesCanonical)
                {
                    writer.WriteStringValue(valInstantiatesCanonical);
                }

                writer.WriteEndArray();
            }

            if ((_InstantiatesCanonical != null) && (_InstantiatesCanonical.Count != 0))
            {
                writer.WritePropertyName("_instantiatesCanonical");
                writer.WriteStartArray();

                foreach (Element val_InstantiatesCanonical in _InstantiatesCanonical)
                {
                    val_InstantiatesCanonical.SerializeJson(writer, options, true);
                }

                writer.WriteEndArray();
            }

            if ((InstantiatesUri != null) && (InstantiatesUri.Count != 0))
            {
                writer.WritePropertyName("instantiatesUri");
                writer.WriteStartArray();

                foreach (string valInstantiatesUri in InstantiatesUri)
                {
                    writer.WriteStringValue(valInstantiatesUri);
                }

                writer.WriteEndArray();
            }

            if ((_InstantiatesUri != null) && (_InstantiatesUri.Count != 0))
            {
                writer.WritePropertyName("_instantiatesUri");
                writer.WriteStartArray();

                foreach (Element val_InstantiatesUri in _InstantiatesUri)
                {
                    val_InstantiatesUri.SerializeJson(writer, options, true);
                }

                writer.WriteEndArray();
            }

            if ((BasedOn != null) && (BasedOn.Count != 0))
            {
                writer.WritePropertyName("basedOn");
                writer.WriteStartArray();

                foreach (Reference valBasedOn in BasedOn)
                {
                    valBasedOn.SerializeJson(writer, options, true);
                }

                writer.WriteEndArray();
            }

            if ((PartOf != null) && (PartOf.Count != 0))
            {
                writer.WritePropertyName("partOf");
                writer.WriteStartArray();

                foreach (Reference valPartOf in PartOf)
                {
                    valPartOf.SerializeJson(writer, options, true);
                }

                writer.WriteEndArray();
            }

            if ((InResponseTo != null) && (InResponseTo.Count != 0))
            {
                writer.WritePropertyName("inResponseTo");
                writer.WriteStartArray();

                foreach (Reference valInResponseTo in InResponseTo)
                {
                    valInResponseTo.SerializeJson(writer, options, true);
                }

                writer.WriteEndArray();
            }

            if (!string.IsNullOrEmpty(Status))
            {
                writer.WriteString("status", (string)Status !);
            }

            if (_Status != null)
            {
                writer.WritePropertyName("_status");
                _Status.SerializeJson(writer, options);
            }

            if (StatusReason != null)
            {
                writer.WritePropertyName("statusReason");
                StatusReason.SerializeJson(writer, options);
            }

            if ((Category != null) && (Category.Count != 0))
            {
                writer.WritePropertyName("category");
                writer.WriteStartArray();

                foreach (CodeableConcept valCategory in Category)
                {
                    valCategory.SerializeJson(writer, options, true);
                }

                writer.WriteEndArray();
            }

            if (!string.IsNullOrEmpty(Priority))
            {
                writer.WriteString("priority", (string)Priority !);
            }

            if (_Priority != null)
            {
                writer.WritePropertyName("_priority");
                _Priority.SerializeJson(writer, options);
            }

            if ((Medium != null) && (Medium.Count != 0))
            {
                writer.WritePropertyName("medium");
                writer.WriteStartArray();

                foreach (CodeableConcept valMedium in Medium)
                {
                    valMedium.SerializeJson(writer, options, true);
                }

                writer.WriteEndArray();
            }

            if (Subject != null)
            {
                writer.WritePropertyName("subject");
                Subject.SerializeJson(writer, options);
            }

            if (Topic != null)
            {
                writer.WritePropertyName("topic");
                Topic.SerializeJson(writer, options);
            }

            if ((About != null) && (About.Count != 0))
            {
                writer.WritePropertyName("about");
                writer.WriteStartArray();

                foreach (Reference valAbout in About)
                {
                    valAbout.SerializeJson(writer, options, true);
                }

                writer.WriteEndArray();
            }

            if (Encounter != null)
            {
                writer.WritePropertyName("encounter");
                Encounter.SerializeJson(writer, options);
            }

            if (!string.IsNullOrEmpty(Sent))
            {
                writer.WriteString("sent", (string)Sent !);
            }

            if (_Sent != null)
            {
                writer.WritePropertyName("_sent");
                _Sent.SerializeJson(writer, options);
            }

            if (!string.IsNullOrEmpty(Received))
            {
                writer.WriteString("received", (string)Received !);
            }

            if (_Received != null)
            {
                writer.WritePropertyName("_received");
                _Received.SerializeJson(writer, options);
            }

            if ((Recipient != null) && (Recipient.Count != 0))
            {
                writer.WritePropertyName("recipient");
                writer.WriteStartArray();

                foreach (Reference valRecipient in Recipient)
                {
                    valRecipient.SerializeJson(writer, options, true);
                }

                writer.WriteEndArray();
            }

            if (Sender != null)
            {
                writer.WritePropertyName("sender");
                Sender.SerializeJson(writer, options);
            }

            if ((ReasonCode != null) && (ReasonCode.Count != 0))
            {
                writer.WritePropertyName("reasonCode");
                writer.WriteStartArray();

                foreach (CodeableConcept valReasonCode in ReasonCode)
                {
                    valReasonCode.SerializeJson(writer, options, true);
                }

                writer.WriteEndArray();
            }

            if ((ReasonReference != null) && (ReasonReference.Count != 0))
            {
                writer.WritePropertyName("reasonReference");
                writer.WriteStartArray();

                foreach (Reference valReasonReference in ReasonReference)
                {
                    valReasonReference.SerializeJson(writer, options, true);
                }

                writer.WriteEndArray();
            }

            if ((Payload != null) && (Payload.Count != 0))
            {
                writer.WritePropertyName("payload");
                writer.WriteStartArray();

                foreach (CommunicationPayload valPayload in Payload)
                {
                    valPayload.SerializeJson(writer, options, true);
                }

                writer.WriteEndArray();
            }

            if ((Note != null) && (Note.Count != 0))
            {
                writer.WritePropertyName("note");
                writer.WriteStartArray();

                foreach (Annotation valNote in Note)
                {
                    valNote.SerializeJson(writer, options, true);
                }

                writer.WriteEndArray();
            }

            if (includeStartObject)
            {
                writer.WriteEndObject();
            }
        }
Пример #13
0
 // PUT: api/StatusReason/5
 public void Put(StatusReason StatusReason)
 {
     StatusReasonRepository.Update(StatusReason);
 }
Пример #14
0
 // POST: api/StatusReason
 public void Post(StatusReason StatusReason)
 {
     //StatusReason.Id = Guid.NewGuid();
     StatusReasonRepository.Add(StatusReason);
 }
 public NotAllowedOkResult(T content, IContentNegotiator contentNegotiator, HttpRequestMessage request,
                           IEnumerable <MediaTypeFormatter> formatters, StatusReason statusReason)
     : base(content, contentNegotiator, request, formatters)
 {
     statusReasonCode = statusReason;
 }
Пример #16
0
        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.Element)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);
        }
Пример #17
0
        /// <summary>
        /// Serialize to a JSON object
        /// </summary>
        public new void SerializeJson(Utf8JsonWriter writer, JsonSerializerOptions options, bool includeStartObject = true)
        {
            if (includeStartObject)
            {
                writer.WriteStartObject();
            }

            if (!string.IsNullOrEmpty(ResourceType))
            {
                writer.WriteString("resourceType", (string)ResourceType !);
            }


            ((Fhir.R4.Models.DomainResource) this).SerializeJson(writer, options, false);

            if ((Identifier != null) && (Identifier.Count != 0))
            {
                writer.WritePropertyName("identifier");
                writer.WriteStartArray();

                foreach (Identifier valIdentifier in Identifier)
                {
                    valIdentifier.SerializeJson(writer, options, true);
                }

                writer.WriteEndArray();
            }

            if ((BasedOn != null) && (BasedOn.Count != 0))
            {
                writer.WritePropertyName("basedOn");
                writer.WriteStartArray();

                foreach (Reference valBasedOn in BasedOn)
                {
                    valBasedOn.SerializeJson(writer, options, true);
                }

                writer.WriteEndArray();
            }

            if ((Replaces != null) && (Replaces.Count != 0))
            {
                writer.WritePropertyName("replaces");
                writer.WriteStartArray();

                foreach (Reference valReplaces in Replaces)
                {
                    valReplaces.SerializeJson(writer, options, true);
                }

                writer.WriteEndArray();
            }

            if (GroupIdentifier != null)
            {
                writer.WritePropertyName("groupIdentifier");
                GroupIdentifier.SerializeJson(writer, options);
            }

            if (!string.IsNullOrEmpty(Status))
            {
                writer.WriteString("status", (string)Status !);
            }

            if (_Status != null)
            {
                writer.WritePropertyName("_status");
                _Status.SerializeJson(writer, options);
            }

            if (StatusReason != null)
            {
                writer.WritePropertyName("statusReason");
                StatusReason.SerializeJson(writer, options);
            }

            if ((Category != null) && (Category.Count != 0))
            {
                writer.WritePropertyName("category");
                writer.WriteStartArray();

                foreach (CodeableConcept valCategory in Category)
                {
                    valCategory.SerializeJson(writer, options, true);
                }

                writer.WriteEndArray();
            }

            if (!string.IsNullOrEmpty(Priority))
            {
                writer.WriteString("priority", (string)Priority !);
            }

            if (_Priority != null)
            {
                writer.WritePropertyName("_priority");
                _Priority.SerializeJson(writer, options);
            }

            if (DoNotPerform != null)
            {
                writer.WriteBoolean("doNotPerform", (bool)DoNotPerform !);
            }

            if ((Medium != null) && (Medium.Count != 0))
            {
                writer.WritePropertyName("medium");
                writer.WriteStartArray();

                foreach (CodeableConcept valMedium in Medium)
                {
                    valMedium.SerializeJson(writer, options, true);
                }

                writer.WriteEndArray();
            }

            if (Subject != null)
            {
                writer.WritePropertyName("subject");
                Subject.SerializeJson(writer, options);
            }

            if ((About != null) && (About.Count != 0))
            {
                writer.WritePropertyName("about");
                writer.WriteStartArray();

                foreach (Reference valAbout in About)
                {
                    valAbout.SerializeJson(writer, options, true);
                }

                writer.WriteEndArray();
            }

            if (Encounter != null)
            {
                writer.WritePropertyName("encounter");
                Encounter.SerializeJson(writer, options);
            }

            if ((Payload != null) && (Payload.Count != 0))
            {
                writer.WritePropertyName("payload");
                writer.WriteStartArray();

                foreach (CommunicationRequestPayload valPayload in Payload)
                {
                    valPayload.SerializeJson(writer, options, true);
                }

                writer.WriteEndArray();
            }

            if (!string.IsNullOrEmpty(OccurrenceDateTime))
            {
                writer.WriteString("occurrenceDateTime", (string)OccurrenceDateTime !);
            }

            if (_OccurrenceDateTime != null)
            {
                writer.WritePropertyName("_occurrenceDateTime");
                _OccurrenceDateTime.SerializeJson(writer, options);
            }

            if (OccurrencePeriod != null)
            {
                writer.WritePropertyName("occurrencePeriod");
                OccurrencePeriod.SerializeJson(writer, options);
            }

            if (!string.IsNullOrEmpty(AuthoredOn))
            {
                writer.WriteString("authoredOn", (string)AuthoredOn !);
            }

            if (_AuthoredOn != null)
            {
                writer.WritePropertyName("_authoredOn");
                _AuthoredOn.SerializeJson(writer, options);
            }

            if (Requester != null)
            {
                writer.WritePropertyName("requester");
                Requester.SerializeJson(writer, options);
            }

            if ((Recipient != null) && (Recipient.Count != 0))
            {
                writer.WritePropertyName("recipient");
                writer.WriteStartArray();

                foreach (Reference valRecipient in Recipient)
                {
                    valRecipient.SerializeJson(writer, options, true);
                }

                writer.WriteEndArray();
            }

            if (Sender != null)
            {
                writer.WritePropertyName("sender");
                Sender.SerializeJson(writer, options);
            }

            if ((ReasonCode != null) && (ReasonCode.Count != 0))
            {
                writer.WritePropertyName("reasonCode");
                writer.WriteStartArray();

                foreach (CodeableConcept valReasonCode in ReasonCode)
                {
                    valReasonCode.SerializeJson(writer, options, true);
                }

                writer.WriteEndArray();
            }

            if ((ReasonReference != null) && (ReasonReference.Count != 0))
            {
                writer.WritePropertyName("reasonReference");
                writer.WriteStartArray();

                foreach (Reference valReasonReference in ReasonReference)
                {
                    valReasonReference.SerializeJson(writer, options, true);
                }

                writer.WriteEndArray();
            }

            if ((Note != null) && (Note.Count != 0))
            {
                writer.WritePropertyName("note");
                writer.WriteStartArray();

                foreach (Annotation valNote in Note)
                {
                    valNote.SerializeJson(writer, options, true);
                }

                writer.WriteEndArray();
            }

            if (includeStartObject)
            {
                writer.WriteEndObject();
            }
        }
Пример #18
0
        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 (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 (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);
        }
Пример #19
0
        /// <summary>
        /// Returns true if Customer instances are equal
        /// </summary>
        /// <param name="other">Instance of Customer to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(Customer other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Href == other.Href ||
                     Href != null &&
                     Href.Equals(other.Href)
                     ) &&
                 (
                     Id == other.Id ||
                     Id != null &&
                     Id.Equals(other.Id)
                 ) &&
                 (
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                 ) &&
                 (
                     Status == other.Status ||
                     Status != null &&
                     Status.Equals(other.Status)
                 ) &&
                 (
                     StatusReason == other.StatusReason ||
                     StatusReason != null &&
                     StatusReason.Equals(other.StatusReason)
                 ) &&
                 (
                     PreferredLanguage == other.PreferredLanguage ||
                     PreferredLanguage != null &&
                     PreferredLanguage.Equals(other.PreferredLanguage)
                 ) &&
                 (
                     ValidFor == other.ValidFor ||
                     ValidFor != null &&
                     ValidFor.Equals(other.ValidFor)
                 ) &&
                 (
                     EngagedParty == other.EngagedParty ||
                     EngagedParty != null &&
                     EngagedParty.Equals(other.EngagedParty)
                 ) &&
                 (
                     PartyRoleType == other.PartyRoleType ||
                     PartyRoleType != null &&
                     PartyRoleType.Equals(other.PartyRoleType)
                 ) &&
                 (
                     Account == other.Account ||
                     Account != null &&
                     Account.SequenceEqual(other.Account)
                 ) &&
                 (
                     PaymentMethod == other.PaymentMethod ||
                     PaymentMethod != null &&
                     PaymentMethod.SequenceEqual(other.PaymentMethod)
                 ) &&
                 (
                     ContactMedium == other.ContactMedium ||
                     ContactMedium != null &&
                     ContactMedium.SequenceEqual(other.ContactMedium)
                 ) &&
                 (
                     Characteristic == other.Characteristic ||
                     Characteristic != null &&
                     Characteristic.SequenceEqual(other.Characteristic)
                 ) &&
                 (
                     CreditProfile == other.CreditProfile ||
                     CreditProfile != null &&
                     CreditProfile.SequenceEqual(other.CreditProfile)
                 ) &&
                 (
                     Agreement == other.Agreement ||
                     Agreement != null &&
                     Agreement.SequenceEqual(other.Agreement)
                 ) &&
                 (
                     RelatedParty == other.RelatedParty ||
                     RelatedParty != null &&
                     RelatedParty.SequenceEqual(other.RelatedParty)
                 ));
        }