Skip to content

Commit

Permalink
Additional logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Grahame Grieve committed Jan 16, 2024
1 parent b294d78 commit b32c6ac
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
3 changes: 2 additions & 1 deletion library/fsl/fsl_http.pas
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ interface
{$IFDEF WINDOWS} Windows, {$ENDIF}
{$IFDEF FPC}LazUTF8, {$ENDIF}
Classes, Generics.Collections, Generics.Defaults,
fsl_base, fsl_utilities, fsl_lang;
fsl_base, fsl_utilities, fsl_lang, fsl_logging;

const
HTTPUtilAnonymousItemName = 'ANONYMOUS';
Expand Down Expand Up @@ -738,6 +738,7 @@ procedure THTTPLanguageList.process;
v : Double;
wc : boolean;
begin
Logging.log('Lang: '+FSource);
i := 0;
for s in FSource.Split([',']) do
begin
Expand Down
29 changes: 29 additions & 0 deletions library/ftx/ftx_service.pas
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ TConceptDesignations = class (TFslObject)
function include(cd : TConceptDesignation; langList : THTTPLanguageList) : boolean;
function preferredDesignation(langList : THTTPLanguageList = nil) : TConceptDesignation;
function preferredDisplay(langList : THTTPLanguageList = nil) : String;
function summary : String;

property factory : TFHIRFactory read FFactory;
property baseLang : TIETFLang read FBaseLang write SetBaseLang;
Expand Down Expand Up @@ -493,26 +494,45 @@ function TConceptDesignations.preferredDesignation(langList : THTTPLanguageList
begin
for cd in FDesignations do
if (cd.base) and langMatches(lang, cd.language, true) then
begin
Logging.log('cd: '+langList.asString(true)+' * '+summary+' = '+cd.present);
exit(cd);
end;
for cd in FDesignations do
if isDisplay(cd) and langMatches(lang, cd.language, true) then
begin
Logging.log('cd: '+langList.asString(true)+' -4- '+summary+' = '+cd.present);
exit(cd);
end;

for cd in FDesignations do
if (cd.base) and langMatches(lang, cd.language, false) then
begin
Logging.log('cd: '+langList.asString(true)+' * '+summary+' = '+cd.present);
exit(cd);
end;
for cd in FDesignations do
if isDisplay(cd) and langMatches(lang, cd.language, false) then
begin
Logging.log('cd: '+langList.asString(true)+' * '+summary+' = '+cd.present);
exit(cd);
end;

for cd in FDesignations do
if langMatches(lang, cd.language, true) then
begin
Logging.log('cd: '+langList.asString(true)+' * '+summary+' = '+cd.present);
exit(cd);
end;
for cd in FDesignations do
if langMatches(lang, cd.language, false) then
begin
Logging.log('cd: '+langList.asString(true)+' * '+summary+' = '+cd.present);
exit(cd);
end;
end;
end;
Logging.log('cd: '+langList.asString(true)+' * '+summary+' = -> nil');
end;

function TConceptDesignations.preferredDisplay(langList : THTTPLanguageList): String;
Expand All @@ -526,6 +546,15 @@ function TConceptDesignations.preferredDisplay(langList : THTTPLanguageList): St
result := cd.display;
end;

function TConceptDesignations.summary: String;
var
cd : TConceptDesignation;
begin
result := '';
for cd in FDesignations do
CommaAdd(result, cd.present);
end;


function TConceptDesignations.displayCount(langList : THTTPLanguageList; displayOnly : boolean): integer;
var
Expand Down
2 changes: 1 addition & 1 deletion server/endpoint_txregistry.pas
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ procedure TTxRegistryUpdaterThread.Execute;
finally
FEndPoint.FTxRegistryServer.scanning := false;
end;
FEndPoint.FTxRegistryServer.NextScan := ((1/24) / 12); // every five minutes
FEndPoint.FTxRegistryServer.NextScan := ((1/24) / 4); // every ten minutes
end;

procedure TTxRegistryUpdaterThread.Initialise;
Expand Down

0 comments on commit b32c6ac

Please sign in to comment.