Skip to content

Commit

Permalink
Merge branch 'HealthIntersections:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
costateixeira authored Dec 31, 2023
2 parents c81dc88 + fbd42bd commit 63521c7
Show file tree
Hide file tree
Showing 6 changed files with 181 additions and 79 deletions.
6 changes: 3 additions & 3 deletions exec/pack/Messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ UNKNOWN_CODE_IN_FRAGMENT = Unknown Code ''{0}'' in the system ''{1}'' version ''
Code_found_in_expansion_however_ = Code found in expansion, however: {0}
None_of_the_provided_codes_are_in_the_value_set_one = The provided code {2} was not found in the value set ''{1}''
None_of_the_provided_codes_are_in_the_value_set_other = None of the provided codes [{2}] are in the value set ''{1}''
Coding_has_no_system__cannot_validate = Coding has no system - cannot validate
Coding_has_no_system__cannot_validate = Coding has no system. A code with no system has no defined meaning, and it cannot be validated. A system should be provided
Unable_to_handle_system__concept_filter_with_op__ = Unable to handle system {0} concept filter with op = {1}
UNABLE_TO_HANDLE_SYSTEM__PROPERTY_FILTER_WITH_OP__ = Unable to handle system {0} property filter with op = {1}
Unable_to_handle_system__filter_with_property__ = Unable to handle system {0} filter with property = {1}, op = {2}
Expand Down Expand Up @@ -926,8 +926,8 @@ SM_DEPENDENT_PARAM_TYPE_MISMATCH_DUPLICATE = The group {0} has already been used
CONCEPTMAP_GROUP_SOURCE_INCOMPLETE = Source Code System {0} doesn''t have all content (content = {1}), so the source codes cannot be checked
CONCEPTMAP_GROUP_TARGET_INCOMPLETE = Target Code System {0} doesn''t have all content (content = {1}), so the target codes cannot be checked
SD_NO_TYPE_CODE_ON_CODE = Snapshot for {1} element {0} has type.code without a value
UNKNOWN_CODESYSTEM = The code system {0} could not be found
UNKNOWN_CODESYSTEM_VERSION = The code system {0} version {1} could not be found. Valid versions: {2}
UNKNOWN_CODESYSTEM = A definition for CodeSystem {0} could not be found, so the code cannot be validated
UNKNOWN_CODESYSTEM_VERSION = A definition for CodeSystem {0} version {1} could not be found, so the code cannot be validated. Valid versions: {2}
UNABLE_TO_INFER_CODESYSTEM = The System URI could not be determined for the code {0} in the ValueSet {1}
VALUESET_TOO_COSTLY = The value set {0} has too many codes to display ({1})
VALUESET_TOO_COSTLY_TIME = The value set {0} took too long to process (>{1}sec)
Expand Down
4 changes: 2 additions & 2 deletions library/fhir/fhir_common.pas
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ interface
TObservationStatus = (obssNull, obssRegistered, obssPreliminary, obssFinal, obssAmended, obssCorrected, obssCancelled, obssEnteredInError, obssUnknown);
TTokenCategory = (tcClinical, tcData, tcMeds, tcSchedule, tcAudit, tcDocuments, tcFinancial, tcMedicationDefinition, tcOther);
TIdentifierUse = (iuNull, iuUsual, iuOfficial, iuTemp, iuSecondary, iuOld);
TOpIssueCode = (oicVoid, oicNotInVS, oicThisNotInVS, oicInvalidCode, oicDisplay, oicNotFound, oicCodeRule, oicVSProcessing, oicInferFailed, oicStatusCheck);
TOpIssueCode = (oicVoid, oicNotInVS, oicThisNotInVS, oicInvalidCode, oicDisplay, oicNotFound, oicCodeRule, oicVSProcessing, oicInferFailed, oicStatusCheck, oicInvalidData);

const
CODES_TFhirFilterOperator: Array[TFilterOperator] of String = ('', '=', 'is-a', 'descendent-of', 'is-not-a', 'regex', 'in', 'not-in', 'generalizes', 'exists', 'child-of', 'descendent-leaf');
CODES_TPublicationStatus: Array[TPublicationStatus] of String = ('', 'draft', 'active', 'retired');
CODES_TTokenCategory : array [TTokenCategory] of String = ('Clinical', 'Data', 'Meds', 'Schedule', 'Audit', 'Documents', 'Financial', 'MedicationDefinitions', 'Other');
CODES_TOpIssueCode : array [TOpIssueCode] of String = ('', 'not-in-vs', 'this-code-not-in-vs', 'invalid-code', 'invalid-display', 'not-found', 'code-rule', 'vs-invalid', 'cannot-infer', 'status-check');
CODES_TOpIssueCode : array [TOpIssueCode] of String = ('', 'not-in-vs', 'this-code-not-in-vs', 'invalid-code', 'invalid-display', 'not-found', 'code-rule', 'vs-invalid', 'cannot-infer', 'status-check', 'invalid-data');

type

Expand Down
44 changes: 25 additions & 19 deletions library/fsl/tests/fsl_tests.pas
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,16 @@
interface

Uses
{$IFDEF WINDOWS} Windows, {$ENDIF} SysUtils, Classes, {$IFNDEF FPC}Soap.EncdDecd, System.NetEncoding, {$ENDIF} SyncObjs, zlib,
{$IFDEF WINDOWS} Windows, {$ENDIF} SysUtils, Classes, {$IFNDEF FPC}Soap.EncdDecd, System.NetEncoding, {$ENDIF} SyncObjs,
zlib, zstream,
{$IFDEF FPC} FPCUnit, TestRegistry, RegExpr, {$ELSE} TestFramework, {$ENDIF} fsl_testing,
IdGlobalProtocols,
fsl_base, fsl_utilities, fsl_stream, fsl_threads, fsl_collections, fsl_fpc, fsl_versions,
fsl_xml,
{$IFNDEF FPC}
fsl_msxml,
{$ENDIF}
fsl_json, fsl_turtle, fsl_comparisons;
fsl_json, fsl_turtle, fsl_comparisons, fsl_npm;

Type
TFslTestString = class (TFslObject)
Expand Down Expand Up @@ -5264,39 +5265,44 @@ procedure TXmlUtilsTest.TestUnPretty;

function TTarGZParserTests.load(filename : String) : TFslList<TFslNameBuffer>;
var
bs : TBytesStream;
z : TZDecompressionStream;
tar : TTarArchive;
entry : TTarDirRec;
mem : TMemoryStream;
n : String;
b : TBytes;
bi : TBytesStream;
item : TFslNameBuffer;
stream : TFileStream;
begin
begin
result := TFslList<TFslNameBuffer>.Create;
try
stream := TFileStream.Create(filename, fmOpenRead);
bs := TBytesStream.create(readZLibHeader(TFileStream.create(filename, fmOpenRead)));
try
z := TZDecompressionStream.Create(stream, false); // 15+16);
z := TZDecompressionStream.Create(bs, true); // 15+16);
try
tar := TTarArchive.Create(z);
try
tar.Reset;
while tar.FindNext(entry) do
begin
n := String(entry.Name);
if (n.contains('..')) then
raise EFSLException.create('The package contains the file "'+n+'". Packages are not allowed to contain files with ".." in the name');
bi := TBytesStream.Create;
try
tar.ReadFile(bi);
b := copy(bi.Bytes, 0, bi.size);
finally
bi.free;
end;
item := TFslNameBuffer.Create;
try
item.Name := String(entry.Name);
mem := TMemoryStream.Create;
try
tar.ReadFile(mem);
mem.position := 0;
item.loadFromStream(mem);
finally
mem.free;
end;
item.Name := n;
item.AsBytes := b;
result.Add(item.link)
finally
item.free;
end;
//break;
end;
finally
tar.free;
Expand All @@ -5305,8 +5311,8 @@ function TTarGZParserTests.load(filename : String) : TFslList<TFslNameBuffer>;
z.free;
end;
finally
stream.free;
end;
bs.free;
end;
result.link;
finally
result.free;
Expand Down
1 change: 0 additions & 1 deletion library/fsl/tests/fsl_tests_web.pas
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,6 @@ procedure TOpenSSLTests.testWebServer_110;
begin
assertTrue(TestSettings.SSLCertFile <> '', 'Must provide public key file for SSL test in '+TestSettings.filename+' ([ssl] cert=)');
assertTrue(TestSettings.SSLKeyFile <> '', 'Must provide private key file for SSL test in '+TestSettings.filename+' ([ssl] key=)');
assertTrue(TestSettings.SSLPassword <> '', 'Must provide password for private key for SSL test in '+TestSettings.filename+' ([ssl] password=)');
assertTrue(TestSettings.SSLCAFile <> '', 'Must provide ca cert file for SSL test in '+TestSettings.filename+' ([ssl] cacert=)');

assertTrue(FileExists(TestSettings.SSLCertFile), 'SSL Certificate not found at '+TestSettings.SSLCertFile);
Expand Down
Loading

0 comments on commit 63521c7

Please sign in to comment.