@nsshunt/ststestrunner 1.1.147 → 1.1.148
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.
- package/dist/ststestrunner.cjs +7 -39
- package/dist/ststestrunner.cjs.map +1 -1
- package/dist/ststestrunner.mjs +7 -39
- package/dist/ststestrunner.mjs.map +1 -1
- package/package.json +1 -1
- package/types/libmodule/testCaseFhir02.d.ts +0 -2
- package/types/libmodule/testCaseFhir02.d.ts.map +1 -1
- package/types/libmodule/testCaseFhir02bundle.d.ts +2 -0
- package/types/libmodule/testCaseFhir02bundle.d.ts.map +1 -1
package/dist/ststestrunner.cjs
CHANGED
|
@@ -1449,52 +1449,20 @@ var TestCaseFhir01 = class extends TestCaseFhirQueryBase {
|
|
|
1449
1449
|
//#endregion
|
|
1450
1450
|
//#region src/libmodule/testCaseFhir02.ts
|
|
1451
1451
|
var TestCaseFhir02 = class extends TestCaseFhirQueryBase {
|
|
1452
|
-
bundleBatch;
|
|
1453
|
-
personRecords = [];
|
|
1454
1452
|
PerformExecuteQuery = async () => {
|
|
1455
1453
|
const __snapshot1 = performance.now();
|
|
1456
1454
|
const client = await this.GetClient();
|
|
1457
1455
|
const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
|
|
1458
1456
|
const prefix = this.runner.options.personPrefix;
|
|
1459
|
-
const bundleSize = this.runner.options.bundleSize;
|
|
1460
|
-
if (this.runner.iteration === 0) this.bundleBatch = {
|
|
1461
|
-
"resourceType": "Bundle",
|
|
1462
|
-
"type": "transaction",
|
|
1463
|
-
"entry": []
|
|
1464
|
-
};
|
|
1465
1457
|
const personRecord = await this.GetPersonRecord(prefix, this.runner.iteration, "1");
|
|
1466
1458
|
const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
|
|
1467
|
-
|
|
1468
|
-
this.
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
}
|
|
1475
|
-
});
|
|
1476
|
-
let retVal = void 0;
|
|
1477
|
-
if (this.runner.iteration % bundleSize === bundleSize - 1) {
|
|
1478
|
-
retVal = await client.ProcessBatchOrTransactionResources(this.bundleBatch);
|
|
1479
|
-
this._CheckOutputLongDurationError(__snapshot3, "await this.PostResource()");
|
|
1480
|
-
this.bundleBatch.entry = [];
|
|
1481
|
-
} else if (this.runner.iteration === this.runner.options.executionProfile.iterations - 1) {
|
|
1482
|
-
retVal = await client.ProcessBatchOrTransactionResources(this.bundleBatch);
|
|
1483
|
-
this._CheckOutputLongDurationError(__snapshot3, "await this.PostResource()");
|
|
1484
|
-
this.bundleBatch.entry = [];
|
|
1485
|
-
}
|
|
1486
|
-
if (retVal && retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
|
|
1487
|
-
if (retVal) {
|
|
1488
|
-
for (let i = 0; i < retVal.body.entry.length - 1; i++) {
|
|
1489
|
-
const personRecord = this.personRecords[i];
|
|
1490
|
-
delete personRecord.meta;
|
|
1491
|
-
const retPersonData = { ...retVal.body.entry[i].resource };
|
|
1492
|
-
delete retPersonData.meta;
|
|
1493
|
-
this.CheckReturnData(personRecord, retPersonData);
|
|
1494
|
-
}
|
|
1495
|
-
this.personRecords = [];
|
|
1496
|
-
}
|
|
1497
|
-
return personRecord;
|
|
1459
|
+
const retVal = await client.PostResource("Person", personRecord);
|
|
1460
|
+
this._CheckOutputLongDurationError(__snapshot3, "await this.PostResource()");
|
|
1461
|
+
if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
|
|
1462
|
+
delete personRecord.meta;
|
|
1463
|
+
delete retVal.body.meta;
|
|
1464
|
+
this.CheckReturnData(personRecord, retVal.body);
|
|
1465
|
+
return retVal.body;
|
|
1498
1466
|
};
|
|
1499
1467
|
};
|
|
1500
1468
|
//#endregion
|