/// <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; }
/// <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; }
/// <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); }
/// <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; }