Commit 506180cb authored by Sandeep Sagar Panjala's avatar Sandeep Sagar Panjala

initial commit

parent 8bf3ca87
namespace Hims.Api.Models.InternalMedicine
{
/// <summary>
/// The skin types.
/// </summary>
public class SkinTypes
{
/// <summary>
/// Gets or sets the type.
/// </summary>
public string Type { get; set; }
/// <summary>
/// Gets or sets the base 64 string.
/// </summary>
public string Base64String { get; set; }
/// <summary>
/// Gets or sets a value indicating whether edited.
/// </summary>
public bool Edited { get; set; }
}
}
\ No newline at end of file
namespace Hims.Api.Models.MailTemplates
{
/// <summary> The book appointment.</summary>
public class BookAppointment
{
/// <summary>
/// Gets or sets the full name.
/// </summary>
public string FullName { get; set; }
/// <summary>
/// Gets or sets the account name.
/// </summary>
public string AccountName { get; set; }
/// <summary>Gets or sets the doctor name.</summary>
public string DoctorName { get; set; }
/// <summary>Gets or sets the message.</summary>
public string Message { get; set; }
/// <summary>Gets or sets the appointment time.</summary>
public string AppointmentTime { get; set; }
/// <summary>
/// Gets or sets the ios app link.
/// </summary>
public string IOSAppLink { get; set; }
/// <summary>
/// Gets or sets the android app link.
/// </summary>
public string AndroidAppLink { get; set; }
/// <summary>
/// Gets or sets the mail templates images link.
/// </summary>
public string MailTemplatesImagesLink { get; set; }
}
}
namespace Hims.Api.Models.MailTemplates
{
/// <summary>
/// The create password.
/// </summary>
public class CreatePassword
{
/// <summary>
/// Gets or sets the full name.
/// </summary>
public string FullName { get; set; }
/// <summary>
/// Gets or sets the account name.
/// </summary>
public string AccountName { get; set; }
/// <summary>
/// Gets or sets the create password link.
/// </summary>
public string CreatePasswordLink { get; set; }
/// <summary>
/// Gets or sets the ios app link.
/// </summary>
public string IOSAppLink { get; set; }
/// <summary>
/// Gets or sets the android app link.
/// </summary>
public string AndroidAppLink { get; set; }
/// <summary>
/// Gets or sets the mail templates images link.
/// </summary>
public string MailTemplatesImagesLink { get; set; }
}
}
namespace Hims.Api.Models.MailTemplates
{
/// <summary>
/// The email OTP.
/// </summary>
public class EmailOTP
{
/// <summary>
/// Gets or sets the full name.
/// </summary>
public string FullName { get; set; }
/// <summary>
/// Gets or sets the OTP.
/// </summary>
public string OTP { get; set; }
/// <summary>
/// Gets or sets the account name.
/// </summary>
public string AccountName { get; set; }
/// <summary>
/// Gets or sets the email.
/// </summary>
public string Email { get; set; }
/// <summary>
/// Gets or sets the ios app link.
/// </summary>
public string IOSAppLink { get; set; }
/// <summary>
/// Gets or sets the android app link.
/// </summary>
public string AndroidAppLink { get; set; }
/// <summary>
/// Gets or sets the mail templates images link.
/// </summary>
public string MailTemplatesImagesLink { get; set; }
/// <summary>
/// Gets or sets the mobile.
/// </summary>
public string Mobile { get; set; }
/// <summary>
/// Gets or sets the description.
/// </summary>
public string Description { get; set; }
/// <summary>
/// Gets or sets the username.
/// </summary>
public string UserName { get; set; }
}
}
namespace Hims.Api.Models.MailTemplates
{
/// <summary>
/// The payout smart send.
/// </summary>
public class PayoutSmartSend
{
/// <summary>
/// Gets or sets the full name.
/// </summary>
public string FullName { get; set; }
/// <summary>
/// Gets or sets the account name.
/// </summary>
public string AccountName { get; set; }
/// <summary>
/// Gets or sets the reset password link.
/// </summary>
public string PaymentLink { get; set; }
/// <summary>
/// Gets or sets the ios app link.
/// </summary>
public string IOSAppLink { get; set; }
/// <summary>
/// Gets or sets the android app link.
/// </summary>
public string AndroidAppLink { get; set; }
/// <summary>
/// Gets or sets the mail templates images link.
/// </summary>
public string MailTemplatesImagesLink { get; set; }
}
}
namespace Hims.Api.Models.MailTemplates
{
/// <summary>
/// The reject provider.
/// </summary>
public class RejectProvider
{
/// <summary>
/// Gets or sets the full name.
/// </summary>
public string FullName { get; set; }
/// <summary>
/// Gets or sets the rejected comments.
/// </summary>
public string RejectedComments { get; set; }
/// <summary>
/// Gets or sets the account name.
/// </summary>
public string AccountName { get; set; }
/// <summary>
/// Gets or sets the ios app link.
/// </summary>
public string IOSAppLink { get; set; }
/// <summary>
/// Gets or sets the android app link.
/// </summary>
public string AndroidAppLink { get; set; }
/// <summary>
/// Gets or sets the mail templates images link.
/// </summary>
public string MailTemplatesImagesLink { get; set; }
}
}
namespace Hims.Api.Models.MailTemplates
{
/// <summary>
/// The reset password.
/// </summary>
public class ResetPassword
{
/// <summary>
/// Gets or sets the full name.
/// </summary>
public string FullName { get; set; }
/// <summary>
/// Gets or sets the account name.
/// </summary>
public string AccountName { get; set; }
/// <summary>
/// Gets or sets the reset password link.
/// </summary>
public string ResetPasswordLink { get; set; }
/// <summary>
/// Gets or sets the ios app link.
/// </summary>
public string IOSAppLink { get; set; }
/// <summary>
/// Gets or sets the android app link.
/// </summary>
public string AndroidAppLink { get; set; }
/// <summary>
/// Gets or sets the mail templates images link.
/// </summary>
public string MailTemplatesImagesLink { get; set; }
}
}
#nullable enable
namespace Hims.Api.Models.MailTemplates
{
using System;
using System.Collections.Generic;
using Hims.Shared.EntityModels;
/// <summary>
/// The tickets.
/// </summary>
public class Tickets
{
/// <summary>
/// Gets or sets the ticket number.
/// </summary>
public string? TicketNumber { get; set; }
/// <summary>
/// Gets or sets the priority.
/// </summary>
public string? Priority { get; set; }
/// <summary>
/// Gets or sets the issue with.
/// </summary>
public string? IssueWith { get; set; }
/// <summary>
/// Gets or sets the description.
/// </summary>
public string? Description { get; set; }
/// <summary>
/// Gets or sets the raised by name.
/// </summary>
public string? RaisedByName { get; set; }
/// <summary>
/// Gets or sets the mobile.
/// </summary>
public string? Mobile { get; set; }
/// <summary>
/// Gets or sets the status.
/// </summary>
public string? Status { get; set; }
/// <summary>
/// Gets or sets the assignee name.
/// </summary>
public string? AssigneeName { get; set; }
/// <summary>
/// Gets or sets the ticket owner.
/// </summary>
public string? TicketOwner { get; set; }
/// <summary>
/// Gets or sets the created date.
/// </summary>
public DateTime? CreatedDate { get; set; }
/// <summary>
/// Gets or sets the raised by role.
/// </summary>
public string? RaisedByRole { get; set; }
/// <summary>
/// Gets or sets the ios app link.
/// </summary>
public string IOSAppLink { get; set; }
/// <summary>
/// Gets or sets the android app link.
/// </summary>
public string AndroidAppLink { get; set; }
/// <summary>
/// Gets or sets the mail templates images link.
/// </summary>
public string MailTemplatesImagesLink { get; set; }
/// <summary>
/// Gets or sets the support users.
/// </summary>
public IEnumerable<AccountModel> SupportUsers { get; set; }
/// <summary>
/// Gets or sets the email type.
/// </summary>
public string EmailType { get; set; }
}
}
namespace VirtualSteth.Api.Models.MailTemplates
{
/// <summary> The book appointment.</summary>
public class VideoConferenceLink
{
/// <summary>
/// Gets or sets the full name.
/// </summary>
public string FullName { get; set; }
/// <summary>
/// Gets or sets the account name.
/// </summary>
public string AccountName { get; set; }
/// <summary>Gets or sets the doctor name.</summary>
public string DoctorName { get; set; }
/// <summary>Gets or sets the message.</summary>
public string Message { get; set; }
/// <summary>Gets or sets the appointment time.</summary>
public string AppointmentTime { get; set; }
/// <summary>
/// Gets or sets the video link.
/// </summary>
public string VideoLink { get; set; }
/// <summary>
/// Gets or sets the ios app link.
/// </summary>
public string IOSAppLink { get; set; }
/// <summary>
/// Gets or sets the android app link.
/// </summary>
public string AndroidAppLink { get; set; }
/// <summary>
/// Gets or sets the mail templates images link.
/// </summary>
public string MailTemplatesImagesLink { get; set; }
}
}
namespace Hims.Api.Models.MailTemplates
{
/// <summary>
/// The welcome.
/// </summary>
public class Welcome
{
/// <summary>
/// Gets or sets the full name.
/// </summary>
public string FullName { get; set; }
/// <summary>
/// Gets or sets the account name.
/// </summary>
public string AccountName { get; set; }
/// <summary>
/// Gets or sets the website link.
/// </summary>
public string GetStartedLink { get; set; }
/// <summary>
/// Gets or sets the ios app link.
/// </summary>
public string IOSAppLink { get; set; }
/// <summary>
/// Gets or sets the android app link.
/// </summary>
public string AndroidAppLink { get; set; }
/// <summary>
/// Gets or sets the mail templates images link.
/// </summary>
public string MailTemplatesImagesLink { get; set; }
}
}
#nullable enable
namespace Hims.Api.Models.Patient
{
using System;
using System.Collections.Generic;
using Microsoft.AspNetCore.Http;
using Shared.EntityModels;
/// <summary>
/// The modify patient request.
/// </summary>
public class BabyregistrationRequest
{
/// <summary>
/// Gets or sets the patient id.
/// </summary>
public int PatientId { get; set; }
/// <summary>
/// Gets or sets the location identifier.
/// </summary>
/// <value>
/// The location identifier.
/// </value>
public int? LocationId { get; set; }
/// <summary>
/// Gets or sets the emergency contacts.
/// </summary>
public List<PatientEmergencyModel>? EmergencyContacts { get; set; }
/// <summary>
/// Gets or sets the insurances.
/// </summary>
public List<PatientInsuranceModel>? Insurances { get; set; }
/// <summary>
/// Gets or sets the relative details.
/// </summary>
public List<PatientFamilyModel>? RelativeDetails { get; set; }
public List<ModifyPatientRequest> BabyDetails { get; set; }
public string BabyData { get; set; }
}
}
\ No newline at end of file
namespace Hims.Api.Models.Patient
{
/// <summary>
/// The find patient request.
/// </summary>
public class EncryptedIdRequest
{
/// <summary>
/// Gets or sets the encrypted patient ID.
/// </summary>
public string? EncryptedId { get; set; }
public int? Id { get; set; }
}
}
\ No newline at end of file
namespace Hims.Api.Models.Patient
{
/// <summary>
/// The find patient request.
/// </summary>
public class FindPatientRequest
{
/// <summary>
/// Gets or sets the encrypted patient ID.
/// </summary>
public string EncryptedPatientId { get; set; }
}
}
#nullable enable
namespace Hims.Api.Models.Patient
{
using System.Collections.Generic;
using Hims.Shared.UserModels.Scan.ScanAppointment;
using Shared.EntityModels;
/// <summary>
/// The modify patient request.
/// </summary>
public class UpdatePatientMultipleForms
{
/// <summary>
/// Gets or sets the emergency contacts.
/// </summary>
public ModifyPatientRequest? PatientDetails { get; set; }
/// <summary>
/// Gets or sets the emergency contacts.
/// </summary>
public InsertBookScanAppointment? ScanAppointmentPayment { get; set; }
}
}
\ No newline at end of file
namespace Hims.Api.Models.Patient
{
/// <summary>
/// The update patient profile image request.
/// </summary>
public class UpdatePatientProfileImageRequest
{
/// <summary>
/// Gets or sets the patient id.
/// </summary>
public int PatientId { get; set; }
/// <summary>
/// Gets or sets the image.
/// </summary>
public string Image { get; set; }
}
}
#nullable enable
namespace Hims.Api.Models.Patient
{
/// <summary>
/// The patient upload document Request.
/// </summary>
public class UploadPatientDocumentRequest
{
/// <summary>
/// Gets or sets the uploaded by.
/// </summary>
public int UploadedBy { get; set; }
/// <summary>
/// Gets or sets the patient id.
/// </summary>
public int PatientId { get; set; }
/// <summary>
/// Gets or sets the patient document id.
/// </summary>
public int PatientDocumentId { get; set; }
/// <summary>
/// Gets or sets the document url.
/// </summary>
public string DocumentUrl { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the thumbnail url.
/// </summary>
public string ThumbnailUrl { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the document type.
/// </summary>
public string DocumentType { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the document name.
/// </summary>
public string DocumentName { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the content type.
/// </summary>
public string ContentType { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the size.
/// </summary>
public float Size { get; set; }
/// <summary>
/// Gets or sets the description.
/// </summary>
public string? Description { get; set; }
//===================================================
/// <summary>
/// Gets or sets the patient name.
/// </summary>
//public string? PatientName { get; set; }
/// <summary>
/// Gets or sets the uploaded by name.
/// </summary>
public string? UploadedByName { get; set; }
/// <summary>
/// Gets or sets the uploaded by role.
/// </summary>
//public string? UploadedByRole { get; set; }
/// <summary>
/// Gets or sets the uploaded date.
/// </summary>
// public UploadedDate { get; set; }
}
}
#nullable enable
namespace Hims.Api.Models.Patient
{
/// <summary>
/// The patient upload scan document Request.
/// </summary>
public class UploadPatientScanDocument
{
/// <summary>
/// Gets or sets the uploaded by.
/// </summary>
public int UploadedBy { get; set; }
/// <summary>
/// Gets or sets the book scan appointment id.
/// </summary>
public int BookScanAppointmentId { get; set; }
/// <summary>
/// Gets or sets the scan document id.
/// </summary>
public int ScanDocumentId { get; set; }
/// <summary>
/// Gets or sets the document url.
/// </summary>
public string? DocumentUrl { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the thumbnail url.
/// </summary>
public string? ThumbnailUrl { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the document name.
/// </summary>
public string? DocumentName { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the content type.
/// </summary>
public string? ContentType { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the size.
/// </summary>
public float Size { get; set; }
/// <summary>
/// Gets or sets the description.
/// </summary>
public string? Description { get; set; }
/// <summary>
/// Gets or sets the uploaded by name.
/// </summary>
public string? UploadedByName { get; set; }
/// <summary>
/// Gets or sets the login role id.
/// </summary>
public string? LoginRoleId { get; set; }
/// <summary>
/// Gets or sets the patient name.
/// </summary>
public string? PatientName { get; set; }
}
}
#nullable enable
namespace Hims.Api.Models.Patient
{
/// <summary>
/// The patient upload document Request.
/// </summary>
public class UploadPaymentDocumentRequest
{
/// <summary>
/// Gets or sets the uploaded by.
/// </summary>
public int UploadedBy { get; set; }
/// <summary>
/// Gets or sets the patient id.
/// </summary>
public int ProviderId { get; set; }
/// <summary>
/// Gets or sets the patient document id.
/// </summary>
public int PaymentDocumentId { get; set; }
/// <summary>
/// Gets or sets the document url.
/// </summary>
public string DocumentUrl { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the thumbnail url.
/// </summary>
public string ThumbnailUrl { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the document type.
/// </summary>
public string DocumentType { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the document name.
/// </summary>
public string DocumentName { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the content type.
/// </summary>
public string ContentType { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the size.
/// </summary>
public float Size { get; set; }
/// <summary>
/// Gets or sets the description.
/// </summary>
public string? Description { get; set; }
/// <summary>
/// Gets or sets the month.
/// </summary>
public string? Month { get; set; }
/// <summary>
/// Gets or sets the year.
/// </summary>
public string? Year { get; set; }
}
}
namespace Hims.Api.Models.Pharmacy
{
using Shared.EntityModels;
using Shared.UserModels;
/// <summary>
/// The pharmacy combined model.
/// </summary>
public class PharmacyCombinedModel
{
/// <summary>
/// Gets or sets the products.
/// </summary>
public ProductModel Products { get; set; }
/// <summary>
/// Gets or sets the stock.
/// </summary>
public PharmacyStockModel Stock { get; set; }
}
}
#nullable enable
namespace Hims.Api.Models.Practice
{
using System.Collections.Generic;
using Shared.EntityModels;
/// <summary>
/// The modify practice request.
/// </summary>
public class ModifyPracticeRequest
{
/// <summary>
/// Gets or sets the practice id.
/// </summary>
public int PracticeId { get; set; }
/// <summary>
/// Gets or sets the full name.
/// </summary>
public string FullName { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the practice type.
/// </summary>
public char PracticeType { get; set; }
/// <summary>
/// Gets or sets the tin.
/// </summary>
public string TIN { get; set; } = string.Empty;
/// <summary>
/// Gets or sets a value indicating whether active.
/// </summary>
public bool Active { get; set; }
/// <summary>
/// Gets or sets the created by.
/// </summary>
public int CreatedBy { get; set; }
/// <summary>
/// Gets or sets the modified by.
/// </summary>
public int ModifiedBy { get; set; }
/// <summary>
/// Gets or sets the locations.
/// </summary>
public List<PracticeLocationModel>? Locations { get; set; }
/// <summary>
/// Gets or sets the login role identifier.
/// </summary>
/// <value>
/// The login role identifier.
/// </value>
public short? LoginRoleId { get; set; }
/// <summary>
/// Gets or sets the name of the created by.
/// </summary>
/// <value>
/// The name of the created by.
/// </value>
public string ModifiedByName { get; set; }
}
}
#nullable enable
namespace Hims.Api.Models.Practice
{
using System.Collections.Generic;
using Shared.EntityModels;
/// <summary>
/// The practice registration request.
/// </summary>
public class PracticeRegistrationRequest
{
/// <summary>
/// Gets or sets the practice id.
/// </summary>
public int PracticeId { get; set; }
/// <summary>
/// Gets or sets the full name.
/// </summary>
public string FullName { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the practice type.
/// </summary>
public char PracticeType { get; set; }
/// <summary>
/// Gets or sets the tin.
/// </summary>
public string TIN { get; set; } = string.Empty;
/// <summary>
/// Gets or sets a value indicating whether active.
/// </summary>
public bool Active { get; set; }
/// <summary>
/// Gets or sets the created by.
/// </summary>
public int CreatedBy { get; set; }
/// <summary>
/// Gets or sets the locations.
/// </summary>
public List<PracticeLocationModel>? Locations { get; set; }
/// <summary>
/// Gets or sets the login role identifier.
/// </summary>
/// <value>
/// The login role identifier.
/// </value>
public short? LoginRoleId { get; set; }
/// <summary>
/// Gets or sets the name of the created by.
/// </summary>
/// <value>
/// The name of the created by.
/// </value>
public string CreatedByName { get; set; }
}
}
namespace Hims.Api.Models.Provider
{
/// <summary>
/// Approve provider request
/// </summary>
public class ApproveProviderRequest
{
/// <summary>
/// Gets or sets the Provider id.
/// </summary>
public int ProviderId { get; set; }
/// <summary>
/// Gets or sets the ModifiedBy.
/// </summary>
public int? ModifiedBy { get; set; }
/// <summary>
/// Gets or sets the comments.
/// </summary>
public int? RoleId { get; set; }
/// <summary>
/// Gets or sets the comments.
/// </summary>
public string? AccountFullName { get; set; }
/// <summary>
/// Gets or sets the comments.
/// </summary>
public string? ProviderName { get; set; }
}
}
namespace Hims.Api.Models.Provider
{
/// <summary>
/// The find provider location request.
/// </summary>
public class FindProviderLocationRequest
{
/// <summary>
/// Gets or sets the provider location id.
/// </summary>
public int ProviderLocationId { get; set; }
/// <summary>
/// Gets or sets the modified by.
/// </summary>
public int ModifiedBy { get; set; }
/// <summary>
/// Gets or sets the comments.
/// </summary>
public int? RoleId { get; set; }
/// <summary>
/// Gets or sets the comments.
/// </summary>
public string? FullName { get; set; }
/// <summary>
/// Gets or sets the provider id.
/// </summary>
public int ProviderId { get; set; }
}
}
namespace Hims.Api.Models.Provider
{
/// <summary>
/// provider find request
/// </summary>
public class FindProviderRequest
{
/// <summary>
/// Gets or sets the encrypted Provider id.
/// </summary>
public string EncryptedProviderId { get; set; }
/// <summary>
/// Gets or sets the location identifier.
/// </summary>
/// <value>
/// The location identifier.
/// </value>
public int? LocationId { get; set; }
/// <summary>
/// Gets or sets the specialization id.
/// </summary>
public int? SpecializationId { get; set; }
/// <summary>
/// Gets or sets the project Name.
/// </summary>
public string? ProjectName { get; set; }
}
}
namespace Hims.Api.Models.Provider
{
/// <summary>
/// The find symptom request.
/// </summary>
public class FindSymptomRequest
{
/// <summary>
/// Gets or sets the service id.
/// </summary>
public string ServiceId { get; set; }
}
}
namespace Hims.Api.Models.Provider
{
/// <summary>
/// The modify provider location request.
/// </summary>
public class ModifyProviderLocationRequest
{
/// <summary>
/// Gets or sets the provider location id.
/// </summary>
public int ProviderLocationId { get; set; }
/// <summary>
/// Gets or sets the provider availability id.
/// </summary>
public int ProviderAvailabilityId { get; set; }
/// <summary>
/// Gets or sets the provider id.
/// </summary>
public int ProviderId { get; set; }
/// <summary>
/// Gets or sets the location id.
/// </summary>
public int LocationId { get; set; }
/// <summary>
/// Gets or sets the practice id.
/// </summary>
public int PracticeId { get; set; }
/// <summary>
/// Gets or sets the consultation duration.
/// </summary>
public short? ConsultationDuration { get; set; }
/// <summary>
/// Gets or sets the consultation charges.
/// </summary>
public decimal? ConsultationCharges { get; set; }
/// <summary>
/// Gets or sets the telemedicine duration.
/// </summary>
public short? TelemedicineDuration { get; set; }
/// <summary>
/// Gets or sets the telemedicine charges.
/// </summary>
public decimal? TelemedicineCharges { get; set; }
/// <summary>
/// Gets or sets the in patient duration.
/// </summary>
public short? InPatientDuration { get; set; }
/// <summary>
/// Gets or sets the out patient duration.
/// </summary>
public short? OutPatientDuration { get; set; }
/// <summary>
/// Gets or sets the casualty duration.
/// </summary>
public short? CasualtyDuration { get; set; }
/// <summary>
/// Gets or sets the follow up days.
/// </summary>
public short? FollowUpDays { get; set; }
/// <summary>
/// Gets or sets the available days.
/// </summary>
public string AvailableDays { get; set; }
/// <summary>
/// Gets or sets the Availability.
/// </summary>
public string Availability { get; set; }
/// <summary>
/// Gets or sets the created by.
/// </summary>
public int CreatedBy { get; set; }
/// <summary>
/// Gets or sets the modified by.
/// </summary>
public int? ModifiedBy { get; set; }
/// <summary>
/// Gets or sets the comments.
/// </summary>
public int? RoleId { get; set; }
/// <summary>
/// Gets or sets the comments.
/// </summary>
public string? FullName { get; set; }
/// <summary>
/// Gets or sets the follow up days.
/// </summary>
public short? FollowUpDaysForIp { get; set; }
/// <summary>
/// Gets or sets the duration.
/// </summary>
public string Duration { get; set; }
/// <summary>
/// Gets or sets the is telemedicine.
/// </summary>
public bool? IsTelemedicine { get; set; }
/// <summary>
/// Gets or sets the is online consultation.
/// </summary>
public bool? IsOnlineConsultation { get; set; }
}
}
\ No newline at end of file
#nullable enable
namespace Hims.Api.Models.Provider
{
using System;
using System.Collections.Generic;
/// <summary>
/// The modify provider request.
/// </summary>
public class ModifyProviderRequest
{
/// <summary>
/// Gets or sets the provider id.
/// </summary>
public int ProviderId { get; set; }
/// <summary>
/// Gets or sets the salutation.
/// </summary>
public string? Salutation { get; set; }
/// <summary>
/// Gets or sets the first name.
/// </summary>
public string FirstName { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the middle name.
/// </summary>
public string? MiddleName { get; set; }
/// <summary>
/// Gets or sets the last name.
/// </summary>
public string LastName { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the full name.
/// </summary>
public string FullName { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the friendly name.
/// </summary>
public string FriendlyName { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the date of birth.
/// </summary>
public DateTime? DateOfBirth { get; set; }
/// <summary>
/// Gets or sets the age.
/// </summary>
public short? Age { get; set; }
/// <summary>
/// Gets or sets the experience.
/// </summary>
public double? Experience { get; set; }
/// <summary>
/// Gets or sets the gender.
/// </summary>
public char? Gender { get; set; }
/// <summary>
/// Gets or sets the marital status.
/// </summary>
public char? MaritalStatus { get; set; }
/// <summary>
/// Gets or sets the email.
/// </summary>
public string Email { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the mobile.
/// </summary>
public string? Mobile { get; set; }
/// <summary>
/// Gets or sets the npi.
/// </summary>
public string NPI { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the country.
/// </summary>
public int CountryId { get; set; }
/// <summary>
/// Gets or sets the department id.
/// </summary>
public int DepartmentId { get; set; }
/// <summary>
/// Gets or sets the profile image url.
/// </summary>
public string? ProfileImageUrl { get; set; }
/// <summary>
/// Gets or sets the profile image url.
/// </summary>
public string? ProfileThumbnailImageUrl { get; set; }
/// <summary>
/// Gets or sets the thumbnail url.
/// </summary>
public string? ThumbnailUrl { get; set; }
/// <summary>
/// Gets or sets the base 64 profile image.
/// </summary>
public string? Base64ProfileImage { get; set; }
/// <summary>
/// Gets or sets the base 64 profile image.
/// </summary>
public string? Base64ProfileThumbnailImage { get; set; }
/// <summary>
/// Gets or sets the theme.
/// </summary>
public string? Theme { get; set; }
/// <summary>
/// Gets or sets a value indicating whether enable email alerts.
/// </summary>
public bool EnableEmailAlerts { get; set; }
/// <summary>
/// Gets or sets a value indicating whether enable sms alerts.
/// </summary>
public bool EnableSMSAlerts { get; set; }
/// <summary>
/// Gets or sets a value indicating whether enable desktop notifications.
/// </summary>
public bool EnableDesktopNotifications { get; set; }
/// <summary>
/// Gets or sets a value indicating whether enable mobile notifications.
/// </summary>
public bool EnableMobileNotifications { get; set; }
/// <summary>
/// Gets or sets the services.
/// </summary>
public string? Services { get; set; }
/// <summary>
/// Gets or sets the specializations.
/// </summary>
public string? Specializations { get; set; }
/// <summary>
/// Gets or sets the about.
/// </summary>
public string? About { get; set; }
/// <summary>
/// Gets or sets the rating.
/// </summary>
public double Rating { get; set; }
/// <summary>
/// Gets or sets the awards honors.
/// </summary>
public string? AwardsHonors { get; set; }
/// <summary>
/// Gets or sets the educations.
/// </summary>
public string? Educations { get; set; }
/// <summary>
/// Gets or sets the memberships.
/// </summary>
public string? Memberships { get; set; }
/// <summary>
/// Gets or sets the registrations.
/// </summary>
public string? Registrations { get; set; }
/// <summary>
/// Gets or sets the experiences.
/// </summary>
public string? Experiences { get; set; }
/// <summary>
/// Gets or sets the password.
/// </summary>
public string? Password { get; set; }
/// <summary>
/// Gets or sets the languages.
/// </summary>
public string? Languages { get; set; }
/// <summary>
/// Gets or sets the created by.
/// </summary>
public int? CreatedBy { get; set; }
/// <summary>
/// Gets or sets the modified by.
/// </summary>
public int? ModifiedBy { get; set; }
/// <summary>
/// Gets or sets the provider no.
/// </summary>
public string? ProviderNo { get; set; }
/// <summary>
/// Gets or sets the provider bank account id.
/// </summary>
public int ProviderBankAccountId { get; set; }
/// <summary>
/// Gets or sets the address line.
/// </summary>
public string? AddressLine { get; set; }
/// <summary>
/// Gets or sets the city.
/// </summary>
public string? City { get; set; }
/// <summary>
/// Gets or sets the state.
/// </summary>
public string? State { get; set; }
/// <summary>
/// Gets or sets the zip code.
/// </summary>
public string? ZipCode { get; set; }
/// <summary>
/// Gets or sets the signature.
/// </summary>
public string? Base64Signature { get; set; }
/// <summary>
/// Gets or sets the clinic picture.
/// </summary>
public string? Base64ClinicPicture { get; set; }
/// <summary>
/// Gets or sets the RoleId.
/// </summary>
public int? RoleId { get; set; }
/// <summary>
/// Gets or sets the AccountFullName .
/// </summary>
public string? AccountFullName { get; set; }
/// <summary>
/// Gets or sets the rejected comments.
/// </summary>
public string? ProviderName { get; set; }
/// <summary>
/// Gets or sets the practice location id.
/// </summary>
public int? PracticeLocationId { get; set; }
/// <summary>
/// Gets or sets the location identifier.
/// </summary>
/// <value>
/// The location identifier.
/// </value>
public int[] LocationIds { get; set; }
/// <summary>
/// Gets or sets the user name.
/// </summary>
public string? UserName { get; set; }
/// <summary>
/// Gets or sets the salutation id.
/// </summary>
public int? SalutationId { get; set; }
/// <summary>
/// Gets or sets the type.
/// </summary>
/// <value>
/// The type.
/// </value>
public char? Type { get; set; }
/// <summary>
/// Gets or sets the employee.
/// </summary>
/// <value>
/// The employee.
/// </value>
public char? Employee { get; set; }
/// <summary>
/// Gets or sets the type of the doctor.
/// </summary>
/// <value>
/// The type of the doctor.
/// </value>
public char? DoctorType { get; set; }
/// <summary>
/// Gets or sets the pan card no.
/// </summary>
/// <value>
/// The pan card no.
/// </value>
public string? PanCardNo { get; set; }
}
}
namespace Hims.Api.Models.Provider
{
/// <summary>
/// The provider charges Model
/// </summary>
public class ProviderCharges
{
/// <summary>
/// Gets or sets the consultation charges.
/// </summary>
public decimal? ConsultationCharges { get; set; }
/// <summary>
/// Gets or sets the telemedicine charges.
/// </summary>
public decimal? TelemedicineCharges { get; set; }
/// <summary>
/// Gets or sets the in patient charges.
/// </summary>
public decimal? InPatientCharges { get; set; }
/// <summary>
/// Gets or sets the out patient charges.
/// </summary>
public decimal? OutPatientCharges { get; set; }
/// <summary>
/// Gets or sets the casualty charges.
/// </summary>
public decimal? CasualtyCharges { get; set; }
/// <summary>
/// Gets or sets the covid charges.
/// </summary>
public decimal? CovidCharges { get; set; }
/// <summary>
/// Gets or sets the special charges.
/// </summary>
public decimal? SpecialCharges { get; set; }
/// <summary>
/// Gets or sets the availability.
/// </summary>
public string Availability { get; set; } = string.Empty;
}
}
\ No newline at end of file
namespace Hims.Api.Models.Provider
{
/// <summary>
/// Reject provider request
/// </summary>
public class RejectProviderRequest
{
/// <summary>
/// Gets or sets the Provider id.
/// </summary>
public int ProviderId { get; set; }
/// <summary>
/// Gets or sets the rejected comments.
/// </summary>
public string RejectedComments { get; set; }
/// <summary>
/// Gets or sets the rejected comments.
/// </summary>
public int? ModifiedBy { get; set; }
/// <summary>
/// Gets or sets the rejected comments.
/// </summary>
public int? RoleId { get; set; }
/// <summary>
/// Gets or sets the rejected comments.
/// </summary>
public string? AccountFullName { get; set; }
/// <summary>
/// Gets or sets the rejected comments.
/// </summary>
public string? ProviderName { get; set; }
}
}
namespace Hims.Api.Models.Provider
{
/// <summary>
/// The SlotStatus
/// </summary>
public enum SlotStatus
{
/// <summary>
/// Available is A.
/// </summary>
Available = 'A',
/// <summary>
/// Booked is B.
/// </summary>
Booked = 'B',
/// <summary>
/// Expired is E.
/// </summary>
Expired = 'E'
}
}
\ No newline at end of file
namespace Hims.Api.Models.Provider
{
using System;
/// <summary>
/// The Time Slot Model
/// </summary>
public class TimeSlotModel
{
/// <summary>
/// Gets or sets the slot value.
/// </summary>
public string SlotValue { get; set; }
/// <summary>
/// Gets or sets the slot time.
/// </summary>
public TimeSpan SlotTime { get; set; }
/// <summary>
/// Gets or sets the slot name.
/// </summary>
public string SlotName { get; set; }
/// <summary>
/// Gets or sets the status.
/// </summary>
public SlotStatus Status { get; set; }
/// <summary>
/// Gets or sets the token number.
/// </summary>
/// <value>
/// The token number.
/// </value>
public int TokenNumber { get; set; }
/// <summary>
/// Gets or sets the value.
/// </summary>
public string Value { get; set; }
}
}
\ No newline at end of file
#nullable enable
namespace Hims.Api.Models.Provider
{
/// <summary>
/// The update provider image request.
/// </summary>
public class UpdateProviderImageRequest
{
/// <summary>
/// Gets or sets the provider id.
/// </summary>
public int ProviderId { get; set; }
/// <summary>
/// Gets or sets the base 64 image string.
/// </summary>
public string? Base64ImageString { get; set; }
}
}
#nullable enable
namespace Hims.Api.Models.Provider
{
/// <summary>
/// The provider upload document model.
/// </summary>
public class UploadProviderDocumentModel
{
/// <summary>
/// Gets or sets the encrypted provider id.
/// </summary>
public string EncryptedProviderId { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the document (Base 64 Image String).
/// </summary>
public string Document { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the document url.
/// </summary>
public string DocumentUrl { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the thumbnail url.
/// </summary>
public string ThumbnailUrl { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the document type.
/// </summary>
public string? DocumentType { get; set; }
/// <summary>
/// Gets or sets the document name.
/// </summary>
public string DocumentName { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the description.
/// </summary>
public string? Description { get; set; }
}
}
using Newtonsoft.Json;
namespace Hims.Api.Models.PushNotifications
{
public class DataPayload
{
[JsonProperty("type")]
public string Type { get; set; }
[JsonProperty("do")]
public string Do { get; set; }
[JsonProperty("reason")]
public string Reason { get; set; }
}
}
using Newtonsoft.Json;
namespace Hims.Api.Models.PushNotifications
{
public class GoogleNotification
{
[JsonProperty("priority")]
public string Priority { get; set; } = "high";
[JsonProperty("data")]
public DataPayload Data { get; set; }
[JsonProperty("notification")]
public NotificationModel Notification { get; set; }
}
}
using Hims.Api.Hubs;
using Newtonsoft.Json;
namespace Hims.Api.Models.PushNotifications
{
public class GoogleWebNotification
{
[JsonProperty("priority")]
public string Priority { get; set; } = "high";
[JsonProperty("data")]
public CommunicationMessageAlt Data { get; set; }
[JsonProperty("notification")]
public NotificationModel Notification { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using Newtonsoft.Json;
namespace Hims.Api.Models.PushNotifications
{
public class NotificationModel
{
[JsonProperty("deviceId")]
public string DeviceId { get; set; }
[JsonProperty("isAndroiodDevice")]
public bool IsAndroiodDevice { get; set; }
[JsonProperty("title")]
public string Title { get; set; }
[JsonProperty("body")]
public string Body { get; set; }
}
}
using Newtonsoft.Json;
namespace Hims.Api.Models.PushNotifications
{
public class ResponseModel
{
[JsonProperty("isSuccess")]
public bool IsSuccess { get; set; }
[JsonProperty("message")]
public string Message { get; set; }
}
}
using CorePush.Google;
using Hims.Api.Hubs;
using Hims.Domain.Configurations;
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
namespace Hims.Api.Models.PushNotifications.Service
{
/// <summary>
/// NotificationService interface
/// </summary>
public interface INotificationService
{
/// <summary>
/// Sends the notification.
/// </summary>
/// <param name="notificationModel">The notification model.</param>
/// <param name="data">The data.</param>
/// <returns></returns>
Task<ResponseModel> SendNotification(NotificationModel notificationModel, DataPayload data);
/// <summary>
/// Sends the web notification.
/// </summary>
/// <param name="notificationModel">The notification model.</param>
/// <param name="data">The data.</param>
/// <returns></returns>
Task<ResponseModel> SendWebNotification(NotificationModel notificationModel, CommunicationMessageAlt data);
}
/// <summary>
/// NotificationService service
/// </summary>
/// <seealso cref="Hims.Api.Models.PushNotifications.Service.INotificationService" />
public class NotificationService : INotificationService
{
private readonly INotificationConfiguration configuration;
/// <summary>
/// Initializes a new instance of the <see cref="NotificationService"/> class.
/// </summary>
/// <param name="configuration">The configuration.</param>
public NotificationService(INotificationConfiguration configuration)
{
this.configuration = configuration;
}
/// <summary>
/// Sends the notification.
/// </summary>
/// <param name="notificationModel">The notification model.</param>
/// <param name="data">The data.</param>
/// <returns></returns>
public async Task<ResponseModel> SendNotification(NotificationModel notificationModel, DataPayload data)
{
ResponseModel response = new ResponseModel();
try
{
if (notificationModel.IsAndroiodDevice)
{
/* FCM Sender (Android Device) */
var settings = new FcmSettings()
{
SenderId = this.configuration.SenderId,
ServerKey = this.configuration.ServerKey
};
HttpClient httpClient = new HttpClient();
string authorizationKey = string.Format("keyy={0}", settings.ServerKey);
string deviceToken = notificationModel.DeviceId;
httpClient.DefaultRequestHeaders.TryAddWithoutValidation("Authorization", authorizationKey);
httpClient.DefaultRequestHeaders.Accept
.Add(new MediaTypeWithQualityHeaderValue("application/json"));
DataPayload dataPayload = new DataPayload
{
Do = data.Do,
Type = data.Type,
Reason = data.Reason
};
GoogleNotification notification = new GoogleNotification
{
Data = dataPayload,
Notification = notificationModel
};
var fcm = new FcmSender(settings, httpClient);
var fcmSendResponse = await fcm.SendAsync(deviceToken, notification);
if (fcmSendResponse.IsSuccess())
{
response.IsSuccess = true;
response.Message = "Notification sent successfully";
return response;
}
else
{
response.IsSuccess = false;
response.Message = fcmSendResponse.Results[0].Error;
return response;
}
}
else
{
/* Code here for APN Sender (iOS Device) */
//var apn = new ApnSender(apnSettings, httpClient);
//await apn.SendAsync(notification, deviceToken);
}
return response;
}
catch (Exception ex)
{
response.IsSuccess = false;
response.Message = "Something went wrong";
return response;
}
}
/// <summary>
/// Sends the web notification.
/// </summary>
/// <param name="notificationModel">The notification model.</param>
/// <param name="data">The data.</param>
/// <returns></returns>
public async Task<ResponseModel> SendWebNotification(NotificationModel notificationModel, CommunicationMessageAlt data)
{
ResponseModel response = new ResponseModel();
try
{
var settings = new FcmSettings()
{
SenderId = this.configuration.SenderId,
ServerKey = this.configuration.ServerKey
};
HttpClient httpClient = new HttpClient();
string authorizationKey = string.Format("keyy={0}", settings.ServerKey);
string deviceToken = notificationModel.DeviceId;
httpClient.DefaultRequestHeaders.TryAddWithoutValidation("Authorization", authorizationKey);
httpClient.DefaultRequestHeaders.Accept
.Add(new MediaTypeWithQualityHeaderValue("application/json"));
GoogleWebNotification notification = new GoogleWebNotification
{
Data = data,
Notification = notificationModel
};
var fcm = new FcmSender(settings, httpClient);
var fcmSendResponse = await fcm.SendAsync(deviceToken, notification);
if (fcmSendResponse.IsSuccess())
{
response.IsSuccess = true;
response.Message = "Notification sent successfully";
return response;
}
response.IsSuccess = false;
response.Message = fcmSendResponse.Results[0].Error;
return response;
}
catch (Exception ex)
{
response.IsSuccess = false;
response.Message = "Something went wrong";
return response;
}
}
}
}
using System;
using System.Collections.Generic;
using Hims.Domain.Entities;
namespace Hims.Api.Models.RealTime
{
public class RealTimeModel
{
public int AppointmentId { get; set; }
public int StatusId { get; set; }
public string CubicleName { get; set; } = null;
public string FirstAppointmentTime { get; set; } = null;
public string Ip { get; set; } = null;
public List<Shared.UserModels.Queue.PatientModel> Patients { get; set; } = null;
public Shared.UserModels.Queue.PatientModel CurrentPatient { get; set; } = null;
}
}
namespace Hims.Api.Models.Specialization
{
/// <summary>
/// get or set the find specialization request.
/// </summary>
public class FindSpecializationRequest
{
/// <summary>
/// Gets or sets the encrypted Specialization ID.
/// </summary>
public string EncryptedSpecializationId { get; set; }
}
}
namespace Hims.Api.Models.Ticket
{
/// <summary>
/// The attachments.
/// </summary>
public class Attachments
{
/// <summary>
/// Gets or sets the url.
/// </summary>
public string Url { get; set; }
/// <summary>
/// Gets or sets the file name.
/// </summary>
public string FileName { get; set; }
/// <summary>
/// Gets or sets the extension.
/// </summary>
public string Extension { get; set; }
}
}
namespace Hims.Api.Models.Ticket.Performance
{
using System.Collections.Generic;
/// <summary>
/// The performance.
/// </summary>
public class Performance
{
/// <summary>
/// Gets or sets the tickets.
/// </summary>
public List<Tickets> Tickets { get; set; }
/// <summary>
/// Gets or sets the performance status.
/// </summary>
public PerformanceStatus HighPriority { get; set; }
/// <summary>
/// Gets or sets the low priority.
/// </summary>
public PerformanceStatus LowPriority { get; set; }
/// <summary>
/// Gets or sets the medium priority.
/// </summary>
public PerformanceStatus MediumPriority { get; set; }
}
}
namespace Hims.Api.Models.Ticket.Performance
{
/// <summary>
/// The performance status.
/// </summary>
public class PerformanceStatus
{
/// <summary>
/// Gets or sets the total average.
/// </summary>
public double TotalAverage { get; set; }
/// <summary>
/// Gets or sets the performance.
/// </summary>
public double Performance { get; set; }
/// <summary>
/// Gets or sets the total hour.
/// </summary>
public double TotalHour { get; set; }
/// <summary>
/// Gets or sets the total hour taken.
/// </summary>
public double TotalHourTaken { get; set; }
/// <summary>
/// Gets or sets the ticket count.
/// </summary>
public int TicketCount { get; set; }
}
}
namespace Hims.Api.Models.Ticket.Performance
{
using System;
/// <summary>
/// The tickets.
/// </summary>
public class Tickets
{
/// <summary>
/// Gets or sets the encrypted ticket id.
/// </summary>
public string EncryptedTicketId { get; set; }
/// <summary>
/// Gets or sets the start date.
/// </summary>
public string StartDate { get; set; }
/// <summary>
/// Gets or sets the ticket number.
/// </summary>
public string TicketNumber { get; set; }
/// <summary>
/// Gets or sets the end date.
/// </summary>
public DateTime? EndDate { get; set; }
/// <summary>
/// Gets or sets the status.
/// </summary>
public string Status { get; set; }
/// <summary>
/// Gets or sets the priority.
/// </summary>
public string Priority { get; set; }
/// <summary>
/// Gets or sets the average.
/// </summary>
public double Average { get; set; }
}
}
namespace Hims.Api.Models.Ticket
{
using System;
/// <summary>
/// The ticket request filter.
/// </summary>
public class TicketRequestFilter
{
/// <summary>
/// Gets or sets the page size.
/// </summary>
public int PageSize { get; set; }
/// <summary>
/// Gets or sets the page index.
/// </summary>
public int PageIndex { get; set; }
/// <summary>
/// Gets or sets the assigned to.
/// </summary>
public int? AssignedTo { get; set; }
/// <summary>
/// Gets or sets the account id.
/// </summary>
public int? AccountId { get; set; }
/// <summary>
/// Gets or sets the is admin.
/// </summary>
public bool? IsAdmin { get; set; }
/// <summary>
/// Gets or sets the ticket id.
/// </summary>
public long? TicketId { get; set; }
/// <summary>
/// Gets or sets the ticket timeline id.
/// </summary>
public long? TicketTimelineId { get; set; }
/// <summary>
/// Gets or sets the comments.
/// </summary>
public string Comments { get; set; }
/// <summary>
/// Gets or sets the start date.
/// </summary>
public DateTime? StartDate { get; set; }
/// <summary>
/// Gets or sets the end date.
/// </summary>
public DateTime? EndDate { get; set; }
/// <summary>
/// Gets or sets the filter type.
/// </summary>
public string FilterType { get; set; }
/// <summary>
/// Gets or sets the priority.
/// </summary>
public string Priority { get; set; }
/// <summary>
/// Gets or sets the status.
/// </summary>
public string Status { get; set; }
/// <summary>
/// Gets or sets the issue with.
/// </summary>
public string IssueWith { get; set; }
/// <summary>
/// Gets or sets the issue with.
/// </summary>
public string MobileNo { get; set; }
/// <summary>
/// Gets or sets the device type.
/// </summary>
public string? DeviceType { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the device type.
/// </summary>
public int? AssigneeAccountId { get; set; }
/// <summary>
/// Gets or sets the location id.
/// </summary>
public int? LocationId { get; set; }
}
}
namespace Hims.Api.Models.User
{
/// <summary>
/// The find user request.
/// </summary>
public class FindUserRequest
{
/// <summary>
/// Gets or sets the encrypted user ID.
/// </summary>
public string EncryptedUserId { get; set; }
}
}
namespace Hims.Api.Models.WebTelemedicine
{
/// <summary>
/// The find user request.
/// </summary>
public class WebTelemedicineTokenRequest
{
/// <summary>
/// Gets or sets the encrypted user ID.
/// </summary>
public string RoomName { get; set; }
/// <summary>
/// Gets or sets the account id.
/// </summary>
public int AccountId { get; set; }
}
}
namespace Hims.Api.Models.WebTelemedicine
{
/// <summary>
/// The video link request.
/// </summary>
public class VideoLinkRequest
{
/// <summary>
/// Gets or sets the appointment id.
/// </summary>
public string AppointmentNo { get; set; }
}
}
namespace Hims.Api.Profiles
{
using AutoMapper;
using Models.Appointment;
using Models.Patient;
using Models.Practice;
using Models.Provider;
using Shared.EntityModels;
/// <inheritdoc />
public class MappingProfile : Profile
{
/// <inheritdoc />
public MappingProfile()
{
// Practice
this.CreateMap<PracticeRegistrationRequest, PracticeModel>();
this.CreateMap<ModifyPracticeRequest, PracticeModel>();
// Provider
this.CreateMap<ModifyProviderRequest, ProviderModel>();
this.CreateMap<ModifyProviderLocationRequest, ProviderLocationModel>();
// Patient
this.CreateMap<ModifyPatientRequest, PatientModel>();
// Appointment
this.CreateMap<BookAppointmentRequest, AppointmentLogModel>();
this.CreateMap<BookAppointmentRequest, AppointmentModel>();
}
}
}
This diff is collapsed.
using System;
namespace Hims.Api.Senders
{
internal class ExceptionLogInfo
{
public string LogFrom { get; set; }
public string ErrorMessage { get; set; }
public DateTime LogDate { get; set; }
}
}
\ No newline at end of file
namespace Hims.Api.Senders
{
using System.Collections.Generic;
using System.Threading.Tasks;
using Shared.Library;
using Hims.Api.Models.MailTemplates;
using Hims.Shared.EntityModels;
using Hims.Shared.UserModels;
/// <summary>
/// The EmailSender interface.
/// </summary>
public interface IEmailSender
{
/// <summary>
/// The send OTP async.
/// </summary>
/// <param name="email">
/// The email.
/// </param>
/// <param name="fullName">
/// The full name.
/// </param>
/// <returns>
/// The <see cref="Task"/>.
/// </returns>
Task<OTPResponse> SendOTPAsync(string email, string fullName);
/// <summary>
/// The send provider welcome mail async.
/// </summary>
/// <param name="email">
/// The email.
/// </param>
/// <param name="fullName">
/// The full name.
/// </param>
/// <param name="createPasswordLink">
/// The encrypted provider id.
/// </param>
/// <param name="roleName">
/// The role Name.
/// </param>
/// <returns>
/// The <see cref="Task"/>.
/// </returns>
Task<bool> SendCreatePasswordMailAsync(string email, string fullName, string createPasswordLink, string roleName);
/// <summary>
/// The send provider welcome mail async.
/// </summary>
/// <param name="email">
/// The email.
/// </param>
/// <param name="fullName">
/// The full name.
/// </param>
/// <returns>
/// The <see cref="Task"/>.
/// </returns>
Task<bool> SendProviderWelcomeMailAsync(string email, string fullName);
/// <summary>
/// The send provider welcome mail async.
/// </summary>
/// <param name="doctorName">
/// The full name.
/// </param>
/// <returns>
/// The <see cref="Task"/>.
/// </returns>
Task<bool> SendMailAsync(string doctorName);
/// <summary>
/// The send patient welcome mail async.
/// </summary>
/// <param name="email">
/// The email.
/// </param>
/// <param name="fullName">
/// The full name.
/// </param>
/// <returns>
/// The <see cref="Task"/>.
/// </returns>
Task<bool> SendPatientWelcomeMailAsync(string email, string fullName);
/// <summary>The send book appointment mail async.</summary>
/// <param name="email">The email.</param>
/// <param name="patientName">The patient name.</param>
/// <param name="accountName">The account name.</param>
/// <param name="doctorName">The doctor name.</param>
/// <param name="appointmentTime">The appointment time.</param>
/// <param name="type">The type.</param>
/// <returns>The <see cref="Task"/>.</returns>
Task<bool> SendBookAppointmentMailAsync(string email, string patientName, string accountName, string doctorName, string appointmentTime, string type);
/// <summary>
/// The send welcome mail async.
/// </summary>
/// <param name="email">
/// The email.
/// </param>
/// <param name="fullName">
/// The full Name.
/// </param>
/// <param name="password">
/// The password.
/// </param>
/// <param name="createPasswordLink">
/// The create Password Link.
/// </param>
/// <returns>
/// The <see cref="Task"/>.
/// </returns>
Task<bool> SendWelcomeMailAsync(string email, string fullName, string password, string createPasswordLink);
/// <summary>
/// The reset password mail async.
/// </summary>
/// <param name="email">
/// The email.
/// </param>
/// <param name="fullName">
/// The full name.
/// </param>
/// <param name="accountType">
/// The account type.
/// </param>
/// <param name="resetPasswordLink">
/// The reset password link.
/// </param>
/// <returns>
/// The <see cref="Task"/>.
/// </returns>
Task<bool> ResetPasswordMailAsync(string email, string fullName, string accountType, string resetPasswordLink);
/// <summary>
/// The send payment mail async.
/// </summary>
/// <param name="email">
/// The email.
/// </param>
/// <param name="fullName">
/// The full name.
/// </param>
/// <param name="paymentLink">
/// The payment link.
/// </param>
/// <returns>
/// The <see cref="Task"/>.
/// </returns>
Task<bool> SendPaymentMailAsync(string email, string fullName, string paymentLink);
/// <summary>
/// The send video link async.
/// </summary>
/// <param name="email">
/// The email.
/// </param>
/// <param name="fullName">
/// The full name.
/// </param>
/// <param name="providerName">
/// The provider name.
/// </param>
/// <param name="link">
/// The link.
/// </param>
/// <returns>
/// The <see cref="Task"/>.
/// </returns>
Task<bool> SendVideoLinkAsync(string email, string fullName, string providerName, string link);
/// <summary>
/// The send alert email to support.
/// </summary>
/// <param name="model">
/// The model.
/// </param>
/// <returns>
/// The <see cref="Task"/>.
/// </returns>
Task<bool> SendAlertEmailToSupport(IEnumerable<AccountModel> model);
/// <summary>
/// The send app links async.
/// </summary>
/// <param name="email">
/// The email.
/// </param>
/// <returns>
/// The <see cref="Task"/>.
/// </returns>
Task<bool> SendAppLinksAsync(string email);
/// <summary>
/// The send assign email to support.
/// </summary>
/// <param name="ticket">
/// The ticket.
/// </param>
/// <returns>
/// The <see cref="Task"/>.
/// </returns>
Task<bool> SendAssignEmailToSupport(Tickets ticket);
/// <summary>
/// The send assign email to support.
/// </summary>
/// <param name="supportUsers">
/// The ticket.
/// </param>
/// <param name="logfrom">
/// </param>
/// <param name="errorMessage">
/// </param>
/// <returns>
/// The <see cref="Task"/>.
/// </returns>
Task<bool> SendExceptionLogEmailToSupport(IEnumerable<AccountModel> supportUsers, string logfrom, string errorMessage);
/// The send assign email to support.
/// </summary>
/// <param name="supportUsers">
/// The ticket.
/// </param>
/// <param name="logfrom">
/// </param>
/// <returns>
/// The <see cref="Task"/>.
/// </returns>
Task<bool> SendPharmacyMailAsync(IEnumerable<AccountModel> emails, ProductEmailModel model);
/// The send assign email to support.
/// </summary>
/// <param name="supportUsers">
/// The ticket.
/// </param>
/// <param name="logfrom">
/// </param>
/// <returns>
/// The <see cref="Task"/>.
/// </returns>
Task<bool> SendFinalBillEmailAsync(IEnumerable<AccountModel> emails, PharmacyBillReportModel model);
}
}
This diff is collapsed.
using Hims.Shared.EntityModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Hims.Api.Senders
{
/// <summary>
/// The WhatsAppSMSSender Interface
/// </summary>
public interface IWhatsAppSMSSender
{
/// <summary>
/// Sends the whats application message asynchronous.
/// </summary>
/// <param name="appointmentModel">The appointment model.</param>
/// <param name="displayTime">The display time.</param>
/// <param name="messageType">Type of the message.</param>
/// <param name="location">The location.</param>
/// <returns></returns>
public Task<bool> SendWhatsAppMessageAsync(AppointmentModel appointmentModel, string displayTime, string messageType,string location);
/// <summary>
/// Sends the otp asynchronous.
/// </summary>
/// <param name="Mobile">The mobile.</param>
/// <param name="Otp">The otp.</param>
/// <returns></returns>
public Task<bool> SendOTPAsync(string Mobile,string Otp);
/// <summary>
/// Sends the registered message.
/// </summary>
/// <param name="mobile">The mobile.</param>
/// <param name="fullName">The full name.</param>
/// <returns></returns>
public Task<bool> SendRegisteredMessage(string mobile, string fullName);
/// <summary>
/// Sends the lab booking whats application message.
/// </summary>
/// <param name="mobile">The mobile.</param>
/// <param name="fullName">The full name.</param>
/// <param name="LabName">Name of the lab.</param>
/// <returns></returns>
public Task<bool> SendLabBookingWhatsAppMessage(string mobile, string fullName, string LabName);
/// <summary>
/// Sends the lab cancelling whats application message.
/// </summary>
/// <param name="mobile">The mobile.</param>
/// <param name="fullName">The full name.</param>
/// <param name="LabName">Name of the lab.</param>
/// <param name="requisitionNumber">The requisition number.</param>
/// <returns></returns>
public Task<bool> SendLabCancellingWhatsAppMessage(string mobile, string fullName, string LabName, string requisitionNumber);
/// <summary>
/// Sends the lab report whats application message.
/// </summary>
/// <param name="mobile">The mobile.</param>
/// <param name="fullName">The full name.</param>
/// <param name="LabName">Name of the lab.</param>
/// <param name="labLink">The lab link.</param>
/// <returns></returns>
public Task<bool> SendLabReportWhatsAppMessage(string mobile, string fullName, string LabName, string labLink);
/// <summary>
/// Sends the scan whats application message.
/// </summary>
/// <param name="mobile">The mobile.</param>
/// <param name="fullName">The full name.</param>
/// <param name="scanName">Name of the scan.</param>
/// <param name="scanDate">The scan date.</param>
/// <param name="scanTime">The scan time.</param>
/// <param name="type">The type.</param>
/// <param name="requisitionNumber">The requisition number.</param>
/// <returns></returns>
public Task<bool> SendScanWhatsAppMessage(string mobile, string fullName, string scanName , string scanDate, string scanTime, string type, string requisitionNumber);
/// <summary>
/// Sends the pharmacy whats application message.
/// </summary>
/// <param name="mobile">The mobile.</param>
/// <param name="fullName">The full name.</param>
/// <param name="type">The type.</param>
/// <returns></returns>
public bool SendPharmacyWhatsAppMessage(string mobile, string fullName, string type);
/// <summary>
/// Sends the lab precaution whats application message.
/// </summary>
/// <param name="mobile">The mobile.</param>
/// <param name="fullName">The full name.</param>
/// <param name="precautionText">The precaution text.</param>
/// <returns></returns>
public Task<bool> SendLabPrecautionWhatsAppMessage(string mobile, string fullName, string precautionText);
}
}
This diff is collapsed.
This diff is collapsed.
namespace Hims.Api.Services
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Claims;
using System.Threading.Tasks;
using Domain.Services;
using IdentityModel;
using IdentityServer4.Models;
using IdentityServer4.Services;
using Shared.EntityModels;
/// <inheritdoc />
/// <summary>
/// The profile service.
/// </summary>
public class ProfileServices : IProfileService
{
/// <summary>
/// The account services.
/// </summary>
private readonly IAccountService accountServices;
/// <inheritdoc cref="accountServices" />
public ProfileServices(IAccountService accountServices) => this.accountServices = accountServices;
/// <inheritdoc />
public async Task GetProfileDataAsync(ProfileDataRequestContext context)
{
var accountId = GetAccountId(context.Subject.Claims);
if (accountId > 0)
{
var role = await this.accountServices.GetRoleAsync(accountId);
var claims = FetchClaims(role);
context.IssuedClaims.AddRange(claims);
}
}
/// <inheritdoc />
public async Task IsActiveAsync(IsActiveContext context)
{
var accountId = GetAccountId(context.Subject.Claims);
context.IsActive = await Task.Run(() => accountId > 0);
}
/// <summary>
/// The get role id.
/// </summary>
/// <param name="claims">
/// The claims.
/// </param>
/// <returns>
/// The <see cref="int"/>.
/// </returns>
private static int GetAccountId(IEnumerable<Claim> claims)
{
var accountIdClaim = claims.FirstOrDefault(x => x.Type == "sub");
if (accountIdClaim == null || string.IsNullOrEmpty(accountIdClaim.Value))
{
return 0;
}
return !string.IsNullOrEmpty(accountIdClaim.Value) && int.Parse(accountIdClaim.Value) > 0
? Convert.ToInt32(accountIdClaim.Value)
: 0;
}
/// <summary>
/// The get user claims.
/// </summary>
/// <param name="role">
/// The role model.
/// </param>
/// <returns>
/// The claims.
/// </returns>
private static IEnumerable<Claim> FetchClaims(RoleModel role) =>
new List<Claim>
{
new Claim("roleId", role.RoleId.ToString(), ClaimValueTypes.Integer),
new Claim(JwtClaimTypes.Role, role.RoleName)
};
}
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>API Documentation | Careaxes</title>
<meta content="Careaxes" name="description">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="application-name" content="Careaxes REST API" />
<link rel="shortcut icon" href="../assets/images/favicon.png">
<link type="text/css" href="../assets/fonts/style.css" rel="stylesheet">
<link type="text/css" href="../assets/css/bootstrap.min.css" rel="stylesheet">
<link type="text/css" href="../assets/css/style.css" rel="stylesheet">
<link type="text/css" href="../assets/css/custom.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="./swagger-ui.css">
%(HeadContent)
</head>
<body>
<div id="header-holder" class="inner-header hosting-page">
<div class="bg-animation"></div>
<nav id="nav" class="navbar navbar-default">
<div class="container-fluid">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="navbar-header">
<button aria-expanded="false" type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="logo-holder" href="javascript:;" onclick="onGoToHome();">
<div class="logo"></div>
</a>
</div>
<div style="height: 1px;" role="main" aria-expanded="false" class="navbar-collapse collapse" id="bs">
<ul class="nav navbar-nav navbar-right">
<li><a href="javascript:;" onclick="onGoToHome();">Home</a></li>
<li class="active"><a href="javascript:;">API Documentation</a></li>
<li><a href="javascript:;" onclick="onGoToSwagger();">Swagger Document</a></li>
<li><a href="javascript:;" onclick="onGoToIdentityServer();">Identity Server Document</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
</nav>
<div id="page-head" class="container-fluid">
<div class="container">
<div class="row">
<div class="col-md-12 text-center">
<div class="page-title">API Documentation</div>
<div id="page-icon">
<div class="pricing-icon">
<img src="../assets/images/service-icon1.svg" alt="Service 1">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="container-fluid swagger-ui-container">
<div class="container">
<div id="swagger-ui"></div>
</div>
</div>
<div id="footer" class="container-fluid">
<div class="container">
<div class="row">
<div class="col-lg-6">
<p>
@Copyright <span id="spYear"></span> - All rights reserved.
</p>
</div>
<div class="col-lg-6" align="right">
<a href="javascript:;">Terms</a>
<a href="javascript:;">Privacy</a>
<a href="javascript:;">Policy</a>
<a href="javascript:document.body.scrollTop = 0;document.documentElement.scrollTop = 0;">Go to Top</a>
</div>
</div>
</div>
</div>
<!-- Workaround for https://github.com/swagger-api/swagger-editor/issues/1371 -->
<script>
if (window.navigator.userAgent.indexOf("Edge") > -1) {
console.log("Removing native Edge fetch in favor of swagger-ui's polyfill")
window.fetch = undefined;
}
</script>
<script type="text/javascript" src="../assets/js/jquery.min.js"></script>
<script type="text/javascript" src="../assets/js/bootstrap.min.js"></script>
<script type="text/javascript" src="../assets/js/swagger.js"></script>
<script type="text/javascript" src="./swagger-ui-bundle.js"></script>
<script type="text/javascript" src="./swagger-ui-standalone-preset.js"></script>
<script type="text/javascript">
$(function () {
window.$("#spYear").text(new Date().getFullYear());
});
window.onload = function () {
const configObject = JSON.parse('%(ConfigObject)');
const oauthConfigObject = JSON.parse('%(OAuthConfigObject)');
// Apply mandatory parameters
configObject.dom_id = "#swagger-ui";
configObject.presets = [SwaggerUIBundle.presets.apis, SwaggerUIStandalonePreset];
configObject.layout = "StandaloneLayout";
// Build a system
const CaseInsensitiveFilterPlugin = function (system) {
return {
fn: {
opsFilter: (taggedOps, phrase) => taggedOps.filter((tagObj, tag) => {
return tag.toLowerCase().indexOf(phrase.toLowerCase()) !== -1
})
}
}
};
configObject.plugins = [CaseInsensitiveFilterPlugin];
// If oauth2RedirectUrl isn't specified, use the built-in default
if (!configObject.hasOwnProperty("oauth2RedirectUrl"))
configObject.oauth2RedirectUrl =
window.location.href.replace("index.html", "oauth2-redirect.html").split('#')[0];
// Begin Swagger UI call region
const ui = SwaggerUIBundle(configObject);
ui.initOAuth(oauthConfigObject);
window.ui = ui;
}
</script>
</body>
</html>
\ No newline at end of file
This diff is collapsed.
namespace Hims.Api.Validators
{
using System;
using System.Threading.Tasks;
using Domain.Services;
using IdentityServer4.Models;
using IdentityServer4.Validation;
using Shared.Library;
/// <inheritdoc />
public class ResourceOwnerPasswordValidator : IResourceOwnerPasswordValidator
{
/// <summary>
/// The account services.
/// </summary>
private readonly IAccountService accountServices;
/// <inheritdoc cref="accountServices" />
public ResourceOwnerPasswordValidator(IAccountService accountServices) => this.accountServices = accountServices;
/// <inheritdoc />
public async Task ValidateAsync(ResourceOwnerPasswordValidationContext context)
{
try
{
if (context.UserName == context.Password)
{
var accountId = context.UserName.Replace("@@", string.Empty);
context.Result = new GrantValidationResult(accountId, "custom");
}
else
{
//var values = context.UserName.Split("!!");
//context.UserName = values[0];
//var accountTypes = values[1];
var (accountStatus, accountId) = await this.accountServices.ValidateAsync(context.UserName, context.Password);
if (accountStatus != UserAccountStatus.Success)
{
context.Result = new GrantValidationResult(TokenRequestErrors.InvalidGrant, accountStatus.ToString());
return;
}
context.Result = new GrantValidationResult(accountId.ToString(), "custom");
}
}
catch
{
context.Result = new GrantValidationResult(TokenRequestErrors.InvalidRequest, UserAccountStatus.ServerError.ToString());
}
}
}
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
@{
Layout = "_Layout";
ViewBag.Title = "Server Error";
}
<h1 class="error-title text-danger">500 Internal Server Error</h1>
<h5 class="error-subtitle">Oops! There was an error, please try again later.</h5>
<p class="error-text">The server encountered an internal server error and was unable to complete your request.</p>
\ No newline at end of file
@{
Layout = "_Layout";
ViewBag.Title = "Expired";
}
<h1 class="error-title text-danger">Page Expired</h1>
<h5 class="error-subtitle">Oops! The page you were looking for has been expired.</h5>
<p class="error-text">You may have mistyped the address or the page may have expired. Try request for new one.</p>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment