Skip to content

Commit a05aa0b

Browse files
author
Grahame Grieve
committed
Fix server to handle batches properly
1 parent 60e2fb8 commit a05aa0b

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

server/endpoint_txsvr.pas

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -972,6 +972,7 @@ function TTerminologyServerOperationEngine.ExecuteTransaction(context: TOperatio
972972
try
973973
if check(response, request.Resource.fhirType = 'Bundle', 400, langList, 'A bundle is required for a Transaction operation', itInvalid) then
974974
begin
975+
context.groupId := NewGuidId;
975976
req := factory.wrapBundle(request.resource.Link);
976977
resp := factory.wrapBundle(factory.makeResource('Bundle'));
977978
tt := TFslTimeTracker.create;

server/tx/tx_omop.pas

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,7 @@ function getVocabId(url : String) : Integer;
485485
else if (url = 'http://hl7.org/fhir/sid/ndc') then result := 44819105
486486
else if (url = 'http://unitsofmeasure.org') then result := 44819107
487487
else if (url = 'http://nucc.org/provider-taxonomy') then result := 44819137
488+
else if (url = 'http://www.whocc.no/atc') then result := 44819117
488489
else
489490
result := -1;
490491

@@ -528,7 +529,7 @@ function getUri(key : integer) : String;
528529
//44819108 Gender
529530
//44819109 Race
530531
//44819110 CMS Place of Service
531-
//44819117 ATC
532+
44819117: exit('http://www.whocc.no/atc'); // ATC
532533
//44819119 Visit
533534
//44819126 Drug Type
534535
//44819127 Condition Type

server/tx_operations.pas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1336,7 +1336,7 @@ function TFhirTerminologyOperation.processAdditionalResources(context : TOperati
13361336
cs : TFHIRCodeSystemW;
13371337
cm : TFHIRConceptMapW;
13381338
begin
1339-
cacheId := '';
1339+
cacheId := context.groupId;
13401340
list := TFslMetadataResourceList.Create;
13411341
try
13421342
if (mr <> nil) then

0 commit comments

Comments
 (0)