Skip to content

Commit

Permalink
PMN-2022.3 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
PopMedNet-Team committed Sep 12, 2022
1 parent 5ac3710 commit 216bfeb
Show file tree
Hide file tree
Showing 84 changed files with 2,410 additions and 469 deletions.
Binary file modified Build/Artanis/EntityFramework.dll
Binary file not shown.
Binary file modified Build/Artanis/Lpp.Artanis.exe
Binary file not shown.
Binary file modified Build/Artanis/Lpp.Objects.dll
Binary file not shown.
23 changes: 11 additions & 12 deletions Build/Artanis/Lpp.Objects.dll.config
Original file line number Diff line number Diff line change
@@ -1,33 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>

<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-2.6.8.0" newVersion="2.6.8.0"/>
<assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.6.8.0" newVersion="2.6.8.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-2.6.8.0" newVersion="2.6.8.0"/>
<assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.6.8.0" newVersion="2.6.8.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<entityFramework>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="mssqllocaldb"/>
<parameter value="mssqllocaldb" />
</parameters>
</defaultConnectionFactory>
</entityFramework>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
</startup>
</configuration>
</configuration>
Binary file modified Build/Artanis/Microsoft.AspNet.SignalR.Core.dll
Binary file not shown.
Binary file modified Build/Artanis/Microsoft.Owin.Security.dll
Binary file not shown.
Binary file modified Build/Artanis/Microsoft.Owin.dll
Binary file not shown.
Binary file modified Build/Artanis/Newtonsoft.Json.dll
Binary file not shown.
47 changes: 45 additions & 2 deletions Build/Artanis/Newtonsoft.Json.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2553,6 +2553,8 @@
<member name="P:Newtonsoft.Json.JsonReader.MaxDepth">
<summary>
Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a <see cref="T:Newtonsoft.Json.JsonReaderException"/>.
A null value means there is no maximum.
The default value is <c>128</c>.
</summary>
</member>
<member name="P:Newtonsoft.Json.JsonReader.TokenType">
Expand Down Expand Up @@ -3012,7 +3014,7 @@
<summary>
Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a <see cref="T:Newtonsoft.Json.JsonReaderException"/>.
A null value means there is no maximum.
The default value is <c>null</c>.
The default value is <c>128</c>.
</summary>
</member>
<member name="P:Newtonsoft.Json.JsonSerializer.CheckAdditionalContent">
Expand Down Expand Up @@ -3328,7 +3330,7 @@
<summary>
Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a <see cref="T:Newtonsoft.Json.JsonReaderException"/>.
A null value means there is no maximum.
The default value is <c>null</c>.
The default value is <c>128</c>.
</summary>
</member>
<member name="P:Newtonsoft.Json.JsonSerializerSettings.Formatting">
Expand Down Expand Up @@ -7090,6 +7092,27 @@
</summary>
<value>The comparison used to match property names while merging.</value>
</member>
<member name="T:Newtonsoft.Json.Linq.JsonSelectSettings">
<summary>
Specifies the settings used when selecting JSON.
</summary>
</member>
<member name="P:Newtonsoft.Json.Linq.JsonSelectSettings.RegexMatchTimeout">
<summary>
Gets or sets a timeout that will be used when executing regular expressions.
</summary>
<value>The timeout that will be used when executing regular expressions.</value>
</member>
<member name="P:Newtonsoft.Json.Linq.JsonSelectSettings.ErrorWhenNoMatch">
<summary>
Gets or sets a flag that indicates whether an error should be thrown if
no tokens are found when evaluating part of the expression.
</summary>
<value>
A flag that indicates whether an error should be thrown if
no tokens are found when evaluating part of the expression.
</value>
</member>
<member name="T:Newtonsoft.Json.Linq.JToken">
<summary>
Represents an abstract JSON token.
Expand Down Expand Up @@ -7985,6 +8008,16 @@
<param name="errorWhenNoMatch">A flag to indicate whether an error should be thrown if no tokens are found when evaluating part of the expression.</param>
<returns>A <see cref="T:Newtonsoft.Json.Linq.JToken"/>.</returns>
</member>
<member name="M:Newtonsoft.Json.Linq.JToken.SelectToken(System.String,Newtonsoft.Json.Linq.JsonSelectSettings)">
<summary>
Selects a <see cref="T:Newtonsoft.Json.Linq.JToken"/> using a JSONPath expression. Selects the token that matches the object path.
</summary>
<param name="path">
A <see cref="T:System.String"/> that contains a JSONPath expression.
</param>
<param name="settings">The <see cref="T:Newtonsoft.Json.Linq.JsonSelectSettings"/> used to select tokens.</param>
<returns>A <see cref="T:Newtonsoft.Json.Linq.JToken"/>.</returns>
</member>
<member name="M:Newtonsoft.Json.Linq.JToken.SelectTokens(System.String)">
<summary>
Selects a collection of elements using a JSONPath expression.
Expand All @@ -8004,6 +8037,16 @@
<param name="errorWhenNoMatch">A flag to indicate whether an error should be thrown if no tokens are found when evaluating part of the expression.</param>
<returns>An <see cref="T:System.Collections.Generic.IEnumerable`1"/> of <see cref="T:Newtonsoft.Json.Linq.JToken"/> that contains the selected elements.</returns>
</member>
<member name="M:Newtonsoft.Json.Linq.JToken.SelectTokens(System.String,Newtonsoft.Json.Linq.JsonSelectSettings)">
<summary>
Selects a collection of elements using a JSONPath expression.
</summary>
<param name="path">
A <see cref="T:System.String"/> that contains a JSONPath expression.
</param>
<param name="settings">The <see cref="T:Newtonsoft.Json.Linq.JsonSelectSettings"/> used to select tokens.</param>
<returns>An <see cref="T:System.Collections.Generic.IEnumerable`1"/> of <see cref="T:Newtonsoft.Json.Linq.JToken"/> that contains the selected elements.</returns>
</member>
<member name="M:Newtonsoft.Json.Linq.JToken.GetMetaObject(System.Linq.Expressions.Expression)">
<summary>
Returns the <see cref="T:System.Dynamic.DynamicMetaObject"/> responsible for binding operations performed on this object.
Expand Down
6 changes: 3 additions & 3 deletions Build/CommonAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
[assembly: AssemblyCopyright("Copyright © PopMedNet 2011-2022")]
[assembly: ComVisible(false)]
//Please Also update The Click Once version under Lpp.Dns.DataMartClient Properties > publish > Version Number
[assembly: AssemblyVersion( /*<VERSION>*/ "7.6.0.0" /*</VERSION>*/ )]
[assembly: AssemblyFileVersion( /*<VERSION>*/ "7.6.0.0" /*</VERSION>*/ )]
[assembly: AssemblyInformationalVersion("2022.2")]
[assembly: AssemblyVersion( /*<VERSION>*/ "7.7.0.0" /*</VERSION>*/ )]
[assembly: AssemblyFileVersion( /*<VERSION>*/ "7.7.0.0" /*</VERSION>*/ )]
[assembly: AssemblyInformationalVersion("2022.3")]
6 changes: 3 additions & 3 deletions Build/DataMartClientCommonAssemlbyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
[assembly: AssemblyCopyright("Copyright © PopMedNet 2011-2022")]
[assembly: ComVisible(false)]
//Please Also update The Click Once version under Lpp.Dns.DataMartClient Properties > publish > Version Number
[assembly: AssemblyVersion( /*<VERSION>*/ "7.6.0.0" /*</VERSION>*/ )]
[assembly: AssemblyFileVersion( /*<VERSION>*/ "7.6.0.0" /*</VERSION>*/ )]
[assembly: AssemblyInformationalVersion("2022.2")]
[assembly: AssemblyVersion( /*<VERSION>*/ "7.7.0.0" /*</VERSION>*/ )]
[assembly: AssemblyFileVersion( /*<VERSION>*/ "7.7.0.0" /*</VERSION>*/ )]
[assembly: AssemblyInformationalVersion("2022.3")]
6 changes: 3 additions & 3 deletions Build/DomainManagerCommonAssemlbyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
[assembly: AssemblyCopyright("Copyright © PopMedNet 2011-2022")]
[assembly: ComVisible(false)]

[assembly: AssemblyVersion( /*<VERSION>*/ "7.6.0.*" /*</VERSION>*/ )]
[assembly: AssemblyVersion( /*<VERSION>*/ "7.7.0.*" /*</VERSION>*/ )]

//Need to keep the file private part equal to 3000 or above for RavenDB as Embedded usage in adapter packages.
[assembly: AssemblyFileVersion( /*<VERSION>*/ "7.6.0.3000" /*</VERSION>*/ )]
[assembly: AssemblyInformationalVersion("2022.2")]
[assembly: AssemblyFileVersion( /*<VERSION>*/ "7.7.0.3000" /*</VERSION>*/ )]
[assembly: AssemblyInformationalVersion("2022.3")]
Binary file not shown.
8 changes: 7 additions & 1 deletion Lpp.Dns.Api/Controllers/NotificationsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
using Lpp.Utilities.WebSites;
using System.Collections.Concurrent;
using System.Web.Configuration;
using System.Diagnostics;

namespace Lpp.Dns.Api.Controllers
{
Expand All @@ -26,6 +27,9 @@ public class NotificationsController : LppApiController<DataContext>
{
static readonly log4net.ILog Logger = log4net.LogManager.GetLogger(typeof(NotificationsController));




/// <summary>
/// Runs the scheduled notifications based on the permissions of the user used to login.
/// Will fail if the user is not of type Background Task.
Expand Down Expand Up @@ -93,7 +97,7 @@ public async Task<HttpResponseMessage> ExecuteScheduledNotifications(string user
Logger.Error("Error Occured while executing notifications", ex);
}
}

//Flip the results so that we get a list of users, and a sub list of their notifications.
var users = (from n in notifications from r in n.Recipients select r).DistinctBy(n => n.Email);

Expand Down Expand Up @@ -137,6 +141,7 @@ public async Task<HttpResponseMessage> ExecuteScheduledNotifications(string user
var notifier = new Notifier();

//Asynchronously send all of the notifications

await Task.Run(() => notifier.Notify(sendNotifications.AsEnumerable()));

//Upon completion update all of the notifications that should have run with the new time that they should be run again.
Expand Down Expand Up @@ -192,5 +197,6 @@ public async Task<HttpResponseMessage> ExecuteScheduledNotifications(string user
return new HttpResponseMessage(HttpStatusCode.OK);
}
}

}
}
32 changes: 19 additions & 13 deletions Lpp.Dns.Api/Requests/RequestsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public async Task<RequestCompletionResponseDTO> CompleteActivity(RequestCompleti
bool isNew = request.Dto.ID == null;

var result = await base.CompleteWorkflowActivity(request,
(entity) =>
(entity) => // GetWorkflowActivity
{
Expand All @@ -73,10 +73,8 @@ public async Task<RequestCompletionResponseDTO> CompleteActivity(RequestCompleti
}).First();
}
},
async (entity) =>
async (entity) => //CompleteEntityPreSave
{
/** Pre-Save **/
//Update basic settings on the request that cannot be trusted to the client
await Task.Run(() => {
Expand All @@ -94,8 +92,12 @@ public async Task<RequestCompletionResponseDTO> CompleteActivity(RequestCompleti
entity.OrganizationID = Identity.EmployerID.Value;
entity.CreatedOn = DateTime.UtcNow;
entity.CreatedByID = Identity.ID;
entity.Private = false;
}
if(request.Private != null)
entity.Private = (bool)request.Private;
//Save the data marts
var inserts = request.DataMarts.Where(dm => dm.ID == null);
foreach (var insert in inserts)
Expand Down Expand Up @@ -123,15 +125,18 @@ public async Task<RequestCompletionResponseDTO> CompleteActivity(RequestCompleti
//Check for MSRequestID field
var securityGroups = DataContext.SecurityGroupUsers.Where(u => u.UserID == Identity.ID).Select(u => u.SecurityGroupID).ToArray();
var projectFieldOptions = DataContext.ProjectFieldOptionAcls.Where(fo => fo.FieldIdentifier == "Request-RequestID" && fo.ProjectID == entity.ProjectID && securityGroups.Contains(fo.SecurityGroupID)).ToArray();
var projectFieldOptions = DataContext.ProjectFieldOptionAcls.Where(fo => fo.FieldIdentifier == "Request-RequestID" &&
fo.ProjectID == entity.ProjectID &&
securityGroups.Contains(fo.SecurityGroupID)).ToArray();
var globalFieldOption = DataContext.GlobalFieldOptionAcls.Where(g => g.FieldIdentifier == "Request-RequestID").First();
//If MSRequestID is empty and required, throw an error
if ((entity.MSRequestID == null || entity.MSRequestID == "") &&
(
projectFieldOptions.Any(o => o.Permission == FieldOptionPermissions.Required)
||
(globalFieldOption.Permission == FieldOptionPermissions.Required && projectFieldOptions.All(o => o.Permission != FieldOptionPermissions.Hidden))
(globalFieldOption.Permission == FieldOptionPermissions.Required &&
projectFieldOptions.All(o => o.Permission != FieldOptionPermissions.Hidden))
)
)
{
Expand All @@ -142,7 +147,8 @@ public async Task<RequestCompletionResponseDTO> CompleteActivity(RequestCompleti
(
projectFieldOptions.All(o => o.Permission != FieldOptionPermissions.Hidden)
||
(globalFieldOption.Permission != FieldOptionPermissions.Hidden && projectFieldOptions.All(o => o.Permission != FieldOptionPermissions.Hidden))
(globalFieldOption.Permission != FieldOptionPermissions.Hidden &&
projectFieldOptions.All(o => o.Permission != FieldOptionPermissions.Hidden))
)
)
{
Expand All @@ -165,7 +171,9 @@ public async Task<RequestCompletionResponseDTO> CompleteActivity(RequestCompleti
//remove the routes
DataContext.RequestDataMarts.RemoveRange(deletes);
var updates = request.DataMarts.Where(dm => dm.ID.HasValue && (!entity.DataMarts.Any(ad => (ad.ID == dm.ID.Value)) || entity.DataMarts.Any(adm => (adm.ID == dm.ID.Value) && ((adm.Priority != dm.Priority) || (adm.DueDate != dm.DueDate) || (adm.RoutingType != dm.RoutingType)))));
var updates = request.DataMarts.Where(dm => dm.ID.HasValue &&
(!entity.DataMarts.Any(ad => (ad.ID == dm.ID.Value)) || entity.DataMarts.Any(adm => (adm.ID == dm.ID.Value) &&
((adm.Priority != dm.Priority) || (adm.DueDate != dm.DueDate) || (adm.RoutingType != dm.RoutingType)))));
foreach (var update in updates)
{
if(DataMartMap.Any(p => p.Key.ID == update.ID))
Expand Down Expand Up @@ -199,10 +207,8 @@ public async Task<RequestCompletionResponseDTO> CompleteActivity(RequestCompleti
}
}
},
async (entity) =>
async (entity) => // CompleteEntityPostSave
{
/** Post Save **/
//IF MSRequestID is blank, populate it with a default value "Request [System Number]". Need to do it post save so that entity.Identifier is populated with the correct System Number
if (entity.MSRequestID == null || entity.MSRequestID == "")
{
Expand Down Expand Up @@ -236,7 +242,7 @@ public async Task<RequestCompletionResponseDTO> CompleteActivity(RequestCompleti
}
);
}
await DataContext.SaveChangesAsync();
}
}
Expand Down Expand Up @@ -1276,7 +1282,7 @@ public async Task<Guid> CopyRequest([FromBody]Guid requestID)
});
}

r.Private = r.DataMarts.Count == 0;
//r.Private = r.DataMarts.Count == 0;

var ta = new PmnTask
{
Expand Down
7 changes: 6 additions & 1 deletion Lpp.Dns.Api/Requests/ResponseController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public override async Task<ResponseDTO> Get(Guid ID)
var result = await base.Get(ID);

//Record the log of the view of the result
await DataContext.LogRead(await DataContext.Requests.FindAsync(ID));
await DataContext.LogRead(await DataContext.Responses.FindAsync(ID));

await DataContext.SaveChangesAsync();

Expand Down Expand Up @@ -924,6 +924,11 @@ where nonGroupedResponseIDs.Contains(reqDoc.ResponseID)

response.CanViewPendingApprovalResponses = await CanViewPendingApprovalResponses(new ApproveResponseDTO { Message = "", ResponseIDs = response.Responses.Where(rsp => rsp.ID.HasValue).Select(rsp => rsp.ID.Value).ToArray() });

//Record the log of the view of the result
foreach(var dm in response.RequestDataMarts)
await DataContext.LogRead(await DataContext.Responses.FindAsync(dm.ResponseID));
await DataContext.SaveChangesAsync();

return response;
}

Expand Down

0 comments on commit 216bfeb

Please sign in to comment.