-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-engineered the interaction data population
- Loading branch information
1 parent
81c7fdc
commit ad7e0c1
Showing
17 changed files
with
123 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
drop function if exists reporting.get_transient_data; | ||
|
||
create function reporting.get_transient_data | ||
( | ||
_transient_report_id varchar(100) | ||
) | ||
returns table | ||
( | ||
transient_id varchar(100), | ||
transient_data json, | ||
transient_report_id varchar(100), | ||
transient_report_name varchar(100) | ||
) | ||
as $$ | ||
begin | ||
return query | ||
select | ||
t.transient_id, | ||
t.transient_data, | ||
t.transient_report_id, | ||
t.transient_report_name | ||
from | ||
reporting.transient t | ||
where | ||
t.transient_report_id = _transient_report_id | ||
and entry_date - now() = 0; | ||
end; | ||
$$ language plpgsql; | ||
|
11 changes: 0 additions & 11 deletions
11
database/functions/R__reporting.truncate_transient_data.sql
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using Dapper.FluentMap.Mapping; | ||
using GpConnect.AppointmentChecker.Api.DTO.Response.Reporting; | ||
|
||
namespace GpConnect.AppointmentChecker.Api.DAL.Mapping; | ||
|
||
public class TransientDataMap : EntityMap<TransientData> | ||
{ | ||
public TransientDataMap() | ||
{ | ||
Map(p => p.Id).ToColumn("transient_id"); | ||
Map(p => p.Data).ToColumn("transient_data"); | ||
Map(p => p.ReportId).ToColumn("transient_report_id"); | ||
Map(p => p.ReportName).ToColumn("transient_report_name"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace GpConnect.AppointmentChecker.Api.DTO.Response.Reporting; | ||
|
||
public class TransientData | ||
{ | ||
public string Id { get; set; } | ||
public string Data { get; set; } | ||
public string ReportId { get; set; } | ||
public string ReportName { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace GpConnect.AppointmentChecker.Function.DTO.Response; | ||
|
||
public class InteractionKey | ||
{ | ||
public string InteractionId { get; set; } | ||
public string ReportName { get; set; } | ||
public string ReportId { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using Newtonsoft.Json; | ||
|
||
namespace GpConnect.AppointmentChecker.Function.DTO.Response; | ||
|
||
public class TransientData | ||
{ | ||
[JsonProperty("id")] | ||
public string Id { get; set; } | ||
|
||
[JsonProperty("data")] | ||
public string Data { get; set; } | ||
|
||
[JsonProperty("reportId")] | ||
public string ReportId { get; set; } | ||
|
||
[JsonProperty("reportName")] | ||
public string ReportName { get; set; } | ||
|
||
} |