Beispiel #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PatientAddress"/> class.
        /// </summary>
        /// <param name="patientAddressType">Type of the patient address.</param>
        /// <param name="confidentialIndicator">The confidential indicator.</param>
        /// <param name="yearsOfStayNumber">The years of stay number.</param>
        /// <param name="address">The address.</param>
        public PatientAddress(
            PatientAddressType patientAddressType,
            bool?confidentialIndicator,
            int?yearsOfStayNumber,
            Address address)
        {
            Check.IsNotNull(patientAddressType, "Patient address type is required.");
            Check.IsNotNull(address, "Address is required.");

            _patientAddressType    = patientAddressType;
            _confidentialIndicator = confidentialIndicator;
            _yearsOfStayNumber     = yearsOfStayNumber;
            _address = address;
        }
Beispiel #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PatientAddress"/> class.
        /// </summary>
        /// <param name="patientAddressType">Type of the patient address.</param>
        /// <param name="confidentialIndicator">The confidential indicator.</param>
        /// <param name="yearsOfStayNumber">The years of stay number.</param>
        /// <param name="address">The address.</param>
        public PatientAddress( 
            PatientAddressType patientAddressType, 
            bool? confidentialIndicator,
            int? yearsOfStayNumber,
            Address address)
        {
            Check.IsNotNull ( patientAddressType, "Patient address type is required." );
            Check.IsNotNull ( address, "Address is required." );

            _patientAddressType = patientAddressType;
            _confidentialIndicator = confidentialIndicator;
            _yearsOfStayNumber = yearsOfStayNumber;
            _address = address;
        }
Beispiel #3
0
        /// <summary>
        /// Converts to HL7.
        /// </summary>
        /// <param name="patientAddressType">Type of the patient address.</param>
        /// <returns>A <see cref="HL7Generator.Infrastructure.Table.AddressTypeCodeset"/></returns>
        internal static AddressTypeCodeset ConvertToHl7( PatientAddressType patientAddressType )
        {
            AddressTypeCodeset addressTypeCodeset;

            if ( patientAddressType != null && patientAddressType.WellKnownName != null )
            {
                if (patientAddressType.WellKnownName == WellKnownNames.PatientModule.PatientAddressType.Home ||
                    patientAddressType.WellKnownName == WellKnownNames.PatientModule.PatientAddressType.PreviousHomeAddress)
                {
                    addressTypeCodeset = AddressTypeCodeset.Home;
                }
                else if(patientAddressType.WellKnownName == WellKnownNames.PatientModule.PatientAddressType.WorkOffice)
                {
                    addressTypeCodeset = AddressTypeCodeset.OfficeAddress;
                }
                else if(patientAddressType.WellKnownName == WellKnownNames.PatientModule.PatientAddressType.Temporary)
                {
                    addressTypeCodeset = AddressTypeCodeset.CurrentOrTemporary;
                }
                else if(patientAddressType.WellKnownName == WellKnownNames.PatientModule.PatientAddressType.Mailing ||
                    patientAddressType.WellKnownName == WellKnownNames.PatientModule.PatientAddressType.Billing)
                {
                    addressTypeCodeset = AddressTypeCodeset.Mailing;
                }
                else
                {
                    //Homeless, Other
                    addressTypeCodeset = AddressTypeCodeset.BadAddress;
                }
            }
            else
            {
                addressTypeCodeset = AddressTypeCodeset.BadAddress;
            }

            return addressTypeCodeset;
        }
 /// <summary>
 /// Assigns the type of the patient address.
 /// </summary>
 /// <param name="patientAddressType">Type of the patient address.</param>
 /// <returns>A PatientAddressBuilder.</returns>
 public PatientAddressBuilder WithPatientAddressType( PatientAddressType patientAddressType )
 {
     _patientAddressType = patientAddressType;
     return this;
 }
Beispiel #5
0
 /// <summary>
 /// Assigns the type of the patient address.
 /// </summary>
 /// <param name="patientAddressType">Type of the patient address.</param>
 /// <returns>A PatientAddressBuilder.</returns>
 public PatientAddressBuilder WithPatientAddressType(PatientAddressType patientAddressType)
 {
     _patientAddressType = patientAddressType;
     return(this);
 }