@openhi/constructs 0.0.110 → 0.0.112

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.
Files changed (117) hide show
  1. package/lib/chunk-23PUSHBV.mjs +24 -0
  2. package/lib/chunk-23PUSHBV.mjs.map +1 -0
  3. package/lib/chunk-2O3CXY2C.mjs +79 -0
  4. package/lib/chunk-2O3CXY2C.mjs.map +1 -0
  5. package/lib/{chunk-7FUAMZOF.mjs → chunk-53OHXLIL.mjs} +3 -3
  6. package/lib/chunk-6NBGYGFL.mjs +1803 -0
  7. package/lib/chunk-6NBGYGFL.mjs.map +1 -0
  8. package/lib/chunk-7RZHFI77.mjs +22 -0
  9. package/lib/chunk-7RZHFI77.mjs.map +1 -0
  10. package/lib/{chunk-7Q2IJ2J5.mjs → chunk-CUUKXDB2.mjs} +6 -6
  11. package/lib/chunk-FYHBHHWK.mjs +47 -0
  12. package/lib/chunk-FYHBHHWK.mjs.map +1 -0
  13. package/lib/{chunk-MULKGFIJ.mjs → chunk-GBDIGTNV.mjs} +165 -10
  14. package/lib/chunk-GBDIGTNV.mjs.map +1 -0
  15. package/lib/chunk-HQ67J7BP.mjs +199 -0
  16. package/lib/chunk-HQ67J7BP.mjs.map +1 -0
  17. package/lib/{chunk-AJ3G3THO.mjs → chunk-KO64HPWQ.mjs} +2 -2
  18. package/lib/{chunk-BB5MK4L3.mjs → chunk-KSFC72TT.mjs} +3 -3
  19. package/lib/{chunk-2TPJ6HOF.mjs → chunk-NZRW7ROK.mjs} +72 -54
  20. package/lib/chunk-NZRW7ROK.mjs.map +1 -0
  21. package/lib/chunk-QJDHVMKT.mjs +117 -0
  22. package/lib/chunk-QJDHVMKT.mjs.map +1 -0
  23. package/lib/{chunk-IS4VQRI4.mjs → chunk-QMBJ4VHC.mjs} +12 -47
  24. package/lib/chunk-QMBJ4VHC.mjs.map +1 -0
  25. package/lib/chunk-TRY7JGWO.mjs +16 -0
  26. package/lib/chunk-TRY7JGWO.mjs.map +1 -0
  27. package/lib/chunk-W4KR4CSL.mjs +236 -0
  28. package/lib/chunk-W4KR4CSL.mjs.map +1 -0
  29. package/lib/{chunk-AGF3RAAZ.mjs → chunk-WPCBVDFZ.mjs} +2 -2
  30. package/lib/chunk-WQWFVEVX.mjs +66 -0
  31. package/lib/chunk-WQWFVEVX.mjs.map +1 -0
  32. package/lib/{chunk-SYBADQXI.mjs → chunk-ZM4GDHHC.mjs} +77 -2
  33. package/lib/chunk-ZM4GDHHC.mjs.map +1 -0
  34. package/lib/data-store-postgres-replication.handler.js +26 -17
  35. package/lib/data-store-postgres-replication.handler.js.map +1 -1
  36. package/lib/data-store-postgres-replication.handler.mjs +5 -65
  37. package/lib/data-store-postgres-replication.handler.mjs.map +1 -1
  38. package/lib/delete-chunk.handler.d.mts +29 -0
  39. package/lib/delete-chunk.handler.d.ts +29 -0
  40. package/lib/delete-chunk.handler.js +2716 -0
  41. package/lib/delete-chunk.handler.js.map +1 -0
  42. package/lib/delete-chunk.handler.mjs +47 -0
  43. package/lib/delete-chunk.handler.mjs.map +1 -0
  44. package/lib/events-CjS-sm0W.d.mts +107 -0
  45. package/lib/events-CjS-sm0W.d.ts +107 -0
  46. package/lib/events-Da_cFgtc.d.mts +208 -0
  47. package/lib/events-Da_cFgtc.d.ts +208 -0
  48. package/lib/finalize.handler.d.mts +35 -0
  49. package/lib/finalize.handler.d.ts +35 -0
  50. package/lib/finalize.handler.js +875 -0
  51. package/lib/finalize.handler.js.map +1 -0
  52. package/lib/finalize.handler.mjs +166 -0
  53. package/lib/finalize.handler.mjs.map +1 -0
  54. package/lib/index.d.mts +189 -2
  55. package/lib/index.d.ts +500 -3
  56. package/lib/index.js +1753 -174
  57. package/lib/index.js.map +1 -1
  58. package/lib/index.mjs +571 -17
  59. package/lib/index.mjs.map +1 -1
  60. package/lib/list-chunks.handler.d.mts +28 -0
  61. package/lib/list-chunks.handler.d.ts +28 -0
  62. package/lib/list-chunks.handler.js +2746 -0
  63. package/lib/list-chunks.handler.js.map +1 -0
  64. package/lib/list-chunks.handler.mjs +54 -0
  65. package/lib/list-chunks.handler.mjs.map +1 -0
  66. package/lib/platform-deploy-bridge.handler.js +76 -1
  67. package/lib/platform-deploy-bridge.handler.js.map +1 -1
  68. package/lib/platform-deploy-bridge.handler.mjs +1 -1
  69. package/lib/pre-token-generation.handler.js +1106 -155
  70. package/lib/pre-token-generation.handler.js.map +1 -1
  71. package/lib/pre-token-generation.handler.mjs +6 -4
  72. package/lib/pre-token-generation.handler.mjs.map +1 -1
  73. package/lib/provision-default-workspace.handler.js +1529 -142
  74. package/lib/provision-default-workspace.handler.js.map +1 -1
  75. package/lib/provision-default-workspace.handler.mjs +8 -4
  76. package/lib/provision-default-workspace.handler.mjs.map +1 -1
  77. package/lib/rename-finalize.handler.d.mts +30 -0
  78. package/lib/rename-finalize.handler.d.ts +30 -0
  79. package/lib/rename-finalize.handler.js +795 -0
  80. package/lib/rename-finalize.handler.js.map +1 -0
  81. package/lib/rename-finalize.handler.mjs +90 -0
  82. package/lib/rename-finalize.handler.mjs.map +1 -0
  83. package/lib/rename-list-targets.handler.d.mts +26 -0
  84. package/lib/rename-list-targets.handler.d.ts +26 -0
  85. package/lib/rename-list-targets.handler.js +2985 -0
  86. package/lib/rename-list-targets.handler.js.map +1 -0
  87. package/lib/rename-list-targets.handler.mjs +431 -0
  88. package/lib/rename-list-targets.handler.mjs.map +1 -0
  89. package/lib/rename-rewrite-chunk.handler.d.mts +35 -0
  90. package/lib/rename-rewrite-chunk.handler.d.ts +35 -0
  91. package/lib/rename-rewrite-chunk.handler.js +2021 -0
  92. package/lib/rename-rewrite-chunk.handler.js.map +1 -0
  93. package/lib/rename-rewrite-chunk.handler.mjs +27 -0
  94. package/lib/rename-rewrite-chunk.handler.mjs.map +1 -0
  95. package/lib/rest-api-lambda.handler.js +4087 -921
  96. package/lib/rest-api-lambda.handler.js.map +1 -1
  97. package/lib/rest-api-lambda.handler.mjs +1827 -81
  98. package/lib/rest-api-lambda.handler.mjs.map +1 -1
  99. package/lib/seed-demo-data.handler.js +1588 -124
  100. package/lib/seed-demo-data.handler.js.map +1 -1
  101. package/lib/seed-demo-data.handler.mjs +10 -6
  102. package/lib/seed-system-data.handler.js +1179 -155
  103. package/lib/seed-system-data.handler.js.map +1 -1
  104. package/lib/seed-system-data.handler.mjs +5 -4
  105. package/lib/seed-system-data.handler.mjs.map +1 -1
  106. package/package.json +1 -1
  107. package/lib/chunk-2TPJ6HOF.mjs.map +0 -1
  108. package/lib/chunk-IS4VQRI4.mjs.map +0 -1
  109. package/lib/chunk-MULKGFIJ.mjs.map +0 -1
  110. package/lib/chunk-QR5JVSCF.mjs +0 -862
  111. package/lib/chunk-QR5JVSCF.mjs.map +0 -1
  112. package/lib/chunk-SYBADQXI.mjs.map +0 -1
  113. /package/lib/{chunk-7FUAMZOF.mjs.map → chunk-53OHXLIL.mjs.map} +0 -0
  114. /package/lib/{chunk-7Q2IJ2J5.mjs.map → chunk-CUUKXDB2.mjs.map} +0 -0
  115. /package/lib/{chunk-AJ3G3THO.mjs.map → chunk-KO64HPWQ.mjs.map} +0 -0
  116. /package/lib/{chunk-BB5MK4L3.mjs.map → chunk-KSFC72TT.mjs.map} +0 -0
  117. /package/lib/{chunk-AGF3RAAZ.mjs.map → chunk-WPCBVDFZ.mjs.map} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/data/dynamo/dynamo-data-service.ts","../src/data/dynamo/entities/data-entity-common.ts","../src/data/dynamo/entities/data/account-entity.ts","../src/data/dynamo/entities/data/activity-definition-entity.ts","../src/data/dynamo/entities/data/adverse-event-entity.ts","../src/data/dynamo/entities/data/allergy-intolerance-entity.ts","../src/data/dynamo/entities/data/appointment-entity.ts","../src/data/dynamo/entities/data/appointment-response-entity.ts","../src/data/dynamo/entities/data/audit-event-entity.ts","../src/data/dynamo/entities/data/basic-entity.ts","../src/data/dynamo/entities/data/biologically-derived-product-entity.ts","../src/data/dynamo/entities/data/body-structure-entity.ts","../src/data/dynamo/entities/data/capability-statement-entity.ts","../src/data/dynamo/entities/data/care-plan-entity.ts","../src/data/dynamo/entities/data/care-team-entity.ts","../src/data/dynamo/entities/data/catalog-entry-entity.ts","../src/data/dynamo/entities/data/charge-item-definition-entity.ts","../src/data/dynamo/entities/data/charge-item-entity.ts","../src/data/dynamo/entities/data/claim-entity.ts","../src/data/dynamo/entities/data/claim-response-entity.ts","../src/data/dynamo/entities/data/clinical-impression-entity.ts","../src/data/dynamo/entities/data/code-system-entity.ts","../src/data/dynamo/entities/data/communication-entity.ts","../src/data/dynamo/entities/data/communication-request-entity.ts","../src/data/dynamo/entities/data/compartment-definition-entity.ts","../src/data/dynamo/entities/data/composition-entity.ts","../src/data/dynamo/entities/data/concept-map-entity.ts","../src/data/dynamo/entities/data/condition-entity.ts","../src/data/dynamo/entities/data/consent-entity.ts","../src/data/dynamo/entities/data/contract-entity.ts","../src/data/dynamo/entities/data/coverage-eligibility-request-entity.ts","../src/data/dynamo/entities/data/coverage-eligibility-response-entity.ts","../src/data/dynamo/entities/data/coverage-entity.ts","../src/data/dynamo/entities/data/detected-issue-entity.ts","../src/data/dynamo/entities/data/device-definition-entity.ts","../src/data/dynamo/entities/data/device-entity.ts","../src/data/dynamo/entities/data/device-metric-entity.ts","../src/data/dynamo/entities/data/device-request-entity.ts","../src/data/dynamo/entities/data/device-use-statement-entity.ts","../src/data/dynamo/entities/data/diagnostic-report-entity.ts","../src/data/dynamo/entities/data/document-manifest-entity.ts","../src/data/dynamo/entities/data/document-reference-entity.ts","../src/data/dynamo/entities/data/effect-evidence-synthesis-entity.ts","../src/data/dynamo/entities/data/encounter-entity.ts","../src/data/dynamo/entities/data/endpoint-entity.ts","../src/data/dynamo/entities/data/enrollment-request-entity.ts","../src/data/dynamo/entities/data/enrollment-response-entity.ts","../src/data/dynamo/entities/data/episode-of-care-entity.ts","../src/data/dynamo/entities/data/event-definition-entity.ts","../src/data/dynamo/entities/data/evidence-entity.ts","../src/data/dynamo/entities/data/evidence-variable-entity.ts","../src/data/dynamo/entities/data/example-scenario-entity.ts","../src/data/dynamo/entities/data/explanation-of-benefit-entity.ts","../src/data/dynamo/entities/data/family-member-history-entity.ts","../src/data/dynamo/entities/data/flag-entity.ts","../src/data/dynamo/entities/data/goal-entity.ts","../src/data/dynamo/entities/data/graph-definition-entity.ts","../src/data/dynamo/entities/data/group-entity.ts","../src/data/dynamo/entities/data/guidance-response-entity.ts","../src/data/dynamo/entities/data/healthcare-service-entity.ts","../src/data/dynamo/entities/data/imaging-study-entity.ts","../src/data/dynamo/entities/data/immunization-entity.ts","../src/data/dynamo/entities/data/immunization-evaluation-entity.ts","../src/data/dynamo/entities/data/immunization-recommendation-entity.ts","../src/data/dynamo/entities/data/implementation-guide-entity.ts","../src/data/dynamo/entities/data/insurance-plan-entity.ts","../src/data/dynamo/entities/data/invoice-entity.ts","../src/data/dynamo/entities/data/library-entity.ts","../src/data/dynamo/entities/data/linkage-entity.ts","../src/data/dynamo/entities/data/list-entity.ts","../src/data/dynamo/entities/data/location-entity.ts","../src/data/dynamo/entities/data/measure-entity.ts","../src/data/dynamo/entities/data/measure-report-entity.ts","../src/data/dynamo/entities/data/media-entity.ts","../src/data/dynamo/entities/data/medication-administration-entity.ts","../src/data/dynamo/entities/data/medication-dispense-entity.ts","../src/data/dynamo/entities/data/medication-entity.ts","../src/data/dynamo/entities/data/medication-knowledge-entity.ts","../src/data/dynamo/entities/data/medication-request-entity.ts","../src/data/dynamo/entities/data/medication-statement-entity.ts","../src/data/dynamo/entities/data/medicinal-product-authorization-entity.ts","../src/data/dynamo/entities/data/medicinal-product-contraindication-entity.ts","../src/data/dynamo/entities/data/medicinal-product-entity.ts","../src/data/dynamo/entities/data/medicinal-product-indication-entity.ts","../src/data/dynamo/entities/data/medicinal-product-ingredient-entity.ts","../src/data/dynamo/entities/data/medicinal-product-interaction-entity.ts","../src/data/dynamo/entities/data/medicinal-product-manufactured-entity.ts","../src/data/dynamo/entities/data/medicinal-product-packaged-entity.ts","../src/data/dynamo/entities/data/medicinal-product-pharmaceutical-entity.ts","../src/data/dynamo/entities/data/medicinal-product-undesirable-effect-entity.ts","../src/data/dynamo/entities/data/message-definition-entity.ts","../src/data/dynamo/entities/data/message-header-entity.ts","../src/data/dynamo/entities/data/molecular-sequence-entity.ts","../src/data/dynamo/entities/data/naming-system-entity.ts","../src/data/dynamo/entities/data/nutrition-order-entity.ts","../src/data/dynamo/entities/data/observation-definition-entity.ts","../src/data/dynamo/entities/data/observation-entity.ts","../src/data/dynamo/entities/data/operation-definition-entity.ts","../src/data/dynamo/entities/data/organization-affiliation-entity.ts","../src/data/dynamo/entities/data/organization-entity.ts","../src/data/dynamo/entities/data/patient-entity.ts","../src/data/dynamo/entities/data/payment-notice-entity.ts","../src/data/dynamo/entities/data/payment-reconciliation-entity.ts","../src/data/dynamo/entities/data/person-entity.ts","../src/data/dynamo/entities/data/plan-definition-entity.ts","../src/data/dynamo/entities/data/practitioner-entity.ts","../src/data/dynamo/entities/data/practitioner-role-entity.ts","../src/data/dynamo/entities/data/procedure-entity.ts","../src/data/dynamo/entities/data/provenance-entity.ts","../src/data/dynamo/entities/data/questionnaire-entity.ts","../src/data/dynamo/entities/data/questionnaire-response-entity.ts","../src/data/dynamo/entities/data/related-person-entity.ts","../src/data/dynamo/entities/data/request-group-entity.ts","../src/data/dynamo/entities/data/research-definition-entity.ts","../src/data/dynamo/entities/data/research-element-definition-entity.ts","../src/data/dynamo/entities/data/research-study-entity.ts","../src/data/dynamo/entities/data/research-subject-entity.ts","../src/data/dynamo/entities/data/risk-assessment-entity.ts","../src/data/dynamo/entities/data/risk-evidence-synthesis-entity.ts","../src/data/dynamo/entities/data/schedule-entity.ts","../src/data/dynamo/entities/data/search-parameter-entity.ts","../src/data/dynamo/entities/data/service-request-entity.ts","../src/data/dynamo/entities/data/slot-entity.ts","../src/data/dynamo/entities/data/specimen-definition-entity.ts","../src/data/dynamo/entities/data/specimen-entity.ts","../src/data/dynamo/entities/data/structure-definition-entity.ts","../src/data/dynamo/entities/data/structure-map-entity.ts","../src/data/dynamo/entities/data/subscription-entity.ts","../src/data/dynamo/entities/data/substance-entity.ts","../src/data/dynamo/entities/data/substance-nucleic-acid-entity.ts","../src/data/dynamo/entities/data/substance-polymer-entity.ts","../src/data/dynamo/entities/data/substance-protein-entity.ts","../src/data/dynamo/entities/data/substance-reference-information-entity.ts","../src/data/dynamo/entities/data/substance-source-material-entity.ts","../src/data/dynamo/entities/data/substance-specification-entity.ts","../src/data/dynamo/entities/data/supply-delivery-entity.ts","../src/data/dynamo/entities/data/supply-request-entity.ts","../src/data/dynamo/entities/data/task-entity.ts","../src/data/dynamo/entities/data/terminology-capabilities-entity.ts","../src/data/dynamo/entities/data/test-report-entity.ts","../src/data/dynamo/entities/data/test-script-entity.ts","../src/data/dynamo/entities/data/value-set-entity.ts","../src/data/dynamo/entities/data/verification-result-entity.ts","../src/data/dynamo/entities/data/vision-prescription-entity.ts","../src/data/operations/data-operations-common.ts","../src/lib/compression.ts","../src/data/audit-meta.ts"],"sourcesContent":["import { Service } from \"electrodb\";\nimport { defaultTableName, dynamoClient } from \"./dynamo-client\";\nimport { AccountEntity } from \"./entities/data/account-entity\";\nimport { ActivityDefinitionEntity } from \"./entities/data/activity-definition-entity\";\nimport { AdverseEventEntity } from \"./entities/data/adverse-event-entity\";\nimport { AllergyIntoleranceEntity } from \"./entities/data/allergy-intolerance-entity\";\nimport { AppointmentEntity } from \"./entities/data/appointment-entity\";\nimport { AppointmentResponseEntity } from \"./entities/data/appointment-response-entity\";\nimport { AuditEventEntity } from \"./entities/data/audit-event-entity\";\nimport { BasicEntity } from \"./entities/data/basic-entity\";\nimport { BiologicallyDerivedProductEntity } from \"./entities/data/biologically-derived-product-entity\";\nimport { BodyStructureEntity } from \"./entities/data/body-structure-entity\";\nimport { CapabilityStatementEntity } from \"./entities/data/capability-statement-entity\";\nimport { CarePlanEntity } from \"./entities/data/care-plan-entity\";\nimport { CareTeamEntity } from \"./entities/data/care-team-entity\";\nimport { CatalogEntryEntity } from \"./entities/data/catalog-entry-entity\";\nimport { ChargeItemDefinitionEntity } from \"./entities/data/charge-item-definition-entity\";\nimport { ChargeItemEntity } from \"./entities/data/charge-item-entity\";\nimport { ClaimEntity } from \"./entities/data/claim-entity\";\nimport { ClaimResponseEntity } from \"./entities/data/claim-response-entity\";\nimport { ClinicalImpressionEntity } from \"./entities/data/clinical-impression-entity\";\nimport { CodeSystemEntity } from \"./entities/data/code-system-entity\";\nimport { CommunicationEntity } from \"./entities/data/communication-entity\";\nimport { CommunicationRequestEntity } from \"./entities/data/communication-request-entity\";\nimport { CompartmentDefinitionEntity } from \"./entities/data/compartment-definition-entity\";\nimport { CompositionEntity } from \"./entities/data/composition-entity\";\nimport { ConceptMapEntity } from \"./entities/data/concept-map-entity\";\nimport { ConditionEntity } from \"./entities/data/condition-entity\";\nimport { ConsentEntity } from \"./entities/data/consent-entity\";\nimport { ContractEntity } from \"./entities/data/contract-entity\";\nimport { CoverageEligibilityRequestEntity } from \"./entities/data/coverage-eligibility-request-entity\";\nimport { CoverageEligibilityResponseEntity } from \"./entities/data/coverage-eligibility-response-entity\";\nimport { CoverageEntity } from \"./entities/data/coverage-entity\";\nimport { DetectedIssueEntity } from \"./entities/data/detected-issue-entity\";\nimport { DeviceDefinitionEntity } from \"./entities/data/device-definition-entity\";\nimport { DeviceEntity } from \"./entities/data/device-entity\";\nimport { DeviceMetricEntity } from \"./entities/data/device-metric-entity\";\nimport { DeviceRequestEntity } from \"./entities/data/device-request-entity\";\nimport { DeviceUseStatementEntity } from \"./entities/data/device-use-statement-entity\";\nimport { DiagnosticReportEntity } from \"./entities/data/diagnostic-report-entity\";\nimport { DocumentManifestEntity } from \"./entities/data/document-manifest-entity\";\nimport { DocumentReferenceEntity } from \"./entities/data/document-reference-entity\";\nimport { EffectEvidenceSynthesisEntity } from \"./entities/data/effect-evidence-synthesis-entity\";\nimport { EncounterEntity } from \"./entities/data/encounter-entity\";\nimport { EndpointEntity } from \"./entities/data/endpoint-entity\";\nimport { EnrollmentRequestEntity } from \"./entities/data/enrollment-request-entity\";\nimport { EnrollmentResponseEntity } from \"./entities/data/enrollment-response-entity\";\nimport { EpisodeOfCareEntity } from \"./entities/data/episode-of-care-entity\";\nimport { EventDefinitionEntity } from \"./entities/data/event-definition-entity\";\nimport { EvidenceEntity } from \"./entities/data/evidence-entity\";\nimport { EvidenceVariableEntity } from \"./entities/data/evidence-variable-entity\";\nimport { ExampleScenarioEntity } from \"./entities/data/example-scenario-entity\";\nimport { ExplanationOfBenefitEntity } from \"./entities/data/explanation-of-benefit-entity\";\nimport { FamilyMemberHistoryEntity } from \"./entities/data/family-member-history-entity\";\nimport { FlagEntity } from \"./entities/data/flag-entity\";\nimport { GoalEntity } from \"./entities/data/goal-entity\";\nimport { GraphDefinitionEntity } from \"./entities/data/graph-definition-entity\";\nimport { GroupEntity } from \"./entities/data/group-entity\";\nimport { GuidanceResponseEntity } from \"./entities/data/guidance-response-entity\";\nimport { HealthcareServiceEntity } from \"./entities/data/healthcare-service-entity\";\nimport { ImagingStudyEntity } from \"./entities/data/imaging-study-entity\";\nimport { ImmunizationEntity } from \"./entities/data/immunization-entity\";\nimport { ImmunizationEvaluationEntity } from \"./entities/data/immunization-evaluation-entity\";\nimport { ImmunizationRecommendationEntity } from \"./entities/data/immunization-recommendation-entity\";\nimport { ImplementationGuideEntity } from \"./entities/data/implementation-guide-entity\";\nimport { InsurancePlanEntity } from \"./entities/data/insurance-plan-entity\";\nimport { InvoiceEntity } from \"./entities/data/invoice-entity\";\nimport { LibraryEntity } from \"./entities/data/library-entity\";\nimport { LinkageEntity } from \"./entities/data/linkage-entity\";\nimport { ListEntity } from \"./entities/data/list-entity\";\nimport { LocationEntity } from \"./entities/data/location-entity\";\nimport { MeasureEntity } from \"./entities/data/measure-entity\";\nimport { MeasureReportEntity } from \"./entities/data/measure-report-entity\";\nimport { MediaEntity } from \"./entities/data/media-entity\";\nimport { MedicationAdministrationEntity } from \"./entities/data/medication-administration-entity\";\nimport { MedicationDispenseEntity } from \"./entities/data/medication-dispense-entity\";\nimport { MedicationEntity } from \"./entities/data/medication-entity\";\nimport { MedicationKnowledgeEntity } from \"./entities/data/medication-knowledge-entity\";\nimport { MedicationRequestEntity } from \"./entities/data/medication-request-entity\";\nimport { MedicationStatementEntity } from \"./entities/data/medication-statement-entity\";\nimport { MedicinalProductAuthorizationEntity } from \"./entities/data/medicinal-product-authorization-entity\";\nimport { MedicinalProductContraindicationEntity } from \"./entities/data/medicinal-product-contraindication-entity\";\nimport { MedicinalProductEntity } from \"./entities/data/medicinal-product-entity\";\nimport { MedicinalProductIndicationEntity } from \"./entities/data/medicinal-product-indication-entity\";\nimport { MedicinalProductIngredientEntity } from \"./entities/data/medicinal-product-ingredient-entity\";\nimport { MedicinalProductInteractionEntity } from \"./entities/data/medicinal-product-interaction-entity\";\nimport { MedicinalProductManufacturedEntity } from \"./entities/data/medicinal-product-manufactured-entity\";\nimport { MedicinalProductPackagedEntity } from \"./entities/data/medicinal-product-packaged-entity\";\nimport { MedicinalProductPharmaceuticalEntity } from \"./entities/data/medicinal-product-pharmaceutical-entity\";\nimport { MedicinalProductUndesirableEffectEntity } from \"./entities/data/medicinal-product-undesirable-effect-entity\";\nimport { MessageDefinitionEntity } from \"./entities/data/message-definition-entity\";\nimport { MessageHeaderEntity } from \"./entities/data/message-header-entity\";\nimport { MolecularSequenceEntity } from \"./entities/data/molecular-sequence-entity\";\nimport { NamingSystemEntity } from \"./entities/data/naming-system-entity\";\nimport { NutritionOrderEntity } from \"./entities/data/nutrition-order-entity\";\nimport { ObservationDefinitionEntity } from \"./entities/data/observation-definition-entity\";\nimport { ObservationEntity } from \"./entities/data/observation-entity\";\nimport { OperationDefinitionEntity } from \"./entities/data/operation-definition-entity\";\nimport { OrganizationAffiliationEntity } from \"./entities/data/organization-affiliation-entity\";\nimport { OrganizationEntity } from \"./entities/data/organization-entity\";\nimport { PatientEntity } from \"./entities/data/patient-entity\";\nimport { PaymentNoticeEntity } from \"./entities/data/payment-notice-entity\";\nimport { PaymentReconciliationEntity } from \"./entities/data/payment-reconciliation-entity\";\nimport { PersonEntity } from \"./entities/data/person-entity\";\nimport { PlanDefinitionEntity } from \"./entities/data/plan-definition-entity\";\nimport { PractitionerEntity } from \"./entities/data/practitioner-entity\";\nimport { PractitionerRoleEntity } from \"./entities/data/practitioner-role-entity\";\nimport { ProcedureEntity } from \"./entities/data/procedure-entity\";\nimport { ProvenanceEntity } from \"./entities/data/provenance-entity\";\nimport { QuestionnaireEntity } from \"./entities/data/questionnaire-entity\";\nimport { QuestionnaireResponseEntity } from \"./entities/data/questionnaire-response-entity\";\nimport { RelatedPersonEntity } from \"./entities/data/related-person-entity\";\nimport { RequestGroupEntity } from \"./entities/data/request-group-entity\";\nimport { ResearchDefinitionEntity } from \"./entities/data/research-definition-entity\";\nimport { ResearchElementDefinitionEntity } from \"./entities/data/research-element-definition-entity\";\nimport { ResearchStudyEntity } from \"./entities/data/research-study-entity\";\nimport { ResearchSubjectEntity } from \"./entities/data/research-subject-entity\";\nimport { RiskAssessmentEntity } from \"./entities/data/risk-assessment-entity\";\nimport { RiskEvidenceSynthesisEntity } from \"./entities/data/risk-evidence-synthesis-entity\";\nimport { ScheduleEntity } from \"./entities/data/schedule-entity\";\nimport { SearchParameterEntity } from \"./entities/data/search-parameter-entity\";\nimport { ServiceRequestEntity } from \"./entities/data/service-request-entity\";\nimport { SlotEntity } from \"./entities/data/slot-entity\";\nimport { SpecimenDefinitionEntity } from \"./entities/data/specimen-definition-entity\";\nimport { SpecimenEntity } from \"./entities/data/specimen-entity\";\nimport { StructureDefinitionEntity } from \"./entities/data/structure-definition-entity\";\nimport { StructureMapEntity } from \"./entities/data/structure-map-entity\";\nimport { SubscriptionEntity } from \"./entities/data/subscription-entity\";\nimport { SubstanceEntity } from \"./entities/data/substance-entity\";\nimport { SubstanceNucleicAcidEntity } from \"./entities/data/substance-nucleic-acid-entity\";\nimport { SubstancePolymerEntity } from \"./entities/data/substance-polymer-entity\";\nimport { SubstanceProteinEntity } from \"./entities/data/substance-protein-entity\";\nimport { SubstanceReferenceInformationEntity } from \"./entities/data/substance-reference-information-entity\";\nimport { SubstanceSourceMaterialEntity } from \"./entities/data/substance-source-material-entity\";\nimport { SubstanceSpecificationEntity } from \"./entities/data/substance-specification-entity\";\nimport { SupplyDeliveryEntity } from \"./entities/data/supply-delivery-entity\";\nimport { SupplyRequestEntity } from \"./entities/data/supply-request-entity\";\nimport { TaskEntity } from \"./entities/data/task-entity\";\nimport { TerminologyCapabilitiesEntity } from \"./entities/data/terminology-capabilities-entity\";\nimport { TestReportEntity } from \"./entities/data/test-report-entity\";\nimport { TestScriptEntity } from \"./entities/data/test-script-entity\";\nimport { ValueSetEntity } from \"./entities/data/value-set-entity\";\nimport { VerificationResultEntity } from \"./entities/data/verification-result-entity\";\nimport { VisionPrescriptionEntity } from \"./entities/data/vision-prescription-entity\";\n\n/**\n * Data-plane entities only (service \"data\"). Same table as control plane; use\n * DynamoControlService for control-plane entities.\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n */\n\nconst dataPlaneEntities = {\n account: AccountEntity,\n activitydefinition: ActivityDefinitionEntity,\n adverseevent: AdverseEventEntity,\n allergyintolerance: AllergyIntoleranceEntity,\n appointment: AppointmentEntity,\n appointmentresponse: AppointmentResponseEntity,\n auditevent: AuditEventEntity,\n basic: BasicEntity,\n biologicallyderivedproduct: BiologicallyDerivedProductEntity,\n bodystructure: BodyStructureEntity,\n capabilitystatement: CapabilityStatementEntity,\n careplan: CarePlanEntity,\n careteam: CareTeamEntity,\n catalogentry: CatalogEntryEntity,\n codesystem: CodeSystemEntity,\n chargeitem: ChargeItemEntity,\n chargeitemdefinition: ChargeItemDefinitionEntity,\n claim: ClaimEntity,\n claimresponse: ClaimResponseEntity,\n clinicalimpression: ClinicalImpressionEntity,\n communication: CommunicationEntity,\n communicationrequest: CommunicationRequestEntity,\n compartmentdefinition: CompartmentDefinitionEntity,\n composition: CompositionEntity,\n conceptmap: ConceptMapEntity,\n condition: ConditionEntity,\n consent: ConsentEntity,\n contract: ContractEntity,\n coverage: CoverageEntity,\n coverageeligibilityrequest: CoverageEligibilityRequestEntity,\n coverageeligibilityresponse: CoverageEligibilityResponseEntity,\n detectedissue: DetectedIssueEntity,\n device: DeviceEntity,\n devicedefinition: DeviceDefinitionEntity,\n devicemetric: DeviceMetricEntity,\n devicerequest: DeviceRequestEntity,\n deviceusestatement: DeviceUseStatementEntity,\n diagnosticreport: DiagnosticReportEntity,\n documentmanifest: DocumentManifestEntity,\n documentreference: DocumentReferenceEntity,\n effectevidencesynthesis: EffectEvidenceSynthesisEntity,\n encounter: EncounterEntity,\n examplescenario: ExampleScenarioEntity,\n endpoint: EndpointEntity,\n enrollmentrequest: EnrollmentRequestEntity,\n enrollmentresponse: EnrollmentResponseEntity,\n episodeofcare: EpisodeOfCareEntity,\n eventdefinition: EventDefinitionEntity,\n evidence: EvidenceEntity,\n evidencevariable: EvidenceVariableEntity,\n explanationofbenefit: ExplanationOfBenefitEntity,\n familymemberhistory: FamilyMemberHistoryEntity,\n flag: FlagEntity,\n goal: GoalEntity,\n graphdefinition: GraphDefinitionEntity,\n group: GroupEntity,\n guidanceresponse: GuidanceResponseEntity,\n healthcareservice: HealthcareServiceEntity,\n immunization: ImmunizationEntity,\n immunizationevaluation: ImmunizationEvaluationEntity,\n immunizationrecommendation: ImmunizationRecommendationEntity,\n imagingstudy: ImagingStudyEntity,\n implementationguide: ImplementationGuideEntity,\n insuranceplan: InsurancePlanEntity,\n invoice: InvoiceEntity,\n library: LibraryEntity,\n linkage: LinkageEntity,\n list: ListEntity,\n location: LocationEntity,\n medication: MedicationEntity,\n medicationadministration: MedicationAdministrationEntity,\n medicationdispense: MedicationDispenseEntity,\n medicationknowledge: MedicationKnowledgeEntity,\n medicationrequest: MedicationRequestEntity,\n medicationstatement: MedicationStatementEntity,\n medicinalproduct: MedicinalProductEntity,\n medicinalproductauthorization: MedicinalProductAuthorizationEntity,\n medicinalproductcontraindication: MedicinalProductContraindicationEntity,\n medicinalproductingredient: MedicinalProductIngredientEntity,\n medicinalproductindication: MedicinalProductIndicationEntity,\n medicinalproductinteraction: MedicinalProductInteractionEntity,\n medicinalproductmanufactured: MedicinalProductManufacturedEntity,\n medicinalproductpackaged: MedicinalProductPackagedEntity,\n medicinalproductpharmaceutical: MedicinalProductPharmaceuticalEntity,\n medicinalproductundesirableeffect: MedicinalProductUndesirableEffectEntity,\n media: MediaEntity,\n measure: MeasureEntity,\n measurereport: MeasureReportEntity,\n messagedefinition: MessageDefinitionEntity,\n messageheader: MessageHeaderEntity,\n molecularsequence: MolecularSequenceEntity,\n namingsystem: NamingSystemEntity,\n nutritionorder: NutritionOrderEntity,\n observation: ObservationEntity,\n observationdefinition: ObservationDefinitionEntity,\n operationdefinition: OperationDefinitionEntity,\n organization: OrganizationEntity,\n organizationaffiliation: OrganizationAffiliationEntity,\n patient: PatientEntity,\n paymentnotice: PaymentNoticeEntity,\n paymentreconciliation: PaymentReconciliationEntity,\n person: PersonEntity,\n plandefinition: PlanDefinitionEntity,\n practitioner: PractitionerEntity,\n practitionerrole: PractitionerRoleEntity,\n procedure: ProcedureEntity,\n provenance: ProvenanceEntity,\n questionnaire: QuestionnaireEntity,\n questionnaireresponse: QuestionnaireResponseEntity,\n requestgroup: RequestGroupEntity,\n relatedperson: RelatedPersonEntity,\n researchdefinition: ResearchDefinitionEntity,\n researchelementdefinition: ResearchElementDefinitionEntity,\n researchstudy: ResearchStudyEntity,\n researchsubject: ResearchSubjectEntity,\n riskassessment: RiskAssessmentEntity,\n riskevidencesynthesis: RiskEvidenceSynthesisEntity,\n schedule: ScheduleEntity,\n searchparameter: SearchParameterEntity,\n servicerequest: ServiceRequestEntity,\n specimen: SpecimenEntity,\n specimendefinition: SpecimenDefinitionEntity,\n structuredefinition: StructureDefinitionEntity,\n structuremap: StructureMapEntity,\n substance: SubstanceEntity,\n substancenucleicacid: SubstanceNucleicAcidEntity,\n substancepolymer: SubstancePolymerEntity,\n substanceprotein: SubstanceProteinEntity,\n substancereferenceinformation: SubstanceReferenceInformationEntity,\n substancespecification: SubstanceSpecificationEntity,\n substancesourcematerial: SubstanceSourceMaterialEntity,\n subscription: SubscriptionEntity,\n terminologycapabilities: TerminologyCapabilitiesEntity,\n testreport: TestReportEntity,\n testscript: TestScriptEntity,\n valueset: ValueSetEntity,\n supplydelivery: SupplyDeliveryEntity,\n supplyrequest: SupplyRequestEntity,\n slot: SlotEntity,\n task: TaskEntity,\n visionprescription: VisionPrescriptionEntity,\n verificationresult: VerificationResultEntity,\n};\n\nconst dataPlaneService = new Service(dataPlaneEntities, {\n table: defaultTableName,\n client: dynamoClient,\n});\n\n/**\n * Data-plane service: entities for the data store (FHIR and related). Both data-plane\n * and control-plane entities share the base table (PK, SK) and the unified GSI1 (sharded\n * resource-type list per ADR-011). Same physical table.\n */\nexport const DynamoDataService = {\n entities: dataPlaneService.entities,\n transaction: dataPlaneService.transaction,\n};\n\nexport type DynamoDataServiceType = typeof DynamoDataService;\n\n/**\n * Returns the data-plane service. Table name is resolved from tableName (optional override),\n * then DYNAMO_TABLE_NAME, then \"jesttesttable\".\n */\nexport function getDynamoDataService(\n tableName?: string,\n): DynamoDataServiceType {\n const resolved = tableName ?? defaultTableName;\n const service = new Service(dataPlaneEntities, {\n table: resolved,\n client: dynamoClient,\n });\n return {\n entities: service.entities,\n transaction: service.transaction,\n };\n}\n","import { Entity } from \"electrodb\";\nimport { computeShard } from \"../shard\";\n\n/**\n * Shared attributes for all data-plane FHIR entities (tenant-isolated, single-table store).\n * Used by all data-plane entities (Account, Patient, Encounter, Practitioner, etc.).\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md\n */\nexport const dataEntityAttributes = {\n /** Sort key. \"CURRENT\" for current version; version history in S3. */\n sk: {\n type: \"string\" as const,\n required: true,\n default: \"CURRENT\",\n },\n tenantId: {\n type: \"string\" as const,\n required: true,\n },\n workspaceId: {\n type: \"string\" as const,\n required: true,\n },\n /** FHIR Resource.id; logical id in URL and PK. */\n id: {\n type: \"string\" as const,\n required: true,\n },\n /** FHIR resource as JSON string. JSON.stringify(resource) on write; JSON.parse(item.resource) on read. */\n resource: {\n type: \"string\" as const,\n required: true,\n },\n /**\n * Summary projection of the FHIR resource as a JSON string (uncompressed). Populated on every\n * write via `extractSummary(resource)` so GSI projections can surface list/lookup data without\n * reading the compressed `resource` blob. Kept uncompressed because the summary is small and\n * must be fast to retrieve without encode/decode overhead.\n *\n * @see sites/www-docs/content/architecture/adr/2026-04-17-02-fhir-summary-projection-for-gsi-access-patterns.md\n */\n summary: {\n type: \"string\" as const,\n required: true,\n },\n /** Version id (e.g. ULID). Tracks current version; S3 history key. */\n vid: {\n type: \"string\" as const,\n required: true,\n },\n lastUpdated: {\n type: \"string\" as const,\n required: true,\n },\n /**\n * Shard index segment for the GSI1 partition key. Computed deterministically from `id`\n * via `computeShard` so updates always land on the same shard. Stored as a string because\n * it appears as a literal segment in the GSI1 PK template; the underlying value is 0..3.\n * Not `required` because the value is derived via `watch`/`set`; ElectroDB's required-field\n * check runs before watch propagation, so callers must not fail validation on a derived field.\n *\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md — GSI1 (sharded)\n */\n gsi1Shard: {\n type: \"string\" as const,\n watch: [\"id\"] as const,\n set: (_val?: string, item?: { id?: string }) => {\n if (typeof item?.id !== \"string\" || item.id.length === 0) {\n return undefined;\n }\n return String(computeShard(item.id));\n },\n },\n /**\n * GSI1 sort key. Written as the index's SK verbatim so list endpoints can\n * use `BEGINS_WITH` for prefix queries (e.g. `?name=Sm` against Patient).\n * Computed at write time via `extractSortKey(resource)` per DR-004:\n * - Labeled types (LABEL_PATHS): `<normalizedLabel>#<id>`\n * - Unlabeled types: `<ISO-8601 lastUpdated>#<id>`\n * The factory deliberately does not derive this from `lastUpdated`/`id`\n * — that would lock every type into the unlabeled fallback and defeat\n * label-based BEGINS_WITH on labeled types.\n *\n * @see openhi-planning DR-004\n */\n gsi1sk: {\n type: \"string\" as const,\n required: true,\n },\n deleted: {\n type: \"boolean\" as const,\n required: false,\n },\n bundleId: {\n type: \"string\" as const,\n required: false,\n },\n msgId: {\n type: \"string\" as const,\n required: false,\n },\n};\n\n/** Data-plane entity names (model.entity and key segment). Single source of truth for allowed values. Keys are UPPER_SNAKE for consistency. */\nexport const DATA_ENTITY_NAMES = {\n ACCOUNT: \"account\",\n ACTIVITY_DEFINITION: \"activitydefinition\",\n ADVERSE_EVENT: \"adverseevent\",\n ALLERGY_INTOLERANCE: \"allergyintolerance\",\n APPOINTMENT: \"appointment\",\n APPOINTMENT_RESPONSE: \"appointmentresponse\",\n AUDIT_EVENT: \"auditevent\",\n BASIC: \"basic\",\n BIOLOGICALLY_DERIVED_PRODUCT: \"biologicallyderivedproduct\",\n BODY_STRUCTURE: \"bodystructure\",\n CAPABILITY_STATEMENT: \"capabilitystatement\",\n CARE_PLAN: \"careplan\",\n CARE_TEAM: \"careteam\",\n CATALOG_ENTRY: \"catalogentry\",\n CODE_SYSTEM: \"codesystem\",\n COMPARTMENT_DEFINITION: \"compartmentdefinition\",\n CONCEPT_MAP: \"conceptmap\",\n CHARGE_ITEM: \"chargeitem\",\n CHARGE_ITEM_DEFINITION: \"chargeitemdefinition\",\n CLAIM: \"claim\",\n CLAIM_RESPONSE: \"claimresponse\",\n CLINICAL_IMPRESSION: \"clinicalimpression\",\n COMMUNICATION: \"communication\",\n COMMUNICATION_REQUEST: \"communicationrequest\",\n COMPOSITION: \"composition\",\n CONDITION: \"condition\",\n CONSENT: \"consent\",\n CONTRACT: \"contract\",\n COVERAGE: \"coverage\",\n COVERAGE_ELIGIBILITY_REQUEST: \"coverageeligibilityrequest\",\n COVERAGE_ELIGIBILITY_RESPONSE: \"coverageeligibilityresponse\",\n DETECTED_ISSUE: \"detectedissue\",\n DEVICE: \"device\",\n DEVICE_DEFINITION: \"devicedefinition\",\n DEVICE_METRIC: \"devicemetric\",\n DEVICE_REQUEST: \"devicerequest\",\n DEVICE_USE_STATEMENT: \"deviceusestatement\",\n DIAGNOSTIC_REPORT: \"diagnosticreport\",\n DOCUMENT_MANIFEST: \"documentmanifest\",\n DOCUMENT_REFERENCE: \"documentreference\",\n EFFECT_EVIDENCE_SYNTHESIS: \"effectevidencesynthesis\",\n ENCOUNTER: \"encounter\",\n ENDPOINT: \"endpoint\",\n ENROLLMENT_REQUEST: \"enrollmentrequest\",\n ENROLLMENT_RESPONSE: \"enrollmentresponse\",\n EPISODE_OF_CARE: \"episodeofcare\",\n EVENT_DEFINITION: \"eventdefinition\",\n EVIDENCE: \"evidence\",\n EVIDENCE_VARIABLE: \"evidencevariable\",\n EXAMPLE_SCENARIO: \"examplescenario\",\n EXPLANATION_OF_BENEFIT: \"explanationofbenefit\",\n FAMILY_MEMBER_HISTORY: \"familymemberhistory\",\n FLAG: \"flag\",\n GOAL: \"goal\",\n GRAPH_DEFINITION: \"graphdefinition\",\n GROUP: \"group\",\n GUIDANCE_RESPONSE: \"guidanceresponse\",\n HEALTHCARE_SERVICE: \"healthcareservice\",\n IMAGING_STUDY: \"imagingstudy\",\n IMPLEMENTATION_GUIDE: \"implementationguide\",\n IMMUNIZATION: \"immunization\",\n IMMUNIZATION_EVALUATION: \"immunizationevaluation\",\n IMMUNIZATION_RECOMMENDATION: \"immunizationrecommendation\",\n INSURANCE_PLAN: \"insuranceplan\",\n INVOICE: \"invoice\",\n LIBRARY: \"library\",\n LINKAGE: \"linkage\",\n LIST: \"list\",\n LOCATION: \"location\",\n MEASURE: \"measure\",\n MEASURE_REPORT: \"measurereport\",\n MEDIA: \"media\",\n MEDICATION: \"medication\",\n MEDICATION_ADMINISTRATION: \"medicationadministration\",\n MEDICATION_DISPENSE: \"medicationdispense\",\n MEDICATION_KNOWLEDGE: \"medicationknowledge\",\n MEDICATION_REQUEST: \"medicationrequest\",\n MEDICATION_STATEMENT: \"medicationstatement\",\n MEDICINAL_PRODUCT: \"medicinalproduct\",\n MEDICINAL_PRODUCT_AUTHORIZATION: \"medicinalproductauthorization\",\n MEDICINAL_PRODUCT_CONTRAINDICATION: \"medicinalproductcontraindication\",\n MEDICINAL_PRODUCT_INGREDIENT: \"medicinalproductingredient\",\n MEDICINAL_PRODUCT_INDICATION: \"medicinalproductindication\",\n MEDICINAL_PRODUCT_INTERACTION: \"medicinalproductinteraction\",\n MEDICINAL_PRODUCT_MANUFACTURED: \"medicinalproductmanufactured\",\n MEDICINAL_PRODUCT_PACKAGED: \"medicinalproductpackaged\",\n MEDICINAL_PRODUCT_PHARMACEUTICAL: \"medicinalproductpharmaceutical\",\n MEDICINAL_PRODUCT_UNDESIRABLE_EFFECT: \"medicinalproductundesirableeffect\",\n MESSAGE_DEFINITION: \"messagedefinition\",\n MESSAGE_HEADER: \"messageheader\",\n MOLECULAR_SEQUENCE: \"molecularsequence\",\n NAMING_SYSTEM: \"namingsystem\",\n NUTRITION_ORDER: \"nutritionorder\",\n OBSERVATION: \"observation\",\n OBSERVATION_DEFINITION: \"observationdefinition\",\n OPERATION_DEFINITION: \"operationdefinition\",\n ORGANIZATION: \"organization\",\n ORGANIZATION_AFFILIATION: \"organizationaffiliation\",\n PATIENT: \"patient\",\n PAYMENT_NOTICE: \"paymentnotice\",\n PAYMENT_RECONCILIATION: \"paymentreconciliation\",\n PERSON: \"person\",\n PLAN_DEFINITION: \"plandefinition\",\n PRACTITIONER: \"practitioner\",\n PRACTITIONER_ROLE: \"practitionerrole\",\n PROCEDURE: \"procedure\",\n PROVENANCE: \"provenance\",\n QUESTIONNAIRE: \"questionnaire\",\n QUESTIONNAIRE_RESPONSE: \"questionnaireresponse\",\n RELATED_PERSON: \"relatedperson\",\n REQUEST_GROUP: \"requestgroup\",\n RESEARCH_DEFINITION: \"researchdefinition\",\n RESEARCH_ELEMENT_DEFINITION: \"researchelementdefinition\",\n RESEARCH_STUDY: \"researchstudy\",\n RESEARCH_SUBJECT: \"researchsubject\",\n SEARCH_PARAMETER: \"searchparameter\",\n RISK_ASSESSMENT: \"riskassessment\",\n RISK_EVIDENCE_SYNTHESIS: \"riskevidencesynthesis\",\n SCHEDULE: \"schedule\",\n SERVICE_REQUEST: \"servicerequest\",\n SLOT: \"slot\",\n SPECIMEN: \"specimen\",\n SPECIMEN_DEFINITION: \"specimendefinition\",\n STRUCTURE_DEFINITION: \"structuredefinition\",\n STRUCTURE_MAP: \"structuremap\",\n SUBSTANCE: \"substance\",\n SUBSTANCE_NUCLEIC_ACID: \"substancenucleicacid\",\n SUBSTANCE_POLYMER: \"substancepolymer\",\n SUBSTANCE_PROTEIN: \"substanceprotein\",\n SUBSTANCE_REFERENCE_INFORMATION: \"substancereferenceinformation\",\n SUBSTANCE_SPECIFICATION: \"substancespecification\",\n SUBSTANCE_SOURCE_MATERIAL: \"substancesourcematerial\",\n SUBSCRIPTION: \"subscription\",\n TERMINOLOGY_CAPABILITIES: \"terminologycapabilities\",\n TEST_REPORT: \"testreport\",\n TEST_SCRIPT: \"testscript\",\n VALUE_SET: \"valueset\",\n SUPPLY_DELIVERY: \"supplydelivery\",\n SUPPLY_REQUEST: \"supplyrequest\",\n TASK: \"task\",\n VERIFICATION_RESULT: \"verificationresult\",\n VISION_PRESCRIPTION: \"visionprescription\",\n} as const;\n\n/** Data-plane entity name (model.entity and key segment). */\nexport type DataEntityName =\n (typeof DATA_ENTITY_NAMES)[keyof typeof DATA_ENTITY_NAMES];\n\n/**\n * Creates an ElectroDB Entity for a data-plane FHIR resource with the common model, attributes,\n * base-table index, and GSI1 (Unified Sharded List per ADR-011 / DR-004) for list-by-type-in-workspace.\n *\n * GSI1 PK shape: `TID#<tid>#WID#<wid>#RT#<resourceTypeLabel>#SHARD#<n>` where `n = computeShard(id)`\n * (4-way fixed sharding). GSI1 SK shape: `<lastUpdated>#<id>` — the unlabeled fallback per DR-004.\n * Labeled sort keys (e.g. `<normalizedLabel>#<id>` for Patient/Practitioner/etc.) ride on top of\n * this contract through the writer's `extractSortKey(resource)` integration; this factory wires the\n * index, attribute, and the deterministic shard derivation. PK template uses resourceTypeLabel as a\n * literal so each entity instance binds its own type segment.\n *\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md — GSI1\n * @see sites/www-docs/content/architecture/adr/ — ADR-011, DR-004\n */\nexport function createDataEntity(\n entity: DataEntityName,\n resourceTypeLabel: string,\n) {\n return new Entity({\n model: {\n entity,\n service: \"data\",\n version: \"01\",\n },\n attributes: dataEntityAttributes,\n indexes: {\n /** Base table: PK, SK (data store key names). PK is built from tenantId, workspaceId, id. */\n record: {\n pk: {\n field: \"PK\",\n composite: [\"tenantId\", \"workspaceId\", \"id\"],\n template: `TID#\\${tenantId}#WID#\\${workspaceId}#RT#${resourceTypeLabel}#ID#\\${id}`,\n },\n sk: {\n field: \"SK\",\n composite: [\"sk\"],\n },\n },\n /**\n * GSI1 — Unified Sharded List: list all resources of this type in a workspace; reads fan\n * out across the four shards and merge by SK. SK is the writer-supplied `gsi1sk` verbatim\n * (per DR-004) so labeled types serve `BEGINS_WITH` prefix queries on the natural label.\n * `casing: \"none\"` is required on the SK because the writer (`extractSortKey`) already\n * applies DR-004 normalization — ElectroDB's default lowercasing would mangle the\n * ISO-8601 unlabeled fallback (`T`/`Z` → `t`/`z`).\n */\n gsi1: {\n index: \"GSI1\",\n pk: {\n field: \"GSI1PK\",\n composite: [\"tenantId\", \"workspaceId\", \"gsi1Shard\"],\n template: `TID#\\${tenantId}#WID#\\${workspaceId}#RT#${resourceTypeLabel}#SHARD#\\${gsi1Shard}`,\n },\n sk: {\n field: \"GSI1SK\",\n casing: \"none\" as const,\n composite: [\"gsi1sk\"],\n template: `\\${gsi1sk}`,\n },\n },\n },\n });\n}\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * Account data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#Account#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const AccountEntity = createDataEntity(\"account\", \"Account\");\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * ActivityDefinition data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#ActivityDefinition#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const ActivityDefinitionEntity = createDataEntity(\n \"activitydefinition\",\n \"ActivityDefinition\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * AdverseEvent data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#AdverseEvent#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const AdverseEventEntity = createDataEntity(\n \"adverseevent\",\n \"AdverseEvent\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * AllergyIntolerance data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#AllergyIntolerance#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const AllergyIntoleranceEntity = createDataEntity(\n \"allergyintolerance\",\n \"AllergyIntolerance\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * Appointment data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#Appointment#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const AppointmentEntity = createDataEntity(\"appointment\", \"Appointment\");\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * AppointmentResponse data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#AppointmentResponse#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const AppointmentResponseEntity = createDataEntity(\n \"appointmentresponse\",\n \"AppointmentResponse\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * AuditEvent data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#AuditEvent#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const AuditEventEntity = createDataEntity(\"auditevent\", \"AuditEvent\");\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * Basic data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#Basic#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const BasicEntity = createDataEntity(\"basic\", \"Basic\");\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * BiologicallyDerivedProduct data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#BiologicallyDerivedProduct#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const BiologicallyDerivedProductEntity = createDataEntity(\n \"biologicallyderivedproduct\",\n \"BiologicallyDerivedProduct\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * BodyStructure data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#BodyStructure#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const BodyStructureEntity = createDataEntity(\n \"bodystructure\",\n \"BodyStructure\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * CapabilityStatement data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#CapabilityStatement#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const CapabilityStatementEntity = createDataEntity(\n \"capabilitystatement\",\n \"CapabilityStatement\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * CarePlan data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#CarePlan#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const CarePlanEntity = createDataEntity(\"careplan\", \"CarePlan\");\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * CareTeam data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#CareTeam#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const CareTeamEntity = createDataEntity(\"careteam\", \"CareTeam\");\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * CatalogEntry data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#CatalogEntry#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const CatalogEntryEntity = createDataEntity(\n \"catalogentry\",\n \"CatalogEntry\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * ChargeItemDefinition data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#ChargeItemDefinition#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const ChargeItemDefinitionEntity = createDataEntity(\n \"chargeitemdefinition\",\n \"ChargeItemDefinition\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * ChargeItem data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#ChargeItem#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const ChargeItemEntity = createDataEntity(\"chargeitem\", \"ChargeItem\");\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * Claim data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#Claim#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const ClaimEntity = createDataEntity(\"claim\", \"Claim\");\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * ClaimResponse data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#ClaimResponse#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const ClaimResponseEntity = createDataEntity(\n \"claimresponse\",\n \"ClaimResponse\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * ClinicalImpression data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#ClinicalImpression#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const ClinicalImpressionEntity = createDataEntity(\n \"clinicalimpression\",\n \"ClinicalImpression\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * CodeSystem data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#CodeSystem#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const CodeSystemEntity = createDataEntity(\"codesystem\", \"CodeSystem\");\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * Communication data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#Communication#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const CommunicationEntity = createDataEntity(\n \"communication\",\n \"Communication\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * CommunicationRequest data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#CommunicationRequest#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const CommunicationRequestEntity = createDataEntity(\n \"communicationrequest\",\n \"CommunicationRequest\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * CompartmentDefinition data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#CompartmentDefinition#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const CompartmentDefinitionEntity = createDataEntity(\n \"compartmentdefinition\",\n \"CompartmentDefinition\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * Composition data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#Composition#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const CompositionEntity = createDataEntity(\"composition\", \"Composition\");\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * ConceptMap data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#ConceptMap#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const ConceptMapEntity = createDataEntity(\"conceptmap\", \"ConceptMap\");\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * Condition data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#Condition#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const ConditionEntity = createDataEntity(\"condition\", \"Condition\");\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * Consent data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#Consent#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const ConsentEntity = createDataEntity(\"consent\", \"Consent\");\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * Contract data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#Contract#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const ContractEntity = createDataEntity(\"contract\", \"Contract\");\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * CoverageEligibilityRequest data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#CoverageEligibilityRequest#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const CoverageEligibilityRequestEntity = createDataEntity(\n \"coverageeligibilityrequest\",\n \"CoverageEligibilityRequest\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * CoverageEligibilityResponse data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#CoverageEligibilityResponse#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const CoverageEligibilityResponseEntity = createDataEntity(\n \"coverageeligibilityresponse\",\n \"CoverageEligibilityResponse\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * Coverage data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#Coverage#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const CoverageEntity = createDataEntity(\"coverage\", \"Coverage\");\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * DetectedIssue data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#DetectedIssue#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const DetectedIssueEntity = createDataEntity(\n \"detectedissue\",\n \"DetectedIssue\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * DeviceDefinition data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#DeviceDefinition#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const DeviceDefinitionEntity = createDataEntity(\n \"devicedefinition\",\n \"DeviceDefinition\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * Device data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#Device#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const DeviceEntity = createDataEntity(\"device\", \"Device\");\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * DeviceMetric data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#DeviceMetric#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const DeviceMetricEntity = createDataEntity(\n \"devicemetric\",\n \"DeviceMetric\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * DeviceRequest data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#DeviceRequest#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const DeviceRequestEntity = createDataEntity(\n \"devicerequest\",\n \"DeviceRequest\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * DeviceUseStatement data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#DeviceUseStatement#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const DeviceUseStatementEntity = createDataEntity(\n \"deviceusestatement\",\n \"DeviceUseStatement\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * DiagnosticReport data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#DiagnosticReport#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const DiagnosticReportEntity = createDataEntity(\n \"diagnosticreport\",\n \"DiagnosticReport\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * DocumentManifest data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#DocumentManifest#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const DocumentManifestEntity = createDataEntity(\n \"documentmanifest\",\n \"DocumentManifest\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * DocumentReference data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#DocumentReference#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const DocumentReferenceEntity = createDataEntity(\n \"documentreference\",\n \"DocumentReference\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * EffectEvidenceSynthesis data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#EffectEvidenceSynthesis#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const EffectEvidenceSynthesisEntity = createDataEntity(\n \"effectevidencesynthesis\",\n \"EffectEvidenceSynthesis\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * Encounter data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#Encounter#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with Patient and other domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entities/encounter.md\n */\nexport const EncounterEntity = createDataEntity(\"encounter\", \"Encounter\");\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * Endpoint data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#Endpoint#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const EndpointEntity = createDataEntity(\"endpoint\", \"Endpoint\");\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * EnrollmentRequest data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#EnrollmentRequest#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const EnrollmentRequestEntity = createDataEntity(\n \"enrollmentrequest\",\n \"EnrollmentRequest\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * EnrollmentResponse data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#EnrollmentResponse#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const EnrollmentResponseEntity = createDataEntity(\n \"enrollmentresponse\",\n \"EnrollmentResponse\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * EpisodeOfCare data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#EpisodeOfCare#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const EpisodeOfCareEntity = createDataEntity(\n \"episodeofcare\",\n \"EpisodeOfCare\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * EventDefinition data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#EventDefinition#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const EventDefinitionEntity = createDataEntity(\n \"eventdefinition\",\n \"EventDefinition\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * Evidence data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#Evidence#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const EvidenceEntity = createDataEntity(\"evidence\", \"Evidence\");\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * EvidenceVariable data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#EvidenceVariable#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const EvidenceVariableEntity = createDataEntity(\n \"evidencevariable\",\n \"EvidenceVariable\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * ExampleScenario data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#ExampleScenario#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const ExampleScenarioEntity = createDataEntity(\n \"examplescenario\",\n \"ExampleScenario\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * ExplanationOfBenefit data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#ExplanationOfBenefit#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const ExplanationOfBenefitEntity = createDataEntity(\n \"explanationofbenefit\",\n \"ExplanationOfBenefit\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * FamilyMemberHistory data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#FamilyMemberHistory#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const FamilyMemberHistoryEntity = createDataEntity(\n \"familymemberhistory\",\n \"FamilyMemberHistory\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * Flag data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#Flag#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const FlagEntity = createDataEntity(\"flag\", \"Flag\");\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * Goal data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#Goal#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const GoalEntity = createDataEntity(\"goal\", \"Goal\");\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * GraphDefinition data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#GraphDefinition#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const GraphDefinitionEntity = createDataEntity(\n \"graphdefinition\",\n \"GraphDefinition\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * Group data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#Group#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const GroupEntity = createDataEntity(\"group\", \"Group\");\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * GuidanceResponse data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#GuidanceResponse#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const GuidanceResponseEntity = createDataEntity(\n \"guidanceresponse\",\n \"GuidanceResponse\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * HealthcareService data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#HealthcareService#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const HealthcareServiceEntity = createDataEntity(\n \"healthcareservice\",\n \"HealthcareService\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * ImagingStudy data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#ImagingStudy#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const ImagingStudyEntity = createDataEntity(\n \"imagingstudy\",\n \"ImagingStudy\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * Immunization data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#Immunization#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const ImmunizationEntity = createDataEntity(\n \"immunization\",\n \"Immunization\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * ImmunizationEvaluation data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#ImmunizationEvaluation#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const ImmunizationEvaluationEntity = createDataEntity(\n \"immunizationevaluation\",\n \"ImmunizationEvaluation\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * ImmunizationRecommendation data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#ImmunizationRecommendation#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const ImmunizationRecommendationEntity = createDataEntity(\n \"immunizationrecommendation\",\n \"ImmunizationRecommendation\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * ImplementationGuide data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#ImplementationGuide#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const ImplementationGuideEntity = createDataEntity(\n \"implementationguide\",\n \"ImplementationGuide\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * InsurancePlan data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#InsurancePlan#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const InsurancePlanEntity = createDataEntity(\n \"insuranceplan\",\n \"InsurancePlan\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * Invoice data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#Invoice#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const InvoiceEntity = createDataEntity(\"invoice\", \"Invoice\");\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * Library data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#Library#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const LibraryEntity = createDataEntity(\"library\", \"Library\");\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * Linkage data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#Linkage#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const LinkageEntity = createDataEntity(\"linkage\", \"Linkage\");\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * List data-store entity based on FHIR R4 (single-table store).\n * Represents the FHIR List resource (curated list of items).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#List#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const ListEntity = createDataEntity(\"list\", \"List\");\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * Location data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#Location#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const LocationEntity = createDataEntity(\"location\", \"Location\");\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * Measure data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#Measure#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const MeasureEntity = createDataEntity(\"measure\", \"Measure\");\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * MeasureReport data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#MeasureReport#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const MeasureReportEntity = createDataEntity(\n \"measurereport\",\n \"MeasureReport\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * Media data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#Media#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const MediaEntity = createDataEntity(\"media\", \"Media\");\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * MedicationAdministration data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#MedicationAdministration#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const MedicationAdministrationEntity = createDataEntity(\n \"medicationadministration\",\n \"MedicationAdministration\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * MedicationDispense data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#MedicationDispense#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const MedicationDispenseEntity = createDataEntity(\n \"medicationdispense\",\n \"MedicationDispense\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * Medication data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#Medication#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const MedicationEntity = createDataEntity(\"medication\", \"Medication\");\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * MedicationKnowledge data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#MedicationKnowledge#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const MedicationKnowledgeEntity = createDataEntity(\n \"medicationknowledge\",\n \"MedicationKnowledge\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * MedicationRequest data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#MedicationRequest#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const MedicationRequestEntity = createDataEntity(\n \"medicationrequest\",\n \"MedicationRequest\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * MedicationStatement data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#MedicationStatement#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const MedicationStatementEntity = createDataEntity(\n \"medicationstatement\",\n \"MedicationStatement\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * MedicinalProductAuthorization data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#MedicinalProductAuthorization#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const MedicinalProductAuthorizationEntity = createDataEntity(\n \"medicinalproductauthorization\",\n \"MedicinalProductAuthorization\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * MedicinalProductContraindication data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#MedicinalProductContraindication#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const MedicinalProductContraindicationEntity = createDataEntity(\n \"medicinalproductcontraindication\",\n \"MedicinalProductContraindication\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * MedicinalProduct data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#MedicinalProduct#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const MedicinalProductEntity = createDataEntity(\n \"medicinalproduct\",\n \"MedicinalProduct\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * MedicinalProductIndication data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#MedicinalProductIndication#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const MedicinalProductIndicationEntity = createDataEntity(\n \"medicinalproductindication\",\n \"MedicinalProductIndication\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * MedicinalProductIngredient data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#MedicinalProductIngredient#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const MedicinalProductIngredientEntity = createDataEntity(\n \"medicinalproductingredient\",\n \"MedicinalProductIngredient\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * MedicinalProductInteraction data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#MedicinalProductInteraction#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const MedicinalProductInteractionEntity = createDataEntity(\n \"medicinalproductinteraction\",\n \"MedicinalProductInteraction\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * MedicinalProductManufactured data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#MedicinalProductManufactured#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const MedicinalProductManufacturedEntity = createDataEntity(\n \"medicinalproductmanufactured\",\n \"MedicinalProductManufactured\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * MedicinalProductPackaged data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#MedicinalProductPackaged#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const MedicinalProductPackagedEntity = createDataEntity(\n \"medicinalproductpackaged\",\n \"MedicinalProductPackaged\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * MedicinalProductPharmaceutical data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#MedicinalProductPharmaceutical#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const MedicinalProductPharmaceuticalEntity = createDataEntity(\n \"medicinalproductpharmaceutical\",\n \"MedicinalProductPharmaceutical\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * MedicinalProductUndesirableEffect data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#MedicinalProductUndesirableEffect#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const MedicinalProductUndesirableEffectEntity = createDataEntity(\n \"medicinalproductundesirableeffect\",\n \"MedicinalProductUndesirableEffect\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * MessageDefinition data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#MessageDefinition#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const MessageDefinitionEntity = createDataEntity(\n \"messagedefinition\",\n \"MessageDefinition\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * MessageHeader data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#MessageHeader#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const MessageHeaderEntity = createDataEntity(\n \"messageheader\",\n \"MessageHeader\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * MolecularSequence data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#MolecularSequence#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const MolecularSequenceEntity = createDataEntity(\n \"molecularsequence\",\n \"MolecularSequence\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * NamingSystem data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#NamingSystem#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const NamingSystemEntity = createDataEntity(\n \"namingsystem\",\n \"NamingSystem\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * NutritionOrder data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#NutritionOrder#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const NutritionOrderEntity = createDataEntity(\n \"nutritionorder\",\n \"NutritionOrder\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * ObservationDefinition data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#ObservationDefinition#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const ObservationDefinitionEntity = createDataEntity(\n \"observationdefinition\",\n \"ObservationDefinition\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * Observation data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#Observation#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const ObservationEntity = createDataEntity(\"observation\", \"Observation\");\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * OperationDefinition data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#OperationDefinition#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const OperationDefinitionEntity = createDataEntity(\n \"operationdefinition\",\n \"OperationDefinition\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * OrganizationAffiliation data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#OrganizationAffiliation#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const OrganizationAffiliationEntity = createDataEntity(\n \"organizationaffiliation\",\n \"OrganizationAffiliation\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * Organization data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#Organization#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const OrganizationEntity = createDataEntity(\n \"organization\",\n \"Organization\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * Patient data-store entity based on FHIR (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#Patient#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) are documented in the Data-Store Entity Standards (FHIR).\n * Audit is in FHIR resource meta (meta.extension), not item attributes. See entity-standards.md.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entities/patient.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const PatientEntity = createDataEntity(\"patient\", \"Patient\");\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * PaymentNotice data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#PaymentNotice#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const PaymentNoticeEntity = createDataEntity(\n \"paymentnotice\",\n \"PaymentNotice\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * PaymentReconciliation data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#PaymentReconciliation#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const PaymentReconciliationEntity = createDataEntity(\n \"paymentreconciliation\",\n \"PaymentReconciliation\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * Person data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#Person#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const PersonEntity = createDataEntity(\"person\", \"Person\");\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * PlanDefinition data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#PlanDefinition#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const PlanDefinitionEntity = createDataEntity(\n \"plandefinition\",\n \"PlanDefinition\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * Practitioner data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#Practitioner#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with Patient, Encounter, and entity standards.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entities/practitioner.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const PractitionerEntity = createDataEntity(\n \"practitioner\",\n \"Practitioner\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * PractitionerRole data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#PractitionerRole#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const PractitionerRoleEntity = createDataEntity(\n \"practitionerrole\",\n \"PractitionerRole\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * Procedure data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#Procedure#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const ProcedureEntity = createDataEntity(\"procedure\", \"Procedure\");\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * Provenance data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#Provenance#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const ProvenanceEntity = createDataEntity(\"provenance\", \"Provenance\");\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * Questionnaire data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#Questionnaire#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const QuestionnaireEntity = createDataEntity(\n \"questionnaire\",\n \"Questionnaire\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * QuestionnaireResponse data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#QuestionnaireResponse#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const QuestionnaireResponseEntity = createDataEntity(\n \"questionnaireresponse\",\n \"QuestionnaireResponse\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * RelatedPerson data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#RelatedPerson#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const RelatedPersonEntity = createDataEntity(\n \"relatedperson\",\n \"RelatedPerson\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * RequestGroup data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#RequestGroup#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const RequestGroupEntity = createDataEntity(\n \"requestgroup\",\n \"RequestGroup\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * ResearchDefinition data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#ResearchDefinition#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const ResearchDefinitionEntity = createDataEntity(\n \"researchdefinition\",\n \"ResearchDefinition\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * ResearchElementDefinition data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#ResearchElementDefinition#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const ResearchElementDefinitionEntity = createDataEntity(\n \"researchelementdefinition\",\n \"ResearchElementDefinition\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * ResearchStudy data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#ResearchStudy#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const ResearchStudyEntity = createDataEntity(\n \"researchstudy\",\n \"ResearchStudy\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * ResearchSubject data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#ResearchSubject#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const ResearchSubjectEntity = createDataEntity(\n \"researchsubject\",\n \"ResearchSubject\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * RiskAssessment data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#RiskAssessment#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const RiskAssessmentEntity = createDataEntity(\n \"riskassessment\",\n \"RiskAssessment\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * RiskEvidenceSynthesis data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#RiskEvidenceSynthesis#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const RiskEvidenceSynthesisEntity = createDataEntity(\n \"riskevidencesynthesis\",\n \"RiskEvidenceSynthesis\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * Schedule data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#Schedule#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const ScheduleEntity = createDataEntity(\"schedule\", \"Schedule\");\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * SearchParameter data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#SearchParameter#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const SearchParameterEntity = createDataEntity(\n \"searchparameter\",\n \"SearchParameter\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * ServiceRequest data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#ServiceRequest#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const ServiceRequestEntity = createDataEntity(\n \"servicerequest\",\n \"ServiceRequest\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * Slot data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#Slot#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const SlotEntity = createDataEntity(\"slot\", \"Slot\");\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * SpecimenDefinition data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#SpecimenDefinition#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const SpecimenDefinitionEntity = createDataEntity(\n \"specimendefinition\",\n \"SpecimenDefinition\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * Specimen data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#Specimen#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const SpecimenEntity = createDataEntity(\"specimen\", \"Specimen\");\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * StructureDefinition data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#StructureDefinition#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const StructureDefinitionEntity = createDataEntity(\n \"structuredefinition\",\n \"StructureDefinition\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * StructureMap data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#StructureMap#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const StructureMapEntity = createDataEntity(\n \"structuremap\",\n \"StructureMap\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * Subscription data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#Subscription#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const SubscriptionEntity = createDataEntity(\n \"subscription\",\n \"Subscription\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * Substance data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#Substance#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const SubstanceEntity = createDataEntity(\"substance\", \"Substance\");\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * SubstanceNucleicAcid data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#SubstanceNucleicAcid#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const SubstanceNucleicAcidEntity = createDataEntity(\n \"substancenucleicacid\",\n \"SubstanceNucleicAcid\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * SubstancePolymer data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#SubstancePolymer#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const SubstancePolymerEntity = createDataEntity(\n \"substancepolymer\",\n \"SubstancePolymer\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * SubstanceProtein data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#SubstanceProtein#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const SubstanceProteinEntity = createDataEntity(\n \"substanceprotein\",\n \"SubstanceProtein\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * SubstanceReferenceInformation data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#SubstanceReferenceInformation#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const SubstanceReferenceInformationEntity = createDataEntity(\n \"substancereferenceinformation\",\n \"SubstanceReferenceInformation\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * SubstanceSourceMaterial data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#SubstanceSourceMaterial#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const SubstanceSourceMaterialEntity = createDataEntity(\n \"substancesourcematerial\",\n \"SubstanceSourceMaterial\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * SubstanceSpecification data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#SubstanceSpecification#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const SubstanceSpecificationEntity = createDataEntity(\n \"substancespecification\",\n \"SubstanceSpecification\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * SupplyDelivery data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#SupplyDelivery#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const SupplyDeliveryEntity = createDataEntity(\n \"supplydelivery\",\n \"SupplyDelivery\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * SupplyRequest data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#SupplyRequest#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const SupplyRequestEntity = createDataEntity(\n \"supplyrequest\",\n \"SupplyRequest\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * Task data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#Task#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const TaskEntity = createDataEntity(\"task\", \"Task\");\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * TerminologyCapabilities data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#TerminologyCapabilities#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const TerminologyCapabilitiesEntity = createDataEntity(\n \"terminologycapabilities\",\n \"TerminologyCapabilities\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * TestReport data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#TestReport#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const TestReportEntity = createDataEntity(\"testreport\", \"TestReport\");\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * TestScript data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#TestScript#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const TestScriptEntity = createDataEntity(\"testscript\", \"TestScript\");\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * ValueSet data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#ValueSet#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const ValueSetEntity = createDataEntity(\"valueset\", \"ValueSet\");\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * VerificationResult data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#VerificationResult#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const VerificationResultEntity = createDataEntity(\n \"verificationresult\",\n \"VerificationResult\",\n);\n","import { createDataEntity } from \"../data-entity-common\";\n\n/**\n * VisionPrescription data-store entity based on FHIR R4 (single-table store).\n *\n * **Classification (ADR 2026-03-03-01):** Tenant-isolated, data plane. Strict isolation: tenantId and\n * workspaceId are required (no defaults, no sentinels). No crossover between tenants or workspaces.\n *\n * Key structure: PK = TID#<tenantId>#WID#<workspaceId>#RT#VisionPrescription#ID#<id>, SK = CURRENT.\n * Standard attributes (FHIR source and entity purpose) align with other data-plane domain resources.\n *\n * @see sites/www-docs/content/architecture/adr/2026-03-03-01-tenant-isolated-vs-non-tenant-isolated-entities.md\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md — Standard attributes (all FHIR domain resources)\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/single-table-design.md\n */\nexport const VisionPrescriptionEntity = createDataEntity(\n \"visionprescription\",\n \"VisionPrescription\",\n);\n","import { extractSortKey, extractSummary } from \"@openhi/types\";\nimport type { Meta, FhirResourceLike } from \"@openhi/types\";\nimport { compressResource, decompressResource } from \"../../lib/compression\";\nimport { mergeAuditIntoMeta, type MetaWithExtensions } from \"../audit-meta\";\nimport { SHARD_COUNT } from \"../dynamo/shard\";\nimport { NotFoundError } from \"../errors\";\nimport type { OpenHiContext } from \"../openhi-context\";\n\n/**\n * Sort key for the current record version. Matches Dynamo record index SK default.\n * Use this in get/update/delete (and create where applicable) for data-plane entities.\n */\nexport const DATA_ENTITY_SK = \"CURRENT\" as const;\n\n/** Base params for data-entity operations: context and optional table override. */\nexport interface BaseDataEntityParams {\n context: OpenHiContext;\n /** Optional table name override; resolved by data service from DYNAMO_TABLE_NAME when omitted. */\n tableName?: string;\n}\n\n/** Params for get-by-id and delete (context + id + optional tableName). */\nexport interface GetByIdParams extends BaseDataEntityParams {\n id: string;\n}\n\n/**\n * Mode for list operations introduced by #853 to back FHIR `_summary` opt-ins.\n *\n * - `full` (default): GSI1 fan-out → BatchGet hydration → full FHIR resource per entry.\n * - `summary`: GSI1 fan-out only; the `summary` JSON projected onto GSI1 is parsed and used\n * as `resource` per entry. Skips BatchGet entirely — that's the cost win the FHIR spec\n * intends `_summary=true` to deliver.\n * - `count`: GSI1 fan-out only; entries are dropped, only `total` is populated. Routes\n * should pass `total` into `buildSearchsetBundle({ mode: \"count\", total })`.\n *\n * `_elements` is implemented at the route layer as `full` mode + post-hydration pruning,\n * since per-element pruning has to happen after decompression and is FHIR-spec-defined\n * (always retain root-level mandatories — see `prune-resource-by-elements.ts`).\n */\nexport type ListOperationMode = \"full\" | \"summary\" | \"count\";\n\n/** Params for list (context + optional tableName + optional mode for #853 `_summary`). */\nexport interface ListParams extends BaseDataEntityParams {\n /** Defaults to `\"full\"` (current behavior); routes pass other modes for `_summary` opt-ins. */\n mode?: ListOperationMode;\n}\n\n/** Result for create / get-by-id / update: single resource. */\nexport interface SingleResourceResult<T> {\n id: string;\n resource: T;\n}\n\n/** Entry shape for list results. */\nexport interface ListEntry<T> {\n id: string;\n resource: T;\n}\n\n/**\n * Result for list: entries array plus total count.\n *\n * - For `mode === \"full\"` and `mode === \"summary\"`, `total === entries.length`.\n * - For `mode === \"count\"`, `entries` is empty and `total` is the GSI1 fan-out count.\n *\n * Splitting `total` from `entries.length` lets count-mode routes report a true count\n * while skipping any per-entry work.\n */\nexport interface ListResult<T> {\n entries: Array<ListEntry<T>>;\n total: number;\n}\n\n/** Minimal entity shape for get (used by getDataEntityById). */\ninterface EntityWithGet {\n get(params: {\n tenantId: string;\n workspaceId: string;\n id: string;\n sk: string;\n }): { go(): Promise<{ data: { id: string; resource: string } | null }> };\n}\n\n/** Minimal entity shape for delete (used by deleteDataEntityById). */\ninterface EntityWithDelete {\n delete(params: {\n tenantId: string;\n workspaceId: string;\n id: string;\n sk: string;\n }): { go(): Promise<unknown> };\n}\n\n/**\n * Minimal entity shape for list via GSI1 + BatchGet hydration (used by listDataEntitiesByWorkspace).\n * GSI1 is sharded per ADR-011, so listing fans out to each shard and concatenates ids; the\n * `resource` attribute is NOT projected onto GSI1 (per the summary projection in\n * `dynamo-db-data-store.ts`), so the second phase BatchGets the base table for full items.\n *\n * GSI1 INCLUDE projection (per `dynamo-db-data-store.ts`) carries `summary`, `vid`, `lastUpdated`,\n * `createdDate`, `modifiedDate`, `createdById`, `modifiedById` alongside the key attributes.\n * `summary` is what `mode: \"summary\"` returns to the caller without hitting the base table.\n */\ninterface DataEntityWithListAndBatchGet {\n query: {\n gsi1(params: {\n tenantId: string;\n workspaceId: string;\n gsi1Shard: string;\n }): {\n go(): Promise<{\n data: Array<{\n id: string;\n summary?: string;\n vid?: string;\n lastUpdated?: string;\n createdDate?: string;\n modifiedDate?: string;\n createdById?: string;\n modifiedById?: string;\n }> | null;\n }>;\n };\n };\n get(\n keys: Array<{\n tenantId: string;\n workspaceId: string;\n id: string;\n sk: string;\n }>,\n ): {\n go(): Promise<{\n data: Array<{ id: string; resource: string }>;\n unprocessed: Array<{\n tenantId: string;\n workspaceId: string;\n id: string;\n sk: string;\n }>;\n }>;\n };\n}\n\n/** Minimal entity shape for put (used by createDataEntityRecord). */\ninterface EntityWithPut {\n put(attrs: {\n sk: string;\n tenantId: string;\n workspaceId: string;\n id: string;\n resource: string;\n summary: string;\n vid: string;\n lastUpdated: string;\n gsi1sk: string;\n }): { go(): Promise<unknown> };\n}\n\n/** Minimal entity shape for patch (used by updateDataEntityById). */\ninterface EntityWithPatch {\n get(params: {\n tenantId: string;\n workspaceId: string;\n id: string;\n sk: string;\n }): { go(): Promise<{ data: { id: string; resource: string } | null }> };\n patch(params: {\n tenantId: string;\n workspaceId: string;\n id: string;\n sk: string;\n }): {\n set(attrs: {\n resource: string;\n summary: string;\n lastUpdated: string;\n gsi1sk: string;\n }): {\n go(): Promise<unknown>;\n };\n };\n}\n\n/**\n * Get a single data-entity record by id. Decompresses and parses resource; throws NotFoundError if missing.\n * Use from get-by-id operations with the appropriate entity and resource type.\n */\nexport async function getDataEntityById<T>(\n entity: EntityWithGet,\n tenantId: string,\n workspaceId: string,\n id: string,\n resourceLabel: string,\n): Promise<SingleResourceResult<T>> {\n const result = await entity\n .get({\n tenantId,\n workspaceId,\n id,\n sk: DATA_ENTITY_SK,\n })\n .go();\n\n if (!result.data) {\n throw new NotFoundError(`${resourceLabel} ${id} not found`, {\n details: { id },\n });\n }\n\n const parsed = JSON.parse(decompressResource(result.data.resource)) as T & {\n id?: string;\n };\n return {\n id: result.data.id,\n resource: { ...parsed, id: result.data.id } as T,\n };\n}\n\n/**\n * Delete a data-entity record by id. Idempotent (no-op if not found).\n * Use from delete operations with the appropriate entity.\n */\nexport async function deleteDataEntityById(\n entity: EntityWithDelete,\n tenantId: string,\n workspaceId: string,\n id: string,\n): Promise<void> {\n await entity\n .delete({\n tenantId,\n workspaceId,\n id,\n sk: DATA_ENTITY_SK,\n })\n .go();\n}\n\n/** Maximum total attempts (initial + retries) when hydrating list ids via BatchGet. */\nconst BATCH_GET_MAX_ATTEMPTS = 3;\n/** Base backoff in milliseconds applied to BatchGet retries; doubles each attempt. */\nconst BATCH_GET_BASE_BACKOFF_MS = 50;\n\n/** Minimal entity shape for BatchGet hydration on the base table; chunks of 100 are handled by ElectroDB. */\ninterface EntityWithBatchGet<TKey, TItem> {\n get(keys: TKey[]): {\n go(): Promise<{ data: TItem[]; unprocessed: TKey[] }>;\n };\n}\n\n/**\n * BatchGet wrapper that retries `UnprocessedKeys` with exponential backoff. ElectroDB chunks the\n * input keys into groups of 100 internally, but does not retry unprocessed keys — DynamoDB can\n * return some keys unprocessed under throttling or partial failure, and the caller must reissue\n * them. Throws after `BATCH_GET_MAX_ATTEMPTS` if any keys remain unprocessed; intended for list\n * hydration (#854) where partial results would silently truncate the response.\n */\nexport async function batchGetWithRetry<TKey, TItem>(\n entity: EntityWithBatchGet<TKey, TItem>,\n keys: TKey[],\n): Promise<TItem[]> {\n if (keys.length === 0) return [];\n\n const collected: TItem[] = [];\n let pending = keys;\n let attempt = 0;\n\n while (pending.length > 0) {\n if (attempt > 0) {\n await new Promise((resolve) =>\n setTimeout(resolve, BATCH_GET_BASE_BACKOFF_MS * 2 ** (attempt - 1)),\n );\n }\n attempt++;\n const result = await entity.get(pending).go();\n collected.push(...result.data);\n const unprocessed = result.unprocessed ?? [];\n if (unprocessed.length === 0) break;\n if (attempt >= BATCH_GET_MAX_ATTEMPTS) {\n throw new Error(\n `BatchGet exhausted retries: ${unprocessed.length} key(s) still unprocessed after ${BATCH_GET_MAX_ATTEMPTS} attempt(s)`,\n );\n }\n pending = unprocessed;\n }\n\n return collected;\n}\n\n/** GSI1 index item shape — what a sharded `gsi1.query().go()` returns per row. */\nexport interface ShardedListIndexItem {\n id: string;\n summary?: string;\n}\n\n/** Hooks that adapt a generic mode-dispatching list to a specific entity's hydration and entry shape. */\nexport interface DispatchListModeHooks<TItem, TEntry> {\n /** Hydrate the base table for the given ids (typically `batchGetWithRetry(entity, keys)`). */\n hydrate: (orderedIds: string[]) => Promise<TItem[]>;\n /** Extract the canonical id from a hydrated item so it can be matched back to the GSI1 order. */\n getId: (item: TItem) => string;\n /** Build the result entry for `mode === \"full\"` from a hydrated base-table item. */\n buildEntry: (id: string, item: TItem) => TEntry;\n /** Build the result entry for `mode === \"summary\"` from the parsed GSI1 `summary` JSON. */\n buildSummaryEntry: (\n id: string,\n parsedSummary: Record<string, unknown>,\n ) => TEntry;\n}\n\n/**\n * Mode dispatcher shared by data-plane and control-plane list operations (#853).\n *\n * Given pre-fetched `shardResults` from a sharded GSI1 fan-out, returns either:\n * - `mode === \"count\"` — `{ entries: [], total }` where total is the sum of shard row counts.\n * - `mode === \"summary\"` — entries built from each shard row's parsed `summary` JSON; rows with\n * missing or unparseable `summary` are dropped.\n * - `mode === \"full\"` — calls `hydrate(orderedIds)` (typically a BatchGet) and builds entries\n * from hydrated items in per-shard GSI1 sort order; missing items are dropped.\n *\n * Lives here (alongside `listDataEntitiesByWorkspace`) because the same dispatch logic is needed\n * by every list operation that backs a FHIR list/search endpoint, including the seven\n * control-plane peers (User, Role, Tenant, Workspace, Membership, RoleAssignment, Configuration).\n */\nexport async function dispatchListMode<TItem, TEntry>(\n mode: ListOperationMode,\n shardResults: Array<{ data: Array<ShardedListIndexItem> | null }>,\n hooks: DispatchListModeHooks<TItem, TEntry>,\n): Promise<{ entries: TEntry[]; total: number }> {\n if (mode === \"count\") {\n let total = 0;\n for (const shardResult of shardResults) {\n total += (shardResult.data ?? []).length;\n }\n return { entries: [], total };\n }\n\n if (mode === \"summary\") {\n const entries: TEntry[] = [];\n for (const shardResult of shardResults) {\n for (const item of shardResult.data ?? []) {\n if (typeof item.summary !== \"string\") continue;\n let parsed: Record<string, unknown>;\n try {\n parsed = JSON.parse(item.summary) as Record<string, unknown>;\n } catch {\n continue;\n }\n entries.push(hooks.buildSummaryEntry(item.id, parsed));\n }\n }\n return { entries, total: entries.length };\n }\n\n const orderedIds: string[] = [];\n for (const shardResult of shardResults) {\n for (const item of shardResult.data ?? []) {\n orderedIds.push(item.id);\n }\n }\n\n if (orderedIds.length === 0) return { entries: [], total: 0 };\n\n const items = await hooks.hydrate(orderedIds);\n const byId = new Map(items.map((item) => [hooks.getId(item), item]));\n\n const entries: TEntry[] = [];\n for (const id of orderedIds) {\n const item = byId.get(id);\n if (!item) continue;\n entries.push(hooks.buildEntry(id, item));\n }\n\n return { entries, total: entries.length };\n}\n\n/**\n * List data-entity records in a workspace via GSI1.\n *\n * `mode` (default `\"full\"`) selects the read shape — see `dispatchListMode`. The data-plane\n * binding here adds the four-shard fan-out (per ADR-011) and the BatchGet hydration with\n * decompression for `mode === \"full\"`. K-way merge by `gsi1sk` is intentionally NOT done here\n * — full server-side natural sort lands with the FHIR list-endpoint plumbing that adds\n * pagination tokens.\n */\nexport async function listDataEntitiesByWorkspace<T>(\n entity: DataEntityWithListAndBatchGet,\n tenantId: string,\n workspaceId: string,\n mode: ListOperationMode = \"full\",\n): Promise<ListResult<T>> {\n const shardResults = await Promise.all(\n Array.from({ length: SHARD_COUNT }, (_, shard) =>\n entity.query\n .gsi1({ tenantId, workspaceId, gsi1Shard: String(shard) })\n .go(),\n ),\n );\n\n return dispatchListMode<{ id: string; resource: string }, ListEntry<T>>(\n mode,\n shardResults,\n {\n hydrate: (orderedIds) =>\n batchGetWithRetry(\n entity,\n orderedIds.map((id) => ({\n tenantId,\n workspaceId,\n id,\n sk: DATA_ENTITY_SK,\n })),\n ),\n getId: (item) => item.id,\n buildEntry: (id, item) => {\n const parsed = JSON.parse(decompressResource(item.resource)) as T & {\n id?: string;\n };\n return { id, resource: { ...parsed, id } as T };\n },\n buildSummaryEntry: (id, parsed) => ({\n id,\n resource: { ...parsed, id } as T,\n }),\n },\n );\n}\n\n/**\n * Create a data-entity record with put. Computes vid from lastUpdated (from resource meta or fallback).\n * Use from create operations (e.g. Practitioner, Encounter) that build the resource with audit in meta.\n */\nexport async function createDataEntityRecord<T>(\n entity: EntityWithPut,\n tenantId: string,\n workspaceId: string,\n id: string,\n resourceWithAudit: T & { meta?: { lastUpdated?: string } },\n fallbackDate: string,\n): Promise<SingleResourceResult<T>> {\n const lastUpdated =\n resourceWithAudit.meta?.lastUpdated ??\n fallbackDate ??\n new Date().toISOString();\n const vid =\n lastUpdated.replace(/[-:T.Z]/g, \"\").slice(0, 12) || Date.now().toString(36);\n\n const resourceLike = resourceWithAudit as unknown as FhirResourceLike;\n const summary = JSON.stringify(extractSummary(resourceLike));\n const gsi1sk = extractSortKey(resourceLike);\n\n await entity\n .put({\n sk: DATA_ENTITY_SK,\n tenantId,\n workspaceId,\n id,\n resource: compressResource(JSON.stringify(resourceWithAudit)),\n summary,\n vid,\n lastUpdated,\n gsi1sk,\n })\n .go();\n\n return {\n id,\n resource: resourceWithAudit as T,\n };\n}\n\n/**\n * Build an updated resource with audit in meta for use with updateDataEntityById.\n * Parses existing resource string for existing meta, merges body with id/resourceType/meta (versionId \"2\"),\n * then merges modified audit (modifiedDate, modifiedById, modifiedByName) into meta.\n * Use from update operations (Patient, Encounter, Practitioner) to avoid duplicating this logic.\n */\nexport function buildUpdatedResourceWithAudit<T extends { meta?: Meta }>(\n body: T,\n id: string,\n date: string,\n actorId: string,\n actorName: string,\n existingResourceStr: string,\n resourceType: string,\n): {\n resource: T & { id: string; meta: MetaWithExtensions };\n lastUpdated: string;\n} {\n const existingMeta: MetaWithExtensions | undefined = (\n JSON.parse(existingResourceStr) as { meta?: MetaWithExtensions }\n ).meta;\n\n const bodyWithMeta = body as T & { id?: string; meta?: Meta };\n const resourceWithVersion: T & { id: string; meta?: Meta } = {\n ...body,\n resourceType: resourceType as T[\"resourceType\"],\n id,\n meta: {\n ...(bodyWithMeta.meta ?? {}),\n lastUpdated: date,\n versionId: \"2\",\n },\n };\n\n const resourceWithAudit: T & { id: string; meta: MetaWithExtensions } = {\n ...resourceWithVersion,\n meta: mergeAuditIntoMeta(resourceWithVersion.meta ?? existingMeta, {\n modifiedDate: date,\n modifiedById: actorId,\n modifiedByName: actorName,\n }),\n };\n\n return {\n resource: resourceWithAudit,\n lastUpdated: date,\n };\n}\n\n/**\n * Update a data-entity record by id: get existing, throw if not found, then call builder with\n * decompressed existing resource string; builder returns { resource, lastUpdated }; then patch.\n * Use from update operations with the appropriate entity and resource type.\n */\nexport async function updateDataEntityById<T>(\n entity: EntityWithPatch,\n tenantId: string,\n workspaceId: string,\n id: string,\n resourceLabel: string,\n context: OpenHiContext,\n buildPatched: (existingResourceStr: string) => {\n resource: unknown;\n lastUpdated: string;\n },\n): Promise<SingleResourceResult<T>> {\n const existing = await entity\n .get({\n tenantId,\n workspaceId,\n id,\n sk: DATA_ENTITY_SK,\n })\n .go();\n\n if (!existing.data) {\n throw new NotFoundError(`${resourceLabel} ${id} not found`, {\n details: { id },\n });\n }\n\n const existingStr = decompressResource(existing.data.resource);\n const { resource, lastUpdated } = buildPatched(existingStr);\n\n const resourceLike = resource as FhirResourceLike;\n const summary = JSON.stringify(extractSummary(resourceLike));\n const gsi1sk = extractSortKey(resourceLike);\n\n await entity\n .patch({\n tenantId,\n workspaceId,\n id,\n sk: DATA_ENTITY_SK,\n })\n .set({\n resource: compressResource(JSON.stringify(resource)),\n summary,\n lastUpdated,\n gsi1sk,\n })\n .go();\n\n return {\n id,\n resource: resource as T,\n };\n}\n","import { gzipSync, gunzipSync } from \"node:zlib\";\n\n/**\n * @see sites/www-docs/content/packages/@openhi/constructs/lib/compression.md\n */\n\n/** Envelope format version. See ADR 2026-02-15-02 (data layer compression). */\nconst ENVELOPE_VERSION = 1;\n\n/**\n * Compression algorithm identifiers supported by the envelope (string values).\n * Only algos that Node.js supports out of the box (zlib): gzip, brotli, deflate.\n * \"none\" = uncompressed payload. zstd was considered in the ADR but requires native addon/WASM.\n */\nexport const COMPRESSION_ALGOS = {\n NONE: \"none\",\n GZIP: \"gzip\",\n BROTLI: \"brotli\",\n DEFLATE: \"deflate\",\n} as const;\n\n/** Algorithm value for envelope `algo`; only gzip and none are implemented today. */\nexport type CompressionAlgo =\n (typeof COMPRESSION_ALGOS)[keyof typeof COMPRESSION_ALGOS];\n\n/** Stored value is a JSON string of this envelope. */\ninterface CompressionEnvelope {\n v: number;\n algo: string;\n payload: string;\n}\n\nfunction isEnvelope(obj: unknown): obj is CompressionEnvelope {\n return (\n typeof obj === \"object\" &&\n obj !== null &&\n \"v\" in obj &&\n \"algo\" in obj &&\n \"payload\" in obj &&\n typeof (obj as CompressionEnvelope).payload === \"string\"\n );\n}\n\n/**\n * Compresses a JSON string (e.g. serialized FHIR resource) for storage in DynamoDB.\n * Uses a versioned envelope: { v, algo, payload } with gzip+base64 in payload.\n * Used by the data layer on write; see REST API docs (compression in data layer).\n * Optional compression: pass `{ algo: COMPRESSION_ALGOS.NONE }` to store in envelope without compressing.\n */\nexport function compressResource(\n jsonString: string,\n options?: { algo?: CompressionAlgo },\n): string {\n const algo = options?.algo ?? COMPRESSION_ALGOS.GZIP;\n if (algo === COMPRESSION_ALGOS.NONE) {\n const envelope: CompressionEnvelope = {\n v: ENVELOPE_VERSION,\n algo: COMPRESSION_ALGOS.NONE,\n payload: jsonString,\n };\n return JSON.stringify(envelope);\n }\n const buf = Buffer.from(jsonString, \"utf-8\");\n const payload = gzipSync(buf).toString(\"base64\");\n const envelope: CompressionEnvelope = {\n v: ENVELOPE_VERSION,\n algo: COMPRESSION_ALGOS.GZIP,\n payload,\n };\n return JSON.stringify(envelope);\n}\n\n/**\n * Decompresses a stored value: versioned envelope (v, algo, payload) or legacy gzip+base64 / raw.\n * If the value is not valid envelope JSON, falls back to legacy: try gzip magic on base64, else return as-is.\n */\nexport function decompressResource(compressedOrRaw: string): string {\n try {\n const parsed = JSON.parse(compressedOrRaw) as unknown;\n if (isEnvelope(parsed)) {\n if (parsed.algo === COMPRESSION_ALGOS.GZIP) {\n const buf = Buffer.from(parsed.payload, \"base64\");\n return gunzipSync(buf).toString(\"utf-8\");\n }\n if (parsed.algo === COMPRESSION_ALGOS.NONE) {\n return parsed.payload;\n }\n // Unknown algo: return payload as-is (safe fallback per ADR)\n return parsed.payload;\n }\n } catch {\n // Not valid envelope JSON — legacy path\n }\n\n // Legacy: pre-envelope gzip+base64 or raw\n try {\n const buf = Buffer.from(compressedOrRaw, \"base64\");\n if (buf.length >= 2 && buf[0] === 0x1f && buf[1] === 0x8b) {\n return gunzipSync(buf).toString(\"utf-8\");\n }\n } catch {\n // not base64 or gunzip failed\n }\n return compressedOrRaw;\n}\n","import type { Extension, Meta } from \"@openhi/types\";\n\n/**\n * Shared audit/meta helpers for FHIR resources. Used by data operations and import.\n * OpenHI audit is stored in resource meta.extension (per ADR 2026-01-13-06).\n *\n * @see sites/www-docs/content/packages/@openhi/constructs/data/dynamo/entity-standards.md\n */\n\n/** OpenHI extension URLs for audit in resource meta (per ADR 2026-01-13-06). */\nconst OPENHI_EXT = \"http://openhi.org/fhir/StructureDefinition\";\n\n/** Meta with optional OpenHI audit extensions (created/modified by, etc.). */\nexport type MetaWithExtensions = Meta & { extension?: Array<Extension> };\n\n/** Audit fields stored in FHIR resource meta.extension. */\nexport interface AuditFields {\n createdDate?: string;\n createdById?: string;\n createdByName?: string;\n modifiedDate?: string;\n modifiedById?: string;\n modifiedByName?: string;\n deletedDate?: string;\n deletedById?: string;\n deletedByName?: string;\n}\n\n/** Audit extension entry shape (subset of Extension used by OpenHI audit). */\ntype AuditExtensionEntry = Pick<\n Extension,\n \"url\" | \"valueString\" | \"valueDateTime\"\n>;\n\n/** Builds meta.extension entries for audit; merges with existing meta. */\nexport function mergeAuditIntoMeta(\n meta: MetaWithExtensions | Record<string, unknown> | undefined,\n audit: AuditFields,\n): MetaWithExtensions {\n const existing = (meta ?? {}) as MetaWithExtensions;\n const ext: Array<AuditExtensionEntry> = [\n ...(Array.isArray(existing.extension)\n ? (existing.extension as Array<AuditExtensionEntry>)\n : []),\n ];\n const byUrl = new Map(ext.map((e) => [e.url, e]));\n function set(\n url: string,\n value: string | undefined,\n type: \"valueString\" | \"valueDateTime\",\n ) {\n if (value == null) return;\n byUrl.set(url, { url, [type]: value });\n }\n set(`${OPENHI_EXT}/created-date`, audit.createdDate, \"valueDateTime\");\n set(`${OPENHI_EXT}/created-by-id`, audit.createdById, \"valueString\");\n set(`${OPENHI_EXT}/created-by-name`, audit.createdByName, \"valueString\");\n set(`${OPENHI_EXT}/modified-date`, audit.modifiedDate, \"valueDateTime\");\n set(`${OPENHI_EXT}/modified-by-id`, audit.modifiedById, \"valueString\");\n set(`${OPENHI_EXT}/modified-by-name`, audit.modifiedByName, \"valueString\");\n set(`${OPENHI_EXT}/deleted-date`, audit.deletedDate, \"valueDateTime\");\n set(`${OPENHI_EXT}/deleted-by-id`, audit.deletedById, \"valueString\");\n set(`${OPENHI_EXT}/deleted-by-name`, audit.deletedByName, \"valueString\");\n return { ...existing, extension: Array.from(byUrl.values()) };\n}\n"],"mappings":";;;;;;;;;;;;;AAAA,SAAS,eAAe;;;ACAxB,SAAS,cAAc;AAUhB,IAAM,uBAAuB;AAAA;AAAA,EAElC,IAAI;AAAA,IACF,MAAM;AAAA,IACN,UAAU;AAAA,IACV,SAAS;AAAA,EACX;AAAA,EACA,UAAU;AAAA,IACR,MAAM;AAAA,IACN,UAAU;AAAA,EACZ;AAAA,EACA,aAAa;AAAA,IACX,MAAM;AAAA,IACN,UAAU;AAAA,EACZ;AAAA;AAAA,EAEA,IAAI;AAAA,IACF,MAAM;AAAA,IACN,UAAU;AAAA,EACZ;AAAA;AAAA,EAEA,UAAU;AAAA,IACR,MAAM;AAAA,IACN,UAAU;AAAA,EACZ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,SAAS;AAAA,IACP,MAAM;AAAA,IACN,UAAU;AAAA,EACZ;AAAA;AAAA,EAEA,KAAK;AAAA,IACH,MAAM;AAAA,IACN,UAAU;AAAA,EACZ;AAAA,EACA,aAAa;AAAA,IACX,MAAM;AAAA,IACN,UAAU;AAAA,EACZ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,WAAW;AAAA,IACT,MAAM;AAAA,IACN,OAAO,CAAC,IAAI;AAAA,IACZ,KAAK,CAAC,MAAe,SAA2B;AAC9C,UAAI,OAAO,MAAM,OAAO,YAAY,KAAK,GAAG,WAAW,GAAG;AACxD,eAAO;AAAA,MACT;AACA,aAAO,OAAO,aAAa,KAAK,EAAE,CAAC;AAAA,IACrC;A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