@openhi/constructs 0.0.107 → 0.0.108
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/lib/{chunk-CHPEQRXU.mjs → chunk-6J7NQ6A4.mjs} +2 -2
- package/lib/{chunk-YU2HRNUP.mjs → chunk-AJ3G3THO.mjs} +2 -2
- package/lib/{chunk-L6UAP4KP.mjs → chunk-EST32BJ2.mjs} +3 -3
- package/lib/chunk-GT7SFZLP.mjs +126 -0
- package/lib/chunk-GT7SFZLP.mjs.map +1 -0
- package/lib/{chunk-36UPY7YQ.mjs → chunk-L3QHWDHB.mjs} +5 -5
- package/lib/chunk-LKG3I536.mjs +1383 -0
- package/lib/chunk-LKG3I536.mjs.map +1 -0
- package/lib/{chunk-VYDIGFIX.mjs → chunk-QR5JVSCF.mjs} +11 -1
- package/lib/chunk-QR5JVSCF.mjs.map +1 -0
- package/lib/{chunk-AO3E22CS.mjs → chunk-WWGJZNXJ.mjs} +74 -4
- package/lib/chunk-WWGJZNXJ.mjs.map +1 -0
- package/lib/chunk-ZGOHB4RA.mjs +96 -0
- package/lib/chunk-ZGOHB4RA.mjs.map +1 -0
- package/lib/index.js +1043 -5
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +5 -5
- package/lib/pre-token-generation.handler.js +1356 -10
- package/lib/pre-token-generation.handler.js.map +1 -1
- package/lib/pre-token-generation.handler.mjs +103 -5
- package/lib/pre-token-generation.handler.mjs.map +1 -1
- package/lib/provision-default-workspace.handler.js +1172 -1
- package/lib/provision-default-workspace.handler.js.map +1 -1
- package/lib/provision-default-workspace.handler.mjs +5 -5
- package/lib/rest-api-lambda.handler.js +2769 -2434
- package/lib/rest-api-lambda.handler.js.map +1 -1
- package/lib/rest-api-lambda.handler.mjs +630 -1464
- package/lib/rest-api-lambda.handler.mjs.map +1 -1
- package/lib/seed-demo-data.handler.js +1173 -9
- package/lib/seed-demo-data.handler.js.map +1 -1
- package/lib/seed-demo-data.handler.mjs +5 -5
- package/lib/seed-system-data.handler.js +10 -0
- package/lib/seed-system-data.handler.js.map +1 -1
- package/lib/seed-system-data.handler.mjs +2 -2
- package/package.json +2 -2
- package/lib/chunk-AO3E22CS.mjs.map +0 -1
- package/lib/chunk-JUNL76HF.mjs +0 -428
- package/lib/chunk-JUNL76HF.mjs.map +0 -1
- package/lib/chunk-VYDIGFIX.mjs.map +0 -1
- package/lib/chunk-YZZDUJHI.mjs +0 -37
- package/lib/chunk-YZZDUJHI.mjs.map +0 -1
- /package/lib/{chunk-CHPEQRXU.mjs.map → chunk-6J7NQ6A4.mjs.map} +0 -0
- /package/lib/{chunk-YU2HRNUP.mjs.map → chunk-AJ3G3THO.mjs.map} +0 -0
- /package/lib/{chunk-L6UAP4KP.mjs.map → chunk-EST32BJ2.mjs.map} +0 -0
- /package/lib/{chunk-36UPY7YQ.mjs.map → chunk-L3QHWDHB.mjs.map} +0 -0
|
@@ -23,9 +23,7 @@ __export(pre_token_generation_handler_exports, {
|
|
|
23
23
|
handler: () => handler
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(pre_token_generation_handler_exports);
|
|
26
|
-
|
|
27
|
-
// src/data/operations/control/user/user-create-operation.ts
|
|
28
|
-
var import_types2 = require("@openhi/types");
|
|
26
|
+
var import_types5 = require("@openhi/types");
|
|
29
27
|
|
|
30
28
|
// src/data/dynamo/dynamo-control-service.ts
|
|
31
29
|
var import_electrodb8 = require("electrodb");
|
|
@@ -279,6 +277,16 @@ var MembershipEntity = new import_electrodb2.Entity({
|
|
|
279
277
|
msgId: {
|
|
280
278
|
type: "string",
|
|
281
279
|
required: false
|
|
280
|
+
},
|
|
281
|
+
/**
|
|
282
|
+
* Denormalized `linked-data-identity` Reference (e.g. `Practitioner/abc`).
|
|
283
|
+
* Populated from the FHIR extension on the Membership resource at write
|
|
284
|
+
* time so future GSIs can index data-plane identity lookups without
|
|
285
|
+
* deserializing the full resource JSON. See ADR 2026-03-13-02 §6.
|
|
286
|
+
*/
|
|
287
|
+
linkedDataIdentityRef: {
|
|
288
|
+
type: "string",
|
|
289
|
+
required: false
|
|
282
290
|
}
|
|
283
291
|
},
|
|
284
292
|
indexes: {
|
|
@@ -871,6 +879,217 @@ function getDynamoControlService(tableName) {
|
|
|
871
879
|
};
|
|
872
880
|
}
|
|
873
881
|
|
|
882
|
+
// src/data/operations/data-operations-common.ts
|
|
883
|
+
var import_types2 = require("@openhi/types");
|
|
884
|
+
|
|
885
|
+
// src/lib/compression.ts
|
|
886
|
+
var import_node_zlib = require("zlib");
|
|
887
|
+
var COMPRESSION_ALGOS = {
|
|
888
|
+
NONE: "none",
|
|
889
|
+
GZIP: "gzip",
|
|
890
|
+
BROTLI: "brotli",
|
|
891
|
+
DEFLATE: "deflate"
|
|
892
|
+
};
|
|
893
|
+
function isEnvelope(obj) {
|
|
894
|
+
return typeof obj === "object" && obj !== null && "v" in obj && "algo" in obj && "payload" in obj && typeof obj.payload === "string";
|
|
895
|
+
}
|
|
896
|
+
function decompressResource(compressedOrRaw) {
|
|
897
|
+
try {
|
|
898
|
+
const parsed = JSON.parse(compressedOrRaw);
|
|
899
|
+
if (isEnvelope(parsed)) {
|
|
900
|
+
if (parsed.algo === COMPRESSION_ALGOS.GZIP) {
|
|
901
|
+
const buf = Buffer.from(parsed.payload, "base64");
|
|
902
|
+
return (0, import_node_zlib.gunzipSync)(buf).toString("utf-8");
|
|
903
|
+
}
|
|
904
|
+
if (parsed.algo === COMPRESSION_ALGOS.NONE) {
|
|
905
|
+
return parsed.payload;
|
|
906
|
+
}
|
|
907
|
+
return parsed.payload;
|
|
908
|
+
}
|
|
909
|
+
} catch {
|
|
910
|
+
}
|
|
911
|
+
try {
|
|
912
|
+
const buf = Buffer.from(compressedOrRaw, "base64");
|
|
913
|
+
if (buf.length >= 2 && buf[0] === 31 && buf[1] === 139) {
|
|
914
|
+
return (0, import_node_zlib.gunzipSync)(buf).toString("utf-8");
|
|
915
|
+
}
|
|
916
|
+
} catch {
|
|
917
|
+
}
|
|
918
|
+
return compressedOrRaw;
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
// src/data/operations/data-operations-common.ts
|
|
922
|
+
var DATA_ENTITY_SK = "CURRENT";
|
|
923
|
+
var BATCH_GET_MAX_ATTEMPTS = 3;
|
|
924
|
+
var BATCH_GET_BASE_BACKOFF_MS = 50;
|
|
925
|
+
async function batchGetWithRetry(entity, keys) {
|
|
926
|
+
if (keys.length === 0) return [];
|
|
927
|
+
const collected = [];
|
|
928
|
+
let pending = keys;
|
|
929
|
+
let attempt = 0;
|
|
930
|
+
while (pending.length > 0) {
|
|
931
|
+
if (attempt > 0) {
|
|
932
|
+
await new Promise(
|
|
933
|
+
(resolve) => setTimeout(resolve, BATCH_GET_BASE_BACKOFF_MS * 2 ** (attempt - 1))
|
|
934
|
+
);
|
|
935
|
+
}
|
|
936
|
+
attempt++;
|
|
937
|
+
const result = await entity.get(pending).go();
|
|
938
|
+
collected.push(...result.data);
|
|
939
|
+
const unprocessed = result.unprocessed ?? [];
|
|
940
|
+
if (unprocessed.length === 0) break;
|
|
941
|
+
if (attempt >= BATCH_GET_MAX_ATTEMPTS) {
|
|
942
|
+
throw new Error(
|
|
943
|
+
`BatchGet exhausted retries: ${unprocessed.length} key(s) still unprocessed after ${BATCH_GET_MAX_ATTEMPTS} attempt(s)`
|
|
944
|
+
);
|
|
945
|
+
}
|
|
946
|
+
pending = unprocessed;
|
|
947
|
+
}
|
|
948
|
+
return collected;
|
|
949
|
+
}
|
|
950
|
+
async function dispatchListMode(mode, shardResults, hooks) {
|
|
951
|
+
if (mode === "count") {
|
|
952
|
+
let total = 0;
|
|
953
|
+
for (const shardResult of shardResults) {
|
|
954
|
+
total += (shardResult.data ?? []).length;
|
|
955
|
+
}
|
|
956
|
+
return { entries: [], total };
|
|
957
|
+
}
|
|
958
|
+
if (mode === "summary") {
|
|
959
|
+
const entries2 = [];
|
|
960
|
+
for (const shardResult of shardResults) {
|
|
961
|
+
for (const item of shardResult.data ?? []) {
|
|
962
|
+
if (typeof item.summary !== "string") continue;
|
|
963
|
+
let parsed;
|
|
964
|
+
try {
|
|
965
|
+
parsed = JSON.parse(item.summary);
|
|
966
|
+
} catch {
|
|
967
|
+
continue;
|
|
968
|
+
}
|
|
969
|
+
entries2.push(hooks.buildSummaryEntry(item.id, parsed));
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
return { entries: entries2, total: entries2.length };
|
|
973
|
+
}
|
|
974
|
+
const orderedIds = [];
|
|
975
|
+
for (const shardResult of shardResults) {
|
|
976
|
+
for (const item of shardResult.data ?? []) {
|
|
977
|
+
orderedIds.push(item.id);
|
|
978
|
+
}
|
|
979
|
+
}
|
|
980
|
+
if (orderedIds.length === 0) return { entries: [], total: 0 };
|
|
981
|
+
const items = await hooks.hydrate(orderedIds);
|
|
982
|
+
const byId = new Map(items.map((item) => [hooks.getId(item), item]));
|
|
983
|
+
const entries = [];
|
|
984
|
+
for (const id of orderedIds) {
|
|
985
|
+
const item = byId.get(id);
|
|
986
|
+
if (!item) continue;
|
|
987
|
+
entries.push(hooks.buildEntry(id, item));
|
|
988
|
+
}
|
|
989
|
+
return { entries, total: entries.length };
|
|
990
|
+
}
|
|
991
|
+
async function listDataEntitiesByWorkspace(entity, tenantId, workspaceId, mode = "full") {
|
|
992
|
+
const shardResults = await Promise.all(
|
|
993
|
+
Array.from(
|
|
994
|
+
{ length: SHARD_COUNT },
|
|
995
|
+
(_, shard) => entity.query.gsi1({ tenantId, workspaceId, gsi1Shard: String(shard) }).go()
|
|
996
|
+
)
|
|
997
|
+
);
|
|
998
|
+
return dispatchListMode(
|
|
999
|
+
mode,
|
|
1000
|
+
shardResults,
|
|
1001
|
+
{
|
|
1002
|
+
hydrate: (orderedIds) => batchGetWithRetry(
|
|
1003
|
+
entity,
|
|
1004
|
+
orderedIds.map((id) => ({
|
|
1005
|
+
tenantId,
|
|
1006
|
+
workspaceId,
|
|
1007
|
+
id,
|
|
1008
|
+
sk: DATA_ENTITY_SK
|
|
1009
|
+
}))
|
|
1010
|
+
),
|
|
1011
|
+
getId: (item) => item.id,
|
|
1012
|
+
buildEntry: (id, item) => {
|
|
1013
|
+
const parsed = JSON.parse(decompressResource(item.resource));
|
|
1014
|
+
return { id, resource: { ...parsed, id } };
|
|
1015
|
+
},
|
|
1016
|
+
buildSummaryEntry: (id, parsed) => ({
|
|
1017
|
+
id,
|
|
1018
|
+
resource: { ...parsed, id }
|
|
1019
|
+
})
|
|
1020
|
+
}
|
|
1021
|
+
);
|
|
1022
|
+
}
|
|
1023
|
+
|
|
1024
|
+
// src/data/operations/control/membership/membership-list-operation.ts
|
|
1025
|
+
var SK = "CURRENT";
|
|
1026
|
+
async function listMembershipsOperation(params) {
|
|
1027
|
+
const { context, tableName, mode = "full" } = params;
|
|
1028
|
+
const tenantId = context.tenantId;
|
|
1029
|
+
const service = getDynamoControlService(tableName);
|
|
1030
|
+
const shardResults = await Promise.all(
|
|
1031
|
+
Array.from(
|
|
1032
|
+
{ length: SHARD_COUNT },
|
|
1033
|
+
(_, shard) => service.entities.membership.query.gsi1({ tenantId, gsi1Shard: String(shard) }).go()
|
|
1034
|
+
)
|
|
1035
|
+
);
|
|
1036
|
+
return dispatchListMode(mode, shardResults, {
|
|
1037
|
+
hydrate: (orderedIds) => batchGetWithRetry(
|
|
1038
|
+
service.entities.membership,
|
|
1039
|
+
orderedIds.map((id) => ({ tenantId, id, sk: SK }))
|
|
1040
|
+
),
|
|
1041
|
+
getId: (item) => item.id,
|
|
1042
|
+
buildEntry: (id, item) => ({
|
|
1043
|
+
id,
|
|
1044
|
+
resource: {
|
|
1045
|
+
resourceType: "Membership",
|
|
1046
|
+
id,
|
|
1047
|
+
...JSON.parse(item.resource)
|
|
1048
|
+
}
|
|
1049
|
+
}),
|
|
1050
|
+
buildSummaryEntry: (id, parsed) => ({
|
|
1051
|
+
id,
|
|
1052
|
+
resource: { resourceType: "Membership", id, ...parsed }
|
|
1053
|
+
})
|
|
1054
|
+
});
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
// src/data/operations/control/roleassignment/roleassignment-list-operation.ts
|
|
1058
|
+
var SK2 = "CURRENT";
|
|
1059
|
+
async function listRoleAssignmentsOperation(params) {
|
|
1060
|
+
const { context, tableName, mode = "full" } = params;
|
|
1061
|
+
const tenantId = context.tenantId;
|
|
1062
|
+
const service = getDynamoControlService(tableName);
|
|
1063
|
+
const shardResults = await Promise.all(
|
|
1064
|
+
Array.from(
|
|
1065
|
+
{ length: SHARD_COUNT },
|
|
1066
|
+
(_, shard) => service.entities.roleAssignment.query.gsi1({ tenantId, gsi1Shard: String(shard) }).go()
|
|
1067
|
+
)
|
|
1068
|
+
);
|
|
1069
|
+
return dispatchListMode(mode, shardResults, {
|
|
1070
|
+
hydrate: (orderedIds) => batchGetWithRetry(
|
|
1071
|
+
service.entities.roleAssignment,
|
|
1072
|
+
orderedIds.map((id) => ({ tenantId, id, sk: SK2 }))
|
|
1073
|
+
),
|
|
1074
|
+
getId: (item) => item.id,
|
|
1075
|
+
buildEntry: (id, item) => ({
|
|
1076
|
+
id,
|
|
1077
|
+
resource: {
|
|
1078
|
+
resourceType: "RoleAssignment",
|
|
1079
|
+
id,
|
|
1080
|
+
...JSON.parse(item.resource)
|
|
1081
|
+
}
|
|
1082
|
+
}),
|
|
1083
|
+
buildSummaryEntry: (id, parsed) => ({
|
|
1084
|
+
id,
|
|
1085
|
+
resource: { resourceType: "RoleAssignment", id, ...parsed }
|
|
1086
|
+
})
|
|
1087
|
+
});
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1090
|
+
// src/data/operations/control/user/user-create-operation.ts
|
|
1091
|
+
var import_types3 = require("@openhi/types");
|
|
1092
|
+
|
|
874
1093
|
// src/data/operations/control/user/user-find-by-sub-operation.ts
|
|
875
1094
|
async function findUserBySubOperation(params) {
|
|
876
1095
|
const { cognitoSub, tableName } = params;
|
|
@@ -888,12 +1107,6 @@ async function findUserBySubOperation(params) {
|
|
|
888
1107
|
};
|
|
889
1108
|
}
|
|
890
1109
|
|
|
891
|
-
// src/data/operations/data-operations-common.ts
|
|
892
|
-
var import_types3 = require("@openhi/types");
|
|
893
|
-
|
|
894
|
-
// src/lib/compression.ts
|
|
895
|
-
var import_node_zlib = require("zlib");
|
|
896
|
-
|
|
897
1110
|
// src/data/operations/control/user/user-update-operation.ts
|
|
898
1111
|
var import_types4 = require("@openhi/types");
|
|
899
1112
|
|
|
@@ -906,6 +1119,1051 @@ function parseUserResource(resource) {
|
|
|
906
1119
|
}
|
|
907
1120
|
}
|
|
908
1121
|
|
|
1122
|
+
// src/data/dynamo/dynamo-data-service.ts
|
|
1123
|
+
var import_electrodb10 = require("electrodb");
|
|
1124
|
+
|
|
1125
|
+
// src/data/dynamo/entities/data-entity-common.ts
|
|
1126
|
+
var import_electrodb9 = require("electrodb");
|
|
1127
|
+
var dataEntityAttributes = {
|
|
1128
|
+
/** Sort key. "CURRENT" for current version; version history in S3. */
|
|
1129
|
+
sk: {
|
|
1130
|
+
type: "string",
|
|
1131
|
+
required: true,
|
|
1132
|
+
default: "CURRENT"
|
|
1133
|
+
},
|
|
1134
|
+
tenantId: {
|
|
1135
|
+
type: "string",
|
|
1136
|
+
required: true
|
|
1137
|
+
},
|
|
1138
|
+
workspaceId: {
|
|
1139
|
+
type: "string",
|
|
1140
|
+
required: true
|
|
1141
|
+
},
|
|
1142
|
+
/** FHIR Resource.id; logical id in URL and PK. */
|
|
1143
|
+
id: {
|
|
1144
|
+
type: "string",
|
|
1145
|
+
required: true
|
|
1146
|
+
},
|
|
1147
|
+
/** FHIR resource as JSON string. JSON.stringify(resource) on write; JSON.parse(item.resource) on read. */
|
|
1148
|
+
resource: {
|
|
1149
|
+
type: "string",
|
|
1150
|
+
required: true
|
|
1151
|
+
},
|
|
1152
|
+
/**
|
|
1153
|
+
* Summary projection of the FHIR resource as a JSON string (uncompressed). Populated on every
|
|
1154
|
+
* write via `extractSummary(resource)` so GSI projections can surface list/lookup data without
|
|
1155
|
+
* reading the compressed `resource` blob. Kept uncompressed because the summary is small and
|
|
1156
|
+
* must be fast to retrieve without encode/decode overhead.
|
|
1157
|
+
*
|
|
1158
|
+
* @see sites/www-docs/content/architecture/adr/2026-04-17-02-fhir-summary-projection-for-gsi-access-patterns.md
|
|
1159
|
+
*/
|
|
1160
|
+
summary: {
|
|
1161
|
+
type: "string",
|
|
1162
|
+
required: true
|
|
1163
|
+
},
|
|
1164
|
+
/** Version id (e.g. ULID). Tracks current version; S3 history key. */
|
|
1165
|
+
vid: {
|
|
1166
|
+
type: "string",
|
|
1167
|
+
required: true
|
|
1168
|
+
},
|
|
1169
|
+
lastUpdated: {
|
|
1170
|
+
type: "string",
|
|
1171
|
+
required: true
|
|
1172
|
+
},
|
|
1173
|
+
/**
|
|
1174
|
+
* Shard index segment for the GSI1 partition key. Computed deterministically from `id`
|
|
1175
|
+
* via `computeShard` so updates always land on the same shard. Stored as a string because
|
|
1176
|
+
* it appears as a literal segment in the GSI1 PK template; the underlying value is 0..3.
|
|
1177
|
+
* Not `required` because the value is derived via `watch`/`set`; ElectroDB's required-field
|
|
1178
|
+
* check runs before watch propagation, so callers must not fail validation on a derived field.
|
|
1179
|
+
*
|
|
1180
|
+
* @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md — GSI1 (sharded)
|
|
1181
|
+
*/
|
|
1182
|
+
gsi1Shard: {
|
|
1183
|
+
type: "string",
|
|
1184
|
+
watch: ["id"],
|
|
1185
|
+
set: (_val, item) => {
|
|
1186
|
+
if (typeof item?.id !== "string" || item.id.length === 0) {
|
|
1187
|
+
return void 0;
|
|
1188
|
+
}
|
|
1189
|
+
return String(computeShard(item.id));
|
|
1190
|
+
}
|
|
1191
|
+
},
|
|
1192
|
+
/**
|
|
1193
|
+
* GSI1 sort key. Written as the index's SK verbatim so list endpoints can
|
|
1194
|
+
* use `BEGINS_WITH` for prefix queries (e.g. `?name=Sm` against Patient).
|
|
1195
|
+
* Computed at write time via `extractSortKey(resource)` per DR-004:
|
|
1196
|
+
* - Labeled types (LABEL_PATHS): `<normalizedLabel>#<id>`
|
|
1197
|
+
* - Unlabeled types: `<ISO-8601 lastUpdated>#<id>`
|
|
1198
|
+
* The factory deliberately does not derive this from `lastUpdated`/`id`
|
|
1199
|
+
* — that would lock every type into the unlabeled fallback and defeat
|
|
1200
|
+
* label-based BEGINS_WITH on labeled types.
|
|
1201
|
+
*
|
|
1202
|
+
* @see openhi-planning DR-004
|
|
1203
|
+
*/
|
|
1204
|
+
gsi1sk: {
|
|
1205
|
+
type: "string",
|
|
1206
|
+
required: true
|
|
1207
|
+
},
|
|
1208
|
+
deleted: {
|
|
1209
|
+
type: "boolean",
|
|
1210
|
+
required: false
|
|
1211
|
+
},
|
|
1212
|
+
bundleId: {
|
|
1213
|
+
type: "string",
|
|
1214
|
+
required: false
|
|
1215
|
+
},
|
|
1216
|
+
msgId: {
|
|
1217
|
+
type: "string",
|
|
1218
|
+
required: false
|
|
1219
|
+
}
|
|
1220
|
+
};
|
|
1221
|
+
function createDataEntity(entity, resourceTypeLabel) {
|
|
1222
|
+
return new import_electrodb9.Entity({
|
|
1223
|
+
model: {
|
|
1224
|
+
entity,
|
|
1225
|
+
service: "data",
|
|
1226
|
+
version: "01"
|
|
1227
|
+
},
|
|
1228
|
+
attributes: dataEntityAttributes,
|
|
1229
|
+
indexes: {
|
|
1230
|
+
/** Base table: PK, SK (data store key names). PK is built from tenantId, workspaceId, id. */
|
|
1231
|
+
record: {
|
|
1232
|
+
pk: {
|
|
1233
|
+
field: "PK",
|
|
1234
|
+
composite: ["tenantId", "workspaceId", "id"],
|
|
1235
|
+
template: `TID#\${tenantId}#WID#\${workspaceId}#RT#${resourceTypeLabel}#ID#\${id}`
|
|
1236
|
+
},
|
|
1237
|
+
sk: {
|
|
1238
|
+
field: "SK",
|
|
1239
|
+
composite: ["sk"]
|
|
1240
|
+
}
|
|
1241
|
+
},
|
|
1242
|
+
/**
|
|
1243
|
+
* GSI1 — Unified Sharded List: list all resources of this type in a workspace; reads fan
|
|
1244
|
+
* out across the four shards and merge by SK. SK is the writer-supplied `gsi1sk` verbatim
|
|
1245
|
+
* (per DR-004) so labeled types serve `BEGINS_WITH` prefix queries on the natural label.
|
|
1246
|
+
* `casing: "none"` is required on the SK because the writer (`extractSortKey`) already
|
|
1247
|
+
* applies DR-004 normalization — ElectroDB's default lowercasing would mangle the
|
|
1248
|
+
* ISO-8601 unlabeled fallback (`T`/`Z` → `t`/`z`).
|
|
1249
|
+
*/
|
|
1250
|
+
gsi1: {
|
|
1251
|
+
index: "GSI1",
|
|
1252
|
+
pk: {
|
|
1253
|
+
field: "GSI1PK",
|
|
1254
|
+
composite: ["tenantId", "workspaceId", "gsi1Shard"],
|
|
1255
|
+
template: `TID#\${tenantId}#WID#\${workspaceId}#RT#${resourceTypeLabel}#SHARD#\${gsi1Shard}`
|
|
1256
|
+
},
|
|
1257
|
+
sk: {
|
|
1258
|
+
field: "GSI1SK",
|
|
1259
|
+
casing: "none",
|
|
1260
|
+
composite: ["gsi1sk"],
|
|
1261
|
+
template: `\${gsi1sk}`
|
|
1262
|
+
}
|
|
1263
|
+
}
|
|
1264
|
+
}
|
|
1265
|
+
});
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
// src/data/dynamo/entities/data/account-entity.ts
|
|
1269
|
+
var AccountEntity = createDataEntity("account", "Account");
|
|
1270
|
+
|
|
1271
|
+
// src/data/dynamo/entities/data/activity-definition-entity.ts
|
|
1272
|
+
var ActivityDefinitionEntity = createDataEntity(
|
|
1273
|
+
"activitydefinition",
|
|
1274
|
+
"ActivityDefinition"
|
|
1275
|
+
);
|
|
1276
|
+
|
|
1277
|
+
// src/data/dynamo/entities/data/adverse-event-entity.ts
|
|
1278
|
+
var AdverseEventEntity = createDataEntity(
|
|
1279
|
+
"adverseevent",
|
|
1280
|
+
"AdverseEvent"
|
|
1281
|
+
);
|
|
1282
|
+
|
|
1283
|
+
// src/data/dynamo/entities/data/allergy-intolerance-entity.ts
|
|
1284
|
+
var AllergyIntoleranceEntity = createDataEntity(
|
|
1285
|
+
"allergyintolerance",
|
|
1286
|
+
"AllergyIntolerance"
|
|
1287
|
+
);
|
|
1288
|
+
|
|
1289
|
+
// src/data/dynamo/entities/data/appointment-entity.ts
|
|
1290
|
+
var AppointmentEntity = createDataEntity("appointment", "Appointment");
|
|
1291
|
+
|
|
1292
|
+
// src/data/dynamo/entities/data/appointment-response-entity.ts
|
|
1293
|
+
var AppointmentResponseEntity = createDataEntity(
|
|
1294
|
+
"appointmentresponse",
|
|
1295
|
+
"AppointmentResponse"
|
|
1296
|
+
);
|
|
1297
|
+
|
|
1298
|
+
// src/data/dynamo/entities/data/audit-event-entity.ts
|
|
1299
|
+
var AuditEventEntity = createDataEntity("auditevent", "AuditEvent");
|
|
1300
|
+
|
|
1301
|
+
// src/data/dynamo/entities/data/basic-entity.ts
|
|
1302
|
+
var BasicEntity = createDataEntity("basic", "Basic");
|
|
1303
|
+
|
|
1304
|
+
// src/data/dynamo/entities/data/biologically-derived-product-entity.ts
|
|
1305
|
+
var BiologicallyDerivedProductEntity = createDataEntity(
|
|
1306
|
+
"biologicallyderivedproduct",
|
|
1307
|
+
"BiologicallyDerivedProduct"
|
|
1308
|
+
);
|
|
1309
|
+
|
|
1310
|
+
// src/data/dynamo/entities/data/body-structure-entity.ts
|
|
1311
|
+
var BodyStructureEntity = createDataEntity(
|
|
1312
|
+
"bodystructure",
|
|
1313
|
+
"BodyStructure"
|
|
1314
|
+
);
|
|
1315
|
+
|
|
1316
|
+
// src/data/dynamo/entities/data/capability-statement-entity.ts
|
|
1317
|
+
var CapabilityStatementEntity = createDataEntity(
|
|
1318
|
+
"capabilitystatement",
|
|
1319
|
+
"CapabilityStatement"
|
|
1320
|
+
);
|
|
1321
|
+
|
|
1322
|
+
// src/data/dynamo/entities/data/care-plan-entity.ts
|
|
1323
|
+
var CarePlanEntity = createDataEntity("careplan", "CarePlan");
|
|
1324
|
+
|
|
1325
|
+
// src/data/dynamo/entities/data/care-team-entity.ts
|
|
1326
|
+
var CareTeamEntity = createDataEntity("careteam", "CareTeam");
|
|
1327
|
+
|
|
1328
|
+
// src/data/dynamo/entities/data/catalog-entry-entity.ts
|
|
1329
|
+
var CatalogEntryEntity = createDataEntity(
|
|
1330
|
+
"catalogentry",
|
|
1331
|
+
"CatalogEntry"
|
|
1332
|
+
);
|
|
1333
|
+
|
|
1334
|
+
// src/data/dynamo/entities/data/charge-item-definition-entity.ts
|
|
1335
|
+
var ChargeItemDefinitionEntity = createDataEntity(
|
|
1336
|
+
"chargeitemdefinition",
|
|
1337
|
+
"ChargeItemDefinition"
|
|
1338
|
+
);
|
|
1339
|
+
|
|
1340
|
+
// src/data/dynamo/entities/data/charge-item-entity.ts
|
|
1341
|
+
var ChargeItemEntity = createDataEntity("chargeitem", "ChargeItem");
|
|
1342
|
+
|
|
1343
|
+
// src/data/dynamo/entities/data/claim-entity.ts
|
|
1344
|
+
var ClaimEntity = createDataEntity("claim", "Claim");
|
|
1345
|
+
|
|
1346
|
+
// src/data/dynamo/entities/data/claim-response-entity.ts
|
|
1347
|
+
var ClaimResponseEntity = createDataEntity(
|
|
1348
|
+
"claimresponse",
|
|
1349
|
+
"ClaimResponse"
|
|
1350
|
+
);
|
|
1351
|
+
|
|
1352
|
+
// src/data/dynamo/entities/data/clinical-impression-entity.ts
|
|
1353
|
+
var ClinicalImpressionEntity = createDataEntity(
|
|
1354
|
+
"clinicalimpression",
|
|
1355
|
+
"ClinicalImpression"
|
|
1356
|
+
);
|
|
1357
|
+
|
|
1358
|
+
// src/data/dynamo/entities/data/code-system-entity.ts
|
|
1359
|
+
var CodeSystemEntity = createDataEntity("codesystem", "CodeSystem");
|
|
1360
|
+
|
|
1361
|
+
// src/data/dynamo/entities/data/communication-entity.ts
|
|
1362
|
+
var CommunicationEntity = createDataEntity(
|
|
1363
|
+
"communication",
|
|
1364
|
+
"Communication"
|
|
1365
|
+
);
|
|
1366
|
+
|
|
1367
|
+
// src/data/dynamo/entities/data/communication-request-entity.ts
|
|
1368
|
+
var CommunicationRequestEntity = createDataEntity(
|
|
1369
|
+
"communicationrequest",
|
|
1370
|
+
"CommunicationRequest"
|
|
1371
|
+
);
|
|
1372
|
+
|
|
1373
|
+
// src/data/dynamo/entities/data/compartment-definition-entity.ts
|
|
1374
|
+
var CompartmentDefinitionEntity = createDataEntity(
|
|
1375
|
+
"compartmentdefinition",
|
|
1376
|
+
"CompartmentDefinition"
|
|
1377
|
+
);
|
|
1378
|
+
|
|
1379
|
+
// src/data/dynamo/entities/data/composition-entity.ts
|
|
1380
|
+
var CompositionEntity = createDataEntity("composition", "Composition");
|
|
1381
|
+
|
|
1382
|
+
// src/data/dynamo/entities/data/concept-map-entity.ts
|
|
1383
|
+
var ConceptMapEntity = createDataEntity("conceptmap", "ConceptMap");
|
|
1384
|
+
|
|
1385
|
+
// src/data/dynamo/entities/data/condition-entity.ts
|
|
1386
|
+
var ConditionEntity = createDataEntity("condition", "Condition");
|
|
1387
|
+
|
|
1388
|
+
// src/data/dynamo/entities/data/consent-entity.ts
|
|
1389
|
+
var ConsentEntity = createDataEntity("consent", "Consent");
|
|
1390
|
+
|
|
1391
|
+
// src/data/dynamo/entities/data/contract-entity.ts
|
|
1392
|
+
var ContractEntity = createDataEntity("contract", "Contract");
|
|
1393
|
+
|
|
1394
|
+
// src/data/dynamo/entities/data/coverage-eligibility-request-entity.ts
|
|
1395
|
+
var CoverageEligibilityRequestEntity = createDataEntity(
|
|
1396
|
+
"coverageeligibilityrequest",
|
|
1397
|
+
"CoverageEligibilityRequest"
|
|
1398
|
+
);
|
|
1399
|
+
|
|
1400
|
+
// src/data/dynamo/entities/data/coverage-eligibility-response-entity.ts
|
|
1401
|
+
var CoverageEligibilityResponseEntity = createDataEntity(
|
|
1402
|
+
"coverageeligibilityresponse",
|
|
1403
|
+
"CoverageEligibilityResponse"
|
|
1404
|
+
);
|
|
1405
|
+
|
|
1406
|
+
// src/data/dynamo/entities/data/coverage-entity.ts
|
|
1407
|
+
var CoverageEntity = createDataEntity("coverage", "Coverage");
|
|
1408
|
+
|
|
1409
|
+
// src/data/dynamo/entities/data/detected-issue-entity.ts
|
|
1410
|
+
var DetectedIssueEntity = createDataEntity(
|
|
1411
|
+
"detectedissue",
|
|
1412
|
+
"DetectedIssue"
|
|
1413
|
+
);
|
|
1414
|
+
|
|
1415
|
+
// src/data/dynamo/entities/data/device-definition-entity.ts
|
|
1416
|
+
var DeviceDefinitionEntity = createDataEntity(
|
|
1417
|
+
"devicedefinition",
|
|
1418
|
+
"DeviceDefinition"
|
|
1419
|
+
);
|
|
1420
|
+
|
|
1421
|
+
// src/data/dynamo/entities/data/device-entity.ts
|
|
1422
|
+
var DeviceEntity = createDataEntity("device", "Device");
|
|
1423
|
+
|
|
1424
|
+
// src/data/dynamo/entities/data/device-metric-entity.ts
|
|
1425
|
+
var DeviceMetricEntity = createDataEntity(
|
|
1426
|
+
"devicemetric",
|
|
1427
|
+
"DeviceMetric"
|
|
1428
|
+
);
|
|
1429
|
+
|
|
1430
|
+
// src/data/dynamo/entities/data/device-request-entity.ts
|
|
1431
|
+
var DeviceRequestEntity = createDataEntity(
|
|
1432
|
+
"devicerequest",
|
|
1433
|
+
"DeviceRequest"
|
|
1434
|
+
);
|
|
1435
|
+
|
|
1436
|
+
// src/data/dynamo/entities/data/device-use-statement-entity.ts
|
|
1437
|
+
var DeviceUseStatementEntity = createDataEntity(
|
|
1438
|
+
"deviceusestatement",
|
|
1439
|
+
"DeviceUseStatement"
|
|
1440
|
+
);
|
|
1441
|
+
|
|
1442
|
+
// src/data/dynamo/entities/data/diagnostic-report-entity.ts
|
|
1443
|
+
var DiagnosticReportEntity = createDataEntity(
|
|
1444
|
+
"diagnosticreport",
|
|
1445
|
+
"DiagnosticReport"
|
|
1446
|
+
);
|
|
1447
|
+
|
|
1448
|
+
// src/data/dynamo/entities/data/document-manifest-entity.ts
|
|
1449
|
+
var DocumentManifestEntity = createDataEntity(
|
|
1450
|
+
"documentmanifest",
|
|
1451
|
+
"DocumentManifest"
|
|
1452
|
+
);
|
|
1453
|
+
|
|
1454
|
+
// src/data/dynamo/entities/data/document-reference-entity.ts
|
|
1455
|
+
var DocumentReferenceEntity = createDataEntity(
|
|
1456
|
+
"documentreference",
|
|
1457
|
+
"DocumentReference"
|
|
1458
|
+
);
|
|
1459
|
+
|
|
1460
|
+
// src/data/dynamo/entities/data/effect-evidence-synthesis-entity.ts
|
|
1461
|
+
var EffectEvidenceSynthesisEntity = createDataEntity(
|
|
1462
|
+
"effectevidencesynthesis",
|
|
1463
|
+
"EffectEvidenceSynthesis"
|
|
1464
|
+
);
|
|
1465
|
+
|
|
1466
|
+
// src/data/dynamo/entities/data/encounter-entity.ts
|
|
1467
|
+
var EncounterEntity = createDataEntity("encounter", "Encounter");
|
|
1468
|
+
|
|
1469
|
+
// src/data/dynamo/entities/data/endpoint-entity.ts
|
|
1470
|
+
var EndpointEntity = createDataEntity("endpoint", "Endpoint");
|
|
1471
|
+
|
|
1472
|
+
// src/data/dynamo/entities/data/enrollment-request-entity.ts
|
|
1473
|
+
var EnrollmentRequestEntity = createDataEntity(
|
|
1474
|
+
"enrollmentrequest",
|
|
1475
|
+
"EnrollmentRequest"
|
|
1476
|
+
);
|
|
1477
|
+
|
|
1478
|
+
// src/data/dynamo/entities/data/enrollment-response-entity.ts
|
|
1479
|
+
var EnrollmentResponseEntity = createDataEntity(
|
|
1480
|
+
"enrollmentresponse",
|
|
1481
|
+
"EnrollmentResponse"
|
|
1482
|
+
);
|
|
1483
|
+
|
|
1484
|
+
// src/data/dynamo/entities/data/episode-of-care-entity.ts
|
|
1485
|
+
var EpisodeOfCareEntity = createDataEntity(
|
|
1486
|
+
"episodeofcare",
|
|
1487
|
+
"EpisodeOfCare"
|
|
1488
|
+
);
|
|
1489
|
+
|
|
1490
|
+
// src/data/dynamo/entities/data/event-definition-entity.ts
|
|
1491
|
+
var EventDefinitionEntity = createDataEntity(
|
|
1492
|
+
"eventdefinition",
|
|
1493
|
+
"EventDefinition"
|
|
1494
|
+
);
|
|
1495
|
+
|
|
1496
|
+
// src/data/dynamo/entities/data/evidence-entity.ts
|
|
1497
|
+
var EvidenceEntity = createDataEntity("evidence", "Evidence");
|
|
1498
|
+
|
|
1499
|
+
// src/data/dynamo/entities/data/evidence-variable-entity.ts
|
|
1500
|
+
var EvidenceVariableEntity = createDataEntity(
|
|
1501
|
+
"evidencevariable",
|
|
1502
|
+
"EvidenceVariable"
|
|
1503
|
+
);
|
|
1504
|
+
|
|
1505
|
+
// src/data/dynamo/entities/data/example-scenario-entity.ts
|
|
1506
|
+
var ExampleScenarioEntity = createDataEntity(
|
|
1507
|
+
"examplescenario",
|
|
1508
|
+
"ExampleScenario"
|
|
1509
|
+
);
|
|
1510
|
+
|
|
1511
|
+
// src/data/dynamo/entities/data/explanation-of-benefit-entity.ts
|
|
1512
|
+
var ExplanationOfBenefitEntity = createDataEntity(
|
|
1513
|
+
"explanationofbenefit",
|
|
1514
|
+
"ExplanationOfBenefit"
|
|
1515
|
+
);
|
|
1516
|
+
|
|
1517
|
+
// src/data/dynamo/entities/data/family-member-history-entity.ts
|
|
1518
|
+
var FamilyMemberHistoryEntity = createDataEntity(
|
|
1519
|
+
"familymemberhistory",
|
|
1520
|
+
"FamilyMemberHistory"
|
|
1521
|
+
);
|
|
1522
|
+
|
|
1523
|
+
// src/data/dynamo/entities/data/flag-entity.ts
|
|
1524
|
+
var FlagEntity = createDataEntity("flag", "Flag");
|
|
1525
|
+
|
|
1526
|
+
// src/data/dynamo/entities/data/goal-entity.ts
|
|
1527
|
+
var GoalEntity = createDataEntity("goal", "Goal");
|
|
1528
|
+
|
|
1529
|
+
// src/data/dynamo/entities/data/graph-definition-entity.ts
|
|
1530
|
+
var GraphDefinitionEntity = createDataEntity(
|
|
1531
|
+
"graphdefinition",
|
|
1532
|
+
"GraphDefinition"
|
|
1533
|
+
);
|
|
1534
|
+
|
|
1535
|
+
// src/data/dynamo/entities/data/group-entity.ts
|
|
1536
|
+
var GroupEntity = createDataEntity("group", "Group");
|
|
1537
|
+
|
|
1538
|
+
// src/data/dynamo/entities/data/guidance-response-entity.ts
|
|
1539
|
+
var GuidanceResponseEntity = createDataEntity(
|
|
1540
|
+
"guidanceresponse",
|
|
1541
|
+
"GuidanceResponse"
|
|
1542
|
+
);
|
|
1543
|
+
|
|
1544
|
+
// src/data/dynamo/entities/data/healthcare-service-entity.ts
|
|
1545
|
+
var HealthcareServiceEntity = createDataEntity(
|
|
1546
|
+
"healthcareservice",
|
|
1547
|
+
"HealthcareService"
|
|
1548
|
+
);
|
|
1549
|
+
|
|
1550
|
+
// src/data/dynamo/entities/data/imaging-study-entity.ts
|
|
1551
|
+
var ImagingStudyEntity = createDataEntity(
|
|
1552
|
+
"imagingstudy",
|
|
1553
|
+
"ImagingStudy"
|
|
1554
|
+
);
|
|
1555
|
+
|
|
1556
|
+
// src/data/dynamo/entities/data/immunization-entity.ts
|
|
1557
|
+
var ImmunizationEntity = createDataEntity(
|
|
1558
|
+
"immunization",
|
|
1559
|
+
"Immunization"
|
|
1560
|
+
);
|
|
1561
|
+
|
|
1562
|
+
// src/data/dynamo/entities/data/immunization-evaluation-entity.ts
|
|
1563
|
+
var ImmunizationEvaluationEntity = createDataEntity(
|
|
1564
|
+
"immunizationevaluation",
|
|
1565
|
+
"ImmunizationEvaluation"
|
|
1566
|
+
);
|
|
1567
|
+
|
|
1568
|
+
// src/data/dynamo/entities/data/immunization-recommendation-entity.ts
|
|
1569
|
+
var ImmunizationRecommendationEntity = createDataEntity(
|
|
1570
|
+
"immunizationrecommendation",
|
|
1571
|
+
"ImmunizationRecommendation"
|
|
1572
|
+
);
|
|
1573
|
+
|
|
1574
|
+
// src/data/dynamo/entities/data/implementation-guide-entity.ts
|
|
1575
|
+
var ImplementationGuideEntity = createDataEntity(
|
|
1576
|
+
"implementationguide",
|
|
1577
|
+
"ImplementationGuide"
|
|
1578
|
+
);
|
|
1579
|
+
|
|
1580
|
+
// src/data/dynamo/entities/data/insurance-plan-entity.ts
|
|
1581
|
+
var InsurancePlanEntity = createDataEntity(
|
|
1582
|
+
"insuranceplan",
|
|
1583
|
+
"InsurancePlan"
|
|
1584
|
+
);
|
|
1585
|
+
|
|
1586
|
+
// src/data/dynamo/entities/data/invoice-entity.ts
|
|
1587
|
+
var InvoiceEntity = createDataEntity("invoice", "Invoice");
|
|
1588
|
+
|
|
1589
|
+
// src/data/dynamo/entities/data/library-entity.ts
|
|
1590
|
+
var LibraryEntity = createDataEntity("library", "Library");
|
|
1591
|
+
|
|
1592
|
+
// src/data/dynamo/entities/data/linkage-entity.ts
|
|
1593
|
+
var LinkageEntity = createDataEntity("linkage", "Linkage");
|
|
1594
|
+
|
|
1595
|
+
// src/data/dynamo/entities/data/list-entity.ts
|
|
1596
|
+
var ListEntity = createDataEntity("list", "List");
|
|
1597
|
+
|
|
1598
|
+
// src/data/dynamo/entities/data/location-entity.ts
|
|
1599
|
+
var LocationEntity = createDataEntity("location", "Location");
|
|
1600
|
+
|
|
1601
|
+
// src/data/dynamo/entities/data/measure-entity.ts
|
|
1602
|
+
var MeasureEntity = createDataEntity("measure", "Measure");
|
|
1603
|
+
|
|
1604
|
+
// src/data/dynamo/entities/data/measure-report-entity.ts
|
|
1605
|
+
var MeasureReportEntity = createDataEntity(
|
|
1606
|
+
"measurereport",
|
|
1607
|
+
"MeasureReport"
|
|
1608
|
+
);
|
|
1609
|
+
|
|
1610
|
+
// src/data/dynamo/entities/data/media-entity.ts
|
|
1611
|
+
var MediaEntity = createDataEntity("media", "Media");
|
|
1612
|
+
|
|
1613
|
+
// src/data/dynamo/entities/data/medication-administration-entity.ts
|
|
1614
|
+
var MedicationAdministrationEntity = createDataEntity(
|
|
1615
|
+
"medicationadministration",
|
|
1616
|
+
"MedicationAdministration"
|
|
1617
|
+
);
|
|
1618
|
+
|
|
1619
|
+
// src/data/dynamo/entities/data/medication-dispense-entity.ts
|
|
1620
|
+
var MedicationDispenseEntity = createDataEntity(
|
|
1621
|
+
"medicationdispense",
|
|
1622
|
+
"MedicationDispense"
|
|
1623
|
+
);
|
|
1624
|
+
|
|
1625
|
+
// src/data/dynamo/entities/data/medication-entity.ts
|
|
1626
|
+
var MedicationEntity = createDataEntity("medication", "Medication");
|
|
1627
|
+
|
|
1628
|
+
// src/data/dynamo/entities/data/medication-knowledge-entity.ts
|
|
1629
|
+
var MedicationKnowledgeEntity = createDataEntity(
|
|
1630
|
+
"medicationknowledge",
|
|
1631
|
+
"MedicationKnowledge"
|
|
1632
|
+
);
|
|
1633
|
+
|
|
1634
|
+
// src/data/dynamo/entities/data/medication-request-entity.ts
|
|
1635
|
+
var MedicationRequestEntity = createDataEntity(
|
|
1636
|
+
"medicationrequest",
|
|
1637
|
+
"MedicationRequest"
|
|
1638
|
+
);
|
|
1639
|
+
|
|
1640
|
+
// src/data/dynamo/entities/data/medication-statement-entity.ts
|
|
1641
|
+
var MedicationStatementEntity = createDataEntity(
|
|
1642
|
+
"medicationstatement",
|
|
1643
|
+
"MedicationStatement"
|
|
1644
|
+
);
|
|
1645
|
+
|
|
1646
|
+
// src/data/dynamo/entities/data/medicinal-product-authorization-entity.ts
|
|
1647
|
+
var MedicinalProductAuthorizationEntity = createDataEntity(
|
|
1648
|
+
"medicinalproductauthorization",
|
|
1649
|
+
"MedicinalProductAuthorization"
|
|
1650
|
+
);
|
|
1651
|
+
|
|
1652
|
+
// src/data/dynamo/entities/data/medicinal-product-contraindication-entity.ts
|
|
1653
|
+
var MedicinalProductContraindicationEntity = createDataEntity(
|
|
1654
|
+
"medicinalproductcontraindication",
|
|
1655
|
+
"MedicinalProductContraindication"
|
|
1656
|
+
);
|
|
1657
|
+
|
|
1658
|
+
// src/data/dynamo/entities/data/medicinal-product-entity.ts
|
|
1659
|
+
var MedicinalProductEntity = createDataEntity(
|
|
1660
|
+
"medicinalproduct",
|
|
1661
|
+
"MedicinalProduct"
|
|
1662
|
+
);
|
|
1663
|
+
|
|
1664
|
+
// src/data/dynamo/entities/data/medicinal-product-indication-entity.ts
|
|
1665
|
+
var MedicinalProductIndicationEntity = createDataEntity(
|
|
1666
|
+
"medicinalproductindication",
|
|
1667
|
+
"MedicinalProductIndication"
|
|
1668
|
+
);
|
|
1669
|
+
|
|
1670
|
+
// src/data/dynamo/entities/data/medicinal-product-ingredient-entity.ts
|
|
1671
|
+
var MedicinalProductIngredientEntity = createDataEntity(
|
|
1672
|
+
"medicinalproductingredient",
|
|
1673
|
+
"MedicinalProductIngredient"
|
|
1674
|
+
);
|
|
1675
|
+
|
|
1676
|
+
// src/data/dynamo/entities/data/medicinal-product-interaction-entity.ts
|
|
1677
|
+
var MedicinalProductInteractionEntity = createDataEntity(
|
|
1678
|
+
"medicinalproductinteraction",
|
|
1679
|
+
"MedicinalProductInteraction"
|
|
1680
|
+
);
|
|
1681
|
+
|
|
1682
|
+
// src/data/dynamo/entities/data/medicinal-product-manufactured-entity.ts
|
|
1683
|
+
var MedicinalProductManufacturedEntity = createDataEntity(
|
|
1684
|
+
"medicinalproductmanufactured",
|
|
1685
|
+
"MedicinalProductManufactured"
|
|
1686
|
+
);
|
|
1687
|
+
|
|
1688
|
+
// src/data/dynamo/entities/data/medicinal-product-packaged-entity.ts
|
|
1689
|
+
var MedicinalProductPackagedEntity = createDataEntity(
|
|
1690
|
+
"medicinalproductpackaged",
|
|
1691
|
+
"MedicinalProductPackaged"
|
|
1692
|
+
);
|
|
1693
|
+
|
|
1694
|
+
// src/data/dynamo/entities/data/medicinal-product-pharmaceutical-entity.ts
|
|
1695
|
+
var MedicinalProductPharmaceuticalEntity = createDataEntity(
|
|
1696
|
+
"medicinalproductpharmaceutical",
|
|
1697
|
+
"MedicinalProductPharmaceutical"
|
|
1698
|
+
);
|
|
1699
|
+
|
|
1700
|
+
// src/data/dynamo/entities/data/medicinal-product-undesirable-effect-entity.ts
|
|
1701
|
+
var MedicinalProductUndesirableEffectEntity = createDataEntity(
|
|
1702
|
+
"medicinalproductundesirableeffect",
|
|
1703
|
+
"MedicinalProductUndesirableEffect"
|
|
1704
|
+
);
|
|
1705
|
+
|
|
1706
|
+
// src/data/dynamo/entities/data/message-definition-entity.ts
|
|
1707
|
+
var MessageDefinitionEntity = createDataEntity(
|
|
1708
|
+
"messagedefinition",
|
|
1709
|
+
"MessageDefinition"
|
|
1710
|
+
);
|
|
1711
|
+
|
|
1712
|
+
// src/data/dynamo/entities/data/message-header-entity.ts
|
|
1713
|
+
var MessageHeaderEntity = createDataEntity(
|
|
1714
|
+
"messageheader",
|
|
1715
|
+
"MessageHeader"
|
|
1716
|
+
);
|
|
1717
|
+
|
|
1718
|
+
// src/data/dynamo/entities/data/molecular-sequence-entity.ts
|
|
1719
|
+
var MolecularSequenceEntity = createDataEntity(
|
|
1720
|
+
"molecularsequence",
|
|
1721
|
+
"MolecularSequence"
|
|
1722
|
+
);
|
|
1723
|
+
|
|
1724
|
+
// src/data/dynamo/entities/data/naming-system-entity.ts
|
|
1725
|
+
var NamingSystemEntity = createDataEntity(
|
|
1726
|
+
"namingsystem",
|
|
1727
|
+
"NamingSystem"
|
|
1728
|
+
);
|
|
1729
|
+
|
|
1730
|
+
// src/data/dynamo/entities/data/nutrition-order-entity.ts
|
|
1731
|
+
var NutritionOrderEntity = createDataEntity(
|
|
1732
|
+
"nutritionorder",
|
|
1733
|
+
"NutritionOrder"
|
|
1734
|
+
);
|
|
1735
|
+
|
|
1736
|
+
// src/data/dynamo/entities/data/observation-definition-entity.ts
|
|
1737
|
+
var ObservationDefinitionEntity = createDataEntity(
|
|
1738
|
+
"observationdefinition",
|
|
1739
|
+
"ObservationDefinition"
|
|
1740
|
+
);
|
|
1741
|
+
|
|
1742
|
+
// src/data/dynamo/entities/data/observation-entity.ts
|
|
1743
|
+
var ObservationEntity = createDataEntity("observation", "Observation");
|
|
1744
|
+
|
|
1745
|
+
// src/data/dynamo/entities/data/operation-definition-entity.ts
|
|
1746
|
+
var OperationDefinitionEntity = createDataEntity(
|
|
1747
|
+
"operationdefinition",
|
|
1748
|
+
"OperationDefinition"
|
|
1749
|
+
);
|
|
1750
|
+
|
|
1751
|
+
// src/data/dynamo/entities/data/organization-affiliation-entity.ts
|
|
1752
|
+
var OrganizationAffiliationEntity = createDataEntity(
|
|
1753
|
+
"organizationaffiliation",
|
|
1754
|
+
"OrganizationAffiliation"
|
|
1755
|
+
);
|
|
1756
|
+
|
|
1757
|
+
// src/data/dynamo/entities/data/organization-entity.ts
|
|
1758
|
+
var OrganizationEntity = createDataEntity(
|
|
1759
|
+
"organization",
|
|
1760
|
+
"Organization"
|
|
1761
|
+
);
|
|
1762
|
+
|
|
1763
|
+
// src/data/dynamo/entities/data/patient-entity.ts
|
|
1764
|
+
var PatientEntity = createDataEntity("patient", "Patient");
|
|
1765
|
+
|
|
1766
|
+
// src/data/dynamo/entities/data/payment-notice-entity.ts
|
|
1767
|
+
var PaymentNoticeEntity = createDataEntity(
|
|
1768
|
+
"paymentnotice",
|
|
1769
|
+
"PaymentNotice"
|
|
1770
|
+
);
|
|
1771
|
+
|
|
1772
|
+
// src/data/dynamo/entities/data/payment-reconciliation-entity.ts
|
|
1773
|
+
var PaymentReconciliationEntity = createDataEntity(
|
|
1774
|
+
"paymentreconciliation",
|
|
1775
|
+
"PaymentReconciliation"
|
|
1776
|
+
);
|
|
1777
|
+
|
|
1778
|
+
// src/data/dynamo/entities/data/person-entity.ts
|
|
1779
|
+
var PersonEntity = createDataEntity("person", "Person");
|
|
1780
|
+
|
|
1781
|
+
// src/data/dynamo/entities/data/plan-definition-entity.ts
|
|
1782
|
+
var PlanDefinitionEntity = createDataEntity(
|
|
1783
|
+
"plandefinition",
|
|
1784
|
+
"PlanDefinition"
|
|
1785
|
+
);
|
|
1786
|
+
|
|
1787
|
+
// src/data/dynamo/entities/data/practitioner-entity.ts
|
|
1788
|
+
var PractitionerEntity = createDataEntity(
|
|
1789
|
+
"practitioner",
|
|
1790
|
+
"Practitioner"
|
|
1791
|
+
);
|
|
1792
|
+
|
|
1793
|
+
// src/data/dynamo/entities/data/practitioner-role-entity.ts
|
|
1794
|
+
var PractitionerRoleEntity = createDataEntity(
|
|
1795
|
+
"practitionerrole",
|
|
1796
|
+
"PractitionerRole"
|
|
1797
|
+
);
|
|
1798
|
+
|
|
1799
|
+
// src/data/dynamo/entities/data/procedure-entity.ts
|
|
1800
|
+
var ProcedureEntity = createDataEntity("procedure", "Procedure");
|
|
1801
|
+
|
|
1802
|
+
// src/data/dynamo/entities/data/provenance-entity.ts
|
|
1803
|
+
var ProvenanceEntity = createDataEntity("provenance", "Provenance");
|
|
1804
|
+
|
|
1805
|
+
// src/data/dynamo/entities/data/questionnaire-entity.ts
|
|
1806
|
+
var QuestionnaireEntity = createDataEntity(
|
|
1807
|
+
"questionnaire",
|
|
1808
|
+
"Questionnaire"
|
|
1809
|
+
);
|
|
1810
|
+
|
|
1811
|
+
// src/data/dynamo/entities/data/questionnaire-response-entity.ts
|
|
1812
|
+
var QuestionnaireResponseEntity = createDataEntity(
|
|
1813
|
+
"questionnaireresponse",
|
|
1814
|
+
"QuestionnaireResponse"
|
|
1815
|
+
);
|
|
1816
|
+
|
|
1817
|
+
// src/data/dynamo/entities/data/related-person-entity.ts
|
|
1818
|
+
var RelatedPersonEntity = createDataEntity(
|
|
1819
|
+
"relatedperson",
|
|
1820
|
+
"RelatedPerson"
|
|
1821
|
+
);
|
|
1822
|
+
|
|
1823
|
+
// src/data/dynamo/entities/data/request-group-entity.ts
|
|
1824
|
+
var RequestGroupEntity = createDataEntity(
|
|
1825
|
+
"requestgroup",
|
|
1826
|
+
"RequestGroup"
|
|
1827
|
+
);
|
|
1828
|
+
|
|
1829
|
+
// src/data/dynamo/entities/data/research-definition-entity.ts
|
|
1830
|
+
var ResearchDefinitionEntity = createDataEntity(
|
|
1831
|
+
"researchdefinition",
|
|
1832
|
+
"ResearchDefinition"
|
|
1833
|
+
);
|
|
1834
|
+
|
|
1835
|
+
// src/data/dynamo/entities/data/research-element-definition-entity.ts
|
|
1836
|
+
var ResearchElementDefinitionEntity = createDataEntity(
|
|
1837
|
+
"researchelementdefinition",
|
|
1838
|
+
"ResearchElementDefinition"
|
|
1839
|
+
);
|
|
1840
|
+
|
|
1841
|
+
// src/data/dynamo/entities/data/research-study-entity.ts
|
|
1842
|
+
var ResearchStudyEntity = createDataEntity(
|
|
1843
|
+
"researchstudy",
|
|
1844
|
+
"ResearchStudy"
|
|
1845
|
+
);
|
|
1846
|
+
|
|
1847
|
+
// src/data/dynamo/entities/data/research-subject-entity.ts
|
|
1848
|
+
var ResearchSubjectEntity = createDataEntity(
|
|
1849
|
+
"researchsubject",
|
|
1850
|
+
"ResearchSubject"
|
|
1851
|
+
);
|
|
1852
|
+
|
|
1853
|
+
// src/data/dynamo/entities/data/risk-assessment-entity.ts
|
|
1854
|
+
var RiskAssessmentEntity = createDataEntity(
|
|
1855
|
+
"riskassessment",
|
|
1856
|
+
"RiskAssessment"
|
|
1857
|
+
);
|
|
1858
|
+
|
|
1859
|
+
// src/data/dynamo/entities/data/risk-evidence-synthesis-entity.ts
|
|
1860
|
+
var RiskEvidenceSynthesisEntity = createDataEntity(
|
|
1861
|
+
"riskevidencesynthesis",
|
|
1862
|
+
"RiskEvidenceSynthesis"
|
|
1863
|
+
);
|
|
1864
|
+
|
|
1865
|
+
// src/data/dynamo/entities/data/schedule-entity.ts
|
|
1866
|
+
var ScheduleEntity = createDataEntity("schedule", "Schedule");
|
|
1867
|
+
|
|
1868
|
+
// src/data/dynamo/entities/data/search-parameter-entity.ts
|
|
1869
|
+
var SearchParameterEntity = createDataEntity(
|
|
1870
|
+
"searchparameter",
|
|
1871
|
+
"SearchParameter"
|
|
1872
|
+
);
|
|
1873
|
+
|
|
1874
|
+
// src/data/dynamo/entities/data/service-request-entity.ts
|
|
1875
|
+
var ServiceRequestEntity = createDataEntity(
|
|
1876
|
+
"servicerequest",
|
|
1877
|
+
"ServiceRequest"
|
|
1878
|
+
);
|
|
1879
|
+
|
|
1880
|
+
// src/data/dynamo/entities/data/slot-entity.ts
|
|
1881
|
+
var SlotEntity = createDataEntity("slot", "Slot");
|
|
1882
|
+
|
|
1883
|
+
// src/data/dynamo/entities/data/specimen-definition-entity.ts
|
|
1884
|
+
var SpecimenDefinitionEntity = createDataEntity(
|
|
1885
|
+
"specimendefinition",
|
|
1886
|
+
"SpecimenDefinition"
|
|
1887
|
+
);
|
|
1888
|
+
|
|
1889
|
+
// src/data/dynamo/entities/data/specimen-entity.ts
|
|
1890
|
+
var SpecimenEntity = createDataEntity("specimen", "Specimen");
|
|
1891
|
+
|
|
1892
|
+
// src/data/dynamo/entities/data/structure-definition-entity.ts
|
|
1893
|
+
var StructureDefinitionEntity = createDataEntity(
|
|
1894
|
+
"structuredefinition",
|
|
1895
|
+
"StructureDefinition"
|
|
1896
|
+
);
|
|
1897
|
+
|
|
1898
|
+
// src/data/dynamo/entities/data/structure-map-entity.ts
|
|
1899
|
+
var StructureMapEntity = createDataEntity(
|
|
1900
|
+
"structuremap",
|
|
1901
|
+
"StructureMap"
|
|
1902
|
+
);
|
|
1903
|
+
|
|
1904
|
+
// src/data/dynamo/entities/data/subscription-entity.ts
|
|
1905
|
+
var SubscriptionEntity = createDataEntity(
|
|
1906
|
+
"subscription",
|
|
1907
|
+
"Subscription"
|
|
1908
|
+
);
|
|
1909
|
+
|
|
1910
|
+
// src/data/dynamo/entities/data/substance-entity.ts
|
|
1911
|
+
var SubstanceEntity = createDataEntity("substance", "Substance");
|
|
1912
|
+
|
|
1913
|
+
// src/data/dynamo/entities/data/substance-nucleic-acid-entity.ts
|
|
1914
|
+
var SubstanceNucleicAcidEntity = createDataEntity(
|
|
1915
|
+
"substancenucleicacid",
|
|
1916
|
+
"SubstanceNucleicAcid"
|
|
1917
|
+
);
|
|
1918
|
+
|
|
1919
|
+
// src/data/dynamo/entities/data/substance-polymer-entity.ts
|
|
1920
|
+
var SubstancePolymerEntity = createDataEntity(
|
|
1921
|
+
"substancepolymer",
|
|
1922
|
+
"SubstancePolymer"
|
|
1923
|
+
);
|
|
1924
|
+
|
|
1925
|
+
// src/data/dynamo/entities/data/substance-protein-entity.ts
|
|
1926
|
+
var SubstanceProteinEntity = createDataEntity(
|
|
1927
|
+
"substanceprotein",
|
|
1928
|
+
"SubstanceProtein"
|
|
1929
|
+
);
|
|
1930
|
+
|
|
1931
|
+
// src/data/dynamo/entities/data/substance-reference-information-entity.ts
|
|
1932
|
+
var SubstanceReferenceInformationEntity = createDataEntity(
|
|
1933
|
+
"substancereferenceinformation",
|
|
1934
|
+
"SubstanceReferenceInformation"
|
|
1935
|
+
);
|
|
1936
|
+
|
|
1937
|
+
// src/data/dynamo/entities/data/substance-source-material-entity.ts
|
|
1938
|
+
var SubstanceSourceMaterialEntity = createDataEntity(
|
|
1939
|
+
"substancesourcematerial",
|
|
1940
|
+
"SubstanceSourceMaterial"
|
|
1941
|
+
);
|
|
1942
|
+
|
|
1943
|
+
// src/data/dynamo/entities/data/substance-specification-entity.ts
|
|
1944
|
+
var SubstanceSpecificationEntity = createDataEntity(
|
|
1945
|
+
"substancespecification",
|
|
1946
|
+
"SubstanceSpecification"
|
|
1947
|
+
);
|
|
1948
|
+
|
|
1949
|
+
// src/data/dynamo/entities/data/supply-delivery-entity.ts
|
|
1950
|
+
var SupplyDeliveryEntity = createDataEntity(
|
|
1951
|
+
"supplydelivery",
|
|
1952
|
+
"SupplyDelivery"
|
|
1953
|
+
);
|
|
1954
|
+
|
|
1955
|
+
// src/data/dynamo/entities/data/supply-request-entity.ts
|
|
1956
|
+
var SupplyRequestEntity = createDataEntity(
|
|
1957
|
+
"supplyrequest",
|
|
1958
|
+
"SupplyRequest"
|
|
1959
|
+
);
|
|
1960
|
+
|
|
1961
|
+
// src/data/dynamo/entities/data/task-entity.ts
|
|
1962
|
+
var TaskEntity = createDataEntity("task", "Task");
|
|
1963
|
+
|
|
1964
|
+
// src/data/dynamo/entities/data/terminology-capabilities-entity.ts
|
|
1965
|
+
var TerminologyCapabilitiesEntity = createDataEntity(
|
|
1966
|
+
"terminologycapabilities",
|
|
1967
|
+
"TerminologyCapabilities"
|
|
1968
|
+
);
|
|
1969
|
+
|
|
1970
|
+
// src/data/dynamo/entities/data/test-report-entity.ts
|
|
1971
|
+
var TestReportEntity = createDataEntity("testreport", "TestReport");
|
|
1972
|
+
|
|
1973
|
+
// src/data/dynamo/entities/data/test-script-entity.ts
|
|
1974
|
+
var TestScriptEntity = createDataEntity("testscript", "TestScript");
|
|
1975
|
+
|
|
1976
|
+
// src/data/dynamo/entities/data/value-set-entity.ts
|
|
1977
|
+
var ValueSetEntity = createDataEntity("valueset", "ValueSet");
|
|
1978
|
+
|
|
1979
|
+
// src/data/dynamo/entities/data/verification-result-entity.ts
|
|
1980
|
+
var VerificationResultEntity = createDataEntity(
|
|
1981
|
+
"verificationresult",
|
|
1982
|
+
"VerificationResult"
|
|
1983
|
+
);
|
|
1984
|
+
|
|
1985
|
+
// src/data/dynamo/entities/data/vision-prescription-entity.ts
|
|
1986
|
+
var VisionPrescriptionEntity = createDataEntity(
|
|
1987
|
+
"visionprescription",
|
|
1988
|
+
"VisionPrescription"
|
|
1989
|
+
);
|
|
1990
|
+
|
|
1991
|
+
// src/data/dynamo/dynamo-data-service.ts
|
|
1992
|
+
var dataPlaneEntities = {
|
|
1993
|
+
account: AccountEntity,
|
|
1994
|
+
activitydefinition: ActivityDefinitionEntity,
|
|
1995
|
+
adverseevent: AdverseEventEntity,
|
|
1996
|
+
allergyintolerance: AllergyIntoleranceEntity,
|
|
1997
|
+
appointment: AppointmentEntity,
|
|
1998
|
+
appointmentresponse: AppointmentResponseEntity,
|
|
1999
|
+
auditevent: AuditEventEntity,
|
|
2000
|
+
basic: BasicEntity,
|
|
2001
|
+
biologicallyderivedproduct: BiologicallyDerivedProductEntity,
|
|
2002
|
+
bodystructure: BodyStructureEntity,
|
|
2003
|
+
capabilitystatement: CapabilityStatementEntity,
|
|
2004
|
+
careplan: CarePlanEntity,
|
|
2005
|
+
careteam: CareTeamEntity,
|
|
2006
|
+
catalogentry: CatalogEntryEntity,
|
|
2007
|
+
codesystem: CodeSystemEntity,
|
|
2008
|
+
chargeitem: ChargeItemEntity,
|
|
2009
|
+
chargeitemdefinition: ChargeItemDefinitionEntity,
|
|
2010
|
+
claim: ClaimEntity,
|
|
2011
|
+
claimresponse: ClaimResponseEntity,
|
|
2012
|
+
clinicalimpression: ClinicalImpressionEntity,
|
|
2013
|
+
communication: CommunicationEntity,
|
|
2014
|
+
communicationrequest: CommunicationRequestEntity,
|
|
2015
|
+
compartmentdefinition: CompartmentDefinitionEntity,
|
|
2016
|
+
composition: CompositionEntity,
|
|
2017
|
+
conceptmap: ConceptMapEntity,
|
|
2018
|
+
condition: ConditionEntity,
|
|
2019
|
+
consent: ConsentEntity,
|
|
2020
|
+
contract: ContractEntity,
|
|
2021
|
+
coverage: CoverageEntity,
|
|
2022
|
+
coverageeligibilityrequest: CoverageEligibilityRequestEntity,
|
|
2023
|
+
coverageeligibilityresponse: CoverageEligibilityResponseEntity,
|
|
2024
|
+
detectedissue: DetectedIssueEntity,
|
|
2025
|
+
device: DeviceEntity,
|
|
2026
|
+
devicedefinition: DeviceDefinitionEntity,
|
|
2027
|
+
devicemetric: DeviceMetricEntity,
|
|
2028
|
+
devicerequest: DeviceRequestEntity,
|
|
2029
|
+
deviceusestatement: DeviceUseStatementEntity,
|
|
2030
|
+
diagnosticreport: DiagnosticReportEntity,
|
|
2031
|
+
documentmanifest: DocumentManifestEntity,
|
|
2032
|
+
documentreference: DocumentReferenceEntity,
|
|
2033
|
+
effectevidencesynthesis: EffectEvidenceSynthesisEntity,
|
|
2034
|
+
encounter: EncounterEntity,
|
|
2035
|
+
examplescenario: ExampleScenarioEntity,
|
|
2036
|
+
endpoint: EndpointEntity,
|
|
2037
|
+
enrollmentrequest: EnrollmentRequestEntity,
|
|
2038
|
+
enrollmentresponse: EnrollmentResponseEntity,
|
|
2039
|
+
episodeofcare: EpisodeOfCareEntity,
|
|
2040
|
+
eventdefinition: EventDefinitionEntity,
|
|
2041
|
+
evidence: EvidenceEntity,
|
|
2042
|
+
evidencevariable: EvidenceVariableEntity,
|
|
2043
|
+
explanationofbenefit: ExplanationOfBenefitEntity,
|
|
2044
|
+
familymemberhistory: FamilyMemberHistoryEntity,
|
|
2045
|
+
flag: FlagEntity,
|
|
2046
|
+
goal: GoalEntity,
|
|
2047
|
+
graphdefinition: GraphDefinitionEntity,
|
|
2048
|
+
group: GroupEntity,
|
|
2049
|
+
guidanceresponse: GuidanceResponseEntity,
|
|
2050
|
+
healthcareservice: HealthcareServiceEntity,
|
|
2051
|
+
immunization: ImmunizationEntity,
|
|
2052
|
+
immunizationevaluation: ImmunizationEvaluationEntity,
|
|
2053
|
+
immunizationrecommendation: ImmunizationRecommendationEntity,
|
|
2054
|
+
imagingstudy: ImagingStudyEntity,
|
|
2055
|
+
implementationguide: ImplementationGuideEntity,
|
|
2056
|
+
insuranceplan: InsurancePlanEntity,
|
|
2057
|
+
invoice: InvoiceEntity,
|
|
2058
|
+
library: LibraryEntity,
|
|
2059
|
+
linkage: LinkageEntity,
|
|
2060
|
+
list: ListEntity,
|
|
2061
|
+
location: LocationEntity,
|
|
2062
|
+
medication: MedicationEntity,
|
|
2063
|
+
medicationadministration: MedicationAdministrationEntity,
|
|
2064
|
+
medicationdispense: MedicationDispenseEntity,
|
|
2065
|
+
medicationknowledge: MedicationKnowledgeEntity,
|
|
2066
|
+
medicationrequest: MedicationRequestEntity,
|
|
2067
|
+
medicationstatement: MedicationStatementEntity,
|
|
2068
|
+
medicinalproduct: MedicinalProductEntity,
|
|
2069
|
+
medicinalproductauthorization: MedicinalProductAuthorizationEntity,
|
|
2070
|
+
medicinalproductcontraindication: MedicinalProductContraindicationEntity,
|
|
2071
|
+
medicinalproductingredient: MedicinalProductIngredientEntity,
|
|
2072
|
+
medicinalproductindication: MedicinalProductIndicationEntity,
|
|
2073
|
+
medicinalproductinteraction: MedicinalProductInteractionEntity,
|
|
2074
|
+
medicinalproductmanufactured: MedicinalProductManufacturedEntity,
|
|
2075
|
+
medicinalproductpackaged: MedicinalProductPackagedEntity,
|
|
2076
|
+
medicinalproductpharmaceutical: MedicinalProductPharmaceuticalEntity,
|
|
2077
|
+
medicinalproductundesirableeffect: MedicinalProductUndesirableEffectEntity,
|
|
2078
|
+
media: MediaEntity,
|
|
2079
|
+
measure: MeasureEntity,
|
|
2080
|
+
measurereport: MeasureReportEntity,
|
|
2081
|
+
messagedefinition: MessageDefinitionEntity,
|
|
2082
|
+
messageheader: MessageHeaderEntity,
|
|
2083
|
+
molecularsequence: MolecularSequenceEntity,
|
|
2084
|
+
namingsystem: NamingSystemEntity,
|
|
2085
|
+
nutritionorder: NutritionOrderEntity,
|
|
2086
|
+
observation: ObservationEntity,
|
|
2087
|
+
observationdefinition: ObservationDefinitionEntity,
|
|
2088
|
+
operationdefinition: OperationDefinitionEntity,
|
|
2089
|
+
organization: OrganizationEntity,
|
|
2090
|
+
organizationaffiliation: OrganizationAffiliationEntity,
|
|
2091
|
+
patient: PatientEntity,
|
|
2092
|
+
paymentnotice: PaymentNoticeEntity,
|
|
2093
|
+
paymentreconciliation: PaymentReconciliationEntity,
|
|
2094
|
+
person: PersonEntity,
|
|
2095
|
+
plandefinition: PlanDefinitionEntity,
|
|
2096
|
+
practitioner: PractitionerEntity,
|
|
2097
|
+
practitionerrole: PractitionerRoleEntity,
|
|
2098
|
+
procedure: ProcedureEntity,
|
|
2099
|
+
provenance: ProvenanceEntity,
|
|
2100
|
+
questionnaire: QuestionnaireEntity,
|
|
2101
|
+
questionnaireresponse: QuestionnaireResponseEntity,
|
|
2102
|
+
requestgroup: RequestGroupEntity,
|
|
2103
|
+
relatedperson: RelatedPersonEntity,
|
|
2104
|
+
researchdefinition: ResearchDefinitionEntity,
|
|
2105
|
+
researchelementdefinition: ResearchElementDefinitionEntity,
|
|
2106
|
+
researchstudy: ResearchStudyEntity,
|
|
2107
|
+
researchsubject: ResearchSubjectEntity,
|
|
2108
|
+
riskassessment: RiskAssessmentEntity,
|
|
2109
|
+
riskevidencesynthesis: RiskEvidenceSynthesisEntity,
|
|
2110
|
+
schedule: ScheduleEntity,
|
|
2111
|
+
searchparameter: SearchParameterEntity,
|
|
2112
|
+
servicerequest: ServiceRequestEntity,
|
|
2113
|
+
specimen: SpecimenEntity,
|
|
2114
|
+
specimendefinition: SpecimenDefinitionEntity,
|
|
2115
|
+
structuredefinition: StructureDefinitionEntity,
|
|
2116
|
+
structuremap: StructureMapEntity,
|
|
2117
|
+
substance: SubstanceEntity,
|
|
2118
|
+
substancenucleicacid: SubstanceNucleicAcidEntity,
|
|
2119
|
+
substancepolymer: SubstancePolymerEntity,
|
|
2120
|
+
substanceprotein: SubstanceProteinEntity,
|
|
2121
|
+
substancereferenceinformation: SubstanceReferenceInformationEntity,
|
|
2122
|
+
substancespecification: SubstanceSpecificationEntity,
|
|
2123
|
+
substancesourcematerial: SubstanceSourceMaterialEntity,
|
|
2124
|
+
subscription: SubscriptionEntity,
|
|
2125
|
+
terminologycapabilities: TerminologyCapabilitiesEntity,
|
|
2126
|
+
testreport: TestReportEntity,
|
|
2127
|
+
testscript: TestScriptEntity,
|
|
2128
|
+
valueset: ValueSetEntity,
|
|
2129
|
+
supplydelivery: SupplyDeliveryEntity,
|
|
2130
|
+
supplyrequest: SupplyRequestEntity,
|
|
2131
|
+
slot: SlotEntity,
|
|
2132
|
+
task: TaskEntity,
|
|
2133
|
+
visionprescription: VisionPrescriptionEntity,
|
|
2134
|
+
verificationresult: VerificationResultEntity
|
|
2135
|
+
};
|
|
2136
|
+
var dataPlaneService = new import_electrodb10.Service(dataPlaneEntities, {
|
|
2137
|
+
table: defaultTableName,
|
|
2138
|
+
client: dynamoClient
|
|
2139
|
+
});
|
|
2140
|
+
var DynamoDataService = {
|
|
2141
|
+
entities: dataPlaneService.entities
|
|
2142
|
+
};
|
|
2143
|
+
function getDynamoDataService(tableName) {
|
|
2144
|
+
const resolved = tableName ?? defaultTableName;
|
|
2145
|
+
const service = new import_electrodb10.Service(dataPlaneEntities, {
|
|
2146
|
+
table: resolved,
|
|
2147
|
+
client: dynamoClient
|
|
2148
|
+
});
|
|
2149
|
+
return {
|
|
2150
|
+
entities: service.entities
|
|
2151
|
+
};
|
|
2152
|
+
}
|
|
2153
|
+
|
|
2154
|
+
// src/data/operations/data/practitionerrole/practitionerrole-list-operation.ts
|
|
2155
|
+
async function listPractitionerRolesOperation(params) {
|
|
2156
|
+
const { context, tableName, mode } = params;
|
|
2157
|
+
const { tenantId, workspaceId } = context;
|
|
2158
|
+
const service = getDynamoDataService(tableName);
|
|
2159
|
+
return listDataEntitiesByWorkspace(
|
|
2160
|
+
service.entities.practitionerrole,
|
|
2161
|
+
tenantId,
|
|
2162
|
+
workspaceId,
|
|
2163
|
+
mode
|
|
2164
|
+
);
|
|
2165
|
+
}
|
|
2166
|
+
|
|
909
2167
|
// src/data/operations/fhir-reference.ts
|
|
910
2168
|
function idFromReference(reference, prefix) {
|
|
911
2169
|
if (!reference || !reference.startsWith(prefix)) {
|
|
@@ -966,12 +2224,100 @@ async function resolveClaims(cognitoSub) {
|
|
|
966
2224
|
);
|
|
967
2225
|
return void 0;
|
|
968
2226
|
}
|
|
2227
|
+
const [ohi_organization_roles, ohi_platform_roles] = await Promise.all([
|
|
2228
|
+
resolveOrganizationRoles(tenantId, workspaceId, user.id),
|
|
2229
|
+
resolvePlatformRoles(tenantId, workspaceId, user.id)
|
|
2230
|
+
]);
|
|
969
2231
|
return {
|
|
970
2232
|
ohi_tid: tenantId,
|
|
971
2233
|
ohi_wid: workspaceId,
|
|
972
2234
|
ohi_uid: user.id,
|
|
973
|
-
ohi_uname: displayName
|
|
2235
|
+
ohi_uname: displayName,
|
|
2236
|
+
...ohi_organization_roles !== void 0 ? { ohi_organization_roles } : {},
|
|
2237
|
+
...ohi_platform_roles !== void 0 ? { ohi_platform_roles } : {}
|
|
2238
|
+
};
|
|
2239
|
+
}
|
|
2240
|
+
async function resolveOrganizationRoles(tenantId, workspaceId, userId) {
|
|
2241
|
+
const claimContext = {
|
|
2242
|
+
...lookupContext,
|
|
2243
|
+
tenantId,
|
|
2244
|
+
workspaceId
|
|
2245
|
+
};
|
|
2246
|
+
const memberships = await listMembershipsOperation({
|
|
2247
|
+
context: claimContext,
|
|
2248
|
+
mode: "full"
|
|
2249
|
+
});
|
|
2250
|
+
const userRef = `User/${userId}`;
|
|
2251
|
+
const workspaceRef = `Workspace/${workspaceId}`;
|
|
2252
|
+
const matching = memberships.entries.find((entry) => {
|
|
2253
|
+
const r = entry.resource;
|
|
2254
|
+
return r.user?.reference === userRef && r.workspace?.reference === workspaceRef;
|
|
2255
|
+
});
|
|
2256
|
+
if (matching === void 0) {
|
|
2257
|
+
return void 0;
|
|
2258
|
+
}
|
|
2259
|
+
const linked = (0, import_types5.getLinkedDataIdentity)(
|
|
2260
|
+
matching.resource
|
|
2261
|
+
);
|
|
2262
|
+
if (linked?.reference === void 0) {
|
|
2263
|
+
return void 0;
|
|
2264
|
+
}
|
|
2265
|
+
const practitionerRoleList = await listPractitionerRolesOperation({
|
|
2266
|
+
context: claimContext,
|
|
2267
|
+
mode: "full"
|
|
2268
|
+
});
|
|
2269
|
+
const organizationRef = `Organization/${workspaceId}`;
|
|
2270
|
+
const codes = /* @__PURE__ */ new Set();
|
|
2271
|
+
for (const entry of practitionerRoleList.entries) {
|
|
2272
|
+
const role = entry.resource;
|
|
2273
|
+
if (role.practitioner?.reference !== linked.reference) continue;
|
|
2274
|
+
if (role.organization?.reference !== organizationRef) continue;
|
|
2275
|
+
const codings = role.code?.flatMap((cc) => cc.coding ?? []) ?? [];
|
|
2276
|
+
for (const c of codings) {
|
|
2277
|
+
if (typeof c.code !== "string") continue;
|
|
2278
|
+
const parsed = import_types5.organizationRoleCodeSchema.safeParse(c.code);
|
|
2279
|
+
if (parsed.success) {
|
|
2280
|
+
codes.add(parsed.data);
|
|
2281
|
+
}
|
|
2282
|
+
}
|
|
2283
|
+
}
|
|
2284
|
+
return Array.from(codes);
|
|
2285
|
+
}
|
|
2286
|
+
async function resolvePlatformRoles(tenantId, workspaceId, userId) {
|
|
2287
|
+
const claimContext = {
|
|
2288
|
+
...lookupContext,
|
|
2289
|
+
tenantId,
|
|
2290
|
+
workspaceId
|
|
974
2291
|
};
|
|
2292
|
+
const assignments = await listRoleAssignmentsOperation({
|
|
2293
|
+
context: claimContext,
|
|
2294
|
+
mode: "full"
|
|
2295
|
+
});
|
|
2296
|
+
const userRef = `User/${userId}`;
|
|
2297
|
+
const workspaceRef = `Workspace/${workspaceId}`;
|
|
2298
|
+
const userAssignments = assignments.entries.filter((entry) => {
|
|
2299
|
+
const r = entry.resource;
|
|
2300
|
+
if (r.user?.reference !== userRef) return false;
|
|
2301
|
+
const wsRef = r.workspace?.reference;
|
|
2302
|
+
return wsRef === void 0 || wsRef === workspaceRef;
|
|
2303
|
+
});
|
|
2304
|
+
if (userAssignments.length === 0) {
|
|
2305
|
+
return void 0;
|
|
2306
|
+
}
|
|
2307
|
+
const codes = /* @__PURE__ */ new Set();
|
|
2308
|
+
for (const entry of userAssignments) {
|
|
2309
|
+
const r = entry.resource;
|
|
2310
|
+
const ref = r.role?.reference;
|
|
2311
|
+
if (typeof ref !== "string") continue;
|
|
2312
|
+
const roleId = idFromReference(ref, "Role/");
|
|
2313
|
+
if (roleId === void 0) continue;
|
|
2314
|
+
const candidate = roleId.startsWith("role-") ? roleId.slice("role-".length) : roleId;
|
|
2315
|
+
const parsed = import_types5.platformRoleCodeSchema.safeParse(candidate);
|
|
2316
|
+
if (parsed.success) {
|
|
2317
|
+
codes.add(parsed.data);
|
|
2318
|
+
}
|
|
2319
|
+
}
|
|
2320
|
+
return Array.from(codes);
|
|
975
2321
|
}
|
|
976
2322
|
var handler = async (event, _context) => {
|
|
977
2323
|
try {
|