本文整理汇总了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;
}
示例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;
}
}