@openhi/constructs 0.0.106 → 0.0.108
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/{chunk-CHPEQRXU.mjs → chunk-6J7NQ6A4.mjs} +2 -2
- package/lib/{chunk-YU2HRNUP.mjs → chunk-AJ3G3THO.mjs} +2 -2
- package/lib/{chunk-L6UAP4KP.mjs → chunk-EST32BJ2.mjs} +3 -3
- package/lib/chunk-GT7SFZLP.mjs +126 -0
- package/lib/chunk-GT7SFZLP.mjs.map +1 -0
- package/lib/{chunk-QMIOLLAS.mjs → chunk-L3QHWDHB.mjs} +16 -18
- package/lib/chunk-L3QHWDHB.mjs.map +1 -0
- package/lib/chunk-LKG3I536.mjs +1383 -0
- package/lib/chunk-LKG3I536.mjs.map +1 -0
- package/lib/{chunk-VYDIGFIX.mjs → chunk-QR5JVSCF.mjs} +11 -1
- package/lib/chunk-QR5JVSCF.mjs.map +1 -0
- package/lib/{chunk-AO3E22CS.mjs → chunk-WWGJZNXJ.mjs} +74 -4
- package/lib/chunk-WWGJZNXJ.mjs.map +1 -0
- package/lib/chunk-ZGOHB4RA.mjs +96 -0
- package/lib/chunk-ZGOHB4RA.mjs.map +1 -0
- package/lib/{events-DGep6C7w.d.mts → events-DPodvl07.d.mts} +3 -3
- package/lib/{events-DGep6C7w.d.ts → events-DPodvl07.d.ts} +3 -3
- package/lib/index.d.mts +2 -2
- package/lib/index.d.ts +4 -4
- package/lib/index.js +1045 -9
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +9 -11
- package/lib/index.mjs.map +1 -1
- package/lib/pre-token-generation.handler.js +1356 -10
- package/lib/pre-token-generation.handler.js.map +1 -1
- package/lib/pre-token-generation.handler.mjs +103 -5
- package/lib/pre-token-generation.handler.mjs.map +1 -1
- package/lib/provision-default-workspace.handler.js +1172 -1
- package/lib/provision-default-workspace.handler.js.map +1 -1
- package/lib/provision-default-workspace.handler.mjs +5 -5
- package/lib/rest-api-lambda.handler.js +2769 -2434
- package/lib/rest-api-lambda.handler.js.map +1 -1
- package/lib/rest-api-lambda.handler.mjs +630 -1464
- package/lib/rest-api-lambda.handler.mjs.map +1 -1
- package/lib/seed-demo-data.handler.d.mts +2 -2
- package/lib/seed-demo-data.handler.d.ts +2 -2
- package/lib/seed-demo-data.handler.js +1174 -10
- package/lib/seed-demo-data.handler.js.map +1 -1
- package/lib/seed-demo-data.handler.mjs +5 -5
- package/lib/seed-system-data.handler.js +15 -5
- package/lib/seed-system-data.handler.js.map +1 -1
- package/lib/seed-system-data.handler.mjs +9 -9
- package/lib/seed-system-data.handler.mjs.map +1 -1
- package/package.json +1 -1
- package/lib/chunk-AO3E22CS.mjs.map +0 -1
- package/lib/chunk-JUNL76HF.mjs +0 -428
- package/lib/chunk-JUNL76HF.mjs.map +0 -1
- package/lib/chunk-QMIOLLAS.mjs.map +0 -1
- package/lib/chunk-VYDIGFIX.mjs.map +0 -1
- package/lib/chunk-YZZDUJHI.mjs +0 -37
- package/lib/chunk-YZZDUJHI.mjs.map +0 -1
- /package/lib/{chunk-CHPEQRXU.mjs.map → chunk-6J7NQ6A4.mjs.map} +0 -0
- /package/lib/{chunk-YU2HRNUP.mjs.map → chunk-AJ3G3THO.mjs.map} +0 -0
- /package/lib/{chunk-L6UAP4KP.mjs.map → chunk-EST32BJ2.mjs.map} +0 -0
|
@@ -642,7 +642,7 @@ module.exports = __toCommonJS(seed_demo_data_handler_exports);
|
|
|
642
642
|
var import_node_crypto = require("crypto");
|
|
643
643
|
var import_client_cognito_identity_provider = require("@aws-sdk/client-cognito-identity-provider");
|
|
644
644
|
var import_client_dynamodb2 = require("@aws-sdk/client-dynamodb");
|
|
645
|
-
var
|
|
645
|
+
var import_types8 = require("@openhi/types");
|
|
646
646
|
var import_workflows2 = __toESM(require_lib());
|
|
647
647
|
|
|
648
648
|
// src/workflows/control-plane/seed-demo-data/events.ts
|
|
@@ -735,7 +735,7 @@ var openhiResourceIdentifier = (params) => ({
|
|
|
735
735
|
var demoRolesForUserInTenant = (_user, _tenantId) => {
|
|
736
736
|
void _user;
|
|
737
737
|
void _tenantId;
|
|
738
|
-
return [import_types.
|
|
738
|
+
return [import_types.PLATFORM_ROLE_CODE.TENANT_ADMIN];
|
|
739
739
|
};
|
|
740
740
|
|
|
741
741
|
// src/data/dynamo/dynamo-control-service.ts
|
|
@@ -990,6 +990,16 @@ var MembershipEntity = new import_electrodb2.Entity({
|
|
|
990
990
|
msgId: {
|
|
991
991
|
type: "string",
|
|
992
992
|
required: false
|
|
993
|
+
},
|
|
994
|
+
/**
|
|
995
|
+
* Denormalized `linked-data-identity` Reference (e.g. `Practitioner/abc`).
|
|
996
|
+
* Populated from the FHIR extension on the Membership resource at write
|
|
997
|
+
* time so future GSIs can index data-plane identity lookups without
|
|
998
|
+
* deserializing the full resource JSON. See ADR 2026-03-13-02 §6.
|
|
999
|
+
*/
|
|
1000
|
+
linkedDataIdentityRef: {
|
|
1001
|
+
type: "string",
|
|
1002
|
+
required: false
|
|
993
1003
|
}
|
|
994
1004
|
},
|
|
995
1005
|
indexes: {
|
|
@@ -1597,6 +1607,11 @@ var NotFoundError = class extends DomainError {
|
|
|
1597
1607
|
super(message, "NOT_FOUND", options);
|
|
1598
1608
|
}
|
|
1599
1609
|
};
|
|
1610
|
+
var ValidationError = class extends DomainError {
|
|
1611
|
+
constructor(message, options) {
|
|
1612
|
+
super(message, "VALIDATION", options);
|
|
1613
|
+
}
|
|
1614
|
+
};
|
|
1600
1615
|
|
|
1601
1616
|
// src/data/operations/control/membership/membership-create-operation.ts
|
|
1602
1617
|
var import_types3 = require("@openhi/types");
|
|
@@ -1608,6 +1623,18 @@ async function createMembershipOperation(params) {
|
|
|
1608
1623
|
const lastUpdated = context.date ?? (/* @__PURE__ */ new Date()).toISOString();
|
|
1609
1624
|
const vid = `1`;
|
|
1610
1625
|
const resource = { resourceType: "Membership", id, ...parsedResource };
|
|
1626
|
+
let linkedDataIdentityRef;
|
|
1627
|
+
try {
|
|
1628
|
+
const ext = (0, import_types3.assertLinkedDataIdentityCardinality)(
|
|
1629
|
+
resource
|
|
1630
|
+
);
|
|
1631
|
+
linkedDataIdentityRef = ext?.valueReference?.reference;
|
|
1632
|
+
} catch (e) {
|
|
1633
|
+
if (e instanceof import_types3.LinkedDataIdentityCardinalityError) {
|
|
1634
|
+
throw new ValidationError(e.message, { cause: e });
|
|
1635
|
+
}
|
|
1636
|
+
throw e;
|
|
1637
|
+
}
|
|
1611
1638
|
const summary = JSON.stringify((0, import_types3.extractSummary)(resource));
|
|
1612
1639
|
await service.entities.membership.put({
|
|
1613
1640
|
tenantId: context.tenantId,
|
|
@@ -1615,7 +1642,8 @@ async function createMembershipOperation(params) {
|
|
|
1615
1642
|
resource: JSON.stringify(resource),
|
|
1616
1643
|
summary,
|
|
1617
1644
|
vid,
|
|
1618
|
-
lastUpdated
|
|
1645
|
+
lastUpdated,
|
|
1646
|
+
linkedDataIdentityRef
|
|
1619
1647
|
}).go();
|
|
1620
1648
|
return {
|
|
1621
1649
|
id,
|
|
@@ -1689,7 +1717,1136 @@ async function createTenantOperation(params) {
|
|
|
1689
1717
|
}
|
|
1690
1718
|
|
|
1691
1719
|
// src/data/operations/control/workspace/workspace-create-operation.ts
|
|
1720
|
+
var import_types7 = require("@openhi/types");
|
|
1721
|
+
|
|
1722
|
+
// src/data/dynamo/dynamo-data-service.ts
|
|
1723
|
+
var import_electrodb10 = require("electrodb");
|
|
1724
|
+
|
|
1725
|
+
// src/data/dynamo/entities/data-entity-common.ts
|
|
1726
|
+
var import_electrodb9 = require("electrodb");
|
|
1727
|
+
var dataEntityAttributes = {
|
|
1728
|
+
/** Sort key. "CURRENT" for current version; version history in S3. */
|
|
1729
|
+
sk: {
|
|
1730
|
+
type: "string",
|
|
1731
|
+
required: true,
|
|
1732
|
+
default: "CURRENT"
|
|
1733
|
+
},
|
|
1734
|
+
tenantId: {
|
|
1735
|
+
type: "string",
|
|
1736
|
+
required: true
|
|
1737
|
+
},
|
|
1738
|
+
workspaceId: {
|
|
1739
|
+
type: "string",
|
|
1740
|
+
required: true
|
|
1741
|
+
},
|
|
1742
|
+
/** FHIR Resource.id; logical id in URL and PK. */
|
|
1743
|
+
id: {
|
|
1744
|
+
type: "string",
|
|
1745
|
+
required: true
|
|
1746
|
+
},
|
|
1747
|
+
/** FHIR resource as JSON string. JSON.stringify(resource) on write; JSON.parse(item.resource) on read. */
|
|
1748
|
+
resource: {
|
|
1749
|
+
type: "string",
|
|
1750
|
+
required: true
|
|
1751
|
+
},
|
|
1752
|
+
/**
|
|
1753
|
+
* Summary projection of the FHIR resource as a JSON string (uncompressed). Populated on every
|
|
1754
|
+
* write via `extractSummary(resource)` so GSI projections can surface list/lookup data without
|
|
1755
|
+
* reading the compressed `resource` blob. Kept uncompressed because the summary is small and
|
|
1756
|
+
* must be fast to retrieve without encode/decode overhead.
|
|
1757
|
+
*
|
|
1758
|
+
* @see sites/www-docs/content/architecture/adr/2026-04-17-02-fhir-summary-projection-for-gsi-access-patterns.md
|
|
1759
|
+
*/
|
|
1760
|
+
summary: {
|
|
1761
|
+
type: "string",
|
|
1762
|
+
required: true
|
|
1763
|
+
},
|
|
1764
|
+
/** Version id (e.g. ULID). Tracks current version; S3 history key. */
|
|
1765
|
+
vid: {
|
|
1766
|
+
type: "string",
|
|
1767
|
+
required: true
|
|
1768
|
+
},
|
|
1769
|
+
lastUpdated: {
|
|
1770
|
+
type: "string",
|
|
1771
|
+
required: true
|
|
1772
|
+
},
|
|
1773
|
+
/**
|
|
1774
|
+
* Shard index segment for the GSI1 partition key. Computed deterministically from `id`
|
|
1775
|
+
* via `computeShard` so updates always land on the same shard. Stored as a string because
|
|
1776
|
+
* it appears as a literal segment in the GSI1 PK template; the underlying value is 0..3.
|
|
1777
|
+
* Not `required` because the value is derived via `watch`/`set`; ElectroDB's required-field
|
|
1778
|
+
* check runs before watch propagation, so callers must not fail validation on a derived field.
|
|
1779
|
+
*
|
|
1780
|
+
* @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md — GSI1 (sharded)
|
|
1781
|
+
*/
|
|
1782
|
+
gsi1Shard: {
|
|
1783
|
+
type: "string",
|
|
1784
|
+
watch: ["id"],
|
|
1785
|
+
set: (_val, item) => {
|
|
1786
|
+
if (typeof item?.id !== "string" || item.id.length === 0) {
|
|
1787
|
+
return void 0;
|
|
1788
|
+
}
|
|
1789
|
+
return String(computeShard(item.id));
|
|
1790
|
+
}
|
|
1791
|
+
},
|
|
1792
|
+
/**
|
|
1793
|
+
* GSI1 sort key. Written as the index's SK verbatim so list endpoints can
|
|
1794
|
+
* use `BEGINS_WITH` for prefix queries (e.g. `?name=Sm` against Patient).
|
|
1795
|
+
* Computed at write time via `extractSortKey(resource)` per DR-004:
|
|
1796
|
+
* - Labeled types (LABEL_PATHS): `<normalizedLabel>#<id>`
|
|
1797
|
+
* - Unlabeled types: `<ISO-8601 lastUpdated>#<id>`
|
|
1798
|
+
* The factory deliberately does not derive this from `lastUpdated`/`id`
|
|
1799
|
+
* — that would lock every type into the unlabeled fallback and defeat
|
|
1800
|
+
* label-based BEGINS_WITH on labeled types.
|
|
1801
|
+
*
|
|
1802
|
+
* @see openhi-planning DR-004
|
|
1803
|
+
*/
|
|
1804
|
+
gsi1sk: {
|
|
1805
|
+
type: "string",
|
|
1806
|
+
required: true
|
|
1807
|
+
},
|
|
1808
|
+
deleted: {
|
|
1809
|
+
type: "boolean",
|
|
1810
|
+
required: false
|
|
1811
|
+
},
|
|
1812
|
+
bundleId: {
|
|
1813
|
+
type: "string",
|
|
1814
|
+
required: false
|
|
1815
|
+
},
|
|
1816
|
+
msgId: {
|
|
1817
|
+
type: "string",
|
|
1818
|
+
required: false
|
|
1819
|
+
}
|
|
1820
|
+
};
|
|
1821
|
+
function createDataEntity(entity, resourceTypeLabel) {
|
|
1822
|
+
return new import_electrodb9.Entity({
|
|
1823
|
+
model: {
|
|
1824
|
+
entity,
|
|
1825
|
+
service: "data",
|
|
1826
|
+
version: "01"
|
|
1827
|
+
},
|
|
1828
|
+
attributes: dataEntityAttributes,
|
|
1829
|
+
indexes: {
|
|
1830
|
+
/** Base table: PK, SK (data store key names). PK is built from tenantId, workspaceId, id. */
|
|
1831
|
+
record: {
|
|
1832
|
+
pk: {
|
|
1833
|
+
field: "PK",
|
|
1834
|
+
composite: ["tenantId", "workspaceId", "id"],
|
|
1835
|
+
template: `TID#\${tenantId}#WID#\${workspaceId}#RT#${resourceTypeLabel}#ID#\${id}`
|
|
1836
|
+
},
|
|
1837
|
+
sk: {
|
|
1838
|
+
field: "SK",
|
|
1839
|
+
composite: ["sk"]
|
|
1840
|
+
}
|
|
1841
|
+
},
|
|
1842
|
+
/**
|
|
1843
|
+
* GSI1 — Unified Sharded List: list all resources of this type in a workspace; reads fan
|
|
1844
|
+
* out across the four shards and merge by SK. SK is the writer-supplied `gsi1sk` verbatim
|
|
1845
|
+
* (per DR-004) so labeled types serve `BEGINS_WITH` prefix queries on the natural label.
|
|
1846
|
+
* `casing: "none"` is required on the SK because the writer (`extractSortKey`) already
|
|
1847
|
+
* applies DR-004 normalization — ElectroDB's default lowercasing would mangle the
|
|
1848
|
+
* ISO-8601 unlabeled fallback (`T`/`Z` → `t`/`z`).
|
|
1849
|
+
*/
|
|
1850
|
+
gsi1: {
|
|
1851
|
+
index: "GSI1",
|
|
1852
|
+
pk: {
|
|
1853
|
+
field: "GSI1PK",
|
|
1854
|
+
composite: ["tenantId", "workspaceId", "gsi1Shard"],
|
|
1855
|
+
template: `TID#\${tenantId}#WID#\${workspaceId}#RT#${resourceTypeLabel}#SHARD#\${gsi1Shard}`
|
|
1856
|
+
},
|
|
1857
|
+
sk: {
|
|
1858
|
+
field: "GSI1SK",
|
|
1859
|
+
casing: "none",
|
|
1860
|
+
composite: ["gsi1sk"],
|
|
1861
|
+
template: `\${gsi1sk}`
|
|
1862
|
+
}
|
|
1863
|
+
}
|
|
1864
|
+
}
|
|
1865
|
+
});
|
|
1866
|
+
}
|
|
1867
|
+
|
|
1868
|
+
// src/data/dynamo/entities/data/account-entity.ts
|
|
1869
|
+
var AccountEntity = createDataEntity("account", "Account");
|
|
1870
|
+
|
|
1871
|
+
// src/data/dynamo/entities/data/activity-definition-entity.ts
|
|
1872
|
+
var ActivityDefinitionEntity = createDataEntity(
|
|
1873
|
+
"activitydefinition",
|
|
1874
|
+
"ActivityDefinition"
|
|
1875
|
+
);
|
|
1876
|
+
|
|
1877
|
+
// src/data/dynamo/entities/data/adverse-event-entity.ts
|
|
1878
|
+
var AdverseEventEntity = createDataEntity(
|
|
1879
|
+
"adverseevent",
|
|
1880
|
+
"AdverseEvent"
|
|
1881
|
+
);
|
|
1882
|
+
|
|
1883
|
+
// src/data/dynamo/entities/data/allergy-intolerance-entity.ts
|
|
1884
|
+
var AllergyIntoleranceEntity = createDataEntity(
|
|
1885
|
+
"allergyintolerance",
|
|
1886
|
+
"AllergyIntolerance"
|
|
1887
|
+
);
|
|
1888
|
+
|
|
1889
|
+
// src/data/dynamo/entities/data/appointment-entity.ts
|
|
1890
|
+
var AppointmentEntity = createDataEntity("appointment", "Appointment");
|
|
1891
|
+
|
|
1892
|
+
// src/data/dynamo/entities/data/appointment-response-entity.ts
|
|
1893
|
+
var AppointmentResponseEntity = createDataEntity(
|
|
1894
|
+
"appointmentresponse",
|
|
1895
|
+
"AppointmentResponse"
|
|
1896
|
+
);
|
|
1897
|
+
|
|
1898
|
+
// src/data/dynamo/entities/data/audit-event-entity.ts
|
|
1899
|
+
var AuditEventEntity = createDataEntity("auditevent", "AuditEvent");
|
|
1900
|
+
|
|
1901
|
+
// src/data/dynamo/entities/data/basic-entity.ts
|
|
1902
|
+
var BasicEntity = createDataEntity("basic", "Basic");
|
|
1903
|
+
|
|
1904
|
+
// src/data/dynamo/entities/data/biologically-derived-product-entity.ts
|
|
1905
|
+
var BiologicallyDerivedProductEntity = createDataEntity(
|
|
1906
|
+
"biologicallyderivedproduct",
|
|
1907
|
+
"BiologicallyDerivedProduct"
|
|
1908
|
+
);
|
|
1909
|
+
|
|
1910
|
+
// src/data/dynamo/entities/data/body-structure-entity.ts
|
|
1911
|
+
var BodyStructureEntity = createDataEntity(
|
|
1912
|
+
"bodystructure",
|
|
1913
|
+
"BodyStructure"
|
|
1914
|
+
);
|
|
1915
|
+
|
|
1916
|
+
// src/data/dynamo/entities/data/capability-statement-entity.ts
|
|
1917
|
+
var CapabilityStatementEntity = createDataEntity(
|
|
1918
|
+
"capabilitystatement",
|
|
1919
|
+
"CapabilityStatement"
|
|
1920
|
+
);
|
|
1921
|
+
|
|
1922
|
+
// src/data/dynamo/entities/data/care-plan-entity.ts
|
|
1923
|
+
var CarePlanEntity = createDataEntity("careplan", "CarePlan");
|
|
1924
|
+
|
|
1925
|
+
// src/data/dynamo/entities/data/care-team-entity.ts
|
|
1926
|
+
var CareTeamEntity = createDataEntity("careteam", "CareTeam");
|
|
1927
|
+
|
|
1928
|
+
// src/data/dynamo/entities/data/catalog-entry-entity.ts
|
|
1929
|
+
var CatalogEntryEntity = createDataEntity(
|
|
1930
|
+
"catalogentry",
|
|
1931
|
+
"CatalogEntry"
|
|
1932
|
+
);
|
|
1933
|
+
|
|
1934
|
+
// src/data/dynamo/entities/data/charge-item-definition-entity.ts
|
|
1935
|
+
var ChargeItemDefinitionEntity = createDataEntity(
|
|
1936
|
+
"chargeitemdefinition",
|
|
1937
|
+
"ChargeItemDefinition"
|
|
1938
|
+
);
|
|
1939
|
+
|
|
1940
|
+
// src/data/dynamo/entities/data/charge-item-entity.ts
|
|
1941
|
+
var ChargeItemEntity = createDataEntity("chargeitem", "ChargeItem");
|
|
1942
|
+
|
|
1943
|
+
// src/data/dynamo/entities/data/claim-entity.ts
|
|
1944
|
+
var ClaimEntity = createDataEntity("claim", "Claim");
|
|
1945
|
+
|
|
1946
|
+
// src/data/dynamo/entities/data/claim-response-entity.ts
|
|
1947
|
+
var ClaimResponseEntity = createDataEntity(
|
|
1948
|
+
"claimresponse",
|
|
1949
|
+
"ClaimResponse"
|
|
1950
|
+
);
|
|
1951
|
+
|
|
1952
|
+
// src/data/dynamo/entities/data/clinical-impression-entity.ts
|
|
1953
|
+
var ClinicalImpressionEntity = createDataEntity(
|
|
1954
|
+
"clinicalimpression",
|
|
1955
|
+
"ClinicalImpression"
|
|
1956
|
+
);
|
|
1957
|
+
|
|
1958
|
+
// src/data/dynamo/entities/data/code-system-entity.ts
|
|
1959
|
+
var CodeSystemEntity = createDataEntity("codesystem", "CodeSystem");
|
|
1960
|
+
|
|
1961
|
+
// src/data/dynamo/entities/data/communication-entity.ts
|
|
1962
|
+
var CommunicationEntity = createDataEntity(
|
|
1963
|
+
"communication",
|
|
1964
|
+
"Communication"
|
|
1965
|
+
);
|
|
1966
|
+
|
|
1967
|
+
// src/data/dynamo/entities/data/communication-request-entity.ts
|
|
1968
|
+
var CommunicationRequestEntity = createDataEntity(
|
|
1969
|
+
"communicationrequest",
|
|
1970
|
+
"CommunicationRequest"
|
|
1971
|
+
);
|
|
1972
|
+
|
|
1973
|
+
// src/data/dynamo/entities/data/compartment-definition-entity.ts
|
|
1974
|
+
var CompartmentDefinitionEntity = createDataEntity(
|
|
1975
|
+
"compartmentdefinition",
|
|
1976
|
+
"CompartmentDefinition"
|
|
1977
|
+
);
|
|
1978
|
+
|
|
1979
|
+
// src/data/dynamo/entities/data/composition-entity.ts
|
|
1980
|
+
var CompositionEntity = createDataEntity("composition", "Composition");
|
|
1981
|
+
|
|
1982
|
+
// src/data/dynamo/entities/data/concept-map-entity.ts
|
|
1983
|
+
var ConceptMapEntity = createDataEntity("conceptmap", "ConceptMap");
|
|
1984
|
+
|
|
1985
|
+
// src/data/dynamo/entities/data/condition-entity.ts
|
|
1986
|
+
var ConditionEntity = createDataEntity("condition", "Condition");
|
|
1987
|
+
|
|
1988
|
+
// src/data/dynamo/entities/data/consent-entity.ts
|
|
1989
|
+
var ConsentEntity = createDataEntity("consent", "Consent");
|
|
1990
|
+
|
|
1991
|
+
// src/data/dynamo/entities/data/contract-entity.ts
|
|
1992
|
+
var ContractEntity = createDataEntity("contract", "Contract");
|
|
1993
|
+
|
|
1994
|
+
// src/data/dynamo/entities/data/coverage-eligibility-request-entity.ts
|
|
1995
|
+
var CoverageEligibilityRequestEntity = createDataEntity(
|
|
1996
|
+
"coverageeligibilityrequest",
|
|
1997
|
+
"CoverageEligibilityRequest"
|
|
1998
|
+
);
|
|
1999
|
+
|
|
2000
|
+
// src/data/dynamo/entities/data/coverage-eligibility-response-entity.ts
|
|
2001
|
+
var CoverageEligibilityResponseEntity = createDataEntity(
|
|
2002
|
+
"coverageeligibilityresponse",
|
|
2003
|
+
"CoverageEligibilityResponse"
|
|
2004
|
+
);
|
|
2005
|
+
|
|
2006
|
+
// src/data/dynamo/entities/data/coverage-entity.ts
|
|
2007
|
+
var CoverageEntity = createDataEntity("coverage", "Coverage");
|
|
2008
|
+
|
|
2009
|
+
// src/data/dynamo/entities/data/detected-issue-entity.ts
|
|
2010
|
+
var DetectedIssueEntity = createDataEntity(
|
|
2011
|
+
"detectedissue",
|
|
2012
|
+
"DetectedIssue"
|
|
2013
|
+
);
|
|
2014
|
+
|
|
2015
|
+
// src/data/dynamo/entities/data/device-definition-entity.ts
|
|
2016
|
+
var DeviceDefinitionEntity = createDataEntity(
|
|
2017
|
+
"devicedefinition",
|
|
2018
|
+
"DeviceDefinition"
|
|
2019
|
+
);
|
|
2020
|
+
|
|
2021
|
+
// src/data/dynamo/entities/data/device-entity.ts
|
|
2022
|
+
var DeviceEntity = createDataEntity("device", "Device");
|
|
2023
|
+
|
|
2024
|
+
// src/data/dynamo/entities/data/device-metric-entity.ts
|
|
2025
|
+
var DeviceMetricEntity = createDataEntity(
|
|
2026
|
+
"devicemetric",
|
|
2027
|
+
"DeviceMetric"
|
|
2028
|
+
);
|
|
2029
|
+
|
|
2030
|
+
// src/data/dynamo/entities/data/device-request-entity.ts
|
|
2031
|
+
var DeviceRequestEntity = createDataEntity(
|
|
2032
|
+
"devicerequest",
|
|
2033
|
+
"DeviceRequest"
|
|
2034
|
+
);
|
|
2035
|
+
|
|
2036
|
+
// src/data/dynamo/entities/data/device-use-statement-entity.ts
|
|
2037
|
+
var DeviceUseStatementEntity = createDataEntity(
|
|
2038
|
+
"deviceusestatement",
|
|
2039
|
+
"DeviceUseStatement"
|
|
2040
|
+
);
|
|
2041
|
+
|
|
2042
|
+
// src/data/dynamo/entities/data/diagnostic-report-entity.ts
|
|
2043
|
+
var DiagnosticReportEntity = createDataEntity(
|
|
2044
|
+
"diagnosticreport",
|
|
2045
|
+
"DiagnosticReport"
|
|
2046
|
+
);
|
|
2047
|
+
|
|
2048
|
+
// src/data/dynamo/entities/data/document-manifest-entity.ts
|
|
2049
|
+
var DocumentManifestEntity = createDataEntity(
|
|
2050
|
+
"documentmanifest",
|
|
2051
|
+
"DocumentManifest"
|
|
2052
|
+
);
|
|
2053
|
+
|
|
2054
|
+
// src/data/dynamo/entities/data/document-reference-entity.ts
|
|
2055
|
+
var DocumentReferenceEntity = createDataEntity(
|
|
2056
|
+
"documentreference",
|
|
2057
|
+
"DocumentReference"
|
|
2058
|
+
);
|
|
2059
|
+
|
|
2060
|
+
// src/data/dynamo/entities/data/effect-evidence-synthesis-entity.ts
|
|
2061
|
+
var EffectEvidenceSynthesisEntity = createDataEntity(
|
|
2062
|
+
"effectevidencesynthesis",
|
|
2063
|
+
"EffectEvidenceSynthesis"
|
|
2064
|
+
);
|
|
2065
|
+
|
|
2066
|
+
// src/data/dynamo/entities/data/encounter-entity.ts
|
|
2067
|
+
var EncounterEntity = createDataEntity("encounter", "Encounter");
|
|
2068
|
+
|
|
2069
|
+
// src/data/dynamo/entities/data/endpoint-entity.ts
|
|
2070
|
+
var EndpointEntity = createDataEntity("endpoint", "Endpoint");
|
|
2071
|
+
|
|
2072
|
+
// src/data/dynamo/entities/data/enrollment-request-entity.ts
|
|
2073
|
+
var EnrollmentRequestEntity = createDataEntity(
|
|
2074
|
+
"enrollmentrequest",
|
|
2075
|
+
"EnrollmentRequest"
|
|
2076
|
+
);
|
|
2077
|
+
|
|
2078
|
+
// src/data/dynamo/entities/data/enrollment-response-entity.ts
|
|
2079
|
+
var EnrollmentResponseEntity = createDataEntity(
|
|
2080
|
+
"enrollmentresponse",
|
|
2081
|
+
"EnrollmentResponse"
|
|
2082
|
+
);
|
|
2083
|
+
|
|
2084
|
+
// src/data/dynamo/entities/data/episode-of-care-entity.ts
|
|
2085
|
+
var EpisodeOfCareEntity = createDataEntity(
|
|
2086
|
+
"episodeofcare",
|
|
2087
|
+
"EpisodeOfCare"
|
|
2088
|
+
);
|
|
2089
|
+
|
|
2090
|
+
// src/data/dynamo/entities/data/event-definition-entity.ts
|
|
2091
|
+
var EventDefinitionEntity = createDataEntity(
|
|
2092
|
+
"eventdefinition",
|
|
2093
|
+
"EventDefinition"
|
|
2094
|
+
);
|
|
2095
|
+
|
|
2096
|
+
// src/data/dynamo/entities/data/evidence-entity.ts
|
|
2097
|
+
var EvidenceEntity = createDataEntity("evidence", "Evidence");
|
|
2098
|
+
|
|
2099
|
+
// src/data/dynamo/entities/data/evidence-variable-entity.ts
|
|
2100
|
+
var EvidenceVariableEntity = createDataEntity(
|
|
2101
|
+
"evidencevariable",
|
|
2102
|
+
"EvidenceVariable"
|
|
2103
|
+
);
|
|
2104
|
+
|
|
2105
|
+
// src/data/dynamo/entities/data/example-scenario-entity.ts
|
|
2106
|
+
var ExampleScenarioEntity = createDataEntity(
|
|
2107
|
+
"examplescenario",
|
|
2108
|
+
"ExampleScenario"
|
|
2109
|
+
);
|
|
2110
|
+
|
|
2111
|
+
// src/data/dynamo/entities/data/explanation-of-benefit-entity.ts
|
|
2112
|
+
var ExplanationOfBenefitEntity = createDataEntity(
|
|
2113
|
+
"explanationofbenefit",
|
|
2114
|
+
"ExplanationOfBenefit"
|
|
2115
|
+
);
|
|
2116
|
+
|
|
2117
|
+
// src/data/dynamo/entities/data/family-member-history-entity.ts
|
|
2118
|
+
var FamilyMemberHistoryEntity = createDataEntity(
|
|
2119
|
+
"familymemberhistory",
|
|
2120
|
+
"FamilyMemberHistory"
|
|
2121
|
+
);
|
|
2122
|
+
|
|
2123
|
+
// src/data/dynamo/entities/data/flag-entity.ts
|
|
2124
|
+
var FlagEntity = createDataEntity("flag", "Flag");
|
|
2125
|
+
|
|
2126
|
+
// src/data/dynamo/entities/data/goal-entity.ts
|
|
2127
|
+
var GoalEntity = createDataEntity("goal", "Goal");
|
|
2128
|
+
|
|
2129
|
+
// src/data/dynamo/entities/data/graph-definition-entity.ts
|
|
2130
|
+
var GraphDefinitionEntity = createDataEntity(
|
|
2131
|
+
"graphdefinition",
|
|
2132
|
+
"GraphDefinition"
|
|
2133
|
+
);
|
|
2134
|
+
|
|
2135
|
+
// src/data/dynamo/entities/data/group-entity.ts
|
|
2136
|
+
var GroupEntity = createDataEntity("group", "Group");
|
|
2137
|
+
|
|
2138
|
+
// src/data/dynamo/entities/data/guidance-response-entity.ts
|
|
2139
|
+
var GuidanceResponseEntity = createDataEntity(
|
|
2140
|
+
"guidanceresponse",
|
|
2141
|
+
"GuidanceResponse"
|
|
2142
|
+
);
|
|
2143
|
+
|
|
2144
|
+
// src/data/dynamo/entities/data/healthcare-service-entity.ts
|
|
2145
|
+
var HealthcareServiceEntity = createDataEntity(
|
|
2146
|
+
"healthcareservice",
|
|
2147
|
+
"HealthcareService"
|
|
2148
|
+
);
|
|
2149
|
+
|
|
2150
|
+
// src/data/dynamo/entities/data/imaging-study-entity.ts
|
|
2151
|
+
var ImagingStudyEntity = createDataEntity(
|
|
2152
|
+
"imagingstudy",
|
|
2153
|
+
"ImagingStudy"
|
|
2154
|
+
);
|
|
2155
|
+
|
|
2156
|
+
// src/data/dynamo/entities/data/immunization-entity.ts
|
|
2157
|
+
var ImmunizationEntity = createDataEntity(
|
|
2158
|
+
"immunization",
|
|
2159
|
+
"Immunization"
|
|
2160
|
+
);
|
|
2161
|
+
|
|
2162
|
+
// src/data/dynamo/entities/data/immunization-evaluation-entity.ts
|
|
2163
|
+
var ImmunizationEvaluationEntity = createDataEntity(
|
|
2164
|
+
"immunizationevaluation",
|
|
2165
|
+
"ImmunizationEvaluation"
|
|
2166
|
+
);
|
|
2167
|
+
|
|
2168
|
+
// src/data/dynamo/entities/data/immunization-recommendation-entity.ts
|
|
2169
|
+
var ImmunizationRecommendationEntity = createDataEntity(
|
|
2170
|
+
"immunizationrecommendation",
|
|
2171
|
+
"ImmunizationRecommendation"
|
|
2172
|
+
);
|
|
2173
|
+
|
|
2174
|
+
// src/data/dynamo/entities/data/implementation-guide-entity.ts
|
|
2175
|
+
var ImplementationGuideEntity = createDataEntity(
|
|
2176
|
+
"implementationguide",
|
|
2177
|
+
"ImplementationGuide"
|
|
2178
|
+
);
|
|
2179
|
+
|
|
2180
|
+
// src/data/dynamo/entities/data/insurance-plan-entity.ts
|
|
2181
|
+
var InsurancePlanEntity = createDataEntity(
|
|
2182
|
+
"insuranceplan",
|
|
2183
|
+
"InsurancePlan"
|
|
2184
|
+
);
|
|
2185
|
+
|
|
2186
|
+
// src/data/dynamo/entities/data/invoice-entity.ts
|
|
2187
|
+
var InvoiceEntity = createDataEntity("invoice", "Invoice");
|
|
2188
|
+
|
|
2189
|
+
// src/data/dynamo/entities/data/library-entity.ts
|
|
2190
|
+
var LibraryEntity = createDataEntity("library", "Library");
|
|
2191
|
+
|
|
2192
|
+
// src/data/dynamo/entities/data/linkage-entity.ts
|
|
2193
|
+
var LinkageEntity = createDataEntity("linkage", "Linkage");
|
|
2194
|
+
|
|
2195
|
+
// src/data/dynamo/entities/data/list-entity.ts
|
|
2196
|
+
var ListEntity = createDataEntity("list", "List");
|
|
2197
|
+
|
|
2198
|
+
// src/data/dynamo/entities/data/location-entity.ts
|
|
2199
|
+
var LocationEntity = createDataEntity("location", "Location");
|
|
2200
|
+
|
|
2201
|
+
// src/data/dynamo/entities/data/measure-entity.ts
|
|
2202
|
+
var MeasureEntity = createDataEntity("measure", "Measure");
|
|
2203
|
+
|
|
2204
|
+
// src/data/dynamo/entities/data/measure-report-entity.ts
|
|
2205
|
+
var MeasureReportEntity = createDataEntity(
|
|
2206
|
+
"measurereport",
|
|
2207
|
+
"MeasureReport"
|
|
2208
|
+
);
|
|
2209
|
+
|
|
2210
|
+
// src/data/dynamo/entities/data/media-entity.ts
|
|
2211
|
+
var MediaEntity = createDataEntity("media", "Media");
|
|
2212
|
+
|
|
2213
|
+
// src/data/dynamo/entities/data/medication-administration-entity.ts
|
|
2214
|
+
var MedicationAdministrationEntity = createDataEntity(
|
|
2215
|
+
"medicationadministration",
|
|
2216
|
+
"MedicationAdministration"
|
|
2217
|
+
);
|
|
2218
|
+
|
|
2219
|
+
// src/data/dynamo/entities/data/medication-dispense-entity.ts
|
|
2220
|
+
var MedicationDispenseEntity = createDataEntity(
|
|
2221
|
+
"medicationdispense",
|
|
2222
|
+
"MedicationDispense"
|
|
2223
|
+
);
|
|
2224
|
+
|
|
2225
|
+
// src/data/dynamo/entities/data/medication-entity.ts
|
|
2226
|
+
var MedicationEntity = createDataEntity("medication", "Medication");
|
|
2227
|
+
|
|
2228
|
+
// src/data/dynamo/entities/data/medication-knowledge-entity.ts
|
|
2229
|
+
var MedicationKnowledgeEntity = createDataEntity(
|
|
2230
|
+
"medicationknowledge",
|
|
2231
|
+
"MedicationKnowledge"
|
|
2232
|
+
);
|
|
2233
|
+
|
|
2234
|
+
// src/data/dynamo/entities/data/medication-request-entity.ts
|
|
2235
|
+
var MedicationRequestEntity = createDataEntity(
|
|
2236
|
+
"medicationrequest",
|
|
2237
|
+
"MedicationRequest"
|
|
2238
|
+
);
|
|
2239
|
+
|
|
2240
|
+
// src/data/dynamo/entities/data/medication-statement-entity.ts
|
|
2241
|
+
var MedicationStatementEntity = createDataEntity(
|
|
2242
|
+
"medicationstatement",
|
|
2243
|
+
"MedicationStatement"
|
|
2244
|
+
);
|
|
2245
|
+
|
|
2246
|
+
// src/data/dynamo/entities/data/medicinal-product-authorization-entity.ts
|
|
2247
|
+
var MedicinalProductAuthorizationEntity = createDataEntity(
|
|
2248
|
+
"medicinalproductauthorization",
|
|
2249
|
+
"MedicinalProductAuthorization"
|
|
2250
|
+
);
|
|
2251
|
+
|
|
2252
|
+
// src/data/dynamo/entities/data/medicinal-product-contraindication-entity.ts
|
|
2253
|
+
var MedicinalProductContraindicationEntity = createDataEntity(
|
|
2254
|
+
"medicinalproductcontraindication",
|
|
2255
|
+
"MedicinalProductContraindication"
|
|
2256
|
+
);
|
|
2257
|
+
|
|
2258
|
+
// src/data/dynamo/entities/data/medicinal-product-entity.ts
|
|
2259
|
+
var MedicinalProductEntity = createDataEntity(
|
|
2260
|
+
"medicinalproduct",
|
|
2261
|
+
"MedicinalProduct"
|
|
2262
|
+
);
|
|
2263
|
+
|
|
2264
|
+
// src/data/dynamo/entities/data/medicinal-product-indication-entity.ts
|
|
2265
|
+
var MedicinalProductIndicationEntity = createDataEntity(
|
|
2266
|
+
"medicinalproductindication",
|
|
2267
|
+
"MedicinalProductIndication"
|
|
2268
|
+
);
|
|
2269
|
+
|
|
2270
|
+
// src/data/dynamo/entities/data/medicinal-product-ingredient-entity.ts
|
|
2271
|
+
var MedicinalProductIngredientEntity = createDataEntity(
|
|
2272
|
+
"medicinalproductingredient",
|
|
2273
|
+
"MedicinalProductIngredient"
|
|
2274
|
+
);
|
|
2275
|
+
|
|
2276
|
+
// src/data/dynamo/entities/data/medicinal-product-interaction-entity.ts
|
|
2277
|
+
var MedicinalProductInteractionEntity = createDataEntity(
|
|
2278
|
+
"medicinalproductinteraction",
|
|
2279
|
+
"MedicinalProductInteraction"
|
|
2280
|
+
);
|
|
2281
|
+
|
|
2282
|
+
// src/data/dynamo/entities/data/medicinal-product-manufactured-entity.ts
|
|
2283
|
+
var MedicinalProductManufacturedEntity = createDataEntity(
|
|
2284
|
+
"medicinalproductmanufactured",
|
|
2285
|
+
"MedicinalProductManufactured"
|
|
2286
|
+
);
|
|
2287
|
+
|
|
2288
|
+
// src/data/dynamo/entities/data/medicinal-product-packaged-entity.ts
|
|
2289
|
+
var MedicinalProductPackagedEntity = createDataEntity(
|
|
2290
|
+
"medicinalproductpackaged",
|
|
2291
|
+
"MedicinalProductPackaged"
|
|
2292
|
+
);
|
|
2293
|
+
|
|
2294
|
+
// src/data/dynamo/entities/data/medicinal-product-pharmaceutical-entity.ts
|
|
2295
|
+
var MedicinalProductPharmaceuticalEntity = createDataEntity(
|
|
2296
|
+
"medicinalproductpharmaceutical",
|
|
2297
|
+
"MedicinalProductPharmaceutical"
|
|
2298
|
+
);
|
|
2299
|
+
|
|
2300
|
+
// src/data/dynamo/entities/data/medicinal-product-undesirable-effect-entity.ts
|
|
2301
|
+
var MedicinalProductUndesirableEffectEntity = createDataEntity(
|
|
2302
|
+
"medicinalproductundesirableeffect",
|
|
2303
|
+
"MedicinalProductUndesirableEffect"
|
|
2304
|
+
);
|
|
2305
|
+
|
|
2306
|
+
// src/data/dynamo/entities/data/message-definition-entity.ts
|
|
2307
|
+
var MessageDefinitionEntity = createDataEntity(
|
|
2308
|
+
"messagedefinition",
|
|
2309
|
+
"MessageDefinition"
|
|
2310
|
+
);
|
|
2311
|
+
|
|
2312
|
+
// src/data/dynamo/entities/data/message-header-entity.ts
|
|
2313
|
+
var MessageHeaderEntity = createDataEntity(
|
|
2314
|
+
"messageheader",
|
|
2315
|
+
"MessageHeader"
|
|
2316
|
+
);
|
|
2317
|
+
|
|
2318
|
+
// src/data/dynamo/entities/data/molecular-sequence-entity.ts
|
|
2319
|
+
var MolecularSequenceEntity = createDataEntity(
|
|
2320
|
+
"molecularsequence",
|
|
2321
|
+
"MolecularSequence"
|
|
2322
|
+
);
|
|
2323
|
+
|
|
2324
|
+
// src/data/dynamo/entities/data/naming-system-entity.ts
|
|
2325
|
+
var NamingSystemEntity = createDataEntity(
|
|
2326
|
+
"namingsystem",
|
|
2327
|
+
"NamingSystem"
|
|
2328
|
+
);
|
|
2329
|
+
|
|
2330
|
+
// src/data/dynamo/entities/data/nutrition-order-entity.ts
|
|
2331
|
+
var NutritionOrderEntity = createDataEntity(
|
|
2332
|
+
"nutritionorder",
|
|
2333
|
+
"NutritionOrder"
|
|
2334
|
+
);
|
|
2335
|
+
|
|
2336
|
+
// src/data/dynamo/entities/data/observation-definition-entity.ts
|
|
2337
|
+
var ObservationDefinitionEntity = createDataEntity(
|
|
2338
|
+
"observationdefinition",
|
|
2339
|
+
"ObservationDefinition"
|
|
2340
|
+
);
|
|
2341
|
+
|
|
2342
|
+
// src/data/dynamo/entities/data/observation-entity.ts
|
|
2343
|
+
var ObservationEntity = createDataEntity("observation", "Observation");
|
|
2344
|
+
|
|
2345
|
+
// src/data/dynamo/entities/data/operation-definition-entity.ts
|
|
2346
|
+
var OperationDefinitionEntity = createDataEntity(
|
|
2347
|
+
"operationdefinition",
|
|
2348
|
+
"OperationDefinition"
|
|
2349
|
+
);
|
|
2350
|
+
|
|
2351
|
+
// src/data/dynamo/entities/data/organization-affiliation-entity.ts
|
|
2352
|
+
var OrganizationAffiliationEntity = createDataEntity(
|
|
2353
|
+
"organizationaffiliation",
|
|
2354
|
+
"OrganizationAffiliation"
|
|
2355
|
+
);
|
|
2356
|
+
|
|
2357
|
+
// src/data/dynamo/entities/data/organization-entity.ts
|
|
2358
|
+
var OrganizationEntity = createDataEntity(
|
|
2359
|
+
"organization",
|
|
2360
|
+
"Organization"
|
|
2361
|
+
);
|
|
2362
|
+
|
|
2363
|
+
// src/data/dynamo/entities/data/patient-entity.ts
|
|
2364
|
+
var PatientEntity = createDataEntity("patient", "Patient");
|
|
2365
|
+
|
|
2366
|
+
// src/data/dynamo/entities/data/payment-notice-entity.ts
|
|
2367
|
+
var PaymentNoticeEntity = createDataEntity(
|
|
2368
|
+
"paymentnotice",
|
|
2369
|
+
"PaymentNotice"
|
|
2370
|
+
);
|
|
2371
|
+
|
|
2372
|
+
// src/data/dynamo/entities/data/payment-reconciliation-entity.ts
|
|
2373
|
+
var PaymentReconciliationEntity = createDataEntity(
|
|
2374
|
+
"paymentreconciliation",
|
|
2375
|
+
"PaymentReconciliation"
|
|
2376
|
+
);
|
|
2377
|
+
|
|
2378
|
+
// src/data/dynamo/entities/data/person-entity.ts
|
|
2379
|
+
var PersonEntity = createDataEntity("person", "Person");
|
|
2380
|
+
|
|
2381
|
+
// src/data/dynamo/entities/data/plan-definition-entity.ts
|
|
2382
|
+
var PlanDefinitionEntity = createDataEntity(
|
|
2383
|
+
"plandefinition",
|
|
2384
|
+
"PlanDefinition"
|
|
2385
|
+
);
|
|
2386
|
+
|
|
2387
|
+
// src/data/dynamo/entities/data/practitioner-entity.ts
|
|
2388
|
+
var PractitionerEntity = createDataEntity(
|
|
2389
|
+
"practitioner",
|
|
2390
|
+
"Practitioner"
|
|
2391
|
+
);
|
|
2392
|
+
|
|
2393
|
+
// src/data/dynamo/entities/data/practitioner-role-entity.ts
|
|
2394
|
+
var PractitionerRoleEntity = createDataEntity(
|
|
2395
|
+
"practitionerrole",
|
|
2396
|
+
"PractitionerRole"
|
|
2397
|
+
);
|
|
2398
|
+
|
|
2399
|
+
// src/data/dynamo/entities/data/procedure-entity.ts
|
|
2400
|
+
var ProcedureEntity = createDataEntity("procedure", "Procedure");
|
|
2401
|
+
|
|
2402
|
+
// src/data/dynamo/entities/data/provenance-entity.ts
|
|
2403
|
+
var ProvenanceEntity = createDataEntity("provenance", "Provenance");
|
|
2404
|
+
|
|
2405
|
+
// src/data/dynamo/entities/data/questionnaire-entity.ts
|
|
2406
|
+
var QuestionnaireEntity = createDataEntity(
|
|
2407
|
+
"questionnaire",
|
|
2408
|
+
"Questionnaire"
|
|
2409
|
+
);
|
|
2410
|
+
|
|
2411
|
+
// src/data/dynamo/entities/data/questionnaire-response-entity.ts
|
|
2412
|
+
var QuestionnaireResponseEntity = createDataEntity(
|
|
2413
|
+
"questionnaireresponse",
|
|
2414
|
+
"QuestionnaireResponse"
|
|
2415
|
+
);
|
|
2416
|
+
|
|
2417
|
+
// src/data/dynamo/entities/data/related-person-entity.ts
|
|
2418
|
+
var RelatedPersonEntity = createDataEntity(
|
|
2419
|
+
"relatedperson",
|
|
2420
|
+
"RelatedPerson"
|
|
2421
|
+
);
|
|
2422
|
+
|
|
2423
|
+
// src/data/dynamo/entities/data/request-group-entity.ts
|
|
2424
|
+
var RequestGroupEntity = createDataEntity(
|
|
2425
|
+
"requestgroup",
|
|
2426
|
+
"RequestGroup"
|
|
2427
|
+
);
|
|
2428
|
+
|
|
2429
|
+
// src/data/dynamo/entities/data/research-definition-entity.ts
|
|
2430
|
+
var ResearchDefinitionEntity = createDataEntity(
|
|
2431
|
+
"researchdefinition",
|
|
2432
|
+
"ResearchDefinition"
|
|
2433
|
+
);
|
|
2434
|
+
|
|
2435
|
+
// src/data/dynamo/entities/data/research-element-definition-entity.ts
|
|
2436
|
+
var ResearchElementDefinitionEntity = createDataEntity(
|
|
2437
|
+
"researchelementdefinition",
|
|
2438
|
+
"ResearchElementDefinition"
|
|
2439
|
+
);
|
|
2440
|
+
|
|
2441
|
+
// src/data/dynamo/entities/data/research-study-entity.ts
|
|
2442
|
+
var ResearchStudyEntity = createDataEntity(
|
|
2443
|
+
"researchstudy",
|
|
2444
|
+
"ResearchStudy"
|
|
2445
|
+
);
|
|
2446
|
+
|
|
2447
|
+
// src/data/dynamo/entities/data/research-subject-entity.ts
|
|
2448
|
+
var ResearchSubjectEntity = createDataEntity(
|
|
2449
|
+
"researchsubject",
|
|
2450
|
+
"ResearchSubject"
|
|
2451
|
+
);
|
|
2452
|
+
|
|
2453
|
+
// src/data/dynamo/entities/data/risk-assessment-entity.ts
|
|
2454
|
+
var RiskAssessmentEntity = createDataEntity(
|
|
2455
|
+
"riskassessment",
|
|
2456
|
+
"RiskAssessment"
|
|
2457
|
+
);
|
|
2458
|
+
|
|
2459
|
+
// src/data/dynamo/entities/data/risk-evidence-synthesis-entity.ts
|
|
2460
|
+
var RiskEvidenceSynthesisEntity = createDataEntity(
|
|
2461
|
+
"riskevidencesynthesis",
|
|
2462
|
+
"RiskEvidenceSynthesis"
|
|
2463
|
+
);
|
|
2464
|
+
|
|
2465
|
+
// src/data/dynamo/entities/data/schedule-entity.ts
|
|
2466
|
+
var ScheduleEntity = createDataEntity("schedule", "Schedule");
|
|
2467
|
+
|
|
2468
|
+
// src/data/dynamo/entities/data/search-parameter-entity.ts
|
|
2469
|
+
var SearchParameterEntity = createDataEntity(
|
|
2470
|
+
"searchparameter",
|
|
2471
|
+
"SearchParameter"
|
|
2472
|
+
);
|
|
2473
|
+
|
|
2474
|
+
// src/data/dynamo/entities/data/service-request-entity.ts
|
|
2475
|
+
var ServiceRequestEntity = createDataEntity(
|
|
2476
|
+
"servicerequest",
|
|
2477
|
+
"ServiceRequest"
|
|
2478
|
+
);
|
|
2479
|
+
|
|
2480
|
+
// src/data/dynamo/entities/data/slot-entity.ts
|
|
2481
|
+
var SlotEntity = createDataEntity("slot", "Slot");
|
|
2482
|
+
|
|
2483
|
+
// src/data/dynamo/entities/data/specimen-definition-entity.ts
|
|
2484
|
+
var SpecimenDefinitionEntity = createDataEntity(
|
|
2485
|
+
"specimendefinition",
|
|
2486
|
+
"SpecimenDefinition"
|
|
2487
|
+
);
|
|
2488
|
+
|
|
2489
|
+
// src/data/dynamo/entities/data/specimen-entity.ts
|
|
2490
|
+
var SpecimenEntity = createDataEntity("specimen", "Specimen");
|
|
2491
|
+
|
|
2492
|
+
// src/data/dynamo/entities/data/structure-definition-entity.ts
|
|
2493
|
+
var StructureDefinitionEntity = createDataEntity(
|
|
2494
|
+
"structuredefinition",
|
|
2495
|
+
"StructureDefinition"
|
|
2496
|
+
);
|
|
2497
|
+
|
|
2498
|
+
// src/data/dynamo/entities/data/structure-map-entity.ts
|
|
2499
|
+
var StructureMapEntity = createDataEntity(
|
|
2500
|
+
"structuremap",
|
|
2501
|
+
"StructureMap"
|
|
2502
|
+
);
|
|
2503
|
+
|
|
2504
|
+
// src/data/dynamo/entities/data/subscription-entity.ts
|
|
2505
|
+
var SubscriptionEntity = createDataEntity(
|
|
2506
|
+
"subscription",
|
|
2507
|
+
"Subscription"
|
|
2508
|
+
);
|
|
2509
|
+
|
|
2510
|
+
// src/data/dynamo/entities/data/substance-entity.ts
|
|
2511
|
+
var SubstanceEntity = createDataEntity("substance", "Substance");
|
|
2512
|
+
|
|
2513
|
+
// src/data/dynamo/entities/data/substance-nucleic-acid-entity.ts
|
|
2514
|
+
var SubstanceNucleicAcidEntity = createDataEntity(
|
|
2515
|
+
"substancenucleicacid",
|
|
2516
|
+
"SubstanceNucleicAcid"
|
|
2517
|
+
);
|
|
2518
|
+
|
|
2519
|
+
// src/data/dynamo/entities/data/substance-polymer-entity.ts
|
|
2520
|
+
var SubstancePolymerEntity = createDataEntity(
|
|
2521
|
+
"substancepolymer",
|
|
2522
|
+
"SubstancePolymer"
|
|
2523
|
+
);
|
|
2524
|
+
|
|
2525
|
+
// src/data/dynamo/entities/data/substance-protein-entity.ts
|
|
2526
|
+
var SubstanceProteinEntity = createDataEntity(
|
|
2527
|
+
"substanceprotein",
|
|
2528
|
+
"SubstanceProtein"
|
|
2529
|
+
);
|
|
2530
|
+
|
|
2531
|
+
// src/data/dynamo/entities/data/substance-reference-information-entity.ts
|
|
2532
|
+
var SubstanceReferenceInformationEntity = createDataEntity(
|
|
2533
|
+
"substancereferenceinformation",
|
|
2534
|
+
"SubstanceReferenceInformation"
|
|
2535
|
+
);
|
|
2536
|
+
|
|
2537
|
+
// src/data/dynamo/entities/data/substance-source-material-entity.ts
|
|
2538
|
+
var SubstanceSourceMaterialEntity = createDataEntity(
|
|
2539
|
+
"substancesourcematerial",
|
|
2540
|
+
"SubstanceSourceMaterial"
|
|
2541
|
+
);
|
|
2542
|
+
|
|
2543
|
+
// src/data/dynamo/entities/data/substance-specification-entity.ts
|
|
2544
|
+
var SubstanceSpecificationEntity = createDataEntity(
|
|
2545
|
+
"substancespecification",
|
|
2546
|
+
"SubstanceSpecification"
|
|
2547
|
+
);
|
|
2548
|
+
|
|
2549
|
+
// src/data/dynamo/entities/data/supply-delivery-entity.ts
|
|
2550
|
+
var SupplyDeliveryEntity = createDataEntity(
|
|
2551
|
+
"supplydelivery",
|
|
2552
|
+
"SupplyDelivery"
|
|
2553
|
+
);
|
|
2554
|
+
|
|
2555
|
+
// src/data/dynamo/entities/data/supply-request-entity.ts
|
|
2556
|
+
var SupplyRequestEntity = createDataEntity(
|
|
2557
|
+
"supplyrequest",
|
|
2558
|
+
"SupplyRequest"
|
|
2559
|
+
);
|
|
2560
|
+
|
|
2561
|
+
// src/data/dynamo/entities/data/task-entity.ts
|
|
2562
|
+
var TaskEntity = createDataEntity("task", "Task");
|
|
2563
|
+
|
|
2564
|
+
// src/data/dynamo/entities/data/terminology-capabilities-entity.ts
|
|
2565
|
+
var TerminologyCapabilitiesEntity = createDataEntity(
|
|
2566
|
+
"terminologycapabilities",
|
|
2567
|
+
"TerminologyCapabilities"
|
|
2568
|
+
);
|
|
2569
|
+
|
|
2570
|
+
// src/data/dynamo/entities/data/test-report-entity.ts
|
|
2571
|
+
var TestReportEntity = createDataEntity("testreport", "TestReport");
|
|
2572
|
+
|
|
2573
|
+
// src/data/dynamo/entities/data/test-script-entity.ts
|
|
2574
|
+
var TestScriptEntity = createDataEntity("testscript", "TestScript");
|
|
2575
|
+
|
|
2576
|
+
// src/data/dynamo/entities/data/value-set-entity.ts
|
|
2577
|
+
var ValueSetEntity = createDataEntity("valueset", "ValueSet");
|
|
2578
|
+
|
|
2579
|
+
// src/data/dynamo/entities/data/verification-result-entity.ts
|
|
2580
|
+
var VerificationResultEntity = createDataEntity(
|
|
2581
|
+
"verificationresult",
|
|
2582
|
+
"VerificationResult"
|
|
2583
|
+
);
|
|
2584
|
+
|
|
2585
|
+
// src/data/dynamo/entities/data/vision-prescription-entity.ts
|
|
2586
|
+
var VisionPrescriptionEntity = createDataEntity(
|
|
2587
|
+
"visionprescription",
|
|
2588
|
+
"VisionPrescription"
|
|
2589
|
+
);
|
|
2590
|
+
|
|
2591
|
+
// src/data/dynamo/dynamo-data-service.ts
|
|
2592
|
+
var dataPlaneEntities = {
|
|
2593
|
+
account: AccountEntity,
|
|
2594
|
+
activitydefinition: ActivityDefinitionEntity,
|
|
2595
|
+
adverseevent: AdverseEventEntity,
|
|
2596
|
+
allergyintolerance: AllergyIntoleranceEntity,
|
|
2597
|
+
appointment: AppointmentEntity,
|
|
2598
|
+
appointmentresponse: AppointmentResponseEntity,
|
|
2599
|
+
auditevent: AuditEventEntity,
|
|
2600
|
+
basic: BasicEntity,
|
|
2601
|
+
biologicallyderivedproduct: BiologicallyDerivedProductEntity,
|
|
2602
|
+
bodystructure: BodyStructureEntity,
|
|
2603
|
+
capabilitystatement: CapabilityStatementEntity,
|
|
2604
|
+
careplan: CarePlanEntity,
|
|
2605
|
+
careteam: CareTeamEntity,
|
|
2606
|
+
catalogentry: CatalogEntryEntity,
|
|
2607
|
+
codesystem: CodeSystemEntity,
|
|
2608
|
+
chargeitem: ChargeItemEntity,
|
|
2609
|
+
chargeitemdefinition: ChargeItemDefinitionEntity,
|
|
2610
|
+
claim: ClaimEntity,
|
|
2611
|
+
claimresponse: ClaimResponseEntity,
|
|
2612
|
+
clinicalimpression: ClinicalImpressionEntity,
|
|
2613
|
+
communication: CommunicationEntity,
|
|
2614
|
+
communicationrequest: CommunicationRequestEntity,
|
|
2615
|
+
compartmentdefinition: CompartmentDefinitionEntity,
|
|
2616
|
+
composition: CompositionEntity,
|
|
2617
|
+
conceptmap: ConceptMapEntity,
|
|
2618
|
+
condition: ConditionEntity,
|
|
2619
|
+
consent: ConsentEntity,
|
|
2620
|
+
contract: ContractEntity,
|
|
2621
|
+
coverage: CoverageEntity,
|
|
2622
|
+
coverageeligibilityrequest: CoverageEligibilityRequestEntity,
|
|
2623
|
+
coverageeligibilityresponse: CoverageEligibilityResponseEntity,
|
|
2624
|
+
detectedissue: DetectedIssueEntity,
|
|
2625
|
+
device: DeviceEntity,
|
|
2626
|
+
devicedefinition: DeviceDefinitionEntity,
|
|
2627
|
+
devicemetric: DeviceMetricEntity,
|
|
2628
|
+
devicerequest: DeviceRequestEntity,
|
|
2629
|
+
deviceusestatement: DeviceUseStatementEntity,
|
|
2630
|
+
diagnosticreport: DiagnosticReportEntity,
|
|
2631
|
+
documentmanifest: DocumentManifestEntity,
|
|
2632
|
+
documentreference: DocumentReferenceEntity,
|
|
2633
|
+
effectevidencesynthesis: EffectEvidenceSynthesisEntity,
|
|
2634
|
+
encounter: EncounterEntity,
|
|
2635
|
+
examplescenario: ExampleScenarioEntity,
|
|
2636
|
+
endpoint: EndpointEntity,
|
|
2637
|
+
enrollmentrequest: EnrollmentRequestEntity,
|
|
2638
|
+
enrollmentresponse: EnrollmentResponseEntity,
|
|
2639
|
+
episodeofcare: EpisodeOfCareEntity,
|
|
2640
|
+
eventdefinition: EventDefinitionEntity,
|
|
2641
|
+
evidence: EvidenceEntity,
|
|
2642
|
+
evidencevariable: EvidenceVariableEntity,
|
|
2643
|
+
explanationofbenefit: ExplanationOfBenefitEntity,
|
|
2644
|
+
familymemberhistory: FamilyMemberHistoryEntity,
|
|
2645
|
+
flag: FlagEntity,
|
|
2646
|
+
goal: GoalEntity,
|
|
2647
|
+
graphdefinition: GraphDefinitionEntity,
|
|
2648
|
+
group: GroupEntity,
|
|
2649
|
+
guidanceresponse: GuidanceResponseEntity,
|
|
2650
|
+
healthcareservice: HealthcareServiceEntity,
|
|
2651
|
+
immunization: ImmunizationEntity,
|
|
2652
|
+
immunizationevaluation: ImmunizationEvaluationEntity,
|
|
2653
|
+
immunizationrecommendation: ImmunizationRecommendationEntity,
|
|
2654
|
+
imagingstudy: ImagingStudyEntity,
|
|
2655
|
+
implementationguide: ImplementationGuideEntity,
|
|
2656
|
+
insuranceplan: InsurancePlanEntity,
|
|
2657
|
+
invoice: InvoiceEntity,
|
|
2658
|
+
library: LibraryEntity,
|
|
2659
|
+
linkage: LinkageEntity,
|
|
2660
|
+
list: ListEntity,
|
|
2661
|
+
location: LocationEntity,
|
|
2662
|
+
medication: MedicationEntity,
|
|
2663
|
+
medicationadministration: MedicationAdministrationEntity,
|
|
2664
|
+
medicationdispense: MedicationDispenseEntity,
|
|
2665
|
+
medicationknowledge: MedicationKnowledgeEntity,
|
|
2666
|
+
medicationrequest: MedicationRequestEntity,
|
|
2667
|
+
medicationstatement: MedicationStatementEntity,
|
|
2668
|
+
medicinalproduct: MedicinalProductEntity,
|
|
2669
|
+
medicinalproductauthorization: MedicinalProductAuthorizationEntity,
|
|
2670
|
+
medicinalproductcontraindication: MedicinalProductContraindicationEntity,
|
|
2671
|
+
medicinalproductingredient: MedicinalProductIngredientEntity,
|
|
2672
|
+
medicinalproductindication: MedicinalProductIndicationEntity,
|
|
2673
|
+
medicinalproductinteraction: MedicinalProductInteractionEntity,
|
|
2674
|
+
medicinalproductmanufactured: MedicinalProductManufacturedEntity,
|
|
2675
|
+
medicinalproductpackaged: MedicinalProductPackagedEntity,
|
|
2676
|
+
medicinalproductpharmaceutical: MedicinalProductPharmaceuticalEntity,
|
|
2677
|
+
medicinalproductundesirableeffect: MedicinalProductUndesirableEffectEntity,
|
|
2678
|
+
media: MediaEntity,
|
|
2679
|
+
measure: MeasureEntity,
|
|
2680
|
+
measurereport: MeasureReportEntity,
|
|
2681
|
+
messagedefinition: MessageDefinitionEntity,
|
|
2682
|
+
messageheader: MessageHeaderEntity,
|
|
2683
|
+
molecularsequence: MolecularSequenceEntity,
|
|
2684
|
+
namingsystem: NamingSystemEntity,
|
|
2685
|
+
nutritionorder: NutritionOrderEntity,
|
|
2686
|
+
observation: ObservationEntity,
|
|
2687
|
+
observationdefinition: ObservationDefinitionEntity,
|
|
2688
|
+
operationdefinition: OperationDefinitionEntity,
|
|
2689
|
+
organization: OrganizationEntity,
|
|
2690
|
+
organizationaffiliation: OrganizationAffiliationEntity,
|
|
2691
|
+
patient: PatientEntity,
|
|
2692
|
+
paymentnotice: PaymentNoticeEntity,
|
|
2693
|
+
paymentreconciliation: PaymentReconciliationEntity,
|
|
2694
|
+
person: PersonEntity,
|
|
2695
|
+
plandefinition: PlanDefinitionEntity,
|
|
2696
|
+
practitioner: PractitionerEntity,
|
|
2697
|
+
practitionerrole: PractitionerRoleEntity,
|
|
2698
|
+
procedure: ProcedureEntity,
|
|
2699
|
+
provenance: ProvenanceEntity,
|
|
2700
|
+
questionnaire: QuestionnaireEntity,
|
|
2701
|
+
questionnaireresponse: QuestionnaireResponseEntity,
|
|
2702
|
+
requestgroup: RequestGroupEntity,
|
|
2703
|
+
relatedperson: RelatedPersonEntity,
|
|
2704
|
+
researchdefinition: ResearchDefinitionEntity,
|
|
2705
|
+
researchelementdefinition: ResearchElementDefinitionEntity,
|
|
2706
|
+
researchstudy: ResearchStudyEntity,
|
|
2707
|
+
researchsubject: ResearchSubjectEntity,
|
|
2708
|
+
riskassessment: RiskAssessmentEntity,
|
|
2709
|
+
riskevidencesynthesis: RiskEvidenceSynthesisEntity,
|
|
2710
|
+
schedule: ScheduleEntity,
|
|
2711
|
+
searchparameter: SearchParameterEntity,
|
|
2712
|
+
servicerequest: ServiceRequestEntity,
|
|
2713
|
+
specimen: SpecimenEntity,
|
|
2714
|
+
specimendefinition: SpecimenDefinitionEntity,
|
|
2715
|
+
structuredefinition: StructureDefinitionEntity,
|
|
2716
|
+
structuremap: StructureMapEntity,
|
|
2717
|
+
substance: SubstanceEntity,
|
|
2718
|
+
substancenucleicacid: SubstanceNucleicAcidEntity,
|
|
2719
|
+
substancepolymer: SubstancePolymerEntity,
|
|
2720
|
+
substanceprotein: SubstanceProteinEntity,
|
|
2721
|
+
substancereferenceinformation: SubstanceReferenceInformationEntity,
|
|
2722
|
+
substancespecification: SubstanceSpecificationEntity,
|
|
2723
|
+
substancesourcematerial: SubstanceSourceMaterialEntity,
|
|
2724
|
+
subscription: SubscriptionEntity,
|
|
2725
|
+
terminologycapabilities: TerminologyCapabilitiesEntity,
|
|
2726
|
+
testreport: TestReportEntity,
|
|
2727
|
+
testscript: TestScriptEntity,
|
|
2728
|
+
valueset: ValueSetEntity,
|
|
2729
|
+
supplydelivery: SupplyDeliveryEntity,
|
|
2730
|
+
supplyrequest: SupplyRequestEntity,
|
|
2731
|
+
slot: SlotEntity,
|
|
2732
|
+
task: TaskEntity,
|
|
2733
|
+
visionprescription: VisionPrescriptionEntity,
|
|
2734
|
+
verificationresult: VerificationResultEntity
|
|
2735
|
+
};
|
|
2736
|
+
var dataPlaneService = new import_electrodb10.Service(dataPlaneEntities, {
|
|
2737
|
+
table: defaultTableName,
|
|
2738
|
+
client: dynamoClient
|
|
2739
|
+
});
|
|
2740
|
+
var DynamoDataService = {
|
|
2741
|
+
entities: dataPlaneService.entities
|
|
2742
|
+
};
|
|
2743
|
+
function getDynamoDataService(tableName) {
|
|
2744
|
+
const resolved = tableName ?? defaultTableName;
|
|
2745
|
+
const service = new import_electrodb10.Service(dataPlaneEntities, {
|
|
2746
|
+
table: resolved,
|
|
2747
|
+
client: dynamoClient
|
|
2748
|
+
});
|
|
2749
|
+
return {
|
|
2750
|
+
entities: service.entities
|
|
2751
|
+
};
|
|
2752
|
+
}
|
|
2753
|
+
|
|
2754
|
+
// src/data/operations/data-operations-common.ts
|
|
1692
2755
|
var import_types6 = require("@openhi/types");
|
|
2756
|
+
|
|
2757
|
+
// src/lib/compression.ts
|
|
2758
|
+
var import_node_zlib = require("zlib");
|
|
2759
|
+
var ENVELOPE_VERSION = 1;
|
|
2760
|
+
var COMPRESSION_ALGOS = {
|
|
2761
|
+
NONE: "none",
|
|
2762
|
+
GZIP: "gzip",
|
|
2763
|
+
BROTLI: "brotli",
|
|
2764
|
+
DEFLATE: "deflate"
|
|
2765
|
+
};
|
|
2766
|
+
function compressResource(jsonString, options) {
|
|
2767
|
+
const algo = options?.algo ?? COMPRESSION_ALGOS.GZIP;
|
|
2768
|
+
if (algo === COMPRESSION_ALGOS.NONE) {
|
|
2769
|
+
const envelope2 = {
|
|
2770
|
+
v: ENVELOPE_VERSION,
|
|
2771
|
+
algo: COMPRESSION_ALGOS.NONE,
|
|
2772
|
+
payload: jsonString
|
|
2773
|
+
};
|
|
2774
|
+
return JSON.stringify(envelope2);
|
|
2775
|
+
}
|
|
2776
|
+
const buf = Buffer.from(jsonString, "utf-8");
|
|
2777
|
+
const payload = (0, import_node_zlib.gzipSync)(buf).toString("base64");
|
|
2778
|
+
const envelope = {
|
|
2779
|
+
v: ENVELOPE_VERSION,
|
|
2780
|
+
algo: COMPRESSION_ALGOS.GZIP,
|
|
2781
|
+
payload
|
|
2782
|
+
};
|
|
2783
|
+
return JSON.stringify(envelope);
|
|
2784
|
+
}
|
|
2785
|
+
|
|
2786
|
+
// src/data/operations/data-operations-common.ts
|
|
2787
|
+
var DATA_ENTITY_SK = "CURRENT";
|
|
2788
|
+
async function createDataEntityRecord(entity, tenantId, workspaceId, id, resourceWithAudit, fallbackDate) {
|
|
2789
|
+
const lastUpdated = resourceWithAudit.meta?.lastUpdated ?? fallbackDate ?? (/* @__PURE__ */ new Date()).toISOString();
|
|
2790
|
+
const vid = lastUpdated.replace(/[-:T.Z]/g, "").slice(0, 12) || Date.now().toString(36);
|
|
2791
|
+
const resourceLike = resourceWithAudit;
|
|
2792
|
+
const summary = JSON.stringify((0, import_types6.extractSummary)(resourceLike));
|
|
2793
|
+
const gsi1sk = (0, import_types6.extractSortKey)(resourceLike);
|
|
2794
|
+
await entity.put({
|
|
2795
|
+
sk: DATA_ENTITY_SK,
|
|
2796
|
+
tenantId,
|
|
2797
|
+
workspaceId,
|
|
2798
|
+
id,
|
|
2799
|
+
resource: compressResource(JSON.stringify(resourceWithAudit)),
|
|
2800
|
+
summary,
|
|
2801
|
+
vid,
|
|
2802
|
+
lastUpdated,
|
|
2803
|
+
gsi1sk
|
|
2804
|
+
}).go();
|
|
2805
|
+
return {
|
|
2806
|
+
id,
|
|
2807
|
+
resource: resourceWithAudit
|
|
2808
|
+
};
|
|
2809
|
+
}
|
|
2810
|
+
|
|
2811
|
+
// src/data/operations/data/organization/organization-provision-for-workspace-operation.ts
|
|
2812
|
+
async function provisionOrganizationForWorkspaceOperation(params) {
|
|
2813
|
+
const { context, workspaceId, workspaceName, tableName } = params;
|
|
2814
|
+
const { tenantId, date } = context;
|
|
2815
|
+
const service = getDynamoDataService(tableName);
|
|
2816
|
+
const partOf = await resolveTenantOrganizationReference(service, tenantId);
|
|
2817
|
+
const resource = {
|
|
2818
|
+
resourceType: "Organization",
|
|
2819
|
+
id: workspaceId,
|
|
2820
|
+
...workspaceName !== void 0 && workspaceName !== "" ? { name: workspaceName } : {},
|
|
2821
|
+
...partOf !== void 0 ? { partOf } : {},
|
|
2822
|
+
meta: {
|
|
2823
|
+
lastUpdated: date,
|
|
2824
|
+
versionId: "1"
|
|
2825
|
+
}
|
|
2826
|
+
};
|
|
2827
|
+
return createDataEntityRecord(
|
|
2828
|
+
service.entities.organization,
|
|
2829
|
+
tenantId,
|
|
2830
|
+
workspaceId,
|
|
2831
|
+
workspaceId,
|
|
2832
|
+
resource,
|
|
2833
|
+
date
|
|
2834
|
+
);
|
|
2835
|
+
}
|
|
2836
|
+
async function resolveTenantOrganizationReference(service, tenantId) {
|
|
2837
|
+
const result = await service.entities.organization.get({
|
|
2838
|
+
tenantId,
|
|
2839
|
+
workspaceId: tenantId,
|
|
2840
|
+
id: tenantId,
|
|
2841
|
+
sk: DATA_ENTITY_SK
|
|
2842
|
+
}).go();
|
|
2843
|
+
if (result.data === null || result.data === void 0) {
|
|
2844
|
+
return void 0;
|
|
2845
|
+
}
|
|
2846
|
+
return { reference: `Organization/${tenantId}` };
|
|
2847
|
+
}
|
|
2848
|
+
|
|
2849
|
+
// src/data/operations/control/workspace/workspace-create-operation.ts
|
|
1693
2850
|
async function createWorkspaceOperation(params) {
|
|
1694
2851
|
const { context, body, tableName } = params;
|
|
1695
2852
|
const { tenantId } = context;
|
|
@@ -1699,7 +2856,7 @@ async function createWorkspaceOperation(params) {
|
|
|
1699
2856
|
const vid = lastUpdated.replace(/[-:T.Z]/g, "").slice(0, 12) || Date.now().toString(36);
|
|
1700
2857
|
const parsedResource = typeof body.resource === "string" ? JSON.parse(body.resource) : body.resource ?? {};
|
|
1701
2858
|
const resource = { resourceType: "Workspace", id, ...parsedResource };
|
|
1702
|
-
const summary = JSON.stringify((0,
|
|
2859
|
+
const summary = JSON.stringify((0, import_types7.extractSummary)(resource));
|
|
1703
2860
|
await service.entities.workspace.put({
|
|
1704
2861
|
tenantId,
|
|
1705
2862
|
id,
|
|
@@ -1708,6 +2865,13 @@ async function createWorkspaceOperation(params) {
|
|
|
1708
2865
|
vid,
|
|
1709
2866
|
lastUpdated
|
|
1710
2867
|
}).go();
|
|
2868
|
+
const workspaceName = typeof parsedResource.name === "string" ? parsedResource.name : void 0;
|
|
2869
|
+
await provisionOrganizationForWorkspaceOperation({
|
|
2870
|
+
context,
|
|
2871
|
+
workspaceId: id,
|
|
2872
|
+
workspaceName,
|
|
2873
|
+
tableName
|
|
2874
|
+
});
|
|
1711
2875
|
return { id, resource, meta: { lastUpdated, versionId: vid } };
|
|
1712
2876
|
}
|
|
1713
2877
|
|
|
@@ -1720,9 +2884,9 @@ var errorMessage = (err) => {
|
|
|
1720
2884
|
return String(err);
|
|
1721
2885
|
};
|
|
1722
2886
|
var idForRoleCode = (code) => {
|
|
1723
|
-
for (const key of Object.keys(
|
|
1724
|
-
if (
|
|
1725
|
-
return
|
|
2887
|
+
for (const key of Object.keys(import_types8.PLATFORM_ROLE_IDS)) {
|
|
2888
|
+
if (import_types8.PLATFORM_ROLE_CONCEPTS[key].code === code) {
|
|
2889
|
+
return import_types8.PLATFORM_ROLE_IDS[key];
|
|
1726
2890
|
}
|
|
1727
2891
|
}
|
|
1728
2892
|
throw new Error(`No id mapping for role code "${code}".`);
|
|
@@ -1737,7 +2901,7 @@ var verifySystemRolesExist = async () => {
|
|
|
1737
2901
|
actorType: "internal-system",
|
|
1738
2902
|
source: "step-function"
|
|
1739
2903
|
};
|
|
1740
|
-
for (const id of Object.values(
|
|
2904
|
+
for (const id of Object.values(import_types8.PLATFORM_ROLE_IDS)) {
|
|
1741
2905
|
try {
|
|
1742
2906
|
await getRoleByIdOperation({ context: probeContext, id });
|
|
1743
2907
|
} catch (err) {
|
|
@@ -1818,7 +2982,7 @@ var userResourceBody = (user, cognitoSub) => ({
|
|
|
1818
2982
|
var upsertUser = async (context, user, cognitoSub) => {
|
|
1819
2983
|
const service = getDynamoControlService();
|
|
1820
2984
|
const resource = userResourceBody(user, cognitoSub);
|
|
1821
|
-
const summary = JSON.stringify((0,
|
|
2985
|
+
const summary = JSON.stringify((0, import_types8.extractSummary)(resource));
|
|
1822
2986
|
await service.entities.user.put({
|
|
1823
2987
|
id: user.id,
|
|
1824
2988
|
cognitoSub,
|
|
@@ -1886,7 +3050,7 @@ var seedDemoGraph = async (params) => {
|
|
|
1886
3050
|
...baseContext,
|
|
1887
3051
|
tenantId: PLATFORM_SCOPE_TENANT_ID
|
|
1888
3052
|
};
|
|
1889
|
-
const platformRoleCode =
|
|
3053
|
+
const platformRoleCode = import_types8.PLATFORM_ROLE_CODE.SYSTEM_ADMIN;
|
|
1890
3054
|
const platformRaId = demoRoleAssignmentId(
|
|
1891
3055
|
user.id,
|
|
1892
3056
|
PLATFORM_SCOPE_TENANT_ID,
|