Skip to content

Commit

Permalink
Merge pull request #243 from palladiumkenya/3.xchanges
Browse files Browse the repository at this point in the history
3.xchanges
  • Loading branch information
MaryKilewe authored Dec 17, 2024
2 parents cd399a6 + 629f2e8 commit 1f2505e
Show file tree
Hide file tree
Showing 37 changed files with 13,863 additions and 79 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/build-dwapi-3.xlatest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Build and Deploy to 3.xLatest

on:
push:
branches:
- dev

jobs:
build-and-push:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '2.1.x' # Use the appropriate version for your project

- name: Install Node.js and npm
uses: actions/setup-node@v2
with:
node-version: '14.17.6'

- name: Install dependencies
run: npm install
working-directory: src/Dwapi

- name: Build the ASP.NET app
run: dotnet build src/Dwapi/Dwapi.csproj --configuration Release

- name: Build the angular UI
run: npm run build
working-directory: src/Dwapi

- name: Build the project
run: dotnet publish src/Dwapi/Dwapi.csproj -c Release -o ./publish

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

# - name: Docker user Creds
# run: echo ${{secrets.DOCKER_USERNAME}} | sed 's/./& /g'
# - name: Docker pass Creds
# run: echo "${{secrets.DOCKER_PASSWORD}}" | sed 's/./& /g'

- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: "${{secrets.DOCKER_PASSWORD}}"

- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
push: true
tags: kenyahmis/dwapi:3.xLatest
Binary file added kenyahmis.pfx
Binary file not shown.
2 changes: 1 addition & 1 deletion src/Dwapi.Contracts/Ct/IAllergiesChronicIllness.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ public interface IAllergiesChronicIllness
DateTime? Date_Created { get; set; }
DateTime? Date_Last_Modified { get; set; }
string Controlled { get; set; }

string PatientHasChronicIllness { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using Dwapi.ExtractsManagement.Core.Interfaces.Cleaner.Hts;
using Dwapi.ExtractsManagement.Core.Interfaces.Extratcors.Hts;
using Dwapi.ExtractsManagement.Core.Interfaces.Loaders.Hts;
using Dwapi.ExtractsManagement.Core.Interfaces.Reader.Dwh;
using Dwapi.ExtractsManagement.Core.Interfaces.Repository;
using Dwapi.ExtractsManagement.Core.Interfaces.Repository.Hts;
using Dwapi.ExtractsManagement.Core.Interfaces.Validators.Hts;
Expand All @@ -24,19 +25,27 @@ public class ExtractHtsClientsHandler : IRequestHandler<ExtractHtsClients, bool>
private readonly IClearHtsExtracts _clearDwhExtracts;
private readonly ITempHtsClientsExtractRepository _tempPatientExtractRepository;
private readonly IExtractHistoryRepository _extractHistoryRepository;
private readonly IDwhExtractSourceReader _reader;

public ExtractHtsClientsHandler(IHtsClientsSourceExtractor patientSourceExtractor, IHtsExtractValidator extractValidator, IHtsClientsLoader patientLoader, IClearHtsExtracts clearDwhExtracts, ITempHtsClientsExtractRepository tempPatientExtractRepository, IExtractHistoryRepository extractHistoryRepository)
public ExtractHtsClientsHandler(IHtsClientsSourceExtractor patientSourceExtractor, IHtsExtractValidator extractValidator, IHtsClientsLoader patientLoader, IClearHtsExtracts clearDwhExtracts, ITempHtsClientsExtractRepository tempPatientExtractRepository, IExtractHistoryRepository extractHistoryRepository,IDwhExtractSourceReader reader)
{
_patientSourceExtractor = patientSourceExtractor;
_extractValidator = extractValidator;
_patientLoader = patientLoader;
_clearDwhExtracts = clearDwhExtracts;
_tempPatientExtractRepository = tempPatientExtractRepository;
_extractHistoryRepository = extractHistoryRepository;
_reader = reader;

}

public async Task<bool> Handle(ExtractHtsClients request, CancellationToken cancellationToken)
{
if (request.DatabaseProtocol.DatabaseTypeName.ToLower().Contains("MySql".ToLower()))
{
_reader.ChangeSQLmode(request.DatabaseProtocol);
}


//Extract
int found = await _patientSourceExtractor.Extract(request.Extract, request.DatabaseProtocol);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public class AllergiesChronicIllnessExtract : ClientExtract, IAllergiesChronicIl
public string RecordUUID { get; set; }
public bool? Voided { get; set; }
public string Controlled { get; set; }
public string PatientHasChronicIllness { get; set; }
public DateTime? Date_Created { get; set; }
public DateTime? Date_Last_Modified { get; set; }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public class HtsEligibilityExtract : HtsExtract
public string HtsRiskScore { get; set; }
public string RecordUUID { get; set; }
public bool? Voided { get; set; }

public string ChildDefiled { get; set; }
public DateTime? DateCreated { get; set; }
public DateTime? DateLastModified { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public class TempAllergiesChronicIllnessExtract : TempExtract,IAllergiesChronicI
public string RecordUUID { get; set; }
public bool? Voided { get; set; }
public string Controlled { get; set; }
public string PatientHasChronicIllness { get; set; }
public DateTime? Date_Created { get; set; }
public DateTime? Date_Last_Modified { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public class TempAllergiesChronicIllnessExtractError : TempExtract,IAllergiesChr
public string RecordUUID { get; set; }
public bool? Voided { get; set; }
public string Controlled { get; set; }
public string PatientHasChronicIllness { get; set; }
public DateTime? Date_Created { get; set; }
public DateTime? Date_Last_Modified { get; set; }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public class TempAllergiesChronicIllnessExtractErrorSummary : TempExtractErrorSu
public string RecordUUID { get; set; }
public bool? Voided { get; set; }
public string Controlled { get; set; }
public string PatientHasChronicIllness { get; set; }
public DateTime? Date_Created { get; set; }
public DateTime? Date_Last_Modified { get; set; }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ public class TempHtsEligibilityExtract : TempHtsExtract
public string ReasonRefferredForTesting { get; set; }
public string ReasonNotReffered { get; set; }
public string HtsRiskScore { get; set; }
public string ChildDefiled { get; set; }

public string RecordUUID { get; set; }
public bool? Voided { get; set; }
public DateTime? DateCreated { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ public class TempHtsEligibilityExtractError
public string ReasonRefferredForTesting { get; set; }
public string ReasonNotReffered { get; set; }
public string HtsRiskScore { get; set; }
public string ChildDefiled { get; set; }

public string RecordUUID { get; set; }
public bool? Voided { get; set; }
public DateTime? DateCreated { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ public class TempHtsEligibilityExtractErrorSummary: TempHTSExtractErrorSummary
public string ReasonRefferredForTesting { get; set; }
public string ReasonNotReffered { get; set; }
public string HtsRiskScore { get; set; }
public string ChildDefiled { get; set; }

public string RecordUUID { get; set; }
public bool? Voided { get; set; }
public DateTime? DateCreated { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,9 @@ public CtExtractProfile()
.ForMember(x => x.Date_Last_Modified, o => o.MapFrom(s => s.GetOptionalNullDateOrDefault(nameof(TempAllergiesChronicIllnessExtract.Date_Last_Modified))))
.ForMember(x => x.Voided, o => o.MapFrom(s => s.GetNullIntOrDefault(nameof(TempAllergiesChronicIllnessExtract.Voided))))
.ForMember(x => x.RecordUUID, o => o.MapFrom(s => s.GetStringOrDefault(nameof(TempAllergiesChronicIllnessExtract.RecordUUID))))
.ForMember(x => x.Controlled, o => o.MapFrom(s => s.GetStringOrDefault(nameof(TempAllergiesChronicIllnessExtract.Controlled))));
.ForMember(x => x.Controlled, o => o.MapFrom(s => s.GetStringOrDefault(nameof(TempAllergiesChronicIllnessExtract.Controlled))))
.ForMember(x => x.PatientHasChronicIllness, o => o.MapFrom(s => s.GetStringOrDefault(nameof(TempAllergiesChronicIllnessExtract.PatientHasChronicIllness))));



CreateMap<TempAllergiesChronicIllnessExtract,AllergiesChronicIllnessExtract>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,8 @@ public DiffCtExtractProfile()
.ForMember(x => x.Date_Last_Modified, o => o.MapFrom(s => s.GetOptionalNullDateOrDefault(nameof(TempAllergiesChronicIllnessExtract.Date_Last_Modified))))
.ForMember(x => x.Voided, o => o.MapFrom(s => s.GetNullIntOrDefault(nameof(TempAllergiesChronicIllnessExtract.Voided))))
.ForMember(x => x.RecordUUID, o => o.MapFrom(s => s.GetStringOrDefault(nameof(TempAllergiesChronicIllnessExtract.RecordUUID))))
.ForMember(x => x.Controlled, o => o.MapFrom(s => s.GetStringOrDefault(nameof(TempAllergiesChronicIllnessExtract.Controlled))));
.ForMember(x => x.Controlled, o => o.MapFrom(s => s.GetStringOrDefault(nameof(TempAllergiesChronicIllnessExtract.Controlled))))
.ForMember(x => x.PatientHasChronicIllness, o => o.MapFrom(s => s.GetStringOrDefault(nameof(TempAllergiesChronicIllnessExtract.PatientHasChronicIllness))));

CreateMap<TempAllergiesChronicIllnessExtract,AllergiesChronicIllnessExtract>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,8 @@ public TempHtsExtractProfile()
.ForMember(x => x.ContactWithTBCase, o => o.MapFrom(s => s.GetStringOrDefault(nameof(TempHtsEligibilityExtract.ContactWithTBCase ))))
.ForMember(x => x.HtsRiskScore, o => o.MapFrom(s => s.GetStringOrDefault(nameof(TempHtsEligibilityExtract.HtsRiskScore))))
.ForMember(x => x.Voided, o => o.MapFrom(s => s.GetNullIntOrDefault(nameof(TempHtsEligibilityExtract.Voided))))
.ForMember(x => x.RecordUUID, o => o.MapFrom(s => s.GetStringOrDefault(nameof(TempHtsEligibilityExtract.RecordUUID))));
;
.ForMember(x => x.RecordUUID, o => o.MapFrom(s => s.GetStringOrDefault(nameof(TempHtsEligibilityExtract.RecordUUID))))
.ForMember(x => x.ChildDefiled, o => o.MapFrom(s => s.GetStringOrDefault(nameof(TempHtsEligibilityExtract.ChildDefiled))));
CreateMap<TempHtsEligibilityExtract, HtsEligibilityExtract>();

}
Expand Down
Loading

0 comments on commit 1f2505e

Please sign in to comment.