gdc-common-utils-ts 2.1.0 → 2.3.0

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 (175) hide show
  1. package/README.md +22 -2
  2. package/dist/claims/claims-helpers-allergy-intolerance.d.ts +8 -0
  3. package/dist/claims/claims-helpers-allergy-intolerance.js +30 -12
  4. package/dist/claims/claims-helpers-condition.d.ts +8 -0
  5. package/dist/claims/claims-helpers-condition.js +30 -12
  6. package/dist/claims/claims-helpers-consent.d.ts +4 -0
  7. package/dist/claims/claims-helpers-consent.js +15 -1
  8. package/dist/claims/claims-helpers-diagnostic-report.d.ts +4 -0
  9. package/dist/claims/claims-helpers-diagnostic-report.js +17 -2
  10. package/dist/claims/claims-helpers-medication-statement.d.ts +10 -2
  11. package/dist/claims/claims-helpers-medication-statement.js +32 -14
  12. package/dist/constants/data-collections.js +0 -1
  13. package/dist/constants/didcomm.d.ts +22 -0
  14. package/dist/constants/didcomm.js +22 -0
  15. package/dist/constants/fhir-resource-types.d.ts +16 -0
  16. package/dist/constants/fhir-resource-types.js +7 -0
  17. package/dist/constants/healthcare.d.ts +348 -193
  18. package/dist/constants/healthcare.js +99 -37
  19. package/dist/constants/hl7-roles.d.ts +38 -4
  20. package/dist/constants/hl7-roles.js +92 -4
  21. package/dist/constants/index.d.ts +1 -0
  22. package/dist/constants/index.js +1 -0
  23. package/dist/constants/lifecycle.d.ts +2 -0
  24. package/dist/constants/lifecycle.js +2 -0
  25. package/dist/constants/verifiable-credentials.d.ts +9 -0
  26. package/dist/constants/verifiable-credentials.js +9 -0
  27. package/dist/examples/bundle-didcomm-payload.js +4 -2
  28. package/dist/examples/communication-attached-bundle-session.js +27 -27
  29. package/dist/examples/communication-didcomm-payload.d.ts +8 -4
  30. package/dist/examples/communication-didcomm-payload.js +17 -11
  31. package/dist/examples/consent-access.js +2 -1
  32. package/dist/examples/employee.d.ts +21 -0
  33. package/dist/examples/employee.js +21 -0
  34. package/dist/examples/individual-controller.d.ts +27 -0
  35. package/dist/examples/individual-controller.js +28 -1
  36. package/dist/examples/inter-tenant-access-contract.js +3 -2
  37. package/dist/examples/ips-bundle.js +17 -16
  38. package/dist/examples/lifecycle.js +13 -11
  39. package/dist/examples/profile-manager-mem.js +2 -1
  40. package/dist/examples/related-person.d.ts +14 -0
  41. package/dist/examples/related-person.js +18 -4
  42. package/dist/examples/shared.d.ts +12 -3
  43. package/dist/examples/shared.js +13 -4
  44. package/dist/examples/vital-signs.js +1 -1
  45. package/dist/examples/wallet-mem.js +4 -2
  46. package/dist/i18n/role-codes.i18n.d.ts +9 -1
  47. package/dist/i18n/role-codes.i18n.js +12 -1
  48. package/dist/models/authority-resolution.d.ts +56 -0
  49. package/dist/models/authority-resolution.js +2 -0
  50. package/dist/models/bundle-editor-types.d.ts +89 -0
  51. package/dist/models/bundle-editor-types.js +45 -0
  52. package/dist/models/bundle.d.ts +5 -0
  53. package/dist/models/communication-attached-bundle-session.d.ts +6 -4
  54. package/dist/models/communication-attached-bundle-session.js +6 -4
  55. package/dist/models/confidential-storage.d.ts +2 -1
  56. package/dist/models/consent-rule.d.ts +11 -1
  57. package/dist/models/consent-rule.js +9 -1
  58. package/dist/models/device-license.d.ts +20 -0
  59. package/dist/models/index.d.ts +2 -0
  60. package/dist/models/index.js +2 -0
  61. package/dist/models/individual-onboarding.d.ts +18 -0
  62. package/dist/models/interoperable-claims/allergy-intolerance-claims.d.ts +12 -1
  63. package/dist/models/interoperable-claims/allergy-intolerance-claims.js +12 -1
  64. package/dist/models/interoperable-claims/condition-claims.d.ts +12 -1
  65. package/dist/models/interoperable-claims/condition-claims.js +12 -1
  66. package/dist/models/interoperable-claims/diagnostic-report-claims.d.ts +13 -2
  67. package/dist/models/interoperable-claims/diagnostic-report-claims.js +12 -1
  68. package/dist/models/interoperable-claims/document-reference-claims.d.ts +1 -0
  69. package/dist/models/interoperable-claims/document-reference-claims.js +3 -0
  70. package/dist/models/interoperable-claims/medication-statement-claims.d.ts +17 -0
  71. package/dist/models/interoperable-claims/medication-statement-claims.js +17 -0
  72. package/dist/models/interoperable-claims/related-person-claims.d.ts +13 -0
  73. package/dist/models/interoperable-claims/related-person-claims.js +16 -0
  74. package/dist/utils/allergy-intolerance-entry-editor.d.ts +51 -0
  75. package/dist/utils/allergy-intolerance-entry-editor.js +55 -0
  76. package/dist/utils/authority-resolution.d.ts +37 -0
  77. package/dist/utils/authority-resolution.js +112 -0
  78. package/dist/utils/backend-message-manager-mem.d.ts +11 -0
  79. package/dist/utils/backend-message-manager-mem.js +11 -0
  80. package/dist/utils/bundle-didcomm-payload.js +3 -2
  81. package/dist/utils/bundle-document-builder.d.ts +36 -0
  82. package/dist/utils/bundle-document-builder.js +310 -14
  83. package/dist/utils/bundle-editor-core.d.ts +181 -0
  84. package/dist/utils/bundle-editor-core.js +467 -0
  85. package/dist/utils/bundle-editor-helpers.d.ts +53 -0
  86. package/dist/utils/bundle-editor-helpers.js +146 -0
  87. package/dist/utils/bundle-editor-registry.d.ts +6 -0
  88. package/dist/utils/bundle-editor-registry.js +14 -0
  89. package/dist/utils/bundle-editor.d.ts +21 -722
  90. package/dist/utils/bundle-editor.js +21 -1601
  91. package/dist/utils/bundle-entry-editor.d.ts +96 -0
  92. package/dist/utils/bundle-entry-editor.js +305 -0
  93. package/dist/utils/bundle-query.d.ts +1 -0
  94. package/dist/utils/bundle-query.js +12 -3
  95. package/dist/utils/bundle-reader.d.ts +48 -0
  96. package/dist/utils/bundle-reader.js +175 -1
  97. package/dist/utils/care-plan-entry-editor.d.ts +43 -0
  98. package/dist/utils/care-plan-entry-editor.js +47 -0
  99. package/dist/utils/client-assertion.d.ts +38 -0
  100. package/dist/utils/client-assertion.js +113 -0
  101. package/dist/utils/clinical-impression-entry-editor.d.ts +43 -0
  102. package/dist/utils/clinical-impression-entry-editor.js +47 -0
  103. package/dist/utils/clinical-resource-entry-editor.d.ts +123 -0
  104. package/dist/utils/clinical-resource-entry-editor.js +296 -0
  105. package/dist/utils/clinical-resource-view.d.ts +16 -0
  106. package/dist/utils/clinical-resource-view.js +267 -33
  107. package/dist/utils/communication-attached-bundle-session-helpers.js +8 -6
  108. package/dist/utils/communication-attached-bundle-session.d.ts +29 -3
  109. package/dist/utils/communication-attached-bundle-session.js +62 -3
  110. package/dist/utils/communication-consent-access-editor.d.ts +8 -4
  111. package/dist/utils/communication-consent-access-editor.js +8 -4
  112. package/dist/utils/communication-didcomm-payload.d.ts +5 -0
  113. package/dist/utils/communication-didcomm-payload.js +28 -18
  114. package/dist/utils/communication-document-reference.d.ts +23 -0
  115. package/dist/utils/communication-document-reference.js +89 -0
  116. package/dist/utils/communication-editor.d.ts +53 -0
  117. package/dist/utils/communication-editor.js +97 -0
  118. package/dist/utils/condition-entry-editor.d.ts +30 -0
  119. package/dist/utils/condition-entry-editor.js +34 -0
  120. package/dist/utils/consent-claim-helpers.d.ts +4 -0
  121. package/dist/utils/consent-claim-helpers.js +15 -1
  122. package/dist/utils/consent-duplicate-rules.js +1 -1
  123. package/dist/utils/coverage-entry-editor.d.ts +51 -0
  124. package/dist/utils/coverage-entry-editor.js +55 -0
  125. package/dist/utils/device-entry-editor.d.ts +59 -0
  126. package/dist/utils/device-entry-editor.js +63 -0
  127. package/dist/utils/device-use-statement-entry-editor.d.ts +43 -0
  128. package/dist/utils/device-use-statement-entry-editor.js +47 -0
  129. package/dist/utils/diagnostic-report-entry-editor.d.ts +74 -0
  130. package/dist/utils/diagnostic-report-entry-editor.js +136 -0
  131. package/dist/utils/did.d.ts +8 -0
  132. package/dist/utils/did.js +22 -0
  133. package/dist/utils/document-reference-entry-editor.d.ts +62 -0
  134. package/dist/utils/document-reference-entry-editor.js +66 -0
  135. package/dist/utils/employee-entry-editor.d.ts +36 -0
  136. package/dist/utils/employee-entry-editor.js +88 -0
  137. package/dist/utils/employee.d.ts +1 -0
  138. package/dist/utils/employee.js +2 -1
  139. package/dist/utils/encounter-entry-editor.d.ts +51 -0
  140. package/dist/utils/encounter-entry-editor.js +55 -0
  141. package/dist/utils/flag-entry-editor.d.ts +47 -0
  142. package/dist/utils/flag-entry-editor.js +51 -0
  143. package/dist/utils/immunization-entry-editor.d.ts +87 -0
  144. package/dist/utils/immunization-entry-editor.js +169 -0
  145. package/dist/utils/index.d.ts +7 -0
  146. package/dist/utils/index.js +7 -0
  147. package/dist/utils/individual-onboarding-acceptance-credential.d.ts +35 -0
  148. package/dist/utils/individual-onboarding-acceptance-credential.js +55 -0
  149. package/dist/utils/individual-smart.d.ts +59 -0
  150. package/dist/utils/individual-smart.js +135 -0
  151. package/dist/utils/license-list-search.d.ts +5 -0
  152. package/dist/utils/license-list-search.js +9 -0
  153. package/dist/utils/license.d.ts +45 -1
  154. package/dist/utils/license.js +86 -2
  155. package/dist/utils/medication-statement-entry-editor.d.ts +90 -0
  156. package/dist/utils/medication-statement-entry-editor.js +94 -0
  157. package/dist/utils/observation-component-entry-editor.d.ts +57 -0
  158. package/dist/utils/observation-component-entry-editor.js +105 -0
  159. package/dist/utils/observation-entry-editor.d.ts +29 -0
  160. package/dist/utils/observation-entry-editor.js +68 -0
  161. package/dist/utils/procedure-entry-editor.d.ts +71 -0
  162. package/dist/utils/procedure-entry-editor.js +75 -0
  163. package/dist/utils/professional-smart.d.ts +87 -0
  164. package/dist/utils/professional-smart.js +118 -4
  165. package/dist/utils/related-person-list.d.ts +4 -0
  166. package/dist/utils/related-person-list.js +26 -6
  167. package/dist/utils/same-as.d.ts +40 -0
  168. package/dist/utils/same-as.js +72 -0
  169. package/dist/utils/unified-health-id.d.ts +51 -0
  170. package/dist/utils/unified-health-id.js +92 -0
  171. package/dist/utils/vital-sign-day-batch.d.ts +25 -0
  172. package/dist/utils/vital-sign-day-batch.js +115 -0
  173. package/dist/utils/vital-sign-entry-editor.d.ts +61 -0
  174. package/dist/utils/vital-sign-entry-editor.js +152 -0
  175. package/package.json +2 -1
@@ -134,6 +134,7 @@ export interface ConfidentialBlobInfo {
134
134
  contentType?: string;
135
135
  }
136
136
  export interface ConfidentialStorageDoc {
137
+ /** Vault primary key for the persisted confidential record. Keep this as an opaque technical id; HMAC is reserved for indexed attributes, not for the document key itself. */
137
138
  id: string;
138
139
  status: string;
139
140
  /**
@@ -149,7 +150,7 @@ export interface ConfidentialStorageDoc {
149
150
  chunks?: number;
150
151
  /** A number that MUST be incremented each time the document is updated. */
151
152
  sequence: number;
152
- /** Contains an array of indexed attributes protected with HMAC for blind queries. */
153
+ /** Contains an array of indexed attributes protected with HMAC for blind queries. This is the place for blind-search protection, not `id`. */
153
154
  indexed?: IndexedData;
154
155
  /** The main, potentially encrypted, content of the document. */
155
156
  content?: Record<string, any>;
@@ -16,9 +16,17 @@ export declare enum ClaimConsent {
16
16
  'identifier' = "Consent.identifier",
17
17
  'eventBasedOn' = "Consent.event-basedon",
18
18
  'sourceReference' = "Consent.source-reference",
19
+ 'containedReferenceList' = "Consent.contained-reference-list",
20
+ /**
21
+ * @deprecated Use `containedReferenceList`.
22
+ */
23
+ 'containedResourceList' = "Consent.contained-resource-list",
24
+ /**
25
+ * @deprecated Use `containedReferenceList`.
26
+ */
19
27
  'containedDocuments' = "Consent.contained-documents",
20
28
  /**
21
- * @deprecated Use `containedDocuments`.
29
+ * @deprecated Use `containedReferenceList`.
22
30
  */
23
31
  'attachmentContentIds' = "Consent.attachment-content-ids",
24
32
  'attachmentContentType' = "Consent.attachment-contenttype",
@@ -128,6 +136,8 @@ export interface ConsentRule {
128
136
  * Derived from the `org.hl7.fhir.api.Consent.identifier` claim.
129
137
  */
130
138
  'Consent.identifier': string;
139
+ 'Consent.contained-reference-list'?: string;
140
+ 'Consent.contained-resource-list'?: string;
131
141
  'Consent.contained-documents'?: string;
132
142
  'Consent.attachment-content-ids'?: string;
133
143
  'Consent.attachment-contenttype'?: string;
@@ -18,9 +18,17 @@ export var ClaimConsent;
18
18
  ClaimConsent["identifier"] = "Consent.identifier";
19
19
  ClaimConsent["eventBasedOn"] = "Consent.event-basedon";
20
20
  ClaimConsent["sourceReference"] = "Consent.source-reference";
21
+ ClaimConsent["containedReferenceList"] = "Consent.contained-reference-list";
22
+ /**
23
+ * @deprecated Use `containedReferenceList`.
24
+ */
25
+ ClaimConsent["containedResourceList"] = "Consent.contained-resource-list";
26
+ /**
27
+ * @deprecated Use `containedReferenceList`.
28
+ */
21
29
  ClaimConsent["containedDocuments"] = "Consent.contained-documents";
22
30
  /**
23
- * @deprecated Use `containedDocuments`.
31
+ * @deprecated Use `containedReferenceList`.
24
32
  */
25
33
  ClaimConsent["attachmentContentIds"] = "Consent.attachment-content-ids";
26
34
  ClaimConsent["attachmentContentType"] = "Consent.attachment-contenttype";
@@ -42,6 +42,16 @@ export interface DeviceLicense {
42
42
  * @example "acme"
43
43
  */
44
44
  tenantId: string;
45
+ /**
46
+ * Organization that owns this seat pool.
47
+ *
48
+ * This is essential for hosted individual organizations because many
49
+ * households can share one UNID tenant vault. It is distinct from
50
+ * `subjectId`, which identifies the member currently assigned to the seat.
51
+ */
52
+ ownerOrganizationId?: string;
53
+ /** Subject/card DID made accessible when this member invitation is accepted. */
54
+ authorizedSubjectDid?: string;
45
55
  /**
46
56
  * Identifier for the purchase order or invoice that generated this license.
47
57
  * All licenses created from the same purchase will share the same orderId.
@@ -116,6 +126,16 @@ export interface DeviceLicense {
116
126
  * Populated when the status becomes 'issued'.
117
127
  */
118
128
  subjectId?: string;
129
+ /** Verified email selected from the invited contact, when email is used. */
130
+ issuedToEmail?: string;
131
+ /** Verified ITU telephone selected from the invited contact, when phone is used. */
132
+ issuedToPhone?: string;
133
+ /** Canonical FHIR v3 or ISCO role used to choose the owning license pool. */
134
+ issuedToRole?: string;
135
+ /** Relationship invitation workflow that reserved this seat. */
136
+ invitationId?: string;
137
+ /** RelatedPerson/contact selected before the invitation was sent. */
138
+ relatedPersonId?: string;
119
139
  /**
120
140
  * The unique identifier (`client_id`) of the device registered with this license.
121
141
  * Populated when the status becomes 'active'.
@@ -1,7 +1,9 @@
1
1
  export * from './actor-session';
2
2
  export * from './aes';
3
3
  export * from './auth';
4
+ export * from './authority-resolution';
4
5
  export * from './bundle';
6
+ export * from './bundle-editor-types';
5
7
  export * from './comm';
6
8
  export * from './clinical-sections';
7
9
  export * from './clinical-sections.en';
@@ -1,7 +1,9 @@
1
1
  export * from './actor-session.js';
2
2
  export * from './aes.js';
3
3
  export * from './auth.js';
4
+ export * from './authority-resolution.js';
4
5
  export * from './bundle.js';
6
+ export * from './bundle-editor-types.js';
5
7
  export * from './comm.js';
6
8
  export * from './clinical-sections.js';
7
9
  export * from './clinical-sections.en.js';
@@ -73,9 +73,27 @@ export interface IndividualFormTemplateFields {
73
73
  controllerSexAtBirth?: BirthSex | string;
74
74
  controllerIsSubject?: boolean;
75
75
  subjectAlternateName?: string;
76
+ /**
77
+ * Birth date for the indexed subject.
78
+ *
79
+ * Canonical downstream target:
80
+ * - `org.schema.Organization.member.birthDate`
81
+ *
82
+ * When `controllerIsSubject=true`, controller date fields may also be used
83
+ * as the subject seed for self-registration flows.
84
+ */
76
85
  subjectDateOfBirth?: string;
77
86
  subjectEmail?: string;
78
87
  subjectFamilyName?: string;
88
+ /**
89
+ * Gender for the indexed subject.
90
+ *
91
+ * Canonical downstream target:
92
+ * - `org.schema.Organization.member.gender`
93
+ *
94
+ * When `controllerIsSubject=true`, controller gender fields may also be used
95
+ * as the subject seed for self-registration flows.
96
+ */
79
97
  subjectGender?: GenderIdentity | string;
80
98
  subjectGivenName?: string;
81
99
  subjectIdType?: IdKindValue | string;
@@ -11,9 +11,20 @@ export declare const AllergyIntoleranceClaim: {
11
11
  readonly ClinicalStatus: "AllergyIntolerance.clinical-status";
12
12
  readonly VerificationStatus: "AllergyIntolerance.verification-status";
13
13
  readonly Category: "AllergyIntolerance.category";
14
+ /**
15
+ * Canonical CSV/list of related contained resource references or identifiers.
16
+ */
17
+ readonly ContainedReferenceList: "AllergyIntolerance.contained-reference-list";
18
+ /**
19
+ * @deprecated Use `ContainedReferenceList`.
20
+ */
21
+ readonly ContainedResourceList: "AllergyIntolerance.contained-resource-list";
22
+ /**
23
+ * @deprecated Use `ContainedReferenceList`.
24
+ */
14
25
  readonly ContainedDocuments: "AllergyIntolerance.contained-documents";
15
26
  /**
16
- * @deprecated Use `ContainedDocuments`.
27
+ * @deprecated Use `ContainedReferenceList`.
17
28
  */
18
29
  readonly AttachmentContentIds: "AllergyIntolerance.attachment-content-ids";
19
30
  readonly Criticality: "AllergyIntolerance.criticality";
@@ -13,9 +13,20 @@ export const AllergyIntoleranceClaim = {
13
13
  ClinicalStatus: 'AllergyIntolerance.clinical-status',
14
14
  VerificationStatus: 'AllergyIntolerance.verification-status',
15
15
  Category: 'AllergyIntolerance.category',
16
+ /**
17
+ * Canonical CSV/list of related contained resource references or identifiers.
18
+ */
19
+ ContainedReferenceList: 'AllergyIntolerance.contained-reference-list',
20
+ /**
21
+ * @deprecated Use `ContainedReferenceList`.
22
+ */
23
+ ContainedResourceList: 'AllergyIntolerance.contained-resource-list',
24
+ /**
25
+ * @deprecated Use `ContainedReferenceList`.
26
+ */
16
27
  ContainedDocuments: 'AllergyIntolerance.contained-documents',
17
28
  /**
18
- * @deprecated Use `ContainedDocuments`.
29
+ * @deprecated Use `ContainedReferenceList`.
19
30
  */
20
31
  AttachmentContentIds: 'AllergyIntolerance.attachment-content-ids',
21
32
  Criticality: 'AllergyIntolerance.criticality',
@@ -6,9 +6,20 @@ export declare const ConditionClaim: {
6
6
  readonly VerificationStatus: "Condition.verification-status";
7
7
  readonly Category: "Condition.category";
8
8
  readonly Code: "Condition.code";
9
+ /**
10
+ * Canonical CSV/list of related contained resource references or identifiers.
11
+ */
12
+ readonly ContainedReferenceList: "Condition.contained-reference-list";
13
+ /**
14
+ * @deprecated Use `ContainedReferenceList`.
15
+ */
16
+ readonly ContainedResourceList: "Condition.contained-resource-list";
17
+ /**
18
+ * @deprecated Use `ContainedReferenceList`.
19
+ */
9
20
  readonly ContainedDocuments: "Condition.contained-documents";
10
21
  /**
11
- * @deprecated Use `ContainedDocuments`.
22
+ * @deprecated Use `ContainedReferenceList`.
12
23
  */
13
24
  readonly AttachmentContentIds: "Condition.attachment-content-ids";
14
25
  readonly Severity: "Condition.severity";
@@ -8,9 +8,20 @@ export const ConditionClaim = {
8
8
  VerificationStatus: 'Condition.verification-status',
9
9
  Category: 'Condition.category',
10
10
  Code: 'Condition.code',
11
+ /**
12
+ * Canonical CSV/list of related contained resource references or identifiers.
13
+ */
14
+ ContainedReferenceList: 'Condition.contained-reference-list',
15
+ /**
16
+ * @deprecated Use `ContainedReferenceList`.
17
+ */
18
+ ContainedResourceList: 'Condition.contained-resource-list',
19
+ /**
20
+ * @deprecated Use `ContainedReferenceList`.
21
+ */
11
22
  ContainedDocuments: 'Condition.contained-documents',
12
23
  /**
13
- * @deprecated Use `ContainedDocuments`.
24
+ * @deprecated Use `ContainedReferenceList`.
14
25
  */
15
26
  AttachmentContentIds: 'Condition.attachment-content-ids',
16
27
  Severity: 'Condition.severity',
@@ -17,6 +17,17 @@ export declare const DiagnosticReportClaim: {
17
17
  readonly PresentedFormContentType: "DiagnosticReport.presented-form-contenttype";
18
18
  readonly PresentedFormData: "DiagnosticReport.presented-form-data";
19
19
  readonly PresentedFormUrl: "DiagnosticReport.presented-form-url";
20
+ /**
21
+ * Canonical CSV/list of related contained resource references or identifiers.
22
+ */
23
+ readonly ContainedReferenceList: "DiagnosticReport.contained-reference-list";
24
+ /**
25
+ * @deprecated Use `ContainedReferenceList`.
26
+ */
27
+ readonly ContainedResourceList: "DiagnosticReport.contained-resource-list";
28
+ /**
29
+ * @deprecated Use `ContainedReferenceList`.
30
+ */
20
31
  readonly ContainedDocuments: "DiagnosticReport.contained-documents";
21
32
  };
22
33
  /**
@@ -31,7 +42,7 @@ export declare const DiagnosticReportClaim: {
31
42
  * - `get/set/add/removeDiagnosticReportResultList`
32
43
  * - `get/set/add/removeDiagnosticReportPerformerList`
33
44
  * - `get/set/add/removeDiagnosticReportSpecimenList`
34
- * - `get/set/add/removeDiagnosticReportContainedDocuments`
45
+ * - `get/set/add/removeDiagnosticReportContainedResourceReferences`
35
46
  * - `get/setDiagnosticReportPresentedFormContentType`
36
47
  * - `get/setDiagnosticReportPresentedFormData`
37
48
  * - `get/setDiagnosticReportPresentedFormUrl`
@@ -87,7 +98,7 @@ export declare const DiagnosticReportSearchParamToClaimKey: Record<DiagnosticRep
87
98
  *
88
99
  * Do not invent camelCase names. Prefer official FHIR search parameter names
89
100
  * or explicit attachment aliases such as `presented-form-*` and
90
- * `contained-documents`.
101
+ * `contained-reference-list`.
91
102
  *
92
103
  * Keep `DiagnosticReport` paused at the typing/mapping layer until:
93
104
  * 1. `claims-helpers-diagnostic-report.ts` exists
@@ -18,6 +18,17 @@ export const DiagnosticReportClaim = {
18
18
  PresentedFormContentType: 'DiagnosticReport.presented-form-contenttype',
19
19
  PresentedFormData: 'DiagnosticReport.presented-form-data',
20
20
  PresentedFormUrl: 'DiagnosticReport.presented-form-url',
21
+ /**
22
+ * Canonical CSV/list of related contained resource references or identifiers.
23
+ */
24
+ ContainedReferenceList: 'DiagnosticReport.contained-reference-list',
25
+ /**
26
+ * @deprecated Use `ContainedReferenceList`.
27
+ */
28
+ ContainedResourceList: 'DiagnosticReport.contained-resource-list',
29
+ /**
30
+ * @deprecated Use `ContainedReferenceList`.
31
+ */
21
32
  ContainedDocuments: 'DiagnosticReport.contained-documents',
22
33
  };
23
34
  export const DiagnosticReportClaimSpecs = [
@@ -96,7 +107,7 @@ export const DiagnosticReportSearchParamToClaimKey = {
96
107
  *
97
108
  * Do not invent camelCase names. Prefer official FHIR search parameter names
98
109
  * or explicit attachment aliases such as `presented-form-*` and
99
- * `contained-documents`.
110
+ * `contained-reference-list`.
100
111
  *
101
112
  * Keep `DiagnosticReport` paused at the typing/mapping layer until:
102
113
  * 1. `claims-helpers-diagnostic-report.ts` exists
@@ -22,6 +22,7 @@ export declare const DocumentReferenceClaim: {
22
22
  readonly Relation: "DocumentReference.relation";
23
23
  readonly Subject: "DocumentReference.subject";
24
24
  readonly Type: "DocumentReference.type";
25
+ readonly UserSelected: "DocumentReference.user-selected";
25
26
  };
26
27
  export type DocumentReferenceClaimKey = typeof DocumentReferenceClaim[keyof typeof DocumentReferenceClaim];
27
28
  /**
@@ -24,6 +24,7 @@ export const DocumentReferenceClaim = {
24
24
  Relation: 'DocumentReference.relation',
25
25
  Subject: 'DocumentReference.subject',
26
26
  Type: 'DocumentReference.type',
27
+ UserSelected: 'DocumentReference.user-selected',
27
28
  };
28
29
  /**
29
30
  * Human-readable reference for UI/docs generators.
@@ -52,6 +53,7 @@ export const DocumentReferenceClaimSpecs = [
52
53
  { key: DocumentReferenceClaim.Relation, meaning: 'Relation type to related document.', example: 'appends' },
53
54
  { key: DocumentReferenceClaim.Subject, meaning: 'URN for the section in the individual index.', example: 'urn:uhix:section:vitals' },
54
55
  { key: DocumentReferenceClaim.Type, meaning: 'Lower-level, sector-specific type.', example: 'http://hl7.org/fhir/ValueSet/c80-doc-typecodes|34133-9' },
56
+ { key: DocumentReferenceClaim.UserSelected, meaning: 'Custom provenance flag telling whether the document was explicitly created or selected by the end user/controller.', example: 'true' },
55
57
  ];
56
58
  /**
57
59
  * Optional mapping helper when converting claims-first payloads to strict FHIR JSON.
@@ -86,4 +88,5 @@ export const DocumentReferenceClaimToFhirPath = {
86
88
  [DocumentReferenceClaim.Relation]: 'DocumentReference.relatesTo.code',
87
89
  [DocumentReferenceClaim.Subject]: 'DocumentReference.subject.reference',
88
90
  [DocumentReferenceClaim.Type]: 'DocumentReference.type.coding',
91
+ [DocumentReferenceClaim.UserSelected]: 'DocumentReference.user-selected',
89
92
  };
@@ -14,6 +14,7 @@ export declare const MedicationStatementClaim: {
14
14
  readonly PartOf: "MedicationStatement.part-of";
15
15
  readonly Source: "MedicationStatement.source";
16
16
  readonly MedicationText: "MedicationStatement.medication-text";
17
+ readonly UserSelected: "MedicationStatement.user-selected";
17
18
  /**
18
19
  * Free-text clinical note.
19
20
  *
@@ -27,6 +28,22 @@ export declare const MedicationStatementClaim: {
27
28
  * `TimingPeriodUnit`, and `DosagePatientInstructionText`.
28
29
  */
29
30
  readonly Note: "MedicationStatement.note";
31
+ /**
32
+ * Canonical CSV/list of related contained resource references or identifiers.
33
+ *
34
+ * Values may be:
35
+ * - `urn:uuid:*`
36
+ * - `ResourceType/urn:uuid:*`
37
+ * - another canonical local resource reference used inside the same bundle
38
+ */
39
+ readonly ContainedReferenceList: "MedicationStatement.contained-reference-list";
40
+ /**
41
+ * @deprecated Use `ContainedReferenceList`.
42
+ */
43
+ readonly ContainedResourceList: "MedicationStatement.contained-resource-list";
44
+ /**
45
+ * @deprecated Use `ContainedReferenceList`.
46
+ */
30
47
  readonly ContainedDocuments: "MedicationStatement.contained-documents";
31
48
  /**
32
49
  * @deprecated Use `ContainedDocuments`.
@@ -16,6 +16,7 @@ export const MedicationStatementClaim = {
16
16
  PartOf: 'MedicationStatement.part-of',
17
17
  Source: 'MedicationStatement.source',
18
18
  MedicationText: 'MedicationStatement.medication-text',
19
+ UserSelected: 'MedicationStatement.user-selected',
19
20
  /**
20
21
  * Free-text clinical note.
21
22
  *
@@ -29,6 +30,22 @@ export const MedicationStatementClaim = {
29
30
  * `TimingPeriodUnit`, and `DosagePatientInstructionText`.
30
31
  */
31
32
  Note: 'MedicationStatement.note',
33
+ /**
34
+ * Canonical CSV/list of related contained resource references or identifiers.
35
+ *
36
+ * Values may be:
37
+ * - `urn:uuid:*`
38
+ * - `ResourceType/urn:uuid:*`
39
+ * - another canonical local resource reference used inside the same bundle
40
+ */
41
+ ContainedReferenceList: 'MedicationStatement.contained-reference-list',
42
+ /**
43
+ * @deprecated Use `ContainedReferenceList`.
44
+ */
45
+ ContainedResourceList: 'MedicationStatement.contained-resource-list',
46
+ /**
47
+ * @deprecated Use `ContainedReferenceList`.
48
+ */
32
49
  ContainedDocuments: 'MedicationStatement.contained-documents',
33
50
  /**
34
51
  * @deprecated Use `ContainedDocuments`.
@@ -6,11 +6,24 @@ export declare const RelatedPersonClaim: {
6
6
  readonly Active: "RelatedPerson.active";
7
7
  readonly Patient: "RelatedPerson.patient";
8
8
  readonly Relationship: "RelatedPerson.relationship";
9
+ /**
10
+ * GDC flat-claim extension for comma-separated functional HL7 role codes.
11
+ * FHIR R4 RelatedPerson has no native `role` property; relationship/kinship
12
+ * remains in `RelatedPerson.relationship`.
13
+ */
14
+ readonly Role: "RelatedPerson.role";
9
15
  readonly Name: "RelatedPerson.name";
10
16
  readonly Telecom: "RelatedPerson.telecom";
11
17
  readonly Gender: "RelatedPerson.gender";
12
18
  readonly BirthDate: "RelatedPerson.birthdate";
13
19
  readonly Address: "RelatedPerson.address";
20
+ /** Logical kind used when a RelatedPerson record acts as a related entity. */
21
+ readonly RelatedEntityType: "RelatedPerson.related-entity-type";
22
+ /**
23
+ * Original public values used to calculate the Consent rule/asset id.
24
+ * These values must not be replaced by the opaque RelatedPerson resource id.
25
+ */
26
+ readonly ActorIdentifier: "RelatedPerson.actor-identifier";
14
27
  };
15
28
  export type RelatedPersonClaimKey = typeof RelatedPersonClaim[keyof typeof RelatedPersonClaim];
16
29
  export declare const RelatedPersonClaimSpecs: ClaimSpec[];
@@ -7,11 +7,24 @@ export const RelatedPersonClaim = {
7
7
  Active: 'RelatedPerson.active',
8
8
  Patient: 'RelatedPerson.patient',
9
9
  Relationship: 'RelatedPerson.relationship',
10
+ /**
11
+ * GDC flat-claim extension for comma-separated functional HL7 role codes.
12
+ * FHIR R4 RelatedPerson has no native `role` property; relationship/kinship
13
+ * remains in `RelatedPerson.relationship`.
14
+ */
15
+ Role: 'RelatedPerson.role',
10
16
  Name: 'RelatedPerson.name',
11
17
  Telecom: 'RelatedPerson.telecom',
12
18
  Gender: 'RelatedPerson.gender',
13
19
  BirthDate: 'RelatedPerson.birthdate',
14
20
  Address: 'RelatedPerson.address',
21
+ /** Logical kind used when a RelatedPerson record acts as a related entity. */
22
+ RelatedEntityType: 'RelatedPerson.related-entity-type',
23
+ /**
24
+ * Original public values used to calculate the Consent rule/asset id.
25
+ * These values must not be replaced by the opaque RelatedPerson resource id.
26
+ */
27
+ ActorIdentifier: 'RelatedPerson.actor-identifier',
15
28
  };
16
29
  export const RelatedPersonClaimSpecs = [
17
30
  { key: RelatedPersonClaim.IdentifierValue, meaning: 'Business identifier value.', example: 'rel-001' },
@@ -19,9 +32,12 @@ export const RelatedPersonClaimSpecs = [
19
32
  { key: RelatedPersonClaim.Active, meaning: 'Active flag.', example: 'true' },
20
33
  { key: RelatedPersonClaim.Patient, meaning: 'Linked patient reference.', example: 'did:web:patient.example.org' },
21
34
  { key: RelatedPersonClaim.Relationship, meaning: 'Relationship token.', example: 'http://terminology.hl7.org/CodeSystem/v3-RoleCode|MTH' },
35
+ { key: RelatedPersonClaim.Role, meaning: 'Comma-separated functional HL7 role values; this is a GDC flat-claim extension, not a native FHIR R4 RelatedPerson property. Known codes resolve to their canonical RoleClass or RoleCode system.', example: 'CAREGIVER,ECON,BILL' },
22
36
  { key: RelatedPersonClaim.Name, meaning: 'Display name.', example: 'Jane Doe' },
23
37
  { key: RelatedPersonClaim.Telecom, meaning: 'Contact value.', example: 'mailto:jane@example.org' },
24
38
  { key: RelatedPersonClaim.Gender, meaning: 'Administrative gender.', example: 'female' },
25
39
  { key: RelatedPersonClaim.BirthDate, meaning: 'Birth date.', example: '1980-02-01' },
26
40
  { key: RelatedPersonClaim.Address, meaning: 'Display address.', example: '123 Main St, Vancouver' },
41
+ { key: RelatedPersonClaim.RelatedEntityType, meaning: 'Logical related-entity kind.', example: 'country-set' },
42
+ { key: RelatedPersonClaim.ActorIdentifier, meaning: 'Original public Consent actor identifiers as CSV.', example: 'ES,PT' },
27
43
  ];
@@ -0,0 +1,51 @@
1
+ import { ClinicalResourceEntryEditor } from './clinical-resource-entry-editor';
2
+ /**
3
+ * Typed editor for one staged AllergyIntolerance resource entry.
4
+ *
5
+ * Use this from frontend/BFF bundle-authoring flows when the caller needs one
6
+ * allergy row with canonical claims-first accessors.
7
+ */
8
+ export declare class AllergyIntoleranceEntryEditor extends ClinicalResourceEntryEditor {
9
+ /** Writes the canonical allergy identifier. */
10
+ setIdentifier(identifier?: string | null): this;
11
+ /** Reads the canonical allergy identifier. */
12
+ getIdentifier(): string | undefined;
13
+ /** Ensures the allergy entry has one canonical `urn:uuid:*` identifier. */
14
+ ensureIdentifier(): string;
15
+ /** Writes the subject/patient reference for the allergy entry. */
16
+ setSubject(subject?: string | null): this;
17
+ /** Reads the subject/patient reference for the allergy entry. */
18
+ getSubject(): string | undefined;
19
+ /** Writes the coded allergy substance. */
20
+ setCode(code?: string | null): this;
21
+ /** Reads the coded allergy substance. */
22
+ getCode(): string | undefined;
23
+ /** Writes the clinical status. */
24
+ setClinicalStatus(status?: string | null): this;
25
+ /** Reads the clinical status. */
26
+ getClinicalStatus(): string | undefined;
27
+ /** Writes the verification status. */
28
+ setVerificationStatus(status?: string | null): this;
29
+ /** Reads the verification status. */
30
+ getVerificationStatus(): string | undefined;
31
+ /** Writes the allergy category. */
32
+ setCategory(category?: string | null): this;
33
+ /** Reads the allergy category. */
34
+ getCategory(): string | undefined;
35
+ /** Writes the allergy criticality. */
36
+ setCriticality(criticality?: string | null): this;
37
+ /** Reads the allergy criticality. */
38
+ getCriticality(): string | undefined;
39
+ /** Writes the onset date/time. */
40
+ setOnsetDateTime(value?: string | null): this;
41
+ /** Reads the onset date/time. */
42
+ getOnsetDateTime(): string | undefined;
43
+ /** Writes the recorder reference. */
44
+ setRecorder(reference?: string | null): this;
45
+ /** Reads the recorder reference. */
46
+ getRecorder(): string | undefined;
47
+ /** Writes the linked contained-document identifier list. */
48
+ setContainedDocumentIdentifierList(identifiers: readonly string[]): this;
49
+ /** Reads the linked contained-document identifier list. */
50
+ getContainedDocumentIdentifierList(): string[];
51
+ }
@@ -0,0 +1,55 @@
1
+ import { ClinicalResourceEntryEditor } from './clinical-resource-entry-editor.js';
2
+ import { AllergyIntoleranceClaim } from '../models/interoperable-claims/allergy-intolerance-claims.js';
3
+ import { BundleEditableResourceTypes } from '../models/bundle-editor-types.js';
4
+ import { registerBundleEntryEditor } from './bundle-editor-registry.js';
5
+ /**
6
+ * Typed editor for one staged AllergyIntolerance resource entry.
7
+ *
8
+ * Use this from frontend/BFF bundle-authoring flows when the caller needs one
9
+ * allergy row with canonical claims-first accessors.
10
+ */
11
+ export class AllergyIntoleranceEntryEditor extends ClinicalResourceEntryEditor {
12
+ /** Writes the canonical allergy identifier. */
13
+ setIdentifier(identifier) { return this.setIdentifierValue(AllergyIntoleranceClaim.Identifier, identifier); }
14
+ /** Reads the canonical allergy identifier. */
15
+ getIdentifier() { return this.getIdentifierValue(AllergyIntoleranceClaim.Identifier); }
16
+ /** Ensures the allergy entry has one canonical `urn:uuid:*` identifier. */
17
+ ensureIdentifier() { return this.ensureIdentifierValue(AllergyIntoleranceClaim.Identifier); }
18
+ /** Writes the subject/patient reference for the allergy entry. */
19
+ setSubject(subject) { return this.setSubjectClaims(AllergyIntoleranceClaim.Subject, AllergyIntoleranceClaim.Patient, subject); }
20
+ /** Reads the subject/patient reference for the allergy entry. */
21
+ getSubject() { return this.getSubjectClaims(AllergyIntoleranceClaim.Subject, AllergyIntoleranceClaim.Patient); }
22
+ /** Writes the coded allergy substance. */
23
+ setCode(code) { return this.setScalarClaim(AllergyIntoleranceClaim.Code, code); }
24
+ /** Reads the coded allergy substance. */
25
+ getCode() { return this.getScalarClaim(AllergyIntoleranceClaim.Code); }
26
+ /** Writes the clinical status. */
27
+ setClinicalStatus(status) { return this.setScalarClaim(AllergyIntoleranceClaim.ClinicalStatus, status); }
28
+ /** Reads the clinical status. */
29
+ getClinicalStatus() { return this.getScalarClaim(AllergyIntoleranceClaim.ClinicalStatus); }
30
+ /** Writes the verification status. */
31
+ setVerificationStatus(status) { return this.setScalarClaim(AllergyIntoleranceClaim.VerificationStatus, status); }
32
+ /** Reads the verification status. */
33
+ getVerificationStatus() { return this.getScalarClaim(AllergyIntoleranceClaim.VerificationStatus); }
34
+ /** Writes the allergy category. */
35
+ setCategory(category) { return this.setScalarClaim(AllergyIntoleranceClaim.Category, category); }
36
+ /** Reads the allergy category. */
37
+ getCategory() { return this.getScalarClaim(AllergyIntoleranceClaim.Category); }
38
+ /** Writes the allergy criticality. */
39
+ setCriticality(criticality) { return this.setScalarClaim(AllergyIntoleranceClaim.Criticality, criticality); }
40
+ /** Reads the allergy criticality. */
41
+ getCriticality() { return this.getScalarClaim(AllergyIntoleranceClaim.Criticality); }
42
+ /** Writes the onset date/time. */
43
+ setOnsetDateTime(value) { return this.setScalarClaim(AllergyIntoleranceClaim.OnsetDateTime, value); }
44
+ /** Reads the onset date/time. */
45
+ getOnsetDateTime() { return this.getScalarClaim(AllergyIntoleranceClaim.OnsetDateTime); }
46
+ /** Writes the recorder reference. */
47
+ setRecorder(reference) { return this.setScalarClaim(AllergyIntoleranceClaim.Recorder, reference); }
48
+ /** Reads the recorder reference. */
49
+ getRecorder() { return this.getScalarClaim(AllergyIntoleranceClaim.Recorder); }
50
+ /** Writes the linked contained-document identifier list. */
51
+ setContainedDocumentIdentifierList(identifiers) { return this.setCsvClaimList(AllergyIntoleranceClaim.ContainedReferenceList, identifiers); }
52
+ /** Reads the linked contained-document identifier list. */
53
+ getContainedDocumentIdentifierList() { return this.getCsvClaimList(AllergyIntoleranceClaim.ContainedReferenceList); }
54
+ }
55
+ registerBundleEntryEditor(BundleEditableResourceTypes.allergyIntolerance, AllergyIntoleranceEntryEditor);
@@ -0,0 +1,37 @@
1
+ import type { AuthorityCatalogRecord, AuthorityResolution, AuthorityResolutionInput } from '../models/authority-resolution';
2
+ /**
3
+ * Builds one authority/root `did:web` from a bare host authority or URL.
4
+ *
5
+ * Examples:
6
+ * - `https://gw.example.org` -> `did:web:gw.example.org`
7
+ * - `localhost:3300` -> `did:web:localhost%3A3300`
8
+ */
9
+ export declare function buildAuthorityDidWeb(input: {
10
+ authority: string;
11
+ }): string;
12
+ /**
13
+ * Normalizes one authority base URL from either an explicit URL or one
14
+ * authority/root `did:web`.
15
+ */
16
+ export declare function resolveAuthorityBaseUrl(input: {
17
+ authorityBaseUrl?: string;
18
+ authorityDidWeb?: string;
19
+ }): string | undefined;
20
+ /**
21
+ * Builds one compatibility authority resolution when the caller only knows:
22
+ * - tenant context
23
+ * - one base URL or one root authority `did:web`
24
+ *
25
+ * This helper intentionally keeps the current hosted-DID fallback in one place
26
+ * so app code does not have to hand-invent `did:web` strings.
27
+ */
28
+ export declare function buildLegacyAuthorityResolution(input: AuthorityResolutionInput & Readonly<{
29
+ tenantId: string;
30
+ jurisdiction: string;
31
+ sector: string;
32
+ }>): AuthorityResolution;
33
+ /**
34
+ * Converts one resolution into a catalog-style record so runtimes can preload
35
+ * legacy fallback data into a shared resolver cache.
36
+ */
37
+ export declare function authorityResolutionToCatalogRecord(resolution: AuthorityResolution): AuthorityCatalogRecord;