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