@openhi/constructs 0.0.159 → 0.0.161
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-HQ67J7BP.mjs → chunk-5S6VFBLT.mjs} +12 -70
- package/lib/chunk-5S6VFBLT.mjs.map +1 -0
- package/lib/{chunk-MVQWAIMC.mjs → chunk-6BB4CRSS.mjs} +3 -312
- package/lib/chunk-6BB4CRSS.mjs.map +1 -0
- package/lib/{chunk-WPCBVDFZ.mjs → chunk-76UM2LQ5.mjs} +2 -2
- package/lib/chunk-7TRO2STL.mjs +4616 -0
- package/lib/chunk-7TRO2STL.mjs.map +1 -0
- package/lib/chunk-BUAYVN3C.mjs +87 -0
- package/lib/chunk-BUAYVN3C.mjs.map +1 -0
- package/lib/{chunk-23PUSHBV.mjs → chunk-D2Y6DDOC.mjs} +2 -2
- package/lib/chunk-DWSWCUZR.mjs +123 -0
- package/lib/chunk-DWSWCUZR.mjs.map +1 -0
- package/lib/{chunk-VZCPGQXA.mjs → chunk-EUIP2U5F.mjs} +69 -1
- package/lib/{chunk-VZCPGQXA.mjs.map → chunk-EUIP2U5F.mjs.map} +1 -1
- package/lib/chunk-GJTPXJKD.mjs +46 -0
- package/lib/chunk-GJTPXJKD.mjs.map +1 -0
- package/lib/chunk-I6LUPJUY.mjs +61 -0
- package/lib/chunk-I6LUPJUY.mjs.map +1 -0
- package/lib/{chunk-KR2Y2CVQ.mjs → chunk-KA3OMP3X.mjs} +2 -2
- package/lib/{chunk-ZM4GDHHC.mjs → chunk-KMEWULMX.mjs} +51 -3
- package/lib/chunk-KMEWULMX.mjs.map +1 -0
- package/lib/chunk-LKKLO66E.mjs +25 -0
- package/lib/chunk-LKKLO66E.mjs.map +1 -0
- package/lib/{chunk-CFJDATDK.mjs → chunk-MLFMW5IF.mjs} +43 -9
- package/lib/chunk-MLFMW5IF.mjs.map +1 -0
- package/lib/chunk-O5VQWB6U.mjs +315 -0
- package/lib/chunk-O5VQWB6U.mjs.map +1 -0
- package/lib/{chunk-7BQHLC7U.mjs → chunk-P3CTZWC2.mjs} +8 -40
- package/lib/chunk-P3CTZWC2.mjs.map +1 -0
- package/lib/chunk-P3NFCKTZ.mjs +502 -0
- package/lib/chunk-P3NFCKTZ.mjs.map +1 -0
- package/lib/{chunk-M7Y3BOQW.mjs → chunk-Q3MKITPY.mjs} +5 -5
- package/lib/chunk-Q64MOYJ7.mjs +218 -0
- package/lib/chunk-Q64MOYJ7.mjs.map +1 -0
- package/lib/chunk-RQKJNMX5.mjs +89 -0
- package/lib/chunk-RQKJNMX5.mjs.map +1 -0
- package/lib/{chunk-ZWSGM6PZ.mjs → chunk-SD7J3N3C.mjs} +2 -2
- package/lib/{chunk-7RZHFI77.mjs → chunk-VESULYQQ.mjs} +2 -2
- package/lib/{chunk-AOSEKL7U.mjs → chunk-WOTU36P3.mjs} +6 -103
- package/lib/chunk-WOTU36P3.mjs.map +1 -0
- package/lib/{chunk-X5E4YJGZ.mjs → chunk-YPTJJ35S.mjs} +2 -2
- package/lib/counter-apply-operation-DZM3MIDm.d.mts +63 -0
- package/lib/counter-apply-operation-DZM3MIDm.d.ts +63 -0
- package/lib/counter-maintenance.handler.d.mts +38 -0
- package/lib/counter-maintenance.handler.d.ts +38 -0
- package/lib/counter-maintenance.handler.js +2885 -0
- package/lib/counter-maintenance.handler.js.map +1 -0
- package/lib/counter-maintenance.handler.mjs +180 -0
- package/lib/counter-maintenance.handler.mjs.map +1 -0
- package/lib/counter-reconciliation.handler.d.mts +116 -0
- package/lib/counter-reconciliation.handler.d.ts +116 -0
- package/lib/counter-reconciliation.handler.js +3324 -0
- package/lib/counter-reconciliation.handler.js.map +1 -0
- package/lib/counter-reconciliation.handler.mjs +295 -0
- package/lib/counter-reconciliation.handler.mjs.map +1 -0
- package/lib/data-store-postgres-replication.handler.js +50 -2
- package/lib/data-store-postgres-replication.handler.js.map +1 -1
- package/lib/data-store-postgres-replication.handler.mjs +2 -2
- package/lib/delete-chunk.handler.js +118 -2
- package/lib/delete-chunk.handler.js.map +1 -1
- package/lib/delete-chunk.handler.mjs +3 -3
- package/lib/{events-DTgo2dcW.d.mts → events-TG654e7L.d.mts} +68 -19
- package/lib/{events-DTgo2dcW.d.ts → events-TG654e7L.d.ts} +68 -19
- package/lib/finalize.handler.js +50 -2
- package/lib/finalize.handler.js.map +1 -1
- package/lib/finalize.handler.mjs +4 -4
- package/lib/firehose-archive-transform.handler.js +50 -2
- package/lib/firehose-archive-transform.handler.js.map +1 -1
- package/lib/firehose-archive-transform.handler.mjs +2 -2
- package/lib/index.d.mts +1283 -4
- package/lib/index.d.ts +1389 -24
- package/lib/index.js +4113 -320
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +602 -195
- package/lib/index.mjs.map +1 -1
- package/lib/list-chunks.handler.js +118 -2
- package/lib/list-chunks.handler.js.map +1 -1
- package/lib/list-chunks.handler.mjs +3 -3
- package/lib/platform-deploy-bridge.handler.js +50 -2
- package/lib/platform-deploy-bridge.handler.js.map +1 -1
- package/lib/platform-deploy-bridge.handler.mjs +1 -1
- package/lib/pre-token-generation.handler.js +68 -0
- package/lib/pre-token-generation.handler.js.map +1 -1
- package/lib/pre-token-generation.handler.mjs +9 -5
- package/lib/pre-token-generation.handler.mjs.map +1 -1
- package/lib/provision-default-workspace.handler.js +887 -4
- package/lib/provision-default-workspace.handler.js.map +1 -1
- package/lib/provision-default-workspace.handler.mjs +14 -9
- package/lib/provision-default-workspace.handler.mjs.map +1 -1
- package/lib/rename-finalize.handler.js +50 -2
- package/lib/rename-finalize.handler.js.map +1 -1
- package/lib/rename-finalize.handler.mjs +2 -2
- package/lib/rename-list-targets.handler.js +118 -2
- package/lib/rename-list-targets.handler.js.map +1 -1
- package/lib/rename-list-targets.handler.mjs +11 -9
- package/lib/rename-list-targets.handler.mjs.map +1 -1
- package/lib/rename-rewrite-chunk.handler.js +68 -0
- package/lib/rename-rewrite-chunk.handler.js.map +1 -1
- package/lib/rename-rewrite-chunk.handler.mjs +2 -2
- package/lib/rest-api-lambda.handler.js +1454 -251
- package/lib/rest-api-lambda.handler.js.map +1 -1
- package/lib/rest-api-lambda.handler.mjs +673 -821
- package/lib/rest-api-lambda.handler.mjs.map +1 -1
- package/lib/seed-demo-data.handler.d.mts +1 -1
- package/lib/seed-demo-data.handler.d.ts +1 -1
- package/lib/seed-demo-data.handler.js +4004 -201
- package/lib/seed-demo-data.handler.js.map +1 -1
- package/lib/seed-demo-data.handler.mjs +10 -7
- package/lib/seed-system-data.handler.js +118 -2
- package/lib/seed-system-data.handler.js.map +1 -1
- package/lib/seed-system-data.handler.mjs +5 -5
- package/package.json +1 -1
- package/lib/chunk-7BQHLC7U.mjs.map +0 -1
- package/lib/chunk-AOSEKL7U.mjs.map +0 -1
- package/lib/chunk-BQMJSDOD.mjs +0 -1136
- package/lib/chunk-BQMJSDOD.mjs.map +0 -1
- package/lib/chunk-CFJDATDK.mjs.map +0 -1
- package/lib/chunk-E6MCKJVS.mjs +0 -212
- package/lib/chunk-E6MCKJVS.mjs.map +0 -1
- package/lib/chunk-HQ67J7BP.mjs.map +0 -1
- package/lib/chunk-MVQWAIMC.mjs.map +0 -1
- package/lib/chunk-ZM4GDHHC.mjs.map +0 -1
- /package/lib/{chunk-WPCBVDFZ.mjs.map → chunk-76UM2LQ5.mjs.map} +0 -0
- /package/lib/{chunk-23PUSHBV.mjs.map → chunk-D2Y6DDOC.mjs.map} +0 -0
- /package/lib/{chunk-KR2Y2CVQ.mjs.map → chunk-KA3OMP3X.mjs.map} +0 -0
- /package/lib/{chunk-M7Y3BOQW.mjs.map → chunk-Q3MKITPY.mjs.map} +0 -0
- /package/lib/{chunk-ZWSGM6PZ.mjs.map → chunk-SD7J3N3C.mjs.map} +0 -0
- /package/lib/{chunk-7RZHFI77.mjs.map → chunk-VESULYQQ.mjs.map} +0 -0
- /package/lib/{chunk-X5E4YJGZ.mjs.map → chunk-YPTJJ35S.mjs.map} +0 -0
|
@@ -3,35 +3,60 @@ import {
|
|
|
3
3
|
} from "./chunk-2O3CXY2C.mjs";
|
|
4
4
|
import {
|
|
5
5
|
createRoleOperation
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-SD7J3N3C.mjs";
|
|
7
|
+
import {
|
|
8
|
+
countMembershipsByUserOperation,
|
|
9
|
+
listTenantsOperation,
|
|
10
|
+
listWorkspacesOperation,
|
|
11
|
+
membershipListByWorkspaceOperation,
|
|
12
|
+
roleAssignmentListByWorkspaceOperation
|
|
13
|
+
} from "./chunk-Q64MOYJ7.mjs";
|
|
7
14
|
import {
|
|
8
15
|
createAccountOperation,
|
|
16
|
+
createAppointmentOperation,
|
|
17
|
+
createClaimOperation,
|
|
18
|
+
createConditionOperation,
|
|
19
|
+
createCoverageOperation,
|
|
9
20
|
createEncounterOperation,
|
|
21
|
+
createLocationOperation,
|
|
10
22
|
createObservationOperation,
|
|
23
|
+
createOrganizationOperation,
|
|
11
24
|
createPatientOperation,
|
|
25
|
+
createPaymentNoticeOperation,
|
|
12
26
|
createPractitionerOperation,
|
|
27
|
+
createProcedureOperation,
|
|
13
28
|
getRoleByIdOperation
|
|
14
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-P3NFCKTZ.mjs";
|
|
15
30
|
import {
|
|
16
|
-
listMembershipsOperation,
|
|
17
31
|
listPractitionerRolesOperation,
|
|
18
32
|
listRoleAssignmentsOperation
|
|
19
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-P3CTZWC2.mjs";
|
|
34
|
+
import {
|
|
35
|
+
listMembershipsOperation
|
|
36
|
+
} from "./chunk-GJTPXJKD.mjs";
|
|
20
37
|
import {
|
|
21
38
|
createMembershipOperation,
|
|
22
39
|
createRoleAssignmentOperation,
|
|
23
40
|
createTenantOperation,
|
|
24
41
|
createWorkspaceOperation,
|
|
25
42
|
extractDenormalizedReferenceDisplay
|
|
26
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-MLFMW5IF.mjs";
|
|
44
|
+
import {
|
|
45
|
+
extractRoleLevel,
|
|
46
|
+
publishMembershipDeleted,
|
|
47
|
+
publishRoleAssignmentDeleted,
|
|
48
|
+
publishWorkspaceDeleted
|
|
49
|
+
} from "./chunk-BUAYVN3C.mjs";
|
|
27
50
|
import {
|
|
28
|
-
buildMembershipUserProjectionItem,
|
|
29
51
|
buildMembershipWorkspaceProjectionItem,
|
|
30
52
|
buildRoleAssignmentUserProjectionItem,
|
|
31
53
|
buildRoleAssignmentWorkspaceProjectionItem,
|
|
32
|
-
extractReferenceSlug
|
|
33
|
-
|
|
34
|
-
|
|
54
|
+
extractReferenceSlug as extractReferenceSlug2
|
|
55
|
+
} from "./chunk-5S6VFBLT.mjs";
|
|
56
|
+
import {
|
|
57
|
+
buildMembershipUserProjectionItem,
|
|
58
|
+
extractReferenceSlug
|
|
59
|
+
} from "./chunk-I6LUPJUY.mjs";
|
|
35
60
|
import {
|
|
36
61
|
executeMultiWrite
|
|
37
62
|
} from "./chunk-QJDHVMKT.mjs";
|
|
@@ -40,11 +65,16 @@ import {
|
|
|
40
65
|
deleteUserOperation,
|
|
41
66
|
findUserBySubOperation,
|
|
42
67
|
getUserByIdOperation,
|
|
43
|
-
listUsersOperation,
|
|
44
|
-
membershipListByUserOperation,
|
|
45
68
|
switchUserTenantWorkspaceOperation,
|
|
46
69
|
updateUserOperation
|
|
47
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-WOTU36P3.mjs";
|
|
71
|
+
import {
|
|
72
|
+
listUsersOperation,
|
|
73
|
+
membershipListByUserOperation
|
|
74
|
+
} from "./chunk-DWSWCUZR.mjs";
|
|
75
|
+
import {
|
|
76
|
+
getDynamoDataService
|
|
77
|
+
} from "./chunk-6BB4CRSS.mjs";
|
|
48
78
|
import {
|
|
49
79
|
batchGetWithRetry,
|
|
50
80
|
buildUpdatedResourceWithAudit,
|
|
@@ -54,11 +84,10 @@ import {
|
|
|
54
84
|
deleteDataEntityById,
|
|
55
85
|
dispatchListMode,
|
|
56
86
|
getDataEntityById,
|
|
57
|
-
getDynamoDataService,
|
|
58
87
|
listDataEntitiesByWorkspace,
|
|
59
88
|
mergeAuditIntoMeta,
|
|
60
89
|
updateDataEntityById
|
|
61
|
-
} from "./chunk-
|
|
90
|
+
} from "./chunk-O5VQWB6U.mjs";
|
|
62
91
|
import {
|
|
63
92
|
ConflictError,
|
|
64
93
|
ForbiddenError,
|
|
@@ -69,8 +98,9 @@ import {
|
|
|
69
98
|
import {
|
|
70
99
|
SHARD_COUNT,
|
|
71
100
|
getDynamoControlService
|
|
72
|
-
} from "./chunk-
|
|
101
|
+
} from "./chunk-EUIP2U5F.mjs";
|
|
73
102
|
import "./chunk-TRY7JGWO.mjs";
|
|
103
|
+
import "./chunk-KMEWULMX.mjs";
|
|
74
104
|
import "./chunk-LZOMFHX3.mjs";
|
|
75
105
|
|
|
76
106
|
// src/data/lambda/rest-api-lambda.handler.ts
|
|
@@ -1044,7 +1074,7 @@ function sendInvalidSummary400(res, diagnostics) {
|
|
|
1044
1074
|
}
|
|
1045
1075
|
async function handleListRoute(opts) {
|
|
1046
1076
|
const { req, res, basePath, listOperation, errorLogContext } = opts;
|
|
1047
|
-
const ctx = req.openhiContext;
|
|
1077
|
+
const ctx = opts.context ?? req.openhiContext;
|
|
1048
1078
|
const parsed = parseSearchSubsetting(req, res);
|
|
1049
1079
|
if ("errorResponse" in parsed) return parsed.errorResponse;
|
|
1050
1080
|
try {
|
|
@@ -1724,6 +1754,14 @@ async function deleteMembershipOperation(params) {
|
|
|
1724
1754
|
});
|
|
1725
1755
|
}
|
|
1726
1756
|
await executeMultiWrite({ service, triples });
|
|
1757
|
+
await publishMembershipDeleted(context, {
|
|
1758
|
+
membershipId: id,
|
|
1759
|
+
tenantId: context.tenantId,
|
|
1760
|
+
...userIdFromResource !== void 0 && { userId: userIdFromResource },
|
|
1761
|
+
...workspaceIdFromResource !== void 0 && {
|
|
1762
|
+
workspaceId: workspaceIdFromResource
|
|
1763
|
+
}
|
|
1764
|
+
});
|
|
1727
1765
|
}
|
|
1728
1766
|
|
|
1729
1767
|
// src/data/rest-api/routes/control/membership/membership-delete-route.ts
|
|
@@ -1775,14 +1813,154 @@ async function getMembershipByIdRoute(req, res) {
|
|
|
1775
1813
|
}
|
|
1776
1814
|
}
|
|
1777
1815
|
|
|
1816
|
+
// src/data/rest-api/routes/control/cross-cutting-route-helpers.ts
|
|
1817
|
+
function sendInvalidQuery400(res, diagnostics) {
|
|
1818
|
+
return res.status(400).json({
|
|
1819
|
+
resourceType: "OperationOutcome",
|
|
1820
|
+
issue: [{ severity: "error", code: "invalid", diagnostics }]
|
|
1821
|
+
});
|
|
1822
|
+
}
|
|
1823
|
+
function resolveTenantScopeOverride(req, res, context) {
|
|
1824
|
+
const raw = (req.query ?? {}).tenant;
|
|
1825
|
+
if (raw === void 0) {
|
|
1826
|
+
return { ok: true, context };
|
|
1827
|
+
}
|
|
1828
|
+
if (typeof raw !== "string" || raw.length === 0) {
|
|
1829
|
+
return {
|
|
1830
|
+
ok: false,
|
|
1831
|
+
response: sendInvalidQuery400(
|
|
1832
|
+
res,
|
|
1833
|
+
"Query parameter `tenant` must be a non-empty string."
|
|
1834
|
+
)
|
|
1835
|
+
};
|
|
1836
|
+
}
|
|
1837
|
+
return { ok: true, context: { ...context, tenantId: raw } };
|
|
1838
|
+
}
|
|
1839
|
+
function sendForbidden403(res, diagnostics) {
|
|
1840
|
+
return res.status(403).json({
|
|
1841
|
+
resourceType: "OperationOutcome",
|
|
1842
|
+
issue: [{ severity: "error", code: "forbidden", diagnostics }]
|
|
1843
|
+
});
|
|
1844
|
+
}
|
|
1845
|
+
var COMMON_KEYS = ["cursor", "limit", "order"];
|
|
1846
|
+
function parseCommonListQuery(req, res, options = {}) {
|
|
1847
|
+
const q = req.query ?? {};
|
|
1848
|
+
const allowedKeys = /* @__PURE__ */ new Set([
|
|
1849
|
+
...COMMON_KEYS,
|
|
1850
|
+
...options.extraKeys ?? []
|
|
1851
|
+
]);
|
|
1852
|
+
const extra = Object.keys(q).filter((k) => !allowedKeys.has(k));
|
|
1853
|
+
if (extra.length > 0) {
|
|
1854
|
+
return {
|
|
1855
|
+
ok: false,
|
|
1856
|
+
response: sendInvalidQuery400(
|
|
1857
|
+
res,
|
|
1858
|
+
`Unsupported query parameter${extra.length === 1 ? "" : "s"}: ${extra.join(", ")}.`
|
|
1859
|
+
)
|
|
1860
|
+
};
|
|
1861
|
+
}
|
|
1862
|
+
const rawCursor = q.cursor;
|
|
1863
|
+
let cursor = null;
|
|
1864
|
+
if (rawCursor !== void 0) {
|
|
1865
|
+
if (typeof rawCursor !== "string") {
|
|
1866
|
+
return {
|
|
1867
|
+
ok: false,
|
|
1868
|
+
response: sendInvalidQuery400(
|
|
1869
|
+
res,
|
|
1870
|
+
"Query parameter `cursor` must be a string."
|
|
1871
|
+
)
|
|
1872
|
+
};
|
|
1873
|
+
}
|
|
1874
|
+
cursor = rawCursor;
|
|
1875
|
+
}
|
|
1876
|
+
const rawLimit = q.limit;
|
|
1877
|
+
let limit;
|
|
1878
|
+
if (rawLimit !== void 0) {
|
|
1879
|
+
if (typeof rawLimit !== "string" || rawLimit.length === 0) {
|
|
1880
|
+
return {
|
|
1881
|
+
ok: false,
|
|
1882
|
+
response: sendInvalidQuery400(
|
|
1883
|
+
res,
|
|
1884
|
+
"Query parameter `limit` must be a positive integer."
|
|
1885
|
+
)
|
|
1886
|
+
};
|
|
1887
|
+
}
|
|
1888
|
+
const parsed = Number(rawLimit);
|
|
1889
|
+
if (!Number.isInteger(parsed) || parsed <= 0) {
|
|
1890
|
+
return {
|
|
1891
|
+
ok: false,
|
|
1892
|
+
response: sendInvalidQuery400(
|
|
1893
|
+
res,
|
|
1894
|
+
"Query parameter `limit` must be a positive integer."
|
|
1895
|
+
)
|
|
1896
|
+
};
|
|
1897
|
+
}
|
|
1898
|
+
limit = parsed;
|
|
1899
|
+
}
|
|
1900
|
+
const rawOrder = q.order;
|
|
1901
|
+
let order;
|
|
1902
|
+
if (rawOrder !== void 0) {
|
|
1903
|
+
if (rawOrder !== "asc" && rawOrder !== "desc") {
|
|
1904
|
+
return {
|
|
1905
|
+
ok: false,
|
|
1906
|
+
response: sendInvalidQuery400(
|
|
1907
|
+
res,
|
|
1908
|
+
'Query parameter `order` must be one of "asc", "desc".'
|
|
1909
|
+
)
|
|
1910
|
+
};
|
|
1911
|
+
}
|
|
1912
|
+
order = rawOrder;
|
|
1913
|
+
}
|
|
1914
|
+
const value = order === void 0 ? limit === void 0 ? { cursor } : { cursor, limit } : limit === void 0 ? { cursor, order } : { cursor, limit, order };
|
|
1915
|
+
return { ok: true, value };
|
|
1916
|
+
}
|
|
1917
|
+
function buildPaginationLinks(opts) {
|
|
1918
|
+
const links = [
|
|
1919
|
+
{ relation: "self", url: composeUrl(opts.basePath, opts.query) }
|
|
1920
|
+
];
|
|
1921
|
+
if (opts.nextCursor !== null && opts.nextCursor.length > 0) {
|
|
1922
|
+
const nextQuery = { ...opts.query };
|
|
1923
|
+
nextQuery.cursor = opts.nextCursor;
|
|
1924
|
+
links.push({
|
|
1925
|
+
relation: "next",
|
|
1926
|
+
url: composeUrl(opts.basePath, nextQuery)
|
|
1927
|
+
});
|
|
1928
|
+
}
|
|
1929
|
+
return links;
|
|
1930
|
+
}
|
|
1931
|
+
function composeUrl(basePath, query) {
|
|
1932
|
+
const usp = new URLSearchParams();
|
|
1933
|
+
for (const [key, value] of Object.entries(query)) {
|
|
1934
|
+
if (value === void 0 || value === null) {
|
|
1935
|
+
continue;
|
|
1936
|
+
}
|
|
1937
|
+
if (Array.isArray(value)) {
|
|
1938
|
+
for (const v of value) {
|
|
1939
|
+
if (v !== void 0 && v !== null) {
|
|
1940
|
+
usp.append(key, String(v));
|
|
1941
|
+
}
|
|
1942
|
+
}
|
|
1943
|
+
} else {
|
|
1944
|
+
usp.append(key, String(value));
|
|
1945
|
+
}
|
|
1946
|
+
}
|
|
1947
|
+
const qs = usp.toString();
|
|
1948
|
+
return qs.length === 0 ? basePath : `${basePath}?${qs}`;
|
|
1949
|
+
}
|
|
1950
|
+
|
|
1778
1951
|
// src/data/rest-api/routes/control/membership/membership-list-route.ts
|
|
1779
1952
|
async function listMembershipsRoute(req, res) {
|
|
1953
|
+
const scope = resolveTenantScopeOverride(req, res, req.openhiContext);
|
|
1954
|
+
if (!scope.ok) {
|
|
1955
|
+
return scope.response;
|
|
1956
|
+
}
|
|
1780
1957
|
return handleListRoute({
|
|
1781
1958
|
req,
|
|
1782
1959
|
res,
|
|
1783
1960
|
basePath: BASE_PATH.MEMBERSHIP,
|
|
1784
1961
|
listOperation: listMembershipsOperation,
|
|
1785
|
-
errorLogContext: "GET /Membership list error:"
|
|
1962
|
+
errorLogContext: "GET /Membership list error:",
|
|
1963
|
+
context: scope.context
|
|
1786
1964
|
});
|
|
1787
1965
|
}
|
|
1788
1966
|
|
|
@@ -2269,6 +2447,18 @@ async function deleteRoleAssignmentOperation(params) {
|
|
|
2269
2447
|
});
|
|
2270
2448
|
}
|
|
2271
2449
|
await executeMultiWrite({ service, triples });
|
|
2450
|
+
await publishRoleAssignmentDeleted(context, {
|
|
2451
|
+
roleAssignmentId: id,
|
|
2452
|
+
tenantId: context.tenantId,
|
|
2453
|
+
...userIdFromResource !== void 0 && { userId: userIdFromResource },
|
|
2454
|
+
...workspaceIdFromResource !== void 0 && {
|
|
2455
|
+
workspaceId: workspaceIdFromResource
|
|
2456
|
+
},
|
|
2457
|
+
...roleIdFromResource !== void 0 && { roleId: roleIdFromResource },
|
|
2458
|
+
...extractRoleLevel(parsed) !== void 0 && {
|
|
2459
|
+
roleLevel: extractRoleLevel(parsed)
|
|
2460
|
+
}
|
|
2461
|
+
});
|
|
2272
2462
|
}
|
|
2273
2463
|
|
|
2274
2464
|
// src/data/rest-api/routes/control/roleassignment/roleassignment-delete-route.ts
|
|
@@ -2623,42 +2813,6 @@ async function getTenantByIdRoute(req, res) {
|
|
|
2623
2813
|
}
|
|
2624
2814
|
}
|
|
2625
2815
|
|
|
2626
|
-
// src/data/operations/control/tenant/tenant-list-operation.ts
|
|
2627
|
-
var SK7 = "CURRENT";
|
|
2628
|
-
async function listTenantsOperation(params) {
|
|
2629
|
-
const { tableName, mode = "full" } = params;
|
|
2630
|
-
const service = getDynamoControlService(tableName);
|
|
2631
|
-
const shardResults = await Promise.all(
|
|
2632
|
-
Array.from(
|
|
2633
|
-
{ length: SHARD_COUNT },
|
|
2634
|
-
(_, shard) => service.entities.tenant.query.gsi1({ gsi1Shard: String(shard) }).go()
|
|
2635
|
-
)
|
|
2636
|
-
);
|
|
2637
|
-
return dispatchListMode(
|
|
2638
|
-
mode,
|
|
2639
|
-
shardResults,
|
|
2640
|
-
{
|
|
2641
|
-
hydrate: (orderedIds) => batchGetWithRetry(
|
|
2642
|
-
service.entities.tenant,
|
|
2643
|
-
orderedIds.map((id) => ({ tenantId: id, sk: SK7 }))
|
|
2644
|
-
),
|
|
2645
|
-
getId: (item) => item.id,
|
|
2646
|
-
buildEntry: (id, item) => ({
|
|
2647
|
-
id,
|
|
2648
|
-
resource: {
|
|
2649
|
-
resourceType: "Tenant",
|
|
2650
|
-
id,
|
|
2651
|
-
...JSON.parse(item.resource)
|
|
2652
|
-
}
|
|
2653
|
-
}),
|
|
2654
|
-
buildSummaryEntry: (id, parsed) => ({
|
|
2655
|
-
id,
|
|
2656
|
-
resource: { resourceType: "Tenant", id, ...parsed }
|
|
2657
|
-
})
|
|
2658
|
-
}
|
|
2659
|
-
);
|
|
2660
|
-
}
|
|
2661
|
-
|
|
2662
2816
|
// src/data/rest-api/routes/control/tenant/tenant-list-route.ts
|
|
2663
2817
|
async function listTenantsRoute(req, res) {
|
|
2664
2818
|
return handleListRoute({
|
|
@@ -2670,6 +2824,179 @@ async function listTenantsRoute(req, res) {
|
|
|
2670
2824
|
});
|
|
2671
2825
|
}
|
|
2672
2826
|
|
|
2827
|
+
// src/data/operations/control/tenant/tenant-users-operation.ts
|
|
2828
|
+
var USER_SK = "CURRENT";
|
|
2829
|
+
function extractEmail(user) {
|
|
2830
|
+
const telecom = user.telecom;
|
|
2831
|
+
if (!Array.isArray(telecom)) {
|
|
2832
|
+
return null;
|
|
2833
|
+
}
|
|
2834
|
+
for (const entry of telecom) {
|
|
2835
|
+
if (entry.system === "email" && typeof entry.value === "string" && entry.value.length > 0) {
|
|
2836
|
+
return entry.value;
|
|
2837
|
+
}
|
|
2838
|
+
}
|
|
2839
|
+
return null;
|
|
2840
|
+
}
|
|
2841
|
+
function extractDisplayName(user) {
|
|
2842
|
+
const name = user.name;
|
|
2843
|
+
if (!Array.isArray(name) || name.length === 0) {
|
|
2844
|
+
return null;
|
|
2845
|
+
}
|
|
2846
|
+
const first = name[0];
|
|
2847
|
+
if (typeof first.text === "string" && first.text.trim().length > 0) {
|
|
2848
|
+
return first.text.trim();
|
|
2849
|
+
}
|
|
2850
|
+
const given = Array.isArray(first.given) ? first.given.filter((g) => typeof g === "string").join(" ").trim() : "";
|
|
2851
|
+
const family = typeof first.family === "string" ? first.family : "";
|
|
2852
|
+
const composed = `${given} ${family}`.trim();
|
|
2853
|
+
return composed.length > 0 ? composed : null;
|
|
2854
|
+
}
|
|
2855
|
+
function extractReferenceDisplay(resource, fieldName) {
|
|
2856
|
+
const field = resource[fieldName];
|
|
2857
|
+
if (!field || typeof field !== "object") {
|
|
2858
|
+
return null;
|
|
2859
|
+
}
|
|
2860
|
+
const display = field.display;
|
|
2861
|
+
if (typeof display !== "string") {
|
|
2862
|
+
return null;
|
|
2863
|
+
}
|
|
2864
|
+
const trimmed = display.trim();
|
|
2865
|
+
return trimmed.length > 0 ? trimmed : null;
|
|
2866
|
+
}
|
|
2867
|
+
function ensureAccumulator(byUser, userId) {
|
|
2868
|
+
let acc = byUser.get(userId);
|
|
2869
|
+
if (!acc) {
|
|
2870
|
+
acc = { tenantRole: null, workspaces: /* @__PURE__ */ new Map() };
|
|
2871
|
+
byUser.set(userId, acc);
|
|
2872
|
+
}
|
|
2873
|
+
return acc;
|
|
2874
|
+
}
|
|
2875
|
+
async function tenantUsersOperation(params) {
|
|
2876
|
+
const { context, tableName } = params;
|
|
2877
|
+
const service = getDynamoControlService(tableName);
|
|
2878
|
+
const [memberships, roleAssignments, workspaces] = await Promise.all([
|
|
2879
|
+
listMembershipsOperation({ context, tableName }),
|
|
2880
|
+
listRoleAssignmentsOperation({ context, tableName }),
|
|
2881
|
+
listWorkspacesOperation({ context, tableName })
|
|
2882
|
+
]);
|
|
2883
|
+
const workspaceNames = /* @__PURE__ */ new Map();
|
|
2884
|
+
for (const entry of workspaces.entries) {
|
|
2885
|
+
const resource = entry.resource;
|
|
2886
|
+
const name = typeof resource.name === "string" && resource.name.trim().length > 0 ? resource.name.trim() : null;
|
|
2887
|
+
workspaceNames.set(entry.id, name);
|
|
2888
|
+
}
|
|
2889
|
+
const byUser = /* @__PURE__ */ new Map();
|
|
2890
|
+
for (const entry of memberships.entries) {
|
|
2891
|
+
const resource = entry.resource;
|
|
2892
|
+
const userId = extractReferenceSlug(resource, "user");
|
|
2893
|
+
if (userId === void 0) {
|
|
2894
|
+
continue;
|
|
2895
|
+
}
|
|
2896
|
+
const acc = ensureAccumulator(byUser, userId);
|
|
2897
|
+
const workspaceId = extractReferenceSlug(resource, "workspace");
|
|
2898
|
+
if (workspaceId !== void 0 && !acc.workspaces.has(workspaceId)) {
|
|
2899
|
+
acc.workspaces.set(workspaceId, { workspaceId, role: null });
|
|
2900
|
+
}
|
|
2901
|
+
}
|
|
2902
|
+
for (const entry of roleAssignments.entries) {
|
|
2903
|
+
const resource = entry.resource;
|
|
2904
|
+
const userId = extractReferenceSlug(resource, "user");
|
|
2905
|
+
const roleId = extractReferenceSlug(resource, "role");
|
|
2906
|
+
if (userId === void 0 || roleId === void 0) {
|
|
2907
|
+
continue;
|
|
2908
|
+
}
|
|
2909
|
+
const acc = ensureAccumulator(byUser, userId);
|
|
2910
|
+
const role = {
|
|
2911
|
+
roleId,
|
|
2912
|
+
roleName: extractReferenceDisplay(resource, "role")
|
|
2913
|
+
};
|
|
2914
|
+
const workspaceId = extractReferenceSlug(resource, "workspace");
|
|
2915
|
+
if (workspaceId === void 0) {
|
|
2916
|
+
acc.tenantRole = role;
|
|
2917
|
+
} else {
|
|
2918
|
+
const existing = acc.workspaces.get(workspaceId);
|
|
2919
|
+
if (existing) {
|
|
2920
|
+
existing.role = role;
|
|
2921
|
+
} else {
|
|
2922
|
+
acc.workspaces.set(workspaceId, { workspaceId, role });
|
|
2923
|
+
}
|
|
2924
|
+
}
|
|
2925
|
+
}
|
|
2926
|
+
const userIds = Array.from(byUser.keys());
|
|
2927
|
+
const userRows = userIds.length === 0 ? [] : await batchGetWithRetry(
|
|
2928
|
+
service.entities.user,
|
|
2929
|
+
userIds.map((id) => ({ id, sk: USER_SK }))
|
|
2930
|
+
);
|
|
2931
|
+
const usersById = /* @__PURE__ */ new Map();
|
|
2932
|
+
for (const row of userRows) {
|
|
2933
|
+
try {
|
|
2934
|
+
usersById.set(
|
|
2935
|
+
row.id,
|
|
2936
|
+
JSON.parse(row.resource)
|
|
2937
|
+
);
|
|
2938
|
+
} catch {
|
|
2939
|
+
}
|
|
2940
|
+
}
|
|
2941
|
+
const entries = userIds.map((userId) => {
|
|
2942
|
+
const acc = byUser.get(userId);
|
|
2943
|
+
const user = usersById.get(userId);
|
|
2944
|
+
const workspaceEntries = Array.from(
|
|
2945
|
+
acc.workspaces.values()
|
|
2946
|
+
).map((ws) => ({
|
|
2947
|
+
workspaceId: ws.workspaceId,
|
|
2948
|
+
workspaceName: workspaceNames.get(ws.workspaceId) ?? null,
|
|
2949
|
+
role: ws.role
|
|
2950
|
+
}));
|
|
2951
|
+
return {
|
|
2952
|
+
resourceType: "TenantUser",
|
|
2953
|
+
userId,
|
|
2954
|
+
displayName: user ? extractDisplayName(user) : null,
|
|
2955
|
+
email: user ? extractEmail(user) : null,
|
|
2956
|
+
tenantRole: acc.tenantRole,
|
|
2957
|
+
workspaces: workspaceEntries
|
|
2958
|
+
};
|
|
2959
|
+
});
|
|
2960
|
+
return { entries };
|
|
2961
|
+
}
|
|
2962
|
+
|
|
2963
|
+
// src/data/rest-api/routes/control/tenant/tenant-list-users-route.ts
|
|
2964
|
+
async function listTenantUsersRoute(req, res) {
|
|
2965
|
+
const ctx = req.openhiContext;
|
|
2966
|
+
if (!ctx) {
|
|
2967
|
+
return sendForbidden403(
|
|
2968
|
+
res,
|
|
2969
|
+
"Missing or invalid OpenHI JWT claims (tenant, workspace, or audit context)."
|
|
2970
|
+
);
|
|
2971
|
+
}
|
|
2972
|
+
const tenantId = String(req.params.id);
|
|
2973
|
+
if (tenantId.length === 0) {
|
|
2974
|
+
return sendForbidden403(res, "Tenant id is required.");
|
|
2975
|
+
}
|
|
2976
|
+
const parsed = parseCommonListQuery(req, res);
|
|
2977
|
+
if (!parsed.ok) {
|
|
2978
|
+
return parsed.response;
|
|
2979
|
+
}
|
|
2980
|
+
const scopedContext = { ...ctx, tenantId };
|
|
2981
|
+
try {
|
|
2982
|
+
const result = await tenantUsersOperation({ context: scopedContext });
|
|
2983
|
+
const basePath = `${BASE_PATH.TENANT}/${tenantId}/users`;
|
|
2984
|
+
const entries = result.entries.map((entry) => ({
|
|
2985
|
+
fullUrl: `${BASE_PATH.USER}/${entry.userId}`,
|
|
2986
|
+
resource: entry
|
|
2987
|
+
}));
|
|
2988
|
+
return res.json({
|
|
2989
|
+
resourceType: "Bundle",
|
|
2990
|
+
type: "searchset",
|
|
2991
|
+
total: entries.length,
|
|
2992
|
+
link: [{ relation: "self", url: basePath }],
|
|
2993
|
+
entry: entries
|
|
2994
|
+
});
|
|
2995
|
+
} catch (err) {
|
|
2996
|
+
return sendOperationOutcome500(res, err, "GET /Tenant/:id/users error:");
|
|
2997
|
+
}
|
|
2998
|
+
}
|
|
2999
|
+
|
|
2673
3000
|
// src/data/operations/control/tenant/tenant-update-operation.ts
|
|
2674
3001
|
import { extractSummary as extractSummary4 } from "@openhi/types";
|
|
2675
3002
|
async function updateTenantOperation(params) {
|
|
@@ -2737,6 +3064,7 @@ async function updateTenantRoute(req, res) {
|
|
|
2737
3064
|
// src/data/rest-api/routes/control/tenant/tenant.ts
|
|
2738
3065
|
var router6 = express6.Router();
|
|
2739
3066
|
router6.get("/", listTenantsRoute);
|
|
3067
|
+
router6.get("/:id/users", listTenantUsersRoute);
|
|
2740
3068
|
router6.get("/:id", getTenantByIdRoute);
|
|
2741
3069
|
router6.post("/", createTenantRoute);
|
|
2742
3070
|
router6.put("/:id", updateTenantRoute);
|
|
@@ -2884,125 +3212,6 @@ async function configurationListByWorkspaceOperation(params) {
|
|
|
2884
3212
|
return { items, cursor: result.cursor ?? null };
|
|
2885
3213
|
}
|
|
2886
3214
|
|
|
2887
|
-
// src/data/rest-api/routes/control/cross-cutting-route-helpers.ts
|
|
2888
|
-
function sendInvalidQuery400(res, diagnostics) {
|
|
2889
|
-
return res.status(400).json({
|
|
2890
|
-
resourceType: "OperationOutcome",
|
|
2891
|
-
issue: [{ severity: "error", code: "invalid", diagnostics }]
|
|
2892
|
-
});
|
|
2893
|
-
}
|
|
2894
|
-
function sendForbidden403(res, diagnostics) {
|
|
2895
|
-
return res.status(403).json({
|
|
2896
|
-
resourceType: "OperationOutcome",
|
|
2897
|
-
issue: [{ severity: "error", code: "forbidden", diagnostics }]
|
|
2898
|
-
});
|
|
2899
|
-
}
|
|
2900
|
-
var COMMON_KEYS = ["cursor", "limit", "order"];
|
|
2901
|
-
function parseCommonListQuery(req, res, options = {}) {
|
|
2902
|
-
const q = req.query ?? {};
|
|
2903
|
-
const allowedKeys = /* @__PURE__ */ new Set([
|
|
2904
|
-
...COMMON_KEYS,
|
|
2905
|
-
...options.extraKeys ?? []
|
|
2906
|
-
]);
|
|
2907
|
-
const extra = Object.keys(q).filter((k) => !allowedKeys.has(k));
|
|
2908
|
-
if (extra.length > 0) {
|
|
2909
|
-
return {
|
|
2910
|
-
ok: false,
|
|
2911
|
-
response: sendInvalidQuery400(
|
|
2912
|
-
res,
|
|
2913
|
-
`Unsupported query parameter${extra.length === 1 ? "" : "s"}: ${extra.join(", ")}.`
|
|
2914
|
-
)
|
|
2915
|
-
};
|
|
2916
|
-
}
|
|
2917
|
-
const rawCursor = q.cursor;
|
|
2918
|
-
let cursor = null;
|
|
2919
|
-
if (rawCursor !== void 0) {
|
|
2920
|
-
if (typeof rawCursor !== "string") {
|
|
2921
|
-
return {
|
|
2922
|
-
ok: false,
|
|
2923
|
-
response: sendInvalidQuery400(
|
|
2924
|
-
res,
|
|
2925
|
-
"Query parameter `cursor` must be a string."
|
|
2926
|
-
)
|
|
2927
|
-
};
|
|
2928
|
-
}
|
|
2929
|
-
cursor = rawCursor;
|
|
2930
|
-
}
|
|
2931
|
-
const rawLimit = q.limit;
|
|
2932
|
-
let limit;
|
|
2933
|
-
if (rawLimit !== void 0) {
|
|
2934
|
-
if (typeof rawLimit !== "string" || rawLimit.length === 0) {
|
|
2935
|
-
return {
|
|
2936
|
-
ok: false,
|
|
2937
|
-
response: sendInvalidQuery400(
|
|
2938
|
-
res,
|
|
2939
|
-
"Query parameter `limit` must be a positive integer."
|
|
2940
|
-
)
|
|
2941
|
-
};
|
|
2942
|
-
}
|
|
2943
|
-
const parsed = Number(rawLimit);
|
|
2944
|
-
if (!Number.isInteger(parsed) || parsed <= 0) {
|
|
2945
|
-
return {
|
|
2946
|
-
ok: false,
|
|
2947
|
-
response: sendInvalidQuery400(
|
|
2948
|
-
res,
|
|
2949
|
-
"Query parameter `limit` must be a positive integer."
|
|
2950
|
-
)
|
|
2951
|
-
};
|
|
2952
|
-
}
|
|
2953
|
-
limit = parsed;
|
|
2954
|
-
}
|
|
2955
|
-
const rawOrder = q.order;
|
|
2956
|
-
let order;
|
|
2957
|
-
if (rawOrder !== void 0) {
|
|
2958
|
-
if (rawOrder !== "asc" && rawOrder !== "desc") {
|
|
2959
|
-
return {
|
|
2960
|
-
ok: false,
|
|
2961
|
-
response: sendInvalidQuery400(
|
|
2962
|
-
res,
|
|
2963
|
-
'Query parameter `order` must be one of "asc", "desc".'
|
|
2964
|
-
)
|
|
2965
|
-
};
|
|
2966
|
-
}
|
|
2967
|
-
order = rawOrder;
|
|
2968
|
-
}
|
|
2969
|
-
const value = order === void 0 ? limit === void 0 ? { cursor } : { cursor, limit } : limit === void 0 ? { cursor, order } : { cursor, limit, order };
|
|
2970
|
-
return { ok: true, value };
|
|
2971
|
-
}
|
|
2972
|
-
function buildPaginationLinks(opts) {
|
|
2973
|
-
const links = [
|
|
2974
|
-
{ relation: "self", url: composeUrl(opts.basePath, opts.query) }
|
|
2975
|
-
];
|
|
2976
|
-
if (opts.nextCursor !== null && opts.nextCursor.length > 0) {
|
|
2977
|
-
const nextQuery = { ...opts.query };
|
|
2978
|
-
nextQuery.cursor = opts.nextCursor;
|
|
2979
|
-
links.push({
|
|
2980
|
-
relation: "next",
|
|
2981
|
-
url: composeUrl(opts.basePath, nextQuery)
|
|
2982
|
-
});
|
|
2983
|
-
}
|
|
2984
|
-
return links;
|
|
2985
|
-
}
|
|
2986
|
-
function composeUrl(basePath, query) {
|
|
2987
|
-
const usp = new URLSearchParams();
|
|
2988
|
-
for (const [key, value] of Object.entries(query)) {
|
|
2989
|
-
if (value === void 0 || value === null) {
|
|
2990
|
-
continue;
|
|
2991
|
-
}
|
|
2992
|
-
if (Array.isArray(value)) {
|
|
2993
|
-
for (const v of value) {
|
|
2994
|
-
if (v !== void 0 && v !== null) {
|
|
2995
|
-
usp.append(key, String(v));
|
|
2996
|
-
}
|
|
2997
|
-
}
|
|
2998
|
-
} else {
|
|
2999
|
-
usp.append(key, String(value));
|
|
3000
|
-
}
|
|
3001
|
-
}
|
|
3002
|
-
const qs = usp.toString();
|
|
3003
|
-
return qs.length === 0 ? basePath : `${basePath}?${qs}`;
|
|
3004
|
-
}
|
|
3005
|
-
|
|
3006
3215
|
// src/data/rest-api/routes/control/projection-bundle-helpers.ts
|
|
3007
3216
|
var EXT_BASE = "https://openhi.org/fhir/StructureDefinition";
|
|
3008
3217
|
function parseProjectionSummary(summary) {
|
|
@@ -3259,41 +3468,6 @@ async function listUserConfigurationsRoute(req, res) {
|
|
|
3259
3468
|
}
|
|
3260
3469
|
}
|
|
3261
3470
|
|
|
3262
|
-
// src/data/operations/control/membership/membership-list-by-workspace-operation.ts
|
|
3263
|
-
async function membershipListByWorkspaceOperation(params) {
|
|
3264
|
-
const {
|
|
3265
|
-
tenantId,
|
|
3266
|
-
workspaceId,
|
|
3267
|
-
cursor = null,
|
|
3268
|
-
limit,
|
|
3269
|
-
order,
|
|
3270
|
-
tableName
|
|
3271
|
-
} = params;
|
|
3272
|
-
const service = getDynamoControlService(tableName);
|
|
3273
|
-
const goOptions = {
|
|
3274
|
-
cursor
|
|
3275
|
-
};
|
|
3276
|
-
if (limit !== void 0) {
|
|
3277
|
-
goOptions.limit = limit;
|
|
3278
|
-
}
|
|
3279
|
-
if (order !== void 0) {
|
|
3280
|
-
goOptions.order = order;
|
|
3281
|
-
}
|
|
3282
|
-
const result = await service.entities.membershipWorkspaceProjection.query.record({ tenantId, workspaceId }).begins({ sk: "MEMBERSHIP#" }).go(goOptions);
|
|
3283
|
-
const items = (result.data ?? []).map((row) => ({
|
|
3284
|
-
tenantId: row.tenantId,
|
|
3285
|
-
workspaceId: row.workspaceId,
|
|
3286
|
-
sk: row.sk,
|
|
3287
|
-
userId: row.userId,
|
|
3288
|
-
membershipId: row.membershipId,
|
|
3289
|
-
summary: row.summary,
|
|
3290
|
-
vid: row.vid,
|
|
3291
|
-
lastUpdated: row.lastUpdated,
|
|
3292
|
-
denormalizedUserName: row.denormalizedUserName
|
|
3293
|
-
}));
|
|
3294
|
-
return { items, cursor: result.cursor ?? null };
|
|
3295
|
-
}
|
|
3296
|
-
|
|
3297
3471
|
// src/data/rest-api/routes/control/user/user-list-memberships-route.ts
|
|
3298
3472
|
var ALLOWED_MODES = [
|
|
3299
3473
|
"all",
|
|
@@ -3317,7 +3491,7 @@ async function listUserMembershipsRoute(req, res) {
|
|
|
3317
3491
|
);
|
|
3318
3492
|
}
|
|
3319
3493
|
const parsed = parseCommonListQuery(req, res, {
|
|
3320
|
-
extraKeys: ["mode", "tenantId"]
|
|
3494
|
+
extraKeys: ["mode", "tenantId", "_summary"]
|
|
3321
3495
|
});
|
|
3322
3496
|
if (!parsed.ok) {
|
|
3323
3497
|
return parsed.response;
|
|
@@ -3350,6 +3524,33 @@ async function listUserMembershipsRoute(req, res) {
|
|
|
3350
3524
|
'Query parameter `tenantId` is required when `mode === "workspaceInTenant"`.'
|
|
3351
3525
|
);
|
|
3352
3526
|
}
|
|
3527
|
+
const rawSummary = req.query._summary;
|
|
3528
|
+
if (rawSummary !== void 0) {
|
|
3529
|
+
if (rawSummary !== "count") {
|
|
3530
|
+
return sendInvalidQuery400(
|
|
3531
|
+
res,
|
|
3532
|
+
'Query parameter `_summary` must be "count" on this endpoint.'
|
|
3533
|
+
);
|
|
3534
|
+
}
|
|
3535
|
+
try {
|
|
3536
|
+
const total = await countMembershipsByUserOperation({
|
|
3537
|
+
userId,
|
|
3538
|
+
mode,
|
|
3539
|
+
tenantId
|
|
3540
|
+
});
|
|
3541
|
+
return res.json({
|
|
3542
|
+
resourceType: "Bundle",
|
|
3543
|
+
type: "searchset",
|
|
3544
|
+
total
|
|
3545
|
+
});
|
|
3546
|
+
} catch (err) {
|
|
3547
|
+
return sendOperationOutcome500(
|
|
3548
|
+
res,
|
|
3549
|
+
err,
|
|
3550
|
+
"GET /User/:id/Membership count error:"
|
|
3551
|
+
);
|
|
3552
|
+
}
|
|
3553
|
+
}
|
|
3353
3554
|
try {
|
|
3354
3555
|
const result = await membershipListByUserOperation({
|
|
3355
3556
|
userId,
|
|
@@ -3446,51 +3647,6 @@ async function roleAssignmentListByUserOperation(params) {
|
|
|
3446
3647
|
return { items, cursor: result.cursor ?? null };
|
|
3447
3648
|
}
|
|
3448
3649
|
|
|
3449
|
-
// src/data/operations/control/roleassignment/roleassignment-list-by-workspace-operation.ts
|
|
3450
|
-
function buildSkPrefix2(roleId) {
|
|
3451
|
-
if (roleId === void 0 || roleId.length === 0) {
|
|
3452
|
-
return "ROLEASSIGNMENT#";
|
|
3453
|
-
}
|
|
3454
|
-
return `ROLEASSIGNMENT#${roleId}#`;
|
|
3455
|
-
}
|
|
3456
|
-
async function roleAssignmentListByWorkspaceOperation(params) {
|
|
3457
|
-
const {
|
|
3458
|
-
tenantId,
|
|
3459
|
-
workspaceId,
|
|
3460
|
-
roleId,
|
|
3461
|
-
cursor = null,
|
|
3462
|
-
limit,
|
|
3463
|
-
order,
|
|
3464
|
-
tableName
|
|
3465
|
-
} = params;
|
|
3466
|
-
const service = getDynamoControlService(tableName);
|
|
3467
|
-
const skPrefix = buildSkPrefix2(roleId);
|
|
3468
|
-
const goOptions = {
|
|
3469
|
-
cursor
|
|
3470
|
-
};
|
|
3471
|
-
if (limit !== void 0) {
|
|
3472
|
-
goOptions.limit = limit;
|
|
3473
|
-
}
|
|
3474
|
-
if (order !== void 0) {
|
|
3475
|
-
goOptions.order = order;
|
|
3476
|
-
}
|
|
3477
|
-
const result = await service.entities.roleAssignmentWorkspaceProjection.query.record({ tenantId, workspaceId }).begins({ sk: skPrefix }).go(goOptions);
|
|
3478
|
-
const items = (result.data ?? []).map((row) => ({
|
|
3479
|
-
tenantId: row.tenantId,
|
|
3480
|
-
workspaceId: row.workspaceId,
|
|
3481
|
-
sk: row.sk,
|
|
3482
|
-
userId: row.userId,
|
|
3483
|
-
roleId: row.roleId,
|
|
3484
|
-
roleAssignmentId: row.roleAssignmentId,
|
|
3485
|
-
summary: row.summary,
|
|
3486
|
-
vid: row.vid,
|
|
3487
|
-
lastUpdated: row.lastUpdated,
|
|
3488
|
-
denormalizedUserName: row.denormalizedUserName,
|
|
3489
|
-
denormalizedRoleName: row.denormalizedRoleName
|
|
3490
|
-
}));
|
|
3491
|
-
return { items, cursor: result.cursor ?? null };
|
|
3492
|
-
}
|
|
3493
|
-
|
|
3494
3650
|
// src/data/rest-api/routes/control/user/user-list-role-assignments-route.ts
|
|
3495
3651
|
var ALLOWED_MODES2 = [
|
|
3496
3652
|
"all",
|
|
@@ -4103,12 +4259,20 @@ async function deleteWorkspaceOperation(params) {
|
|
|
4103
4259
|
const { context, id, tableName } = params;
|
|
4104
4260
|
const { tenantId } = context;
|
|
4105
4261
|
const service = getDynamoControlService(tableName);
|
|
4262
|
+
const existing = await service.entities.workspace.get({ tenantId, id, sk: "CURRENT" }).go();
|
|
4263
|
+
const workspaceExisted = existing.data !== null;
|
|
4106
4264
|
await service.entities.workspace.delete({ tenantId, id, sk: "CURRENT" }).go();
|
|
4107
4265
|
await deleteOrganizationOperation({
|
|
4108
4266
|
context: { ...context, workspaceId: id },
|
|
4109
4267
|
id,
|
|
4110
4268
|
tableName
|
|
4111
4269
|
});
|
|
4270
|
+
if (workspaceExisted) {
|
|
4271
|
+
await publishWorkspaceDeleted(context, {
|
|
4272
|
+
workspaceId: id,
|
|
4273
|
+
tenantId
|
|
4274
|
+
});
|
|
4275
|
+
}
|
|
4112
4276
|
}
|
|
4113
4277
|
|
|
4114
4278
|
// src/data/rest-api/routes/control/workspace/workspace-delete-route.ts
|
|
@@ -4374,51 +4538,19 @@ async function listWorkspaceRoleAssignmentsRoute(req, res) {
|
|
|
4374
4538
|
}
|
|
4375
4539
|
}
|
|
4376
4540
|
|
|
4377
|
-
// src/data/operations/control/workspace/workspace-list-operation.ts
|
|
4378
|
-
var SK8 = "CURRENT";
|
|
4379
|
-
async function listWorkspacesOperation(params) {
|
|
4380
|
-
const { context, tableName, mode = "full" } = params;
|
|
4381
|
-
const { tenantId } = context;
|
|
4382
|
-
const service = getDynamoControlService(tableName);
|
|
4383
|
-
const shardResults = await Promise.all(
|
|
4384
|
-
Array.from(
|
|
4385
|
-
{ length: SHARD_COUNT },
|
|
4386
|
-
(_, shard) => service.entities.workspace.query.gsi1({ tenantId, gsi1Shard: String(shard) }).go()
|
|
4387
|
-
)
|
|
4388
|
-
);
|
|
4389
|
-
return dispatchListMode(
|
|
4390
|
-
mode,
|
|
4391
|
-
shardResults,
|
|
4392
|
-
{
|
|
4393
|
-
hydrate: (orderedIds) => batchGetWithRetry(
|
|
4394
|
-
service.entities.workspace,
|
|
4395
|
-
orderedIds.map((id) => ({ tenantId, id, sk: SK8 }))
|
|
4396
|
-
),
|
|
4397
|
-
getId: (item) => item.id,
|
|
4398
|
-
buildEntry: (id, item) => ({
|
|
4399
|
-
id,
|
|
4400
|
-
resource: {
|
|
4401
|
-
resourceType: "Workspace",
|
|
4402
|
-
id,
|
|
4403
|
-
...JSON.parse(item.resource)
|
|
4404
|
-
}
|
|
4405
|
-
}),
|
|
4406
|
-
buildSummaryEntry: (id, parsed) => ({
|
|
4407
|
-
id,
|
|
4408
|
-
resource: { resourceType: "Workspace", id, ...parsed }
|
|
4409
|
-
})
|
|
4410
|
-
}
|
|
4411
|
-
);
|
|
4412
|
-
}
|
|
4413
|
-
|
|
4414
4541
|
// src/data/rest-api/routes/control/workspace/workspace-list-route.ts
|
|
4415
4542
|
async function listWorkspacesRoute(req, res) {
|
|
4543
|
+
const scope = resolveTenantScopeOverride(req, res, req.openhiContext);
|
|
4544
|
+
if (!scope.ok) {
|
|
4545
|
+
return scope.response;
|
|
4546
|
+
}
|
|
4416
4547
|
return handleListRoute({
|
|
4417
4548
|
req,
|
|
4418
4549
|
res,
|
|
4419
4550
|
basePath: BASE_PATH.WORKSPACE,
|
|
4420
4551
|
listOperation: listWorkspacesOperation,
|
|
4421
|
-
errorLogContext: "GET /Workspace list error:"
|
|
4552
|
+
errorLogContext: "GET /Workspace list error:",
|
|
4553
|
+
context: scope.context
|
|
4422
4554
|
});
|
|
4423
4555
|
}
|
|
4424
4556
|
|
|
@@ -6896,41 +7028,6 @@ router13.delete("/:id", deleteAllergyIntoleranceRoute);
|
|
|
6896
7028
|
// src/data/rest-api/routes/data/appointment/appointment.ts
|
|
6897
7029
|
import express14 from "express";
|
|
6898
7030
|
|
|
6899
|
-
// src/data/operations/data/appointment/appointment-create-operation.ts
|
|
6900
|
-
import { ulid as ulid5 } from "ulid";
|
|
6901
|
-
async function createAppointmentOperation(params) {
|
|
6902
|
-
const { context, body, tableName } = params;
|
|
6903
|
-
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
6904
|
-
const id = body.id ?? ulid5();
|
|
6905
|
-
const meta = {
|
|
6906
|
-
...body.meta ?? {},
|
|
6907
|
-
lastUpdated: date,
|
|
6908
|
-
versionId: "1"
|
|
6909
|
-
};
|
|
6910
|
-
const resourceWithAudit = {
|
|
6911
|
-
...body,
|
|
6912
|
-
resourceType: "Appointment",
|
|
6913
|
-
id,
|
|
6914
|
-
meta: mergeAuditIntoMeta(meta, {
|
|
6915
|
-
createdDate: date,
|
|
6916
|
-
createdById: actorId,
|
|
6917
|
-
createdByName: actorName,
|
|
6918
|
-
modifiedDate: date,
|
|
6919
|
-
modifiedById: actorId,
|
|
6920
|
-
modifiedByName: actorName
|
|
6921
|
-
})
|
|
6922
|
-
};
|
|
6923
|
-
const service = getDynamoDataService(tableName);
|
|
6924
|
-
return createDataEntityRecord(
|
|
6925
|
-
service.entities.appointment,
|
|
6926
|
-
tenantId,
|
|
6927
|
-
workspaceId,
|
|
6928
|
-
id,
|
|
6929
|
-
resourceWithAudit,
|
|
6930
|
-
date
|
|
6931
|
-
);
|
|
6932
|
-
}
|
|
6933
|
-
|
|
6934
7031
|
// src/data/rest-api/routes/data/appointment/appointment-create-route.ts
|
|
6935
7032
|
async function createAppointmentRoute(req, res) {
|
|
6936
7033
|
const bodyResult = requireJsonBodyAs(req, res);
|
|
@@ -7190,11 +7287,11 @@ router14.delete("/:id", deleteAppointmentRoute);
|
|
|
7190
7287
|
import express15 from "express";
|
|
7191
7288
|
|
|
7192
7289
|
// src/data/operations/data/appointmentresponse/appointmentresponse-create-operation.ts
|
|
7193
|
-
import { ulid as
|
|
7290
|
+
import { ulid as ulid5 } from "ulid";
|
|
7194
7291
|
async function createAppointmentResponseOperation(params) {
|
|
7195
7292
|
const { context, body, tableName } = params;
|
|
7196
7293
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
7197
|
-
const id = body.id ??
|
|
7294
|
+
const id = body.id ?? ulid5();
|
|
7198
7295
|
const meta = {
|
|
7199
7296
|
...body.meta ?? {},
|
|
7200
7297
|
lastUpdated: date,
|
|
@@ -7397,11 +7494,11 @@ router15.delete("/:id", deleteAppointmentResponseRoute);
|
|
|
7397
7494
|
import express16 from "express";
|
|
7398
7495
|
|
|
7399
7496
|
// src/data/operations/data/auditevent/auditevent-create-operation.ts
|
|
7400
|
-
import { ulid as
|
|
7497
|
+
import { ulid as ulid6 } from "ulid";
|
|
7401
7498
|
async function createAuditEventOperation(params) {
|
|
7402
7499
|
const { context, body, tableName } = params;
|
|
7403
7500
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
7404
|
-
const id = body.id ??
|
|
7501
|
+
const id = body.id ?? ulid6();
|
|
7405
7502
|
const meta = {
|
|
7406
7503
|
...body.meta ?? {},
|
|
7407
7504
|
lastUpdated: date,
|
|
@@ -7597,11 +7694,11 @@ router16.delete("/:id", deleteAuditEventRoute);
|
|
|
7597
7694
|
import express17 from "express";
|
|
7598
7695
|
|
|
7599
7696
|
// src/data/operations/data/basic/basic-create-operation.ts
|
|
7600
|
-
import { ulid as
|
|
7697
|
+
import { ulid as ulid7 } from "ulid";
|
|
7601
7698
|
async function createBasicOperation(params) {
|
|
7602
7699
|
const { context, body, tableName } = params;
|
|
7603
7700
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
7604
|
-
const id = body.id ??
|
|
7701
|
+
const id = body.id ?? ulid7();
|
|
7605
7702
|
const meta = {
|
|
7606
7703
|
...body.meta ?? {},
|
|
7607
7704
|
lastUpdated: date,
|
|
@@ -7797,11 +7894,11 @@ router17.delete("/:id", deleteBasicRoute);
|
|
|
7797
7894
|
import express18 from "express";
|
|
7798
7895
|
|
|
7799
7896
|
// src/data/operations/data/biologicallyderivedproduct/biologicallyderivedproduct-create-operation.ts
|
|
7800
|
-
import { ulid as
|
|
7897
|
+
import { ulid as ulid8 } from "ulid";
|
|
7801
7898
|
async function createBiologicallyDerivedProductOperation(params) {
|
|
7802
7899
|
const { context, body, tableName } = params;
|
|
7803
7900
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
7804
|
-
const id = body.id ??
|
|
7901
|
+
const id = body.id ?? ulid8();
|
|
7805
7902
|
const meta = {
|
|
7806
7903
|
...body.meta ?? {},
|
|
7807
7904
|
lastUpdated: date,
|
|
@@ -8016,11 +8113,11 @@ router18.delete("/:id", deleteBiologicallyDerivedProductRoute);
|
|
|
8016
8113
|
import express19 from "express";
|
|
8017
8114
|
|
|
8018
8115
|
// src/data/operations/data/bodystructure/bodystructure-create-operation.ts
|
|
8019
|
-
import { ulid as
|
|
8116
|
+
import { ulid as ulid9 } from "ulid";
|
|
8020
8117
|
async function createBodyStructureOperation(params) {
|
|
8021
8118
|
const { context, body, tableName } = params;
|
|
8022
8119
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
8023
|
-
const id = body.id ??
|
|
8120
|
+
const id = body.id ?? ulid9();
|
|
8024
8121
|
const meta = {
|
|
8025
8122
|
...body.meta ?? {},
|
|
8026
8123
|
lastUpdated: date,
|
|
@@ -8216,11 +8313,11 @@ router19.delete("/:id", deleteBodyStructureRoute);
|
|
|
8216
8313
|
import express20 from "express";
|
|
8217
8314
|
|
|
8218
8315
|
// src/data/operations/data/capabilitystatement/capabilitystatement-create-operation.ts
|
|
8219
|
-
import { ulid as
|
|
8316
|
+
import { ulid as ulid10 } from "ulid";
|
|
8220
8317
|
async function createCapabilityStatementOperation(params) {
|
|
8221
8318
|
const { context, body, tableName } = params;
|
|
8222
8319
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
8223
|
-
const id = body.id ??
|
|
8320
|
+
const id = body.id ?? ulid10();
|
|
8224
8321
|
const meta = {
|
|
8225
8322
|
...body.meta ?? {},
|
|
8226
8323
|
lastUpdated: date,
|
|
@@ -8423,11 +8520,11 @@ router20.delete("/:id", deleteCapabilityStatementRoute);
|
|
|
8423
8520
|
import express21 from "express";
|
|
8424
8521
|
|
|
8425
8522
|
// src/data/operations/data/careplan/careplan-create-operation.ts
|
|
8426
|
-
import { ulid as
|
|
8523
|
+
import { ulid as ulid11 } from "ulid";
|
|
8427
8524
|
async function createCarePlanOperation(params) {
|
|
8428
8525
|
const { context, body, tableName } = params;
|
|
8429
8526
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
8430
|
-
const id = body.id ??
|
|
8527
|
+
const id = body.id ?? ulid11();
|
|
8431
8528
|
const meta = {
|
|
8432
8529
|
...body.meta ?? {},
|
|
8433
8530
|
lastUpdated: date,
|
|
@@ -8623,11 +8720,11 @@ router21.delete("/:id", deleteCarePlanRoute);
|
|
|
8623
8720
|
import express22 from "express";
|
|
8624
8721
|
|
|
8625
8722
|
// src/data/operations/data/careteam/careteam-create-operation.ts
|
|
8626
|
-
import { ulid as
|
|
8723
|
+
import { ulid as ulid12 } from "ulid";
|
|
8627
8724
|
async function createCareTeamOperation(params) {
|
|
8628
8725
|
const { context, body, tableName } = params;
|
|
8629
8726
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
8630
|
-
const id = body.id ??
|
|
8727
|
+
const id = body.id ?? ulid12();
|
|
8631
8728
|
const meta = {
|
|
8632
8729
|
...body.meta ?? {},
|
|
8633
8730
|
lastUpdated: date,
|
|
@@ -8823,11 +8920,11 @@ router22.delete("/:id", deleteCareTeamRoute);
|
|
|
8823
8920
|
import express23 from "express";
|
|
8824
8921
|
|
|
8825
8922
|
// src/data/operations/data/catalogentry/catalogentry-create-operation.ts
|
|
8826
|
-
import { ulid as
|
|
8923
|
+
import { ulid as ulid13 } from "ulid";
|
|
8827
8924
|
async function createCatalogEntryOperation(params) {
|
|
8828
8925
|
const { context, body, tableName } = params;
|
|
8829
8926
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
8830
|
-
const id = body.id ??
|
|
8927
|
+
const id = body.id ?? ulid13();
|
|
8831
8928
|
const meta = {
|
|
8832
8929
|
...body.meta ?? {},
|
|
8833
8930
|
lastUpdated: date,
|
|
@@ -9023,11 +9120,11 @@ router23.delete("/:id", deleteCatalogEntryRoute);
|
|
|
9023
9120
|
import express24 from "express";
|
|
9024
9121
|
|
|
9025
9122
|
// src/data/operations/data/chargeitem/chargeitem-create-operation.ts
|
|
9026
|
-
import { ulid as
|
|
9123
|
+
import { ulid as ulid14 } from "ulid";
|
|
9027
9124
|
async function createChargeItemOperation(params) {
|
|
9028
9125
|
const { context, body, tableName } = params;
|
|
9029
9126
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
9030
|
-
const id = body.id ??
|
|
9127
|
+
const id = body.id ?? ulid14();
|
|
9031
9128
|
const meta = {
|
|
9032
9129
|
...body.meta ?? {},
|
|
9033
9130
|
lastUpdated: date,
|
|
@@ -9319,11 +9416,11 @@ router24.delete("/:id", deleteChargeItemRoute);
|
|
|
9319
9416
|
import express25 from "express";
|
|
9320
9417
|
|
|
9321
9418
|
// src/data/operations/data/chargeitemdefinition/chargeitemdefinition-create-operation.ts
|
|
9322
|
-
import { ulid as
|
|
9419
|
+
import { ulid as ulid15 } from "ulid";
|
|
9323
9420
|
async function createChargeItemDefinitionOperation(params) {
|
|
9324
9421
|
const { context, body, tableName } = params;
|
|
9325
9422
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
9326
|
-
const id = body.id ??
|
|
9423
|
+
const id = body.id ?? ulid15();
|
|
9327
9424
|
const meta = {
|
|
9328
9425
|
...body.meta ?? {},
|
|
9329
9426
|
lastUpdated: date,
|
|
@@ -9529,41 +9626,6 @@ router25.delete("/:id", deleteChargeItemDefinitionRoute);
|
|
|
9529
9626
|
// src/data/rest-api/routes/data/claim/claim.ts
|
|
9530
9627
|
import express26 from "express";
|
|
9531
9628
|
|
|
9532
|
-
// src/data/operations/data/claim/claim-create-operation.ts
|
|
9533
|
-
import { ulid as ulid17 } from "ulid";
|
|
9534
|
-
async function createClaimOperation(params) {
|
|
9535
|
-
const { context, body, tableName } = params;
|
|
9536
|
-
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
9537
|
-
const id = body.id ?? ulid17();
|
|
9538
|
-
const meta = {
|
|
9539
|
-
...body.meta ?? {},
|
|
9540
|
-
lastUpdated: date,
|
|
9541
|
-
versionId: "1"
|
|
9542
|
-
};
|
|
9543
|
-
const resourceWithAudit = {
|
|
9544
|
-
...body,
|
|
9545
|
-
resourceType: "Claim",
|
|
9546
|
-
id,
|
|
9547
|
-
meta: mergeAuditIntoMeta(meta, {
|
|
9548
|
-
createdDate: date,
|
|
9549
|
-
createdById: actorId,
|
|
9550
|
-
createdByName: actorName,
|
|
9551
|
-
modifiedDate: date,
|
|
9552
|
-
modifiedById: actorId,
|
|
9553
|
-
modifiedByName: actorName
|
|
9554
|
-
})
|
|
9555
|
-
};
|
|
9556
|
-
const service = getDynamoDataService(tableName);
|
|
9557
|
-
return createDataEntityRecord(
|
|
9558
|
-
service.entities.claim,
|
|
9559
|
-
tenantId,
|
|
9560
|
-
workspaceId,
|
|
9561
|
-
id,
|
|
9562
|
-
resourceWithAudit,
|
|
9563
|
-
date
|
|
9564
|
-
);
|
|
9565
|
-
}
|
|
9566
|
-
|
|
9567
9629
|
// src/data/rest-api/routes/data/claim/claim-create-route.ts
|
|
9568
9630
|
async function createClaimRoute(req, res) {
|
|
9569
9631
|
const bodyResult = requireJsonBodyAs(req, res);
|
|
@@ -9826,11 +9888,11 @@ router26.delete("/:id", deleteClaimRoute);
|
|
|
9826
9888
|
import express27 from "express";
|
|
9827
9889
|
|
|
9828
9890
|
// src/data/operations/data/claimresponse/claimresponse-create-operation.ts
|
|
9829
|
-
import { ulid as
|
|
9891
|
+
import { ulid as ulid16 } from "ulid";
|
|
9830
9892
|
async function createClaimResponseOperation(params) {
|
|
9831
9893
|
const { context, body, tableName } = params;
|
|
9832
9894
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
9833
|
-
const id = body.id ??
|
|
9895
|
+
const id = body.id ?? ulid16();
|
|
9834
9896
|
const meta = {
|
|
9835
9897
|
...body.meta ?? {},
|
|
9836
9898
|
lastUpdated: date,
|
|
@@ -10026,11 +10088,11 @@ router27.delete("/:id", deleteClaimResponseRoute);
|
|
|
10026
10088
|
import express28 from "express";
|
|
10027
10089
|
|
|
10028
10090
|
// src/data/operations/data/clinicalimpression/clinicalimpression-create-operation.ts
|
|
10029
|
-
import { ulid as
|
|
10091
|
+
import { ulid as ulid17 } from "ulid";
|
|
10030
10092
|
async function createClinicalImpressionOperation(params) {
|
|
10031
10093
|
const { context, body, tableName } = params;
|
|
10032
10094
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
10033
|
-
const id = body.id ??
|
|
10095
|
+
const id = body.id ?? ulid17();
|
|
10034
10096
|
const meta = {
|
|
10035
10097
|
...body.meta ?? {},
|
|
10036
10098
|
lastUpdated: date,
|
|
@@ -10233,11 +10295,11 @@ router28.delete("/:id", deleteClinicalImpressionRoute);
|
|
|
10233
10295
|
import express29 from "express";
|
|
10234
10296
|
|
|
10235
10297
|
// src/data/operations/data/codesystem/codesystem-create-operation.ts
|
|
10236
|
-
import { ulid as
|
|
10298
|
+
import { ulid as ulid18 } from "ulid";
|
|
10237
10299
|
async function createCodeSystemOperation(params) {
|
|
10238
10300
|
const { context, body, tableName } = params;
|
|
10239
10301
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
10240
|
-
const id = body.id ??
|
|
10302
|
+
const id = body.id ?? ulid18();
|
|
10241
10303
|
const meta = {
|
|
10242
10304
|
...body.meta ?? {},
|
|
10243
10305
|
lastUpdated: date,
|
|
@@ -10433,11 +10495,11 @@ router29.delete("/:id", deleteCodeSystemRoute);
|
|
|
10433
10495
|
import express30 from "express";
|
|
10434
10496
|
|
|
10435
10497
|
// src/data/operations/data/communication/communication-create-operation.ts
|
|
10436
|
-
import { ulid as
|
|
10498
|
+
import { ulid as ulid19 } from "ulid";
|
|
10437
10499
|
async function createCommunicationOperation(params) {
|
|
10438
10500
|
const { context, body, tableName } = params;
|
|
10439
10501
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
10440
|
-
const id = body.id ??
|
|
10502
|
+
const id = body.id ?? ulid19();
|
|
10441
10503
|
const meta = {
|
|
10442
10504
|
...body.meta ?? {},
|
|
10443
10505
|
lastUpdated: date,
|
|
@@ -10633,11 +10695,11 @@ router30.delete("/:id", deleteCommunicationRoute);
|
|
|
10633
10695
|
import express31 from "express";
|
|
10634
10696
|
|
|
10635
10697
|
// src/data/operations/data/communicationrequest/communicationrequest-create-operation.ts
|
|
10636
|
-
import { ulid as
|
|
10698
|
+
import { ulid as ulid20 } from "ulid";
|
|
10637
10699
|
async function createCommunicationRequestOperation(params) {
|
|
10638
10700
|
const { context, body, tableName } = params;
|
|
10639
10701
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
10640
|
-
const id = body.id ??
|
|
10702
|
+
const id = body.id ?? ulid20();
|
|
10641
10703
|
const meta = {
|
|
10642
10704
|
...body.meta ?? {},
|
|
10643
10705
|
lastUpdated: date,
|
|
@@ -10844,11 +10906,11 @@ router31.delete("/:id", deleteCommunicationRequestRoute);
|
|
|
10844
10906
|
import express32 from "express";
|
|
10845
10907
|
|
|
10846
10908
|
// src/data/operations/data/compartmentdefinition/compartmentdefinition-create-operation.ts
|
|
10847
|
-
import { ulid as
|
|
10909
|
+
import { ulid as ulid21 } from "ulid";
|
|
10848
10910
|
async function createCompartmentDefinitionOperation(params) {
|
|
10849
10911
|
const { context, body, tableName } = params;
|
|
10850
10912
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
10851
|
-
const id = body.id ??
|
|
10913
|
+
const id = body.id ?? ulid21();
|
|
10852
10914
|
const meta = {
|
|
10853
10915
|
...body.meta ?? {},
|
|
10854
10916
|
lastUpdated: date,
|
|
@@ -11063,11 +11125,11 @@ router32.delete("/:id", deleteCompartmentDefinitionRoute);
|
|
|
11063
11125
|
import express33 from "express";
|
|
11064
11126
|
|
|
11065
11127
|
// src/data/operations/data/composition/composition-create-operation.ts
|
|
11066
|
-
import { ulid as
|
|
11128
|
+
import { ulid as ulid22 } from "ulid";
|
|
11067
11129
|
async function createCompositionOperation(params) {
|
|
11068
11130
|
const { context, body, tableName } = params;
|
|
11069
11131
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
11070
|
-
const id = body.id ??
|
|
11132
|
+
const id = body.id ?? ulid22();
|
|
11071
11133
|
const meta = {
|
|
11072
11134
|
...body.meta ?? {},
|
|
11073
11135
|
lastUpdated: date,
|
|
@@ -11359,11 +11421,11 @@ router33.delete("/:id", deleteCompositionRoute);
|
|
|
11359
11421
|
import express34 from "express";
|
|
11360
11422
|
|
|
11361
11423
|
// src/data/operations/data/conceptmap/conceptmap-create-operation.ts
|
|
11362
|
-
import { ulid as
|
|
11424
|
+
import { ulid as ulid23 } from "ulid";
|
|
11363
11425
|
async function createConceptMapOperation(params) {
|
|
11364
11426
|
const { context, body, tableName } = params;
|
|
11365
11427
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
11366
|
-
const id = body.id ??
|
|
11428
|
+
const id = body.id ?? ulid23();
|
|
11367
11429
|
const meta = {
|
|
11368
11430
|
...body.meta ?? {},
|
|
11369
11431
|
lastUpdated: date,
|
|
@@ -11558,41 +11620,6 @@ router34.delete("/:id", deleteConceptMapRoute);
|
|
|
11558
11620
|
// src/data/rest-api/routes/data/condition/condition.ts
|
|
11559
11621
|
import express35 from "express";
|
|
11560
11622
|
|
|
11561
|
-
// src/data/operations/data/condition/condition-create-operation.ts
|
|
11562
|
-
import { ulid as ulid26 } from "ulid";
|
|
11563
|
-
async function createConditionOperation(params) {
|
|
11564
|
-
const { context, body, tableName } = params;
|
|
11565
|
-
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
11566
|
-
const id = body.id ?? ulid26();
|
|
11567
|
-
const meta = {
|
|
11568
|
-
...body.meta ?? {},
|
|
11569
|
-
lastUpdated: date,
|
|
11570
|
-
versionId: "1"
|
|
11571
|
-
};
|
|
11572
|
-
const resourceWithAudit = {
|
|
11573
|
-
...body,
|
|
11574
|
-
resourceType: "Condition",
|
|
11575
|
-
id,
|
|
11576
|
-
meta: mergeAuditIntoMeta(meta, {
|
|
11577
|
-
createdDate: date,
|
|
11578
|
-
createdById: actorId,
|
|
11579
|
-
createdByName: actorName,
|
|
11580
|
-
modifiedDate: date,
|
|
11581
|
-
modifiedById: actorId,
|
|
11582
|
-
modifiedByName: actorName
|
|
11583
|
-
})
|
|
11584
|
-
};
|
|
11585
|
-
const service = getDynamoDataService(tableName);
|
|
11586
|
-
return createDataEntityRecord(
|
|
11587
|
-
service.entities.condition,
|
|
11588
|
-
tenantId,
|
|
11589
|
-
workspaceId,
|
|
11590
|
-
id,
|
|
11591
|
-
resourceWithAudit,
|
|
11592
|
-
date
|
|
11593
|
-
);
|
|
11594
|
-
}
|
|
11595
|
-
|
|
11596
11623
|
// src/data/rest-api/routes/data/condition/condition-create-route.ts
|
|
11597
11624
|
async function createConditionRoute(req, res) {
|
|
11598
11625
|
const bodyResult = requireJsonBodyAs(req, res);
|
|
@@ -11852,11 +11879,11 @@ router35.delete("/:id", deleteConditionRoute);
|
|
|
11852
11879
|
import express36 from "express";
|
|
11853
11880
|
|
|
11854
11881
|
// src/data/operations/data/consent/consent-create-operation.ts
|
|
11855
|
-
import { ulid as
|
|
11882
|
+
import { ulid as ulid24 } from "ulid";
|
|
11856
11883
|
async function createConsentOperation(params) {
|
|
11857
11884
|
const { context, body, tableName } = params;
|
|
11858
11885
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
11859
|
-
const id = body.id ??
|
|
11886
|
+
const id = body.id ?? ulid24();
|
|
11860
11887
|
const meta = {
|
|
11861
11888
|
...body.meta ?? {},
|
|
11862
11889
|
lastUpdated: date,
|
|
@@ -12052,11 +12079,11 @@ router36.delete("/:id", deleteConsentRoute);
|
|
|
12052
12079
|
import express37 from "express";
|
|
12053
12080
|
|
|
12054
12081
|
// src/data/operations/data/contract/contract-create-operation.ts
|
|
12055
|
-
import { ulid as
|
|
12082
|
+
import { ulid as ulid25 } from "ulid";
|
|
12056
12083
|
async function createContractOperation(params) {
|
|
12057
12084
|
const { context, body, tableName } = params;
|
|
12058
12085
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
12059
|
-
const id = body.id ??
|
|
12086
|
+
const id = body.id ?? ulid25();
|
|
12060
12087
|
const meta = {
|
|
12061
12088
|
...body.meta ?? {},
|
|
12062
12089
|
lastUpdated: date,
|
|
@@ -12251,41 +12278,6 @@ router37.delete("/:id", deleteContractRoute);
|
|
|
12251
12278
|
// src/data/rest-api/routes/data/coverage/coverage.ts
|
|
12252
12279
|
import express38 from "express";
|
|
12253
12280
|
|
|
12254
|
-
// src/data/operations/data/coverage/coverage-create-operation.ts
|
|
12255
|
-
import { ulid as ulid29 } from "ulid";
|
|
12256
|
-
async function createCoverageOperation(params) {
|
|
12257
|
-
const { context, body, tableName } = params;
|
|
12258
|
-
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
12259
|
-
const id = body.id ?? ulid29();
|
|
12260
|
-
const meta = {
|
|
12261
|
-
...body.meta ?? {},
|
|
12262
|
-
lastUpdated: date,
|
|
12263
|
-
versionId: "1"
|
|
12264
|
-
};
|
|
12265
|
-
const resourceWithAudit = {
|
|
12266
|
-
...body,
|
|
12267
|
-
resourceType: "Coverage",
|
|
12268
|
-
id,
|
|
12269
|
-
meta: mergeAuditIntoMeta(meta, {
|
|
12270
|
-
createdDate: date,
|
|
12271
|
-
createdById: actorId,
|
|
12272
|
-
createdByName: actorName,
|
|
12273
|
-
modifiedDate: date,
|
|
12274
|
-
modifiedById: actorId,
|
|
12275
|
-
modifiedByName: actorName
|
|
12276
|
-
})
|
|
12277
|
-
};
|
|
12278
|
-
const service = getDynamoDataService(tableName);
|
|
12279
|
-
return createDataEntityRecord(
|
|
12280
|
-
service.entities.coverage,
|
|
12281
|
-
tenantId,
|
|
12282
|
-
workspaceId,
|
|
12283
|
-
id,
|
|
12284
|
-
resourceWithAudit,
|
|
12285
|
-
date
|
|
12286
|
-
);
|
|
12287
|
-
}
|
|
12288
|
-
|
|
12289
12281
|
// src/data/rest-api/routes/data/coverage/coverage-create-route.ts
|
|
12290
12282
|
async function createCoverageRoute(req, res) {
|
|
12291
12283
|
const bodyResult = requireJsonBodyAs(req, res);
|
|
@@ -12560,11 +12552,11 @@ router38.delete("/:id", deleteCoverageRoute);
|
|
|
12560
12552
|
import express39 from "express";
|
|
12561
12553
|
|
|
12562
12554
|
// src/data/operations/data/coverageeligibilityrequest/coverageeligibilityrequest-create-operation.ts
|
|
12563
|
-
import { ulid as
|
|
12555
|
+
import { ulid as ulid26 } from "ulid";
|
|
12564
12556
|
async function createCoverageEligibilityRequestOperation(params) {
|
|
12565
12557
|
const { context, body, tableName } = params;
|
|
12566
12558
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
12567
|
-
const id = body.id ??
|
|
12559
|
+
const id = body.id ?? ulid26();
|
|
12568
12560
|
const meta = {
|
|
12569
12561
|
...body.meta ?? {},
|
|
12570
12562
|
lastUpdated: date,
|
|
@@ -12779,11 +12771,11 @@ router39.delete("/:id", deleteCoverageEligibilityRequestRoute);
|
|
|
12779
12771
|
import express40 from "express";
|
|
12780
12772
|
|
|
12781
12773
|
// src/data/operations/data/coverageeligibilityresponse/coverageeligibilityresponse-create-operation.ts
|
|
12782
|
-
import { ulid as
|
|
12774
|
+
import { ulid as ulid27 } from "ulid";
|
|
12783
12775
|
async function createCoverageEligibilityResponseOperation(params) {
|
|
12784
12776
|
const { context, body, tableName } = params;
|
|
12785
12777
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
12786
|
-
const id = body.id ??
|
|
12778
|
+
const id = body.id ?? ulid27();
|
|
12787
12779
|
const meta = {
|
|
12788
12780
|
...body.meta ?? {},
|
|
12789
12781
|
lastUpdated: date,
|
|
@@ -12998,11 +12990,11 @@ router40.delete("/:id", deleteCoverageEligibilityResponseRoute);
|
|
|
12998
12990
|
import express41 from "express";
|
|
12999
12991
|
|
|
13000
12992
|
// src/data/operations/data/detectedissue/detectedissue-create-operation.ts
|
|
13001
|
-
import { ulid as
|
|
12993
|
+
import { ulid as ulid28 } from "ulid";
|
|
13002
12994
|
async function createDetectedIssueOperation(params) {
|
|
13003
12995
|
const { context, body, tableName } = params;
|
|
13004
12996
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
13005
|
-
const id = body.id ??
|
|
12997
|
+
const id = body.id ?? ulid28();
|
|
13006
12998
|
const meta = {
|
|
13007
12999
|
...body.meta ?? {},
|
|
13008
13000
|
lastUpdated: date,
|
|
@@ -13198,11 +13190,11 @@ router41.delete("/:id", deleteDetectedIssueRoute);
|
|
|
13198
13190
|
import express42 from "express";
|
|
13199
13191
|
|
|
13200
13192
|
// src/data/operations/data/device/device-create-operation.ts
|
|
13201
|
-
import { ulid as
|
|
13193
|
+
import { ulid as ulid29 } from "ulid";
|
|
13202
13194
|
async function createDeviceOperation(params) {
|
|
13203
13195
|
const { context, body, tableName } = params;
|
|
13204
13196
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
13205
|
-
const id = body.id ??
|
|
13197
|
+
const id = body.id ?? ulid29();
|
|
13206
13198
|
const meta = {
|
|
13207
13199
|
...body.meta ?? {},
|
|
13208
13200
|
lastUpdated: date,
|
|
@@ -13398,11 +13390,11 @@ router42.delete("/:id", deleteDeviceRoute);
|
|
|
13398
13390
|
import express43 from "express";
|
|
13399
13391
|
|
|
13400
13392
|
// src/data/operations/data/devicedefinition/devicedefinition-create-operation.ts
|
|
13401
|
-
import { ulid as
|
|
13393
|
+
import { ulid as ulid30 } from "ulid";
|
|
13402
13394
|
async function createDeviceDefinitionOperation(params) {
|
|
13403
13395
|
const { context, body, tableName } = params;
|
|
13404
13396
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
13405
|
-
const id = body.id ??
|
|
13397
|
+
const id = body.id ?? ulid30();
|
|
13406
13398
|
const meta = {
|
|
13407
13399
|
...body.meta ?? {},
|
|
13408
13400
|
lastUpdated: date,
|
|
@@ -13598,11 +13590,11 @@ router43.delete("/:id", deleteDeviceDefinitionRoute);
|
|
|
13598
13590
|
import express44 from "express";
|
|
13599
13591
|
|
|
13600
13592
|
// src/data/operations/data/devicemetric/devicemetric-create-operation.ts
|
|
13601
|
-
import { ulid as
|
|
13593
|
+
import { ulid as ulid31 } from "ulid";
|
|
13602
13594
|
async function createDeviceMetricOperation(params) {
|
|
13603
13595
|
const { context, body, tableName } = params;
|
|
13604
13596
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
13605
|
-
const id = body.id ??
|
|
13597
|
+
const id = body.id ?? ulid31();
|
|
13606
13598
|
const meta = {
|
|
13607
13599
|
...body.meta ?? {},
|
|
13608
13600
|
lastUpdated: date,
|
|
@@ -13798,11 +13790,11 @@ router44.delete("/:id", deleteDeviceMetricRoute);
|
|
|
13798
13790
|
import express45 from "express";
|
|
13799
13791
|
|
|
13800
13792
|
// src/data/operations/data/devicerequest/devicerequest-create-operation.ts
|
|
13801
|
-
import { ulid as
|
|
13793
|
+
import { ulid as ulid32 } from "ulid";
|
|
13802
13794
|
async function createDeviceRequestOperation(params) {
|
|
13803
13795
|
const { context, body, tableName } = params;
|
|
13804
13796
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
13805
|
-
const id = body.id ??
|
|
13797
|
+
const id = body.id ?? ulid32();
|
|
13806
13798
|
const meta = {
|
|
13807
13799
|
...body.meta ?? {},
|
|
13808
13800
|
lastUpdated: date,
|
|
@@ -13998,11 +13990,11 @@ router45.delete("/:id", deleteDeviceRequestRoute);
|
|
|
13998
13990
|
import express46 from "express";
|
|
13999
13991
|
|
|
14000
13992
|
// src/data/operations/data/deviceusestatement/deviceusestatement-create-operation.ts
|
|
14001
|
-
import { ulid as
|
|
13993
|
+
import { ulid as ulid33 } from "ulid";
|
|
14002
13994
|
async function createDeviceUseStatementOperation(params) {
|
|
14003
13995
|
const { context, body, tableName } = params;
|
|
14004
13996
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
14005
|
-
const id = body.id ??
|
|
13997
|
+
const id = body.id ?? ulid33();
|
|
14006
13998
|
const meta = {
|
|
14007
13999
|
...body.meta ?? {},
|
|
14008
14000
|
lastUpdated: date,
|
|
@@ -14205,11 +14197,11 @@ router46.delete("/:id", deleteDeviceUseStatementRoute);
|
|
|
14205
14197
|
import express47 from "express";
|
|
14206
14198
|
|
|
14207
14199
|
// src/data/operations/data/diagnosticreport/diagnosticreport-create-operation.ts
|
|
14208
|
-
import { ulid as
|
|
14200
|
+
import { ulid as ulid34 } from "ulid";
|
|
14209
14201
|
async function createDiagnosticReportOperation(params) {
|
|
14210
14202
|
const { context, body, tableName } = params;
|
|
14211
14203
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
14212
|
-
const id = body.id ??
|
|
14204
|
+
const id = body.id ?? ulid34();
|
|
14213
14205
|
const meta = {
|
|
14214
14206
|
...body.meta ?? {},
|
|
14215
14207
|
lastUpdated: date,
|
|
@@ -14512,11 +14504,11 @@ router47.delete("/:id", deleteDiagnosticReportRoute);
|
|
|
14512
14504
|
import express48 from "express";
|
|
14513
14505
|
|
|
14514
14506
|
// src/data/operations/data/documentmanifest/documentmanifest-create-operation.ts
|
|
14515
|
-
import { ulid as
|
|
14507
|
+
import { ulid as ulid35 } from "ulid";
|
|
14516
14508
|
async function createDocumentManifestOperation(params) {
|
|
14517
14509
|
const { context, body, tableName } = params;
|
|
14518
14510
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
14519
|
-
const id = body.id ??
|
|
14511
|
+
const id = body.id ?? ulid35();
|
|
14520
14512
|
const meta = {
|
|
14521
14513
|
...body.meta ?? {},
|
|
14522
14514
|
lastUpdated: date,
|
|
@@ -14819,11 +14811,11 @@ router48.delete("/:id", deleteDocumentManifestRoute);
|
|
|
14819
14811
|
import express49 from "express";
|
|
14820
14812
|
|
|
14821
14813
|
// src/data/operations/data/documentreference/documentreference-create-operation.ts
|
|
14822
|
-
import { ulid as
|
|
14814
|
+
import { ulid as ulid36 } from "ulid";
|
|
14823
14815
|
async function createDocumentReferenceOperation(params) {
|
|
14824
14816
|
const { context, body, tableName } = params;
|
|
14825
14817
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
14826
|
-
const id = body.id ??
|
|
14818
|
+
const id = body.id ?? ulid36();
|
|
14827
14819
|
const meta = {
|
|
14828
14820
|
...body.meta ?? {},
|
|
14829
14821
|
lastUpdated: date,
|
|
@@ -15129,11 +15121,11 @@ router49.delete("/:id", deleteDocumentReferenceRoute);
|
|
|
15129
15121
|
import express50 from "express";
|
|
15130
15122
|
|
|
15131
15123
|
// src/data/operations/data/effectevidencesynthesis/effectevidencesynthesis-create-operation.ts
|
|
15132
|
-
import { ulid as
|
|
15124
|
+
import { ulid as ulid37 } from "ulid";
|
|
15133
15125
|
async function createEffectEvidenceSynthesisOperation(params) {
|
|
15134
15126
|
const { context, body, tableName } = params;
|
|
15135
15127
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
15136
|
-
const id = body.id ??
|
|
15128
|
+
const id = body.id ?? ulid37();
|
|
15137
15129
|
const meta = {
|
|
15138
15130
|
...body.meta ?? {},
|
|
15139
15131
|
lastUpdated: date,
|
|
@@ -15611,11 +15603,11 @@ router51.delete("/:id", deleteEncounterRoute);
|
|
|
15611
15603
|
import express52 from "express";
|
|
15612
15604
|
|
|
15613
15605
|
// src/data/operations/data/endpoint/endpoint-create-operation.ts
|
|
15614
|
-
import { ulid as
|
|
15606
|
+
import { ulid as ulid38 } from "ulid";
|
|
15615
15607
|
async function createEndpointOperation(params) {
|
|
15616
15608
|
const { context, body, tableName } = params;
|
|
15617
15609
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
15618
|
-
const id = body.id ??
|
|
15610
|
+
const id = body.id ?? ulid38();
|
|
15619
15611
|
const meta = {
|
|
15620
15612
|
...body.meta ?? {},
|
|
15621
15613
|
lastUpdated: date,
|
|
@@ -15907,11 +15899,11 @@ router52.delete("/:id", deleteEndpointRoute);
|
|
|
15907
15899
|
import express53 from "express";
|
|
15908
15900
|
|
|
15909
15901
|
// src/data/operations/data/enrollmentrequest/enrollmentrequest-create-operation.ts
|
|
15910
|
-
import { ulid as
|
|
15902
|
+
import { ulid as ulid39 } from "ulid";
|
|
15911
15903
|
async function createEnrollmentRequestOperation(params) {
|
|
15912
15904
|
const { context, body, tableName } = params;
|
|
15913
15905
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
15914
|
-
const id = body.id ??
|
|
15906
|
+
const id = body.id ?? ulid39();
|
|
15915
15907
|
const meta = {
|
|
15916
15908
|
...body.meta ?? {},
|
|
15917
15909
|
lastUpdated: date,
|
|
@@ -16110,11 +16102,11 @@ router53.delete("/:id", deleteEnrollmentRequestRoute);
|
|
|
16110
16102
|
import express54 from "express";
|
|
16111
16103
|
|
|
16112
16104
|
// src/data/operations/data/enrollmentresponse/enrollmentresponse-create-operation.ts
|
|
16113
|
-
import { ulid as
|
|
16105
|
+
import { ulid as ulid40 } from "ulid";
|
|
16114
16106
|
async function createEnrollmentResponseOperation(params) {
|
|
16115
16107
|
const { context, body, tableName } = params;
|
|
16116
16108
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
16117
|
-
const id = body.id ??
|
|
16109
|
+
const id = body.id ?? ulid40();
|
|
16118
16110
|
const meta = {
|
|
16119
16111
|
...body.meta ?? {},
|
|
16120
16112
|
lastUpdated: date,
|
|
@@ -16317,11 +16309,11 @@ router54.delete("/:id", deleteEnrollmentResponseRoute);
|
|
|
16317
16309
|
import express55 from "express";
|
|
16318
16310
|
|
|
16319
16311
|
// src/data/operations/data/episodeofcare/episodeofcare-create-operation.ts
|
|
16320
|
-
import { ulid as
|
|
16312
|
+
import { ulid as ulid41 } from "ulid";
|
|
16321
16313
|
async function createEpisodeOfCareOperation(params) {
|
|
16322
16314
|
const { context, body, tableName } = params;
|
|
16323
16315
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
16324
|
-
const id = body.id ??
|
|
16316
|
+
const id = body.id ?? ulid41();
|
|
16325
16317
|
const meta = {
|
|
16326
16318
|
...body.meta ?? {},
|
|
16327
16319
|
lastUpdated: date,
|
|
@@ -16517,11 +16509,11 @@ router55.delete("/:id", deleteEpisodeOfCareRoute);
|
|
|
16517
16509
|
import express56 from "express";
|
|
16518
16510
|
|
|
16519
16511
|
// src/data/operations/data/eventdefinition/eventdefinition-create-operation.ts
|
|
16520
|
-
import { ulid as
|
|
16512
|
+
import { ulid as ulid42 } from "ulid";
|
|
16521
16513
|
async function createEventDefinitionOperation(params) {
|
|
16522
16514
|
const { context, body, tableName } = params;
|
|
16523
16515
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
16524
|
-
const id = body.id ??
|
|
16516
|
+
const id = body.id ?? ulid42();
|
|
16525
16517
|
const meta = {
|
|
16526
16518
|
...body.meta ?? {},
|
|
16527
16519
|
lastUpdated: date,
|
|
@@ -16717,11 +16709,11 @@ router56.delete("/:id", deleteEventDefinitionRoute);
|
|
|
16717
16709
|
import express57 from "express";
|
|
16718
16710
|
|
|
16719
16711
|
// src/data/operations/data/evidence/evidence-create-operation.ts
|
|
16720
|
-
import { ulid as
|
|
16712
|
+
import { ulid as ulid43 } from "ulid";
|
|
16721
16713
|
async function createEvidenceOperation(params) {
|
|
16722
16714
|
const { context, body, tableName } = params;
|
|
16723
16715
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
16724
|
-
const id = body.id ??
|
|
16716
|
+
const id = body.id ?? ulid43();
|
|
16725
16717
|
const meta = {
|
|
16726
16718
|
...body.meta ?? {},
|
|
16727
16719
|
lastUpdated: date,
|
|
@@ -16917,11 +16909,11 @@ router57.delete("/:id", deleteEvidenceRoute);
|
|
|
16917
16909
|
import express58 from "express";
|
|
16918
16910
|
|
|
16919
16911
|
// src/data/operations/data/evidencevariable/evidencevariable-create-operation.ts
|
|
16920
|
-
import { ulid as
|
|
16912
|
+
import { ulid as ulid44 } from "ulid";
|
|
16921
16913
|
async function createEvidenceVariableOperation(params) {
|
|
16922
16914
|
const { context, body, tableName } = params;
|
|
16923
16915
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
16924
|
-
const id = body.id ??
|
|
16916
|
+
const id = body.id ?? ulid44();
|
|
16925
16917
|
const meta = {
|
|
16926
16918
|
...body.meta ?? {},
|
|
16927
16919
|
lastUpdated: date,
|
|
@@ -17117,11 +17109,11 @@ router58.delete("/:id", deleteEvidenceVariableRoute);
|
|
|
17117
17109
|
import express59 from "express";
|
|
17118
17110
|
|
|
17119
17111
|
// src/data/operations/data/examplescenario/examplescenario-create-operation.ts
|
|
17120
|
-
import { ulid as
|
|
17112
|
+
import { ulid as ulid45 } from "ulid";
|
|
17121
17113
|
async function createExampleScenarioOperation(params) {
|
|
17122
17114
|
const { context, body, tableName } = params;
|
|
17123
17115
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
17124
|
-
const id = body.id ??
|
|
17116
|
+
const id = body.id ?? ulid45();
|
|
17125
17117
|
const meta = {
|
|
17126
17118
|
...body.meta ?? {},
|
|
17127
17119
|
lastUpdated: date,
|
|
@@ -17317,11 +17309,11 @@ router59.delete("/:id", deleteExampleScenarioRoute);
|
|
|
17317
17309
|
import express60 from "express";
|
|
17318
17310
|
|
|
17319
17311
|
// src/data/operations/data/explanationofbenefit/explanationofbenefit-create-operation.ts
|
|
17320
|
-
import { ulid as
|
|
17312
|
+
import { ulid as ulid46 } from "ulid";
|
|
17321
17313
|
async function createExplanationOfBenefitOperation(params) {
|
|
17322
17314
|
const { context, body, tableName } = params;
|
|
17323
17315
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
17324
|
-
const id = body.id ??
|
|
17316
|
+
const id = body.id ?? ulid46();
|
|
17325
17317
|
const meta = {
|
|
17326
17318
|
...body.meta ?? {},
|
|
17327
17319
|
lastUpdated: date,
|
|
@@ -17635,11 +17627,11 @@ router60.delete("/:id", deleteExplanationOfBenefitRoute);
|
|
|
17635
17627
|
import express61 from "express";
|
|
17636
17628
|
|
|
17637
17629
|
// src/data/operations/data/familymemberhistory/familymemberhistory-create-operation.ts
|
|
17638
|
-
import { ulid as
|
|
17630
|
+
import { ulid as ulid47 } from "ulid";
|
|
17639
17631
|
async function createFamilyMemberHistoryOperation(params) {
|
|
17640
17632
|
const { context, body, tableName } = params;
|
|
17641
17633
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
17642
|
-
const id = body.id ??
|
|
17634
|
+
const id = body.id ?? ulid47();
|
|
17643
17635
|
const meta = {
|
|
17644
17636
|
...body.meta ?? {},
|
|
17645
17637
|
lastUpdated: date,
|
|
@@ -17946,11 +17938,11 @@ router61.delete("/:id", deleteFamilyMemberHistoryRoute);
|
|
|
17946
17938
|
import express62 from "express";
|
|
17947
17939
|
|
|
17948
17940
|
// src/data/operations/data/flag/flag-create-operation.ts
|
|
17949
|
-
import { ulid as
|
|
17941
|
+
import { ulid as ulid48 } from "ulid";
|
|
17950
17942
|
async function createFlagOperation(params) {
|
|
17951
17943
|
const { context, body, tableName } = params;
|
|
17952
17944
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
17953
|
-
const id = body.id ??
|
|
17945
|
+
const id = body.id ?? ulid48();
|
|
17954
17946
|
const meta = {
|
|
17955
17947
|
...body.meta ?? {},
|
|
17956
17948
|
lastUpdated: date,
|
|
@@ -18146,11 +18138,11 @@ router62.delete("/:id", deleteFlagRoute);
|
|
|
18146
18138
|
import express63 from "express";
|
|
18147
18139
|
|
|
18148
18140
|
// src/data/operations/data/goal/goal-create-operation.ts
|
|
18149
|
-
import { ulid as
|
|
18141
|
+
import { ulid as ulid49 } from "ulid";
|
|
18150
18142
|
async function createGoalOperation(params) {
|
|
18151
18143
|
const { context, body, tableName } = params;
|
|
18152
18144
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
18153
|
-
const id = body.id ??
|
|
18145
|
+
const id = body.id ?? ulid49();
|
|
18154
18146
|
const meta = {
|
|
18155
18147
|
...body.meta ?? {},
|
|
18156
18148
|
lastUpdated: date,
|
|
@@ -18346,11 +18338,11 @@ router63.delete("/:id", deleteGoalRoute);
|
|
|
18346
18338
|
import express64 from "express";
|
|
18347
18339
|
|
|
18348
18340
|
// src/data/operations/data/graphdefinition/graphdefinition-create-operation.ts
|
|
18349
|
-
import { ulid as
|
|
18341
|
+
import { ulid as ulid50 } from "ulid";
|
|
18350
18342
|
async function createGraphDefinitionOperation(params) {
|
|
18351
18343
|
const { context, body, tableName } = params;
|
|
18352
18344
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
18353
|
-
const id = body.id ??
|
|
18345
|
+
const id = body.id ?? ulid50();
|
|
18354
18346
|
const meta = {
|
|
18355
18347
|
...body.meta ?? {},
|
|
18356
18348
|
lastUpdated: date,
|
|
@@ -18546,11 +18538,11 @@ router64.delete("/:id", deleteGraphDefinitionRoute);
|
|
|
18546
18538
|
import express65 from "express";
|
|
18547
18539
|
|
|
18548
18540
|
// src/data/operations/data/group/group-create-operation.ts
|
|
18549
|
-
import { ulid as
|
|
18541
|
+
import { ulid as ulid51 } from "ulid";
|
|
18550
18542
|
async function createGroupOperation(params) {
|
|
18551
18543
|
const { context, body, tableName } = params;
|
|
18552
18544
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
18553
|
-
const id = body.id ??
|
|
18545
|
+
const id = body.id ?? ulid51();
|
|
18554
18546
|
const meta = {
|
|
18555
18547
|
...body.meta ?? {},
|
|
18556
18548
|
lastUpdated: date,
|
|
@@ -18746,11 +18738,11 @@ router65.delete("/:id", deleteGroupRoute);
|
|
|
18746
18738
|
import express66 from "express";
|
|
18747
18739
|
|
|
18748
18740
|
// src/data/operations/data/guidanceresponse/guidanceresponse-create-operation.ts
|
|
18749
|
-
import { ulid as
|
|
18741
|
+
import { ulid as ulid52 } from "ulid";
|
|
18750
18742
|
async function createGuidanceResponseOperation(params) {
|
|
18751
18743
|
const { context, body, tableName } = params;
|
|
18752
18744
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
18753
|
-
const id = body.id ??
|
|
18745
|
+
const id = body.id ?? ulid52();
|
|
18754
18746
|
const meta = {
|
|
18755
18747
|
...body.meta ?? {},
|
|
18756
18748
|
lastUpdated: date,
|
|
@@ -18946,11 +18938,11 @@ router66.delete("/:id", deleteGuidanceResponseRoute);
|
|
|
18946
18938
|
import express67 from "express";
|
|
18947
18939
|
|
|
18948
18940
|
// src/data/operations/data/healthcareservice/healthcareservice-create-operation.ts
|
|
18949
|
-
import { ulid as
|
|
18941
|
+
import { ulid as ulid53 } from "ulid";
|
|
18950
18942
|
async function createHealthcareServiceOperation(params) {
|
|
18951
18943
|
const { context, body, tableName } = params;
|
|
18952
18944
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
18953
|
-
const id = body.id ??
|
|
18945
|
+
const id = body.id ?? ulid53();
|
|
18954
18946
|
const meta = {
|
|
18955
18947
|
...body.meta ?? {},
|
|
18956
18948
|
lastUpdated: date,
|
|
@@ -19149,11 +19141,11 @@ router67.delete("/:id", deleteHealthcareServiceRoute);
|
|
|
19149
19141
|
import express68 from "express";
|
|
19150
19142
|
|
|
19151
19143
|
// src/data/operations/data/imagingstudy/imagingstudy-create-operation.ts
|
|
19152
|
-
import { ulid as
|
|
19144
|
+
import { ulid as ulid54 } from "ulid";
|
|
19153
19145
|
async function createImagingStudyOperation(params) {
|
|
19154
19146
|
const { context, body, tableName } = params;
|
|
19155
19147
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
19156
|
-
const id = body.id ??
|
|
19148
|
+
const id = body.id ?? ulid54();
|
|
19157
19149
|
const meta = {
|
|
19158
19150
|
...body.meta ?? {},
|
|
19159
19151
|
lastUpdated: date,
|
|
@@ -19445,11 +19437,11 @@ router68.delete("/:id", deleteImagingStudyRoute);
|
|
|
19445
19437
|
import express69 from "express";
|
|
19446
19438
|
|
|
19447
19439
|
// src/data/operations/data/immunization/immunization-create-operation.ts
|
|
19448
|
-
import { ulid as
|
|
19440
|
+
import { ulid as ulid55 } from "ulid";
|
|
19449
19441
|
async function createImmunizationOperation(params) {
|
|
19450
19442
|
const { context, body, tableName } = params;
|
|
19451
19443
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
19452
|
-
const id = body.id ??
|
|
19444
|
+
const id = body.id ?? ulid55();
|
|
19453
19445
|
const meta = {
|
|
19454
19446
|
...body.meta ?? {},
|
|
19455
19447
|
lastUpdated: date,
|
|
@@ -19738,11 +19730,11 @@ router69.delete("/:id", deleteImmunizationRoute);
|
|
|
19738
19730
|
import express70 from "express";
|
|
19739
19731
|
|
|
19740
19732
|
// src/data/operations/data/immunizationevaluation/immunizationevaluation-create-operation.ts
|
|
19741
|
-
import { ulid as
|
|
19733
|
+
import { ulid as ulid56 } from "ulid";
|
|
19742
19734
|
async function createImmunizationEvaluationOperation(params) {
|
|
19743
19735
|
const { context, body, tableName } = params;
|
|
19744
19736
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
19745
|
-
const id = body.id ??
|
|
19737
|
+
const id = body.id ?? ulid56();
|
|
19746
19738
|
const meta = {
|
|
19747
19739
|
...body.meta ?? {},
|
|
19748
19740
|
lastUpdated: date,
|
|
@@ -19957,11 +19949,11 @@ router70.delete("/:id", deleteImmunizationEvaluationRoute);
|
|
|
19957
19949
|
import express71 from "express";
|
|
19958
19950
|
|
|
19959
19951
|
// src/data/operations/data/immunizationrecommendation/immunizationrecommendation-create-operation.ts
|
|
19960
|
-
import { ulid as
|
|
19952
|
+
import { ulid as ulid57 } from "ulid";
|
|
19961
19953
|
async function createImmunizationRecommendationOperation(params) {
|
|
19962
19954
|
const { context, body, tableName } = params;
|
|
19963
19955
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
19964
|
-
const id = body.id ??
|
|
19956
|
+
const id = body.id ?? ulid57();
|
|
19965
19957
|
const meta = {
|
|
19966
19958
|
...body.meta ?? {},
|
|
19967
19959
|
lastUpdated: date,
|
|
@@ -20176,11 +20168,11 @@ router71.delete("/:id", deleteImmunizationRecommendationRoute);
|
|
|
20176
20168
|
import express72 from "express";
|
|
20177
20169
|
|
|
20178
20170
|
// src/data/operations/data/implementationguide/implementationguide-create-operation.ts
|
|
20179
|
-
import { ulid as
|
|
20171
|
+
import { ulid as ulid58 } from "ulid";
|
|
20180
20172
|
async function createImplementationGuideOperation(params) {
|
|
20181
20173
|
const { context, body, tableName } = params;
|
|
20182
20174
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
20183
|
-
const id = body.id ??
|
|
20175
|
+
const id = body.id ?? ulid58();
|
|
20184
20176
|
const meta = {
|
|
20185
20177
|
...body.meta ?? {},
|
|
20186
20178
|
lastUpdated: date,
|
|
@@ -20383,11 +20375,11 @@ router72.delete("/:id", deleteImplementationGuideRoute);
|
|
|
20383
20375
|
import express73 from "express";
|
|
20384
20376
|
|
|
20385
20377
|
// src/data/operations/data/insuranceplan/insuranceplan-create-operation.ts
|
|
20386
|
-
import { ulid as
|
|
20378
|
+
import { ulid as ulid59 } from "ulid";
|
|
20387
20379
|
async function createInsurancePlanOperation(params) {
|
|
20388
20380
|
const { context, body, tableName } = params;
|
|
20389
20381
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
20390
|
-
const id = body.id ??
|
|
20382
|
+
const id = body.id ?? ulid59();
|
|
20391
20383
|
const meta = {
|
|
20392
20384
|
...body.meta ?? {},
|
|
20393
20385
|
lastUpdated: date,
|
|
@@ -20583,11 +20575,11 @@ router73.delete("/:id", deleteInsurancePlanRoute);
|
|
|
20583
20575
|
import express74 from "express";
|
|
20584
20576
|
|
|
20585
20577
|
// src/data/operations/data/invoice/invoice-create-operation.ts
|
|
20586
|
-
import { ulid as
|
|
20578
|
+
import { ulid as ulid60 } from "ulid";
|
|
20587
20579
|
async function createInvoiceOperation(params) {
|
|
20588
20580
|
const { context, body, tableName } = params;
|
|
20589
20581
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
20590
|
-
const id = body.id ??
|
|
20582
|
+
const id = body.id ?? ulid60();
|
|
20591
20583
|
const meta = {
|
|
20592
20584
|
...body.meta ?? {},
|
|
20593
20585
|
lastUpdated: date,
|
|
@@ -20879,11 +20871,11 @@ router74.delete("/:id", deleteInvoiceRoute);
|
|
|
20879
20871
|
import express75 from "express";
|
|
20880
20872
|
|
|
20881
20873
|
// src/data/operations/data/library/library-create-operation.ts
|
|
20882
|
-
import { ulid as
|
|
20874
|
+
import { ulid as ulid61 } from "ulid";
|
|
20883
20875
|
async function createLibraryOperation(params) {
|
|
20884
20876
|
const { context, body, tableName } = params;
|
|
20885
20877
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
20886
|
-
const id = body.id ??
|
|
20878
|
+
const id = body.id ?? ulid61();
|
|
20887
20879
|
const meta = {
|
|
20888
20880
|
...body.meta ?? {},
|
|
20889
20881
|
lastUpdated: date,
|
|
@@ -21079,11 +21071,11 @@ router75.delete("/:id", deleteLibraryRoute);
|
|
|
21079
21071
|
import express76 from "express";
|
|
21080
21072
|
|
|
21081
21073
|
// src/data/operations/data/linkage/linkage-create-operation.ts
|
|
21082
|
-
import { ulid as
|
|
21074
|
+
import { ulid as ulid62 } from "ulid";
|
|
21083
21075
|
async function createLinkageOperation(params) {
|
|
21084
21076
|
const { context, body, tableName } = params;
|
|
21085
21077
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
21086
|
-
const id = body.id ??
|
|
21078
|
+
const id = body.id ?? ulid62();
|
|
21087
21079
|
const meta = {
|
|
21088
21080
|
...body.meta ?? {},
|
|
21089
21081
|
lastUpdated: date,
|
|
@@ -21279,11 +21271,11 @@ router76.delete("/:id", deleteLinkageRoute);
|
|
|
21279
21271
|
import express77 from "express";
|
|
21280
21272
|
|
|
21281
21273
|
// src/data/operations/data/list/list-create-operation.ts
|
|
21282
|
-
import { ulid as
|
|
21274
|
+
import { ulid as ulid63 } from "ulid";
|
|
21283
21275
|
async function createListOperation(params) {
|
|
21284
21276
|
const { context, body, tableName } = params;
|
|
21285
21277
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
21286
|
-
const id = body.id ??
|
|
21278
|
+
const id = body.id ?? ulid63();
|
|
21287
21279
|
const meta = {
|
|
21288
21280
|
...body.meta ?? {},
|
|
21289
21281
|
lastUpdated: date,
|
|
@@ -21478,41 +21470,6 @@ router77.delete("/:id", deleteListRoute);
|
|
|
21478
21470
|
// src/data/rest-api/routes/data/location/location.ts
|
|
21479
21471
|
import express78 from "express";
|
|
21480
21472
|
|
|
21481
|
-
// src/data/operations/data/location/location-create-operation.ts
|
|
21482
|
-
import { ulid as ulid68 } from "ulid";
|
|
21483
|
-
async function createLocationOperation(params) {
|
|
21484
|
-
const { context, body, tableName } = params;
|
|
21485
|
-
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
21486
|
-
const id = body.id ?? ulid68();
|
|
21487
|
-
const meta = {
|
|
21488
|
-
...body.meta ?? {},
|
|
21489
|
-
lastUpdated: date,
|
|
21490
|
-
versionId: "1"
|
|
21491
|
-
};
|
|
21492
|
-
const resourceWithAudit = {
|
|
21493
|
-
...body,
|
|
21494
|
-
resourceType: "Location",
|
|
21495
|
-
id,
|
|
21496
|
-
meta: mergeAuditIntoMeta(meta, {
|
|
21497
|
-
createdDate: date,
|
|
21498
|
-
createdById: actorId,
|
|
21499
|
-
createdByName: actorName,
|
|
21500
|
-
modifiedDate: date,
|
|
21501
|
-
modifiedById: actorId,
|
|
21502
|
-
modifiedByName: actorName
|
|
21503
|
-
})
|
|
21504
|
-
};
|
|
21505
|
-
const service = getDynamoDataService(tableName);
|
|
21506
|
-
return createDataEntityRecord(
|
|
21507
|
-
service.entities.location,
|
|
21508
|
-
tenantId,
|
|
21509
|
-
workspaceId,
|
|
21510
|
-
id,
|
|
21511
|
-
resourceWithAudit,
|
|
21512
|
-
date
|
|
21513
|
-
);
|
|
21514
|
-
}
|
|
21515
|
-
|
|
21516
21473
|
// src/data/rest-api/routes/data/location/location-create-route.ts
|
|
21517
21474
|
async function createLocationRoute(req, res) {
|
|
21518
21475
|
const bodyResult = requireJsonBodyAs(req, res);
|
|
@@ -21775,11 +21732,11 @@ router78.delete("/:id", deleteLocationRoute);
|
|
|
21775
21732
|
import express79 from "express";
|
|
21776
21733
|
|
|
21777
21734
|
// src/data/operations/data/measure/measure-create-operation.ts
|
|
21778
|
-
import { ulid as
|
|
21735
|
+
import { ulid as ulid64 } from "ulid";
|
|
21779
21736
|
async function createMeasureOperation(params) {
|
|
21780
21737
|
const { context, body, tableName } = params;
|
|
21781
21738
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
21782
|
-
const id = body.id ??
|
|
21739
|
+
const id = body.id ?? ulid64();
|
|
21783
21740
|
const meta = {
|
|
21784
21741
|
...body.meta ?? {},
|
|
21785
21742
|
lastUpdated: date,
|
|
@@ -21975,11 +21932,11 @@ router79.delete("/:id", deleteMeasureRoute);
|
|
|
21975
21932
|
import express80 from "express";
|
|
21976
21933
|
|
|
21977
21934
|
// src/data/operations/data/measurereport/measurereport-create-operation.ts
|
|
21978
|
-
import { ulid as
|
|
21935
|
+
import { ulid as ulid65 } from "ulid";
|
|
21979
21936
|
async function createMeasureReportOperation(params) {
|
|
21980
21937
|
const { context, body, tableName } = params;
|
|
21981
21938
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
21982
|
-
const id = body.id ??
|
|
21939
|
+
const id = body.id ?? ulid65();
|
|
21983
21940
|
const meta = {
|
|
21984
21941
|
...body.meta ?? {},
|
|
21985
21942
|
lastUpdated: date,
|
|
@@ -22175,11 +22132,11 @@ router80.delete("/:id", deleteMeasureReportRoute);
|
|
|
22175
22132
|
import express81 from "express";
|
|
22176
22133
|
|
|
22177
22134
|
// src/data/operations/data/media/media-create-operation.ts
|
|
22178
|
-
import { ulid as
|
|
22135
|
+
import { ulid as ulid66 } from "ulid";
|
|
22179
22136
|
async function createMediaOperation(params) {
|
|
22180
22137
|
const { context, body, tableName } = params;
|
|
22181
22138
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
22182
|
-
const id = body.id ??
|
|
22139
|
+
const id = body.id ?? ulid66();
|
|
22183
22140
|
const meta = {
|
|
22184
22141
|
...body.meta ?? {},
|
|
22185
22142
|
lastUpdated: date,
|
|
@@ -22375,11 +22332,11 @@ router81.delete("/:id", deleteMediaRoute);
|
|
|
22375
22332
|
import express82 from "express";
|
|
22376
22333
|
|
|
22377
22334
|
// src/data/operations/data/medication/medication-create-operation.ts
|
|
22378
|
-
import { ulid as
|
|
22335
|
+
import { ulid as ulid67 } from "ulid";
|
|
22379
22336
|
async function createMedicationOperation(params) {
|
|
22380
22337
|
const { context, body, tableName } = params;
|
|
22381
22338
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
22382
|
-
const id = body.id ??
|
|
22339
|
+
const id = body.id ?? ulid67();
|
|
22383
22340
|
const meta = {
|
|
22384
22341
|
...body.meta ?? {},
|
|
22385
22342
|
lastUpdated: date,
|
|
@@ -22575,11 +22532,11 @@ router82.delete("/:id", deleteMedicationRoute);
|
|
|
22575
22532
|
import express83 from "express";
|
|
22576
22533
|
|
|
22577
22534
|
// src/data/operations/data/medicationadministration/medicationadministration-create-operation.ts
|
|
22578
|
-
import { ulid as
|
|
22535
|
+
import { ulid as ulid68 } from "ulid";
|
|
22579
22536
|
async function createMedicationAdministrationOperation(params) {
|
|
22580
22537
|
const { context, body, tableName } = params;
|
|
22581
22538
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
22582
|
-
const id = body.id ??
|
|
22539
|
+
const id = body.id ?? ulid68();
|
|
22583
22540
|
const meta = {
|
|
22584
22541
|
...body.meta ?? {},
|
|
22585
22542
|
lastUpdated: date,
|
|
@@ -22794,11 +22751,11 @@ router83.delete("/:id", deleteMedicationAdministrationRoute);
|
|
|
22794
22751
|
import express84 from "express";
|
|
22795
22752
|
|
|
22796
22753
|
// src/data/operations/data/medicationdispense/medicationdispense-create-operation.ts
|
|
22797
|
-
import { ulid as
|
|
22754
|
+
import { ulid as ulid69 } from "ulid";
|
|
22798
22755
|
async function createMedicationDispenseOperation(params) {
|
|
22799
22756
|
const { context, body, tableName } = params;
|
|
22800
22757
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
22801
|
-
const id = body.id ??
|
|
22758
|
+
const id = body.id ?? ulid69();
|
|
22802
22759
|
const meta = {
|
|
22803
22760
|
...body.meta ?? {},
|
|
22804
22761
|
lastUpdated: date,
|
|
@@ -23001,11 +22958,11 @@ router84.delete("/:id", deleteMedicationDispenseRoute);
|
|
|
23001
22958
|
import express85 from "express";
|
|
23002
22959
|
|
|
23003
22960
|
// src/data/operations/data/medicationknowledge/medicationknowledge-create-operation.ts
|
|
23004
|
-
import { ulid as
|
|
22961
|
+
import { ulid as ulid70 } from "ulid";
|
|
23005
22962
|
async function createMedicationKnowledgeOperation(params) {
|
|
23006
22963
|
const { context, body, tableName } = params;
|
|
23007
22964
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
23008
|
-
const id = body.id ??
|
|
22965
|
+
const id = body.id ?? ulid70();
|
|
23009
22966
|
const meta = {
|
|
23010
22967
|
...body.meta ?? {},
|
|
23011
22968
|
lastUpdated: date,
|
|
@@ -23208,11 +23165,11 @@ router85.delete("/:id", deleteMedicationKnowledgeRoute);
|
|
|
23208
23165
|
import express86 from "express";
|
|
23209
23166
|
|
|
23210
23167
|
// src/data/operations/data/medicationrequest/medicationrequest-create-operation.ts
|
|
23211
|
-
import { ulid as
|
|
23168
|
+
import { ulid as ulid71 } from "ulid";
|
|
23212
23169
|
async function createMedicationRequestOperation(params) {
|
|
23213
23170
|
const { context, body, tableName } = params;
|
|
23214
23171
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
23215
|
-
const id = body.id ??
|
|
23172
|
+
const id = body.id ?? ulid71();
|
|
23216
23173
|
const meta = {
|
|
23217
23174
|
...body.meta ?? {},
|
|
23218
23175
|
lastUpdated: date,
|
|
@@ -23515,11 +23472,11 @@ router86.delete("/:id", deleteMedicationRequestRoute);
|
|
|
23515
23472
|
import express87 from "express";
|
|
23516
23473
|
|
|
23517
23474
|
// src/data/operations/data/medicationstatement/medicationstatement-create-operation.ts
|
|
23518
|
-
import { ulid as
|
|
23475
|
+
import { ulid as ulid72 } from "ulid";
|
|
23519
23476
|
async function createMedicationStatementOperation(params) {
|
|
23520
23477
|
const { context, body, tableName } = params;
|
|
23521
23478
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
23522
|
-
const id = body.id ??
|
|
23479
|
+
const id = body.id ?? ulid72();
|
|
23523
23480
|
const meta = {
|
|
23524
23481
|
...body.meta ?? {},
|
|
23525
23482
|
lastUpdated: date,
|
|
@@ -23826,11 +23783,11 @@ router87.delete("/:id", deleteMedicationStatementRoute);
|
|
|
23826
23783
|
import express88 from "express";
|
|
23827
23784
|
|
|
23828
23785
|
// src/data/operations/data/medicinalproduct/medicinalproduct-create-operation.ts
|
|
23829
|
-
import { ulid as
|
|
23786
|
+
import { ulid as ulid73 } from "ulid";
|
|
23830
23787
|
async function createMedicinalProductOperation(params) {
|
|
23831
23788
|
const { context, body, tableName } = params;
|
|
23832
23789
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
23833
|
-
const id = body.id ??
|
|
23790
|
+
const id = body.id ?? ulid73();
|
|
23834
23791
|
const meta = {
|
|
23835
23792
|
...body.meta ?? {},
|
|
23836
23793
|
lastUpdated: date,
|
|
@@ -24026,11 +23983,11 @@ router88.delete("/:id", deleteMedicinalProductRoute);
|
|
|
24026
23983
|
import express89 from "express";
|
|
24027
23984
|
|
|
24028
23985
|
// src/data/operations/data/medicinalproductauthorization/medicinalproductauthorization-create-operation.ts
|
|
24029
|
-
import { ulid as
|
|
23986
|
+
import { ulid as ulid74 } from "ulid";
|
|
24030
23987
|
async function createMedicinalProductAuthorizationOperation(params) {
|
|
24031
23988
|
const { context, body, tableName } = params;
|
|
24032
23989
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
24033
|
-
const id = body.id ??
|
|
23990
|
+
const id = body.id ?? ulid74();
|
|
24034
23991
|
const meta = {
|
|
24035
23992
|
...body.meta ?? {},
|
|
24036
23993
|
lastUpdated: date,
|
|
@@ -24245,11 +24202,11 @@ router89.delete("/:id", deleteMedicinalProductAuthorizationRoute);
|
|
|
24245
24202
|
import express90 from "express";
|
|
24246
24203
|
|
|
24247
24204
|
// src/data/operations/data/medicinalproductcontraindication/medicinalproductcontraindication-create-operation.ts
|
|
24248
|
-
import { ulid as
|
|
24205
|
+
import { ulid as ulid75 } from "ulid";
|
|
24249
24206
|
async function createMedicinalProductContraindicationOperation(params) {
|
|
24250
24207
|
const { context, body, tableName } = params;
|
|
24251
24208
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
24252
|
-
const id = body.id ??
|
|
24209
|
+
const id = body.id ?? ulid75();
|
|
24253
24210
|
const meta = {
|
|
24254
24211
|
...body.meta ?? {},
|
|
24255
24212
|
lastUpdated: date,
|
|
@@ -24470,11 +24427,11 @@ router90.delete("/:id", deleteMedicinalProductContraindicationRoute);
|
|
|
24470
24427
|
import express91 from "express";
|
|
24471
24428
|
|
|
24472
24429
|
// src/data/operations/data/medicinalproductindication/medicinalproductindication-create-operation.ts
|
|
24473
|
-
import { ulid as
|
|
24430
|
+
import { ulid as ulid76 } from "ulid";
|
|
24474
24431
|
async function createMedicinalProductIndicationOperation(params) {
|
|
24475
24432
|
const { context, body, tableName } = params;
|
|
24476
24433
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
24477
|
-
const id = body.id ??
|
|
24434
|
+
const id = body.id ?? ulid76();
|
|
24478
24435
|
const meta = {
|
|
24479
24436
|
...body.meta ?? {},
|
|
24480
24437
|
lastUpdated: date,
|
|
@@ -24689,11 +24646,11 @@ router91.delete("/:id", deleteMedicinalProductIndicationRoute);
|
|
|
24689
24646
|
import express92 from "express";
|
|
24690
24647
|
|
|
24691
24648
|
// src/data/operations/data/medicinalproductingredient/medicinalproductingredient-create-operation.ts
|
|
24692
|
-
import { ulid as
|
|
24649
|
+
import { ulid as ulid77 } from "ulid";
|
|
24693
24650
|
async function createMedicinalProductIngredientOperation(params) {
|
|
24694
24651
|
const { context, body, tableName } = params;
|
|
24695
24652
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
24696
|
-
const id = body.id ??
|
|
24653
|
+
const id = body.id ?? ulid77();
|
|
24697
24654
|
const meta = {
|
|
24698
24655
|
...body.meta ?? {},
|
|
24699
24656
|
lastUpdated: date,
|
|
@@ -24908,11 +24865,11 @@ router92.delete("/:id", deleteMedicinalProductIngredientRoute);
|
|
|
24908
24865
|
import express93 from "express";
|
|
24909
24866
|
|
|
24910
24867
|
// src/data/operations/data/medicinalproductinteraction/medicinalproductinteraction-create-operation.ts
|
|
24911
|
-
import { ulid as
|
|
24868
|
+
import { ulid as ulid78 } from "ulid";
|
|
24912
24869
|
async function createMedicinalProductInteractionOperation(params) {
|
|
24913
24870
|
const { context, body, tableName } = params;
|
|
24914
24871
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
24915
|
-
const id = body.id ??
|
|
24872
|
+
const id = body.id ?? ulid78();
|
|
24916
24873
|
const meta = {
|
|
24917
24874
|
...body.meta ?? {},
|
|
24918
24875
|
lastUpdated: date,
|
|
@@ -25127,11 +25084,11 @@ router93.delete("/:id", deleteMedicinalProductInteractionRoute);
|
|
|
25127
25084
|
import express94 from "express";
|
|
25128
25085
|
|
|
25129
25086
|
// src/data/operations/data/medicinalproductmanufactured/medicinalproductmanufactured-create-operation.ts
|
|
25130
|
-
import { ulid as
|
|
25087
|
+
import { ulid as ulid79 } from "ulid";
|
|
25131
25088
|
async function createMedicinalProductManufacturedOperation(params) {
|
|
25132
25089
|
const { context, body, tableName } = params;
|
|
25133
25090
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
25134
|
-
const id = body.id ??
|
|
25091
|
+
const id = body.id ?? ulid79();
|
|
25135
25092
|
const meta = {
|
|
25136
25093
|
...body.meta ?? {},
|
|
25137
25094
|
lastUpdated: date,
|
|
@@ -25346,11 +25303,11 @@ router94.delete("/:id", deleteMedicinalProductManufacturedRoute);
|
|
|
25346
25303
|
import express95 from "express";
|
|
25347
25304
|
|
|
25348
25305
|
// src/data/operations/data/medicinalproductpackaged/medicinalproductpackaged-create-operation.ts
|
|
25349
|
-
import { ulid as
|
|
25306
|
+
import { ulid as ulid80 } from "ulid";
|
|
25350
25307
|
async function createMedicinalProductPackagedOperation(params) {
|
|
25351
25308
|
const { context, body, tableName } = params;
|
|
25352
25309
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
25353
|
-
const id = body.id ??
|
|
25310
|
+
const id = body.id ?? ulid80();
|
|
25354
25311
|
const meta = {
|
|
25355
25312
|
...body.meta ?? {},
|
|
25356
25313
|
lastUpdated: date,
|
|
@@ -25565,11 +25522,11 @@ router95.delete("/:id", deleteMedicinalProductPackagedRoute);
|
|
|
25565
25522
|
import express96 from "express";
|
|
25566
25523
|
|
|
25567
25524
|
// src/data/operations/data/medicinalproductpharmaceutical/medicinalproductpharmaceutical-create-operation.ts
|
|
25568
|
-
import { ulid as
|
|
25525
|
+
import { ulid as ulid81 } from "ulid";
|
|
25569
25526
|
async function createMedicinalProductPharmaceuticalOperation(params) {
|
|
25570
25527
|
const { context, body, tableName } = params;
|
|
25571
25528
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
25572
|
-
const id = body.id ??
|
|
25529
|
+
const id = body.id ?? ulid81();
|
|
25573
25530
|
const meta = {
|
|
25574
25531
|
...body.meta ?? {},
|
|
25575
25532
|
lastUpdated: date,
|
|
@@ -25790,11 +25747,11 @@ router96.delete("/:id", deleteMedicinalProductPharmaceuticalRoute);
|
|
|
25790
25747
|
import express97 from "express";
|
|
25791
25748
|
|
|
25792
25749
|
// src/data/operations/data/medicinalproductundesirableeffect/medicinalproductundesirableeffect-create-operation.ts
|
|
25793
|
-
import { ulid as
|
|
25750
|
+
import { ulid as ulid82 } from "ulid";
|
|
25794
25751
|
async function createMedicinalProductUndesirableEffectOperation(params) {
|
|
25795
25752
|
const { context, body, tableName } = params;
|
|
25796
25753
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
25797
|
-
const id = body.id ??
|
|
25754
|
+
const id = body.id ?? ulid82();
|
|
25798
25755
|
const meta = {
|
|
25799
25756
|
...body.meta ?? {},
|
|
25800
25757
|
lastUpdated: date,
|
|
@@ -26018,11 +25975,11 @@ router97.delete("/:id", deleteMedicinalProductUndesirableEffectRoute);
|
|
|
26018
25975
|
import express98 from "express";
|
|
26019
25976
|
|
|
26020
25977
|
// src/data/operations/data/messagedefinition/messagedefinition-create-operation.ts
|
|
26021
|
-
import { ulid as
|
|
25978
|
+
import { ulid as ulid83 } from "ulid";
|
|
26022
25979
|
async function createMessageDefinitionOperation(params) {
|
|
26023
25980
|
const { context, body, tableName } = params;
|
|
26024
25981
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
26025
|
-
const id = body.id ??
|
|
25982
|
+
const id = body.id ?? ulid83();
|
|
26026
25983
|
const meta = {
|
|
26027
25984
|
...body.meta ?? {},
|
|
26028
25985
|
lastUpdated: date,
|
|
@@ -26221,11 +26178,11 @@ router98.delete("/:id", deleteMessageDefinitionRoute);
|
|
|
26221
26178
|
import express99 from "express";
|
|
26222
26179
|
|
|
26223
26180
|
// src/data/operations/data/messageheader/messageheader-create-operation.ts
|
|
26224
|
-
import { ulid as
|
|
26181
|
+
import { ulid as ulid84 } from "ulid";
|
|
26225
26182
|
async function createMessageHeaderOperation(params) {
|
|
26226
26183
|
const { context, body, tableName } = params;
|
|
26227
26184
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
26228
|
-
const id = body.id ??
|
|
26185
|
+
const id = body.id ?? ulid84();
|
|
26229
26186
|
const meta = {
|
|
26230
26187
|
...body.meta ?? {},
|
|
26231
26188
|
lastUpdated: date,
|
|
@@ -26421,11 +26378,11 @@ router99.delete("/:id", deleteMessageHeaderRoute);
|
|
|
26421
26378
|
import express100 from "express";
|
|
26422
26379
|
|
|
26423
26380
|
// src/data/operations/data/molecularsequence/molecularsequence-create-operation.ts
|
|
26424
|
-
import { ulid as
|
|
26381
|
+
import { ulid as ulid85 } from "ulid";
|
|
26425
26382
|
async function createMolecularSequenceOperation(params) {
|
|
26426
26383
|
const { context, body, tableName } = params;
|
|
26427
26384
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
26428
|
-
const id = body.id ??
|
|
26385
|
+
const id = body.id ?? ulid85();
|
|
26429
26386
|
const meta = {
|
|
26430
26387
|
...body.meta ?? {},
|
|
26431
26388
|
lastUpdated: date,
|
|
@@ -26624,11 +26581,11 @@ router100.delete("/:id", deleteMolecularSequenceRoute);
|
|
|
26624
26581
|
import express101 from "express";
|
|
26625
26582
|
|
|
26626
26583
|
// src/data/operations/data/namingsystem/namingsystem-create-operation.ts
|
|
26627
|
-
import { ulid as
|
|
26584
|
+
import { ulid as ulid86 } from "ulid";
|
|
26628
26585
|
async function createNamingSystemOperation(params) {
|
|
26629
26586
|
const { context, body, tableName } = params;
|
|
26630
26587
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
26631
|
-
const id = body.id ??
|
|
26588
|
+
const id = body.id ?? ulid86();
|
|
26632
26589
|
const meta = {
|
|
26633
26590
|
...body.meta ?? {},
|
|
26634
26591
|
lastUpdated: date,
|
|
@@ -26824,11 +26781,11 @@ router101.delete("/:id", deleteNamingSystemRoute);
|
|
|
26824
26781
|
import express102 from "express";
|
|
26825
26782
|
|
|
26826
26783
|
// src/data/operations/data/nutritionorder/nutritionorder-create-operation.ts
|
|
26827
|
-
import { ulid as
|
|
26784
|
+
import { ulid as ulid87 } from "ulid";
|
|
26828
26785
|
async function createNutritionOrderOperation(params) {
|
|
26829
26786
|
const { context, body, tableName } = params;
|
|
26830
26787
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
26831
|
-
const id = body.id ??
|
|
26788
|
+
const id = body.id ?? ulid87();
|
|
26832
26789
|
const meta = {
|
|
26833
26790
|
...body.meta ?? {},
|
|
26834
26791
|
lastUpdated: date,
|
|
@@ -27282,11 +27239,11 @@ router103.delete("/:id", deleteObservationRoute);
|
|
|
27282
27239
|
import express104 from "express";
|
|
27283
27240
|
|
|
27284
27241
|
// src/data/operations/data/observationdefinition/observationdefinition-create-operation.ts
|
|
27285
|
-
import { ulid as
|
|
27242
|
+
import { ulid as ulid88 } from "ulid";
|
|
27286
27243
|
async function createObservationDefinitionOperation(params) {
|
|
27287
27244
|
const { context, body, tableName } = params;
|
|
27288
27245
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
27289
|
-
const id = body.id ??
|
|
27246
|
+
const id = body.id ?? ulid88();
|
|
27290
27247
|
const meta = {
|
|
27291
27248
|
...body.meta ?? {},
|
|
27292
27249
|
lastUpdated: date,
|
|
@@ -27501,11 +27458,11 @@ router104.delete("/:id", deleteObservationDefinitionRoute);
|
|
|
27501
27458
|
import express105 from "express";
|
|
27502
27459
|
|
|
27503
27460
|
// src/data/operations/data/operationdefinition/operationdefinition-create-operation.ts
|
|
27504
|
-
import { ulid as
|
|
27461
|
+
import { ulid as ulid89 } from "ulid";
|
|
27505
27462
|
async function createOperationDefinitionOperation(params) {
|
|
27506
27463
|
const { context, body, tableName } = params;
|
|
27507
27464
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
27508
|
-
const id = body.id ??
|
|
27465
|
+
const id = body.id ?? ulid89();
|
|
27509
27466
|
const meta = {
|
|
27510
27467
|
...body.meta ?? {},
|
|
27511
27468
|
lastUpdated: date,
|
|
@@ -27707,41 +27664,6 @@ router105.delete("/:id", deleteOperationDefinitionRoute);
|
|
|
27707
27664
|
// src/data/rest-api/routes/data/organization/organization.ts
|
|
27708
27665
|
import express106 from "express";
|
|
27709
27666
|
|
|
27710
|
-
// src/data/operations/data/organization/organization-create-operation.ts
|
|
27711
|
-
import { ulid as ulid95 } from "ulid";
|
|
27712
|
-
async function createOrganizationOperation(params) {
|
|
27713
|
-
const { context, body, tableName } = params;
|
|
27714
|
-
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
27715
|
-
const id = body.id ?? ulid95();
|
|
27716
|
-
const meta = {
|
|
27717
|
-
...body.meta ?? {},
|
|
27718
|
-
lastUpdated: date,
|
|
27719
|
-
versionId: "1"
|
|
27720
|
-
};
|
|
27721
|
-
const resourceWithAudit = {
|
|
27722
|
-
...body,
|
|
27723
|
-
resourceType: "Organization",
|
|
27724
|
-
id,
|
|
27725
|
-
meta: mergeAuditIntoMeta(meta, {
|
|
27726
|
-
createdDate: date,
|
|
27727
|
-
createdById: actorId,
|
|
27728
|
-
createdByName: actorName,
|
|
27729
|
-
modifiedDate: date,
|
|
27730
|
-
modifiedById: actorId,
|
|
27731
|
-
modifiedByName: actorName
|
|
27732
|
-
})
|
|
27733
|
-
};
|
|
27734
|
-
const service = getDynamoDataService(tableName);
|
|
27735
|
-
return createDataEntityRecord(
|
|
27736
|
-
service.entities.organization,
|
|
27737
|
-
tenantId,
|
|
27738
|
-
workspaceId,
|
|
27739
|
-
id,
|
|
27740
|
-
resourceWithAudit,
|
|
27741
|
-
date
|
|
27742
|
-
);
|
|
27743
|
-
}
|
|
27744
|
-
|
|
27745
27667
|
// src/data/rest-api/routes/data/organization/organization-create-route.ts
|
|
27746
27668
|
async function createOrganizationRoute(req, res) {
|
|
27747
27669
|
const bodyResult = requireJsonBodyAs(req, res);
|
|
@@ -27977,11 +27899,11 @@ router106.delete("/:id", deleteOrganizationRoute);
|
|
|
27977
27899
|
import express107 from "express";
|
|
27978
27900
|
|
|
27979
27901
|
// src/data/operations/data/organizationaffiliation/organizationaffiliation-create-operation.ts
|
|
27980
|
-
import { ulid as
|
|
27902
|
+
import { ulid as ulid90 } from "ulid";
|
|
27981
27903
|
async function createOrganizationAffiliationOperation(params) {
|
|
27982
27904
|
const { context, body, tableName } = params;
|
|
27983
27905
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
27984
|
-
const id = body.id ??
|
|
27906
|
+
const id = body.id ?? ulid90();
|
|
27985
27907
|
const meta = {
|
|
27986
27908
|
...body.meta ?? {},
|
|
27987
27909
|
lastUpdated: date,
|
|
@@ -28453,41 +28375,6 @@ router108.delete("/:id", deletePatientRoute);
|
|
|
28453
28375
|
// src/data/rest-api/routes/data/paymentnotice/paymentnotice.ts
|
|
28454
28376
|
import express109 from "express";
|
|
28455
28377
|
|
|
28456
|
-
// src/data/operations/data/paymentnotice/paymentnotice-create-operation.ts
|
|
28457
|
-
import { ulid as ulid97 } from "ulid";
|
|
28458
|
-
async function createPaymentNoticeOperation(params) {
|
|
28459
|
-
const { context, body, tableName } = params;
|
|
28460
|
-
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
28461
|
-
const id = body.id ?? ulid97();
|
|
28462
|
-
const meta = {
|
|
28463
|
-
...body.meta ?? {},
|
|
28464
|
-
lastUpdated: date,
|
|
28465
|
-
versionId: "1"
|
|
28466
|
-
};
|
|
28467
|
-
const resourceWithAudit = {
|
|
28468
|
-
...body,
|
|
28469
|
-
resourceType: "PaymentNotice",
|
|
28470
|
-
id,
|
|
28471
|
-
meta: mergeAuditIntoMeta(meta, {
|
|
28472
|
-
createdDate: date,
|
|
28473
|
-
createdById: actorId,
|
|
28474
|
-
createdByName: actorName,
|
|
28475
|
-
modifiedDate: date,
|
|
28476
|
-
modifiedById: actorId,
|
|
28477
|
-
modifiedByName: actorName
|
|
28478
|
-
})
|
|
28479
|
-
};
|
|
28480
|
-
const service = getDynamoDataService(tableName);
|
|
28481
|
-
return createDataEntityRecord(
|
|
28482
|
-
service.entities.paymentnotice,
|
|
28483
|
-
tenantId,
|
|
28484
|
-
workspaceId,
|
|
28485
|
-
id,
|
|
28486
|
-
resourceWithAudit,
|
|
28487
|
-
date
|
|
28488
|
-
);
|
|
28489
|
-
}
|
|
28490
|
-
|
|
28491
28378
|
// src/data/rest-api/routes/data/paymentnotice/paymentnotice-create-route.ts
|
|
28492
28379
|
async function createPaymentNoticeRoute(req, res) {
|
|
28493
28380
|
const bodyResult = requireJsonBodyAs(req, res);
|
|
@@ -28757,11 +28644,11 @@ router109.delete("/:id", deletePaymentNoticeRoute);
|
|
|
28757
28644
|
import express110 from "express";
|
|
28758
28645
|
|
|
28759
28646
|
// src/data/operations/data/paymentreconciliation/paymentreconciliation-create-operation.ts
|
|
28760
|
-
import { ulid as
|
|
28647
|
+
import { ulid as ulid91 } from "ulid";
|
|
28761
28648
|
async function createPaymentReconciliationOperation(params) {
|
|
28762
28649
|
const { context, body, tableName } = params;
|
|
28763
28650
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
28764
|
-
const id = body.id ??
|
|
28651
|
+
const id = body.id ?? ulid91();
|
|
28765
28652
|
const meta = {
|
|
28766
28653
|
...body.meta ?? {},
|
|
28767
28654
|
lastUpdated: date,
|
|
@@ -28976,11 +28863,11 @@ router110.delete("/:id", deletePaymentReconciliationRoute);
|
|
|
28976
28863
|
import express111 from "express";
|
|
28977
28864
|
|
|
28978
28865
|
// src/data/operations/data/person/person-create-operation.ts
|
|
28979
|
-
import { ulid as
|
|
28866
|
+
import { ulid as ulid92 } from "ulid";
|
|
28980
28867
|
async function createPersonOperation(params) {
|
|
28981
28868
|
const { context, body, tableName } = params;
|
|
28982
28869
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
28983
|
-
const id = body.id ??
|
|
28870
|
+
const id = body.id ?? ulid92();
|
|
28984
28871
|
const meta = {
|
|
28985
28872
|
...body.meta ?? {},
|
|
28986
28873
|
lastUpdated: date,
|
|
@@ -29176,11 +29063,11 @@ router111.delete("/:id", deletePersonRoute);
|
|
|
29176
29063
|
import express112 from "express";
|
|
29177
29064
|
|
|
29178
29065
|
// src/data/operations/data/plandefinition/plandefinition-create-operation.ts
|
|
29179
|
-
import { ulid as
|
|
29066
|
+
import { ulid as ulid93 } from "ulid";
|
|
29180
29067
|
async function createPlanDefinitionOperation(params) {
|
|
29181
29068
|
const { context, body, tableName } = params;
|
|
29182
29069
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
29183
|
-
const id = body.id ??
|
|
29070
|
+
const id = body.id ?? ulid93();
|
|
29184
29071
|
const meta = {
|
|
29185
29072
|
...body.meta ?? {},
|
|
29186
29073
|
lastUpdated: date,
|
|
@@ -29884,41 +29771,6 @@ router114.delete("/:id", deletePractitionerRoleRoute);
|
|
|
29884
29771
|
// src/data/rest-api/routes/data/procedure/procedure.ts
|
|
29885
29772
|
import express115 from "express";
|
|
29886
29773
|
|
|
29887
|
-
// src/data/operations/data/procedure/procedure-create-operation.ts
|
|
29888
|
-
import { ulid as ulid101 } from "ulid";
|
|
29889
|
-
async function createProcedureOperation(params) {
|
|
29890
|
-
const { context, body, tableName } = params;
|
|
29891
|
-
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
29892
|
-
const id = body.id ?? ulid101();
|
|
29893
|
-
const meta = {
|
|
29894
|
-
...body.meta ?? {},
|
|
29895
|
-
lastUpdated: date,
|
|
29896
|
-
versionId: "1"
|
|
29897
|
-
};
|
|
29898
|
-
const resourceWithAudit = {
|
|
29899
|
-
...body,
|
|
29900
|
-
resourceType: "Procedure",
|
|
29901
|
-
id,
|
|
29902
|
-
meta: mergeAuditIntoMeta(meta, {
|
|
29903
|
-
createdDate: date,
|
|
29904
|
-
createdById: actorId,
|
|
29905
|
-
createdByName: actorName,
|
|
29906
|
-
modifiedDate: date,
|
|
29907
|
-
modifiedById: actorId,
|
|
29908
|
-
modifiedByName: actorName
|
|
29909
|
-
})
|
|
29910
|
-
};
|
|
29911
|
-
const service = getDynamoDataService(tableName);
|
|
29912
|
-
return createDataEntityRecord(
|
|
29913
|
-
service.entities.procedure,
|
|
29914
|
-
tenantId,
|
|
29915
|
-
workspaceId,
|
|
29916
|
-
id,
|
|
29917
|
-
resourceWithAudit,
|
|
29918
|
-
date
|
|
29919
|
-
);
|
|
29920
|
-
}
|
|
29921
|
-
|
|
29922
29774
|
// src/data/rest-api/routes/data/procedure/procedure-create-route.ts
|
|
29923
29775
|
async function createProcedureRoute(req, res) {
|
|
29924
29776
|
const bodyResult = requireJsonBodyAs(req, res);
|
|
@@ -30178,11 +30030,11 @@ router115.delete("/:id", deleteProcedureRoute);
|
|
|
30178
30030
|
import express116 from "express";
|
|
30179
30031
|
|
|
30180
30032
|
// src/data/operations/data/provenance/provenance-create-operation.ts
|
|
30181
|
-
import { ulid as
|
|
30033
|
+
import { ulid as ulid94 } from "ulid";
|
|
30182
30034
|
async function createProvenanceOperation(params) {
|
|
30183
30035
|
const { context, body, tableName } = params;
|
|
30184
30036
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
30185
|
-
const id = body.id ??
|
|
30037
|
+
const id = body.id ?? ulid94();
|
|
30186
30038
|
const meta = {
|
|
30187
30039
|
...body.meta ?? {},
|
|
30188
30040
|
lastUpdated: date,
|
|
@@ -30378,11 +30230,11 @@ router116.delete("/:id", deleteProvenanceRoute);
|
|
|
30378
30230
|
import express117 from "express";
|
|
30379
30231
|
|
|
30380
30232
|
// src/data/operations/data/questionnaire/questionnaire-create-operation.ts
|
|
30381
|
-
import { ulid as
|
|
30233
|
+
import { ulid as ulid95 } from "ulid";
|
|
30382
30234
|
async function createQuestionnaireOperation(params) {
|
|
30383
30235
|
const { context, body, tableName } = params;
|
|
30384
30236
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
30385
|
-
const id = body.id ??
|
|
30237
|
+
const id = body.id ?? ulid95();
|
|
30386
30238
|
const meta = {
|
|
30387
30239
|
...body.meta ?? {},
|
|
30388
30240
|
lastUpdated: date,
|
|
@@ -30578,11 +30430,11 @@ router117.delete("/:id", deleteQuestionnaireRoute);
|
|
|
30578
30430
|
import express118 from "express";
|
|
30579
30431
|
|
|
30580
30432
|
// src/data/operations/data/questionnaireresponse/questionnaireresponse-create-operation.ts
|
|
30581
|
-
import { ulid as
|
|
30433
|
+
import { ulid as ulid96 } from "ulid";
|
|
30582
30434
|
async function createQuestionnaireResponseOperation(params) {
|
|
30583
30435
|
const { context, body, tableName } = params;
|
|
30584
30436
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
30585
|
-
const id = body.id ??
|
|
30437
|
+
const id = body.id ?? ulid96();
|
|
30586
30438
|
const meta = {
|
|
30587
30439
|
...body.meta ?? {},
|
|
30588
30440
|
lastUpdated: date,
|
|
@@ -30797,11 +30649,11 @@ router118.delete("/:id", deleteQuestionnaireResponseRoute);
|
|
|
30797
30649
|
import express119 from "express";
|
|
30798
30650
|
|
|
30799
30651
|
// src/data/operations/data/relatedperson/relatedperson-create-operation.ts
|
|
30800
|
-
import { ulid as
|
|
30652
|
+
import { ulid as ulid97 } from "ulid";
|
|
30801
30653
|
async function createRelatedPersonOperation(params) {
|
|
30802
30654
|
const { context, body, tableName } = params;
|
|
30803
30655
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
30804
|
-
const id = body.id ??
|
|
30656
|
+
const id = body.id ?? ulid97();
|
|
30805
30657
|
const meta = {
|
|
30806
30658
|
...body.meta ?? {},
|
|
30807
30659
|
lastUpdated: date,
|
|
@@ -31097,11 +30949,11 @@ router119.delete("/:id", deleteRelatedPersonRoute);
|
|
|
31097
30949
|
import express120 from "express";
|
|
31098
30950
|
|
|
31099
30951
|
// src/data/operations/data/requestgroup/requestgroup-create-operation.ts
|
|
31100
|
-
import { ulid as
|
|
30952
|
+
import { ulid as ulid98 } from "ulid";
|
|
31101
30953
|
async function createRequestGroupOperation(params) {
|
|
31102
30954
|
const { context, body, tableName } = params;
|
|
31103
30955
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
31104
|
-
const id = body.id ??
|
|
30956
|
+
const id = body.id ?? ulid98();
|
|
31105
30957
|
const meta = {
|
|
31106
30958
|
...body.meta ?? {},
|
|
31107
30959
|
lastUpdated: date,
|
|
@@ -31297,11 +31149,11 @@ router120.delete("/:id", deleteRequestGroupRoute);
|
|
|
31297
31149
|
import express121 from "express";
|
|
31298
31150
|
|
|
31299
31151
|
// src/data/operations/data/researchdefinition/researchdefinition-create-operation.ts
|
|
31300
|
-
import { ulid as
|
|
31152
|
+
import { ulid as ulid99 } from "ulid";
|
|
31301
31153
|
async function createResearchDefinitionOperation(params) {
|
|
31302
31154
|
const { context, body, tableName } = params;
|
|
31303
31155
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
31304
|
-
const id = body.id ??
|
|
31156
|
+
const id = body.id ?? ulid99();
|
|
31305
31157
|
const meta = {
|
|
31306
31158
|
...body.meta ?? {},
|
|
31307
31159
|
lastUpdated: date,
|
|
@@ -31504,11 +31356,11 @@ router121.delete("/:id", deleteResearchDefinitionRoute);
|
|
|
31504
31356
|
import express122 from "express";
|
|
31505
31357
|
|
|
31506
31358
|
// src/data/operations/data/researchelementdefinition/researchelementdefinition-create-operation.ts
|
|
31507
|
-
import { ulid as
|
|
31359
|
+
import { ulid as ulid100 } from "ulid";
|
|
31508
31360
|
async function createResearchElementDefinitionOperation(params) {
|
|
31509
31361
|
const { context, body, tableName } = params;
|
|
31510
31362
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
31511
|
-
const id = body.id ??
|
|
31363
|
+
const id = body.id ?? ulid100();
|
|
31512
31364
|
const meta = {
|
|
31513
31365
|
...body.meta ?? {},
|
|
31514
31366
|
lastUpdated: date,
|
|
@@ -31723,11 +31575,11 @@ router122.delete("/:id", deleteResearchElementDefinitionRoute);
|
|
|
31723
31575
|
import express123 from "express";
|
|
31724
31576
|
|
|
31725
31577
|
// src/data/operations/data/researchstudy/researchstudy-create-operation.ts
|
|
31726
|
-
import { ulid as
|
|
31578
|
+
import { ulid as ulid101 } from "ulid";
|
|
31727
31579
|
async function createResearchStudyOperation(params) {
|
|
31728
31580
|
const { context, body, tableName } = params;
|
|
31729
31581
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
31730
|
-
const id = body.id ??
|
|
31582
|
+
const id = body.id ?? ulid101();
|
|
31731
31583
|
const meta = {
|
|
31732
31584
|
...body.meta ?? {},
|
|
31733
31585
|
lastUpdated: date,
|
|
@@ -31923,11 +31775,11 @@ router123.delete("/:id", deleteResearchStudyRoute);
|
|
|
31923
31775
|
import express124 from "express";
|
|
31924
31776
|
|
|
31925
31777
|
// src/data/operations/data/researchsubject/researchsubject-create-operation.ts
|
|
31926
|
-
import { ulid as
|
|
31778
|
+
import { ulid as ulid102 } from "ulid";
|
|
31927
31779
|
async function createResearchSubjectOperation(params) {
|
|
31928
31780
|
const { context, body, tableName } = params;
|
|
31929
31781
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
31930
|
-
const id = body.id ??
|
|
31782
|
+
const id = body.id ?? ulid102();
|
|
31931
31783
|
const meta = {
|
|
31932
31784
|
...body.meta ?? {},
|
|
31933
31785
|
lastUpdated: date,
|
|
@@ -32123,11 +31975,11 @@ router124.delete("/:id", deleteResearchSubjectRoute);
|
|
|
32123
31975
|
import express125 from "express";
|
|
32124
31976
|
|
|
32125
31977
|
// src/data/operations/data/riskassessment/riskassessment-create-operation.ts
|
|
32126
|
-
import { ulid as
|
|
31978
|
+
import { ulid as ulid103 } from "ulid";
|
|
32127
31979
|
async function createRiskAssessmentOperation(params) {
|
|
32128
31980
|
const { context, body, tableName } = params;
|
|
32129
31981
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
32130
|
-
const id = body.id ??
|
|
31982
|
+
const id = body.id ?? ulid103();
|
|
32131
31983
|
const meta = {
|
|
32132
31984
|
...body.meta ?? {},
|
|
32133
31985
|
lastUpdated: date,
|
|
@@ -32323,11 +32175,11 @@ router125.delete("/:id", deleteRiskAssessmentRoute);
|
|
|
32323
32175
|
import express126 from "express";
|
|
32324
32176
|
|
|
32325
32177
|
// src/data/operations/data/riskevidencesynthesis/riskevidencesynthesis-create-operation.ts
|
|
32326
|
-
import { ulid as
|
|
32178
|
+
import { ulid as ulid104 } from "ulid";
|
|
32327
32179
|
async function createRiskEvidenceSynthesisOperation(params) {
|
|
32328
32180
|
const { context, body, tableName } = params;
|
|
32329
32181
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
32330
|
-
const id = body.id ??
|
|
32182
|
+
const id = body.id ?? ulid104();
|
|
32331
32183
|
const meta = {
|
|
32332
32184
|
...body.meta ?? {},
|
|
32333
32185
|
lastUpdated: date,
|
|
@@ -32542,11 +32394,11 @@ router126.delete("/:id", deleteRiskEvidenceSynthesisRoute);
|
|
|
32542
32394
|
import express127 from "express";
|
|
32543
32395
|
|
|
32544
32396
|
// src/data/operations/data/schedule/schedule-create-operation.ts
|
|
32545
|
-
import { ulid as
|
|
32397
|
+
import { ulid as ulid105 } from "ulid";
|
|
32546
32398
|
async function createScheduleOperation(params) {
|
|
32547
32399
|
const { context, body, tableName } = params;
|
|
32548
32400
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
32549
|
-
const id = body.id ??
|
|
32401
|
+
const id = body.id ?? ulid105();
|
|
32550
32402
|
const meta = {
|
|
32551
32403
|
...body.meta ?? {},
|
|
32552
32404
|
lastUpdated: date,
|
|
@@ -32835,11 +32687,11 @@ router127.delete("/:id", deleteScheduleRoute);
|
|
|
32835
32687
|
import express128 from "express";
|
|
32836
32688
|
|
|
32837
32689
|
// src/data/operations/data/searchparameter/searchparameter-create-operation.ts
|
|
32838
|
-
import { ulid as
|
|
32690
|
+
import { ulid as ulid106 } from "ulid";
|
|
32839
32691
|
async function createSearchParameterOperation(params) {
|
|
32840
32692
|
const { context, body, tableName } = params;
|
|
32841
32693
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
32842
|
-
const id = body.id ??
|
|
32694
|
+
const id = body.id ?? ulid106();
|
|
32843
32695
|
const meta = {
|
|
32844
32696
|
...body.meta ?? {},
|
|
32845
32697
|
lastUpdated: date,
|
|
@@ -33035,11 +32887,11 @@ router128.delete("/:id", deleteSearchParameterRoute);
|
|
|
33035
32887
|
import express129 from "express";
|
|
33036
32888
|
|
|
33037
32889
|
// src/data/operations/data/servicerequest/servicerequest-create-operation.ts
|
|
33038
|
-
import { ulid as
|
|
32890
|
+
import { ulid as ulid107 } from "ulid";
|
|
33039
32891
|
async function createServiceRequestOperation(params) {
|
|
33040
32892
|
const { context, body, tableName } = params;
|
|
33041
32893
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
33042
|
-
const id = body.id ??
|
|
32894
|
+
const id = body.id ?? ulid107();
|
|
33043
32895
|
const meta = {
|
|
33044
32896
|
...body.meta ?? {},
|
|
33045
32897
|
lastUpdated: date,
|
|
@@ -33235,11 +33087,11 @@ router129.delete("/:id", deleteServiceRequestRoute);
|
|
|
33235
33087
|
import express130 from "express";
|
|
33236
33088
|
|
|
33237
33089
|
// src/data/operations/data/slot/slot-create-operation.ts
|
|
33238
|
-
import { ulid as
|
|
33090
|
+
import { ulid as ulid108 } from "ulid";
|
|
33239
33091
|
async function createSlotOperation(params) {
|
|
33240
33092
|
const { context, body, tableName } = params;
|
|
33241
33093
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
33242
|
-
const id = body.id ??
|
|
33094
|
+
const id = body.id ?? ulid108();
|
|
33243
33095
|
const meta = {
|
|
33244
33096
|
...body.meta ?? {},
|
|
33245
33097
|
lastUpdated: date,
|
|
@@ -33528,11 +33380,11 @@ router130.delete("/:id", deleteSlotRoute);
|
|
|
33528
33380
|
import express131 from "express";
|
|
33529
33381
|
|
|
33530
33382
|
// src/data/operations/data/specimen/specimen-create-operation.ts
|
|
33531
|
-
import { ulid as
|
|
33383
|
+
import { ulid as ulid109 } from "ulid";
|
|
33532
33384
|
async function createSpecimenOperation(params) {
|
|
33533
33385
|
const { context, body, tableName } = params;
|
|
33534
33386
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
33535
|
-
const id = body.id ??
|
|
33387
|
+
const id = body.id ?? ulid109();
|
|
33536
33388
|
const meta = {
|
|
33537
33389
|
...body.meta ?? {},
|
|
33538
33390
|
lastUpdated: date,
|
|
@@ -33824,11 +33676,11 @@ router131.delete("/:id", deleteSpecimenRoute);
|
|
|
33824
33676
|
import express132 from "express";
|
|
33825
33677
|
|
|
33826
33678
|
// src/data/operations/data/specimendefinition/specimendefinition-create-operation.ts
|
|
33827
|
-
import { ulid as
|
|
33679
|
+
import { ulid as ulid110 } from "ulid";
|
|
33828
33680
|
async function createSpecimenDefinitionOperation(params) {
|
|
33829
33681
|
const { context, body, tableName } = params;
|
|
33830
33682
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
33831
|
-
const id = body.id ??
|
|
33683
|
+
const id = body.id ?? ulid110();
|
|
33832
33684
|
const meta = {
|
|
33833
33685
|
...body.meta ?? {},
|
|
33834
33686
|
lastUpdated: date,
|
|
@@ -34031,11 +33883,11 @@ router132.delete("/:id", deleteSpecimenDefinitionRoute);
|
|
|
34031
33883
|
import express133 from "express";
|
|
34032
33884
|
|
|
34033
33885
|
// src/data/operations/data/structuredefinition/structuredefinition-create-operation.ts
|
|
34034
|
-
import { ulid as
|
|
33886
|
+
import { ulid as ulid111 } from "ulid";
|
|
34035
33887
|
async function createStructureDefinitionOperation(params) {
|
|
34036
33888
|
const { context, body, tableName } = params;
|
|
34037
33889
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
34038
|
-
const id = body.id ??
|
|
33890
|
+
const id = body.id ?? ulid111();
|
|
34039
33891
|
const meta = {
|
|
34040
33892
|
...body.meta ?? {},
|
|
34041
33893
|
lastUpdated: date,
|
|
@@ -34238,11 +34090,11 @@ router133.delete("/:id", deleteStructureDefinitionRoute);
|
|
|
34238
34090
|
import express134 from "express";
|
|
34239
34091
|
|
|
34240
34092
|
// src/data/operations/data/structuremap/structuremap-create-operation.ts
|
|
34241
|
-
import { ulid as
|
|
34093
|
+
import { ulid as ulid112 } from "ulid";
|
|
34242
34094
|
async function createStructureMapOperation(params) {
|
|
34243
34095
|
const { context, body, tableName } = params;
|
|
34244
34096
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
34245
|
-
const id = body.id ??
|
|
34097
|
+
const id = body.id ?? ulid112();
|
|
34246
34098
|
const meta = {
|
|
34247
34099
|
...body.meta ?? {},
|
|
34248
34100
|
lastUpdated: date,
|
|
@@ -34438,11 +34290,11 @@ router134.delete("/:id", deleteStructureMapRoute);
|
|
|
34438
34290
|
import express135 from "express";
|
|
34439
34291
|
|
|
34440
34292
|
// src/data/operations/data/subscription/subscription-create-operation.ts
|
|
34441
|
-
import { ulid as
|
|
34293
|
+
import { ulid as ulid113 } from "ulid";
|
|
34442
34294
|
async function createSubscriptionOperation(params) {
|
|
34443
34295
|
const { context, body, tableName } = params;
|
|
34444
34296
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
34445
|
-
const id = body.id ??
|
|
34297
|
+
const id = body.id ?? ulid113();
|
|
34446
34298
|
const meta = {
|
|
34447
34299
|
...body.meta ?? {},
|
|
34448
34300
|
lastUpdated: date,
|
|
@@ -34638,11 +34490,11 @@ router135.delete("/:id", deleteSubscriptionRoute);
|
|
|
34638
34490
|
import express136 from "express";
|
|
34639
34491
|
|
|
34640
34492
|
// src/data/operations/data/substance/substance-create-operation.ts
|
|
34641
|
-
import { ulid as
|
|
34493
|
+
import { ulid as ulid114 } from "ulid";
|
|
34642
34494
|
async function createSubstanceOperation(params) {
|
|
34643
34495
|
const { context, body, tableName } = params;
|
|
34644
34496
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
34645
|
-
const id = body.id ??
|
|
34497
|
+
const id = body.id ?? ulid114();
|
|
34646
34498
|
const meta = {
|
|
34647
34499
|
...body.meta ?? {},
|
|
34648
34500
|
lastUpdated: date,
|
|
@@ -34838,11 +34690,11 @@ router136.delete("/:id", deleteSubstanceRoute);
|
|
|
34838
34690
|
import express137 from "express";
|
|
34839
34691
|
|
|
34840
34692
|
// src/data/operations/data/substancenucleicacid/substancenucleicacid-create-operation.ts
|
|
34841
|
-
import { ulid as
|
|
34693
|
+
import { ulid as ulid115 } from "ulid";
|
|
34842
34694
|
async function createSubstanceNucleicAcidOperation(params) {
|
|
34843
34695
|
const { context, body, tableName } = params;
|
|
34844
34696
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
34845
|
-
const id = body.id ??
|
|
34697
|
+
const id = body.id ?? ulid115();
|
|
34846
34698
|
const meta = {
|
|
34847
34699
|
...body.meta ?? {},
|
|
34848
34700
|
lastUpdated: date,
|
|
@@ -35049,11 +34901,11 @@ router137.delete("/:id", deleteSubstanceNucleicAcidRoute);
|
|
|
35049
34901
|
import express138 from "express";
|
|
35050
34902
|
|
|
35051
34903
|
// src/data/operations/data/substancepolymer/substancepolymer-create-operation.ts
|
|
35052
|
-
import { ulid as
|
|
34904
|
+
import { ulid as ulid116 } from "ulid";
|
|
35053
34905
|
async function createSubstancePolymerOperation(params) {
|
|
35054
34906
|
const { context, body, tableName } = params;
|
|
35055
34907
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
35056
|
-
const id = body.id ??
|
|
34908
|
+
const id = body.id ?? ulid116();
|
|
35057
34909
|
const meta = {
|
|
35058
34910
|
...body.meta ?? {},
|
|
35059
34911
|
lastUpdated: date,
|
|
@@ -35249,11 +35101,11 @@ router138.delete("/:id", deleteSubstancePolymerRoute);
|
|
|
35249
35101
|
import express139 from "express";
|
|
35250
35102
|
|
|
35251
35103
|
// src/data/operations/data/substanceprotein/substanceprotein-create-operation.ts
|
|
35252
|
-
import { ulid as
|
|
35104
|
+
import { ulid as ulid117 } from "ulid";
|
|
35253
35105
|
async function createSubstanceProteinOperation(params) {
|
|
35254
35106
|
const { context, body, tableName } = params;
|
|
35255
35107
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
35256
|
-
const id = body.id ??
|
|
35108
|
+
const id = body.id ?? ulid117();
|
|
35257
35109
|
const meta = {
|
|
35258
35110
|
...body.meta ?? {},
|
|
35259
35111
|
lastUpdated: date,
|
|
@@ -35449,11 +35301,11 @@ router139.delete("/:id", deleteSubstanceProteinRoute);
|
|
|
35449
35301
|
import express140 from "express";
|
|
35450
35302
|
|
|
35451
35303
|
// src/data/operations/data/substancereferenceinformation/substancereferenceinformation-create-operation.ts
|
|
35452
|
-
import { ulid as
|
|
35304
|
+
import { ulid as ulid118 } from "ulid";
|
|
35453
35305
|
async function createSubstanceReferenceInformationOperation(params) {
|
|
35454
35306
|
const { context, body, tableName } = params;
|
|
35455
35307
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
35456
|
-
const id = body.id ??
|
|
35308
|
+
const id = body.id ?? ulid118();
|
|
35457
35309
|
const meta = {
|
|
35458
35310
|
...body.meta ?? {},
|
|
35459
35311
|
lastUpdated: date,
|
|
@@ -35668,11 +35520,11 @@ router140.delete("/:id", deleteSubstanceReferenceInformationRoute);
|
|
|
35668
35520
|
import express141 from "express";
|
|
35669
35521
|
|
|
35670
35522
|
// src/data/operations/data/substancesourcematerial/substancesourcematerial-create-operation.ts
|
|
35671
|
-
import { ulid as
|
|
35523
|
+
import { ulid as ulid119 } from "ulid";
|
|
35672
35524
|
async function createSubstanceSourceMaterialOperation(params) {
|
|
35673
35525
|
const { context, body, tableName } = params;
|
|
35674
35526
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
35675
|
-
const id = body.id ??
|
|
35527
|
+
const id = body.id ?? ulid119();
|
|
35676
35528
|
const meta = {
|
|
35677
35529
|
...body.meta ?? {},
|
|
35678
35530
|
lastUpdated: date,
|
|
@@ -35887,11 +35739,11 @@ router141.delete("/:id", deleteSubstanceSourceMaterialRoute);
|
|
|
35887
35739
|
import express142 from "express";
|
|
35888
35740
|
|
|
35889
35741
|
// src/data/operations/data/substancespecification/substancespecification-create-operation.ts
|
|
35890
|
-
import { ulid as
|
|
35742
|
+
import { ulid as ulid120 } from "ulid";
|
|
35891
35743
|
async function createSubstanceSpecificationOperation(params) {
|
|
35892
35744
|
const { context, body, tableName } = params;
|
|
35893
35745
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
35894
|
-
const id = body.id ??
|
|
35746
|
+
const id = body.id ?? ulid120();
|
|
35895
35747
|
const meta = {
|
|
35896
35748
|
...body.meta ?? {},
|
|
35897
35749
|
lastUpdated: date,
|
|
@@ -36106,11 +35958,11 @@ router142.delete("/:id", deleteSubstanceSpecificationRoute);
|
|
|
36106
35958
|
import express143 from "express";
|
|
36107
35959
|
|
|
36108
35960
|
// src/data/operations/data/supplydelivery/supplydelivery-create-operation.ts
|
|
36109
|
-
import { ulid as
|
|
35961
|
+
import { ulid as ulid121 } from "ulid";
|
|
36110
35962
|
async function createSupplyDeliveryOperation(params) {
|
|
36111
35963
|
const { context, body, tableName } = params;
|
|
36112
35964
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
36113
|
-
const id = body.id ??
|
|
35965
|
+
const id = body.id ?? ulid121();
|
|
36114
35966
|
const meta = {
|
|
36115
35967
|
...body.meta ?? {},
|
|
36116
35968
|
lastUpdated: date,
|
|
@@ -36306,11 +36158,11 @@ router143.delete("/:id", deleteSupplyDeliveryRoute);
|
|
|
36306
36158
|
import express144 from "express";
|
|
36307
36159
|
|
|
36308
36160
|
// src/data/operations/data/supplyrequest/supplyrequest-create-operation.ts
|
|
36309
|
-
import { ulid as
|
|
36161
|
+
import { ulid as ulid122 } from "ulid";
|
|
36310
36162
|
async function createSupplyRequestOperation(params) {
|
|
36311
36163
|
const { context, body, tableName } = params;
|
|
36312
36164
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
36313
|
-
const id = body.id ??
|
|
36165
|
+
const id = body.id ?? ulid122();
|
|
36314
36166
|
const meta = {
|
|
36315
36167
|
...body.meta ?? {},
|
|
36316
36168
|
lastUpdated: date,
|
|
@@ -36506,11 +36358,11 @@ router144.delete("/:id", deleteSupplyRequestRoute);
|
|
|
36506
36358
|
import express145 from "express";
|
|
36507
36359
|
|
|
36508
36360
|
// src/data/operations/data/task/task-create-operation.ts
|
|
36509
|
-
import { ulid as
|
|
36361
|
+
import { ulid as ulid123 } from "ulid";
|
|
36510
36362
|
async function createTaskOperation(params) {
|
|
36511
36363
|
const { context, body, tableName } = params;
|
|
36512
36364
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
36513
|
-
const id = body.id ??
|
|
36365
|
+
const id = body.id ?? ulid123();
|
|
36514
36366
|
const meta = {
|
|
36515
36367
|
...body.meta ?? {},
|
|
36516
36368
|
lastUpdated: date,
|
|
@@ -36799,11 +36651,11 @@ router145.delete("/:id", deleteTaskRoute);
|
|
|
36799
36651
|
import express146 from "express";
|
|
36800
36652
|
|
|
36801
36653
|
// src/data/operations/data/terminologycapabilities/terminologycapabilities-create-operation.ts
|
|
36802
|
-
import { ulid as
|
|
36654
|
+
import { ulid as ulid124 } from "ulid";
|
|
36803
36655
|
async function createTerminologyCapabilitiesOperation(params) {
|
|
36804
36656
|
const { context, body, tableName } = params;
|
|
36805
36657
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
36806
|
-
const id = body.id ??
|
|
36658
|
+
const id = body.id ?? ulid124();
|
|
36807
36659
|
const meta = {
|
|
36808
36660
|
...body.meta ?? {},
|
|
36809
36661
|
lastUpdated: date,
|
|
@@ -37018,11 +36870,11 @@ router146.delete("/:id", deleteTerminologyCapabilitiesRoute);
|
|
|
37018
36870
|
import express147 from "express";
|
|
37019
36871
|
|
|
37020
36872
|
// src/data/operations/data/testreport/testreport-create-operation.ts
|
|
37021
|
-
import { ulid as
|
|
36873
|
+
import { ulid as ulid125 } from "ulid";
|
|
37022
36874
|
async function createTestReportOperation(params) {
|
|
37023
36875
|
const { context, body, tableName } = params;
|
|
37024
36876
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
37025
|
-
const id = body.id ??
|
|
36877
|
+
const id = body.id ?? ulid125();
|
|
37026
36878
|
const meta = {
|
|
37027
36879
|
...body.meta ?? {},
|
|
37028
36880
|
lastUpdated: date,
|
|
@@ -37218,11 +37070,11 @@ router147.delete("/:id", deleteTestReportRoute);
|
|
|
37218
37070
|
import express148 from "express";
|
|
37219
37071
|
|
|
37220
37072
|
// src/data/operations/data/testscript/testscript-create-operation.ts
|
|
37221
|
-
import { ulid as
|
|
37073
|
+
import { ulid as ulid126 } from "ulid";
|
|
37222
37074
|
async function createTestScriptOperation(params) {
|
|
37223
37075
|
const { context, body, tableName } = params;
|
|
37224
37076
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
37225
|
-
const id = body.id ??
|
|
37077
|
+
const id = body.id ?? ulid126();
|
|
37226
37078
|
const meta = {
|
|
37227
37079
|
...body.meta ?? {},
|
|
37228
37080
|
lastUpdated: date,
|
|
@@ -37418,11 +37270,11 @@ router148.delete("/:id", deleteTestScriptRoute);
|
|
|
37418
37270
|
import express149 from "express";
|
|
37419
37271
|
|
|
37420
37272
|
// src/data/operations/data/valueset/valueset-create-operation.ts
|
|
37421
|
-
import { ulid as
|
|
37273
|
+
import { ulid as ulid127 } from "ulid";
|
|
37422
37274
|
async function createValueSetOperation(params) {
|
|
37423
37275
|
const { context, body, tableName } = params;
|
|
37424
37276
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
37425
|
-
const id = body.id ??
|
|
37277
|
+
const id = body.id ?? ulid127();
|
|
37426
37278
|
const meta = {
|
|
37427
37279
|
...body.meta ?? {},
|
|
37428
37280
|
lastUpdated: date,
|
|
@@ -37618,11 +37470,11 @@ router149.delete("/:id", deleteValueSetRoute);
|
|
|
37618
37470
|
import express150 from "express";
|
|
37619
37471
|
|
|
37620
37472
|
// src/data/operations/data/verificationresult/verificationresult-create-operation.ts
|
|
37621
|
-
import { ulid as
|
|
37473
|
+
import { ulid as ulid128 } from "ulid";
|
|
37622
37474
|
async function createVerificationResultOperation(params) {
|
|
37623
37475
|
const { context, body, tableName } = params;
|
|
37624
37476
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
37625
|
-
const id = body.id ??
|
|
37477
|
+
const id = body.id ?? ulid128();
|
|
37626
37478
|
const meta = {
|
|
37627
37479
|
...body.meta ?? {},
|
|
37628
37480
|
lastUpdated: date,
|
|
@@ -37825,11 +37677,11 @@ router150.delete("/:id", deleteVerificationResultRoute);
|
|
|
37825
37677
|
import express151 from "express";
|
|
37826
37678
|
|
|
37827
37679
|
// src/data/operations/data/visionprescription/visionprescription-create-operation.ts
|
|
37828
|
-
import { ulid as
|
|
37680
|
+
import { ulid as ulid129 } from "ulid";
|
|
37829
37681
|
async function createVisionPrescriptionOperation(params) {
|
|
37830
37682
|
const { context, body, tableName } = params;
|
|
37831
37683
|
const { tenantId, workspaceId, date, actorId, actorName } = context;
|
|
37832
|
-
const id = body.id ??
|
|
37684
|
+
const id = body.id ?? ulid129();
|
|
37833
37685
|
const meta = {
|
|
37834
37686
|
...body.meta ?? {},
|
|
37835
37687
|
lastUpdated: date,
|