Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

catch up #21

Merged
merged 5 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions .github/workflows/linux-docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,19 @@ jobs:
-e MYSQL_DATABASE=test \
-d mysql:8

# Step 5: Build the Docker image and tag it for GitHub Container Registry (GHCR)
# Step 5: Convert repository owner and name to lowercase
- name: Convert repository owner and name to lowercase
id: vars
run: |
echo "org_name=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
echo "repo_name=$(basename ${{ github.repository }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV

# Step 6: Build the Docker image and tag it for GitHub Container Registry (GHCR)
- name: Docker Build
run: |
docker build --tag ghcr.io/${{ github.repository_owner }}/fhirserver:nightly .
docker build --tag ghcr.io/${{ env.org_name }}/fhirserver:nightly .

# Step 6: Prepare ini file for your FHIR Server with environment variables
# Step 7: Prepare ini file for your FHIR Server with environment variables
- name: Prepare ini file
env:
FHIRSERVER_LOCATIONS_CLONE_PATH: /work/fhirserver
Expand All @@ -66,14 +73,14 @@ jobs:
run: |
cat fixtures/test-settings.ini.template | envsubst > ~/test-settings.ini

# Step 7: Ensure SNOMED cache is present
# Step 8: Ensure SNOMED cache is present
- name: Ensure SNOMED cache is present
run: |
mkdir -p ~/terminology/fhir-server
wget -q --no-clobber https://storage.googleapis.com/ig-build/snomed.test.cache -O ~/terminology/fhir-server/snomed.test.cache || true
ls ~/terminology/fhir-server/snomed.test.cache

# Step 8: Push the Docker image to GitHub Container Registry (GHCR)
# Step 9: Push the Docker image to GitHub Container Registry (GHCR)
- name: Push Docker image to GHCR
run: |
docker push ghcr.io/${{ github.repository_owner }}/fhirserver:nightly
docker push ghcr.io/${{ env.org_name }}/fhirserver:nightly
4 changes: 2 additions & 2 deletions library/fhir/fhir_tx.pas
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ procedure TTerminologyOperationContext.log(note: String);
var
s : string;
begin
s := DescribePeriodMS(GetTickCount64 - FStartTime)+' '+note;
s := inttostr(GetTickCount64 - FStartTime)+'ms '+note;
if UnderDebugger then
Logging.log(s);
FTimeTracker.step(s);
Expand All @@ -345,7 +345,7 @@ procedure TTerminologyOperationContext.addNote(vs : TFHIRValueSetW; note : Strin
var
s : string;
begin
s := DescribePeriodMS(GetTickCount64 - FStartTime)+' '+vs.vurl+': '+note;
s := inttostr(GetTickCount64 - FStartTime)+'ms '+vs.vurl+': '+note;
if UnderDebugger then
Logging.log(s);
FTimeTracker.step(s);
Expand Down
12 changes: 12 additions & 0 deletions library/ftx/fhir_valuesets.pas
Original file line number Diff line number Diff line change
Expand Up @@ -3503,6 +3503,7 @@ procedure TFHIRValueSetExpander.includeCodes(cset: TFhirValueSetComposeIncludeW;
begin
//Logging.log('Processing '+vsId+', import value set '+s);
deadCheck('processCodes#2');
FOpContext.log('import value set '+s);
ivs := TFHIRImportedValueSet.create(expandValueset(s, '', filter.filter, dependencies, notClosed));
try
checkCanonicalStatus(expansion, ivs.FValueSet, FValueSet);
Expand Down Expand Up @@ -3535,6 +3536,7 @@ procedure TFHIRValueSetExpander.includeCodes(cset: TFhirValueSetComposeIncludeW;
//Logging.log(' ...import value set '+s);
deadCheck('processCodes#3');
f := nil;
FOpContext.log('import2 value set '+s);
// if we can, we can do a short cut evaluation that means we don't have to do a full expansion of the source value set.
// this saves lots of overhead we don't need. But it does require simple cases (though they are common). So we have a look
// at the value set, and see whether we can short cut it. If we can, it's just another filter (though we can't iterate on it)
Expand All @@ -3555,6 +3557,7 @@ procedure TFHIRValueSetExpander.includeCodes(cset: TFhirValueSetComposeIncludeW;
begin
if (cs.SpecialEnumeration <> '') and FParams.limitedExpansion and filters.Empty then
begin
FOpContext.log('import special value set '+s);
base := expandValueSet(cs.SpecialEnumeration, '', filter.filter, dependencies, notClosed);
try
expansion.addExtensionV('http://hl7.org/fhir/StructureDefinition/valueset-toocostly', FFactory.makeBoolean(true));
Expand All @@ -3566,6 +3569,7 @@ procedure TFHIRValueSetExpander.includeCodes(cset: TFhirValueSetComposeIncludeW;
end
else if filter.Null then // special case - add all the code system
begin
FOpContext.log('add whole code system');
if cs.isNotClosed(FOpContext, filter) then
if cs.SpecialEnumeration <> '' then
raise costDiags(ETooCostly.create('The code System "'+cs.systemUri+'" has a grammar, and cannot be enumerated directly. If an incomplete expansion is requested, a limited enumeration will be returned'))
Expand Down Expand Up @@ -3595,6 +3599,7 @@ procedure TFHIRValueSetExpander.includeCodes(cset: TFhirValueSetComposeIncludeW;
end
else
begin
FOpContext.log('prepare filters');
NoTotal;
if cs.isNotClosed(FOpContext, filter) then
notClosed := true;
Expand All @@ -3603,6 +3608,7 @@ procedure TFHIRValueSetExpander.includeCodes(cset: TFhirValueSetComposeIncludeW;
ctxt := cs.searchFilter(FOpContext, filter, prep, false);
try
cs.prepare(FOpContext, prep);
FOpContext.log('iterate filters');
while cs.FilterMore(FOpContext, ctxt) do
begin
deadCheck('processCodes#4');
Expand All @@ -3623,6 +3629,7 @@ procedure TFHIRValueSetExpander.includeCodes(cset: TFhirValueSetComposeIncludeW;
c.free;
end;
end;
FOpContext.log('iterate filters done');
finally
ctxt.free;
end;
Expand All @@ -3634,6 +3641,7 @@ procedure TFHIRValueSetExpander.includeCodes(cset: TFhirValueSetComposeIncludeW;

if (cset.hasConcepts) then
begin
FOpContext.log('iterate concepts');
cds := TConceptDesignations.Create(FFactory.link, FLanguages.link);
try
tcount := 0;
Expand Down Expand Up @@ -3666,10 +3674,12 @@ procedure TFHIRValueSetExpander.includeCodes(cset: TFhirValueSetComposeIncludeW;
finally
cds.free;
end;
FOpContext.log('iterate concepts done');
end;

if cset.hasFilters then
begin
FOpContext.log('prepare filters');
fcl := cset.filters;
try
prep := cs.getPrepContext(FOpContext);
Expand Down Expand Up @@ -3706,6 +3716,7 @@ procedure TFHIRValueSetExpander.includeCodes(cset: TFhirValueSetComposeIncludeW;

inner := cs.prepare(FOpContext, prep);
count := 0;
FOpContext.log('iterate filters');
While cs.FilterMore(FOpContext, filters[0]) do
begin
deadCheck('processCodes#5');
Expand Down Expand Up @@ -3742,6 +3753,7 @@ procedure TFHIRValueSetExpander.includeCodes(cset: TFhirValueSetComposeIncludeW;
finally
prep.free;
end;
FOpContext.log('iterate filters done');
finally
fcl.free;
end;
Expand Down
4 changes: 2 additions & 2 deletions library/ftx/ftx_loinc_services.pas
Original file line number Diff line number Diff line change
Expand Up @@ -1042,9 +1042,9 @@ function TLOINCServices.filterBySQL(opContext : TTxOperationContext; c : TFDBCon
end;
c.terminate;
t := GetTickCount64-t;
opContext.log('LOINC filter: '+inttostr(l)+' rows for '+d+' ('+DescribePeriodMS(t)+', sql = '+sql+')');
opContext.log('LOINC filter: '+inttostr(l)+' rows for '+d+' ('+inttostr(t)+'ms)');
if (UnderDebugger) or (t > 1000) then
Logging.log('LOINC filter: '+inttostr(l)+' rows for '+d+' ('+DescribePeriodMS(t)+', sql = '+sql+')');
Logging.log('LOINC filter: '+inttostr(l)+' rows for '+d+' ('+inttostr(t)+'ms, sql = '+sql+')');
end;
SetLength(keys, l);
result := TLoincFilterHolder.create;
Expand Down
Loading