@medplum/agent 2.1.1 → 2.1.2
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/cjs/index.cjs +240 -221
- package/package.json +4 -4
package/dist/cjs/index.cjs
CHANGED
|
@@ -30,9 +30,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
30
30
|
));
|
|
31
31
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
32
32
|
|
|
33
|
-
// node_modules/ws/lib/stream.js
|
|
33
|
+
// ../../node_modules/ws/lib/stream.js
|
|
34
34
|
var require_stream = __commonJS({
|
|
35
|
-
"node_modules/ws/lib/stream.js"(exports, module2) {
|
|
35
|
+
"../../node_modules/ws/lib/stream.js"(exports, module2) {
|
|
36
36
|
"use strict";
|
|
37
37
|
var { Duplex } = require("stream");
|
|
38
38
|
function emitClose(stream) {
|
|
@@ -135,9 +135,9 @@ var require_stream = __commonJS({
|
|
|
135
135
|
}
|
|
136
136
|
});
|
|
137
137
|
|
|
138
|
-
// node_modules/ws/lib/constants.js
|
|
138
|
+
// ../../node_modules/ws/lib/constants.js
|
|
139
139
|
var require_constants = __commonJS({
|
|
140
|
-
"node_modules/ws/lib/constants.js"(exports, module2) {
|
|
140
|
+
"../../node_modules/ws/lib/constants.js"(exports, module2) {
|
|
141
141
|
"use strict";
|
|
142
142
|
module2.exports = {
|
|
143
143
|
BINARY_TYPES: ["nodebuffer", "arraybuffer", "fragments"],
|
|
@@ -153,9 +153,9 @@ var require_constants = __commonJS({
|
|
|
153
153
|
}
|
|
154
154
|
});
|
|
155
155
|
|
|
156
|
-
// node_modules/ws/lib/buffer-util.js
|
|
156
|
+
// ../../node_modules/ws/lib/buffer-util.js
|
|
157
157
|
var require_buffer_util = __commonJS({
|
|
158
|
-
"node_modules/ws/lib/buffer-util.js"(exports, module2) {
|
|
158
|
+
"../../node_modules/ws/lib/buffer-util.js"(exports, module2) {
|
|
159
159
|
"use strict";
|
|
160
160
|
var { EMPTY_BUFFER } = require_constants();
|
|
161
161
|
var FastBuffer = Buffer[Symbol.species];
|
|
@@ -235,9 +235,9 @@ var require_buffer_util = __commonJS({
|
|
|
235
235
|
}
|
|
236
236
|
});
|
|
237
237
|
|
|
238
|
-
// node_modules/ws/lib/limiter.js
|
|
238
|
+
// ../../node_modules/ws/lib/limiter.js
|
|
239
239
|
var require_limiter = __commonJS({
|
|
240
|
-
"node_modules/ws/lib/limiter.js"(exports, module2) {
|
|
240
|
+
"../../node_modules/ws/lib/limiter.js"(exports, module2) {
|
|
241
241
|
"use strict";
|
|
242
242
|
var kDone = Symbol("kDone");
|
|
243
243
|
var kRun = Symbol("kRun");
|
|
@@ -286,9 +286,9 @@ var require_limiter = __commonJS({
|
|
|
286
286
|
}
|
|
287
287
|
});
|
|
288
288
|
|
|
289
|
-
// node_modules/ws/lib/permessage-deflate.js
|
|
289
|
+
// ../../node_modules/ws/lib/permessage-deflate.js
|
|
290
290
|
var require_permessage_deflate = __commonJS({
|
|
291
|
-
"node_modules/ws/lib/permessage-deflate.js"(exports, module2) {
|
|
291
|
+
"../../node_modules/ws/lib/permessage-deflate.js"(exports, module2) {
|
|
292
292
|
"use strict";
|
|
293
293
|
var zlib = require("zlib");
|
|
294
294
|
var bufferUtil = require_buffer_util();
|
|
@@ -666,9 +666,9 @@ var require_permessage_deflate = __commonJS({
|
|
|
666
666
|
}
|
|
667
667
|
});
|
|
668
668
|
|
|
669
|
-
// node_modules/ws/lib/validation.js
|
|
669
|
+
// ../../node_modules/ws/lib/validation.js
|
|
670
670
|
var require_validation = __commonJS({
|
|
671
|
-
"node_modules/ws/lib/validation.js"(exports, module2) {
|
|
671
|
+
"../../node_modules/ws/lib/validation.js"(exports, module2) {
|
|
672
672
|
"use strict";
|
|
673
673
|
var { isUtf8 } = require("buffer");
|
|
674
674
|
var tokenChars = [
|
|
@@ -862,9 +862,9 @@ var require_validation = __commonJS({
|
|
|
862
862
|
}
|
|
863
863
|
});
|
|
864
864
|
|
|
865
|
-
// node_modules/ws/lib/receiver.js
|
|
865
|
+
// ../../node_modules/ws/lib/receiver.js
|
|
866
866
|
var require_receiver = __commonJS({
|
|
867
|
-
"node_modules/ws/lib/receiver.js"(exports, module2) {
|
|
867
|
+
"../../node_modules/ws/lib/receiver.js"(exports, module2) {
|
|
868
868
|
"use strict";
|
|
869
869
|
var { Writable } = require("stream");
|
|
870
870
|
var PerMessageDeflate = require_permessage_deflate();
|
|
@@ -877,12 +877,14 @@ var require_receiver = __commonJS({
|
|
|
877
877
|
var { concat, toArrayBuffer, unmask } = require_buffer_util();
|
|
878
878
|
var { isValidStatusCode, isValidUTF8 } = require_validation();
|
|
879
879
|
var FastBuffer = Buffer[Symbol.species];
|
|
880
|
+
var promise = Promise.resolve();
|
|
880
881
|
var GET_INFO = 0;
|
|
881
882
|
var GET_PAYLOAD_LENGTH_16 = 1;
|
|
882
883
|
var GET_PAYLOAD_LENGTH_64 = 2;
|
|
883
884
|
var GET_MASK = 3;
|
|
884
885
|
var GET_DATA = 4;
|
|
885
886
|
var INFLATING = 5;
|
|
887
|
+
var WAIT_MICROTASK = 6;
|
|
886
888
|
var Receiver2 = class extends Writable {
|
|
887
889
|
/**
|
|
888
890
|
* Creates a Receiver instance.
|
|
@@ -999,8 +1001,15 @@ var require_receiver = __commonJS({
|
|
|
999
1001
|
case GET_DATA:
|
|
1000
1002
|
err = this.getData(cb);
|
|
1001
1003
|
break;
|
|
1004
|
+
case INFLATING:
|
|
1005
|
+
this._loop = false;
|
|
1006
|
+
return;
|
|
1002
1007
|
default:
|
|
1003
1008
|
this._loop = false;
|
|
1009
|
+
promise.then(() => {
|
|
1010
|
+
this._state = GET_INFO;
|
|
1011
|
+
this.startLoop(cb);
|
|
1012
|
+
});
|
|
1004
1013
|
return;
|
|
1005
1014
|
}
|
|
1006
1015
|
} while (this._loop);
|
|
@@ -1285,9 +1294,9 @@ var require_receiver = __commonJS({
|
|
|
1285
1294
|
}
|
|
1286
1295
|
this._fragments.push(buf);
|
|
1287
1296
|
}
|
|
1288
|
-
const
|
|
1289
|
-
if (
|
|
1290
|
-
return cb(
|
|
1297
|
+
const er = this.dataMessage();
|
|
1298
|
+
if (er)
|
|
1299
|
+
return cb(er);
|
|
1291
1300
|
this.startLoop(cb);
|
|
1292
1301
|
});
|
|
1293
1302
|
}
|
|
@@ -1330,7 +1339,7 @@ var require_receiver = __commonJS({
|
|
|
1330
1339
|
this.emit("message", buf, false);
|
|
1331
1340
|
}
|
|
1332
1341
|
}
|
|
1333
|
-
this._state =
|
|
1342
|
+
this._state = WAIT_MICROTASK;
|
|
1334
1343
|
}
|
|
1335
1344
|
/**
|
|
1336
1345
|
* Handles a control message.
|
|
@@ -1345,6 +1354,7 @@ var require_receiver = __commonJS({
|
|
|
1345
1354
|
if (data.length === 0) {
|
|
1346
1355
|
this.emit("conclude", 1005, EMPTY_BUFFER);
|
|
1347
1356
|
this.end();
|
|
1357
|
+
this._state = GET_INFO;
|
|
1348
1358
|
} else {
|
|
1349
1359
|
const code = data.readUInt16BE(0);
|
|
1350
1360
|
if (!isValidStatusCode(code)) {
|
|
@@ -1372,13 +1382,15 @@ var require_receiver = __commonJS({
|
|
|
1372
1382
|
}
|
|
1373
1383
|
this.emit("conclude", code, buf);
|
|
1374
1384
|
this.end();
|
|
1385
|
+
this._state = GET_INFO;
|
|
1375
1386
|
}
|
|
1376
1387
|
} else if (this._opcode === 9) {
|
|
1377
1388
|
this.emit("ping", data);
|
|
1389
|
+
this._state = WAIT_MICROTASK;
|
|
1378
1390
|
} else {
|
|
1379
1391
|
this.emit("pong", data);
|
|
1392
|
+
this._state = WAIT_MICROTASK;
|
|
1380
1393
|
}
|
|
1381
|
-
this._state = GET_INFO;
|
|
1382
1394
|
}
|
|
1383
1395
|
};
|
|
1384
1396
|
module2.exports = Receiver2;
|
|
@@ -1394,12 +1406,11 @@ var require_receiver = __commonJS({
|
|
|
1394
1406
|
}
|
|
1395
1407
|
});
|
|
1396
1408
|
|
|
1397
|
-
// node_modules/ws/lib/sender.js
|
|
1409
|
+
// ../../node_modules/ws/lib/sender.js
|
|
1398
1410
|
var require_sender = __commonJS({
|
|
1399
|
-
"node_modules/ws/lib/sender.js"(exports, module2) {
|
|
1411
|
+
"../../node_modules/ws/lib/sender.js"(exports, module2) {
|
|
1400
1412
|
"use strict";
|
|
1401
|
-
var
|
|
1402
|
-
var tls = require("tls");
|
|
1413
|
+
var { Duplex } = require("stream");
|
|
1403
1414
|
var { randomFillSync } = require("crypto");
|
|
1404
1415
|
var PerMessageDeflate = require_permessage_deflate();
|
|
1405
1416
|
var { EMPTY_BUFFER } = require_constants();
|
|
@@ -1411,7 +1422,7 @@ var require_sender = __commonJS({
|
|
|
1411
1422
|
/**
|
|
1412
1423
|
* Creates a Sender instance.
|
|
1413
1424
|
*
|
|
1414
|
-
* @param {
|
|
1425
|
+
* @param {Duplex} socket The connection socket
|
|
1415
1426
|
* @param {Object} [extensions] An object containing the negotiated extensions
|
|
1416
1427
|
* @param {Function} [generateMask] The function used to generate the masking
|
|
1417
1428
|
* key
|
|
@@ -1806,9 +1817,9 @@ var require_sender = __commonJS({
|
|
|
1806
1817
|
}
|
|
1807
1818
|
});
|
|
1808
1819
|
|
|
1809
|
-
// node_modules/ws/lib/event-target.js
|
|
1820
|
+
// ../../node_modules/ws/lib/event-target.js
|
|
1810
1821
|
var require_event_target = __commonJS({
|
|
1811
|
-
"node_modules/ws/lib/event-target.js"(exports, module2) {
|
|
1822
|
+
"../../node_modules/ws/lib/event-target.js"(exports, module2) {
|
|
1812
1823
|
"use strict";
|
|
1813
1824
|
var { kForOnEventAttribute, kListener } = require_constants();
|
|
1814
1825
|
var kCode = Symbol("kCode");
|
|
@@ -2035,9 +2046,9 @@ var require_event_target = __commonJS({
|
|
|
2035
2046
|
}
|
|
2036
2047
|
});
|
|
2037
2048
|
|
|
2038
|
-
// node_modules/ws/lib/extension.js
|
|
2049
|
+
// ../../node_modules/ws/lib/extension.js
|
|
2039
2050
|
var require_extension = __commonJS({
|
|
2040
|
-
"node_modules/ws/lib/extension.js"(exports, module2) {
|
|
2051
|
+
"../../node_modules/ws/lib/extension.js"(exports, module2) {
|
|
2041
2052
|
"use strict";
|
|
2042
2053
|
var { tokenChars } = require_validation();
|
|
2043
2054
|
function push(dest, name, elem) {
|
|
@@ -2205,9 +2216,9 @@ var require_extension = __commonJS({
|
|
|
2205
2216
|
}
|
|
2206
2217
|
});
|
|
2207
2218
|
|
|
2208
|
-
// node_modules/ws/lib/websocket.js
|
|
2219
|
+
// ../../node_modules/ws/lib/websocket.js
|
|
2209
2220
|
var require_websocket = __commonJS({
|
|
2210
|
-
"node_modules/ws/lib/websocket.js"(exports, module2) {
|
|
2221
|
+
"../../node_modules/ws/lib/websocket.js"(exports, module2) {
|
|
2211
2222
|
"use strict";
|
|
2212
2223
|
var EventEmitter = require("events");
|
|
2213
2224
|
var https = require("https");
|
|
@@ -2215,7 +2226,7 @@ var require_websocket = __commonJS({
|
|
|
2215
2226
|
var net = require("net");
|
|
2216
2227
|
var tls = require("tls");
|
|
2217
2228
|
var { randomBytes, createHash } = require("crypto");
|
|
2218
|
-
var { Readable } = require("stream");
|
|
2229
|
+
var { Duplex, Readable } = require("stream");
|
|
2219
2230
|
var { URL: URL2 } = require("url");
|
|
2220
2231
|
var PerMessageDeflate = require_permessage_deflate();
|
|
2221
2232
|
var Receiver2 = require_receiver();
|
|
@@ -2368,8 +2379,7 @@ var require_websocket = __commonJS({
|
|
|
2368
2379
|
/**
|
|
2369
2380
|
* Set up the socket and the internal resources.
|
|
2370
2381
|
*
|
|
2371
|
-
* @param {
|
|
2372
|
-
* server and client
|
|
2382
|
+
* @param {Duplex} socket The network socket between the server and client
|
|
2373
2383
|
* @param {Buffer} head The first packet of the upgraded stream
|
|
2374
2384
|
* @param {Object} options Options object
|
|
2375
2385
|
* @param {Function} [options.generateMask] The function used to generate the
|
|
@@ -2398,8 +2408,10 @@ var require_websocket = __commonJS({
|
|
|
2398
2408
|
receiver.on("message", receiverOnMessage);
|
|
2399
2409
|
receiver.on("ping", receiverOnPing);
|
|
2400
2410
|
receiver.on("pong", receiverOnPong);
|
|
2401
|
-
socket.setTimeout
|
|
2402
|
-
|
|
2411
|
+
if (socket.setTimeout)
|
|
2412
|
+
socket.setTimeout(0);
|
|
2413
|
+
if (socket.setNoDelay)
|
|
2414
|
+
socket.setNoDelay();
|
|
2403
2415
|
if (head.length > 0)
|
|
2404
2416
|
socket.unshift(head);
|
|
2405
2417
|
socket.on("close", socketOnClose);
|
|
@@ -2716,20 +2728,24 @@ var require_websocket = __commonJS({
|
|
|
2716
2728
|
let parsedUrl;
|
|
2717
2729
|
if (address instanceof URL2) {
|
|
2718
2730
|
parsedUrl = address;
|
|
2719
|
-
websocket._url = address.href;
|
|
2720
2731
|
} else {
|
|
2721
2732
|
try {
|
|
2722
2733
|
parsedUrl = new URL2(address);
|
|
2723
2734
|
} catch (e) {
|
|
2724
2735
|
throw new SyntaxError(`Invalid URL: ${address}`);
|
|
2725
2736
|
}
|
|
2726
|
-
websocket._url = address;
|
|
2727
2737
|
}
|
|
2738
|
+
if (parsedUrl.protocol === "http:") {
|
|
2739
|
+
parsedUrl.protocol = "ws:";
|
|
2740
|
+
} else if (parsedUrl.protocol === "https:") {
|
|
2741
|
+
parsedUrl.protocol = "wss:";
|
|
2742
|
+
}
|
|
2743
|
+
websocket._url = parsedUrl.href;
|
|
2728
2744
|
const isSecure = parsedUrl.protocol === "wss:";
|
|
2729
2745
|
const isIpcUrl = parsedUrl.protocol === "ws+unix:";
|
|
2730
2746
|
let invalidUrlMessage;
|
|
2731
2747
|
if (parsedUrl.protocol !== "ws:" && !isSecure && !isIpcUrl) {
|
|
2732
|
-
invalidUrlMessage = `The URL's protocol must be one of "ws:", "wss:", or "ws+unix:"`;
|
|
2748
|
+
invalidUrlMessage = `The URL's protocol must be one of "ws:", "wss:", "http:", "https", or "ws+unix:"`;
|
|
2733
2749
|
} else if (isIpcUrl && !parsedUrl.pathname) {
|
|
2734
2750
|
invalidUrlMessage = "The URL's pathname is empty";
|
|
2735
2751
|
} else if (parsedUrl.hash) {
|
|
@@ -3077,9 +3093,9 @@ var require_websocket = __commonJS({
|
|
|
3077
3093
|
}
|
|
3078
3094
|
});
|
|
3079
3095
|
|
|
3080
|
-
// node_modules/ws/lib/subprotocol.js
|
|
3096
|
+
// ../../node_modules/ws/lib/subprotocol.js
|
|
3081
3097
|
var require_subprotocol = __commonJS({
|
|
3082
|
-
"node_modules/ws/lib/subprotocol.js"(exports, module2) {
|
|
3098
|
+
"../../node_modules/ws/lib/subprotocol.js"(exports, module2) {
|
|
3083
3099
|
"use strict";
|
|
3084
3100
|
var { tokenChars } = require_validation();
|
|
3085
3101
|
function parse(header) {
|
|
@@ -3125,15 +3141,13 @@ var require_subprotocol = __commonJS({
|
|
|
3125
3141
|
}
|
|
3126
3142
|
});
|
|
3127
3143
|
|
|
3128
|
-
// node_modules/ws/lib/websocket-server.js
|
|
3144
|
+
// ../../node_modules/ws/lib/websocket-server.js
|
|
3129
3145
|
var require_websocket_server = __commonJS({
|
|
3130
|
-
"node_modules/ws/lib/websocket-server.js"(exports, module2) {
|
|
3146
|
+
"../../node_modules/ws/lib/websocket-server.js"(exports, module2) {
|
|
3131
3147
|
"use strict";
|
|
3132
3148
|
var EventEmitter = require("events");
|
|
3133
3149
|
var http = require("http");
|
|
3134
|
-
var
|
|
3135
|
-
var net = require("net");
|
|
3136
|
-
var tls = require("tls");
|
|
3150
|
+
var { Duplex } = require("stream");
|
|
3137
3151
|
var { createHash } = require("crypto");
|
|
3138
3152
|
var extension = require_extension();
|
|
3139
3153
|
var PerMessageDeflate = require_permessage_deflate();
|
|
@@ -3314,8 +3328,7 @@ var require_websocket_server = __commonJS({
|
|
|
3314
3328
|
* Handle a HTTP Upgrade request.
|
|
3315
3329
|
*
|
|
3316
3330
|
* @param {http.IncomingMessage} req The request object
|
|
3317
|
-
* @param {
|
|
3318
|
-
* server and client
|
|
3331
|
+
* @param {Duplex} socket The network socket between the server and client
|
|
3319
3332
|
* @param {Buffer} head The first packet of the upgraded stream
|
|
3320
3333
|
* @param {Function} cb Callback
|
|
3321
3334
|
* @public
|
|
@@ -3414,8 +3427,7 @@ var require_websocket_server = __commonJS({
|
|
|
3414
3427
|
* @param {String} key The value of the `Sec-WebSocket-Key` header
|
|
3415
3428
|
* @param {Set} protocols The subprotocols
|
|
3416
3429
|
* @param {http.IncomingMessage} req The request object
|
|
3417
|
-
* @param {
|
|
3418
|
-
* server and client
|
|
3430
|
+
* @param {Duplex} socket The network socket between the server and client
|
|
3419
3431
|
* @param {Buffer} head The first packet of the upgraded stream
|
|
3420
3432
|
* @param {Function} cb Callback
|
|
3421
3433
|
* @throws {Error} If called more than once with the same socket
|
|
@@ -3530,30 +3542,30 @@ var Ye = "ok";
|
|
|
3530
3542
|
var Xe = "created";
|
|
3531
3543
|
var et = "not-modified";
|
|
3532
3544
|
var tt = "not-found";
|
|
3533
|
-
var
|
|
3534
|
-
var
|
|
3545
|
+
var ge = "accepted";
|
|
3546
|
+
var jt = { resourceType: "OperationOutcome", id: tt, issue: [{ severity: "error", code: "not-found", details: { text: "Not found" } }] };
|
|
3535
3547
|
function k(r4, e) {
|
|
3536
3548
|
return { resourceType: "OperationOutcome", issue: [{ severity: "error", code: "invalid", details: { text: r4 }, expression: e ? [e] : void 0 }] };
|
|
3537
3549
|
}
|
|
3538
|
-
function
|
|
3550
|
+
function xe(r4) {
|
|
3539
3551
|
return typeof r4 == "object" && r4 !== null && r4.resourceType === "OperationOutcome";
|
|
3540
3552
|
}
|
|
3541
3553
|
function rt(r4) {
|
|
3542
|
-
return r4.id === Ye || r4.id === Xe || r4.id === et || r4.id ===
|
|
3554
|
+
return r4.id === Ye || r4.id === Xe || r4.id === et || r4.id === ge;
|
|
3543
3555
|
}
|
|
3544
3556
|
var h = class extends Error {
|
|
3545
3557
|
constructor(t, n) {
|
|
3546
|
-
super(
|
|
3558
|
+
super(Qt(t));
|
|
3547
3559
|
this.outcome = t, this.cause = n;
|
|
3548
3560
|
}
|
|
3549
3561
|
};
|
|
3550
3562
|
function nt(r4) {
|
|
3551
|
-
return r4 instanceof h ? r4.outcome :
|
|
3563
|
+
return r4 instanceof h ? r4.outcome : xe(r4) ? r4 : k(Jr(r4));
|
|
3552
3564
|
}
|
|
3553
3565
|
function Jr(r4) {
|
|
3554
|
-
return r4 ? typeof r4 == "string" ? r4 : r4 instanceof Error ? r4.message :
|
|
3566
|
+
return r4 ? typeof r4 == "string" ? r4 : r4 instanceof Error ? r4.message : xe(r4) ? Qt(r4) : typeof r4 == "object" && "code" in r4 && typeof r4.code == "string" ? r4.code : JSON.stringify(r4) : "Unknown error";
|
|
3555
3567
|
}
|
|
3556
|
-
function
|
|
3568
|
+
function Qt(r4) {
|
|
3557
3569
|
let e = r4.issue?.map(Yr) ?? [];
|
|
3558
3570
|
return e.length > 0 ? e.join("; ") : "Unknown error";
|
|
3559
3571
|
}
|
|
@@ -3561,16 +3573,16 @@ function Yr(r4) {
|
|
|
3561
3573
|
let e = r4.details?.text ?? r4.diagnostics ?? "Unknown error";
|
|
3562
3574
|
return r4.expression?.length && (e += ` (${r4.expression.join(", ")})`), e;
|
|
3563
3575
|
}
|
|
3564
|
-
var Wt = { types: { Element: { display: "Element", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] } } }, BackboneElement: { display: "BackboneElement", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, modifierExtension: { max: "*", type: [{ code: "Extension" }] } } }, Address: { display: "Address", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, use: { type: [{ code: "code" }] }, type: { type: [{ code: "code" }] }, text: { type: [{ code: "string" }] }, line: { max: "*", type: [{ code: "string" }] }, city: { type: [{ code: "string" }] }, district: { type: [{ code: "string" }] }, state: { type: [{ code: "string" }] }, postalCode: { type: [{ code: "string" }] }, country: { type: [{ code: "string" }] }, period: { type: [{ code: "Period" }] } } }, Age: { display: "Age", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, comparator: { type: [{ code: "code" }] }, unit: { type: [{ code: "string" }] }, system: { type: [{ code: "uri" }] }, code: { type: [{ code: "code" }] } } }, Annotation: { display: "Annotation", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, "author[x]": { type: [{ code: "Reference", targetProfile: ["http://hl7.org/fhir/StructureDefinition/Practitioner", "http://hl7.org/fhir/StructureDefinition/Patient", "http://hl7.org/fhir/StructureDefinition/RelatedPerson", "http://hl7.org/fhir/StructureDefinition/Organization"] }, { code: "string" }] }, time: { type: [{ code: "dateTime" }] }, text: { min: 1, type: [{ code: "markdown" }] } } }, Attachment: { display: "Attachment", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, contentType: { type: [{ code: "code" }] }, language: { type: [{ code: "code" }] }, data: { type: [{ code: "base64Binary" }] }, url: { type: [{ code: "url" }] }, size: { type: [{ code: "unsignedInt" }] }, hash: { type: [{ code: "base64Binary" }] }, title: { type: [{ code: "string" }] }, creation: { type: [{ code: "dateTime" }] } } }, CodeableConcept: { display: "CodeableConcept", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, coding: { max: "*", type: [{ code: "Coding" }] }, text: { type: [{ code: "string" }] } } }, Coding: { display: "Coding", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, system: { type: [{ code: "uri" }] }, version: { type: [{ code: "string" }] }, code: { type: [{ code: "code" }] }, display: { type: [{ code: "string" }] }, userSelected: { type: [{ code: "boolean" }] } } }, ContactDetail: { display: "ContactDetail", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, name: { type: [{ code: "string" }] }, telecom: { max: "*", type: [{ code: "ContactPoint" }] } } }, ContactPoint: { display: "ContactPoint", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, system: { type: [{ code: "code" }] }, value: { type: [{ code: "string" }] }, use: { type: [{ code: "code" }] }, rank: { type: [{ code: "positiveInt" }] }, period: { type: [{ code: "Period" }] } } }, Contributor: { display: "Contributor", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, type: { min: 1, type: [{ code: "code" }] }, name: { min: 1, type: [{ code: "string" }] }, contact: { max: "*", type: [{ code: "ContactDetail" }] } } }, Count: { display: "Count", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, comparator: { type: [{ code: "code" }] }, unit: { type: [{ code: "string" }] }, system: { type: [{ code: "uri" }] }, code: { type: [{ code: "code" }] } } }, DataRequirement: { display: "DataRequirement", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, type: { min: 1, type: [{ code: "code" }] }, profile: { max: "*", type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/StructureDefinition"] }] }, "subject[x]": { type: [{ code: "CodeableConcept" }, { code: "Reference", targetProfile: ["http://hl7.org/fhir/StructureDefinition/Group"] }] }, mustSupport: { max: "*", type: [{ code: "string" }] }, codeFilter: { max: "*", type: [{ code: "Element" }] }, dateFilter: { max: "*", type: [{ code: "Element" }] }, limit: { type: [{ code: "positiveInt" }] }, sort: { max: "*", type: [{ code: "Element" }] } } }, DataRequirementCodeFilter: { display: "DataRequirementCodeFilter", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, path: { type: [{ code: "string" }] }, searchParam: { type: [{ code: "string" }] }, valueSet: { type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/ValueSet"] }] }, code: { max: "*", type: [{ code: "Coding" }] } } }, DataRequirementDateFilter: { display: "DataRequirementDateFilter", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, path: { type: [{ code: "string" }] }, searchParam: { type: [{ code: "string" }] }, "value[x]": { type: [{ code: "dateTime" }, { code: "Period" }, { code: "Duration" }] } } }, DataRequirementSort: { display: "DataRequirementSort", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, path: { min: 1, type: [{ code: "string" }] }, direction: { min: 1, type: [{ code: "code" }] } } }, Distance: { display: "Distance", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, comparator: { type: [{ code: "code" }] }, unit: { type: [{ code: "string" }] }, system: { type: [{ code: "uri" }] }, code: { type: [{ code: "code" }] } } }, Dosage: { display: "Dosage", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, modifierExtension: { max: "*", type: [{ code: "Extension" }] }, sequence: { type: [{ code: "integer" }] }, text: { type: [{ code: "string" }] }, additionalInstruction: { max: "*", type: [{ code: "CodeableConcept" }] }, patientInstruction: { type: [{ code: "string" }] }, timing: { type: [{ code: "Timing" }] }, "asNeeded[x]": { type: [{ code: "boolean" }, { code: "CodeableConcept" }] }, site: { type: [{ code: "CodeableConcept" }] }, route: { type: [{ code: "CodeableConcept" }] }, method: { type: [{ code: "CodeableConcept" }] }, doseAndRate: { max: "*", type: [{ code: "Element" }] }, maxDosePerPeriod: { type: [{ code: "Ratio" }] }, maxDosePerAdministration: { type: [{ code: "Quantity", profile: ["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"] }] }, maxDosePerLifetime: { type: [{ code: "Quantity", profile: ["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"] }] } } }, DosageDoseAndRate: { display: "DosageDoseAndRate", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, type: { type: [{ code: "CodeableConcept" }] }, "dose[x]": { type: [{ code: "Range" }, { code: "Quantity", profile: ["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"] }] }, "rate[x]": { type: [{ code: "Ratio" }, { code: "Range" }, { code: "Quantity", profile: ["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"] }] } } }, Duration: { display: "Duration", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, comparator: { type: [{ code: "code" }] }, unit: { type: [{ code: "string" }] }, system: { type: [{ code: "uri" }] }, code: { type: [{ code: "code" }] } } }, ElementDefinition: { display: "ElementDefinition", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, modifierExtension: { max: "*", type: [{ code: "Extension" }] }, path: { min: 1, type: [{ code: "string" }] }, representation: { max: "*", type: [{ code: "code" }] }, sliceName: { type: [{ code: "string" }] }, sliceIsConstraining: { type: [{ code: "boolean" }] }, label: { type: [{ code: "string" }] }, code: { max: "*", type: [{ code: "Coding" }] }, slicing: { type: [{ code: "Element" }] }, short: { type: [{ code: "string" }] }, definition: { type: [{ code: "markdown" }] }, comment: { type: [{ code: "markdown" }] }, requirements: { type: [{ code: "markdown" }] }, alias: { max: "*", type: [{ code: "string" }] }, min: { type: [{ code: "unsignedInt" }] }, max: { type: [{ code: "string" }] }, base: { type: [{ code: "Element" }] }, contentReference: { type: [{ code: "uri" }] }, type: { max: "*", type: [{ code: "Element" }] }, "defaultValue[x]": { type: [{ code: "base64Binary" }, { code: "boolean" }, { code: "canonical" }, { code: "code" }, { code: "date" }, { code: "dateTime" }, { code: "decimal" }, { code: "id" }, { code: "instant" }, { code: "integer" }, { code: "markdown" }, { code: "oid" }, { code: "positiveInt" }, { code: "string" }, { code: "time" }, { code: "unsignedInt" }, { code: "uri" }, { code: "url" }, { code: "uuid" }, { code: "Address" }, { code: "Age" }, { code: "Annotation" }, { code: "Attachment" }, { code: "CodeableConcept" }, { code: "Coding" }, { code: "ContactPoint" }, { code: "Count" }, { code: "Distance" }, { code: "Duration" }, { code: "HumanName" }, { code: "Identifier" }, { code: "Money" }, { code: "Period" }, { code: "Quantity" }, { code: "Range" }, { code: "Ratio" }, { code: "Reference" }, { code: "SampledData" }, { code: "Signature" }, { code: "Timing" }, { code: "ContactDetail" }, { code: "Contributor" }, { code: "DataRequirement" }, { code: "Expression" }, { code: "ParameterDefinition" }, { code: "RelatedArtifact" }, { code: "TriggerDefinition" }, { code: "UsageContext" }, { code: "Dosage" }, { code: "Meta" }] }, meaningWhenMissing: { type: [{ code: "markdown" }] }, orderMeaning: { type: [{ code: "string" }] }, "fixed[x]": { type: [{ code: "base64Binary" }, { code: "boolean" }, { code: "canonical" }, { code: "code" }, { code: "date" }, { code: "dateTime" }, { code: "decimal" }, { code: "id" }, { code: "instant" }, { code: "integer" }, { code: "markdown" }, { code: "oid" }, { code: "positiveInt" }, { code: "string" }, { code: "time" }, { code: "unsignedInt" }, { code: "uri" }, { code: "url" }, { code: "uuid" }, { code: "Address" }, { code: "Age" }, { code: "Annotation" }, { code: "Attachment" }, { code: "CodeableConcept" }, { code: "Coding" }, { code: "ContactPoint" }, { code: "Count" }, { code: "Distance" }, { code: "Duration" }, { code: "HumanName" }, { code: "Identifier" }, { code: "Money" }, { code: "Period" }, { code: "Quantity" }, { code: "Range" }, { code: "Ratio" }, { code: "Reference" }, { code: "SampledData" }, { code: "Signature" }, { code: "Timing" }, { code: "ContactDetail" }, { code: "Contributor" }, { code: "DataRequirement" }, { code: "Expression" }, { code: "ParameterDefinition" }, { code: "RelatedArtifact" }, { code: "TriggerDefinition" }, { code: "UsageContext" }, { code: "Dosage" }, { code: "Meta" }] }, "pattern[x]": { type: [{ code: "base64Binary" }, { code: "boolean" }, { code: "canonical" }, { code: "code" }, { code: "date" }, { code: "dateTime" }, { code: "decimal" }, { code: "id" }, { code: "instant" }, { code: "integer" }, { code: "markdown" }, { code: "oid" }, { code: "positiveInt" }, { code: "string" }, { code: "time" }, { code: "unsignedInt" }, { code: "uri" }, { code: "url" }, { code: "uuid" }, { code: "Address" }, { code: "Age" }, { code: "Annotation" }, { code: "Attachment" }, { code: "CodeableConcept" }, { code: "Coding" }, { code: "ContactPoint" }, { code: "Count" }, { code: "Distance" }, { code: "Duration" }, { code: "HumanName" }, { code: "Identifier" }, { code: "Money" }, { code: "Period" }, { code: "Quantity" }, { code: "Range" }, { code: "Ratio" }, { code: "Reference" }, { code: "SampledData" }, { code: "Signature" }, { code: "Timing" }, { code: "ContactDetail" }, { code: "Contributor" }, { code: "DataRequirement" }, { code: "Expression" }, { code: "ParameterDefinition" }, { code: "RelatedArtifact" }, { code: "TriggerDefinition" }, { code: "UsageContext" }, { code: "Dosage" }, { code: "Meta" }] }, example: { max: "*", type: [{ code: "Element" }] }, "minValue[x]": { type: [{ code: "date" }, { code: "dateTime" }, { code: "instant" }, { code: "time" }, { code: "decimal" }, { code: "integer" }, { code: "positiveInt" }, { code: "unsignedInt" }, { code: "Quantity" }] }, "maxValue[x]": { type: [{ code: "date" }, { code: "dateTime" }, { code: "instant" }, { code: "time" }, { code: "decimal" }, { code: "integer" }, { code: "positiveInt" }, { code: "unsignedInt" }, { code: "Quantity" }] }, maxLength: { type: [{ code: "integer" }] }, condition: { max: "*", type: [{ code: "id" }] }, constraint: { max: "*", type: [{ code: "Element" }] }, mustSupport: { type: [{ code: "boolean" }] }, isModifier: { type: [{ code: "boolean" }] }, isModifierReason: { type: [{ code: "string" }] }, isSummary: { type: [{ code: "boolean" }] }, binding: { type: [{ code: "Element" }] }, mapping: { max: "*", type: [{ code: "Element" }] } } }, ElementDefinitionSlicing: { display: "ElementDefinitionSlicing", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, discriminator: { max: "*", type: [{ code: "Element" }] }, description: { type: [{ code: "string" }] }, ordered: { type: [{ code: "boolean" }] }, rules: { min: 1, type: [{ code: "code" }] } } }, ElementDefinitionSlicingDiscriminator: { display: "ElementDefinitionSlicingDiscriminator", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, type: { min: 1, type: [{ code: "code" }] }, path: { min: 1, type: [{ code: "string" }] } } }, ElementDefinitionBase: { display: "ElementDefinitionBase", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, path: { min: 1, type: [{ code: "string" }] }, min: { min: 1, type: [{ code: "unsignedInt" }] }, max: { min: 1, type: [{ code: "string" }] } } }, ElementDefinitionType: { display: "ElementDefinitionType", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, code: { min: 1, type: [{ code: "uri" }] }, profile: { max: "*", type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/StructureDefinition", "http://hl7.org/fhir/StructureDefinition/ImplementationGuide"] }] }, targetProfile: { max: "*", type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/StructureDefinition", "http://hl7.org/fhir/StructureDefinition/ImplementationGuide"] }] }, aggregation: { max: "*", type: [{ code: "code" }] }, versioning: { type: [{ code: "code" }] } } }, ElementDefinitionExample: { display: "ElementDefinitionExample", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, label: { min: 1, type: [{ code: "string" }] }, "value[x]": { min: 1, type: [{ code: "base64Binary" }, { code: "boolean" }, { code: "canonical" }, { code: "code" }, { code: "date" }, { code: "dateTime" }, { code: "decimal" }, { code: "id" }, { code: "instant" }, { code: "integer" }, { code: "markdown" }, { code: "oid" }, { code: "positiveInt" }, { code: "string" }, { code: "time" }, { code: "unsignedInt" }, { code: "uri" }, { code: "url" }, { code: "uuid" }, { code: "Address" }, { code: "Age" }, { code: "Annotation" }, { code: "Attachment" }, { code: "CodeableConcept" }, { code: "Coding" }, { code: "ContactPoint" }, { code: "Count" }, { code: "Distance" }, { code: "Duration" }, { code: "HumanName" }, { code: "Identifier" }, { code: "Money" }, { code: "Period" }, { code: "Quantity" }, { code: "Range" }, { code: "Ratio" }, { code: "Reference" }, { code: "SampledData" }, { code: "Signature" }, { code: "Timing" }, { code: "ContactDetail" }, { code: "Contributor" }, { code: "DataRequirement" }, { code: "Expression" }, { code: "ParameterDefinition" }, { code: "RelatedArtifact" }, { code: "TriggerDefinition" }, { code: "UsageContext" }, { code: "Dosage" }, { code: "Meta" }] } } }, ElementDefinitionConstraint: { display: "ElementDefinitionConstraint", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, key: { min: 1, type: [{ code: "id" }] }, requirements: { type: [{ code: "string" }] }, severity: { min: 1, type: [{ code: "code" }] }, human: { min: 1, type: [{ code: "string" }] }, expression: { type: [{ code: "string" }] }, xpath: { type: [{ code: "string" }] }, source: { type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/StructureDefinition"] }] } } }, ElementDefinitionBinding: { display: "ElementDefinitionBinding", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, strength: { min: 1, type: [{ code: "code" }] }, description: { type: [{ code: "string" }] }, valueSet: { type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/ValueSet"] }] } } }, ElementDefinitionMapping: { display: "ElementDefinitionMapping", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, identity: { min: 1, type: [{ code: "id" }] }, language: { type: [{ code: "code" }] }, map: { min: 1, type: [{ code: "string" }] }, comment: { type: [{ code: "string" }] } } }, Expression: { display: "Expression", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, description: { type: [{ code: "string" }] }, name: { type: [{ code: "id" }] }, language: { min: 1, type: [{ code: "code" }] }, expression: { type: [{ code: "string" }] }, reference: { type: [{ code: "uri" }] } } }, Extension: { display: "Extension", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, url: { min: 1, type: [{ code: "string" }] }, "value[x]": { type: [{ code: "base64Binary" }, { code: "boolean" }, { code: "canonical" }, { code: "code" }, { code: "date" }, { code: "dateTime" }, { code: "decimal" }, { code: "id" }, { code: "instant" }, { code: "integer" }, { code: "markdown" }, { code: "oid" }, { code: "positiveInt" }, { code: "string" }, { code: "time" }, { code: "unsignedInt" }, { code: "uri" }, { code: "url" }, { code: "uuid" }, { code: "Address" }, { code: "Age" }, { code: "Annotation" }, { code: "Attachment" }, { code: "CodeableConcept" }, { code: "Coding" }, { code: "ContactPoint" }, { code: "Count" }, { code: "Distance" }, { code: "Duration" }, { code: "HumanName" }, { code: "Identifier" }, { code: "Money" }, { code: "Period" }, { code: "Quantity" }, { code: "Range" }, { code: "Ratio" }, { code: "Reference" }, { code: "SampledData" }, { code: "Signature" }, { code: "Timing" }, { code: "ContactDetail" }, { code: "Contributor" }, { code: "DataRequirement" }, { code: "Expression" }, { code: "ParameterDefinition" }, { code: "RelatedArtifact" }, { code: "TriggerDefinition" }, { code: "UsageContext" }, { code: "Dosage" }, { code: "Meta" }] } } }, HumanName: { display: "HumanName", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, use: { type: [{ code: "code" }] }, text: { type: [{ code: "string" }] }, family: { type: [{ code: "string" }] }, given: { max: "*", type: [{ code: "string" }] }, prefix: { max: "*", type: [{ code: "string" }] }, suffix: { max: "*", type: [{ code: "string" }] }, period: { type: [{ code: "Period" }] } } }, Identifier: { display: "Identifier", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, use: { type: [{ code: "code" }] }, type: { type: [{ code: "CodeableConcept" }] }, system: { type: [{ code: "uri" }] }, value: { type: [{ code: "string" }] }, period: { type: [{ code: "Period" }] }, assigner: { type: [{ code: "Reference", targetProfile: ["http://hl7.org/fhir/StructureDefinition/Organization"] }] } } }, MarketingStatus: { display: "MarketingStatus", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, modifierExtension: { max: "*", type: [{ code: "Extension" }] }, country: { min: 1, type: [{ code: "CodeableConcept" }] }, jurisdiction: { type: [{ code: "CodeableConcept" }] }, status: { min: 1, type: [{ code: "CodeableConcept" }] }, dateRange: { min: 1, type: [{ code: "Period" }] }, restoreDate: { type: [{ code: "dateTime" }] } } }, Meta: { display: "Meta", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, versionId: { type: [{ code: "id" }] }, lastUpdated: { type: [{ code: "instant" }] }, source: { type: [{ code: "uri" }] }, profile: { max: "*", type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/StructureDefinition"] }] }, security: { max: "*", type: [{ code: "Coding" }] }, tag: { max: "*", type: [{ code: "Coding" }] }, project: { type: [{ code: "uri" }] }, author: { type: [{ code: "Reference" }] }, account: { type: [{ code: "Reference" }] }, compartment: { max: "*", type: [{ code: "Reference" }] } } }, Money: { display: "Money", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, currency: { type: [{ code: "code" }] } } }, Narrative: { display: "Narrative", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, status: { min: 1, type: [{ code: "code" }] }, div: { min: 1, type: [{ code: "xhtml" }] } } }, ParameterDefinition: { display: "ParameterDefinition", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, name: { type: [{ code: "code" }] }, use: { min: 1, type: [{ code: "code" }] }, min: { type: [{ code: "integer" }] }, max: { type: [{ code: "string" }] }, documentation: { type: [{ code: "string" }] }, type: { min: 1, type: [{ code: "code" }] }, profile: { type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/StructureDefinition"] }] } } }, Period: { display: "Period", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, start: { type: [{ code: "dateTime" }] }, end: { type: [{ code: "dateTime" }] } } }, Population: { display: "Population", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, modifierExtension: { max: "*", type: [{ code: "Extension" }] }, "age[x]": { type: [{ code: "Range" }, { code: "CodeableConcept" }] }, gender: { type: [{ code: "CodeableConcept" }] }, race: { type: [{ code: "CodeableConcept" }] }, physiologicalCondition: { type: [{ code: "CodeableConcept" }] } } }, ProdCharacteristic: { display: "ProdCharacteristic", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, modifierExtension: { max: "*", type: [{ code: "Extension" }] }, height: { type: [{ code: "Quantity" }] }, width: { type: [{ code: "Quantity" }] }, depth: { type: [{ code: "Quantity" }] }, weight: { type: [{ code: "Quantity" }] }, nominalVolume: { type: [{ code: "Quantity" }] }, externalDiameter: { type: [{ code: "Quantity" }] }, shape: { type: [{ code: "string" }] }, color: { max: "*", type: [{ code: "string" }] }, imprint: { max: "*", type: [{ code: "string" }] }, image: { max: "*", type: [{ code: "Attachment" }] }, scoring: { type: [{ code: "CodeableConcept" }] } } }, ProductShelfLife: { display: "ProductShelfLife", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, modifierExtension: { max: "*", type: [{ code: "Extension" }] }, identifier: { type: [{ code: "Identifier" }] }, type: { min: 1, type: [{ code: "CodeableConcept" }] }, period: { min: 1, type: [{ code: "Quantity" }] }, specialPrecautionsForStorage: { max: "*", type: [{ code: "CodeableConcept" }] } } }, Quantity: { display: "Quantity", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, comparator: { max: "0", type: [{ code: "code" }] }, unit: { type: [{ code: "string" }] }, system: { type: [{ code: "uri" }] }, code: { type: [{ code: "code" }] } } }, Range: { display: "Range", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, low: { type: [{ code: "Quantity", profile: ["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"] }] }, high: { type: [{ code: "Quantity", profile: ["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"] }] } } }, Ratio: { display: "Ratio", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, numerator: { type: [{ code: "Quantity" }] }, denominator: { type: [{ code: "Quantity" }] } } }, Reference: { display: "Reference", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, reference: { type: [{ code: "string" }] }, type: { type: [{ code: "uri" }] }, identifier: { type: [{ code: "Identifier" }] }, display: { type: [{ code: "string" }] } } }, RelatedArtifact: { display: "RelatedArtifact", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, type: { min: 1, type: [{ code: "code" }] }, label: { type: [{ code: "string" }] }, display: { type: [{ code: "string" }] }, citation: { type: [{ code: "markdown" }] }, url: { type: [{ code: "url" }] }, document: { type: [{ code: "Attachment" }] }, resource: { type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/Resource"] }] } } }, SampledData: { display: "SampledData", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, origin: { min: 1, type: [{ code: "Quantity", profile: ["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"] }] }, period: { min: 1, type: [{ code: "decimal" }] }, factor: { type: [{ code: "decimal" }] }, lowerLimit: { type: [{ code: "decimal" }] }, upperLimit: { type: [{ code: "decimal" }] }, dimensions: { min: 1, type: [{ code: "positiveInt" }] }, data: { type: [{ code: "string" }] } } }, Signature: { display: "Signature", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, type: { min: 1, max: "*", type: [{ code: "Coding" }] }, when: { min: 1, type: [{ code: "instant" }] }, who: { min: 1, type: [{ code: "Reference", targetProfile: ["http://hl7.org/fhir/StructureDefinition/Practitioner", "http://hl7.org/fhir/StructureDefinition/PractitionerRole", "http://hl7.org/fhir/StructureDefinition/RelatedPerson", "http://hl7.org/fhir/StructureDefinition/Patient", "http://hl7.org/fhir/StructureDefinition/Device", "http://hl7.org/fhir/StructureDefinition/Organization"] }] }, onBehalfOf: { type: [{ code: "Reference", targetProfile: ["http://hl7.org/fhir/StructureDefinition/Practitioner", "http://hl7.org/fhir/StructureDefinition/PractitionerRole", "http://hl7.org/fhir/StructureDefinition/RelatedPerson", "http://hl7.org/fhir/StructureDefinition/Patient", "http://hl7.org/fhir/StructureDefinition/Device", "http://hl7.org/fhir/StructureDefinition/Organization"] }] }, targetFormat: { type: [{ code: "code" }] }, sigFormat: { type: [{ code: "code" }] }, data: { type: [{ code: "base64Binary" }] } } }, SubstanceAmount: { display: "SubstanceAmount", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, modifierExtension: { max: "*", type: [{ code: "Extension" }] }, "amount[x]": { type: [{ code: "Quantity" }, { code: "Range" }, { code: "string" }] }, amountType: { type: [{ code: "CodeableConcept" }] }, amountText: { type: [{ code: "string" }] }, referenceRange: { type: [{ code: "Element" }] } } }, SubstanceAmountReferenceRange: { display: "SubstanceAmountReferenceRange", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, lowLimit: { type: [{ code: "Quantity" }] }, highLimit: { type: [{ code: "Quantity" }] } } }, Timing: { display: "Timing", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, modifierExtension: { max: "*", type: [{ code: "Extension" }] }, event: { max: "*", type: [{ code: "dateTime" }] }, repeat: { type: [{ code: "Element" }] }, code: { type: [{ code: "CodeableConcept" }] } } }, TimingRepeat: { display: "TimingRepeat", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, "bounds[x]": { type: [{ code: "Duration" }, { code: "Range" }, { code: "Period" }] }, count: { type: [{ code: "positiveInt" }] }, countMax: { type: [{ code: "positiveInt" }] }, duration: { type: [{ code: "decimal" }] }, durationMax: { type: [{ code: "decimal" }] }, durationUnit: { type: [{ code: "code" }] }, frequency: { type: [{ code: "positiveInt" }] }, frequencyMax: { type: [{ code: "positiveInt" }] }, period: { type: [{ code: "decimal" }] }, periodMax: { type: [{ code: "decimal" }] }, periodUnit: { type: [{ code: "code" }] }, dayOfWeek: { max: "*", type: [{ code: "code" }] }, timeOfDay: { max: "*", type: [{ code: "time" }] }, when: { max: "*", type: [{ code: "code" }] }, offset: { type: [{ code: "unsignedInt" }] } } }, TriggerDefinition: { display: "TriggerDefinition", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, type: { min: 1, type: [{ code: "code" }] }, name: { type: [{ code: "string" }] }, "timing[x]": { type: [{ code: "Timing" }, { code: "Reference", targetProfile: ["http://hl7.org/fhir/StructureDefinition/Schedule"] }, { code: "date" }, { code: "dateTime" }] }, data: { max: "*", type: [{ code: "DataRequirement" }] }, condition: { type: [{ code: "Expression" }] } } }, UsageContext: { display: "UsageContext", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, code: { min: 1, type: [{ code: "Coding" }] }, "value[x]": { min: 1, type: [{ code: "CodeableConcept" }, { code: "Quantity" }, { code: "Range" }, { code: "Reference", targetProfile: ["http://hl7.org/fhir/StructureDefinition/PlanDefinition", "http://hl7.org/fhir/StructureDefinition/ResearchStudy", "http://hl7.org/fhir/StructureDefinition/InsurancePlan", "http://hl7.org/fhir/StructureDefinition/HealthcareService", "http://hl7.org/fhir/StructureDefinition/Group", "http://hl7.org/fhir/StructureDefinition/Location", "http://hl7.org/fhir/StructureDefinition/Organization"] }] } } }, MetadataResource: { display: "MetadataResource", properties: { id: { type: [{ code: "string" }] }, meta: { type: [{ code: "Meta" }] }, implicitRules: { type: [{ code: "uri" }] }, language: { type: [{ code: "code" }] }, text: { type: [{ code: "Narrative" }] }, contained: { max: "*", type: [{ code: "Resource" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, modifierExtension: { max: "*", type: [{ code: "Extension" }] }, url: { type: [{ code: "uri" }] }, version: { type: [{ code: "string" }] }, name: { type: [{ code: "string" }] }, title: { type: [{ code: "string" }] }, status: { min: 1, type: [{ code: "code" }] }, experimental: { type: [{ code: "boolean" }] }, date: { type: [{ code: "dateTime" }] }, publisher: { type: [{ code: "string" }] }, contact: { max: "*", type: [{ code: "ContactDetail" }] }, description: { type: [{ code: "markdown" }] }, useContext: { max: "*", type: [{ code: "UsageContext" }] }, jurisdiction: { max: "*", type: [{ code: "CodeableConcept" }] } } }, IdentityProvider: { display: "IdentityProvider", properties: { authorizeUrl: { min: 1, type: [{ code: "string" }] }, tokenUrl: { min: 1, type: [{ code: "string" }] }, userInfoUrl: { min: 1, type: [{ code: "string" }] }, clientId: { min: 1, type: [{ code: "string" }] }, clientSecret: { min: 1, type: [{ code: "string" }] }, useSubject: { type: [{ code: "boolean" }] } } } } };
|
|
3565
|
-
function
|
|
3576
|
+
var Gt = { types: { Element: { display: "Element", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] } } }, BackboneElement: { display: "BackboneElement", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, modifierExtension: { max: "*", type: [{ code: "Extension" }] } } }, Address: { display: "Address", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, use: { type: [{ code: "code" }] }, type: { type: [{ code: "code" }] }, text: { type: [{ code: "string" }] }, line: { max: "*", type: [{ code: "string" }] }, city: { type: [{ code: "string" }] }, district: { type: [{ code: "string" }] }, state: { type: [{ code: "string" }] }, postalCode: { type: [{ code: "string" }] }, country: { type: [{ code: "string" }] }, period: { type: [{ code: "Period" }] } } }, Age: { display: "Age", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, comparator: { type: [{ code: "code" }] }, unit: { type: [{ code: "string" }] }, system: { type: [{ code: "uri" }] }, code: { type: [{ code: "code" }] } } }, Annotation: { display: "Annotation", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, "author[x]": { type: [{ code: "Reference", targetProfile: ["http://hl7.org/fhir/StructureDefinition/Practitioner", "http://hl7.org/fhir/StructureDefinition/Patient", "http://hl7.org/fhir/StructureDefinition/RelatedPerson", "http://hl7.org/fhir/StructureDefinition/Organization"] }, { code: "string" }] }, time: { type: [{ code: "dateTime" }] }, text: { min: 1, type: [{ code: "markdown" }] } } }, Attachment: { display: "Attachment", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, contentType: { type: [{ code: "code" }] }, language: { type: [{ code: "code" }] }, data: { type: [{ code: "base64Binary" }] }, url: { type: [{ code: "url" }] }, size: { type: [{ code: "unsignedInt" }] }, hash: { type: [{ code: "base64Binary" }] }, title: { type: [{ code: "string" }] }, creation: { type: [{ code: "dateTime" }] } } }, CodeableConcept: { display: "CodeableConcept", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, coding: { max: "*", type: [{ code: "Coding" }] }, text: { type: [{ code: "string" }] } } }, Coding: { display: "Coding", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, system: { type: [{ code: "uri" }] }, version: { type: [{ code: "string" }] }, code: { type: [{ code: "code" }] }, display: { type: [{ code: "string" }] }, userSelected: { type: [{ code: "boolean" }] } } }, ContactDetail: { display: "ContactDetail", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, name: { type: [{ code: "string" }] }, telecom: { max: "*", type: [{ code: "ContactPoint" }] } } }, ContactPoint: { display: "ContactPoint", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, system: { type: [{ code: "code" }] }, value: { type: [{ code: "string" }] }, use: { type: [{ code: "code" }] }, rank: { type: [{ code: "positiveInt" }] }, period: { type: [{ code: "Period" }] } } }, Contributor: { display: "Contributor", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, type: { min: 1, type: [{ code: "code" }] }, name: { min: 1, type: [{ code: "string" }] }, contact: { max: "*", type: [{ code: "ContactDetail" }] } } }, Count: { display: "Count", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, comparator: { type: [{ code: "code" }] }, unit: { type: [{ code: "string" }] }, system: { type: [{ code: "uri" }] }, code: { type: [{ code: "code" }] } } }, DataRequirement: { display: "DataRequirement", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, type: { min: 1, type: [{ code: "code" }] }, profile: { max: "*", type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/StructureDefinition"] }] }, "subject[x]": { type: [{ code: "CodeableConcept" }, { code: "Reference", targetProfile: ["http://hl7.org/fhir/StructureDefinition/Group"] }] }, mustSupport: { max: "*", type: [{ code: "string" }] }, codeFilter: { max: "*", type: [{ code: "Element" }] }, dateFilter: { max: "*", type: [{ code: "Element" }] }, limit: { type: [{ code: "positiveInt" }] }, sort: { max: "*", type: [{ code: "Element" }] } } }, DataRequirementCodeFilter: { display: "DataRequirementCodeFilter", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, path: { type: [{ code: "string" }] }, searchParam: { type: [{ code: "string" }] }, valueSet: { type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/ValueSet"] }] }, code: { max: "*", type: [{ code: "Coding" }] } } }, DataRequirementDateFilter: { display: "DataRequirementDateFilter", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, path: { type: [{ code: "string" }] }, searchParam: { type: [{ code: "string" }] }, "value[x]": { type: [{ code: "dateTime" }, { code: "Period" }, { code: "Duration" }] } } }, DataRequirementSort: { display: "DataRequirementSort", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, path: { min: 1, type: [{ code: "string" }] }, direction: { min: 1, type: [{ code: "code" }] } } }, Distance: { display: "Distance", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, comparator: { type: [{ code: "code" }] }, unit: { type: [{ code: "string" }] }, system: { type: [{ code: "uri" }] }, code: { type: [{ code: "code" }] } } }, Dosage: { display: "Dosage", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, modifierExtension: { max: "*", type: [{ code: "Extension" }] }, sequence: { type: [{ code: "integer" }] }, text: { type: [{ code: "string" }] }, additionalInstruction: { max: "*", type: [{ code: "CodeableConcept" }] }, patientInstruction: { type: [{ code: "string" }] }, timing: { type: [{ code: "Timing" }] }, "asNeeded[x]": { type: [{ code: "boolean" }, { code: "CodeableConcept" }] }, site: { type: [{ code: "CodeableConcept" }] }, route: { type: [{ code: "CodeableConcept" }] }, method: { type: [{ code: "CodeableConcept" }] }, doseAndRate: { max: "*", type: [{ code: "Element" }] }, maxDosePerPeriod: { type: [{ code: "Ratio" }] }, maxDosePerAdministration: { type: [{ code: "Quantity", profile: ["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"] }] }, maxDosePerLifetime: { type: [{ code: "Quantity", profile: ["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"] }] } } }, DosageDoseAndRate: { display: "DosageDoseAndRate", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, type: { type: [{ code: "CodeableConcept" }] }, "dose[x]": { type: [{ code: "Range" }, { code: "Quantity", profile: ["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"] }] }, "rate[x]": { type: [{ code: "Ratio" }, { code: "Range" }, { code: "Quantity", profile: ["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"] }] } } }, Duration: { display: "Duration", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, comparator: { type: [{ code: "code" }] }, unit: { type: [{ code: "string" }] }, system: { type: [{ code: "uri" }] }, code: { type: [{ code: "code" }] } } }, ElementDefinition: { display: "ElementDefinition", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, modifierExtension: { max: "*", type: [{ code: "Extension" }] }, path: { min: 1, type: [{ code: "string" }] }, representation: { max: "*", type: [{ code: "code" }] }, sliceName: { type: [{ code: "string" }] }, sliceIsConstraining: { type: [{ code: "boolean" }] }, label: { type: [{ code: "string" }] }, code: { max: "*", type: [{ code: "Coding" }] }, slicing: { type: [{ code: "Element" }] }, short: { type: [{ code: "string" }] }, definition: { type: [{ code: "markdown" }] }, comment: { type: [{ code: "markdown" }] }, requirements: { type: [{ code: "markdown" }] }, alias: { max: "*", type: [{ code: "string" }] }, min: { type: [{ code: "unsignedInt" }] }, max: { type: [{ code: "string" }] }, base: { type: [{ code: "Element" }] }, contentReference: { type: [{ code: "uri" }] }, type: { max: "*", type: [{ code: "Element" }] }, "defaultValue[x]": { type: [{ code: "base64Binary" }, { code: "boolean" }, { code: "canonical" }, { code: "code" }, { code: "date" }, { code: "dateTime" }, { code: "decimal" }, { code: "id" }, { code: "instant" }, { code: "integer" }, { code: "markdown" }, { code: "oid" }, { code: "positiveInt" }, { code: "string" }, { code: "time" }, { code: "unsignedInt" }, { code: "uri" }, { code: "url" }, { code: "uuid" }, { code: "Address" }, { code: "Age" }, { code: "Annotation" }, { code: "Attachment" }, { code: "CodeableConcept" }, { code: "Coding" }, { code: "ContactPoint" }, { code: "Count" }, { code: "Distance" }, { code: "Duration" }, { code: "HumanName" }, { code: "Identifier" }, { code: "Money" }, { code: "Period" }, { code: "Quantity" }, { code: "Range" }, { code: "Ratio" }, { code: "Reference" }, { code: "SampledData" }, { code: "Signature" }, { code: "Timing" }, { code: "ContactDetail" }, { code: "Contributor" }, { code: "DataRequirement" }, { code: "Expression" }, { code: "ParameterDefinition" }, { code: "RelatedArtifact" }, { code: "TriggerDefinition" }, { code: "UsageContext" }, { code: "Dosage" }, { code: "Meta" }] }, meaningWhenMissing: { type: [{ code: "markdown" }] }, orderMeaning: { type: [{ code: "string" }] }, "fixed[x]": { type: [{ code: "base64Binary" }, { code: "boolean" }, { code: "canonical" }, { code: "code" }, { code: "date" }, { code: "dateTime" }, { code: "decimal" }, { code: "id" }, { code: "instant" }, { code: "integer" }, { code: "markdown" }, { code: "oid" }, { code: "positiveInt" }, { code: "string" }, { code: "time" }, { code: "unsignedInt" }, { code: "uri" }, { code: "url" }, { code: "uuid" }, { code: "Address" }, { code: "Age" }, { code: "Annotation" }, { code: "Attachment" }, { code: "CodeableConcept" }, { code: "Coding" }, { code: "ContactPoint" }, { code: "Count" }, { code: "Distance" }, { code: "Duration" }, { code: "HumanName" }, { code: "Identifier" }, { code: "Money" }, { code: "Period" }, { code: "Quantity" }, { code: "Range" }, { code: "Ratio" }, { code: "Reference" }, { code: "SampledData" }, { code: "Signature" }, { code: "Timing" }, { code: "ContactDetail" }, { code: "Contributor" }, { code: "DataRequirement" }, { code: "Expression" }, { code: "ParameterDefinition" }, { code: "RelatedArtifact" }, { code: "TriggerDefinition" }, { code: "UsageContext" }, { code: "Dosage" }, { code: "Meta" }] }, "pattern[x]": { type: [{ code: "base64Binary" }, { code: "boolean" }, { code: "canonical" }, { code: "code" }, { code: "date" }, { code: "dateTime" }, { code: "decimal" }, { code: "id" }, { code: "instant" }, { code: "integer" }, { code: "markdown" }, { code: "oid" }, { code: "positiveInt" }, { code: "string" }, { code: "time" }, { code: "unsignedInt" }, { code: "uri" }, { code: "url" }, { code: "uuid" }, { code: "Address" }, { code: "Age" }, { code: "Annotation" }, { code: "Attachment" }, { code: "CodeableConcept" }, { code: "Coding" }, { code: "ContactPoint" }, { code: "Count" }, { code: "Distance" }, { code: "Duration" }, { code: "HumanName" }, { code: "Identifier" }, { code: "Money" }, { code: "Period" }, { code: "Quantity" }, { code: "Range" }, { code: "Ratio" }, { code: "Reference" }, { code: "SampledData" }, { code: "Signature" }, { code: "Timing" }, { code: "ContactDetail" }, { code: "Contributor" }, { code: "DataRequirement" }, { code: "Expression" }, { code: "ParameterDefinition" }, { code: "RelatedArtifact" }, { code: "TriggerDefinition" }, { code: "UsageContext" }, { code: "Dosage" }, { code: "Meta" }] }, example: { max: "*", type: [{ code: "Element" }] }, "minValue[x]": { type: [{ code: "date" }, { code: "dateTime" }, { code: "instant" }, { code: "time" }, { code: "decimal" }, { code: "integer" }, { code: "positiveInt" }, { code: "unsignedInt" }, { code: "Quantity" }] }, "maxValue[x]": { type: [{ code: "date" }, { code: "dateTime" }, { code: "instant" }, { code: "time" }, { code: "decimal" }, { code: "integer" }, { code: "positiveInt" }, { code: "unsignedInt" }, { code: "Quantity" }] }, maxLength: { type: [{ code: "integer" }] }, condition: { max: "*", type: [{ code: "id" }] }, constraint: { max: "*", type: [{ code: "Element" }] }, mustSupport: { type: [{ code: "boolean" }] }, isModifier: { type: [{ code: "boolean" }] }, isModifierReason: { type: [{ code: "string" }] }, isSummary: { type: [{ code: "boolean" }] }, binding: { type: [{ code: "Element" }] }, mapping: { max: "*", type: [{ code: "Element" }] } } }, ElementDefinitionSlicing: { display: "ElementDefinitionSlicing", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, discriminator: { max: "*", type: [{ code: "Element" }] }, description: { type: [{ code: "string" }] }, ordered: { type: [{ code: "boolean" }] }, rules: { min: 1, type: [{ code: "code" }] } } }, ElementDefinitionSlicingDiscriminator: { display: "ElementDefinitionSlicingDiscriminator", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, type: { min: 1, type: [{ code: "code" }] }, path: { min: 1, type: [{ code: "string" }] } } }, ElementDefinitionBase: { display: "ElementDefinitionBase", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, path: { min: 1, type: [{ code: "string" }] }, min: { min: 1, type: [{ code: "unsignedInt" }] }, max: { min: 1, type: [{ code: "string" }] } } }, ElementDefinitionType: { display: "ElementDefinitionType", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, code: { min: 1, type: [{ code: "uri" }] }, profile: { max: "*", type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/StructureDefinition", "http://hl7.org/fhir/StructureDefinition/ImplementationGuide"] }] }, targetProfile: { max: "*", type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/StructureDefinition", "http://hl7.org/fhir/StructureDefinition/ImplementationGuide"] }] }, aggregation: { max: "*", type: [{ code: "code" }] }, versioning: { type: [{ code: "code" }] } } }, ElementDefinitionExample: { display: "ElementDefinitionExample", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, label: { min: 1, type: [{ code: "string" }] }, "value[x]": { min: 1, type: [{ code: "base64Binary" }, { code: "boolean" }, { code: "canonical" }, { code: "code" }, { code: "date" }, { code: "dateTime" }, { code: "decimal" }, { code: "id" }, { code: "instant" }, { code: "integer" }, { code: "markdown" }, { code: "oid" }, { code: "positiveInt" }, { code: "string" }, { code: "time" }, { code: "unsignedInt" }, { code: "uri" }, { code: "url" }, { code: "uuid" }, { code: "Address" }, { code: "Age" }, { code: "Annotation" }, { code: "Attachment" }, { code: "CodeableConcept" }, { code: "Coding" }, { code: "ContactPoint" }, { code: "Count" }, { code: "Distance" }, { code: "Duration" }, { code: "HumanName" }, { code: "Identifier" }, { code: "Money" }, { code: "Period" }, { code: "Quantity" }, { code: "Range" }, { code: "Ratio" }, { code: "Reference" }, { code: "SampledData" }, { code: "Signature" }, { code: "Timing" }, { code: "ContactDetail" }, { code: "Contributor" }, { code: "DataRequirement" }, { code: "Expression" }, { code: "ParameterDefinition" }, { code: "RelatedArtifact" }, { code: "TriggerDefinition" }, { code: "UsageContext" }, { code: "Dosage" }, { code: "Meta" }] } } }, ElementDefinitionConstraint: { display: "ElementDefinitionConstraint", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, key: { min: 1, type: [{ code: "id" }] }, requirements: { type: [{ code: "string" }] }, severity: { min: 1, type: [{ code: "code" }] }, human: { min: 1, type: [{ code: "string" }] }, expression: { type: [{ code: "string" }] }, xpath: { type: [{ code: "string" }] }, source: { type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/StructureDefinition"] }] } } }, ElementDefinitionBinding: { display: "ElementDefinitionBinding", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, strength: { min: 1, type: [{ code: "code" }] }, description: { type: [{ code: "string" }] }, valueSet: { type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/ValueSet"] }] } } }, ElementDefinitionMapping: { display: "ElementDefinitionMapping", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, identity: { min: 1, type: [{ code: "id" }] }, language: { type: [{ code: "code" }] }, map: { min: 1, type: [{ code: "string" }] }, comment: { type: [{ code: "string" }] } } }, Expression: { display: "Expression", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, description: { type: [{ code: "string" }] }, name: { type: [{ code: "id" }] }, language: { min: 1, type: [{ code: "code" }] }, expression: { type: [{ code: "string" }] }, reference: { type: [{ code: "uri" }] } } }, Extension: { display: "Extension", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, url: { min: 1, type: [{ code: "string" }] }, "value[x]": { type: [{ code: "base64Binary" }, { code: "boolean" }, { code: "canonical" }, { code: "code" }, { code: "date" }, { code: "dateTime" }, { code: "decimal" }, { code: "id" }, { code: "instant" }, { code: "integer" }, { code: "markdown" }, { code: "oid" }, { code: "positiveInt" }, { code: "string" }, { code: "time" }, { code: "unsignedInt" }, { code: "uri" }, { code: "url" }, { code: "uuid" }, { code: "Address" }, { code: "Age" }, { code: "Annotation" }, { code: "Attachment" }, { code: "CodeableConcept" }, { code: "Coding" }, { code: "ContactPoint" }, { code: "Count" }, { code: "Distance" }, { code: "Duration" }, { code: "HumanName" }, { code: "Identifier" }, { code: "Money" }, { code: "Period" }, { code: "Quantity" }, { code: "Range" }, { code: "Ratio" }, { code: "Reference" }, { code: "SampledData" }, { code: "Signature" }, { code: "Timing" }, { code: "ContactDetail" }, { code: "Contributor" }, { code: "DataRequirement" }, { code: "Expression" }, { code: "ParameterDefinition" }, { code: "RelatedArtifact" }, { code: "TriggerDefinition" }, { code: "UsageContext" }, { code: "Dosage" }, { code: "Meta" }] } } }, HumanName: { display: "HumanName", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, use: { type: [{ code: "code" }] }, text: { type: [{ code: "string" }] }, family: { type: [{ code: "string" }] }, given: { max: "*", type: [{ code: "string" }] }, prefix: { max: "*", type: [{ code: "string" }] }, suffix: { max: "*", type: [{ code: "string" }] }, period: { type: [{ code: "Period" }] } } }, Identifier: { display: "Identifier", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, use: { type: [{ code: "code" }] }, type: { type: [{ code: "CodeableConcept" }] }, system: { type: [{ code: "uri" }] }, value: { type: [{ code: "string" }] }, period: { type: [{ code: "Period" }] }, assigner: { type: [{ code: "Reference", targetProfile: ["http://hl7.org/fhir/StructureDefinition/Organization"] }] } } }, MarketingStatus: { display: "MarketingStatus", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, modifierExtension: { max: "*", type: [{ code: "Extension" }] }, country: { min: 1, type: [{ code: "CodeableConcept" }] }, jurisdiction: { type: [{ code: "CodeableConcept" }] }, status: { min: 1, type: [{ code: "CodeableConcept" }] }, dateRange: { min: 1, type: [{ code: "Period" }] }, restoreDate: { type: [{ code: "dateTime" }] } } }, Meta: { display: "Meta", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, versionId: { type: [{ code: "id" }] }, lastUpdated: { type: [{ code: "instant" }] }, source: { type: [{ code: "uri" }] }, profile: { max: "*", type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/StructureDefinition"] }] }, security: { max: "*", type: [{ code: "Coding" }] }, tag: { max: "*", type: [{ code: "Coding" }] }, project: { type: [{ code: "uri" }] }, author: { type: [{ code: "Reference" }] }, account: { type: [{ code: "Reference" }] }, compartment: { max: "*", type: [{ code: "Reference" }] } } }, Money: { display: "Money", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, currency: { type: [{ code: "code" }] } } }, Narrative: { display: "Narrative", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, status: { min: 1, type: [{ code: "code" }] }, div: { min: 1, type: [{ code: "xhtml" }] } } }, ParameterDefinition: { display: "ParameterDefinition", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, name: { type: [{ code: "code" }] }, use: { min: 1, type: [{ code: "code" }] }, min: { type: [{ code: "integer" }] }, max: { type: [{ code: "string" }] }, documentation: { type: [{ code: "string" }] }, type: { min: 1, type: [{ code: "code" }] }, profile: { type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/StructureDefinition"] }] } } }, Period: { display: "Period", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, start: { type: [{ code: "dateTime" }] }, end: { type: [{ code: "dateTime" }] } } }, Population: { display: "Population", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, modifierExtension: { max: "*", type: [{ code: "Extension" }] }, "age[x]": { type: [{ code: "Range" }, { code: "CodeableConcept" }] }, gender: { type: [{ code: "CodeableConcept" }] }, race: { type: [{ code: "CodeableConcept" }] }, physiologicalCondition: { type: [{ code: "CodeableConcept" }] } } }, ProdCharacteristic: { display: "ProdCharacteristic", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, modifierExtension: { max: "*", type: [{ code: "Extension" }] }, height: { type: [{ code: "Quantity" }] }, width: { type: [{ code: "Quantity" }] }, depth: { type: [{ code: "Quantity" }] }, weight: { type: [{ code: "Quantity" }] }, nominalVolume: { type: [{ code: "Quantity" }] }, externalDiameter: { type: [{ code: "Quantity" }] }, shape: { type: [{ code: "string" }] }, color: { max: "*", type: [{ code: "string" }] }, imprint: { max: "*", type: [{ code: "string" }] }, image: { max: "*", type: [{ code: "Attachment" }] }, scoring: { type: [{ code: "CodeableConcept" }] } } }, ProductShelfLife: { display: "ProductShelfLife", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, modifierExtension: { max: "*", type: [{ code: "Extension" }] }, identifier: { type: [{ code: "Identifier" }] }, type: { min: 1, type: [{ code: "CodeableConcept" }] }, period: { min: 1, type: [{ code: "Quantity" }] }, specialPrecautionsForStorage: { max: "*", type: [{ code: "CodeableConcept" }] } } }, Quantity: { display: "Quantity", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, value: { type: [{ code: "decimal" }] }, comparator: { max: "0", type: [{ code: "code" }] }, unit: { type: [{ code: "string" }] }, system: { type: [{ code: "uri" }] }, code: { type: [{ code: "code" }] } } }, Range: { display: "Range", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, low: { type: [{ code: "Quantity", profile: ["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"] }] }, high: { type: [{ code: "Quantity", profile: ["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"] }] } } }, Ratio: { display: "Ratio", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, numerator: { type: [{ code: "Quantity" }] }, denominator: { type: [{ code: "Quantity" }] } } }, Reference: { display: "Reference", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, reference: { type: [{ code: "string" }] }, type: { type: [{ code: "uri" }] }, identifier: { type: [{ code: "Identifier" }] }, display: { type: [{ code: "string" }] } } }, RelatedArtifact: { display: "RelatedArtifact", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, type: { min: 1, type: [{ code: "code" }] }, label: { type: [{ code: "string" }] }, display: { type: [{ code: "string" }] }, citation: { type: [{ code: "markdown" }] }, url: { type: [{ code: "url" }] }, document: { type: [{ code: "Attachment" }] }, resource: { type: [{ code: "canonical", targetProfile: ["http://hl7.org/fhir/StructureDefinition/Resource"] }] } } }, SampledData: { display: "SampledData", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, origin: { min: 1, type: [{ code: "Quantity", profile: ["http://hl7.org/fhir/StructureDefinition/SimpleQuantity"] }] }, period: { min: 1, type: [{ code: "decimal" }] }, factor: { type: [{ code: "decimal" }] }, lowerLimit: { type: [{ code: "decimal" }] }, upperLimit: { type: [{ code: "decimal" }] }, dimensions: { min: 1, type: [{ code: "positiveInt" }] }, data: { type: [{ code: "string" }] } } }, Signature: { display: "Signature", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, type: { min: 1, max: "*", type: [{ code: "Coding" }] }, when: { min: 1, type: [{ code: "instant" }] }, who: { min: 1, type: [{ code: "Reference", targetProfile: ["http://hl7.org/fhir/StructureDefinition/Practitioner", "http://hl7.org/fhir/StructureDefinition/PractitionerRole", "http://hl7.org/fhir/StructureDefinition/RelatedPerson", "http://hl7.org/fhir/StructureDefinition/Patient", "http://hl7.org/fhir/StructureDefinition/Device", "http://hl7.org/fhir/StructureDefinition/Organization"] }] }, onBehalfOf: { type: [{ code: "Reference", targetProfile: ["http://hl7.org/fhir/StructureDefinition/Practitioner", "http://hl7.org/fhir/StructureDefinition/PractitionerRole", "http://hl7.org/fhir/StructureDefinition/RelatedPerson", "http://hl7.org/fhir/StructureDefinition/Patient", "http://hl7.org/fhir/StructureDefinition/Device", "http://hl7.org/fhir/StructureDefinition/Organization"] }] }, targetFormat: { type: [{ code: "code" }] }, sigFormat: { type: [{ code: "code" }] }, data: { type: [{ code: "base64Binary" }] } } }, SubstanceAmount: { display: "SubstanceAmount", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, modifierExtension: { max: "*", type: [{ code: "Extension" }] }, "amount[x]": { type: [{ code: "Quantity" }, { code: "Range" }, { code: "string" }] }, amountType: { type: [{ code: "CodeableConcept" }] }, amountText: { type: [{ code: "string" }] }, referenceRange: { type: [{ code: "Element" }] } } }, SubstanceAmountReferenceRange: { display: "SubstanceAmountReferenceRange", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, lowLimit: { type: [{ code: "Quantity" }] }, highLimit: { type: [{ code: "Quantity" }] } } }, Timing: { display: "Timing", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, modifierExtension: { max: "*", type: [{ code: "Extension" }] }, event: { max: "*", type: [{ code: "dateTime" }] }, repeat: { type: [{ code: "Element" }] }, code: { type: [{ code: "CodeableConcept" }] } } }, TimingRepeat: { display: "TimingRepeat", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, "bounds[x]": { type: [{ code: "Duration" }, { code: "Range" }, { code: "Period" }] }, count: { type: [{ code: "positiveInt" }] }, countMax: { type: [{ code: "positiveInt" }] }, duration: { type: [{ code: "decimal" }] }, durationMax: { type: [{ code: "decimal" }] }, durationUnit: { type: [{ code: "code" }] }, frequency: { type: [{ code: "positiveInt" }] }, frequencyMax: { type: [{ code: "positiveInt" }] }, period: { type: [{ code: "decimal" }] }, periodMax: { type: [{ code: "decimal" }] }, periodUnit: { type: [{ code: "code" }] }, dayOfWeek: { max: "*", type: [{ code: "code" }] }, timeOfDay: { max: "*", type: [{ code: "time" }] }, when: { max: "*", type: [{ code: "code" }] }, offset: { type: [{ code: "unsignedInt" }] } } }, TriggerDefinition: { display: "TriggerDefinition", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, type: { min: 1, type: [{ code: "code" }] }, name: { type: [{ code: "string" }] }, "timing[x]": { type: [{ code: "Timing" }, { code: "Reference", targetProfile: ["http://hl7.org/fhir/StructureDefinition/Schedule"] }, { code: "date" }, { code: "dateTime" }] }, data: { max: "*", type: [{ code: "DataRequirement" }] }, condition: { type: [{ code: "Expression" }] } } }, UsageContext: { display: "UsageContext", properties: { id: { type: [{ code: "string" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, code: { min: 1, type: [{ code: "Coding" }] }, "value[x]": { min: 1, type: [{ code: "CodeableConcept" }, { code: "Quantity" }, { code: "Range" }, { code: "Reference", targetProfile: ["http://hl7.org/fhir/StructureDefinition/PlanDefinition", "http://hl7.org/fhir/StructureDefinition/ResearchStudy", "http://hl7.org/fhir/StructureDefinition/InsurancePlan", "http://hl7.org/fhir/StructureDefinition/HealthcareService", "http://hl7.org/fhir/StructureDefinition/Group", "http://hl7.org/fhir/StructureDefinition/Location", "http://hl7.org/fhir/StructureDefinition/Organization"] }] } } }, MetadataResource: { display: "MetadataResource", properties: { id: { type: [{ code: "string" }] }, meta: { type: [{ code: "Meta" }] }, implicitRules: { type: [{ code: "uri" }] }, language: { type: [{ code: "code" }] }, text: { type: [{ code: "Narrative" }] }, contained: { max: "*", type: [{ code: "Resource" }] }, extension: { max: "*", type: [{ code: "Extension" }] }, modifierExtension: { max: "*", type: [{ code: "Extension" }] }, url: { type: [{ code: "uri" }] }, version: { type: [{ code: "string" }] }, name: { type: [{ code: "string" }] }, title: { type: [{ code: "string" }] }, status: { min: 1, type: [{ code: "code" }] }, experimental: { type: [{ code: "boolean" }] }, date: { type: [{ code: "dateTime" }] }, publisher: { type: [{ code: "string" }] }, contact: { max: "*", type: [{ code: "ContactDetail" }] }, description: { type: [{ code: "markdown" }] }, useContext: { max: "*", type: [{ code: "UsageContext" }] }, jurisdiction: { max: "*", type: [{ code: "CodeableConcept" }] } } }, IdentityProvider: { display: "IdentityProvider", properties: { authorizeUrl: { min: 1, type: [{ code: "string" }] }, tokenUrl: { min: 1, type: [{ code: "string" }] }, userInfoUrl: { min: 1, type: [{ code: "string" }] }, clientId: { min: 1, type: [{ code: "string" }] }, clientSecret: { min: 1, type: [{ code: "string" }] }, useSubject: { type: [{ code: "boolean" }] } } } } };
|
|
3577
|
+
function zt(r4, e) {
|
|
3566
3578
|
let t = [];
|
|
3567
3579
|
return r4.prefix && e?.prefix !== false && t.push(...r4.prefix), r4.given && t.push(...r4.given), r4.family && t.push(r4.family), r4.suffix && e?.suffix !== false && t.push(...r4.suffix), r4.use && (e?.all || e?.use) && t.push("[" + r4.use + "]"), t.join(" ").trim();
|
|
3568
3580
|
}
|
|
3569
3581
|
function ae(r4) {
|
|
3570
|
-
let e =
|
|
3582
|
+
let e = Yt(r4), t = ln(r4);
|
|
3571
3583
|
return t === e ? { reference: e } : { reference: e, display: t };
|
|
3572
3584
|
}
|
|
3573
|
-
function
|
|
3585
|
+
function Yt(r4) {
|
|
3574
3586
|
return r4.resourceType + "/" + r4.id;
|
|
3575
3587
|
}
|
|
3576
3588
|
function wo(r4) {
|
|
@@ -3590,70 +3602,70 @@ function ln(r4) {
|
|
|
3590
3602
|
if (e)
|
|
3591
3603
|
return e;
|
|
3592
3604
|
}
|
|
3593
|
-
return r4.resourceType === "Observation" && "code" in r4 && r4.code?.text ? r4.code.text : r4.resourceType === "User" && r4.email ? r4.email : "name" in r4 && r4.name && typeof r4.name == "string" ? r4.name :
|
|
3605
|
+
return r4.resourceType === "Observation" && "code" in r4 && r4.code?.text ? r4.code.text : r4.resourceType === "User" && r4.email ? r4.email : "name" in r4 && r4.name && typeof r4.name == "string" ? r4.name : Yt(r4);
|
|
3594
3606
|
}
|
|
3595
3607
|
function pn(r4) {
|
|
3596
3608
|
let e = r4.name;
|
|
3597
3609
|
if (e && e.length > 0)
|
|
3598
|
-
return
|
|
3610
|
+
return zt(e[0]);
|
|
3599
3611
|
}
|
|
3600
3612
|
function fn(r4) {
|
|
3601
3613
|
let e = r4.deviceName;
|
|
3602
3614
|
if (e && e.length > 0)
|
|
3603
3615
|
return e[0].name;
|
|
3604
3616
|
}
|
|
3605
|
-
function
|
|
3617
|
+
function Te(r4, e) {
|
|
3606
3618
|
let t = new Date(r4);
|
|
3607
3619
|
t.setUTCHours(0, 0, 0, 0);
|
|
3608
3620
|
let n = e ? new Date(e) : /* @__PURE__ */ new Date();
|
|
3609
3621
|
n.setUTCHours(0, 0, 0, 0);
|
|
3610
3622
|
let i2 = t.getUTCFullYear(), o = t.getUTCMonth(), s = t.getUTCDate(), a = n.getUTCFullYear(), c2 = n.getUTCMonth(), f = n.getUTCDate(), l2 = a - i2;
|
|
3611
3623
|
(c2 < o || c2 === o && f < s) && l2--;
|
|
3612
|
-
let
|
|
3613
|
-
f < s &&
|
|
3624
|
+
let B = a * 12 + c2 - (i2 * 12 + o);
|
|
3625
|
+
f < s && B--;
|
|
3614
3626
|
let Kr = Math.floor((n.getTime() - t.getTime()) / (1e3 * 60 * 60 * 24));
|
|
3615
|
-
return { years: l2, months:
|
|
3627
|
+
return { years: l2, months: B, days: Kr };
|
|
3616
3628
|
}
|
|
3617
|
-
function
|
|
3629
|
+
function tr(r4, e) {
|
|
3618
3630
|
return JSON.stringify(r4, hn, e ? 2 : void 0);
|
|
3619
3631
|
}
|
|
3620
3632
|
function hn(r4, e) {
|
|
3621
|
-
return !mn(r4) &&
|
|
3633
|
+
return !mn(r4) && R(e) ? void 0 : e;
|
|
3622
3634
|
}
|
|
3623
3635
|
function mn(r4) {
|
|
3624
3636
|
return !!/\d+$/.exec(r4);
|
|
3625
3637
|
}
|
|
3626
|
-
function
|
|
3638
|
+
function R(r4) {
|
|
3627
3639
|
if (r4 == null)
|
|
3628
3640
|
return true;
|
|
3629
3641
|
let e = typeof r4;
|
|
3630
3642
|
return e === "string" && r4 === "" || e === "object" && Object.keys(r4).length === 0;
|
|
3631
3643
|
}
|
|
3632
|
-
function
|
|
3644
|
+
function rr(r4) {
|
|
3633
3645
|
return r4.every((e) => typeof e == "string");
|
|
3634
3646
|
}
|
|
3635
|
-
var
|
|
3647
|
+
var nr = [];
|
|
3636
3648
|
for (let r4 = 0; r4 < 256; r4++)
|
|
3637
|
-
|
|
3638
|
-
function
|
|
3649
|
+
nr.push(r4.toString(16).padStart(2, "0"));
|
|
3650
|
+
function ir(r4) {
|
|
3639
3651
|
let e = new Uint8Array(r4), t = new Array(e.length);
|
|
3640
3652
|
for (let n = 0; n < e.length; n++)
|
|
3641
|
-
t[n] =
|
|
3653
|
+
t[n] = nr[e[n]];
|
|
3642
3654
|
return t.join("");
|
|
3643
3655
|
}
|
|
3644
|
-
function
|
|
3656
|
+
function or(r4) {
|
|
3645
3657
|
let e = new Uint8Array(r4), t = [];
|
|
3646
3658
|
for (let n = 0; n < e.length; n++)
|
|
3647
3659
|
t[n] = String.fromCharCode(e[n]);
|
|
3648
3660
|
return window.btoa(t.join(""));
|
|
3649
3661
|
}
|
|
3650
|
-
function
|
|
3662
|
+
function b(r4) {
|
|
3651
3663
|
return r4.charAt(0).toUpperCase() + r4.substring(1);
|
|
3652
3664
|
}
|
|
3653
3665
|
var ut = (r4) => new Promise((e) => {
|
|
3654
3666
|
setTimeout(e, r4);
|
|
3655
3667
|
});
|
|
3656
|
-
var
|
|
3668
|
+
var G = ((u2) => (u2.Address = "Address", u2.Age = "Age", u2.Annotation = "Annotation", u2.Attachment = "Attachment", u2.BackboneElement = "BackboneElement", u2.CodeableConcept = "CodeableConcept", u2.Coding = "Coding", u2.ContactDetail = "ContactDetail", u2.ContactPoint = "ContactPoint", u2.Contributor = "Contributor", u2.Count = "Count", u2.DataRequirement = "DataRequirement", u2.Distance = "Distance", u2.Dosage = "Dosage", u2.Duration = "Duration", u2.Expression = "Expression", u2.Extension = "Extension", u2.HumanName = "HumanName", u2.Identifier = "Identifier", u2.MarketingStatus = "MarketingStatus", u2.Meta = "Meta", u2.Money = "Money", u2.Narrative = "Narrative", u2.ParameterDefinition = "ParameterDefinition", u2.Period = "Period", u2.Population = "Population", u2.ProdCharacteristic = "ProdCharacteristic", u2.ProductShelfLife = "ProductShelfLife", u2.Quantity = "Quantity", u2.Range = "Range", u2.Ratio = "Ratio", u2.Reference = "Reference", u2.RelatedArtifact = "RelatedArtifact", u2.SampledData = "SampledData", u2.Signature = "Signature", u2.SubstanceAmount = "SubstanceAmount", u2.SystemString = "http://hl7.org/fhirpath/System.String", u2.Timing = "Timing", u2.TriggerDefinition = "TriggerDefinition", u2.UsageContext = "UsageContext", u2.base64Binary = "base64Binary", u2.boolean = "boolean", u2.canonical = "canonical", u2.code = "code", u2.date = "date", u2.dateTime = "dateTime", u2.decimal = "decimal", u2.id = "id", u2.instant = "instant", u2.integer = "integer", u2.markdown = "markdown", u2.oid = "oid", u2.positiveInt = "positiveInt", u2.string = "string", u2.time = "time", u2.unsignedInt = "unsignedInt", u2.uri = "uri", u2.url = "url", u2.uuid = "uuid", u2))(G || {});
|
|
3657
3669
|
function dt(r4) {
|
|
3658
3670
|
if (!r4.name)
|
|
3659
3671
|
return;
|
|
@@ -3671,15 +3683,15 @@ function En(r4, e) {
|
|
|
3671
3683
|
return;
|
|
3672
3684
|
let i2 = t.split(".");
|
|
3673
3685
|
i2[0] = r4.name;
|
|
3674
|
-
let o =
|
|
3675
|
-
s || (y.types[o] = s = {}), s.parentType = s.parentType ??
|
|
3686
|
+
let o = ce(i2), s = y.types[o];
|
|
3687
|
+
s || (y.types[o] = s = {}), s.parentType = s.parentType ?? ce(i2.slice(0, i2.length - 1)), s.display = s.display ?? o, s.structureDefinition = s.structureDefinition ?? r4, s.elementDefinition = s.elementDefinition ?? e, s.description = s.description ?? e.definition, s.properties = s.properties ?? {};
|
|
3676
3688
|
}
|
|
3677
3689
|
function Pn(r4, e) {
|
|
3678
3690
|
let n = e.path.split(".");
|
|
3679
3691
|
if (n.length === 1)
|
|
3680
3692
|
return;
|
|
3681
3693
|
n[0] = r4.name;
|
|
3682
|
-
let i2 =
|
|
3694
|
+
let i2 = ce(n.slice(0, n.length - 1)), o = y.types[i2];
|
|
3683
3695
|
if (!o)
|
|
3684
3696
|
return;
|
|
3685
3697
|
let s = n[n.length - 1];
|
|
@@ -3691,28 +3703,32 @@ function lt(r4) {
|
|
|
3691
3703
|
t && (t.searchParams || (t.searchParams = { _id: { base: [e], code: "_id", type: "token", expression: e + ".id" }, _lastUpdated: { base: [e], code: "_lastUpdated", type: "date", expression: e + ".meta.lastUpdated" }, _compartment: { base: [e], code: "_compartment", type: "reference", expression: e + ".meta.compartment" }, _profile: { base: [e], code: "_profile", type: "uri", expression: e + ".meta.profile" }, _security: { base: [e], code: "_security", type: "token", expression: e + ".meta.security" }, _source: { base: [e], code: "_source", type: "uri", expression: e + ".meta.source" }, _tag: { base: [e], code: "_tag", type: "token", expression: e + ".meta.tag" } }), t.searchParams[r4.code] = r4);
|
|
3692
3704
|
}
|
|
3693
3705
|
}
|
|
3694
|
-
function
|
|
3695
|
-
|
|
3706
|
+
function z(r4) {
|
|
3707
|
+
let e = r4.type?.[0]?.code;
|
|
3708
|
+
return e === "BackboneElement" || e === "Element" ? ce((r4.base?.path ?? r4.path)?.split(".")) : e;
|
|
3696
3709
|
}
|
|
3697
|
-
function ce(r4
|
|
3710
|
+
function ce(r4) {
|
|
3711
|
+
return r4.length === 1 ? r4[0] : r4.map(b).join("");
|
|
3712
|
+
}
|
|
3713
|
+
function ue(r4, e) {
|
|
3698
3714
|
let t = y.types[r4];
|
|
3699
3715
|
if (!t)
|
|
3700
3716
|
return;
|
|
3701
3717
|
let n = t.properties[e] ?? t.properties[e + "[x]"];
|
|
3702
3718
|
if (n) {
|
|
3703
3719
|
if (n.contentReference) {
|
|
3704
|
-
let i2 = n.contentReference.substring(1).split("."), o = i2.pop(), s =
|
|
3705
|
-
return
|
|
3720
|
+
let i2 = n.contentReference.substring(1).split("."), o = i2.pop(), s = ce(i2);
|
|
3721
|
+
return ue(s, o);
|
|
3706
3722
|
}
|
|
3707
3723
|
return n;
|
|
3708
3724
|
}
|
|
3709
3725
|
}
|
|
3710
|
-
function
|
|
3726
|
+
function L(r4) {
|
|
3711
3727
|
return !!(r4 && typeof r4 == "object" && "resourceType" in r4);
|
|
3712
3728
|
}
|
|
3713
|
-
var y =
|
|
3729
|
+
var y = Gt;
|
|
3714
3730
|
var kn = ((g) => (g.EQUALS = "eq", g.NOT_EQUALS = "ne", g.GREATER_THAN = "gt", g.LESS_THAN = "lt", g.GREATER_THAN_OR_EQUALS = "ge", g.LESS_THAN_OR_EQUALS = "le", g.STARTS_AFTER = "sa", g.ENDS_BEFORE = "eb", g.APPROXIMATELY = "ap", g.CONTAINS = "contains", g.EXACT = "exact", g.TEXT = "text", g.NOT = "not", g.ABOVE = "above", g.BELOW = "below", g.IN = "in", g.NOT_IN = "not-in", g.OF_TYPE = "of-type", g.MISSING = "missing", g.IDENTIFIER = "identifier", g.ITERATE = "iterate", g))(kn || {});
|
|
3715
|
-
var
|
|
3731
|
+
var Ae = class {
|
|
3716
3732
|
constructor(e, t) {
|
|
3717
3733
|
this.operator = e;
|
|
3718
3734
|
this.child = t;
|
|
@@ -3721,7 +3737,7 @@ var Se = class {
|
|
|
3721
3737
|
return `${this.operator}(${this.child.toString()})`;
|
|
3722
3738
|
}
|
|
3723
3739
|
};
|
|
3724
|
-
var
|
|
3740
|
+
var j = class {
|
|
3725
3741
|
constructor(e, t, n) {
|
|
3726
3742
|
this.operator = e;
|
|
3727
3743
|
this.left = t;
|
|
@@ -3731,7 +3747,7 @@ var $ = class {
|
|
|
3731
3747
|
return `${this.left.toString()} ${this.operator} ${this.right.toString()}`;
|
|
3732
3748
|
}
|
|
3733
3749
|
};
|
|
3734
|
-
var
|
|
3750
|
+
var Ee = class {
|
|
3735
3751
|
constructor() {
|
|
3736
3752
|
this.prefixParselets = {};
|
|
3737
3753
|
this.infixParselets = {};
|
|
@@ -3824,9 +3840,9 @@ function d(r4) {
|
|
|
3824
3840
|
return [{ type: "boolean", value: r4 }];
|
|
3825
3841
|
}
|
|
3826
3842
|
function x(r4) {
|
|
3827
|
-
return r4 == null ? { type: "undefined", value: void 0 } : Number.isSafeInteger(r4) ? { type: "integer", value: r4 } : typeof r4 == "number" ? { type: "decimal", value: r4 } : typeof r4 == "boolean" ? { type: "boolean", value: r4 } : typeof r4 == "string" ? { type: "string", value: r4 } : A(r4) ? { type: "Quantity", value: r4 } :
|
|
3843
|
+
return r4 == null ? { type: "undefined", value: void 0 } : Number.isSafeInteger(r4) ? { type: "integer", value: r4 } : typeof r4 == "number" ? { type: "decimal", value: r4 } : typeof r4 == "boolean" ? { type: "boolean", value: r4 } : typeof r4 == "string" ? { type: "string", value: r4 } : A(r4) ? { type: "Quantity", value: r4 } : L(r4) ? { type: r4.resourceType, value: r4 } : { type: "BackboneElement", value: r4 };
|
|
3828
3844
|
}
|
|
3829
|
-
function
|
|
3845
|
+
function _(r4) {
|
|
3830
3846
|
return r4.length === 0 ? false : !!r4[0].value;
|
|
3831
3847
|
}
|
|
3832
3848
|
function O(r4, e) {
|
|
@@ -3839,7 +3855,7 @@ function O(r4, e) {
|
|
|
3839
3855
|
function E(r4, e) {
|
|
3840
3856
|
if (!r4.value)
|
|
3841
3857
|
return;
|
|
3842
|
-
let t =
|
|
3858
|
+
let t = ue(r4.type, e);
|
|
3843
3859
|
return t ? $n(r4, e, t) : Qn(r4, e);
|
|
3844
3860
|
}
|
|
3845
3861
|
function $n(r4, e, t) {
|
|
@@ -3851,18 +3867,18 @@ function $n(r4, e, t) {
|
|
|
3851
3867
|
i2 = r4.value[e], o = n[0].code;
|
|
3852
3868
|
else
|
|
3853
3869
|
for (let a of n) {
|
|
3854
|
-
let c2 = e.replace("[x]", "") +
|
|
3870
|
+
let c2 = e.replace("[x]", "") + b(a.code);
|
|
3855
3871
|
if (c2 in r4.value) {
|
|
3856
3872
|
i2 = r4.value[c2], o = a.code;
|
|
3857
3873
|
break;
|
|
3858
3874
|
}
|
|
3859
3875
|
}
|
|
3860
3876
|
let s = r4.value["_" + e];
|
|
3861
|
-
if (s && (Array.isArray(i2) ? i2 = i2.map((a, c2) => s[c2] ?
|
|
3862
|
-
return (o === "Element" || o === "BackboneElement") && (o =
|
|
3877
|
+
if (s && (Array.isArray(i2) ? i2 = i2.map((a, c2) => s[c2] ? xr(a ?? {}, s[c2]) : a) : i2 = xr(i2 ?? {}, s)), !R(i2))
|
|
3878
|
+
return (o === "Element" || o === "BackboneElement") && (o = z(t)), Array.isArray(i2) ? i2.map((a) => mr(a, o)) : mr(i2, o);
|
|
3863
3879
|
}
|
|
3864
|
-
function
|
|
3865
|
-
return e === "Resource" &&
|
|
3880
|
+
function mr(r4, e) {
|
|
3881
|
+
return e === "Resource" && L(r4) && (e = r4.resourceType), { type: e, value: r4 };
|
|
3866
3882
|
}
|
|
3867
3883
|
function Qn(r4, e) {
|
|
3868
3884
|
let t = r4.value;
|
|
@@ -3872,22 +3888,22 @@ function Qn(r4, e) {
|
|
|
3872
3888
|
if (e in t)
|
|
3873
3889
|
n = t[e];
|
|
3874
3890
|
else
|
|
3875
|
-
for (let i2 in
|
|
3876
|
-
let o = e +
|
|
3891
|
+
for (let i2 in G) {
|
|
3892
|
+
let o = e + b(i2);
|
|
3877
3893
|
if (o in t) {
|
|
3878
3894
|
n = t[o];
|
|
3879
3895
|
break;
|
|
3880
3896
|
}
|
|
3881
3897
|
}
|
|
3882
|
-
if (!
|
|
3898
|
+
if (!R(n))
|
|
3883
3899
|
return Array.isArray(n) ? n.map(x) : x(n);
|
|
3884
3900
|
}
|
|
3885
|
-
function
|
|
3901
|
+
function Pe(r4) {
|
|
3886
3902
|
let e = [];
|
|
3887
3903
|
for (let t of r4) {
|
|
3888
3904
|
let n = false;
|
|
3889
3905
|
for (let i2 of e)
|
|
3890
|
-
if (
|
|
3906
|
+
if (_(Tr(t, i2))) {
|
|
3891
3907
|
n = true;
|
|
3892
3908
|
break;
|
|
3893
3909
|
}
|
|
@@ -3896,27 +3912,27 @@ function Ee(r4) {
|
|
|
3896
3912
|
return e;
|
|
3897
3913
|
}
|
|
3898
3914
|
function ht(r4) {
|
|
3899
|
-
return d(!
|
|
3915
|
+
return d(!_(r4));
|
|
3900
3916
|
}
|
|
3901
3917
|
function mt(r4, e) {
|
|
3902
|
-
return r4.length === 0 || e.length === 0 ? [] : r4.length !== e.length ? d(false) : d(r4.every((t, n) =>
|
|
3918
|
+
return r4.length === 0 || e.length === 0 ? [] : r4.length !== e.length ? d(false) : d(r4.every((t, n) => _(Tr(t, e[n]))));
|
|
3903
3919
|
}
|
|
3904
|
-
function
|
|
3920
|
+
function Tr(r4, e) {
|
|
3905
3921
|
let t = r4.value?.valueOf(), n = e.value?.valueOf();
|
|
3906
|
-
return typeof t == "number" && typeof n == "number" ? d(Math.abs(t - n) < 1e-8) : A(t) && A(n) ? d(
|
|
3922
|
+
return typeof t == "number" && typeof n == "number" ? d(Math.abs(t - n) < 1e-8) : A(t) && A(n) ? d(vr(t, n)) : d(typeof t == "object" && typeof n == "object" ? gt(r4, e) : t === n);
|
|
3907
3923
|
}
|
|
3908
3924
|
function yt(r4, e) {
|
|
3909
|
-
return r4.length === 0 && e.length === 0 ? d(true) : r4.length !== e.length ? d(false) : (r4.sort(
|
|
3925
|
+
return r4.length === 0 && e.length === 0 ? d(true) : r4.length !== e.length ? d(false) : (r4.sort(yr), e.sort(yr), d(r4.every((t, n) => _(Hn(t, e[n])))));
|
|
3910
3926
|
}
|
|
3911
3927
|
function Hn(r4, e) {
|
|
3912
3928
|
let { type: t, value: n } = r4, { type: i2, value: o } = e, s = n?.valueOf(), a = o?.valueOf();
|
|
3913
|
-
return typeof s == "number" && typeof a == "number" ? d(Math.abs(s - a) < 0.01) : A(s) && A(a) ? d(
|
|
3929
|
+
return typeof s == "number" && typeof a == "number" ? d(Math.abs(s - a) < 0.01) : A(s) && A(a) ? d(vr(s, a)) : d(t === "Coding" && i2 === "Coding" ? typeof s != "object" || typeof a != "object" ? false : s.code === a.code && s.system === a.system : typeof s == "object" && typeof a == "object" ? gt({ ...s, id: void 0 }, { ...a, id: void 0 }) : typeof s == "string" && typeof a == "string" ? s.toLowerCase() === a.toLowerCase() : s === a);
|
|
3914
3930
|
}
|
|
3915
|
-
function
|
|
3931
|
+
function yr(r4, e) {
|
|
3916
3932
|
let t = r4.value?.valueOf(), n = e.value?.valueOf();
|
|
3917
3933
|
return typeof t == "number" && typeof n == "number" ? t - n : typeof t == "string" && typeof n == "string" ? t.localeCompare(n) : 0;
|
|
3918
3934
|
}
|
|
3919
|
-
function
|
|
3935
|
+
function Ce(r4, e) {
|
|
3920
3936
|
let { value: t } = r4;
|
|
3921
3937
|
if (t == null)
|
|
3922
3938
|
return false;
|
|
@@ -3946,7 +3962,7 @@ function Wn(r4) {
|
|
|
3946
3962
|
function A(r4) {
|
|
3947
3963
|
return !!(r4 && typeof r4 == "object" && "value" in r4 && typeof r4.value == "number");
|
|
3948
3964
|
}
|
|
3949
|
-
function
|
|
3965
|
+
function vr(r4, e) {
|
|
3950
3966
|
return Math.abs(r4.value - e.value) < 0.01 && (r4.unit === e.unit || r4.code === e.code || r4.unit === e.code || r4.code === e.unit);
|
|
3951
3967
|
}
|
|
3952
3968
|
function gt(r4, e) {
|
|
@@ -3955,7 +3971,7 @@ function gt(r4, e) {
|
|
|
3955
3971
|
return false;
|
|
3956
3972
|
for (let i2 of t) {
|
|
3957
3973
|
let o = r4[i2], s = e[i2];
|
|
3958
|
-
if (
|
|
3974
|
+
if (gr(o) && gr(s)) {
|
|
3959
3975
|
if (!gt(o, s))
|
|
3960
3976
|
return false;
|
|
3961
3977
|
} else if (o !== s)
|
|
@@ -3963,14 +3979,14 @@ function gt(r4, e) {
|
|
|
3963
3979
|
}
|
|
3964
3980
|
return true;
|
|
3965
3981
|
}
|
|
3966
|
-
function
|
|
3982
|
+
function gr(r4) {
|
|
3967
3983
|
return r4 !== null && typeof r4 == "object";
|
|
3968
3984
|
}
|
|
3969
|
-
function
|
|
3985
|
+
function xr(r4, e) {
|
|
3970
3986
|
return delete e.__proto__, delete e.constructor, Object.assign(r4, e);
|
|
3971
3987
|
}
|
|
3972
|
-
var
|
|
3973
|
-
var S = { empty: (r4, e) => d(e.length === 0), exists: (r4, e, t) => t ? d(e.filter((n) =>
|
|
3988
|
+
var de = () => [];
|
|
3989
|
+
var S = { empty: (r4, e) => d(e.length === 0), exists: (r4, e, t) => t ? d(e.filter((n) => _(t.eval(r4, [n]))).length > 0) : d(e.length > 0), all: (r4, e, t) => d(e.every((n) => _(t.eval(r4, [n])))), allTrue: (r4, e) => {
|
|
3974
3990
|
for (let t of e)
|
|
3975
3991
|
if (!t.value)
|
|
3976
3992
|
return d(false);
|
|
@@ -3990,12 +4006,12 @@ var S = { empty: (r4, e) => d(e.length === 0), exists: (r4, e, t) => t ? d(e.fil
|
|
|
3990
4006
|
if (!t.value)
|
|
3991
4007
|
return d(true);
|
|
3992
4008
|
return d(false);
|
|
3993
|
-
}, subsetOf:
|
|
4009
|
+
}, subsetOf: de, supersetOf: de, count: (r4, e) => [{ type: "integer", value: e.length }], distinct: (r4, e) => {
|
|
3994
4010
|
let t = [];
|
|
3995
4011
|
for (let n of e)
|
|
3996
4012
|
t.some((i2) => i2.value === n.value) || t.push(n);
|
|
3997
4013
|
return t;
|
|
3998
|
-
}, isDistinct: (r4, e) => d(e.length === S.distinct(r4, e).length), where: (r4, e, t) => e.filter((n) =>
|
|
4014
|
+
}, isDistinct: (r4, e) => d(e.length === S.distinct(r4, e).length), where: (r4, e, t) => e.filter((n) => _(t.eval(r4, [n]))), select: (r4, e, t) => e.map((n) => t.eval(r4, [n])).flat(), repeat: de, ofType: (r4, e, t) => e.filter((n) => n.type === t.name), single: (r4, e) => {
|
|
3999
4015
|
if (e.length > 1)
|
|
4000
4016
|
throw new Error("Expected input length one for single()");
|
|
4001
4017
|
return e.length === 0 ? [] : e.slice(0, 1);
|
|
@@ -4027,7 +4043,7 @@ var S = { empty: (r4, e) => d(e.length === 0), exists: (r4, e, t) => t ? d(e.fil
|
|
|
4027
4043
|
if (!t)
|
|
4028
4044
|
return e;
|
|
4029
4045
|
let n = t.eval(r4, e);
|
|
4030
|
-
return
|
|
4046
|
+
return Pe([...e, ...n]);
|
|
4031
4047
|
}, combine: (r4, e, t) => {
|
|
4032
4048
|
if (!t)
|
|
4033
4049
|
return e;
|
|
@@ -4037,7 +4053,7 @@ var S = { empty: (r4, e) => d(e.length === 0), exists: (r4, e, t) => t ? d(e.fil
|
|
|
4037
4053
|
let o = t.eval(r4, e);
|
|
4038
4054
|
if (o.length > 1 || o.length === 1 && typeof o[0].value != "boolean")
|
|
4039
4055
|
throw new Error("Expected criterion to evaluate to a Boolean");
|
|
4040
|
-
return
|
|
4056
|
+
return _(o) ? n.eval(r4, e) : i2 ? i2.eval(r4, e) : [];
|
|
4041
4057
|
}, toBoolean: (r4, e) => {
|
|
4042
4058
|
if (e.length === 0)
|
|
4043
4059
|
return [];
|
|
@@ -4097,7 +4113,7 @@ var S = { empty: (r4, e) => d(e.length === 0), exists: (r4, e, t) => t ? d(e.fil
|
|
|
4097
4113
|
}, convertsToTime: (r4, e) => e.length === 0 ? [] : d(S.toTime(r4, e).length === 1), indexOf: (r4, e, t) => C((n, i2) => n.indexOf(i2), r4, e, t), substring: (r4, e, t, n) => C((i2, o, s) => {
|
|
4098
4114
|
let a = o, c2 = s ? a + s : i2.length;
|
|
4099
4115
|
return a < 0 || a >= i2.length ? void 0 : i2.substring(a, c2);
|
|
4100
|
-
}, r4, e, t, n), startsWith: (r4, e, t) => C((n, i2) => n.startsWith(i2), r4, e, t), endsWith: (r4, e, t) => C((n, i2) => n.endsWith(i2), r4, e, t), contains: (r4, e, t) => C((n, i2) => n.includes(i2), r4, e, t), upper: (r4, e) => C((t) => t.toUpperCase(), r4, e), lower: (r4, e) => C((t) => t.toLowerCase(), r4, e), replace: (r4, e, t, n) => C((i2, o, s) => i2.replaceAll(o, s), r4, e, t, n), matches: (r4, e, t) => C((n, i2) => !!new RegExp(i2).exec(n), r4, e, t), replaceMatches: (r4, e, t, n) => C((i2, o, s) => i2.replaceAll(o, s), r4, e, t, n), length: (r4, e) => C((t) => t.length, r4, e), toChars: (r4, e) => C((t) => t ? t.split("") : void 0, r4, e), abs: (r4, e) => V(Math.abs, r4, e), ceiling: (r4, e) => V(Math.ceil, r4, e), exp: (r4, e) => V(Math.exp, r4, e), floor: (r4, e) => V(Math.floor, r4, e), ln: (r4, e) => V(Math.log, r4, e), log: (r4, e, t) => V((n, i2) => Math.log(n) / Math.log(i2), r4, e, t), power: (r4, e, t) => V(Math.pow, r4, e, t), round: (r4, e) => V(Math.round, r4, e), sqrt: (r4, e) => V(Math.sqrt, r4, e), truncate: (r4, e) => V((t) => t | 0, r4, e), children:
|
|
4116
|
+
}, r4, e, t, n), startsWith: (r4, e, t) => C((n, i2) => n.startsWith(i2), r4, e, t), endsWith: (r4, e, t) => C((n, i2) => n.endsWith(i2), r4, e, t), contains: (r4, e, t) => C((n, i2) => n.includes(i2), r4, e, t), upper: (r4, e) => C((t) => t.toUpperCase(), r4, e), lower: (r4, e) => C((t) => t.toLowerCase(), r4, e), replace: (r4, e, t, n) => C((i2, o, s) => i2.replaceAll(o, s), r4, e, t, n), matches: (r4, e, t) => C((n, i2) => !!new RegExp(i2).exec(n), r4, e, t), replaceMatches: (r4, e, t, n) => C((i2, o, s) => i2.replaceAll(o, s), r4, e, t, n), length: (r4, e) => C((t) => t.length, r4, e), toChars: (r4, e) => C((t) => t ? t.split("") : void 0, r4, e), abs: (r4, e) => V(Math.abs, r4, e), ceiling: (r4, e) => V(Math.ceil, r4, e), exp: (r4, e) => V(Math.exp, r4, e), floor: (r4, e) => V(Math.floor, r4, e), ln: (r4, e) => V(Math.log, r4, e), log: (r4, e, t) => V((n, i2) => Math.log(n) / Math.log(i2), r4, e, t), power: (r4, e, t) => V(Math.pow, r4, e, t), round: (r4, e) => V(Math.round, r4, e), sqrt: (r4, e) => V(Math.sqrt, r4, e), truncate: (r4, e) => V((t) => t | 0, r4, e), children: de, descendants: de, trace: (r4, e, t) => (console.log("trace", e, t), e), now: () => [{ type: "dateTime", value: (/* @__PURE__ */ new Date()).toISOString() }], timeOfDay: () => [{ type: "time", value: (/* @__PURE__ */ new Date()).toISOString().substring(11) }], today: () => [{ type: "date", value: (/* @__PURE__ */ new Date()).toISOString().substring(0, 10) }], between: (r4, e, t, n, i2) => {
|
|
4101
4117
|
let o = S.toDateTime(r4, t.eval(r4, e));
|
|
4102
4118
|
if (o.length === 0)
|
|
4103
4119
|
throw new Error("Invalid start date");
|
|
@@ -4107,11 +4123,11 @@ var S = { empty: (r4, e) => d(e.length === 0), exists: (r4, e, t) => t ? d(e.fil
|
|
|
4107
4123
|
let a = i2.eval(r4, e)[0]?.value;
|
|
4108
4124
|
if (a !== "years" && a !== "months" && a !== "days")
|
|
4109
4125
|
throw new Error("Invalid units");
|
|
4110
|
-
let c2 =
|
|
4126
|
+
let c2 = Te(o[0].value, s[0].value);
|
|
4111
4127
|
return [{ type: "Quantity", value: { value: c2[a], unit: a } }];
|
|
4112
4128
|
}, is: (r4, e, t) => {
|
|
4113
4129
|
let n = "";
|
|
4114
|
-
return t instanceof
|
|
4130
|
+
return t instanceof M ? n = t.name : t instanceof Q && (n = t.left.name + "." + t.right.name), n ? e.map((i2) => ({ type: "boolean", value: Ce(i2, n) })) : [];
|
|
4115
4131
|
}, not: (r4, e) => S.toBoolean(r4, e).map((t) => ({ type: "boolean", value: !t.value })), resolve: (r4, e) => e.map((t) => {
|
|
4116
4132
|
let n = t.value, i2;
|
|
4117
4133
|
if (typeof n == "string")
|
|
@@ -4131,7 +4147,7 @@ var S = { empty: (r4, e) => d(e.length === 0), exists: (r4, e, t) => t ? d(e.fil
|
|
|
4131
4147
|
return { type: o, value: { resourceType: o, id: s } };
|
|
4132
4148
|
}
|
|
4133
4149
|
return { type: "BackboneElement", value: void 0 };
|
|
4134
|
-
}).filter((t) => !!t.value), as: (r4, e) => e, type: (r4, e) => e.map(({ value: t }) => typeof t == "boolean" ? { type: "BackboneElement", value: { namespace: "System", name: "Boolean" } } : typeof t == "number" ? { type: "BackboneElement", value: { namespace: "System", name: "Integer" } } :
|
|
4150
|
+
}).filter((t) => !!t.value), as: (r4, e) => e, type: (r4, e) => e.map(({ value: t }) => typeof t == "boolean" ? { type: "BackboneElement", value: { namespace: "System", name: "Boolean" } } : typeof t == "number" ? { type: "BackboneElement", value: { namespace: "System", name: "Integer" } } : L(t) ? { type: "BackboneElement", value: { namespace: "FHIR", name: t.resourceType } } : { type: "BackboneElement", value: null }), conformsTo: (r4, e, t) => {
|
|
4135
4151
|
let n = t.eval(r4, e)[0].value;
|
|
4136
4152
|
if (!n.startsWith("http://hl7.org/fhir/StructureDefinition/"))
|
|
4137
4153
|
throw new Error("Expected a StructureDefinition URL");
|
|
@@ -4176,7 +4192,7 @@ var I = class {
|
|
|
4176
4192
|
return typeof e == "string" ? `'${e}'` : e.toString();
|
|
4177
4193
|
}
|
|
4178
4194
|
};
|
|
4179
|
-
var
|
|
4195
|
+
var M = class {
|
|
4180
4196
|
constructor(e) {
|
|
4181
4197
|
this.name = e;
|
|
4182
4198
|
}
|
|
@@ -4194,13 +4210,13 @@ var N = class {
|
|
|
4194
4210
|
evalValue(e) {
|
|
4195
4211
|
let t = e.value;
|
|
4196
4212
|
if (!(!t || typeof t != "object"))
|
|
4197
|
-
return
|
|
4213
|
+
return L(t) && t.resourceType === this.name ? e : E(e, this.name);
|
|
4198
4214
|
}
|
|
4199
4215
|
toString() {
|
|
4200
4216
|
return this.name;
|
|
4201
4217
|
}
|
|
4202
4218
|
};
|
|
4203
|
-
var
|
|
4219
|
+
var Ie = class {
|
|
4204
4220
|
eval() {
|
|
4205
4221
|
return [];
|
|
4206
4222
|
}
|
|
@@ -4208,7 +4224,7 @@ var we = class {
|
|
|
4208
4224
|
return "{}";
|
|
4209
4225
|
}
|
|
4210
4226
|
};
|
|
4211
|
-
var
|
|
4227
|
+
var ke = class extends Ae {
|
|
4212
4228
|
constructor(t, n, i2) {
|
|
4213
4229
|
super(t, n);
|
|
4214
4230
|
this.impl = i2;
|
|
@@ -4220,7 +4236,7 @@ var Ie = class extends Se {
|
|
|
4220
4236
|
return this.operator + this.child.toString();
|
|
4221
4237
|
}
|
|
4222
4238
|
};
|
|
4223
|
-
var K = class extends
|
|
4239
|
+
var K = class extends j {
|
|
4224
4240
|
constructor(e, t) {
|
|
4225
4241
|
super("as", e, t);
|
|
4226
4242
|
}
|
|
@@ -4228,7 +4244,7 @@ var K = class extends $ {
|
|
|
4228
4244
|
return S.ofType(e, this.left.eval(e, t), this.right);
|
|
4229
4245
|
}
|
|
4230
4246
|
};
|
|
4231
|
-
var v = class extends
|
|
4247
|
+
var v = class extends j {
|
|
4232
4248
|
};
|
|
4233
4249
|
var P = class extends v {
|
|
4234
4250
|
constructor(t, n, i2, o) {
|
|
@@ -4246,7 +4262,7 @@ var P = class extends v {
|
|
|
4246
4262
|
return typeof l2 == "boolean" ? d(l2) : A(s) ? [{ type: "Quantity", value: { ...s, value: l2 } }] : [x(l2)];
|
|
4247
4263
|
}
|
|
4248
4264
|
};
|
|
4249
|
-
var
|
|
4265
|
+
var De = class extends j {
|
|
4250
4266
|
constructor(e, t) {
|
|
4251
4267
|
super("&", e, t);
|
|
4252
4268
|
}
|
|
@@ -4255,7 +4271,7 @@ var ke = class extends $ {
|
|
|
4255
4271
|
return o.length > 0 && o.every((s) => typeof s.value == "string") ? [{ type: "string", value: o.map((s) => s.value).join("") }] : o;
|
|
4256
4272
|
}
|
|
4257
4273
|
};
|
|
4258
|
-
var
|
|
4274
|
+
var Oe = class extends v {
|
|
4259
4275
|
constructor(e, t) {
|
|
4260
4276
|
super("contains", e, t);
|
|
4261
4277
|
}
|
|
@@ -4264,7 +4280,7 @@ var De = class extends v {
|
|
|
4264
4280
|
return d(n.some((o) => o.value === i2[0].value));
|
|
4265
4281
|
}
|
|
4266
4282
|
};
|
|
4267
|
-
var
|
|
4283
|
+
var Ve = class extends v {
|
|
4268
4284
|
constructor(e, t) {
|
|
4269
4285
|
super("in", e, t);
|
|
4270
4286
|
}
|
|
@@ -4273,7 +4289,7 @@ var Oe = class extends v {
|
|
|
4273
4289
|
return n ? d(i2.some((o) => o.value === n.value)) : [];
|
|
4274
4290
|
}
|
|
4275
4291
|
};
|
|
4276
|
-
var
|
|
4292
|
+
var Q = class extends j {
|
|
4277
4293
|
constructor(e, t) {
|
|
4278
4294
|
super(".", e, t);
|
|
4279
4295
|
}
|
|
@@ -4284,16 +4300,16 @@ var H = class extends $ {
|
|
|
4284
4300
|
return `${this.left.toString()}.${this.right.toString()}`;
|
|
4285
4301
|
}
|
|
4286
4302
|
};
|
|
4287
|
-
var re = class extends
|
|
4303
|
+
var re = class extends j {
|
|
4288
4304
|
constructor(e, t) {
|
|
4289
4305
|
super("|", e, t);
|
|
4290
4306
|
}
|
|
4291
4307
|
eval(e, t) {
|
|
4292
4308
|
let n = this.left.eval(e, t), i2 = this.right.eval(e, t);
|
|
4293
|
-
return
|
|
4309
|
+
return Pe([...n, ...i2]);
|
|
4294
4310
|
}
|
|
4295
4311
|
};
|
|
4296
|
-
var
|
|
4312
|
+
var Ue = class extends v {
|
|
4297
4313
|
constructor(e, t) {
|
|
4298
4314
|
super("=", e, t);
|
|
4299
4315
|
}
|
|
@@ -4302,7 +4318,7 @@ var Ve = class extends v {
|
|
|
4302
4318
|
return mt(n, i2);
|
|
4303
4319
|
}
|
|
4304
4320
|
};
|
|
4305
|
-
var
|
|
4321
|
+
var Le = class extends v {
|
|
4306
4322
|
constructor(e, t) {
|
|
4307
4323
|
super("!=", e, t);
|
|
4308
4324
|
}
|
|
@@ -4311,7 +4327,7 @@ var Ue = class extends v {
|
|
|
4311
4327
|
return ht(mt(n, i2));
|
|
4312
4328
|
}
|
|
4313
4329
|
};
|
|
4314
|
-
var
|
|
4330
|
+
var _e = class extends v {
|
|
4315
4331
|
constructor(e, t) {
|
|
4316
4332
|
super("~", e, t);
|
|
4317
4333
|
}
|
|
@@ -4320,7 +4336,7 @@ var Le = class extends v {
|
|
|
4320
4336
|
return yt(n, i2);
|
|
4321
4337
|
}
|
|
4322
4338
|
};
|
|
4323
|
-
var
|
|
4339
|
+
var Me = class extends v {
|
|
4324
4340
|
constructor(e, t) {
|
|
4325
4341
|
super("!~", e, t);
|
|
4326
4342
|
}
|
|
@@ -4338,10 +4354,10 @@ var J = class extends v {
|
|
|
4338
4354
|
if (n.length !== 1)
|
|
4339
4355
|
return [];
|
|
4340
4356
|
let i2 = this.right.name;
|
|
4341
|
-
return d(
|
|
4357
|
+
return d(Ce(n[0], i2));
|
|
4342
4358
|
}
|
|
4343
4359
|
};
|
|
4344
|
-
var
|
|
4360
|
+
var Ne = class extends v {
|
|
4345
4361
|
constructor(e, t) {
|
|
4346
4362
|
super("and", e, t);
|
|
4347
4363
|
}
|
|
@@ -4350,7 +4366,7 @@ var Me = class extends v {
|
|
|
4350
4366
|
return n?.value === true && i2?.value === true ? d(true) : n?.value === false || i2?.value === false ? d(false) : [];
|
|
4351
4367
|
}
|
|
4352
4368
|
};
|
|
4353
|
-
var
|
|
4369
|
+
var Be = class extends v {
|
|
4354
4370
|
constructor(e, t) {
|
|
4355
4371
|
super("or", e, t);
|
|
4356
4372
|
}
|
|
@@ -4359,7 +4375,7 @@ var Ne = class extends v {
|
|
|
4359
4375
|
return n?.value === false && i2?.value === false ? d(false) : n?.value || i2?.value ? d(true) : [];
|
|
4360
4376
|
}
|
|
4361
4377
|
};
|
|
4362
|
-
var
|
|
4378
|
+
var Fe = class extends v {
|
|
4363
4379
|
constructor(e, t) {
|
|
4364
4380
|
super("xor", e, t);
|
|
4365
4381
|
}
|
|
@@ -4368,7 +4384,7 @@ var Be = class extends v {
|
|
|
4368
4384
|
return !n || !i2 ? [] : d(n.value !== i2.value);
|
|
4369
4385
|
}
|
|
4370
4386
|
};
|
|
4371
|
-
var
|
|
4387
|
+
var qe = class extends v {
|
|
4372
4388
|
constructor(e, t) {
|
|
4373
4389
|
super("implies", e, t);
|
|
4374
4390
|
}
|
|
@@ -4377,7 +4393,7 @@ var Fe = class extends v {
|
|
|
4377
4393
|
return i2?.value === true || n?.value === false ? d(true) : !n || !i2 ? [] : d(false);
|
|
4378
4394
|
}
|
|
4379
4395
|
};
|
|
4380
|
-
var
|
|
4396
|
+
var N = class {
|
|
4381
4397
|
constructor(e, t) {
|
|
4382
4398
|
this.name = e;
|
|
4383
4399
|
this.args = t;
|
|
@@ -4411,7 +4427,7 @@ var Y = class {
|
|
|
4411
4427
|
return `${this.left.toString()}[${this.expr.toString()}]`;
|
|
4412
4428
|
}
|
|
4413
4429
|
};
|
|
4414
|
-
var
|
|
4430
|
+
var pe = ["!=", "!~", "<=", ">=", "{}", "->"];
|
|
4415
4431
|
var p = { FunctionCall: 0, Dot: 1, Indexer: 2, UnaryAdd: 3, UnarySubtract: 3, Multiply: 4, Divide: 4, IntegerDivide: 4, Modulo: 4, Add: 5, Subtract: 5, Ampersand: 5, Is: 6, As: 6, Union: 7, GreaterThan: 8, GreaterThanOrEquals: 8, LessThan: 8, LessThanOrEquals: 8, Equals: 9, Equivalent: 9, NotEquals: 9, NotEquivalent: 9, In: 10, Contains: 10, And: 11, Xor: 12, Or: 12, Implies: 13, Arrow: 100, Semicolon: 200 };
|
|
4416
4432
|
var Gn = { parse(r4) {
|
|
4417
4433
|
let e = r4.consumeAndParse();
|
|
@@ -4426,45 +4442,45 @@ var zn = { parse(r4, e) {
|
|
|
4426
4442
|
return new Y(e, t);
|
|
4427
4443
|
}, precedence: p.Indexer };
|
|
4428
4444
|
var Kn = { parse(r4, e) {
|
|
4429
|
-
if (!(e instanceof
|
|
4445
|
+
if (!(e instanceof M))
|
|
4430
4446
|
throw new Error("Unexpected parentheses");
|
|
4431
4447
|
let t = [];
|
|
4432
4448
|
for (; !r4.match(")"); )
|
|
4433
4449
|
t.push(r4.consumeAndParse()), r4.match(",");
|
|
4434
|
-
return new
|
|
4450
|
+
return new N(e.name, t);
|
|
4435
4451
|
}, precedence: p.FunctionCall };
|
|
4436
4452
|
function Jn(r4) {
|
|
4437
4453
|
let e = r4.split(" "), t = parseFloat(e[0]), n = e[1];
|
|
4438
4454
|
return n?.startsWith("'") && n.endsWith("'") ? n = n.substring(1, n.length - 1) : n = "{" + n + "}", { value: t, unit: n };
|
|
4439
4455
|
}
|
|
4440
|
-
function
|
|
4441
|
-
return new
|
|
4456
|
+
function fe() {
|
|
4457
|
+
return new Ee().registerPrefix("String", { parse: (r4, e) => new I({ type: "string", value: e.value }) }).registerPrefix("DateTime", { parse: (r4, e) => new I({ type: "dateTime", value: te(e.value) }) }).registerPrefix("Quantity", { parse: (r4, e) => new I({ type: "Quantity", value: Jn(e.value) }) }).registerPrefix("Number", { parse: (r4, e) => new I({ type: "decimal", value: parseFloat(e.value) }) }).registerPrefix("true", { parse: () => new I({ type: "boolean", value: true }) }).registerPrefix("false", { parse: () => new I({ type: "boolean", value: false }) }).registerPrefix("Symbol", { parse: (r4, e) => new M(e.value) }).registerPrefix("{}", { parse: () => new Ie() }).registerPrefix("(", Gn).registerInfix("[", zn).registerInfix("(", Kn).prefix("+", p.UnaryAdd, (r4, e) => new ke("+", e, (t) => t)).prefix("-", p.UnarySubtract, (r4, e) => new P("-", e, e, (t, n) => -n)).infixLeft(".", p.Dot, (r4, e, t) => new Q(r4, t)).infixLeft("/", p.Divide, (r4, e, t) => new P("/", r4, t, (n, i2) => n / i2)).infixLeft("*", p.Multiply, (r4, e, t) => new P("*", r4, t, (n, i2) => n * i2)).infixLeft("+", p.Add, (r4, e, t) => new P("+", r4, t, (n, i2) => n + i2)).infixLeft("-", p.Subtract, (r4, e, t) => new P("-", r4, t, (n, i2) => n - i2)).infixLeft("|", p.Union, (r4, e, t) => new re(r4, t)).infixLeft("=", p.Equals, (r4, e, t) => new Ue(r4, t)).infixLeft("!=", p.NotEquals, (r4, e, t) => new Le(r4, t)).infixLeft("~", p.Equivalent, (r4, e, t) => new _e(r4, t)).infixLeft("!~", p.NotEquivalent, (r4, e, t) => new Me(r4, t)).infixLeft("<", p.LessThan, (r4, e, t) => new P("<", r4, t, (n, i2) => n < i2)).infixLeft("<=", p.LessThanOrEquals, (r4, e, t) => new P("<=", r4, t, (n, i2) => n <= i2)).infixLeft(">", p.GreaterThan, (r4, e, t) => new P(">", r4, t, (n, i2) => n > i2)).infixLeft(">=", p.GreaterThanOrEquals, (r4, e, t) => new P(">=", r4, t, (n, i2) => n >= i2)).infixLeft("&", p.Ampersand, (r4, e, t) => new De(r4, t)).infixLeft("and", p.And, (r4, e, t) => new Ne(r4, t)).infixLeft("as", p.As, (r4, e, t) => new K(r4, t)).infixLeft("contains", p.Contains, (r4, e, t) => new Oe(r4, t)).infixLeft("div", p.Divide, (r4, e, t) => new P("div", r4, t, (n, i2) => n / i2 | 0)).infixLeft("in", p.In, (r4, e, t) => new Ve(r4, t)).infixLeft("is", p.Is, (r4, e, t) => new J(r4, t)).infixLeft("mod", p.Modulo, (r4, e, t) => new P("mod", r4, t, (n, i2) => n % i2)).infixLeft("or", p.Or, (r4, e, t) => new Be(r4, t)).infixLeft("xor", p.Xor, (r4, e, t) => new Fe(r4, t)).infixLeft("implies", p.Implies, (r4, e, t) => new qe(r4, t));
|
|
4442
4458
|
}
|
|
4443
|
-
var Yn =
|
|
4444
|
-
var
|
|
4459
|
+
var Yn = fe();
|
|
4460
|
+
var Sr = ((l2) => (l2.BOOLEAN = "BOOLEAN", l2.NUMBER = "NUMBER", l2.QUANTITY = "QUANTITY", l2.TEXT = "TEXT", l2.REFERENCE = "REFERENCE", l2.CANONICAL = "CANONICAL", l2.DATE = "DATE", l2.DATETIME = "DATETIME", l2.PERIOD = "PERIOD", l2.UUID = "UUID", l2))(Sr || {});
|
|
4445
4461
|
var fi = ((T) => (T.READ = "read", T.VREAD = "vread", T.UPDATE = "update", T.PATCH = "patch", T.DELETE = "delete", T.HISTORY = "history", T.HISTORY_INSTANCE = "history-instance", T.HISTORY_TYPE = "history-type", T.HISTORY_SYSTEM = "history-system", T.CREATE = "create", T.SEARCH = "search", T.SEARCH_TYPE = "search-type", T.SEARCH_SYSTEM = "search-system", T.SEARCH_COMPARTMENT = "search-compartment", T.CAPABILITIES = "capabilities", T.TRANSACTION = "transaction", T.BATCH = "batch", T.OPERATION = "operation", T))(fi || {});
|
|
4446
|
-
function
|
|
4462
|
+
function Ir(r4) {
|
|
4447
4463
|
if (typeof window < "u")
|
|
4448
4464
|
return window.atob(r4);
|
|
4449
4465
|
if (typeof Buffer < "u")
|
|
4450
4466
|
return Buffer.from(r4, "base64").toString("binary");
|
|
4451
4467
|
throw new Error("Unable to decode base64");
|
|
4452
4468
|
}
|
|
4453
|
-
function
|
|
4469
|
+
function kr(r4) {
|
|
4454
4470
|
if (typeof window < "u")
|
|
4455
4471
|
return window.btoa(r4);
|
|
4456
4472
|
if (typeof Buffer < "u")
|
|
4457
4473
|
return Buffer.from(r4, "binary").toString("base64");
|
|
4458
4474
|
throw new Error("Unable to encode base64");
|
|
4459
4475
|
}
|
|
4460
|
-
function
|
|
4476
|
+
function bt() {
|
|
4461
4477
|
let r4 = new Uint32Array(28);
|
|
4462
|
-
return crypto.getRandomValues(r4),
|
|
4478
|
+
return crypto.getRandomValues(r4), ir(r4.buffer);
|
|
4463
4479
|
}
|
|
4464
|
-
async function
|
|
4480
|
+
async function Dr(r4) {
|
|
4465
4481
|
return crypto.subtle.digest("SHA-256", new TextEncoder().encode(r4));
|
|
4466
4482
|
}
|
|
4467
|
-
var
|
|
4483
|
+
var $e = class {
|
|
4468
4484
|
constructor(e = 10) {
|
|
4469
4485
|
this.max = e, this.cache = /* @__PURE__ */ new Map();
|
|
4470
4486
|
}
|
|
@@ -4489,7 +4505,7 @@ var je = class {
|
|
|
4489
4505
|
}
|
|
4490
4506
|
};
|
|
4491
4507
|
var X = { CSS: "text/css", FAVICON: "image/vnd.microsoft.icon", FHIR_JSON: "application/fhir+json", FORM_URL_ENCODED: "application/x-www-form-urlencoded", HL7_V2: "x-application/hl7-v2+er7", HTML: "text/html", JAVASCRIPT: "text/javascript", JSON: "application/json", JSON_PATCH: "application/json-patch+json", PNG: "image/png", SVG: "image/svg+xml", TEXT: "text/plain", TYPESCRIPT: "text/typescript" };
|
|
4492
|
-
var
|
|
4508
|
+
var Qe = class {
|
|
4493
4509
|
constructor() {
|
|
4494
4510
|
this.listeners = {};
|
|
4495
4511
|
}
|
|
@@ -4511,31 +4527,31 @@ var $e = class {
|
|
|
4511
4527
|
return t && t.forEach((n) => n.call(this, e)), !e.defaultPrevented;
|
|
4512
4528
|
}
|
|
4513
4529
|
};
|
|
4514
|
-
function
|
|
4515
|
-
let e = r4.replace(/-/g, "+").replace(/_/g, "/"), t =
|
|
4530
|
+
function Si(r4) {
|
|
4531
|
+
let e = r4.replace(/-/g, "+").replace(/_/g, "/"), t = Ir(e), n = Array.from(t).reduce((o, s) => {
|
|
4516
4532
|
let a = ("00" + s.charCodeAt(0).toString(16)).slice(-2);
|
|
4517
4533
|
return `${o}%${a}`;
|
|
4518
4534
|
}, ""), i2 = decodeURIComponent(n);
|
|
4519
4535
|
return JSON.parse(i2);
|
|
4520
4536
|
}
|
|
4521
|
-
function
|
|
4537
|
+
function Vr(r4) {
|
|
4522
4538
|
return r4.split(".").length === 3;
|
|
4523
4539
|
}
|
|
4524
4540
|
function Et(r4) {
|
|
4525
4541
|
let [e, t, n] = r4.split(".");
|
|
4526
|
-
return
|
|
4542
|
+
return Si(t);
|
|
4527
4543
|
}
|
|
4528
|
-
function
|
|
4544
|
+
function Ur(r4) {
|
|
4529
4545
|
try {
|
|
4530
4546
|
return typeof Et(r4).login_id == "string";
|
|
4531
4547
|
} catch {
|
|
4532
4548
|
return false;
|
|
4533
4549
|
}
|
|
4534
4550
|
}
|
|
4535
|
-
var
|
|
4551
|
+
var bi;
|
|
4536
4552
|
var w = class {
|
|
4537
4553
|
constructor(e) {
|
|
4538
|
-
this[
|
|
4554
|
+
this[bi] = "ReadablePromise";
|
|
4539
4555
|
this.status = "pending";
|
|
4540
4556
|
this.suspender = e.then((t) => (this.status = "success", this.response = t, t), (t) => {
|
|
4541
4557
|
throw this.status = "error", this.error = t, t;
|
|
@@ -4567,8 +4583,8 @@ var w = class {
|
|
|
4567
4583
|
return this.suspender.finally(e);
|
|
4568
4584
|
}
|
|
4569
4585
|
};
|
|
4570
|
-
|
|
4571
|
-
var
|
|
4586
|
+
bi = Symbol.toStringTag;
|
|
4587
|
+
var He = class {
|
|
4572
4588
|
constructor() {
|
|
4573
4589
|
this.storage = typeof localStorage < "u" ? localStorage : new Pt();
|
|
4574
4590
|
}
|
|
@@ -4586,7 +4602,7 @@ var Qe = class {
|
|
|
4586
4602
|
return t ? JSON.parse(t) : void 0;
|
|
4587
4603
|
}
|
|
4588
4604
|
setObject(e, t) {
|
|
4589
|
-
this.setString(e, t ?
|
|
4605
|
+
this.setString(e, t ? tr(t) : void 0);
|
|
4590
4606
|
}
|
|
4591
4607
|
};
|
|
4592
4608
|
var Pt = class {
|
|
@@ -4615,17 +4631,17 @@ var Pt = class {
|
|
|
4615
4631
|
var Ai = "https://api.medplum.com/";
|
|
4616
4632
|
var Ei = 1e3;
|
|
4617
4633
|
var Pi = 6e4;
|
|
4618
|
-
var
|
|
4619
|
-
var
|
|
4634
|
+
var Lr = "Binary/";
|
|
4635
|
+
var _r = { resourceType: "Device", id: "system", deviceName: [{ name: "System" }] };
|
|
4620
4636
|
var Ci = ((o) => (o.ClientCredentials = "client_credentials", o.AuthorizationCode = "authorization_code", o.RefreshToken = "refresh_token", o.JwtBearer = "urn:ietf:params:oauth:grant-type:jwt-bearer", o.TokenExchange = "urn:ietf:params:oauth:grant-type:token-exchange", o))(Ci || {});
|
|
4621
4637
|
var wi = ((o) => (o.AccessToken = "urn:ietf:params:oauth:token-type:access_token", o.RefreshToken = "urn:ietf:params:oauth:token-type:refresh_token", o.IdToken = "urn:ietf:params:oauth:token-type:id_token", o.Saml1Token = "urn:ietf:params:oauth:token-type:saml1", o.Saml2Token = "urn:ietf:params:oauth:token-type:saml2", o))(wi || {});
|
|
4622
4638
|
var Ii = ((e) => (e.JwtBearer = "urn:ietf:params:oauth:client-assertion-type:jwt-bearer", e))(Ii || {});
|
|
4623
|
-
var
|
|
4639
|
+
var Mr = class extends Qe {
|
|
4624
4640
|
constructor(t) {
|
|
4625
4641
|
super();
|
|
4626
4642
|
if (t?.baseUrl && !t.baseUrl.startsWith("http"))
|
|
4627
4643
|
throw new Error("Base URL must start with http or https");
|
|
4628
|
-
this.options = t ?? {}, this.fetch = t?.fetch ?? ki(), this.storage = t?.storage ?? new
|
|
4644
|
+
this.options = t ?? {}, this.fetch = t?.fetch ?? ki(), this.storage = t?.storage ?? new He(), this.createPdfImpl = t?.createPdf, this.baseUrl = Br(t?.baseUrl ?? Ai), this.fhirBaseUrl = Br(We(this.baseUrl, t?.fhirUrlPath ?? "fhir/R4/")), this.authorizeUrl = We(this.baseUrl, t?.authorizeUrl ?? "oauth2/authorize"), this.tokenUrl = We(this.baseUrl, t?.tokenUrl ?? "oauth2/token"), this.logoutUrl = We(this.baseUrl, t?.logoutUrl ?? "oauth2/logout"), this.clientId = t?.clientId ?? "", this.clientSecret = t?.clientSecret ?? "", this.onUnauthenticated = t?.onUnauthenticated, this.cacheTime = t?.cacheTime ?? Pi, this.cacheTime > 0 ? this.requestCache = new $e(t?.resourceCacheSize ?? Ei) : this.requestCache = void 0, t?.autoBatchTime ? (this.autoBatchTime = t.autoBatchTime, this.autoBatchQueue = []) : (this.autoBatchTime = 0, this.autoBatchQueue = void 0);
|
|
4629
4645
|
let n = this.getActiveLogin();
|
|
4630
4646
|
n && (this.setAccessToken(n.accessToken, n.refreshToken), this.refreshProfile().catch(console.log)), this.setupStorageListener();
|
|
4631
4647
|
}
|
|
@@ -4766,7 +4782,7 @@ var _r = class extends $e {
|
|
|
4766
4782
|
let s = this.fhirSearchUrl(t, n).toString() + "-searchResources", a = this.getCacheEntry(s, i2);
|
|
4767
4783
|
if (a)
|
|
4768
4784
|
return a.value;
|
|
4769
|
-
let c2 = new w(this.search(t, n, i2).then(
|
|
4785
|
+
let c2 = new w(this.search(t, n, i2).then(qr));
|
|
4770
4786
|
return this.setCacheEntry(s, c2), c2;
|
|
4771
4787
|
}
|
|
4772
4788
|
async *searchResourcePages(t, n, i2) {
|
|
@@ -4775,7 +4791,7 @@ var _r = class extends $e {
|
|
|
4775
4791
|
let s = new URL(o).searchParams, a = await this.search(t, s, i2), c2 = a.link?.find((f) => f.relation === "next");
|
|
4776
4792
|
if (!a.entry?.length && !c2)
|
|
4777
4793
|
break;
|
|
4778
|
-
yield
|
|
4794
|
+
yield qr(a), o = c2?.url ? new URL(c2.url) : void 0;
|
|
4779
4795
|
}
|
|
4780
4796
|
}
|
|
4781
4797
|
searchValueSet(t, n, i2) {
|
|
@@ -4791,7 +4807,7 @@ var _r = class extends $e {
|
|
|
4791
4807
|
if (!n)
|
|
4792
4808
|
return;
|
|
4793
4809
|
if (n === "system")
|
|
4794
|
-
return
|
|
4810
|
+
return _r;
|
|
4795
4811
|
let [i2, o] = n.split("/");
|
|
4796
4812
|
if (!(!i2 || !o))
|
|
4797
4813
|
return this.getCached(i2, o);
|
|
@@ -4804,7 +4820,7 @@ var _r = class extends $e {
|
|
|
4804
4820
|
if (!i2)
|
|
4805
4821
|
return new w(Promise.reject(new Error("Missing reference")));
|
|
4806
4822
|
if (i2 === "system")
|
|
4807
|
-
return new w(Promise.resolve(
|
|
4823
|
+
return new w(Promise.resolve(_r));
|
|
4808
4824
|
let [o, s] = i2.split("/");
|
|
4809
4825
|
return !o || !s ? new w(Promise.reject(new Error("Invalid reference"))) : this.readResource(o, s, n);
|
|
4810
4826
|
}
|
|
@@ -4939,6 +4955,9 @@ var _r = class extends $e {
|
|
|
4939
4955
|
readResourceGraph(t, n, i2, o) {
|
|
4940
4956
|
return this.get(`${this.fhirUrl(t, n)}/$graph?graph=${i2}`, o);
|
|
4941
4957
|
}
|
|
4958
|
+
pushToAgent(t, n, i2, o) {
|
|
4959
|
+
return this.post(this.fhirUrl("Agent", t.id, "$push"), n, i2, o);
|
|
4960
|
+
}
|
|
4942
4961
|
getActiveLogin() {
|
|
4943
4962
|
return this.storage.getObject("activeLogin");
|
|
4944
4963
|
}
|
|
@@ -4949,7 +4968,7 @@ var _r = class extends $e {
|
|
|
4949
4968
|
return this.accessToken;
|
|
4950
4969
|
}
|
|
4951
4970
|
setAccessToken(t, n) {
|
|
4952
|
-
this.accessToken = t, this.refreshToken = n, this.sessionDetails = void 0, this.medplumServer =
|
|
4971
|
+
this.accessToken = t, this.refreshToken = n, this.sessionDetails = void 0, this.medplumServer = Ur(t);
|
|
4953
4972
|
}
|
|
4954
4973
|
getLogins() {
|
|
4955
4974
|
return this.storage.getObject("logins") ?? [];
|
|
@@ -4995,11 +5014,11 @@ var _r = class extends $e {
|
|
|
4995
5014
|
async download(t, n = {}) {
|
|
4996
5015
|
this.refreshPromise && await this.refreshPromise;
|
|
4997
5016
|
let i2 = t.toString();
|
|
4998
|
-
return i2.startsWith(
|
|
5017
|
+
return i2.startsWith(Lr) && (t = this.fhirUrl(i2)), this.addFetchOptionsDefaults(n), (await this.fetchWithRetry(t.toString(), n)).blob();
|
|
4999
5018
|
}
|
|
5000
5019
|
async uploadMedia(t, n, i2, o, s) {
|
|
5001
5020
|
let a = await this.createBinary(t, i2, n);
|
|
5002
|
-
return this.createResource({ ...o, resourceType: "Media", content: { contentType: n, url:
|
|
5021
|
+
return this.createResource({ ...o, resourceType: "Media", content: { contentType: n, url: Lr + a.id, title: i2 } }, s);
|
|
5003
5022
|
}
|
|
5004
5023
|
async bulkExport(t = "", n, i2, o) {
|
|
5005
5024
|
let s = t && `${t}/`, a = this.fhirUrl(`${s}$export`);
|
|
@@ -5011,7 +5030,7 @@ var _r = class extends $e {
|
|
|
5011
5030
|
i2.Prefer = "respond-async";
|
|
5012
5031
|
let o = await this.fetchWithRetry(t, n);
|
|
5013
5032
|
if (o.status === 202) {
|
|
5014
|
-
let s = await
|
|
5033
|
+
let s = await Fr(o);
|
|
5015
5034
|
if (s)
|
|
5016
5035
|
return this.pollStatus(s);
|
|
5017
5036
|
}
|
|
@@ -5045,7 +5064,7 @@ var _r = class extends $e {
|
|
|
5045
5064
|
return;
|
|
5046
5065
|
let a = t.headers.get("content-type")?.includes("json");
|
|
5047
5066
|
if (t.status === 404 && !a)
|
|
5048
|
-
throw new h(
|
|
5067
|
+
throw new h(jt);
|
|
5049
5068
|
let c2 = t.headers.get("content-location"), f = o.redirect ?? this.options.redirect;
|
|
5050
5069
|
if (t.status === 201 && c2 && f === "follow")
|
|
5051
5070
|
return this.request("GET", c2, { ...o, body: void 0 });
|
|
@@ -5053,8 +5072,8 @@ var _r = class extends $e {
|
|
|
5053
5072
|
if (a)
|
|
5054
5073
|
try {
|
|
5055
5074
|
l2 = await t.json();
|
|
5056
|
-
} catch (
|
|
5057
|
-
throw console.error("Error parsing response", t.status,
|
|
5075
|
+
} catch (B) {
|
|
5076
|
+
throw console.error("Error parsing response", t.status, B), B;
|
|
5058
5077
|
}
|
|
5059
5078
|
else
|
|
5060
5079
|
l2 = await t.text();
|
|
@@ -5093,7 +5112,7 @@ var _r = class extends $e {
|
|
|
5093
5112
|
this.addFetchOptionsDefaults(s);
|
|
5094
5113
|
let a = await this.fetchWithRetry(t, s);
|
|
5095
5114
|
if (a.status !== 202 && (n = false, i2 = a, a.status === 201)) {
|
|
5096
|
-
let c2 = await
|
|
5115
|
+
let c2 = await Fr(a);
|
|
5097
5116
|
c2 && (i2 = await this.fetchWithRetry(c2, s));
|
|
5098
5117
|
}
|
|
5099
5118
|
await ut(o);
|
|
@@ -5133,20 +5152,20 @@ var _r = class extends $e {
|
|
|
5133
5152
|
return this.refresh() ? this.request(t, n, i2) : (this.clearActiveLogin(), this.onUnauthenticated && this.onUnauthenticated(), Promise.reject(new Error("Unauthenticated")));
|
|
5134
5153
|
}
|
|
5135
5154
|
async startPkce() {
|
|
5136
|
-
let t =
|
|
5155
|
+
let t = bt();
|
|
5137
5156
|
sessionStorage.setItem("pkceState", t);
|
|
5138
|
-
let n =
|
|
5157
|
+
let n = bt();
|
|
5139
5158
|
sessionStorage.setItem("codeVerifier", n);
|
|
5140
|
-
let i2 = await
|
|
5159
|
+
let i2 = await Dr(n), o = or(i2).replaceAll("+", "-").replaceAll("/", "_").replaceAll("=", "");
|
|
5141
5160
|
return sessionStorage.setItem("codeChallenge", o), { codeChallengeMethod: "S256", codeChallenge: o };
|
|
5142
5161
|
}
|
|
5143
5162
|
async requestAuthorization(t) {
|
|
5144
5163
|
let n = await this.ensureCodeChallenge(t ?? {}), i2 = new URL(this.authorizeUrl);
|
|
5145
|
-
i2.searchParams.set("response_type", "code"), i2.searchParams.set("state", sessionStorage.getItem("pkceState")), i2.searchParams.set("client_id", n.clientId ?? this.clientId), i2.searchParams.set("redirect_uri", n.redirectUri ??
|
|
5164
|
+
i2.searchParams.set("response_type", "code"), i2.searchParams.set("state", sessionStorage.getItem("pkceState")), i2.searchParams.set("client_id", n.clientId ?? this.clientId), i2.searchParams.set("redirect_uri", n.redirectUri ?? Nr()), i2.searchParams.set("code_challenge_method", n.codeChallengeMethod), i2.searchParams.set("code_challenge", n.codeChallenge), i2.searchParams.set("scope", n.scope ?? "openid profile"), window.location.assign(i2.toString());
|
|
5146
5165
|
}
|
|
5147
5166
|
processCode(t, n) {
|
|
5148
5167
|
let i2 = new URLSearchParams();
|
|
5149
|
-
if (i2.set("grant_type", "authorization_code"), i2.set("code", t), i2.set("client_id", n?.clientId ?? this.clientId), i2.set("redirect_uri", n?.redirectUri ??
|
|
5168
|
+
if (i2.set("grant_type", "authorization_code"), i2.set("code", t), i2.set("client_id", n?.clientId ?? this.clientId), i2.set("redirect_uri", n?.redirectUri ?? Nr()), typeof sessionStorage < "u") {
|
|
5150
5169
|
let o = sessionStorage.getItem("codeVerifier");
|
|
5151
5170
|
o && i2.set("code_verifier", o);
|
|
5152
5171
|
}
|
|
@@ -5177,7 +5196,7 @@ var _r = class extends $e {
|
|
|
5177
5196
|
return n.append("grant_type", "client_credentials"), n.append("client_assertion_type", "urn:ietf:params:oauth:client-assertion-type:jwt-bearer"), n.append("client_assertion", t), this.fetchTokens(n);
|
|
5178
5197
|
}
|
|
5179
5198
|
setBasicAuth(t, n) {
|
|
5180
|
-
this.clientId = t, this.clientSecret = n, this.basicAuth =
|
|
5199
|
+
this.clientId = t, this.clientSecret = n, this.basicAuth = kr(t + ":" + n);
|
|
5181
5200
|
}
|
|
5182
5201
|
async invite(t, n) {
|
|
5183
5202
|
return this.post("admin/projects/" + t + "/invite", n);
|
|
@@ -5200,7 +5219,7 @@ var _r = class extends $e {
|
|
|
5200
5219
|
}
|
|
5201
5220
|
async verifyTokens(t) {
|
|
5202
5221
|
let n = t.access_token;
|
|
5203
|
-
if (
|
|
5222
|
+
if (Vr(n)) {
|
|
5204
5223
|
let i2 = Et(n);
|
|
5205
5224
|
if (Date.now() >= i2.exp * 1e3)
|
|
5206
5225
|
throw this.clearActiveLogin(), new Error("Token expired");
|
|
@@ -5230,16 +5249,16 @@ function ki() {
|
|
|
5230
5249
|
throw new Error("Fetch not available in this environment");
|
|
5231
5250
|
return globalThis.fetch.bind(globalThis);
|
|
5232
5251
|
}
|
|
5233
|
-
function
|
|
5252
|
+
function Nr() {
|
|
5234
5253
|
return typeof window > "u" ? "" : window.location.protocol + "//" + window.location.host + "/";
|
|
5235
5254
|
}
|
|
5236
|
-
function
|
|
5255
|
+
function Br(r4) {
|
|
5237
5256
|
return r4.endsWith("/") ? r4 : r4 + "/";
|
|
5238
5257
|
}
|
|
5239
|
-
function
|
|
5258
|
+
function We(r4, e) {
|
|
5240
5259
|
return new URL(e, r4).toString();
|
|
5241
5260
|
}
|
|
5242
|
-
async function
|
|
5261
|
+
async function Fr(r4) {
|
|
5243
5262
|
let e = r4.headers.get("content-location");
|
|
5244
5263
|
if (e)
|
|
5245
5264
|
return e;
|
|
@@ -5247,18 +5266,18 @@ async function Br(r4) {
|
|
|
5247
5266
|
if (t)
|
|
5248
5267
|
return t;
|
|
5249
5268
|
let n = await r4.json();
|
|
5250
|
-
if (
|
|
5269
|
+
if (xe(n) && n.issue?.[0]?.diagnostics)
|
|
5251
5270
|
return n.issue[0].diagnostics;
|
|
5252
5271
|
}
|
|
5253
|
-
function
|
|
5272
|
+
function qr(r4) {
|
|
5254
5273
|
let e = r4.entry?.map((t) => t.resource) ?? [];
|
|
5255
5274
|
return Object.assign(e, { bundle: r4 });
|
|
5256
5275
|
}
|
|
5257
|
-
var Di = [...
|
|
5258
|
-
var Oi =
|
|
5259
|
-
var Vi = [...
|
|
5260
|
-
var _i =
|
|
5261
|
-
var
|
|
5276
|
+
var Di = [...pe, "->", "<<", ">>"];
|
|
5277
|
+
var Oi = fe().registerInfix("->", { precedence: p.Arrow }).registerInfix(";", { precedence: p.Semicolon });
|
|
5278
|
+
var Vi = [...pe, "eq", "ne", "co"];
|
|
5279
|
+
var _i = fe();
|
|
5280
|
+
var H = class {
|
|
5262
5281
|
constructor(e = "\r", t = "|", n = "^", i2 = "~", o = "\\", s = "&") {
|
|
5263
5282
|
this.segmentSeparator = e;
|
|
5264
5283
|
this.fieldSeparator = t;
|
|
@@ -5274,8 +5293,8 @@ var W = class {
|
|
|
5274
5293
|
return this.componentSeparator + this.repetitionSeparator + this.escapeCharacter + this.subcomponentSeparator;
|
|
5275
5294
|
}
|
|
5276
5295
|
};
|
|
5277
|
-
var
|
|
5278
|
-
constructor(e, t = new
|
|
5296
|
+
var Qr = class r {
|
|
5297
|
+
constructor(e, t = new H()) {
|
|
5279
5298
|
this.context = t, this.segments = e;
|
|
5280
5299
|
}
|
|
5281
5300
|
get header() {
|
|
@@ -5298,7 +5317,7 @@ var $r = class r {
|
|
|
5298
5317
|
}
|
|
5299
5318
|
buildAck() {
|
|
5300
5319
|
let e = /* @__PURE__ */ new Date(), t = this.getSegment("MSH"), n = t?.getField(3)?.toString() ?? "", i2 = t?.getField(4)?.toString() ?? "", o = t?.getField(5)?.toString() ?? "", s = t?.getField(6)?.toString() ?? "", a = t?.getField(10)?.toString() ?? "", c2 = t?.getField(12)?.toString() ?? "2.5.1";
|
|
5301
|
-
return new r([new
|
|
5320
|
+
return new r([new me(["MSH", this.context.getMsh2(), o, s, n, i2, Ni(e), "", this.buildAckMessageType(t), e.getTime().toString(), "P", c2], this.context), new me(["MSA", "AA", a, "OK"], this.context)]);
|
|
5302
5321
|
}
|
|
5303
5322
|
buildAckMessageType(e) {
|
|
5304
5323
|
let t = e?.getField(9), n = t?.getComponent(2), i2 = t?.getComponent(3), o = "ACK";
|
|
@@ -5309,13 +5328,13 @@ var $r = class r {
|
|
|
5309
5328
|
let n = new Error("Invalid HL7 message");
|
|
5310
5329
|
throw n.type = "entity.parse.failed", n;
|
|
5311
5330
|
}
|
|
5312
|
-
let t = new
|
|
5313
|
-
return new r(e.split(/[\r\n]+/).map((n) =>
|
|
5331
|
+
let t = new H("\r", e.charAt(3), e.charAt(4), e.charAt(5), e.charAt(6), e.charAt(7));
|
|
5332
|
+
return new r(e.split(/[\r\n]+/).map((n) => me.parse(n, t)), t);
|
|
5314
5333
|
}
|
|
5315
5334
|
};
|
|
5316
|
-
var
|
|
5317
|
-
constructor(e, t = new
|
|
5318
|
-
this.context = t,
|
|
5335
|
+
var me = class r2 {
|
|
5336
|
+
constructor(e, t = new H()) {
|
|
5337
|
+
this.context = t, rr(e) ? this.fields = e.map((n) => ie.parse(n, t)) : this.fields = e, this.name = this.fields[0].components[0][0];
|
|
5319
5338
|
}
|
|
5320
5339
|
get(e) {
|
|
5321
5340
|
return this.fields[e];
|
|
@@ -5337,12 +5356,12 @@ var he = class r2 {
|
|
|
5337
5356
|
toString() {
|
|
5338
5357
|
return this.fields.map((e) => e.toString()).join(this.context.fieldSeparator);
|
|
5339
5358
|
}
|
|
5340
|
-
static parse(e, t = new
|
|
5359
|
+
static parse(e, t = new H()) {
|
|
5341
5360
|
return new r2(e.split(t.fieldSeparator).map((n) => ie.parse(n, t)), t);
|
|
5342
5361
|
}
|
|
5343
5362
|
};
|
|
5344
5363
|
var ie = class r3 {
|
|
5345
|
-
constructor(e, t = new
|
|
5364
|
+
constructor(e, t = new H()) {
|
|
5346
5365
|
this.context = t, this.components = e;
|
|
5347
5366
|
}
|
|
5348
5367
|
get(e, t, n = 0) {
|
|
@@ -5355,7 +5374,7 @@ var ie = class r3 {
|
|
|
5355
5374
|
toString() {
|
|
5356
5375
|
return this.components.map((e) => e.join(this.context.componentSeparator)).join(this.context.repetitionSeparator);
|
|
5357
5376
|
}
|
|
5358
|
-
static parse(e, t = new
|
|
5377
|
+
static parse(e, t = new H()) {
|
|
5359
5378
|
return new r3(e.split(t.repetitionSeparator).map((n) => n.split(t.componentSeparator)), t);
|
|
5360
5379
|
}
|
|
5361
5380
|
};
|
|
@@ -5399,7 +5418,7 @@ var c = class extends i {
|
|
|
5399
5418
|
e.on("data", (s) => {
|
|
5400
5419
|
try {
|
|
5401
5420
|
if (o += s.toString(), o.endsWith(p2 + v2)) {
|
|
5402
|
-
let r4 =
|
|
5421
|
+
let r4 = Qr.parse(o.substring(1, o.length - 2));
|
|
5403
5422
|
this.dispatchEvent(new d2(this, r4)), o = "";
|
|
5404
5423
|
}
|
|
5405
5424
|
} catch (r4) {
|
|
@@ -5441,7 +5460,7 @@ var E2 = class {
|
|
|
5441
5460
|
}
|
|
5442
5461
|
};
|
|
5443
5462
|
|
|
5444
|
-
// node_modules/ws/wrapper.mjs
|
|
5463
|
+
// ../../node_modules/ws/wrapper.mjs
|
|
5445
5464
|
var import_stream = __toESM(require_stream(), 1);
|
|
5446
5465
|
var import_receiver = __toESM(require_receiver(), 1);
|
|
5447
5466
|
var import_sender = __toESM(require_sender(), 1);
|
|
@@ -5543,7 +5562,7 @@ var AgentHl7ChannelConnection = class {
|
|
|
5543
5562
|
this.trySendToWebSocket();
|
|
5544
5563
|
break;
|
|
5545
5564
|
case "transmit":
|
|
5546
|
-
this.hl7ConnectionQueue.push(
|
|
5565
|
+
this.hl7ConnectionQueue.push(Qr.parse(command.message));
|
|
5547
5566
|
this.trySendToHl7Connection();
|
|
5548
5567
|
break;
|
|
5549
5568
|
}
|
|
@@ -5597,7 +5616,7 @@ if (typeof require !== "undefined" && require.main === module) {
|
|
|
5597
5616
|
process.exit(1);
|
|
5598
5617
|
}
|
|
5599
5618
|
const [_node, _script, baseUrl, clientId, clientSecret, agentId] = process.argv;
|
|
5600
|
-
const medplum = new
|
|
5619
|
+
const medplum = new Mr({ baseUrl, clientId });
|
|
5601
5620
|
medplum.startClientLogin(clientId, clientSecret).then(() => new App(medplum, agentId).start()).catch(console.error);
|
|
5602
5621
|
}
|
|
5603
5622
|
// Annotate the CommonJS export names for ESM import in node:
|