@nsshunt/ststestrunner 1.1.142 → 1.1.144

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1450,14 +1450,28 @@ var TestCaseFhir02 = class extends TestCaseFhirQueryBase {
1450
1450
  const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
1451
1451
  const prefix = this.runner.options.personPrefix;
1452
1452
  const personRecord = await this.GetPersonRecord(prefix, this.runner.iteration, "1");
1453
+ const bundleBatch = {
1454
+ "resourceType": "Bundle",
1455
+ "type": "transaction",
1456
+ "entry": []
1457
+ };
1458
+ bundleBatch.entry.push({
1459
+ fullUrl: personRecord.id,
1460
+ resource: personRecord,
1461
+ request: {
1462
+ method: "POST",
1463
+ url: "Person"
1464
+ }
1465
+ });
1453
1466
  const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
1454
- const retVal = await client.PostResource("Person", personRecord);
1467
+ const retVal = await client.ProcessBatchOrTransactionResources(bundleBatch);
1455
1468
  this._CheckOutputLongDurationError(__snapshot3, "await this.PostResource()");
1456
1469
  if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
1470
+ const retPersonData = { ...retVal.body.entry[0].resource };
1457
1471
  delete personRecord.meta;
1458
- delete retVal.body.meta;
1459
- this.CheckReturnData(personRecord, retVal.body);
1460
- return retVal.body;
1472
+ delete retPersonData.meta;
1473
+ this.CheckReturnData(personRecord, retPersonData);
1474
+ return retVal.body.entry[0].resource;
1461
1475
  };
1462
1476
  };
1463
1477
  //#endregion