/// <summary> /// Removes the contact. /// </summary> /// <param name="patientContact">The patient contact.</param> public virtual void RemoveContact(PatientContact patientContact) { var factory = IoC.CurrentContainer.Resolve <IPatientContactFactory>(); factory.DestroyPatientContact(patientContact); NotifyItemRemoved(() => Contacts, patientContact); }
/// <summary> /// Creates the patient contact. /// </summary> /// <param name="patient">The patient.</param> /// <param name="firstName">The first name.</param> /// <param name="lastName">The last name.</param> /// <returns> /// A PatientContact. /// </returns> public PatientContact CreatePatientContact(Patient patient, string firstName, string lastName) { var newPatientContact = new PatientContact(patient, firstName, lastName); PatientContact createdPatientContact = null; DomainRuleEngine.CreateRuleEngine(newPatientContact, "CreatePatientContactRuleSet").Execute( () => { createdPatientContact = newPatientContact; _patientContactRepository.MakePersistent(newPatientContact); }); return(createdPatientContact); }
/// <summary> /// Creates the patient contact. /// </summary> /// <param name="patient">The patient.</param> /// <param name="firstName">The first name.</param> /// <param name="lastName">The last name.</param> /// <returns> /// A PatientContact. /// </returns> public PatientContact CreatePatientContact( Patient patient, string firstName, string lastName ) { var newPatientContact = new PatientContact ( patient, firstName, lastName ); PatientContact createdPatientContact = null; DomainRuleEngine.CreateRuleEngine ( newPatientContact, "CreatePatientContactRuleSet" ).Execute ( () => { createdPatientContact = newPatientContact; _patientContactRepository.MakePersistent ( newPatientContact ); } ); return createdPatientContact; }
/// <summary> /// Initializes a new instance of the <see cref="PatientIdentifier"/> class. /// </summary> /// <param name="patientIdentifierType">Type of the patient identifier.</param> /// <param name="identifier">The identifier.</param> /// <param name="description">The description.</param> /// <param name="effectiveDateRange">The effective date range.</param> /// <param name="activeIndicator">The active indicator.</param> /// <param name="patientContact">The patient contact.</param> public PatientIdentifier( PatientIdentifierType patientIdentifierType, string identifier, string description, DateRange effectiveDateRange, bool? activeIndicator, PatientContact patientContact ) { Check.IsNotNull ( patientIdentifierType, "Patient identifier type is required." ); Check.IsNotNullOrWhitespace ( identifier, "Identifier is required." ); _patientIdentifierType = patientIdentifierType; _identifier = identifier; _description = description; _effectiveDateRange = effectiveDateRange; _activeIndicator = activeIndicator; _patientContact = patientContact; }
/// <summary> /// Initializes a new instance of the <see cref="PatientIdentifier"/> class. /// </summary> /// <param name="patientIdentifierType">Type of the patient identifier.</param> /// <param name="identifier">The identifier.</param> /// <param name="description">The description.</param> /// <param name="effectiveDateRange">The effective date range.</param> /// <param name="activeIndicator">The active indicator.</param> /// <param name="patientContact">The patient contact.</param> public PatientIdentifier( PatientIdentifierType patientIdentifierType, string identifier, string description, DateRange effectiveDateRange, bool?activeIndicator, PatientContact patientContact) { Check.IsNotNull(patientIdentifierType, "Patient identifier type is required."); Check.IsNotNullOrWhitespace(identifier, "Identifier is required."); _patientIdentifierType = patientIdentifierType; _identifier = identifier; _description = description; _effectiveDateRange = effectiveDateRange; _activeIndicator = activeIndicator; _patientContact = patientContact; }
/// <summary> /// Destroys the patient contact. /// </summary> /// <param name="patientContact">The patient contact.</param> public void DestroyPatientContact(PatientContact patientContact) { Check.IsNotNull(patientContact, "Patient contact is required."); _patientContactRepository.MakeTransient(patientContact); }
/// <summary> /// Initializes a new instance of the <see cref="PatientContactAggregateNodeBase"/> class. /// </summary> /// <param name="patientContact">The patient contact.</param> protected PatientContactAggregateNodeBase(PatientContact patientContact) { _patientContact = patientContact; }
/// <summary> /// Initializes a new instance of the <see cref="PatientContactContactType"/> class. /// </summary> /// <param name="patientContact">The patient contact.</param> /// <param name="contactType">Type of the contact.</param> protected internal PatientContactContactType( PatientContact patientContact, PatientContactType contactType ) : base(patientContact) { PatientContactType = contactType; }
/// <summary> /// Initializes a new instance of the <see cref="PatientContactContactType"/> class. /// </summary> /// <param name="patientContact">The patient contact.</param> /// <param name="contactType">Type of the contact.</param> protected internal PatientContactContactType(PatientContact patientContact, PatientContactType contactType) : base(patientContact) { PatientContactType = contactType; }
/// <summary> /// Removes the contact. /// </summary> /// <param name="patientContact">The patient contact.</param> public virtual void RemoveContact(PatientContact patientContact) { var factory = IoC.CurrentContainer.Resolve<IPatientContactFactory>(); factory.DestroyPatientContact(patientContact); NotifyItemRemoved(() => Contacts, patientContact); }
/// <summary> /// Assigns the patient contact. /// </summary> /// <param name="patientContact">The patient contact.</param> /// <returns>A PatientIdentifierBuilder.</returns> public PatientIdentifierBuilder WithPatientContact( PatientContact patientContact ) { _patientContact = patientContact; return this; }
/// <summary> /// Assigns the patient contact. /// </summary> /// <param name="patientContact">The patient contact.</param> /// <returns>A PatientIdentifierBuilder.</returns> public PatientIdentifierBuilder WithPatientContact(PatientContact patientContact) { _patientContact = patientContact; return(this); }
/// <summary> /// Destroys the patient contact. /// </summary> /// <param name="patientContact">The patient contact.</param> public void DestroyPatientContact( PatientContact patientContact ) { Check.IsNotNull ( patientContact, "Patient contact is required." ); _patientContactRepository.MakeTransient ( patientContact ); }