当前位置: 首页>>代码示例>>C#>>正文


C# Patient.AddProfile方法代码示例

本文整理汇总了C#中Patient.AddProfile方法的典型用法代码示例。如果您正苦于以下问题:C# Patient.AddProfile方法的具体用法?C# Patient.AddProfile怎么用?C# Patient.AddProfile使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Patient的用法示例。


在下文中一共展示了Patient.AddProfile方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreatePatient

		public static Patient CreatePatient(string mrn)
        {
            Patient patient = new Patient();
            PatientProfile profile = new PatientProfile(
                new PatientIdentifier(mrn, new InformationAuthorityEnum("UHN", "UHN", "")),
                null,
                new HealthcardNumber("1111222333", new InsuranceAuthorityEnum("OHIP", "OHIP", ""), null, null),
                new PersonName("Roberts", "Bob", null, null, null, null),
                DateTime.Now - TimeSpan.FromDays(4000),
                Sex.M,
                new SpokenLanguageEnum("en", "English", null),
                new ReligionEnum("X", "unknown", null),
                false,
				null,
                null,
                null,
                null,
                null,
                null,
                null,
                patient
                );

            patient.AddProfile(profile);

            return patient;
        }
开发者ID:nhannd,项目名称:Xian,代码行数:27,代码来源:TestPatientFactory.cs

示例2: Reconcile

			/// <summary>
			/// Reconciles the specified patient to this patient
			/// </summary>
			/// <param name="thisPatient"></param>
			/// <param name="otherPatient"></param>
			/// <param name="workflow"></param>
			private static void Reconcile(Patient thisPatient, Patient otherPatient, IWorkflow workflow)
			{
				if (PatientIdentifierConflictsFound(thisPatient, otherPatient))
					throw new PatientReconciliationException("assigning authority conflict - cannot reconcile");

				// copy the collection to iterate
				var otherProfiles = new List<PatientProfile>(otherPatient.Profiles);
				foreach (var profile in otherProfiles)
				{
					thisPatient.AddProfile(profile);
				}

				// copy the collection to iterate
				var otherNotes = new List<PatientNote>(otherPatient.Notes);
				foreach (var note in otherNotes)
				{
					thisPatient.AddNote(note);
				}

				// copy the collection to iterate
				var otherAttachments = new List<PatientAttachment>(otherPatient.Attachments);
				foreach (var attachment in otherAttachments)
				{
					otherPatient.Attachments.Remove(attachment);
					thisPatient.Attachments.Add(attachment);
				}

				// copy the collection to iterate
				var otherAllergies = new List<Allergy>(otherPatient.Allergies);
				foreach (var allergy in otherAllergies)
				{
					otherPatient.Allergies.Remove(allergy);
					thisPatient.Allergies.Add(allergy);
				}

				var visitCriteria = new VisitSearchCriteria();
				visitCriteria.Patient.EqualTo(otherPatient);
				var otherVisits = workflow.GetBroker<IVisitBroker>().Find(visitCriteria);
				foreach (var visit in otherVisits)
				{
					visit.Patient = thisPatient;
				}

				var orderCriteria = new OrderSearchCriteria();
				orderCriteria.Patient.EqualTo(otherPatient);
				var otherOrders = workflow.GetBroker<IOrderBroker>().Find(orderCriteria);
				foreach (var order in otherOrders)
				{
					order.Patient = thisPatient;
				}
			}
开发者ID:nhannd,项目名称:Xian,代码行数:57,代码来源:Operation.cs


注:本文中的Patient.AddProfile方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。