Skip to content

Commit

Permalink
PMN-2021.4 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
PopMedNet-Team committed Oct 21, 2021
1 parent 02d8ece commit f8dc244
Show file tree
Hide file tree
Showing 310 changed files with 11,693 additions and 7,471 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -380,3 +380,4 @@ ASALocalRun/
/Lpp.Dns.Api.Tests/ConnectionStrings.config
Lpp.Dns.Portal/Scripts/PmnGrid/PmnGrid.js
/DMCS/PopMedNet.DMCS/appsettings.Development.json
/PopMedNet.Hangfire.ServerManagement/ConnectionStrings.config
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-2021")]
[assembly: ComVisible(false)]
//Please Also update The Click Once version under Lpp.Dns.DataMartClient Properties > publish > Version Number
[assembly: AssemblyVersion( /*<VERSION>*/ "7.1.0.0" /*</VERSION>*/ )]
[assembly: AssemblyFileVersion( /*<VERSION>*/ "7.1.0.0" /*</VERSION>*/ )]
[assembly: AssemblyInformationalVersion("2021.3")]
[assembly: AssemblyVersion( /*<VERSION>*/ "7.3.0.0" /*</VERSION>*/ )]
[assembly: AssemblyFileVersion( /*<VERSION>*/ "7.3.0.0" /*</VERSION>*/ )]
[assembly: AssemblyInformationalVersion("2021.5")]
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-2021")]
[assembly: ComVisible(false)]
//Please Also update The Click Once version under Lpp.Dns.DataMartClient Properties > publish > Version Number
[assembly: AssemblyVersion( /*<VERSION>*/ "7.1.0.0" /*</VERSION>*/ )]
[assembly: AssemblyFileVersion( /*<VERSION>*/ "7.1.0.0" /*</VERSION>*/ )]
[assembly: AssemblyInformationalVersion("2021.3")]
[assembly: AssemblyVersion( /*<VERSION>*/ "7.3.0.0" /*</VERSION>*/ )]
[assembly: AssemblyFileVersion( /*<VERSION>*/ "7.3.0.0" /*</VERSION>*/ )]
[assembly: AssemblyInformationalVersion("2021.5")]
6 changes: 3 additions & 3 deletions Build/DomainManagerCommonAssemlbyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
using System.Runtime.InteropServices;

[assembly: AssemblyProduct("Distributed Network Solution")]
[assembly: AssemblyCopyright("Copyright © PopMedNet 2011-2018")]
[assembly: AssemblyCopyright("Copyright © PopMedNet 2011-2021")]
[assembly: ComVisible(false)]

[assembly: AssemblyVersion( /*<VERSION>*/ "6.9.0.*" /*</VERSION>*/ )]
[assembly: AssemblyVersion( /*<VERSION>*/ "7.3.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>*/ "6.9.0.3000" /*</VERSION>*/ )]
[assembly: AssemblyFileVersion( /*<VERSION>*/ "7.3.0.3000" /*</VERSION>*/ )]
9 changes: 9 additions & 0 deletions Lpp.Adapters.sln
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lpp.Dns.DataMart.Client.Dat
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lpp.Dns.DataMart.Client.Tests", "Lpp.Adapters\Lpp.Dns.DataMart.Client.Tests\Lpp.Dns.DataMart.Client.Tests.csproj", "{C21F1A05-3615-4375-AD60-D820B206A2A5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lpp.Dns.DataMart.Model.QueryComposer.Tests", "Lpp.Adapters\Lpp.Dns.DataMart.Model.QueryComposer.Tests\Lpp.Dns.DataMart.Model.QueryComposer.Tests.csproj", "{2456D187-A88B-4DEF-ABC8-B30CFF1A0387}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Adapters|Any CPU = Adapters|Any CPU
Expand Down Expand Up @@ -232,6 +234,12 @@ Global
{C21F1A05-3615-4375-AD60-D820B206A2A5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C21F1A05-3615-4375-AD60-D820B206A2A5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C21F1A05-3615-4375-AD60-D820B206A2A5}.Release|Any CPU.Build.0 = Release|Any CPU
{2456D187-A88B-4DEF-ABC8-B30CFF1A0387}.Adapters|Any CPU.ActiveCfg = Debug|Any CPU
{2456D187-A88B-4DEF-ABC8-B30CFF1A0387}.Adapters|Any CPU.Build.0 = Debug|Any CPU
{2456D187-A88B-4DEF-ABC8-B30CFF1A0387}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2456D187-A88B-4DEF-ABC8-B30CFF1A0387}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2456D187-A88B-4DEF-ABC8-B30CFF1A0387}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2456D187-A88B-4DEF-ABC8-B30CFF1A0387}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -242,6 +250,7 @@ Global
{1B945FA5-035D-49AC-A901-4570A2A64C08} = {9A75954B-0820-4A47-AF8B-5ED59495FB10}
{DD487AA9-8099-4AA7-8CB2-BAE3A2B5104D} = {9A75954B-0820-4A47-AF8B-5ED59495FB10}
{1BCE7532-35EF-4875-A26D-FE690516983E} = {9A75954B-0820-4A47-AF8B-5ED59495FB10}
{2456D187-A88B-4DEF-ABC8-B30CFF1A0387} = {9A75954B-0820-4A47-AF8B-5ED59495FB10}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {14476E95-1871-4452-BFFE-C0E67687681B}
Expand Down
152 changes: 115 additions & 37 deletions Lpp.Adapters/Lpp.Dns.DataMart.Client/Forms/RequestDetailForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -604,44 +604,99 @@ private void btnRejectQuery_Click(object sender, EventArgs e)

private void btnHold_Click(object sender, EventArgs e)
{
NetWorkSetting netWorkSetting = Configuration.Instance.GetNetworkSetting(Request.NetworkId);
if(Request.RoutingStatus != DTO.DataMartClient.Enums.DMCRoutingStatus.Hold)
{
NetWorkSetting netWorkSetting = Configuration.Instance.GetNetworkSetting(Request.NetworkId);

// Prompt user to enter the reason
RejectReasonForm f = new RejectReasonForm();
f.Text = "DataMart Client - Hold Reason";
f.ButtonText = "Hold";
f.FormText = "Enter a reason for holding the query below. Query results can still be executed after holding the results. The query status will be marked as 'Awaiting Approval on the Portal and the reason entered below will be returned to the originator of the query.";
f.ShowDialog();
// Prompt user to enter the reason
RejectReasonForm f = new RejectReasonForm();
f.Text = "DataMart Client - Hold Reason";
f.ButtonText = "Hold";
//f.FormText = "Enter a reason for holding the query below. Query results can still be executed after holding the results. The query status will be marked as 'Awaiting Approval on the Portal and the reason entered below will be returned to the originator of the query.";
f.FormText = "Enter a reason for holding the query below. The query status will be marked as 'Awaiting Approval' on the Portal and the reason entered below will be returned to the originator of the query.";
f.ShowDialog();

// If user clicked cancel, bail out
if (f.DialogResult == DialogResult.Cancel)
return;
// If user clicked cancel, bail out
if (f.DialogResult == DialogResult.Cancel)
return;

// Update the query status
try
{
DnsServiceManager.SetRequestStatus(Request, new HubRequestStatus(Lpp.Dns.DTO.DataMartClient.Enums.DMCRoutingStatus.Hold, f.RejectReason), Request.Properties, netWorkSetting);
Request.RejectReason = f.RejectReason;
Request.RoutingStatus = Lpp.Dns.DTO.DataMartClient.Enums.DMCRoutingStatus.Hold;
// Update the query status
try
{
DnsServiceManager.SetRequestStatus(Request, new HubRequestStatus(Lpp.Dns.DTO.DataMartClient.Enums.DMCRoutingStatus.Hold, f.RejectReason), Request.Properties, netWorkSetting);
Request.RejectReason = f.RejectReason;
Request.RoutingStatus = Lpp.Dns.DTO.DataMartClient.Enums.DMCRoutingStatus.Hold;

MessageBox.Show("The status of the request has been successfully updated to \"Hold\".", Application.ProductName);
MessageBox.Show("The status of the request has been successfully updated to \"Hold\".", Application.ProductName);

// Notify parent that the record has changed
RefreshRequestHeader();
// Notify parent that the record has changed
RefreshRequestHeader();

log.Info(String.Format("User {0} put the following request {2} (ID: {1}) on hold.",
netWorkSetting.Profile.Username, Request.Source.ID, Request.Source.Identifier));
log.Info(String.Format("User {0} put the following request {2} (ID: {1}) on hold.",
netWorkSetting.Profile.Username, Request.Source.ID, Request.Source.Identifier));

this.Close();
}
catch (Exception ex)
{
log.Error(ex);
ShowUnexpectedError(ex);
this.Close();
}
catch (Exception ex)
{
log.Error(ex);
ShowUnexpectedError(ex);
}
finally
{
EnableDisableButtons();
}
}
finally
else
{
EnableDisableButtons();
NetWorkSetting netWorkSetting = Configuration.Instance.GetNetworkSetting(Request.NetworkId);

// Prompt user to enter the reason
RejectReasonForm f = new RejectReasonForm();
f.Text = "DataMart Client - Resume Reason";
f.ButtonText = "Resume";
f.FormText = "Enter a reason for resuming the query below. The query status will be marked as 'Submitted/Re-Submitted' on the Portal and the reason entered below will be returned to the originator of the query.";
f.ShowDialog();

// If user clicked cancel, bail out
if (f.DialogResult == DialogResult.Cancel)
return;

// Update the query status
try
{
DnsServiceManager.SetRequestStatus(Request, new HubRequestStatus(Lpp.Dns.DTO.DataMartClient.Enums.DMCRoutingStatus.Submitted, f.RejectReason), Request.Properties, netWorkSetting);

var updatedRequest = DnsServiceManager.GetRequests(netWorkSetting, new Guid[] { Request.Source.ID }, Request.DataMartId).GetAwaiter().GetResult();

Request.RejectReason = f.RejectReason;
Request.RoutingStatus = updatedRequest.Routings.FirstOrDefault(x => x.DataMartID == Request.DataMartId).Status;

if (Request.RoutingStatus == DTO.DataMartClient.Enums.DMCRoutingStatus.Resubmitted) {
MessageBox.Show("The status of the request has been successfully updated to \"Re-Submitted\".", Application.ProductName);
}
else
{
MessageBox.Show("The status of the request has been successfully updated to \"Submitted\".", Application.ProductName);
}

// Notify parent that the record has changed
RefreshRequestHeader();

log.Info(String.Format("User {0} put the following request {2} (ID: {1}) on hold.",
netWorkSetting.Profile.Username, Request.Source.ID, Request.Source.Identifier));

this.Close();
}
catch (Exception ex)
{
log.Error(ex);
ShowUnexpectedError(ex);
}
finally
{
EnableDisableButtons();
}
}
}

Expand Down Expand Up @@ -1074,13 +1129,13 @@ private void processRequestWorker_ProcessRequest(object sender, DoWorkEventArgs
/// Button states:
///
/// REQUEST STATUS Submitted InProgress AwaitingApproval Completed Hold Rejected Failed Cancelled
/// Run: Y N Y Y (warn) Y Y Y Y
/// Hold: Y Y Y N N N Y N
/// Reject: Y Y Y N Y N Y N
/// Add File: Y Y Y Y Y Y Y Y
/// Delete File: Y Y Y Y Y Y Y Y
/// Export Results: Y N Y Y Y Y N Y
/// Upload Results: N N Y N Y N N N
/// Run: Y N Y Y (warn) N Y Y Y
/// Hold/Resume: Y Y Y N Y N Y N
/// Reject: Y Y Y N N N Y N
/// Add File: Y Y Y Y N Y Y Y
/// Delete File: Y Y Y Y N Y Y Y
/// Export Results: Y N Y Y N Y N Y
/// Upload Results: N N Y N N N N N
/// Close: Y Y Y Y Y Y Y Y
/// </summary>
private void EnableDisableButtons()
Expand All @@ -1103,6 +1158,14 @@ private void EnableDisableButtons()
bool CanUploadWithoutRun = false;
bool CanViewSQL = false;

if(hubStatus == DTO.DataMartClient.Enums.DMCRoutingStatus.Hold)
{
btnHold.Text = "Resume";
btnHold.Enabled = true;
btnRejectQuery.Enabled = btnRun.Enabled = btnAddFile.Enabled = btnDeleteFile.Enabled = btnExportResults.Enabled = btnUploadResults.Enabled = false;
return;
}

if (Processor != null
&& Processor.ModelMetadata != null
&& Processor.ModelMetadata.Capabilities != null
Expand Down Expand Up @@ -1353,6 +1416,14 @@ private void btnViewSQL_Click(object sender, EventArgs e)
try
{
var obj = Newtonsoft.Json.JsonConvert.DeserializeObject<Lpp.Dns.DTO.QueryComposer.QueryComposerResponseDTO>(json, serializationSettings);
if(obj.Errors != null && obj.Errors.Any())
{
foreach(var error in obj.Errors)
{
sql.Add($"### Error building SQL: ###{ Environment.NewLine }{ error.Description}");
}
}

var queries = obj.Queries.ToArray();
for (var i = 0; i < queries.Length; i++)
{
Expand All @@ -1364,13 +1435,20 @@ private void btnViewSQL_Click(object sender, EventArgs e)
var row = table.First();
string queryName = Lpp.Utilities.ObjectEx.ToStringEx(row["QueryName"]);
string querySQL = Lpp.Utilities.ObjectEx.ToStringEx(row["SQL"]);
sql.Add($"### Query { i + 1 }: { queryName } ###{ Environment.NewLine }{querySQL}");
sql.Add($"--### Query { i + 1 }: { queryName } ###{ Environment.NewLine }{querySQL}");
}
}
}
catch
{
queryObj = Newtonsoft.Json.JsonConvert.DeserializeObject<DTO.QueryComposer.QueryComposerResponseQueryResultDTO>(json, serializationSettings);
if (queryObj.Errors != null && queryObj.Errors.Any())
{
foreach (var error in queryObj.Errors)
{
sql.Add($"### Error building SQL: ###{ Environment.NewLine }{ error.Description}");
}
}
foreach (IEnumerable<Dictionary<string, object>> results in queryObj.Results)
{
object val = null;
Expand Down
4 changes: 2 additions & 2 deletions Lpp.Adapters/Lpp.Dns.DataMart.Client/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
<conversionPattern value="%-5p %d %-38c{2} %-20M - %m%n"/>
</layout>
</appender>
<!--<logger name="Lpp.Dns.DataMart.Client.AutoProcessor" additivity="false">
<logger name="Lpp.Dns.DataMart.Client.AutoProcessor" additivity="false">
<level value="ERROR" />
</logger>
<logger name="Lpp.Dns.DataMart.Client.Utils.Configuration" additivity="false">
Expand All @@ -112,7 +112,7 @@
</logger>
<logger name="Lpp.Dns.DataMart.Client.Utils.CredentialManager" additivity="false">
<level value="ERROR" />
</logger>-->
</logger>
<root>
<level value="Info"/>
<appender-ref ref="RollingLogFileAppender"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ public class DataContext : DbContext

public DbSet<Model.ClinicalTrial> ClinicalTrials { get; set; }

public DbSet<Model.ClinicalObservation> ClinicalObservations { get; set; }

public DbSet<Model.Death> Deaths { get; set; }

public DbSet<Model.CauseOfDeath> CauseOfDeaths { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
</Compile>
<Compile Include="DataContext.cs" />
<Compile Include="Model\CauseOfDeath.cs" />
<Compile Include="Model\ClinicalObservation.cs" />
<Compile Include="Model\Condition.cs" />
<Compile Include="Model\Death.cs" />
<Compile Include="Model\Dispensing.cs" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Lpp.Dns.DataMart.Model.PCORIQueryBuilder.Model
{
[Table("OBS_CLIN")]
public class ClinicalObservation : Lpp.Objects.Entity
{
[Key, Column("OBSCLINID")]
public string ID { get; set; }
[Column("PATID")]
public string PatientID { get; set; }
public virtual Patient Patient { get; set; }

[Column("ENCOUNTERID")]
public string EncounterID { get; set; }
[Column("OBSCLIN_PROVIDERID")]
public string ProviderID { get; set; }
[Column("OBSCLIN_START_DATE")]
public DateTime? StartDate { get; set; }
[Column("OBSCLIN_START_TIME")]
public string StartTime { get; set; }
[Column("OBSCLIN_STOP_DATE")]
public DateTime? StopDate { get; set; }
[Column("OBSCLIN_STOP_TIME")]
public string StopTime { get; set; }
[Column("OBSCLIN_TYPE")]
public string Type { get; set; }
[Column("OBSCLIN_CODE")]
public string Code { get; set; }
[Column("OBSCLIN_RESULT_QUAL")]
public string QualitativeResult { get; set; }
[Column("OBSCLIN_RESULT_TEXT")]
public string TextResult { get; set; }
[Column("OBSCLIN_RESULT_NUM")]
public double? QuantitativeResult { get; set; }
[Column("OBSCLIN_RESULT_MODIFIER")]
public string ResultModifier { get; set; }
[Column("OBSCLIN_RESULT_UNIT")]
public string ResultUnit { get; set; }
[Column("OBSCLIN_SOURCE"), MaxLength(2)]
public string Source { get; set; }
[Column("OBSCLIN_ABN_IND"), MaxLength(2)]
public string AbnormalResultIndicator { get; set; }
}
}

0 comments on commit f8dc244

Please sign in to comment.