コード例 #1
0
ファイル: PatientPhone.cs プロジェクト: divyang4481/REM
        /// <summary>
        /// Initializes a new instance of the <see cref="PatientPhone"/> class.
        /// </summary>
        /// <param name="patientPhoneType">Type of the patient phone.</param>
        /// <param name="phoneNumber">The phone number.</param>
        /// <param name="phoneExtensionNumber">The phone extension number.</param>
        /// <param name="confidentialIndicator">The confidential indicator.</param>
        public PatientPhone(
            PatientPhoneType patientPhoneType, 
            string phoneNumber,
            string phoneExtensionNumber = null,
            bool? confidentialIndicator= null )
        {
            Check.IsNotNull ( patientPhoneType, "Patient Phone Type is required." );
            Check.IsNotNullOrWhitespace ( phoneNumber, "Phone number is required." );

            _patientPhoneType = patientPhoneType;
            _phoneNumber = phoneNumber;
            _phoneExtensionNumber = phoneExtensionNumber;
            _confidentialIndicator = confidentialIndicator;
        }
コード例 #2
0
ファイル: PatientPhone.cs プロジェクト: girish66/REM
        /// <summary>
        /// Initializes a new instance of the <see cref="PatientPhone"/> class.
        /// </summary>
        /// <param name="patientPhoneType">Type of the patient phone.</param>
        /// <param name="phoneNumber">The phone number.</param>
        /// <param name="phoneExtensionNumber">The phone extension number.</param>
        /// <param name="confidentialIndicator">The confidential indicator.</param>
        public PatientPhone(
            PatientPhoneType patientPhoneType,
            string phoneNumber,
            string phoneExtensionNumber = null,
            bool?confidentialIndicator  = null)
        {
            Check.IsNotNull(patientPhoneType, "Patient Phone Type is required.");
            Check.IsNotNullOrWhitespace(phoneNumber, "Phone number is required.");

            _patientPhoneType      = patientPhoneType;
            _phoneNumber           = phoneNumber;
            _phoneExtensionNumber  = phoneExtensionNumber;
            _confidentialIndicator = confidentialIndicator;
        }
コード例 #3
0
ファイル: Hl7TypeConverter.cs プロジェクト: girish66/REM
        /// <summary>
        /// Converts to HL7.
        /// </summary>
        /// <param name="patientPhoneType">Type of the patient phone.</param>
        /// <returns>A <see cref="HL7Generator.Infrastructure.Table.TelecommunicationUseCode"/></returns>
        internal static TelecommunicationUseCode ConvertToHl7(PatientPhoneType patientPhoneType)
        {
            TelecommunicationUseCode telecommunicationUseCode = null;

            if (patientPhoneType != null && patientPhoneType.WellKnownName != null)
            {
                if (patientPhoneType.WellKnownName == WellKnownNames.PatientModule.PatientPhoneType.Home)
                {
                    telecommunicationUseCode = TelecommunicationUseCode.PrimaryResidenceNumber;
                }
                else if (patientPhoneType.WellKnownName == WellKnownNames.PatientModule.PatientPhoneType.Work)
                {
                    telecommunicationUseCode = TelecommunicationUseCode.WorkNumber;
                }
            }

            return(telecommunicationUseCode);
        }
コード例 #4
0
ファイル: Hl7TypeConverter.cs プロジェクト: divyang4481/REM
        /// <summary>
        /// Converts to HL7.
        /// </summary>
        /// <param name="patientPhoneType">Type of the patient phone.</param>
        /// <returns>A <see cref="HL7Generator.Infrastructure.Table.TelecommunicationUseCode"/></returns>
        internal static TelecommunicationUseCode ConvertToHl7( PatientPhoneType patientPhoneType )
        {
            TelecommunicationUseCode telecommunicationUseCode = null;

            if ( patientPhoneType != null && patientPhoneType.WellKnownName != null )
            {
                if (patientPhoneType.WellKnownName == WellKnownNames.PatientModule.PatientPhoneType.Home)
                {
                    telecommunicationUseCode = TelecommunicationUseCode.PrimaryResidenceNumber;
                }
                else if (patientPhoneType.WellKnownName == WellKnownNames.PatientModule.PatientPhoneType.Work)
                {
                    telecommunicationUseCode = TelecommunicationUseCode.WorkNumber;
                }
            }

            return telecommunicationUseCode;
        }