Commit 8bf3ca87 authored by Sandeep Sagar Panjala's avatar Sandeep Sagar Panjala

initial commit

parent 73cf0682
namespace Hims.Api.Extensions
{
using System.Text.Json;
using System.Text.Json.Serialization;
using AutoMapper;
using Filters;
using Infrastructure.Helpers.Middleware;
using Infrastructure.Repositories.Middleware;
using Infrastructure.Services.Middleware;
using Microsoft.AspNetCore.Http.Features;
using Microsoft.Extensions.DependencyInjection;
using Profiles;
using Senders;
/// <summary>
/// The service collection extensions.
/// </summary>
public static class ServiceCollectionExtensions
{
/// <summary>
/// The register services.
/// </summary>
/// <param name="services">
/// The services.
/// </param>
/// <returns>
/// The <see cref="IServiceCollection"/>.
/// </returns>
public static IServiceCollection RegisterServices(this IServiceCollection services)
{
services.AddCors(options =>
{
options.AddPolicy(
"CorsPolicy",
builder => builder.AllowAnyMethod()
.AllowAnyHeader()
.AllowCredentials().SetIsOriginAllowed(origin => true));
});
services.AddOptions();
services.RegisterHelpers();
services.RegisterRepositories();
services.RegisterBusinessServices();
services.AddTransient<ISMSSender, SMSSender>();
services.AddTransient<IEmailSender, EmailSender>();
services.AddTransient<IWhatsAppSMSSender, WhatsAppSMSSender>();
var mappingConfig = new MapperConfiguration(mc =>
{
mc.AddProfile(new MappingProfile());
});
var mapper = mappingConfig.CreateMapper();
services.AddSingleton(mapper);
services.AddControllersWithViews(config =>
{
config.Filters.Add(typeof(ExceptionFilter));
config.RespectBrowserAcceptHeader = false;
config.ReturnHttpNotAcceptable = true;
})
.AddJsonOptions(a =>
{
a.JsonSerializerOptions.PropertyNamingPolicy = JsonNamingPolicy.CamelCase;
a.JsonSerializerOptions.Converters.Add(new JsonStringEnumConverter());
});
services.Configure<FormOptions>(
x =>
{
x.ValueLengthLimit = int.MaxValue;
x.MultipartBodyLengthLimit = int.MaxValue;
});
services.AddAntiforgery(options => options.SuppressXFrameOptionsHeader = true);
services.AddAntiforgery(options => options.HeaderName = "X-XSRF-TOKEN");
services.AddSignalR();
return services;
}
}
}
\ No newline at end of file
namespace Hims.Api.Filters
{
using System.Linq;
using Microsoft.AspNetCore.Authorization;
using Microsoft.OpenApi.Models;
using Swashbuckle.AspNetCore.SwaggerGen;
/// <inheritdoc />
public class AppendAuthorizeToSummaryOperationFilter : IOperationFilter
{
/// <summary>
/// The filter.
/// </summary>
private readonly AppendAuthorizeToSummaryOperationFilter<AuthorizeAttribute> filter;
/// <summary>
/// Initializes a new instance of the <see cref="AppendAuthorizeToSummaryOperationFilter"/> class.
/// </summary>
public AppendAuthorizeToSummaryOperationFilter()
{
var policySelector = new PolicySelectorWithLabel<AuthorizeAttribute>
{
Label = "Policies",
Selector = authAttributes =>
authAttributes
.Where(a => !string.IsNullOrEmpty(a.Policy))
.Select(a => a.Policy)
};
var rolesSelector = new PolicySelectorWithLabel<AuthorizeAttribute>
{
Label = "Roles",
Selector = authAttributes =>
authAttributes
.Where(a => !string.IsNullOrEmpty(a.Roles))
.Select(a => a.Roles)
};
this.filter = new AppendAuthorizeToSummaryOperationFilter<AuthorizeAttribute>(new[] { policySelector, rolesSelector }.AsEnumerable());
}
/// <inheritdoc />
public void Apply(OpenApiOperation operation, OperationFilterContext context)
{
this.filter.Apply(operation, context);
}
}
}
namespace Hims.Api.Filters
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.OpenApi.Models;
using Swashbuckle.AspNetCore.SwaggerGen;
/// <inheritdoc />
public class AppendAuthorizeToSummaryOperationFilter<T> : IOperationFilter where T : Attribute
{
/// <summary>
/// The policy selectors.
/// </summary>
private readonly IEnumerable<PolicySelectorWithLabel<T>> policySelectors;
/// <summary>
/// Initializes a new instance of the <see cref="AppendAuthorizeToSummaryOperationFilter{T}"/> class.
/// </summary>
/// <param name="policySelectors">
/// The policy selectors.
/// </param>
public AppendAuthorizeToSummaryOperationFilter(IEnumerable<PolicySelectorWithLabel<T>> policySelectors) => this.policySelectors = policySelectors;
/// <inheritdoc />
public void Apply(OpenApiOperation operation, OperationFilterContext context)
{
var authorizeAttributes = context.MethodInfo.DeclaringType?.GetCustomAttributes(true)
.Union(context.MethodInfo.GetCustomAttributes(true))
.OfType<T>()
.ToList();
if (authorizeAttributes != null && authorizeAttributes.Any() && this.policySelectors.Any())
{
var authorizationDescription = new StringBuilder(string.Empty);
foreach (var policySelector in this.policySelectors)
{
AppendPolicies(authorizeAttributes, authorizationDescription, policySelector);
}
operation.Summary += authorizationDescription.ToString().TrimEnd(';');
}
}
/// <summary>
/// The append policies.
/// </summary>
/// <param name="authorizeAttributes">
/// The authorize attributes.
/// </param>
/// <param name="authorizationDescription">
/// The authorization description.
/// </param>
/// <param name="policySelector">
/// The policy selector.
/// </param>
private static void AppendPolicies(IEnumerable<T> authorizeAttributes, StringBuilder authorizationDescription, PolicySelectorWithLabel<T> policySelector)
{
var policies = policySelector.Selector(authorizeAttributes).OrderBy(policy => policy).ToList();
if (policies.Any())
{
authorizationDescription.Append($" {policySelector.Label}: {string.Join(", ", policies)};");
}
}
}
}
namespace Hims.Api.Filters
{
using System.Collections.Generic;
using System.Linq;
using Microsoft.AspNetCore.Authorization;
using Microsoft.OpenApi.Models;
using Swashbuckle.AspNetCore.SwaggerGen;
/// <inheritdoc />
public class SecurityRequirementsOperationFilter : IOperationFilter
{
/// <inheritdoc />
public void Apply(OpenApiOperation operation, OperationFilterContext context)
{
var authAttributes = context.MethodInfo.DeclaringType?.GetCustomAttributes(true)
.Union(context.MethodInfo.GetCustomAttributes(true)).OfType<AuthorizeAttribute>();
if (authAttributes != null && authAttributes.Any())
{
operation.Responses.Add("401", new OpenApiResponse { Description = "Unauthorized" });
operation.Responses.Add("403", new OpenApiResponse { Description = "Forbidden" });
operation.Security = new List<OpenApiSecurityRequirement>
{
new OpenApiSecurityRequirement
{
{
new OpenApiSecurityScheme
{
Reference = new OpenApiReference { Id = "Bearer", Type = ReferenceType.SecurityScheme },
UnresolvedReference = true
},
new List<string>()
}
}
};
}
}
}
}
\ No newline at end of file
namespace Hims.Api.Filters
{
using System;
using System.Net;
using System.Collections.Generic;
using Microsoft.AspNetCore.Mvc.Filters;
using Newtonsoft.Json;
using Microsoft.AspNetCore.Http;
using Hims.Domain.Services;
using Hims.Domain.Configurations;
using Hims.Api.Senders;
using Hims.Shared.EntityModels;
/// <inheritdoc />
/// <summary>
/// The exception filter.
/// </summary>
public class ExceptionFilter : IExceptionFilter
{
/// <summary>
/// The exception log services.
/// </summary>
private readonly IExceptionLogService exceptionLogServices;
/// <summary>
/// The email sender.
/// </summary>
private readonly IEmailSender emailSender;
/// <summary>
/// The running environment.
/// </summary>
private readonly IRunningEnvironment runningEnvironment;
/// <summary>
/// The exception filter.
/// </summary>
/// <param name="exceptionLogServices">
/// The exception log services.
/// </param>
/// <param name="emailSender">
/// The email sender.
/// </param>
/// <param>
/// <param name="runningEnvironment">
/// The running environment.
/// </param>
public ExceptionFilter(IExceptionLogService exceptionLogServices, IEmailSender emailSender, IRunningEnvironment runningEnvironment)
{
this.exceptionLogServices = exceptionLogServices;
this.emailSender = emailSender;
this.runningEnvironment = runningEnvironment;
}
/// <inheritdoc />
public async void OnException(ExceptionContext context)
{
var logFrom = context.ActionDescriptor.DisplayName;
var logRoute = context.ActionDescriptor.AttributeRouteInfo.Template;
var errorMessage = context.Exception.InnerException != null ? context.Exception.InnerException.Message : context.Exception.Message;
var errorDescription = JsonConvert.SerializeObject(context.Exception.StackTrace);
this.exceptionLogServices.Invoke(logFrom, logRoute, errorMessage, errorDescription);
const HttpStatusCode status = HttpStatusCode.InternalServerError;
context.ExceptionHandled = true;
var response = context.HttpContext.Response;
response.StatusCode = (int)status;
response.ContentType = "application/json";
await response.WriteAsync(context.Exception.StackTrace);
if (this.runningEnvironment.CurrentEnvironment != "Local")
{
var userList = new List<AccountModel> { };
if (this.runningEnvironment.CurrentEnvironment == "Production")
{
userList.Add(new AccountModel { Email = "puday@sujainfo.net", FullName = "Uday" });
userList.Add(new AccountModel { Email = "vikas@docassistant.net", FullName = "Vikas Kuchimanchi" });
}
else
{
userList.Add(new AccountModel { Email = "kjaishree@sujainfo.net", FullName = "Jaishree" });
userList.Add(new AccountModel { Email = "psravani@sujainfo.net", FullName = "Sravani" });
}
var errorMessageWithEnvironment = $@" Exception occur in {this.runningEnvironment.CurrentEnvironment} : {Environment.NewLine} {errorMessage}";
await this.emailSender.SendExceptionLogEmailToSupport(userList, logFrom, errorMessageWithEnvironment);
}
}
}
}
namespace Hims.Api.Filters
{
using System;
using System.Collections.Generic;
/// <summary>
/// Policy Selector With Label
/// </summary>
/// <typeparam name="T">The entity</typeparam>
public class PolicySelectorWithLabel<T> where T : Attribute
{
/// <summary>
/// Gets or sets the selector.
/// </summary>
public Func<IEnumerable<T>, IEnumerable<string>> Selector { get; set; }
/// <summary>
/// Gets or sets the label.
/// </summary>
public string Label { get; set; }
}
}
using Dapper;
using Hangfire;
using Hims.Api.Senders;
using Hims.Domain.Helpers;
using Hims.Domain.Repositories.UnitOfWork;
using Hims.Domain.Services;
using Hims.Shared.EntityModels;
using Hims.Shared.Library.Enums;
using Hims.Shared.UserModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Hims.Api.Helper
{
public class AppointmentHelper
{
public static AppointmentHelper appointmentHelper;
/// <summary>
/// The auditlog services.
/// </summary>
private readonly IAuditLogService auditLogServices;
/// <summary>
/// The appointment services.
/// </summary>
private readonly IAppointmentService appointmentsServices;
private readonly ISettingService settingService;
/// <summary>
/// The SMS sender.
/// </summary>
private readonly ISMSSender smsSender;
/// <summary>
/// The push notification helper.
/// </summary>
private readonly IPushNotificationHelper pushNotificationHelper;
/// <summary>
/// The email sender.
/// </summary>
private readonly IEmailSender emailSender;
/// <summary>
/// The account session services.
/// </summary>
private readonly IAccountSessionService accountSessionServices;
/// <summary>
/// The whats application SMS sender
/// </summary>
private readonly IWhatsAppSMSSender whatsAppSMSSender;
/// <summary>
/// The country services.
/// </summary>
private readonly IUnitOfWork unitOfWork;
public AppointmentHelper(IAuditLogService auditLogServices,
IAppointmentService appointmentsServices,
ISettingService settingService,
IPushNotificationHelper pushNotificationHelper,
ISMSSender smsSender,
IEmailSender emailSender,
IAccountSessionService accountSessionServices,
IWhatsAppSMSSender whatsAppSMSSender,
IUnitOfWork unitOfWork
)
{
this.auditLogServices = auditLogServices;
this.appointmentsServices = appointmentsServices;
this.settingService = settingService;
this.pushNotificationHelper = pushNotificationHelper;
this.accountSessionServices = accountSessionServices;
this.smsSender = smsSender;
this.emailSender = emailSender;
this.whatsAppSMSSender = whatsAppSMSSender;
this.unitOfWork = unitOfWork;
}
public async Task<bool> CancelAppointmentAsync(AppointmentModel model, string type, string transaction, string transactionId, int? salucroStatusCode, string salucroTransactionId, int? modifiedBy, string reason)
{
try
{
var res = await this.appointmentsServices.CancelAppointmentAsync(model, type, transaction, transactionId, salucroStatusCode, salucroTransactionId, modifiedBy, reason);
if (res == 0)
{
return false;
}
var appointmentHangfireMapModel = new AppointmentHangfireMapModel()
{
AppointmentId = model.AppointmentId,
AppointmentDate = model.AppointmentDate,
Status = "C",
};
await this.appointmentsServices.AddAppointmentHangfireAsync(appointmentHangfireMapModel);
if (model != null)
{
var timespan = new TimeSpan(model.AppointmentTime.Hours, model.AppointmentTime.Minutes, model.AppointmentTime.Seconds);
var time = DateTime.Today.Add(timespan);
var displayTime = time.ToString("hh:mm tt");
var messageType = "has been cancelled";
BackgroundJob.Enqueue(() => this.AppointmentActions(model, "Cancel", true));
}
var auditLogModel = new AuditLogModel
{
AccountId = model.ModifiedBy,
LogTypeId = (int)LogTypes.Appointments,
LogFrom = model.LogFrom,
LogDate = DateTime.UtcNow,
LogDescription = $@"Patient: <b>{model.PatientName}</b>, Appointment on <b>{model?.AppointmentDate.ToString("MM/dd/yyyy")} {model?.AppointmentDate.Add(model.AppointmentTime).ToString("hh:mm tt")}</b>
<br> has been <b>Cancelled</b> with Doctor: <b>Dr. {model.ProviderName}</b>.",
LocationId = model.LocationId
};
await this.auditLogServices.LogAsync(auditLogModel);
return true;
}
catch (Exception ex)
{
return false;
}
}
/// <summary> The appointment actions.</summary>
/// <param name="appointment"> The appointment.</param>
/// <param name="type"> The type.</param>
/// <param name="toProvider"></param>
/// <returns>The <see cref="Task"/>.</returns>
public async Task<bool> AppointmentActions(AppointmentModel appointment, string type, bool toProvider = true)
{
if (appointment != null)
{
TimeSpan timespan = new TimeSpan(
appointment.AppointmentTime.Hours,
appointment.AppointmentTime.Minutes,
appointment.AppointmentTime.Seconds);
DateTime time = DateTime.Today.Add(timespan);
string displayTime = time.ToString("hh:mm tt");
var prevDisplayTime = string.Empty;
if (type == "ReSchedule" && appointment.AppointmentPreviousDate != null && appointment.AppointmentPreviousTime != null)
{
TimeSpan prevTimespan = new TimeSpan(
appointment.AppointmentPreviousTime?.Hours ?? 0,
appointment.AppointmentPreviousTime?.Minutes ?? 0,
appointment.AppointmentPreviousTime?.Seconds ?? 0);
DateTime prevTime = DateTime.Today.Add(prevTimespan);
prevDisplayTime = prevTime.ToString("hh:mm tt");
}
string messageType = null;
switch (type)
{
case "Book":
messageType = "booked";
break;
case "ReSchedule":
messageType = "has been rescheduled successfully";
break;
case "Cancel":
messageType = "has been cancelled";
break;
case "Confirm":
messageType = "confirmed";
break;
case "Delay":
messageType = "delayed";
break;
}
var patientMessage = (type == "Confirm"
? ("Your appointment with DR. " + appointment.ProviderName.ToUpper() + " will be started soon")
: type == "Delay"
? ("Your appointment with DR. " + appointment.ProviderName.ToUpper() + " has been delayed by " + appointment.Delay)
: (appointment.PatientName + " patient " + messageType + " an Appointment with you on Date:" + appointment.AppointmentDate.ToString("dd MMMM yyyy") + " Time: " + displayTime + " "));
var providerMessage = (type == "Confirm"
? ("Your appointment with DR. " + appointment.ProviderName.ToUpper() + " will be started soon")
: type == "Delay"
? ("Your appointment with DR. " + appointment.ProviderName.ToUpper() + " has been delayed by " + appointment.Delay)
: ("Appointment " + messageType + " with DR. " + appointment.ProviderName.ToUpper() + " on Date:" + appointment.AppointmentDate.ToString("dd MMMM yyyy") + " Time: " + displayTime + " "));
bool isSMSSettingEnabled = await this.settingService.CheckSmsEnabled();
if (isSMSSettingEnabled == false)
{
// SMS to Doctor and Patient
await this.smsSender.SendAppointmentMessageAsync(appointment, messageType, displayTime);
// end
}
var WhatsAppMessageSetting = await this.settingService.FetchAsync("WhatsAppMsgService", null, null);
var WhatsAppMessage = WhatsAppMessageSetting.ToList();
if ((bool)WhatsAppMessage[0].Active)
{
var LocationQuery = $@"select l.""LocationId"",l.""Name"",l.""PracticeId"",p.""FullName"" as ""PracticeName"" from ""Location"" l
join ""Practice"" p on p.""PracticeId"" = l.""PracticeId"" where ""LocationId"" = {appointment.LocationId} limit 1";
var Location = await this.unitOfWork.Current.QueryFirstOrDefaultAsync<LocationModel>(LocationQuery);
bool ret = await this.whatsAppSMSSender.SendWhatsAppMessageAsync(appointment, displayTime, messageType, Location.Name);
}
// Sending push notifications to Doctor and Patient
if (appointment.EnableMobileNotifications == true && toProvider)
{
var accountSessionProviderModel = await this.accountSessionServices.FetchDeviceTokenAsync(appointment.ProviderId, Roles.Provider);
var sessionProviderModel = accountSessionProviderModel as AccountSessionModel[] ?? accountSessionProviderModel.ToArray();
if (sessionProviderModel.Any())
{
var deviceTokenForProviderAndroid = sessionProviderModel.Where(d => d.DeviceType == 2).Select(s => s.DeviceToken).ToList();
var deviceTokenForProviderIOS = sessionProviderModel.Where(d => d.DeviceType == 3).Select(s => s.DeviceToken).ToList();
if (deviceTokenForProviderAndroid.Any())
{
await this.pushNotificationHelper.SendAltAsync(
"Hims",
patientMessage,
(type == "Confirm" ? "Confirmed" : type == "Delay" ? "Delayed" : "Appointment"),
deviceTokenForProviderAndroid,
new List<string>(),
appointment.ProviderName,
(appointment.AppointmentDate.ToString("MM/dd/yyyy") + " " + displayTime),
(appointment.AppointmentPreviousDate != null ? (appointment.AppointmentPreviousDate?.ToString("MM/dd/yyyy") + " " + prevDisplayTime) : null));
}
if (deviceTokenForProviderIOS.Any())
{
await this.pushNotificationHelper.SendAltAsync(
"Hims",
patientMessage,
(type == "Confirm" ? "Confirmed" : type == "Delay" ? "Delayed" : "Appointment"),
new List<string>(),
deviceTokenForProviderIOS,
appointment.ProviderName,
(appointment.AppointmentDate.ToString("MM/dd/yyyy") + " " + displayTime),
(appointment.AppointmentPreviousDate != null ? (appointment.AppointmentPreviousDate?.ToString("MM/dd/yyyy") + " " + prevDisplayTime) : null));
}
}
}
var accountSessionPatientModel = await this.accountSessionServices.FetchDeviceTokenAsync(appointment.PatientId, Roles.Patient);
var accountSessionModels = accountSessionPatientModel as AccountSessionModel[] ?? accountSessionPatientModel.ToArray();
if (accountSessionModels.Any())
{
var deviceTokenForProviderAndroid = accountSessionModels.Where(d => d.DeviceType == 2).Select(s => s.DeviceToken).ToList();
var deviceTokenForProviderIOS = accountSessionModels.Where(d => d.DeviceType == 3).Select(s => s.DeviceToken).ToList();
if (appointment.ProviderName != null)
{
if (deviceTokenForProviderAndroid.Any())
{
await this.pushNotificationHelper.SendAltAsync(
"Hims",
providerMessage,
(type == "Confirm" ? "Confirmed" : type == "Delay" ? "Delayed" : "Appointment"),
deviceTokenForProviderAndroid,
new List<string>(),
appointment.ProviderName,
(appointment.AppointmentDate.ToString("MM/dd/yyyy") + " " + displayTime),
(appointment.AppointmentPreviousDate != null ? (appointment.AppointmentPreviousDate?.ToString("MM/dd/yyyy") + " " + prevDisplayTime) : null));
}
if (deviceTokenForProviderIOS.Any())
{
await this.pushNotificationHelper.SendAltAsync(
"Hims",
providerMessage,
(type == "Confirm" ? "Confirmed" : type == "Delay" ? "Delayed" : "Appointment"),
new List<string>(),
deviceTokenForProviderIOS,
appointment.ProviderName,
(appointment.AppointmentDate.ToString("MM/dd/yyyy") + " " + displayTime),
(appointment.AppointmentPreviousDate != null ? (appointment.AppointmentPreviousDate?.ToString("MM/dd/yyyy") + " " + prevDisplayTime) : null));
}
}
}
// end
bool isEmailSettingEnabled = await this.settingService.CheckEmailEnabled();
if (isEmailSettingEnabled == false)
{
if (!string.IsNullOrEmpty(appointment.PatientEmail))
{
await this.emailSender.SendBookAppointmentMailAsync(
appointment.PatientEmail,
appointment.PatientName,
"Patient",
appointment.ProviderName,
appointment.AppointmentDate.ToString("dd MMMM yyyy") + ", " + displayTime,
messageType);
}
if (!string.IsNullOrEmpty(appointment.ProviderEmail) && appointment.EnableEmailAlerts == true)
{
await this.emailSender.SendBookAppointmentMailAsync(
appointment.ProviderEmail,
appointment.PatientName,
"Doctor",
appointment.ProviderName,
appointment.AppointmentDate.ToString("dd MMMM yyyy") + ", " + displayTime,
messageType);
}
}
}
return true;
}
public static AppointmentHelper GetInstance(IAuditLogService auditLogServices,
IAppointmentService appointmentsServices,
ISettingService settingService,
IPushNotificationHelper pushNotificationHelper,
ISMSSender smsSender,
IEmailSender emailSender,
IAccountSessionService accountSessionServices,
IWhatsAppSMSSender whatsAppSMSSender,
IUnitOfWork unitOfWork)
{
return new AppointmentHelper(auditLogServices, appointmentsServices, settingService, pushNotificationHelper, smsSender, emailSender, accountSessionServices,whatsAppSMSSender,unitOfWork);
}
}
}
namespace Hims.Api.Helper
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Hims.Domain.Helpers;
using Hims.Domain.Services;
using Hims.Shared.EntityModels;
using Hims.Shared.Library.Enums;
/// <summary>
/// The notification helper.
/// </summary>
public static class NotificationHelper
{
/// <summary>
/// The notification helper.
/// </summary>
/// <param name="providerOrPatientId">
/// The provider Or Patient Id.
/// </param>
/// <param name="role">
/// The role.
/// </param>
/// <param name="intimate">
/// The intimate.
/// </param>
/// <param name="id">
/// The id.
/// </param>
/// <param name="accountSessionServices">
/// The account Session Services.
/// </param>
/// <param name="pushNotificationHelper">
/// The push Notification Helper.
/// </param>
/// <returns>
/// The <see cref="Task"/>.
/// </returns>
public static async Task<bool> Notification(
int providerOrPatientId,
Roles role,
NotificationIntimate intimate,
string id,
IAccountSessionService accountSessionServices,
IPushNotificationHelper pushNotificationHelper)
{
var message = string.Empty;
var type = string.Empty;
switch (intimate)
{
case NotificationIntimate.PrescriptionAdded:
message = "Doctor has added prescription";
type = "UpdateOnPrescription";
break;
case NotificationIntimate.PrescriptionUpdated:
message = "Doctor has updated prescription";
type = "UpdateOnPrescription";
break;
case NotificationIntimate.FullTranscriptionAdded:
message = "Doctor has added full transcription";
type = "UpdateOnFullTranscription";
break;
case NotificationIntimate.FullTranscriptionUpdated:
message = "Doctor has updated full transcription";
type = "UpdateOnFullTranscription";
break;
case NotificationIntimate.DoctorUploadedDocuments:
message = "Doctor has uploaded document(s)";
type = "UpdateOnUploadedDocuments";
break;
case NotificationIntimate.DoctorEditedDocuments:
message = "Doctor has edited document(s)";
type = "UpdateOnEditedDocuments";
break;
case NotificationIntimate.PatientUploadedDocuments:
message = "Patient has uploaded document(s)";
type = "UpdateOnUploadedDocuments";
break;
case NotificationIntimate.PatientEditedDocuments:
message = "Patient has edited document(s)";
type = "UpdateOnEditedDocuments";
break;
}
if (role == Roles.Provider)
{
var accountSessionProviderModel = await accountSessionServices.FetchDeviceTokenAsync(providerOrPatientId, Roles.Provider);
var sessionProviderModel = accountSessionProviderModel as AccountSessionModel[] ?? accountSessionProviderModel.ToArray();
if (sessionProviderModel.Any())
{
var deviceTokenForProviderAndroid = sessionProviderModel.Where(d => d.DeviceType == 2).Select(s => s.DeviceToken).ToList();
var deviceTokenForProviderIOS = sessionProviderModel.Where(d => d.DeviceType == 3).Select(s => s.DeviceToken).ToList();
if (deviceTokenForProviderAndroid != null)
{
await pushNotificationHelper.IntimateAsync(
"Hims",
message,
type,
deviceTokenForProviderAndroid,
new List<string>(),
id);
}
if (deviceTokenForProviderIOS != null)
{
await pushNotificationHelper.IntimateAsync(
"Hims",
message,
type,
new List<string>(),
deviceTokenForProviderIOS,
id);
}
}
}
if (role == Roles.Patient)
{
var accountSessionPatientModel = await accountSessionServices.FetchDeviceTokenAsync(providerOrPatientId, Roles.Patient);
var accountSessionModels = accountSessionPatientModel as AccountSessionModel[] ?? accountSessionPatientModel.ToArray();
if (accountSessionModels.Any())
{
var deviceTokenForProviderAndroid = accountSessionModels.Where(d => d.DeviceType == 2).Select(s => s.DeviceToken).ToList();
var deviceTokenForProviderIOS = accountSessionModels.Where(d => d.DeviceType == 3).Select(s => s.DeviceToken).ToList();
if (deviceTokenForProviderAndroid != null)
{
await pushNotificationHelper.IntimateAsync(
"Hims",
message,
type,
deviceTokenForProviderAndroid,
new List<string>(),
id);
}
if (deviceTokenForProviderIOS != null)
{
await pushNotificationHelper.IntimateAsync(
"Hims",
message,
type,
new List<string>(),
deviceTokenForProviderIOS,
id);
}
}
}
return true;
}
}
}
namespace Hims.Api.Helper
{
using System;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using Hims.Domain.Services;
/// <summary>
/// The payment helper.
/// </summary>
public static class PaymentHelper
{
/// <summary>
/// The generate check sum hash.
/// </summary>
/// <param name="text">
/// The text.
/// </param>
/// <returns>
/// The <see cref="string"/>.
/// </returns>
public static string GenerateCheckSumHash(string text)
{
var message = Encoding.UTF8.GetBytes(text);
var hashString = new SHA256Managed();
var hashValue = hashString.ComputeHash(message);
return hashValue.Aggregate(string.Empty, (current, x) => current + $"{x:x2}");
}
/// <summary>
/// The generate hash.
/// </summary>
/// <param name="text">
/// The text.
/// </param>
/// <returns>
/// The <see cref="string"/>.
/// </returns>
public static string GenerateHash(string text)
{
var message = Encoding.UTF8.GetBytes(text);
var hashString = new SHA512Managed();
var hashValue = hashString.ComputeHash(message);
return hashValue.Aggregate(string.Empty, (current, x) => current + $"{x:x2}");
}
///// <summary>
///// The generate transaction id.
///// </summary>
///// <returns>
///// The <see cref="string"/>.
///// </returns>
//public static string GenerateTransactionId()
//{
// var rnd = new Random();
// var strHash = GenerateHash(rnd.ToString() + DateTime.UtcNow);
// return strHash.Substring(0, 20);
//}
/// <summary>
/// The generate transaction id.
/// </summary>
/// <returns>
/// The <see cref="string"/>.
/// </returns>
public static string GetVouherNumber(IAppointmentTransactionService appointmentTransactionsServices)
{
// var previous = unitOfWork.Current.QuerySingleOrDefaultAsync<string>($@"select ""VoucherNumber"" from ""AppointmentTransaction"" order by ""AppointmentTransactionId"" desc limit 1");
var previousVoucherNo = appointmentTransactionsServices.GetPreviousVoucherNumberAsync();
if (previousVoucherNo == null)
{
return $@"{DateTime.Now.ToString("dd/MM/yy")}/10001";
}
else
{
var preVoucherno = previousVoucherNo.ToString(); // converting in string
var prevoucherdate = preVoucherno.Substring(0, Math.Min(preVoucherno.Length, 8)); //DateTime in string
if (prevoucherdate != DateTime.Now.ToString("dd/MM/yy"))
{
return $@"{DateTime.Now.ToString("dd/MM/yy")}/10001"; // start seq for new date .
}
else
{
var presequenceNo = preVoucherno.Substring(preVoucherno.Length - 5); // increment seq for same date .
return $@"{DateTime.Now.ToString("dd/MM/yy")}/{Convert.ToInt64(presequenceNo) + 1}";
}
}
}
}
}
using Hims.Shared.UserModels.NurseShift;
using System;
namespace Hims.Api.Helper
{
public static class ProgressReportHelper
{
/// <summary>
/// Gets the current day identifier.
/// </summary>
/// <returns></returns>
public static int GetCurrentDayId()
{
var currentHour = DateTime.Now.Hour;
// 1 = Morning
// 11 = After Morning Before Afternoon
// 2 = Afternoon
// 12 = After Afternoon before Night
// 3 = Night
// 4 = After Night
var currentDayId = currentHour < 6
? 0
: currentHour >= 6 && currentHour <= 9
? 1
: currentHour > 9 && currentHour < 12
? 11
: currentHour >= 12 && currentHour <= 14
? 2
: currentHour > 14 && currentHour < 19
? 12
: currentHour >= 19 && currentHour <= 21
? 3
: 4;
return currentDayId;
}
/// <summary>
/// Gets the current day identifier.
/// </summary>
/// <returns></returns>
public static double GetCurrentDayIdAlt()
{
var currentHour = DateTime.Now.Hour;
// 1 = Morning
// 11 = After Morning Before Afternoon
// 2 = Afternoon
// 12 = After Afternoon before Night
// 3 = Night
// 4 = After Night
var currentDayId = currentHour < 6
? 0
: currentHour >= 6 && currentHour <= 9
? 1
: currentHour > 9 && currentHour < 12
? 1.1
: currentHour >= 12 && currentHour <= 14
? 2
: currentHour > 14 && currentHour < 19
? 2.1
: currentHour >= 19 && currentHour <= 21
? 3
: 4;
return currentDayId;
}
/// <summary>
/// Gets the default times.
/// </summary>
/// <returns></returns>
public static TimeModel GetDefaultTimes()
{
return new TimeModel
{
Morning = new TimeModelHelper
{
Hour = 8,
Minute = 0
},
Afternoon = new TimeModelHelper
{
Hour = 13,
Minute = 0
},
Night = new TimeModelHelper
{
Hour = 20,
Minute = 0
}
};
}
}
}
namespace Hims.Api.Hubs
{
using System.Threading.Tasks;
using Microsoft.AspNetCore.SignalR;
/// <summary>
/// The communication hub.
/// </summary>
public class CommunicationHub : Hub
{
/// <summary>
/// The communication.
/// </summary>
/// <param name="model">
/// The model.
/// </param>
/// <returns>
/// The <see cref="Task"/>.
/// </returns>
public async Task CommunicationGlobal(CommunicationMessage model)
{
await Clients.Others.SendAsync("CommunicationGlobal", model).ConfigureAwait(false);
}
/// <summary>
/// The send to group.
/// </summary>
/// <param name="model">
/// The model.
/// </param>
/// <returns>
/// The <see cref="Task"/>.
/// </returns>
public async Task CommunicationGroup(CommunicationMessageAlt model)
{
await Clients.OthersInGroup(model.GroupName).SendAsync("CommunicationGroup", model).ConfigureAwait(false);
}
/// <summary>
/// The subscribe individual communication.
/// </summary>
/// <param name="groupName">
/// The group name.
/// </param>
/// <returns>
/// The <see cref="Task"/>.
/// </returns>
public async Task SubscribeToGroup(string groupName)
{
await Groups.AddToGroupAsync(Context.ConnectionId, groupName).ConfigureAwait(false);
}
/// <summary>
/// The unsubscribe individual communication.
/// </summary>
/// <param name="groupName">
/// The group name.
/// </param>
/// <returns>
/// The <see cref="Task"/>.
/// </returns>
public async Task UnsubscribeToGroup(string groupName)
{
await Groups.RemoveFromGroupAsync(Context.ConnectionId, groupName).ConfigureAwait(false);
}
}
}
namespace Hims.Api.Hubs
{
using System;
/// <summary>
/// The communication type.
/// </summary>
public enum CommunicationType
{
/// <summary>
/// The call.
/// </summary>
Call = 1,
/// <summary>
/// The notify.
/// </summary>
Notify = 2,
/// <summary>
/// The reject.
/// </summary>
Reject = 3,
/// <summary>
/// The intimate alt one.
/// </summary>
CloseAll = 4,
/// <summary>
/// The intimate alt one.
/// </summary>
Join = 5,
/// <summary>
/// The intimate alt one.
/// </summary>
Close = 6,
/// <summary>
/// The appointment refresh.
/// </summary>
AppointmentRefresh = 7,
/// <summary>
/// The appointment add refresh.
/// </summary>
AppointmentAddRefresh = 8,
/// <summary>
/// The message refresh.
/// </summary>
MessageRefresh = 9,
/// <summary>
/// The cancel.
/// </summary>
Cancel = 10,
/// <summary>
/// The video initiate
/// </summary>
Initiate = 11,
/// <summary>
/// The external join
/// </summary>
ExternalJoin = 12
}
/// <summary>
/// The communication message.
/// </summary>
public class CommunicationMessage
{
/// <summary>
/// Gets or sets the type.
/// </summary>
public CommunicationType Type { get; set; }
/// <summary>
/// Gets or sets the unique id.
/// </summary>
public string UniqueId { get; set; }
/// <summary>
/// Gets or sets the user unique id.
/// </summary>
public string UserUniqueId { get; set; }
/// <summary>
/// Gets or sets the main eid.
/// </summary>
public string MainEid { get; set; }
/// <summary>
/// Gets or sets the main id.
/// </summary>
public int MainId { get; set; }
/// <summary>
/// Gets or sets the main id.
/// </summary>
public int AccountId { get; set; }
/// <summary>
/// Gets or sets the main id.
/// </summary>
public int CallerId { get; set; }
/// <summary>
/// Gets or sets the message.
/// </summary>
public string Message { get; set; }
/// <summary>
/// Gets or sets the content.
/// </summary>
public string Content { get; set; }
/// <summary>
/// Gets or sets the date.
/// </summary>
public DateTimeOffset? Date { get; set; }
/// <summary>
/// Gets or sets the is creating.
/// </summary>
public bool? IsCreating { get; set; }
/// <summary>
/// Gets or sets the is creating.
/// </summary>
public int TelemedicineId { get; set; }
public bool StartAudioOnly { get; internal set; }
public int RoleId { get; internal set; }
public int NotifyToId { get; internal set; }
public string ClientName { get; internal set; }
}
public class CommunicationMessageAlt
{
/// <summary>
/// Gets or sets the type.
/// </summary>
public int Type { get; set; }
/// <summary>
/// Gets or sets the group name.
/// </summary>
public string GroupName { get; set; }
public string? CubicleName { get; set; }
public string PatientName { get; set; }
public int TokenNumber { get; set; }
}
}
namespace Hims.Api.Listeners
{
using System;
using System.Diagnostics;
using System.IO;
using System.Threading;
using Microsoft.Extensions.Configuration;
/// <summary>
/// The daily trace listener.
/// </summary>
public sealed class DailyTraceListener : TraceListener
{
/// <summary>
/// Initializes a new instance of the <see cref="DailyTraceListener"/> class.
/// </summary>
/// <param name="configuration">
/// The configuration.
/// </param>
public DailyTraceListener(IConfiguration configuration) => this.LogFolder = configuration.GetValue<string>("Directories:ErrorLogs");
/// <summary>
/// Gets or sets a value indicating whether use UTC time.
/// </summary>
private bool UseUtcTime { get; set; }
/// <summary>
/// Gets or sets the log folder.
/// </summary>
private string LogFolder { get; set; }
/// <summary>
/// Gets or sets a value indicating whether disposed.
/// </summary>
private bool Disposed { get; set; }
/// <summary>
/// Gets or sets a value indicating whether has header.
/// </summary>
private bool HasHeader { get; set; }
/// <summary>
/// Gets or sets the current log file path.
/// </summary>
private string CurrentLogFilePath { get; set; }
/// <summary>
/// Gets or sets the current log date.
/// </summary>
private DateTime? CurrentLogDate { get; set; }
/// <summary>
/// Gets or sets the log file stream.
/// </summary>
private FileStream LogFileStream { get; set; }
/// <summary>
/// Gets or sets the log file writer.
/// </summary>
private StreamWriter LogFileWriter { get; set; }
/// <summary>
/// Gets or sets the log locker.
/// </summary>
private SemaphoreSlim LogLocker { get; set; } = new SemaphoreSlim(1, 1);
/// <summary>
/// The use UTC.
/// </summary>
/// <returns>
/// The <see cref="DailyTraceListener"/>.
/// </returns>
public DailyTraceListener UseUtc()
{
this.UseUtcTime = true;
return this;
}
/// <summary>
/// The use header.
/// </summary>
/// <returns>
/// The <see cref="DailyTraceListener"/>.
/// </returns>
public DailyTraceListener UseHeader()
{
this.HasHeader = true;
return this;
}
/// <summary>
/// The invoke.
/// </summary>
/// <param name="from">
/// The from.
/// </param>
/// <param name="route">
/// The route.
/// </param>
/// <param name="message">
/// The message.
/// </param>
/// <param name="description">
/// The description.
/// </param>
public void Invoke(string from, string route, string message, string description)
{
var time = this.FormatTime(this.GetCurrentTime());
this.WriteLine($"{time},{EscapeCsv(from)},{EscapeCsv(route)},{EscapeCsv(message)},{EscapeCsv(description)}");
}
/// <summary>
/// The write.
/// </summary>
/// <param name="message">
/// The message.
/// </param>
public override void Write(string message)
{
try
{
this.LogLocker.Wait();
this.CheckDisposed();
this.CheckFile();
this.LogFileWriter.Write(message);
this.LogFileWriter.Flush();
}
catch (Exception ex)
{
Trace.TraceError(ex.ToString());
}
finally
{
this.LogLocker.Release();
}
}
/// <summary>
/// The write line.
/// </summary>
/// <param name="message">
/// The message.
/// </param>
public override void WriteLine(string message)
{
this.Write(message + Environment.NewLine);
}
/// <summary>
/// The dispose.
/// </summary>
/// <param name="disposing">
/// The disposing.
/// </param>
protected override void Dispose(bool disposing)
{
this.Disposed = true;
try
{
this.LogFileWriter?.Dispose();
this.LogFileStream?.Dispose();
this.LogLocker.Dispose();
}
catch (Exception ex)
{
Trace.TraceError(ex.ToString());
}
base.Dispose(disposing);
}
/// <summary>
/// The escape CSV.
/// </summary>
/// <param name="input">
/// The input.
/// </param>
/// <returns>
/// The <see cref="string"/>.
/// </returns>
private static string EscapeCsv(string input)
{
for (var i = 0; i < input.Length; i++)
{
if (input[i] != ',' && input[i] != '\n')
{
continue;
}
input = input.Replace("\"", "\"\"");
return $"\"{input}\"";
}
return input;
}
/// <summary>
/// The write header.
/// </summary>
private void WriteHeader()
{
this.LogFileWriter.WriteLine("Time,From,Router,Message,Description");
}
/// <summary>
/// The format time.
/// </summary>
/// <param name="time">
/// The time.
/// </param>
/// <returns>
/// The <see cref="string"/>.
/// </returns>
private string FormatTime(DateTime time) => time.ToString("o");
/// <summary>
/// The get current time.
/// </summary>
/// <returns>
/// The <see cref="DateTime"/>.
/// </returns>
private DateTime GetCurrentTime() => this.UseUtcTime ? DateTime.UtcNow : DateTime.Now;
/// <summary>
/// The initialize log file.
/// </summary>
private void InitializeLogFile()
{
this.CheckDisposed();
try
{
this.LogFileWriter?.Dispose();
if (this.LogFileStream != null)
{
var logFileWriter = this.LogFileWriter;
logFileWriter?.Dispose();
}
}
catch (Exception ex)
{
Trace.TraceError(ex.ToString());
}
var currentTime = this.GetCurrentTime();
var fileName = $"{currentTime:yyyy-MM-dd}.log";
this.CurrentLogFilePath = Path.Combine(this.LogFolder, fileName);
// Ensure the folder is there
Directory.CreateDirectory(this.LogFolder);
// Create/Open log file
this.LogFileStream = new FileStream(this.CurrentLogFilePath, FileMode.Append);
this.LogFileWriter = new StreamWriter(this.LogFileStream);
// Write Header if needed
if (this.LogFileStream.Length == 0 && this.HasHeader)
{
this.WriteHeader();
}
}
/// <summary>
/// The check file.
/// </summary>
private void CheckFile()
{
this.CheckDisposed();
var currentTime = this.GetCurrentTime();
if (this.CurrentLogDate != null && currentTime.Date == this.CurrentLogDate)
{
return;
}
this.InitializeLogFile();
this.CurrentLogDate = currentTime.Date;
}
/// <summary>
/// The check disposed.
/// </summary>
private void CheckDisposed()
{
if (this.Disposed)
{
throw new InvalidOperationException("The Trace Listener is Disposed.");
}
}
}
}
namespace Hims.Api.Middleware
{
using IdentityModel;
using IdentityServer4.AccessTokenValidation;
using Infrastructure.Configurations;
using Microsoft.AspNetCore.Builder;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Services;
using Validators;
/// <summary>
/// The authentication middleware.
/// </summary>
public class AuthenticationMiddleware
{
/// <summary>
/// Configures the authorization.
/// </summary>
/// <param name="services">
/// The services.
/// </param>
/// <param name="configuration">
/// The configuration.
/// </param>
public static void ConfigureServices(IServiceCollection services, IConfiguration configuration)
{
var identityServerConfiguration = configuration.GetSection("IdentityServerConfiguration").Get<IdentityServerConfiguration>();
var connectionString = configuration.GetConnectionString("Connection");
var migrationsAssembly = typeof(Startup).Assembly.GetName().Name;
services.AddIdentityServer(options =>
{
options.Events.RaiseErrorEvents = true;
options.Events.RaiseInformationEvents = true;
options.Events.RaiseFailureEvents = true;
options.Events.RaiseSuccessEvents = true;
options.EmitStaticAudienceClaim = true;
})
.AddDeveloperSigningCredential()
.AddConfigurationStore(options =>
{
options.ConfigureDbContext = b => b.UseNpgsql(connectionString, sql => sql.MigrationsAssembly(migrationsAssembly));
})
.AddOperationalStore(options =>
{
options.ConfigureDbContext = b => b.UseNpgsql(connectionString, sql => sql.MigrationsAssembly(migrationsAssembly));
options.EnableTokenCleanup = true;
})
.AddProfileService<ProfileServices>()
.AddResourceOwnerValidator<ResourceOwnerPasswordValidator>();
services
.AddAuthentication(IdentityServerAuthenticationDefaults.AuthenticationScheme)
.AddIdentityServerAuthentication(
IdentityServerAuthenticationDefaults.AuthenticationScheme,
referenceOptions =>
{
referenceOptions.Authority = identityServerConfiguration.Authority;
referenceOptions.RequireHttpsMetadata = false;
referenceOptions.ApiName = identityServerConfiguration.ApiName;
referenceOptions.ApiSecret = identityServerConfiguration.ApiSecret;
referenceOptions.RoleClaimType = JwtClaimTypes.Role;
});
services.AddAuthorization(
options =>
{
options.AddPolicy("Everyone", policy => { policy.RequireRole("SuperAdmin", "Administrator", "Patient", "Provider"); });
options.AddPolicy("OnlyAdmins", policy => { policy.RequireRole("Administrator", "SuperAdmin"); });
options.AddPolicy("OnlySuperAdmin", policy => { policy.RequireRole("SuperAdmin"); });
options.AddPolicy("Patient", policy => { policy.RequireRole("Patient"); });
options.AddPolicy("Provider", policy => { policy.RequireRole("Provider"); });
});
}
/// <summary>
/// The configure.
/// </summary>
/// <param name="app">
/// The app.
/// </param>
public static void Configure(IApplicationBuilder app)
{
app.UseAuthentication();
app.UseIdentityServer();
}
}
}
\ No newline at end of file
namespace Hims.Api.Middleware
{
using System;
using System.IO;
using System.Linq;
using System.Reflection;
using Filters;
using Infrastructure.Configurations;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.OpenApi.Models;
using Swashbuckle.AspNetCore.SwaggerUI;
/// <summary>
/// Swagger API documentation components start-up configuration
/// </summary>
public class SwaggerMiddleware
{
/// <summary>
/// Configures the service.
/// </summary>
/// <param name="services">
/// The services.
/// </param>
/// <param name="configuration">
/// The configuration.
/// </param>
public static void ConfigureServices(IServiceCollection services, IConfiguration configuration)
{
var appConfiguration = configuration.GetSection("ApplicationConfiguration").Get<ApplicationConfiguration>();
services.AddSwaggerGen(options =>
{
options.CustomSchemaIds( type => type.ToString() );
options.SwaggerDoc(
"v" + appConfiguration.Version,
new OpenApiInfo
{
Version = "v" + appConfiguration.Version,
Title = "Careaxes Rest API"
});
options.IncludeXmlComments(Path.Combine(AppContext.BaseDirectory, "Hims.Api.xml"));
options.IncludeXmlComments(Path.Combine(AppContext.BaseDirectory, "Hims.Domain.Configurations.xml"));
options.IncludeXmlComments(Path.Combine(AppContext.BaseDirectory, "Hims.Domain.Helpers.xml"));
options.IncludeXmlComments(Path.Combine(AppContext.BaseDirectory, "Hims.Domain.Repositories.xml"));
options.IncludeXmlComments(Path.Combine(AppContext.BaseDirectory, "Hims.Domain.Services.xml"));
options.IncludeXmlComments(Path.Combine(AppContext.BaseDirectory, "Hims.Shared.DataFilters.xml"));
options.IncludeXmlComments(Path.Combine(AppContext.BaseDirectory, "Hims.Shared.EntityModels.xml"));
options.IncludeXmlComments(Path.Combine(AppContext.BaseDirectory, "Hims.Shared.Library.xml"));
options.IncludeXmlComments(Path.Combine(AppContext.BaseDirectory, "Hims.Shared.UserModels.xml"));
options.IgnoreObsoleteActions();
options.IgnoreObsoleteProperties();
options.DescribeAllParametersInCamelCase();
options.UseInlineDefinitionsForEnums();
options.ResolveConflictingActions(apiDescriptions => apiDescriptions.First());
options.AddSecurityDefinition(
"Bearer",
new OpenApiSecurityScheme
{
Name = "Authorization",
In = ParameterLocation.Header,
Type = SecuritySchemeType.ApiKey,
Description = "Careaxes Rest API Authorization header using the Bearer scheme. Example: \"Bearer {token}\""
});
options.OperationFilter<SecurityRequirementsOperationFilter>();
options.OperationFilter<AppendAuthorizeToSummaryOperationFilter>();
});
}
/// <summary>
/// Configures the specified application.
/// </summary>
/// <param name="app">
/// The application.
/// </param>
/// <param name="configuration">
/// The configuration.
/// </param>
/// <param name="assembly">
/// The assembly.
/// </param>
public static void Configure(IApplicationBuilder app, IConfiguration configuration, Assembly assembly)
{
var appConfiguration = configuration.GetSection("ApplicationConfiguration").Get<ApplicationConfiguration>();
app.UseSwagger();
app.UseSwaggerUI(c =>
{
c.IndexStream = () => assembly.GetManifestResourceStream("Hims.Api.Swagger.index.html");
// Core
c.SwaggerEndpoint(appConfiguration.BaseUrl + "/swagger" + "/v" + appConfiguration.Version + "/swagger.json", "Careaxes Rest API v" + appConfiguration.Version + " Documentation");
// Display
c.DefaultModelsExpandDepth(0);
c.DefaultModelRendering(ModelRendering.Example);
c.DisplayRequestDuration();
c.DocExpansion(DocExpansion.List);
c.EnableDeepLinking();
c.EnableFilter();
c.ShowExtensions();
c.DocumentTitle = "Careaxes Rest API";
c.RoutePrefix = "api-docs";
c.InjectStylesheet(appConfiguration.BaseUrl + "/assets/css/swagger.css");
c.InjectJavascript(appConfiguration.BaseUrl + "/assets/js/jquery.min.js");
c.InjectJavascript(appConfiguration.BaseUrl + "/assets/js/swagger.js");
c.EnableFilter();
c.ShowExtensions();
// Network
c.SupportedSubmitMethods(SubmitMethod.Post, SubmitMethod.Get, SubmitMethod.Put, SubmitMethod.Delete);
});
}
}
}
namespace Hims.Api.Models.Account
{
/// <summary>
/// The acccount location model.
/// </summary>
public class AccountLocationModel
{
/// <summary>
/// Gets or sets the location ids.
/// </summary>
/// <value>
/// The location ids.
/// </value>
public int[] LocationIds { get; set; }
/// <summary>
/// Gets or sets the account identifier.
/// </summary>
/// <value>
/// The account identifier.
/// </value>
public int AccountId { get; set; }
}
}
namespace Hims.Api.Models.Account
{
/// <summary>
/// The agreement status request.
/// </summary>
public class AgreementStatusRequest
{
/// <summary>
/// Gets or sets the account id.
/// </summary>
public int AccountId { get; set; }
}
}
namespace Hims.Api.Models.Account
{
/// <summary>
/// The change password request.
/// </summary>
public class ChangePasswordRequest
{
/// <summary>
/// Gets or sets the account id.
/// </summary>
public int AccountId { get; set; }
/// <summary>
/// Gets or sets the account id.
/// </summary>
public string EncryptedAccountId { get; set; }
/// <summary>
/// Gets or sets the password.
/// </summary>
public string Password { get; set; }
/// <summary>
/// Gets or sets the role Id.
/// </summary>
public int? RoleId { get; set; }
/// <summary>
/// Gets or sets the user name.
/// </summary>
public string UserName { get; set; }
/// <summary>
/// Gets or sets the user name.
/// </summary>
public int LocationId { get; set; }
}
}
namespace Hims.Api.Models.Account
{
using Shared.Library.Enums;
/// <summary>
/// The create session request.
/// </summary>
public class CreateSessionRequest
{
/// <summary>
/// Gets or sets the account id.
/// </summary>
public int AccountId { get; set; }
/// <summary>
/// Gets or sets the device key.
/// </summary>
public string DeviceToken { get; set; }
/// <summary>
/// Gets or sets the device type.
/// </summary>
public DeviceType DeviceType { get; set; }
/// <summary>
/// Gets or sets the description.
/// </summary>
public string Description { get; set; }
}
}
\ No newline at end of file
namespace Hims.Api.Models.Account
{
/// <summary>
/// The fetch sessions request.
/// </summary>
public class FetchSessionsRequest
{
/// <summary>
/// Gets or sets the account id.
/// </summary>
public int AccountId { get; set; }
}
}
namespace Hims.Api.Models.Account
{
/// <summary>
/// The find request.
/// </summary>
public class FindRequest
{
/// <summary>
/// Gets or sets a value indicating whether is reset.
/// </summary>
public bool IsReset { get; set; }
/// <summary>
/// Gets or sets the account id.
/// </summary>
public string EncryptedId { get; set; }
}
}
namespace Hims.Api.Models.Account
{
using Shared.Library.Enums;
/// <summary>
/// The find session request.
/// </summary>
public class FindSessionRequest
{
/// <summary>
/// Gets or sets the session id.
/// </summary>
public int SessionId { get; set; }
/// <summary>
/// Gets or sets the device type.
/// </summary>
public DeviceType? DeviceType { get; set; }
}
}
#nullable enable
namespace Hims.Api.Models.Account
{
using System.Collections.Generic;
using Shared.Library.Enums;
/// <summary>
/// The forgot password request.
/// </summary>
public class ForgotPasswordRequest
{
/// <summary>
/// Gets or sets the account id.
/// </summary>
public int AccountId { get; set; }
/// <summary>
/// Gets or sets the mobile.
/// </summary>
public string Username { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the password.
/// </summary>
public string? Password { get; set; }
/// <summary>
/// Gets or sets the role Id.
/// </summary>
public int? RoleId { get; set; }
/// <summary>
/// Gets or sets the mobile.
/// </summary>
public string Mobile { get; set; }
/// <summary>
/// Gets or sets the account types.
/// </summary>
public IEnumerable<AccountType> AccountTypes { get; set; } = new List<AccountType>();
}
}
namespace Hims.Api.Models.Account
{
/// <summary>
/// The get preference request.
/// </summary>
public class GetPreferenceRequest
{
/// <summary>
/// Gets or sets the account id.
/// </summary>
public int AccountId { get; set; }
}
}
\ No newline at end of file
namespace Hims.Api.Models.Account
{
/// <summary>
/// The kill all sessions request.
/// </summary>
public class KillAllSessionsRequest
{
/// <summary>
/// Gets or sets the account id.
/// </summary>
public int AccountId { get; set; }
}
}
\ No newline at end of file
namespace Hims.Api.Models.Account
{
/// <summary>
/// The kill all sessions request.
/// </summary>
public class KillOtherSessionsRequest
{
/// <summary>
/// Gets or sets the account id.
/// </summary>
public int AccountId { get; set; }
/// <summary>Gets or sets the current device id.</summary>
public string CurrentDeviceId { get; set; }
}
}
\ No newline at end of file
#nullable enable
namespace Hims.Api.Models.Account
{
using Shared.Library.Enums;
/// <summary>
/// The kill session request.
/// </summary>
public class KillSessionRequest
{
/// <summary>
/// Gets or sets the accountId id.
/// </summary>
public int AccountId { get; set; }
/// <summary>
/// Gets or sets the device type.
/// </summary>
public DeviceType? DeviceType { get; set; }
/// <summary>
/// Gets or sets the device id.
/// </summary>
public string? DeviceId { get; set; }
/// <summary>Gets or sets the device token.</summary>
public string? DeviceToken { get; set; }
/// <summary>Gets or sets the is other device.</summary>
public bool? IsOtherDevice { get; set; }
}
}
#nullable enable
namespace Hims.Api.Models.Account
{
using System.Collections.Generic;
using Shared.Library.Enums;
/// <summary>
/// The login OTP request.
/// </summary>
public class LoginOTPRequest
{
/// <summary>
/// Gets or sets the email/mobile.
/// </summary>
public string Username { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the country id.
/// </summary>
public int? CountryId { get; set; }
/// <summary>
/// Gets or sets the account types.
/// </summary>
public IEnumerable<AccountType> AccountTypes { get; set; } = new List<AccountType>();
/// <summary>
/// Gets or sets the device type.
/// </summary>
public DeviceType DeviceType { get; set; }
/// <summary>
/// Gets or sets the device key.
/// </summary>
public string? DeviceToken { get; set; }
/// <summary>
/// Gets or sets the device ID.
/// </summary>
public string? DeviceId { get; set; }
/// <summary>
/// Gets or sets the account ID.
/// </summary>
public int? AccountId { get; set; }
public int? PatientId { get; set; }
}
}
#nullable enable
namespace Hims.Api.Models.Account
{
using System.Collections.Generic;
using Shared.Library.Enums;
/// <summary>
/// The login request.
/// </summary>
public class LoginRequest
{
/// <summary>
/// Gets or sets the username.
/// </summary>
public string Username { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the password.
/// </summary>
public string Password { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the account types.
/// </summary>
public IEnumerable<AccountType> AccountTypes { get; set; } = new List<AccountType>();
/// <summary>
/// Gets or sets the device type.
/// </summary>
public DeviceType DeviceType { get; set; }
/// <summary>
/// Gets or sets the device key.
/// </summary>
public string? DeviceToken { get; set; }
/// <summary>
/// Gets or sets the device ID.
/// </summary>
public string? DeviceId { 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 device ID.
/// </summary>
public string? EncryptedAccountId { get; set; }
/// <summary>
/// Gets or sets the mobile.
/// </summary>
public string Mobile { get; set; }
/// <summary>
/// Gets or sets the account id.
/// </summary>
public int? AccountId { get; set; }
public int? PatientId { get; set; }
}
}
\ No newline at end of file
#nullable enable
namespace Hims.Api.Models.Account
{
using Shared.Library.Enums;
/// <summary>
/// The logout request.
/// </summary>
public class LogoutRequest
{
/// <summary>
/// Gets or sets the account id.
/// </summary>
public int AccountId { get; set; }
/// <summary>
/// Gets or sets the device type.
/// </summary>
public DeviceType DeviceType { get; set; }
/// <summary>
/// Gets or sets the device id.
/// </summary>
public string? DeviceId { get; set; }
}
}
namespace Hims.Api.Models.Account
{
/// <summary>
/// The mail request.
/// </summary>
public class MailRequest
{
/// <summary>
/// Gets or sets the account id.
/// </summary>
public int AccountId { get; set; }
}
}
namespace Hims.Api.Models.Account
{
/// <summary>
/// The mail request.
/// </summary>
public class MenuRequest
{
/// <summary>
/// Gets or sets the account id.
/// </summary>
public int AccountId { get; set; }
/// <summary>
/// Gets or sets the role identifier.
/// </summary>
/// <value>
/// The role identifier.
/// </value>
public int RoleId { get; set; }
}
}
namespace Hims.Api.Models.Account
{
/// <summary>
/// The modify status request.
/// </summary>
public class ModifyStatusRequest
{
/// <summary>
/// Gets or sets the account id.
/// </summary>
public int AccountId { get; set; }
/// <summary>
/// Gets or sets a value indicating whether status.
/// </summary>
public bool Status { get; set; }
/// <summary>
/// Gets or sets the modified by.
/// </summary>
public int ModifiedBy { get; set; }
}
}
#nullable enable
namespace Hims.Api.Models.Account
{
using System.Collections.Generic;
using Shared.Library.Enums;
/// <summary>
/// The login request.
/// </summary>
public class ReferralRequest
{
/// <summary>
/// Gets or sets the username.
/// </summary>
public int PatientId { get; set; }
/// <summary>
/// Gets or sets the username.
/// </summary>
public string Username { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the username.
/// </summary>
public string FullName { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the password.
/// </summary>
public int CountryId { get; set; }
/// <summary>
/// Gets or sets the password.
/// </summary>
public string ReferralCode { get; set; } = string.Empty;
}
}
\ No newline at end of file
namespace Hims.Api.Models.Account
{
/// <summary>
/// The refresh authentication request.
/// </summary>
public class RefreshAuthenticationRequest
{
/// <summary>
/// Gets or sets the refresh token.
/// </summary>
public string Token { get; set; }
}
}
\ No newline at end of file
#nullable enable
namespace Hims.Api.Models.Account
{
using System.Collections.Generic;
using Shared.Library.Enums;
/// <summary>
/// The verify OTP request.
/// </summary>
public class VerifyOTPRequest
{
/// <summary>
/// Gets or sets the account id.
/// </summary>
public int AccountId { get; set; }
/// <summary>
/// Gets or sets the account types.
/// </summary>
public IEnumerable<AccountType> AccountTypes { get; set; } = new List<AccountType>();
/// <summary>
/// Gets or sets the device type.
/// </summary>
public DeviceType DeviceType { get; set; }
/// <summary>
/// Gets or sets the device key.
/// </summary>
public string? DeviceToken { get; set; }
/// <summary>
/// Gets or sets the device ID.
/// </summary>
public string? DeviceId { get; set; }
}
}
\ No newline at end of file
namespace Hims.Api.Models.Application
{
using Shared.Library.Enums;
/// <summary>
/// The send otp to email request.
/// </summary>
public class SendOTPToEmailRequest
{
/// <summary>
/// Gets or sets the account type.
/// </summary>
public AccountType? AccountType { get; set; }
/// <summary>
/// Gets or sets the email.
/// </summary>
public string Email { get; set; }
}
}
namespace Hims.Api.Models.Application
{
using Shared.Library.Enums;
/// <summary>
/// The send otp to mobile request.
/// </summary>
public class SendOTPToMobileRequest
{
/// <summary>
/// Gets or sets the account type.
/// </summary>
public AccountType? AccountType { get; set; }
/// <summary>
/// Gets or sets the mobile.
/// </summary>
public string Mobile { get; set; }
}
}
namespace Hims.Api.Models.Application
{
using System.Collections.Generic;
using Shared.Library.Enums;
/// <summary>
/// The verify email otp request.
/// </summary>
public class VerifyEmailOTPRequest
{
/// <summary>
/// Gets or sets the account types.
/// </summary>
public IEnumerable<AccountType> AccountTypes { get; set; }
/// <summary>
/// Gets or sets the email.
/// </summary>
public string Email { get; set; }
/// <summary>
/// Gets or sets the OTP.
/// </summary>
public string OTP { get; set; }
/// <summary>
/// Gets or sets the device type.
/// </summary>
public DeviceType DeviceType { get; set; }
/// <summary>
/// Gets or sets the device key.
/// </summary>
public string DeviceToken { get; set; }
/// <summary>
/// Gets or sets the device Id.
/// </summary>
public string DeviceId { get; set; }
}
}
namespace Hims.Api.Models.Application
{
using System.Collections.Generic;
using Shared.Library.Enums;
/// <summary>
/// The verify mobile otp request.
/// </summary>
public class VerifyMobileOTPRequest
{
/// <summary>
/// Gets or sets the account types.
/// </summary>
public IEnumerable<AccountType> AccountTypes { get; set; }
/// <summary>
/// Gets or sets the mobile.
/// </summary>
public string Mobile { get; set; }
/// <summary>
/// Gets or sets the country id.
/// </summary>
public int CountryId { get; set; }
/// <summary>
/// Gets or sets the OTP.
/// </summary>
public string OTP { get; set; }
/// <summary>
/// Gets or sets the device type.
/// </summary>
public DeviceType DeviceType { get; set; }
/// <summary>
/// Gets or sets the device key.
/// </summary>
public string DeviceToken { get; set; }
/// <summary>
/// Gets or sets the device id.
/// </summary>
public string DeviceId { get; set; }
}
}
namespace Hims.Api.Models.Appointment
{
/// <summary> The appointment request model.</summary>
public class AppointmentRequestModel
{
/// <summary>Gets or sets the appointment date.</summary>
public string AppointmentDate { get; set; }
}
}
namespace Hims.Api.Models.Appointment
{
using Hims.Shared.EntityModels;
using Microsoft.AspNetCore.Http;
using System;
using System.Collections.Generic;
/// <summary>
/// The book appointment request.
/// </summary>
public class BookAppointmentRequest
{
/// <summary>
/// Gets or sets the appointment id.
/// </summary>
public int? AppointmentId { get; set; }
/// <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 availability id.
/// </summary>
public int ConsultationTypeId { get; set; }
/// <summary>
/// Gets or sets the provider id.
/// </summary>
public int ProviderId { get; set; }
/// <summary>
/// Gets or sets the patient id.
/// </summary>
public int PatientId { get; set; }
/// <summary>
/// Gets or sets the follow up for appointment.
/// </summary>
public int? FollowUpForAppointmentId { get; set; }
/// <summary>
/// Gets or sets the follow up for admission.
/// </summary>
public int? FollowUpForAdmissionId { get; set; }
/// <summary>
/// Gets or sets the visit type.
/// </summary>
public char? VisitType { get; set; }
/// <summary>
/// Gets or sets the patient type.
/// </summary>
public char? PatientType { get; set; }
/// <summary>
/// Gets or sets the charge type.
/// </summary>
public char? ChargeType { get; set; }
/// <summary>
/// Gets or sets the appointment date.
/// </summary>
public DateTime AppointmentDate { get; set; }
/// <summary>
/// Gets or sets the appointment time.
/// </summary>
public string AppointmentTime { get; set; }
/// <summary>
/// Gets or sets the appointment end time.
/// </summary>
public string? AppointmentEndTime { get; set; }
/// <summary>
/// Gets or sets the coupon id.
/// </summary>
public int? CouponId { get; set; }
/// <summary>
/// Gets or sets the amount.
/// </summary>
public decimal Amount { get; set; }
/// <summary>
/// Gets or sets the discount.
/// </summary>
public decimal Discount { get; set; }
/// <summary>
/// Gets or sets the provider charges.
/// </summary>
public decimal ProviderCharges { get; set; }
/// <summary>
/// Gets or sets the app charges.
/// </summary>
public decimal AppCharges { get; set; }
/// <summary>
/// Gets or sets the wallet amount.
/// </summary>
public decimal? WalletAmount { get; set; }
/// <summary>
/// Gets or sets the total.
/// </summary>
public decimal Total { get; set; }
/// <summary>
/// Gets or sets the total.
/// </summary>
public decimal? TotalAmount { get; set; }
/// <summary>
/// Gets or sets the created by.
/// </summary>
public int CreatedBy { get; set; }
/// <summary>
/// Gets or sets the created by.
/// </summary>
public string CreatedByName { get; set; }
/// <summary>
/// Gets or sets symptoms.
/// </summary>
public string Symptoms { get; set; }
/// <summary>
/// Gets or sets payment status.
/// </summary>
public bool PaymentStatus { get; set; }
/// <summary>
/// Gets or sets payment type.
/// </summary>
public string PaymentType { get; set; }
/// <summary>
/// Gets or sets payment number.
/// </summary>
public string PaymentNumber { get; set; }
/// <summary>
/// Gets or sets the patient family id.
/// </summary>
public int? PatientFamilyId { get; set; }
/// <summary>
/// Gets or sets the department id.
/// </summary>
public int? DepartmentId { get; set; }
/// <summary>
/// gets or sets the specializationId.
/// </summary>
public int SpecializationId { get; set; }
/// <summary>
/// Gets or sets the log from.
/// </summary>
public short LogFrom { get; set; }
/// <summary>
/// Gets or sets the visit type id.
/// </summary>
public int? VisitTypeId { get; set; }
/// <summary>
/// Gets or sets the charge types id.
/// </summary>
public int? ChargeTypesId { get; set; }
/// <summary>
/// Gets or sets the location id.
/// </summary>
public int LocationId { get; set; }
/// <summary>
/// Gets or sets the appointment type id from appointmentType masters.
/// </summary>
/// <value>
/// The location identifier.
/// </value>
public int? AppointmentTypeId { get; set; }
/// <summary>
/// Gets or sets the Pay type id from payType masters.
/// </summary>
public int? PayTypeId { get; set; }
/// <summary>
/// Gets or sets the token number.
/// </summary>
/// <value>
/// The token number.
/// </value>
public int? TokenNumber { get; set; }
/// <summary>
/// Gets or sets payment gateway.
/// </summary>
public string PaymentGateway { get; set; }
/// <summary>
/// Gets or sets the patient reg amount.
/// </summary>
public decimal? PatientRegistrationAmount { get; set; }
/// <summary>
/// Gets or sets the registration charges.
/// this value is used to add in Patient table (while inserting new patient either identify or unidentify patient.)
/// </summary>
public decimal? Charges { get; set; }
/// <summary>
/// Gets or sets the transaction id.
/// </summary>
public string TransactionId { get; set; }
/// <summary>
/// Gets or sets the transaction.
/// </summary>
public string Transaction { get; set; }
/// <summary>
/// Gets or sets the transaction id.
/// </summary>
public int? SalucroStatusCode { get; set; }
/// <summary>
/// Gets or sets the transaction id.
/// </summary>
public string SalucroTransactionId { get; set; }
/// <summary>
/// Gets or sets the is salucro appointment.
/// </summary>
public bool IsSalucroAppointment { get; set; }
/// <summary>
/// Gets or sets the provider availability charge type id.
/// </summary>
public int? DoctorSpecializationChargeModuleDetailsId { get; set; }
/// <summary>
/// Gets or sets the other remarks.
/// </summary>
/// <value>
/// The other remarks.
/// </value>
public string OtherRemarks { get; set; }
/// <summary>
/// Gets or sets the insurance id.
/// </summary>
public int? AuthorityId { get; set; }
/// <summary>
/// Gets or sets the insurance id.
/// </summary>
public int? ReasonId { get; set; }
/// <summary>
/// Gets or sets the insurance id.
/// </summary>
public string Remarks { get; set; }
/// <summary>
/// Gets or sets payment status.
/// </summary>
public bool Active { get; set; }
/// <summary>
/// Gets or sets the insurance id.
/// </summary>
public int? ModuleType { get; set; }
/// <summary>
/// Gets or sets the insurance id.
/// </summary>
public string TypeOfPayment { get; set; }
/// <summary>
/// Gets or sets the appointment discount in percentage.
/// </summary>
public decimal? DiscountInPercentage { get; set; }
/// <summary>
/// Gets or sets the appointment total.
/// </summary>
public decimal AfterDiscount { get; set; }
/// <summary>
/// Gets or sets the patient discount in percentage.
/// </summary>
public decimal PatientDiscountInPercentage { get; set; }
/// <summary>
/// Gets or sets the patient discount in rupees.
/// </summary>
public decimal PatientDiscountInRupees { get; set; }
/// <summary>
/// Gets or sets the patient total.
/// </summary>
public decimal PatientTotal { get; set; }
/// <summary>
/// Gets or sets the appointment total.
/// </summary>
public bool? IsHealthCard { get; set; }
/// <summary>
/// Gets or sets the session id.
/// </summary>
public int? SessionId { get; set; }
}
/// <summary>
/// The quick schedule request.
/// </summary>
public class QuickScheduleRequest
{
/// <summary>
/// Gets or sets the login id.
/// </summary>
public int? LoginLocationId { get; set; }
/// <summary>
/// Gets or sets the appointment id.
/// </summary>
public int? AppointmentId { get; set; }
/// <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 availability charge type id.
/// </summary>
public int? DoctorSpecializationChargeModuleDetailsId { get; set; }
/// <summary>
/// Gets or sets the provider availability id.
/// </summary>
public int ConsultationTypeId { get; set; }
/// <summary>
/// Gets or sets the appointment end time.
/// </summary>
public string? AppointmentEndTime { get; set; }
/// <summary>
/// Gets or sets the provider id.
/// </summary>
public int ProviderId { get; set; }
/// <summary>
/// Gets or sets the patient id.
/// </summary>
public int PatientId { get; set; }
/// <summary>
/// Gets or sets the follow up for appointment.
/// </summary>
public int? FollowUpForAppointmentId { get; set; }
/// <summary>
/// Gets or sets the follow up for admission.
/// </summary>
public int? FollowUpForAdmissionId { get; set; }
/// <summary>
/// Gets or sets the HWC patient identifier.
/// </summary>
/// <value>
/// The HWC patient identifier.
/// </value>
public int? HWCPatientId { get; set; }
/// <summary>
/// Gets or sets the id proof identifier.
/// </summary>
/// <value>
/// The id proof identifier.
/// </value>
public int? IdProofId { get; set; }
/// <summary>
/// Gets or sets the id proof value.
/// </summary>
public string? IdProofValue { get; set; }
/// <summary>
/// Gets or sets the visit type.
/// </summary>
public char? VisitType { get; set; }
/// <summary>
/// Gets or sets the patient type.
/// </summary>
public char? PatientType { get; set; }
/// <summary>
/// Gets or sets the charge type.
/// </summary>
public char? ChargeType { get; set; }
/// <summary>
/// Gets or sets the appointment date.
/// </summary>
public DateTime AppointmentDate { get; set; }
/// <summary>
/// Gets or sets the appointment time.
/// </summary>
public string AppointmentTime { get; set; }
/// <summary>
/// Gets or sets the coupon id.
/// </summary>
public int? CouponId { get; set; }
/// <summary>
/// Gets or sets the amount.
/// </summary>
public decimal Amount { get; set; }
/// <summary>
/// Gets or sets the discount.
/// </summary>
public decimal Discount { get; set; }
/// <summary>
/// Gets or sets the wallet amount.
/// </summary>
public decimal? WalletAmount { get; set; }
/// <summary>
/// Gets or sets the total.
/// </summary>
public decimal Total { get; set; }
/// <summary>
/// Gets or sets the total.
/// </summary>
public decimal? TotalAmount { get; set; }
/// <summary>
/// Gets or sets the created by.
/// </summary>
public int CreatedBy { get; set; }
/// <summary>
/// Gets or sets symptoms.
/// </summary>
//public string Symptoms { get; set; }
/// <summary>
/// Gets or sets payment status.
/// </summary>
public bool PaymentStatus { get; set; }
///// <summary>
///// Gets or sets payment type.
///// </summary>
//public string PaymentType { get; set; } /// PayTypeId added.
/// <summary>
/// Gets or sets payment number.
/// </summary>
public string PaymentNumber { get; set; }
/// <summary>
/// Gets or sets the patient family id.
/// </summary>
public int? PatientFamilyId { get; set; }
/// <summary>
/// Gets or sets the department id.
/// </summary>
public int? DepartmentId { get; set; }
/// <summary>
/// Gets or sets the specialization Id.
/// </summary>
public int SpecializationId { get; set; }
/// <summary>
/// Gets or sets the log from.
/// </summary>
public short LogFrom { 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; } = string.Empty;
/// <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 father or husband.
/// </summary>
public string FatherOrHusband { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the salutation.
/// </summary>
public string Salutation { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the aadhar no.
/// </summary>
public string AadharNo { 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 gender.
/// </summary>
public char? Gender { get; set; }
/// <summary>
/// Gets or sets the umr.
/// </summary>
public string UMRNo { get; set; } = string.Empty;
/// <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; } = string.Empty;
/// <summary>
/// Gets or sets the country id.
/// </summary>
public int? CountryId { get; set; }
/// <summary>
/// Gets or sets the profile image url.
/// </summary>
public string ProfileImageUrl { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the thumbnail url.
/// </summary>
public string ThumbnailUrl { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the base 64 profile image.
/// </summary>
public string Base64ProfileImage { get; set; }
/// <summary>
/// Gets or sets the street address.
/// </summary>
public string StreetAddress { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the address line 2.
/// </summary>
public string AddressLine2 { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the city.
/// </summary>
public string City { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the state.
/// </summary>
public string State { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the Zipcode.
/// </summary>
public string Zipcode { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the country name.
/// </summary>
public string CountryName { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the country code.
/// </summary>
public string CountryCode { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the Referred by.
/// </summary>
public string ReferredBy { get; set; }
/// <summary>
/// Gets or sets the Referred by name.
/// </summary>
public string ReferredByName { get; set; }
/// <summary>
/// Gets or sets the role name.
/// </summary>
public string RoleName { get; set; }
/// <summary>
/// Gets or sets the created by name.
/// </summary>
public string CreatedByName { get; set; }
/// <summary>
/// Gets or sets the visit type id.
/// </summary>
public int? VisitTypeId { get; set; }
/// <summary>
/// Gets or sets the charge types id.
/// </summary>
public int? ChargeTypesId { get; set; }
/// <summary>
/// Gets or sets the location identifier.
/// </summary>
/// <value>
/// The location identifier.
/// </value>
public int LocationId { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this instance is unidentified.
/// </summary>
/// <value>
/// <c>true</c> if this instance is unidentified; otherwise, <c>false</c>.
/// </value>
public bool IsUnidentified { get; set; }
/// <summary>
/// Gets or sets the appointment type id from appointmentType masters.
/// </summary>
/// <value>
/// The location identifier.
/// </value>
public int? AppointmentTypeId { get; set; }
/// <summary>
/// Gets or sets the education.
/// </summary>
/// <value>
/// The location identifier.
/// </value>
public string Education { get; set; }
/// <summary>
/// Gets or sets the Referred by name.
/// </summary>
public string Occupation { get; set; }
/// <summary>
/// Gets or sets the Referred by name.
/// </summary>
public char? MaritalStatus { get; set; }
/// <summary>
/// Gets or sets the Referred by name.
/// </summary>
public string? Religion { get; set; }
/// <summary>
/// Gets or sets the Referred by name.
/// </summary>
public string Nationality { get; set; }
/// <summary>
/// Gets or sets the Referred by name.
/// </summary>
public string RelationName { get; set; }
/// <summary>
/// Gets or sets the Referred by name.
/// </summary>
public string RelativeMobile { get; set; }
/// <summary>
/// Gets or sets the Referred by name.
/// </summary>
public string RelativeOccupation { get; set; }
/// <summary>
/// Gets or sets the Referred by name.
/// </summary>
public string RealtiveEducation { get; set; }
/// <summary>
/// Gets or sets the Referred by name.
/// </summary>
public string RelativeDateOfBirth { get; set; }
/// <summary>
/// Gets or sets the Referred by name.
/// </summary>
public char? RelativeGender { get; set; }
/// <summary>
/// Gets or sets the Referred by name.
/// </summary>
public string Relation { get; set; }
/// <summary>
/// Gets or sets the Referred by name.
/// </summary>
public int? PatientReferredById { get; set; }
/// <summary>
/// Gets or sets the Pay type id from payType masters.
/// </summary>
public int? PayTypeId { get; set; }
/// <summary>
/// Gets or sets the token number.
/// </summary>
/// <value>
/// The token number.
/// </value>
public int TokenNumber { get; set; }
/// <summary>saw
/// Gets or sets the Blood group
/// </summary>
public string? BloodGroup { 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; }
/// <summary>
/// Gets or sets the registration charges.
/// this value is used to add in Patient table (while inserting new patient either identify or unidentify patient.)
/// </summary>
public decimal? Charges { get; set; }
/// <summary>
/// Gets or sets the id proof id identifier.
/// </summary>
/// <value>
/// The id proof id identifier.
/// </value>
public int? HowDidYouKnowId { get; set; }
/// <summary>
/// Gets or sets the id proof id identifier.
/// </summary>
/// <value>
/// The id proof id identifier.
/// </value>
public int? EducationId { get; set; }
/// <summary>
/// Gets or sets the id proof id identifier.
/// </summary>
/// <value>
/// The id proof id identifier.
/// </value>
public int? OccupationId { get; set; }
/// <summary>saw
/// Gets or sets the Blood group
/// </summary>
public string? BirthMark1 { get; set; }
/// <summary>saw
/// Gets or sets the Blood group
/// </summary>
public string? BirthMark2 { get; set; }
/// <summary>
/// Gets or sets the transaction id.
/// </summary>
public string TransactionId { get; set; }
/// <summary>
/// Gets or sets the transaction.
/// </summary>
public string Transaction { get; set; }
/// <summary>
/// Gets or sets the transaction id.
/// </summary>
public int? SalucroStatusCode { get; set; }
/// <summary>
/// Gets or sets the transaction id.
/// </summary>
public string SalucroTransactionId { get; set; }
/// <summary>
/// Gets or sets the is salucro appointment.
/// </summary>
public bool IsSalucroAppointment { get; set; }
/// <summary>
/// Gets or sets the type of the relation.
/// </summary>
/// <value>
/// The type of the relation.
/// </value>
public string RelationType { get; set; }
/// <summary>
/// Gets or sets the occupation detail.
/// </summary>
/// <value>
/// The occupation detail.
/// </value>
public string OccupationDetail { get; set; }
/// <summary>
/// Gets or sets the is new patient.
/// </summary>
/// <value>
/// The is new patient.
/// </value>
public bool IsNewPatient { get; set; }
/// <summary>
/// Gets or sets payment status.
/// </summary>
public bool? SaveRelativeAsPatient { get; set; }
/// <summary>
/// Gets or sets the insurance id.
/// </summary>
public int? InsuranceId { get; set; }
/// <summary>
/// Gets or sets the other remarks.
/// </summary>
/// <value>
/// The other remarks.
/// </value>
public string OtherRemarks { get; set; }
/// <summary>
/// Gets or sets the insurance id.
/// </summary>
public int? AuthorityId { get; set; }
/// <summary>
/// Gets or sets the insurance id.
/// </summary>
public int? ReasonId { get; set; }
/// <summary>
/// Gets or sets the insurance id.
/// </summary>
public string Remarks { get; set; }
/// <summary>
/// Gets or sets the insurance id.
/// </summary>
public string DocumentName { get; set; }
public IFormFileCollection Files { get; set; } = null;
/// <summary>
/// Gets or sets the document type.
/// </summary>
public string DocumentType { get; set; }
/// <summary>
/// Gets or sets the description.
/// </summary>
public string Description { get; set; }
public List<String> FilePaths { get; set; }
/// <summary>
/// Gets or sets payment status.
/// </summary>
public bool Active { get; set; }
/// <summary>
/// Gets or sets payment status.
/// </summary>
public string Relative { get; set; }
/// <summary>
/// Gets or sets payment status.
/// </summary>
public bool? UpdatePatient { get; set; }
/// <summary>
/// Gets or sets the insurance id.
/// </summary>
public int? ReferredByNameId { get; set; }
/// <summary>
/// Gets or sets the insurance id.
/// </summary>
public string TypeOfPayment { get; set; }
/// <summary>
/// Gets or sets the is emergency.
/// </summary>
public bool IsEmergency { get; set; }
/// <summary>
/// Gets or sets the patient discount in percentage.
/// </summary>
public decimal PatientDiscountInPercentage { get; set; }
/// <summary>
/// Gets or sets the patient discount in rupees.
/// </summary>
public decimal PatientDiscountInRupees { get; set; }
/// <summary>
/// Gets or sets the patient total.
/// </summary>
public decimal PatientTotal { get; set; }
/// <summary>
/// Gets or sets the appointment discount in percentage.
/// </summary>
public decimal? AppointmentDiscountInPercentage { get; set; }
/// <summary>
/// Gets or sets the appointment discount in rupees.
/// </summary>
public decimal AppointmentDiscountInRupees { get; set; }
/// <summary>
/// Gets or sets the appointment total.
/// </summary>
public decimal AppointmentTotal { get; set; }
/// <summary>
/// Gets or sets the appointment total.
/// </summary>
public decimal AfterDiscount { get; set; }
/// <summary>
/// Gets or sets the IsHealthCard.
/// </summary>
public bool? IsHealthCard { get; set; }
/// <summary>
/// Gets or sets the IsHealthCard.
/// </summary>
public string Details { get; set; }
/// <summary>
/// Gets or sets the session id.
/// </summary>
public int? SessionId { get; set; }
}
}
#nullable enable
namespace Hims.Api.Models.Appointment
{
/// <summary>
/// The call history request.
/// </summary>
public class CallHistoryRequest
{
/// <summary>
/// Gets or sets the appointment id.
/// </summary>
public int AppointmentId { get; set; }
/// <summary>
/// Gets or sets the appointment id.
/// </summary>
public int TelemedicineId { get; set; }
/// <summary>
/// Gets or sets a value indicating whether is first time.
/// </summary>
public bool IsFirstTime { get; set; }
}
}
#nullable enable
namespace Hims.Api.Models.Appointment
{
using System;
/// <summary>
/// The reschedule appointment request.
/// </summary>
public class ConfirmAppointmentRequest
{
/// <summary>
/// Gets or sets the appointment id.
/// </summary>
public int AppointmentId { get; set; }
/// <summary>
/// Gets or sets the appointment date.
/// </summary>
public string Delay { get; set; }
}
}
namespace Hims.Api.Models.Appointment
{
/// <summary>
/// Find appointment request model
/// </summary>
public class FetchAppointmentNumbersRequest
{
/// <summary>
/// Gets or sets the provider id.
/// </summary>
public int? ProviderId { get; set; }
/// <summary>
/// Gets or sets the practice id.
/// </summary>
public int? PracticeId { get; set; }
}
}
\ No newline at end of file
namespace Hims.Api.Models.Appointment
{
/// <summary>
/// Find appointment request model
/// </summary>
public class FindAppointmentRequest
{
/// <summary>
/// Gets or sets the appointment id.
/// </summary>
public int AppointmentId { get; set; }
/// <summary>
/// Gets or sets the encrypted appointment id.
/// </summary>
public string EncryptedAppointmentId { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this instance is admission.
/// </summary>
/// <value>
/// <c>true</c> if this instance is admission; otherwise, <c>false</c>.
/// </value>
public bool IsAdmission { get; set; }
}
}
\ No newline at end of file
namespace Hims.Api.Models.Appointment
{
/// <summary>
/// The find appointment transaction request.
/// </summary>
public class FindAppointmentTransactionRequest
{
/// <summary>
/// Gets or sets the appointment transaction id.
/// </summary>
public int AppointmentTransactionId { get; set; }
}
}
#nullable enable
namespace Hims.Api.Models.Appointment
{
using System;
/// <summary>
/// The reschedule appointment request.
/// </summary>
public class RescheduleAppointmentRequest
{
/// <summary>
/// Gets or sets the appointment id.
/// </summary>
public int AppointmentId { get; set; }
/// <summary>
/// Gets or sets the appointment date.
/// </summary>
public DateTime AppointmentDate { get; set; }
/// <summary>
/// Gets or sets the appointment notes.
/// </summary>
public string? AppointmentNotes { get; set; }
/// <summary>
/// Gets or sets the appointment time.
/// </summary>
public string AppointmentTime { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the provider id.
/// </summary>
public int ProviderId { get; set; }
/// <summary>
/// Gets or sets the provider location id.
/// </summary>
public int ProviderLocationId { get; set; }
/// <summary>
/// Gets or sets the provider location id.
/// </summary>
public int ProviderAvailabilityId { get; set; }
/// <summary>
/// Gets or sets the provider location id.
/// </summary>
public int ConsultationTypeId { get; set; }
/// <summary>
/// Gets or sets the appointment end time.
/// </summary>
public string? AppointmentEndTime { get; set; }
/// <summary>
/// Gets or sets the department id.
/// </summary>
public int? DepartmentId { get; set; }
/// <summary>
/// Gets or sets the modified by.
/// </summary>
public int ModifiedBy { get; set; }
/// <summary>
/// Gets or sets the modified by.
/// </summary>
public short LogFrom { 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 token number.
/// </summary>
/// <value>
/// The token number.
/// </value>
public int TokenNumber { get; set; }
/// <summary>
/// Gets or sets the specialization id.
/// </summary>
public int? SpecializationId { get; set; }
/// <summary>
/// Gets or sets the appointment ids.
/// </summary>
public string? AppointmentIds { get; set; }
/// <summary>
/// Gets or sets the appointment timings.
/// </summary>
public string? AppointmentTimings {get; set;}
/// <summary>
/// Gets or sets the appoinment end timings.
/// </summary>
public string? AppointmentEndTimings { get; set; }
/// <summary>
/// Gets or sets the token numbers.
/// </summary>
public string? TokenNumbers { get; set; }
/// <summary>
/// Gets or sets the visit type id.
/// </summary>
public int? VisitTypeId { get; set; }
/// <summary>
/// Gets or sets the charge types id.
/// </summary>
public int? ChargeTypesId { get; set; }
/// <summary>
/// Gets or sets the amount.
/// </summary>
public decimal Amount { get; set; }
/// <summary>
/// Gets or sets the discount.
/// </summary>
public decimal Discount { get; set; }
/// <summary>
/// Gets or sets the total.
/// </summary>
public decimal Total { get; set; }
}
}
namespace Hims.Api.Models.Appointment
{
using System.Collections.Generic;
using Hims.Shared.UserModels;
/// <summary>
/// The call history request.
/// </summary>
public class TelemedicineHistory
{
/// <summary>
/// Gets or sets the telemedicine ids.
/// </summary>
public List<int> TelemedicineIds { get; set; }
/// <summary>
/// Gets or sets the call history.
/// </summary>
public List<CallHistoryModel> CallHistory { get; set; }
}
}
namespace Hims.Api.Models.Chat
{
/// <summary> The chat fetch request model.</summary>
public class ChatFetchRequestModel
{
/// <summary>Gets or sets the sender id.</summary>
public string SenderId { get; set; }
/// <summary>Gets or sets the sender type.</summary>
public string SenderType { get; set; }
/// <summary>Gets or sets the receiver id.</summary>
public string ReceiverId { get; set; }
/// <summary>Gets or sets the receiver type.</summary>
public string ReceiverType { get; set; }
/// <summary>Gets or sets the created date.</summary>
public string CreatedDate { get; set; }
}
}
namespace Hims.Api.Models.Chat
{
/// <summary> The chat request model.</summary>
public class ChatRequestModel
{
/// <summary>Gets or sets the chat id.</summary>
public int ChatId { get; set; }
/// <summary>Gets or sets the account id.</summary>
public int AccountId { get; set; }
}
}
namespace Hims.Api.Models.Chat
{
/// <summary> The push notification chat model.</summary>
public class PushNotificationChatModel
{
/// <summary>Gets or sets the sender id.</summary>
public int SenderId { get; set; }
/// <summary>Gets or sets the sender type.</summary>
public string SenderType { get; set; }
/// <summary>Gets or sets the receiver id.</summary>
public int ReceiverId { get; set; }
/// <summary>Gets or sets the receiver type.</summary>
public string ReceiverType { get; set; }
/// <summary>Gets or sets the message.</summary>
public string Message { get; set; }
/// <summary>Gets or sets the thumbnail.</summary>
public string Thumbnail { get; set; }
/// <summary>Gets or sets the name.</summary>
public string Name { get; set; }
}
}
namespace Hims.Api.Models.DentalEncounter
{
using System.Collections.Generic;
using Hims.Api.Models.InternalMedicine;
using Hims.Shared.Library.Enums;
/// <summary>
/// The dental encounter images.
/// </summary>
public class DentalEncounterImages
{
/// <summary>
/// Gets or sets the images.
/// </summary>
public List<SkinTypes> Images { get; set; }
/// <summary>
/// Gets or sets the json string.
/// </summary>
public string JsonString { get; set; }
/// <summary>
/// Gets or sets the encrypted appointment id.
/// </summary>
public string EncryptedAppointmentId { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this instance is admission.
/// </summary>
/// <value>
/// <c>true</c> if this instance is admission; otherwise, <c>false</c>.
/// </value>
public bool IsAdmission { get; set; }
/// <summary>
/// Gets or sets the modified by.
/// </summary>
public int ModifiedBy { get; set; }
/// <summary>
/// Gets or sets the encounter id.
/// </summary>
public int? DentalEncounterId { get; set; }
/// <summary>
/// Gets or sets the encounter type.
/// </summary>
public DentalEncounterType Type { get; set; }
}
}
#nullable enable
namespace Hims.Api.Models.ExportFilters
{
/// <summary>
/// The appointment transaction filter model.
/// </summary>
public class PaymentExportFilterModel
{
/// <summary>
/// Gets or sets the provider id.
/// </summary>
public int? ProviderId { get; set; }
/// <summary>
/// Gets or sets the from date.
/// </summary>
public string? FromDate { get; set; }
/// <summary>
/// Gets or sets the to date.
/// </summary>
public string? ToDate { get; set; }
/// <summary>
/// Gets or sets the file name.
/// </summary>
public string FileName { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the page index.
/// </summary>
public int PageIndex { get; set; }
/// <summary>
/// Gets or sets the page size.
/// </summary>
public int PageSize { get; set; }
}
}
namespace Hims.Api.Models.GynEncounter
{
using System.Collections.Generic;
using Hims.Shared.Library.Enums;
/// <summary>
/// The encounter images.
/// </summary>
public class GynEncounterImages
{
/// <summary>
/// Gets or sets the images.
/// </summary>
public List<GynSkinTypes> Images { get; set; }
/// <summary>
/// Gets or sets the json string.
/// </summary>
public string JsonString { get; set; }
/// <summary>
/// Gets or sets the encrypted appointment id.
/// </summary>
public string EncryptedAppointmentId { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this instance is admission.
/// </summary>
/// <value>
/// <c>true</c> if this instance is admission; otherwise, <c>false</c>.
/// </value>
public bool IsAdmission { get; set; }
/// <summary>
/// Gets or sets the modified by.
/// </summary>
public int ModifiedBy { get; set; }
/// <summary>
/// Gets or sets the encounter id.
/// </summary>
public int? GynEncounterId { get; set; }
/// <summary>
/// Gets or sets the encounter type.
/// </summary>
public GynEncounterType Type { get; set; }
}
}
namespace Hims.Api.Models.GynEncounter
{
using System.Collections.Generic;
/// <summary>
/// The skin.
/// </summary>
public class GynSkin
{
/// <summary>
/// Gets or sets the encounter id.
/// </summary>
public int EncounterId { get; set; }
/// <summary>
/// Gets or sets the new images.
/// </summary>
public List<GynSkinTypes> NewImages { get; set; }
/// <summary>
/// Gets or sets the encrypted appointment id.
/// </summary>
public string EncryptedAppointmentId { get; set; }
/// <summary>
/// Gets or sets the modified by.
/// </summary>
public int ModifiedBy { get; set; }
/// <summary>
/// Gets or sets the created by.
/// </summary>
public int CreatedBy { get; set; }
}
}
namespace Hims.Api.Models.GynEncounter
{
/// <summary>
/// The skin types.
/// </summary>
public class GynSkinTypes
{
/// <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.Homeopathy
{
/// <summary> The homeopathy delete request model.</summary>
public class HomeopathyDeleteRequestModel
{
/// <summary>Gets or sets the homeopathy id.</summary>
public int HomeopathyId { get; set; }
/// <summary>Gets or sets the account id.</summary>
public int AccountId { get; set; }
}
}
namespace Hims.Api.Models.Icons
{
/// <summary>
/// The icons request model.
/// </summary>
public class IconsRequestModel
{
/// <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; }
}
}
namespace Hims.Api.Models.InternalMedicine
{
using System.Collections.Generic;
using Hims.Shared.Library.Enums;
/// <summary>
/// The encounter images.
/// </summary>
public class EncounterImages
{
/// <summary>
/// Gets or sets the images.
/// </summary>
public List<SkinTypes> Images { get; set; }
/// <summary>
/// Gets or sets the json string.
/// </summary>
public string JsonString { get; set; }
/// <summary>
/// Gets or sets the encrypted appointment id.
/// </summary>
public string EncryptedAppointmentId { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this instance is admission.
/// </summary>
/// <value>
/// <c>true</c> if this instance is admission; otherwise, <c>false</c>.
/// </value>
public bool IsAdmission { get; set; }
/// <summary>
/// Gets or sets the modified by.
/// </summary>
public int ModifiedBy { get; set; }
/// <summary>
/// Gets or sets the encounter id.
/// </summary>
public int? EncounterId { get; set; }
/// <summary>
/// Gets or sets the encounter type.
/// </summary>
public InternalMedicine Type { get; set; }
}
}
namespace Hims.Api.Models.InternalMedicine
{
using System.Collections.Generic;
/// <summary>
/// The skin.
/// </summary>
public class Skin
{
/// <summary>
/// Gets or sets the encounter id.
/// </summary>
public int EncounterId { get; set; }
/// <summary>
/// Gets or sets the new images.
/// </summary>
public List<SkinTypes> NewImages { get; set; }
/// <summary>
/// Gets or sets the encrypted appointment id.
/// </summary>
public string EncryptedAppointmentId { get; set; }
/// <summary>
/// Gets or sets the modified by.
/// </summary>
public int ModifiedBy { get; set; }
/// <summary>
/// Gets or sets the created by.
/// </summary>
public int CreatedBy { get; set; }
}
}
namespace Hims.Api.Models
{
/// <summary>
/// The JSON Request
/// </summary>
public class JsonRequest
{
/// <summary>
/// Gets or sets the JSON
/// </summary>
public string Json { get; set; } = string.Empty;
}
}
\ No newline at end of file
using Microsoft.AspNetCore.Mvc;
namespace Hims.Api.Models
{
/// <summary>
///
/// </summary>
public class LocationHeader
{
/// <summary>
/// Gets or sets the location identifier.
/// </summary>
/// <value>
/// The location identifier.
/// </value>
[FromHeader]
public string LocationId { get; set; }
/// <summary>
/// Gets or sets the location identifier.
/// </summary>
/// <value>
/// The created by identifier.
/// </value>
[FromHeader]
public string CreatedBy { get; set; }
}
}
using Hims.Shared.Library.Enums;
namespace Hims.Api.Models
{
/// <summary>
/// The JSON Request
/// </summary>
public class PaymentRequest
{
/// <summary>
/// Gets or sets the JSON
/// </summary>
public string Json { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the Type
/// </summary>
public PaymentModule Type { get; set; }
/// <summary>
/// Gets or sets the mode
/// </summary>
public string Mode { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the IsMobile
/// </summary>
public bool? IsMobile { get; set; }
/// <summary>
/// Gets or sets the IsMobile
/// </summary>
public bool? IsWebPatient { get; set; }
}
}
\ No newline at end of file
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