コード例 #1
0
ファイル: Patient.cs プロジェクト: girish66/REM
        /// <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);
        }
コード例 #2
0
ファイル: PatientContactFactory.cs プロジェクト: girish66/REM
        /// <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);
        }
コード例 #3
0
        /// <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;
        }
コード例 #4
0
ファイル: PatientIdentifier.cs プロジェクト: divyang4481/REM
        /// <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;
        }
コード例 #5
0
        /// <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;
        }
コード例 #6
0
ファイル: PatientContactFactory.cs プロジェクト: girish66/REM
 /// <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);
 }
コード例 #7
0
 /// <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;
 }
コード例 #8
0
 /// <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;
 }
コード例 #9
0
 /// <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;
 }
コード例 #10
0
ファイル: Patient.cs プロジェクト: divyang4481/REM
 /// <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);
 }
コード例 #11
0
 /// <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;
 }
コード例 #12
0
 /// <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);
 }
コード例 #13
0
 /// <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;
 }
コード例 #14
0
 /// <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 );
 }