forked from palladiumkenya/dwapi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
community support impl and hts fixes
- Loading branch information
Showing
20 changed files
with
132 additions
and
108 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
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,33 @@ | ||
namespace Dwapi.ExtractsManagement.Infrastructure.Repository.Hts.TempExtracts | ||
{ | ||
public class QueryUtil | ||
{ | ||
public static string Linkage => QueryBuilder("TempHtsClientsLinkageExtracts"); | ||
public static string Tests => QueryBuilder("TempHtsClientTestsExtracts"); | ||
public static string Tracing => QueryBuilder("TempHtsClientTracingExtracts"); | ||
public static string Pns => QueryBuilder("TempHtsPartnerNotificationServicesExtracts"); | ||
public static string PartnerTracing => QueryBuilder("TempHtsPartnerTracingExtracts"); | ||
public static string Kits => QueryBuilder("TempHtsTestKitsExtracts"); | ||
|
||
public static string LinkageCount => QueryBuilder("TempHtsClientsLinkageExtracts", true); | ||
public static string TestsCount => QueryBuilder("TempHtsClientTestsExtracts", true); | ||
public static string TracingCount => QueryBuilder("TempHtsClientTracingExtracts", true); | ||
public static string PnsCount => QueryBuilder("TempHtsPartnerNotificationServicesExtracts", true); | ||
public static string PartnerTracingCount => QueryBuilder("TempHtsPartnerTracingExtracts", true); | ||
public static string KitsCount => QueryBuilder("TempHtsTestKitsExtracts", true); | ||
|
||
public static string QueryBuilder(string extract, bool count = false) | ||
{ | ||
var select = count ? "SELECT Count(s.Id) " : "SELECT s.* "; | ||
|
||
var from = $@" | ||
FROM {extract} s | ||
INNER JOIN HtsClientsExtracts p ON s.PatientPK = p.PatientPK AND s.SiteCode = p.SiteCode | ||
WHERE ErrorType = 0"; | ||
|
||
var query = $"{select} {from}"; | ||
|
||
return query; | ||
} | ||
} | ||
} |
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
Oops, something went wrong.