Skip to content

Commit 107c6c6

Browse files
author
Grahame Grieve
committed
Fix access violations validating codes
1 parent 0c65407 commit 107c6c6

3 files changed

Lines changed: 10 additions & 7 deletions

File tree

library/ftx/fhir_valuesets.pas

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -829,6 +829,7 @@ function TValueSetChecker.check(path, system, version, code: String; abstractOk,
829829
ts : TStringList;
830830
vss : TFHIRValueSetW;
831831
begin
832+
defLang := FLanguages.parse('en');
832833
FOpContext.addNote(FValueSet, 'Check "'+TTerminologyOperationContext.renderCoded(system, version, code)+'"');
833834
if (system = '') and not inferSystem then
834835
begin
@@ -2307,13 +2308,13 @@ function TValueSetChecker.checkConceptSet(path : String; cs: TCodeSystemProvider
23072308
listDisplays(displays, cs, loc);
23082309
if not (abstractOk or not cs.IsAbstract(FOpContext, loc)) then
23092310
begin
2310-
OpContext.addNote(FValueSet, 'Filter '+ctxt.summary+': Code "'+code+'" found in '+ TTerminologyOperationContext.renderCoded(cs)+' but is abstract');
2311+
OpContext.addNote(FValueSet, 'Filter '+fc.prop +' '+ CODES_TFhirFilterOperator[fc.Op]+ ' '+fc.value+': Code "'+code+'" found in '+ TTerminologyOperationContext.renderCoded(cs)+' but is abstract');
23112312
if (not FParams.membershipOnly) then
23122313
op.addIssue(isError, itBusinessRule, addToPath(path, 'code'), 'ABSTRACT_CODE_NOT_ALLOWED', FI18n.translate('ABSTRACT_CODE_NOT_ALLOWED', FParams.HTTPLanguages, [cs.systemUri, code]), oicCodeRule)
23132314
end
23142315
else if FValueSet.excludeInactives and cs.IsInactive(FOpContext, loc) then
23152316
begin
2316-
OpContext.addNote(FValueSet, 'Filter '+ctxt.summary+': Code "'+code+'" found in '+ TTerminologyOperationContext.renderCoded(cs)+' but is inactive');
2317+
OpContext.addNote(FValueSet, 'Filter '+fc.prop +' '+ CODES_TFhirFilterOperator[fc.Op]+ ' '+fc.value+': Code "'+code+'" found in '+ TTerminologyOperationContext.renderCoded(cs)+' but is inactive');
23172318
result := false;
23182319
if (not FParams.membershipOnly) then
23192320
begin
@@ -2323,7 +2324,7 @@ function TValueSetChecker.checkConceptSet(path : String; cs: TCodeSystemProvider
23232324
end
23242325
else
23252326
begin
2326-
OpContext.addNote(FValueSet, 'Filter '+ctxt.summary+': Code "'+code+'" found in '+ TTerminologyOperationContext.renderCoded(cs));
2327+
OpContext.addNote(FValueSet, 'Filter '+fc.prop +' '+ CODES_TFhirFilterOperator[fc.Op]+ ' '+fc.value+': Code "'+code+'" found in '+ TTerminologyOperationContext.renderCoded(cs));
23272328
if vcc <> nil then
23282329
vcc.addCoding(cs.systemUri, cs.version, cs.code(FOpContext, loc), displays.preferredDisplay(FParams.workingLanguages));
23292330
result := true;
@@ -2332,7 +2333,7 @@ function TValueSetChecker.checkConceptSet(path : String; cs: TCodeSystemProvider
23322333
end;
23332334
end
23342335
else
2335-
OpContext.addNote(FValueSet, 'Filter '+ctxt.summary+': Code "'+code+'" not found in '+ TTerminologyOperationContext.renderCoded(cs));
2336+
OpContext.addNote(FValueSet, 'Filter '+fc.prop +' '+ CODES_TFhirFilterOperator[fc.Op]+ ' '+fc.value+': Code "'+code+'" not found in '+ TTerminologyOperationContext.renderCoded(cs));
23362337
finally
23372338
loc.free;
23382339
end;

release-notes.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
## Change Notes for {ver}:
1+
## Change Notes for 3.7.13:
22

3-
*
3+
* Fix access violations validating codes
44

55
## Conformance Notes:
66

7-
*
7+
* tx.fhir.org passed 305 HL7 terminology service tests (mode 'tx.fhir.org', tests v1.7.7-SNAPSHOT, runner v6.5.14)

server/web_server.pas

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1316,6 +1316,8 @@ procedure TFhirWebServer.logCrash(secure : boolean; id, clientIP: String; reques
13161316
package.addStringUtf8(#13#10);
13171317
end;
13181318

1319+
1320+
package.addStringUtf8(#13#10);
13191321
package.addStringUtf8('-- Response --------------------------------------------------'#13#10);
13201322
package.addStringUtf8(inttostr(resp.ResponseNo)+' '+resp.ResponseText);
13211323
package.addStringUtf8(#13#10);

0 commit comments

Comments
 (0)