示例#1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PatientAccount"/> class.
        /// </summary>
        /// <param name="billingOffice">The billing office.</param>
        /// <param name="medicalRecordNumber">The medical record number.</param>
        /// <param name="name">The name.</param>
        /// <param name="birthDate">The birth date.</param>
        /// <param name="homeAddress">The home address.</param>
        /// <param name="administrativeGender">The administrative gender.</param>
        protected internal PatientAccount( BillingOffice billingOffice, long medicalRecordNumber, PersonName name, DateTime? birthDate, Address homeAddress, AdministrativeGender administrativeGender )
            : this()
        {
            Check.IsNotNull ( billingOffice, "Billing office is required." );
            Check.IsNotNull ( name, "Name is required." );
            Check.IsNotNull ( medicalRecordNumber, "Medical record number is required." );
            Check.IsNotNull ( homeAddress, () => HomeAddress );
            Check.IsNotNull( administrativeGender, "Gender is required.");

            BillingOffice = billingOffice;
            MedicalRecordNumber = medicalRecordNumber;
            Name = name;
            BirthDate = birthDate;
            HomeAddress = homeAddress;
            AdministrativeGender = administrativeGender;
        }
示例#2
0
        /// <summary>
        /// Converts to HL7.
        /// </summary>
        /// <param name="administrativeGender">The administrative gender.</param>
        /// <returns>A <see cref="HL7Generator.Infrastructure.Table.GenderCodeset"/></returns>
        internal static GenderCodeset ConvertToHl7( AdministrativeGender administrativeGender )
        {
            GenderCodeset genderCodeset;

            if ( administrativeGender != null && administrativeGender.WellKnownName != null )
            {
                if (administrativeGender.WellKnownName == WellKnownNames.CommonModule.AdministrativeGender.Female)
                {
                    genderCodeset = GenderCodeset.Female;
                }
                else if (administrativeGender.WellKnownName == WellKnownNames.CommonModule.AdministrativeGender.Male)
                {
                    genderCodeset = GenderCodeset.Male;
                }
                else
                {
                    genderCodeset = GenderCodeset.Unknown;
                }
            }
            else
            {
                genderCodeset = GenderCodeset.Unknown;
            }

            return genderCodeset;
        }
示例#3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PatientGender"/> class.
 /// </summary>
 /// <param name="administrativeGender">The administrative gender.</param>
 public PatientGender( AdministrativeGender administrativeGender )
 {
     Check.IsNotNull(administrativeGender, "administrativeGender is required.");
     _administrativeGender = administrativeGender;
 }
示例#4
0
 /// <summary>
 /// Creates the patient account.
 /// </summary>
 /// <param name="billingOffice">The billing office.</param>
 /// <param name="medicalRecordNumber">The medical record number.</param>
 /// <param name="name">The name.</param>
 /// <param name="birthDate">The birth date.</param>
 /// <param name="homeAddress">The home address.</param>
 /// <param name="administrativeGender">The administrative gender.</param>
 /// <returns>A patient account.</returns>
 public virtual PatientAccount CreatePatientAccount( BillingOffice billingOffice, long medicalRecordNumber, PersonName name, DateTime? birthDate, Address homeAddress, AdministrativeGender administrativeGender)
 {
     var patientAccount = new PatientAccount ( billingOffice, medicalRecordNumber, name, birthDate, homeAddress, administrativeGender );
     _patientAccountRepository.MakePersistent ( patientAccount );
     return patientAccount;
 }
示例#5
0
 /// <summary>
 /// Revises the administrative gender.
 /// </summary>
 /// <param name="administrativeGender">The administrative gender.</param>
 public virtual void ReviseAdministrativeGender( AdministrativeGender administrativeGender)
 {
     Check.IsNotNull(administrativeGender, "Gender is required.");
     AdministrativeGender = administrativeGender;
 }