Skip to content

Commit fc1ec1f

Browse files
committed
Release Version 3.1.12
1 parent dfb1a11 commit fc1ec1f

19 files changed

+276
-253
lines changed

build/windows-full-release.bat

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ call build\windows-fhirserver.bat %tmp%
2525

2626
pause
2727

28-
rem exec\64\fhirserver.exe -tests -test-settings exec\64\fhir-tests.ini
28+
exec\64\fhirserver.exe -tests -test-settings exec\64\fhir-tests.ini -mode brief
2929

30-
rem if errorlevel 1 goto Quit
30+
if errorlevel 1 goto Quit
3131

3232
pause
3333

install/install-tk.iss

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
; AppID can never be changed as subsequent installations require the same installation ID each time
44
AppID=FHIRToolkit
55
AppName=Health Intersections FHIR Toolkit
6-
AppVerName=FHIRToolkit v3.1.11
6+
AppVerName=FHIRToolkit v3.1.12
77

88
; compilation control
99
OutputDir=..\install\build
10-
OutputBaseFilename=fhirtoolkit-win64-3.1.11
10+
OutputBaseFilename=fhirtoolkit-win64-3.1.12
1111
Compression=lzma2/ultra64
1212

1313
; 64 bit
@@ -32,11 +32,11 @@ UninstallFilesDir={app}\uninstall
3232
; win2000+ add/remove programs support
3333
AppPublisher=Health Intersections P/L
3434
AppPublisherURL=http://www.healthintersections.com.au
35-
AppVersion=3.1.11
35+
AppVersion=3.1.12
3636
AppSupportURL=https://github.com/grahamegrieve/fhirserver
3737
AppUpdatesURL=https://github.com/grahamegrieve/fhirserver
3838
AppCopyright=Copyright (c) Health Intersections Pty Ltd 2020+
39-
VersionInfoVersion=3.1.11.0
39+
VersionInfoVersion=3.1.12.0
4040

4141
; dialog support
4242
LicenseFile=..\license

install/install.iss

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
; AppID can never be changed as subsequent installations require the same installation ID each time
44
AppID=FHIRServer
55
AppName=Health Intersections FHIR Server
6-
AppVerName=FHIRServer v3.1.11
6+
AppVerName=FHIRServer v3.1.12
77

88
; compilation control
99
OutputDir=..\install\build
10-
OutputBaseFilename=fhirserver-win64-3.1.11
10+
OutputBaseFilename=fhirserver-win64-3.1.12
1111
Compression=lzma2/ultra64
1212

1313
; 64 bit
@@ -34,11 +34,11 @@ UninstallFilesDir={app}\uninstall
3434
; win2000+ add/remove programs support
3535
AppPublisher=Health Intersections P/L
3636
AppPublisherURL=http://www.healthintersections.com.au
37-
AppVersion=3.1.11
37+
AppVersion=3.1.12
3838
AppSupportURL=https://github.com/grahamegrieve/fhirserver
3939
AppUpdatesURL=https://github.com/grahamegrieve/fhirserver
4040
AppCopyright=Copyright (c) Health Intersections Pty Ltd 2011+
41-
VersionInfoVersion=3.1.11.0
41+
VersionInfoVersion=3.1.12.0
4242

4343
; dialog support
4444
LicenseFile=..\license

library/fhir-dev.inc

+13-1
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,21 @@
66

77
// do not make changes in the file fhir-status.inc - it is overwritten by either fhir-dev.inc or fhir-prod.inc by the build scripts
88

9+
// THIS IS DEVELOPMENT MODE
10+
911
{$C+} // assertions on - this is the important one - turns object tracking on and off consistently
1012
{$I+} // IO checking on - though this is probably useless?
1113
{$Q-} // overflow checking off - these are always off; doesn't run with them on
1214
{$R-} // range checking off - these are always off; doesn't run with them on
13-
{$OPTIMIZATION OFF} // all optimizations off for production
15+
{$OPTIMIZATION OFF} // all optimizations off for development
1416
{$D+} // debugging info on for development
17+
18+
{
19+
The base class TFslObject can track all instantiated objects.
20+
Doing so is useful for leak hunting in production, but is also a little costly.
21+
Enable it with this define
22+
}
23+
{$DEFINE OBJECT_TRACKING}
24+
25+
26+

library/fhir-prod.inc

+9
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,18 @@
66

77
// do not make changes in the file fhir-status.inc - it is overwritten by either fhir-dev.inc or fhir-prod.inc by the build scripts
88

9+
// THIS IS PRODUCTION MODE
10+
911
{$C-} // assertions off - this is the important one - turns object tracking off consistently
1012
{$I-} // IO checking off
1113
{$Q-} // overflow checking off - these are always off; doesn't run with them on
1214
{$R-} // range checking off - these are always off; doesn't run with them on
1315
{$OPTIMIZATION LEVEL3} // level 3 optimizations for production
1416
{$D-} // debugging info off for production
17+
18+
{
19+
The base class TFslObject can track all instantiated objects.
20+
Doing so is useful for leak hunting in production, but is also a little costly.
21+
Enable it with this define
22+
}
23+
{.$.DEFINE OBJECT_TRACKING}

library/fhir-status.inc

+9
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,18 @@
66

77
// do not make changes in the file fhir-status.inc - it is overwritten by either fhir-dev.inc or fhir-prod.inc by the build scripts
88

9+
// THIS IS PRODUCTION MODE
10+
911
{$C-} // assertions off - this is the important one - turns object tracking off consistently
1012
{$I-} // IO checking off
1113
{$Q-} // overflow checking off - these are always off; doesn't run with them on
1214
{$R-} // range checking off - these are always off; doesn't run with them on
1315
{$OPTIMIZATION LEVEL3} // level 3 optimizations for production
1416
{$D-} // debugging info off for production
17+
18+
{
19+
The base class TFslObject can track all instantiated objects.
20+
Doing so is useful for leak hunting in production, but is also a little costly.
21+
Enable it with this define
22+
}
23+
{.$.DEFINE OBJECT_TRACKING}

library/fhir.inc

+1-9
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,6 @@ Or in the case of FPC compiled applications, statically bound
6565
}
6666
{$DEFINE STATICLOAD_OPENSSL}
6767

68-
{$I fhir-status.inc} // see notes there
68+
{$i fhir-status.inc} // see notes there
6969

70-
{
71-
The base class TFslObject can track all instantiated objects.
72-
Doing so is useful for leak hunting in production, but is also a little costly.
73-
Enable it with this define
74-
}
75-
{$IFOPT D+}
76-
{$DEFINE OBJECT_TRACKING}
77-
{$ENDIF}
7870

library/fhir4b/fhir4b_profiles.pas

+3-2
Original file line numberDiff line numberDiff line change
@@ -1676,7 +1676,7 @@ function TBaseWorkerContextR4B.getStructure(ns, name: String): TFHIRStructureDef
16761676
list : TFslList<TFhirStructureDefinition>;
16771677
sd : TFhirStructureDefinition;
16781678
sns : String;
1679-
url : string;
1679+
url, u : string;
16801680
begin
16811681
list := TFslList<TFhirStructureDefinition>.Create;
16821682
try
@@ -1687,7 +1687,8 @@ function TBaseWorkerContextR4B.getStructure(ns, name: String): TFHIRStructureDef
16871687
url := 'http://hl7.org/fhir/StructureDefinition/'+name;
16881688
for sd in list do
16891689
begin
1690-
if (sd.url = url) then
1690+
u := sd.url;
1691+
if (u = url) then
16911692
exit(sd);
16921693
end;
16931694
end;

library/fsl/fsl_base.pas

+18-37
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,7 @@ interface
4444
{$ENDIF}
4545
EMPTY_HASH = -1;
4646

47-
{.$.DEFINE TRACK_CLASSES }
48-
49-
{$IFDEF TRACK_CLASSES}
47+
{$IFDEF OBJECT_TRACKING}
5048
const
5149
CLASS_NAME_OF_INTEREST = 'TFhirString';
5250
ID_OF_INTEREST = -1;
@@ -171,19 +169,15 @@ EJsonException = class (EFslException); // error reading or writing Json
171169
FTagObject : TObject;
172170
FOwningThread : TThreadId;
173171
FMagic : integer;
174-
{$IFDEF TRACK_CLASSES}
175-
FNamedInstance : string;
176-
{$ENDIF}
177-
{$IFOPT D+}
172+
{$IFDEF OBJECT_TRACKING}
178173
// This is a workaround for the delphi debugger not showing the actual class of an object that is polymorphic
179174
// It's sole purpose is to be visible in the debugger. No other functionality should depend on it
180175
FNamedClass : TNameString;
181176
FDebugInfo : String;
182-
{$ENDIF}
183-
{$IFDEF OBJECT_TRACKING}
184177
FSerial : integer;
185178
FNext, FPrev : TFslObject; // same class type
186179
FThreadName : String;
180+
FNamedInstance : string;
187181
{$ENDIF}
188182

189183
function ObjectCrossesThreads : boolean;
@@ -214,7 +208,7 @@ EJsonException = class (EFslException); // error reading or writing Json
214208
Function ErrorClass : EFslExceptionClass; Overload; Virtual;
215209

216210
function sizeInBytesV(magic : integer) : cardinal; virtual;
217-
{$IFDEF TRACK_CLASSES}
211+
{$IFDEF OBJECT_TRACKING}
218212
procedure freeNotification(done : boolean); virtual;
219213
{$ENDIF}
220214
Public
@@ -244,13 +238,9 @@ EJsonException = class (EFslException); // error reading or writing Json
244238

245239
Property FslObjectReferenceCount : TFslReferenceCount Read FFslObjectReferenceCount;
246240
property TagObject : TObject read FTagObject write FTagObject; // no ownership....
247-
{$IFDEF TRACK_CLASSES}
241+
{$IFDEF OBJECT_TRACKING}
248242
property NamedInstance : string read FNamedInstance write FNamedInstance;
249-
{$ENDIF}
250-
{$IFOPT D+}
251243
property NamedClass : TNameString read FNamedClass;
252-
{$ENDIF}
253-
{$IFDEF OBJECT_TRACKING}
254244
property SerialNumber : integer read FSerial;
255245
{$ENDIF}
256246
function debugInfo : String; virtual; // what's visible to the debugger
@@ -1047,17 +1037,13 @@ constructor TFslObject.Create;
10471037
{$ENDIF}
10481038
Begin
10491039
Inherited;
1050-
{$IFOPT D+}
1051-
FNamedClass := copy(ClassName, 1, 16);
1052-
{$ENDIF}
10531040
FOwningThread := GetCurrentThreadId;
10541041

1055-
{$IFDEF TRACK_CLASSES}
1042+
{$IFDEF OBJECT_TRACKING}
10561043
if (className = CLASS_NAME_OF_INTEREST) then
10571044
freeNotification(false);
1058-
{$ENDIF}
10591045

1060-
{$IFDEF OBJECT_TRACKING}
1046+
FNamedClass := copy(ClassName, 1, 16);
10611047
if not GInited then
10621048
initUnit;
10631049
if Assigned(GetThreadNameStatusDelegate) then
@@ -1079,7 +1065,7 @@ constructor TFslObject.Create;
10791065
inc(t.deltaCount);
10801066
inc(t.serial);
10811067
FSerial := t.serial;
1082-
{$IFDEF TRACK_CLASSES}
1068+
{$IFDEF OBJECT_TRACKING}
10831069
if (t.serial = ID_OF_INTEREST) and (className = CLASS_NAME_OF_INTEREST) then
10841070
NamedInstance := '!';
10851071
{$ENDIF}
@@ -1207,7 +1193,7 @@ procedure TFslObject.Free;
12071193
clsName := 'n/a';
12081194
nmCls := 'n/a';
12091195
try
1210-
{$IFOPT D+}
1196+
{$IFDEF OBJECT_TRACKING}
12111197
nmCls := FNamedClass;
12121198
{$ENDIF}
12131199
except
@@ -1235,7 +1221,7 @@ clsName := className;
12351221
dec(FFslObjectReferenceCount);
12361222
done := FFslObjectReferenceCount < 0;
12371223
end;
1238-
{$IFDEF TRACK_CLASSES}
1224+
{$IFDEF OBJECT_TRACKING}
12391225
if (classname = CLASS_NAME_OF_INTEREST) then
12401226
self.freeNotification(done);
12411227
{$ENDIF}
@@ -1352,7 +1338,7 @@ function TFslObject.Link: TFslObject;
13521338
InterlockedIncrement(FFslObjectReferenceCount)
13531339
else
13541340
inc(FFslObjectReferenceCount);
1355-
{$IFDEF TRACK_CLASSES}
1341+
{$IFDEF OBJECT_TRACKING}
13561342
if self.classname = CLASS_NAME_OF_INTEREST then
13571343
freeNotification(false);
13581344
{$ENDIF}
@@ -1525,7 +1511,7 @@ function TFslObject.debugInfo: String;
15251511

15261512
procedure TFslObject.updateDebugInfo;
15271513
begin
1528-
{$IFOPT D+}
1514+
{$IFDEF OBJECT_TRACKING}
15291515
FDebugInfo := debugInfo;
15301516
{$ENDIF}
15311517
end;
@@ -1548,19 +1534,16 @@ function TFslObject.ObjectCrossesThreads: boolean;
15481534
function TFslObject.dumpSummary: String;
15491535
begin
15501536
result := inttostr(FFslObjectReferenceCount+1);
1551-
{$IFDEF TRACK_CLASSES}
1537+
{$IFDEF OBJECT_TRACKING}
15521538
if FNamedInstance <> '' then
15531539
result := result + FNamedInstance
1554-
{$ELSE}
1555-
if false then
1556-
{$ENDIF}
1557-
{$IFDEF OBJECT_TRACKING}
15581540
else if (updatedDebugInfo <> '?') then
15591541
result := result +'(^'+FDebugInfo+')'
15601542
else if (FSerial > 0) then
15611543
result := result +'(#'+inttostr(FSerial)+')'
1544+
else
15621545
{$ENDIF}
1563-
else if FMagic <> 0 then
1546+
if FMagic <> 0 then
15641547
result := result +'($'+inttostr(FMagic)+')';
15651548
end;
15661549

@@ -1570,7 +1553,7 @@ function TFslObject.updatedDebugInfo: String;
15701553
updateDebugInfo;
15711554
except
15721555
end;
1573-
result := {$IFOPT D+}FDebugInfo{$ELSE}''{$ENDIF};
1556+
result := {$IFDEF OBJECT_TRACKING}FDebugInfo{$ELSE}''{$ENDIF};
15741557
end;
15751558

15761559
function TFslObject.CheckCondition(bCorrect: Boolean; const sMethod, sMessage: String): Boolean;
@@ -1652,15 +1635,13 @@ function TFslObject.sizeInBytes(magic : integer) : cardinal;
16521635
function TFslObject.sizeInBytesV(magic : integer) : cardinal;
16531636
begin
16541637
result := sizeof(self);
1655-
{$IFOPT D+}
1656-
inc(result, (length(FNamedClass))+2);
1657-
{$ENDIF}
16581638
{$IFDEF OBJECT_TRACKING}
1639+
inc(result, (length(FNamedClass))+2);
16591640
inc(result, length(FThreadName)+12);
16601641
{$ENDIF}
16611642
end;
16621643

1663-
{$IFDEF TRACK_CLASSES}
1644+
{$IFDEF OBJECT_TRACKING}
16641645
procedure noop(done : boolean);
16651646
begin
16661647
// nothing;

library/fsl/fsl_collections.pas

+1-2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
}
3030
{$I fhir.inc}
3131

32+
3233
Interface
3334

3435

@@ -1750,7 +1751,6 @@ TFslObjectListIterator = class(TFslObjectIterator)
17501751
uses
17511752
fsl_stream;
17521753

1753-
17541754
Procedure TFslCollection.BeforeDestruction;
17551755
Begin
17561756
InternalClear;
@@ -5525,7 +5525,6 @@ function TFslObjectList.ExistsByDefault(oValue: TFslObject): boolean;
55255525
Result := ExistsByIndex(IndexByDefault(oValue));
55265526
end;
55275527

5528-
55295528
function TFslObjectList.Add(oValue: TFslObject): integer;
55305529
begin
55315530
Assert(ValidateItem('Add', oValue, 'oValue'));

library/fsl/tests/fsl_tests.pas

+4-1
Original file line numberDiff line numberDiff line change
@@ -5137,8 +5137,11 @@ procedure TFslCollectionsTests.testAdd;
51375137
end;
51385138

51395139
procedure TFslCollectionsTests.executeFail(context : TObject);
5140+
var
5141+
o : TFslTestObjectList;
51405142
begin
5141-
list.Add(TFslTestObjectList.create);
5143+
o:= TFslTestObjectList.create;
5144+
list.Add(o);
51425145
end;
51435146

51445147
procedure TFslCollectionsTests.testAddFail;

library/version.inc

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
FHIR_CODE_FULL_VERSION = '3.1.11';
1+
FHIR_CODE_FULL_VERSION = '3.1.12';
22
FHIR_CODE_RELEASE_DATE = '2024-03-09';
3-
FHIR_CODE_RELEASE_DATETIME = '20240309051040.707Z';
3+
FHIR_CODE_RELEASE_DATETIME = '20240309120644.755Z';

0 commit comments

Comments
 (0)