gdc-common-utils-ts 1.14.4 → 1.14.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants/communication.d.ts +30 -0
- package/dist/constants/communication.js +3 -1
- package/dist/constants/healthcare.d.ts +50 -3
- package/dist/constants/healthcare.js +98 -8
- package/dist/examples/communication-bundle-document-request.d.ts +24 -0
- package/dist/examples/communication-bundle-document-request.js +59 -0
- package/dist/examples/communication-bundle-session.js +28 -29
- package/dist/examples/index.d.ts +1 -0
- package/dist/examples/index.js +1 -0
- package/dist/examples/shared.d.ts +36 -0
- package/dist/examples/shared.js +55 -3
- package/dist/models/consent-rule.d.ts +6 -1
- package/dist/models/consent-rule.js +4 -0
- package/dist/utils/communication-bundle-document-request.d.ts +202 -0
- package/dist/utils/communication-bundle-document-request.js +410 -0
- package/dist/utils/communication-claim-helpers.d.ts +17 -0
- package/dist/utils/communication-claim-helpers.js +57 -0
- package/dist/utils/consent-claim-helpers.d.ts +40 -0
- package/dist/utils/consent-claim-helpers.js +70 -0
- package/dist/utils/consent.js +29 -1
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +2 -0
- package/dist/utils/medication-claim-helpers.d.ts +22 -0
- package/dist/utils/medication-claim-helpers.js +118 -2
- package/package.json +1 -1
|
@@ -2,27 +2,57 @@ export declare const HL7_COMMUNICATION_CATEGORY_SYSTEM: "http://terminology.hl7.
|
|
|
2
2
|
export type CommunicationCategoryDescriptor = Readonly<{
|
|
3
3
|
system: typeof HL7_COMMUNICATION_CATEGORY_SYSTEM;
|
|
4
4
|
code: string;
|
|
5
|
+
attributeValue: string;
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated Use `attributeValue`.
|
|
8
|
+
* Kept as compatibility alias because this token is a reusable attribute
|
|
9
|
+
* value, not a claim key/attribute name.
|
|
10
|
+
*/
|
|
5
11
|
claim: string;
|
|
6
12
|
}>;
|
|
7
13
|
export declare const CommunicationCategoryCodes: Readonly<{
|
|
8
14
|
readonly Alert: Readonly<{
|
|
9
15
|
system: typeof HL7_COMMUNICATION_CATEGORY_SYSTEM;
|
|
10
16
|
code: string;
|
|
17
|
+
attributeValue: string;
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated Use `attributeValue`.
|
|
20
|
+
* Kept as compatibility alias because this token is a reusable attribute
|
|
21
|
+
* value, not a claim key/attribute name.
|
|
22
|
+
*/
|
|
11
23
|
claim: string;
|
|
12
24
|
}>;
|
|
13
25
|
readonly Notification: Readonly<{
|
|
14
26
|
system: typeof HL7_COMMUNICATION_CATEGORY_SYSTEM;
|
|
15
27
|
code: string;
|
|
28
|
+
attributeValue: string;
|
|
29
|
+
/**
|
|
30
|
+
* @deprecated Use `attributeValue`.
|
|
31
|
+
* Kept as compatibility alias because this token is a reusable attribute
|
|
32
|
+
* value, not a claim key/attribute name.
|
|
33
|
+
*/
|
|
16
34
|
claim: string;
|
|
17
35
|
}>;
|
|
18
36
|
readonly Reminder: Readonly<{
|
|
19
37
|
system: typeof HL7_COMMUNICATION_CATEGORY_SYSTEM;
|
|
20
38
|
code: string;
|
|
39
|
+
attributeValue: string;
|
|
40
|
+
/**
|
|
41
|
+
* @deprecated Use `attributeValue`.
|
|
42
|
+
* Kept as compatibility alias because this token is a reusable attribute
|
|
43
|
+
* value, not a claim key/attribute name.
|
|
44
|
+
*/
|
|
21
45
|
claim: string;
|
|
22
46
|
}>;
|
|
23
47
|
readonly Instruction: Readonly<{
|
|
24
48
|
system: typeof HL7_COMMUNICATION_CATEGORY_SYSTEM;
|
|
25
49
|
code: string;
|
|
50
|
+
attributeValue: string;
|
|
51
|
+
/**
|
|
52
|
+
* @deprecated Use `attributeValue`.
|
|
53
|
+
* Kept as compatibility alias because this token is a reusable attribute
|
|
54
|
+
* value, not a claim key/attribute name.
|
|
55
|
+
*/
|
|
26
56
|
claim: string;
|
|
27
57
|
}>;
|
|
28
58
|
}>;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
export const HL7_COMMUNICATION_CATEGORY_SYSTEM = 'http://terminology.hl7.org/CodeSystem/communication-category';
|
|
2
2
|
function defineCommunicationCategory(code) {
|
|
3
|
+
const attributeValue = `${HL7_COMMUNICATION_CATEGORY_SYSTEM}|${code}`;
|
|
3
4
|
return Object.freeze({
|
|
4
5
|
system: HL7_COMMUNICATION_CATEGORY_SYSTEM,
|
|
5
6
|
code,
|
|
6
|
-
|
|
7
|
+
attributeValue,
|
|
8
|
+
claim: attributeValue,
|
|
7
9
|
});
|
|
8
10
|
}
|
|
9
11
|
export const CommunicationCategoryCodes = Object.freeze({
|
|
@@ -13,6 +13,22 @@ export type HealthcareSectionDescriptor = Readonly<{
|
|
|
13
13
|
i18nKey: `org.loinc.${string}`;
|
|
14
14
|
titleEn?: string;
|
|
15
15
|
}>;
|
|
16
|
+
export type HealthcareDocumentTypeDescriptor = Readonly<{
|
|
17
|
+
id: string;
|
|
18
|
+
system: typeof LOINC_SYSTEM_URL;
|
|
19
|
+
code: string;
|
|
20
|
+
attributeValue: string;
|
|
21
|
+
titleEn?: string;
|
|
22
|
+
}>;
|
|
23
|
+
/**
|
|
24
|
+
* Canonical logical identifiers for document types backed by the LOINC
|
|
25
|
+
* ontology. These keys are stable SDK-facing names; the concrete LOINC token
|
|
26
|
+
* lives in `HealthcareDocumentTypes`.
|
|
27
|
+
*/
|
|
28
|
+
export declare const DocumentTypeLoincOntology: Readonly<{
|
|
29
|
+
readonly IPS: "IPS";
|
|
30
|
+
}>;
|
|
31
|
+
export type DocumentTypeLoincOntologyKey = typeof DocumentTypeLoincOntology[keyof typeof DocumentTypeLoincOntology];
|
|
16
32
|
export declare const ISCO08_CODING_SYSTEM: "org.ilo.isco";
|
|
17
33
|
export declare const ISCO08_I18N_NAMESPACE: "org.ilo.isco-08";
|
|
18
34
|
export declare const HealthcareRoleFamilies: Readonly<{
|
|
@@ -194,6 +210,15 @@ export declare const HealthcareBasicSections: Readonly<{
|
|
|
194
210
|
titleEn?: string;
|
|
195
211
|
}>;
|
|
196
212
|
}>;
|
|
213
|
+
export declare const HealthcareDocumentTypes: Readonly<{
|
|
214
|
+
readonly IPS: Readonly<{
|
|
215
|
+
id: string;
|
|
216
|
+
system: typeof LOINC_SYSTEM_URL;
|
|
217
|
+
code: string;
|
|
218
|
+
attributeValue: string;
|
|
219
|
+
titleEn?: string;
|
|
220
|
+
}>;
|
|
221
|
+
}>;
|
|
197
222
|
export declare const HealthcareAdditionalSections: Readonly<{
|
|
198
223
|
AdvanceDirectives: Readonly<{
|
|
199
224
|
system: typeof LOINC_SYSTEM_URL;
|
|
@@ -573,16 +598,36 @@ export declare const HealthcareConsentPurposes: Readonly<{
|
|
|
573
598
|
}>;
|
|
574
599
|
export declare const HealthcareActorRoles: Readonly<{
|
|
575
600
|
readonly Controller: "ISCO-08|1120";
|
|
601
|
+
readonly MedicalDoctors: "ISCO-08|221";
|
|
602
|
+
readonly GeneralistMedicalPractitioner: "ISCO-08|2211";
|
|
603
|
+
readonly SpecialistMedicalPractitioner: "ISCO-08|2212";
|
|
604
|
+
/**
|
|
605
|
+
* @deprecated Use `GeneralistMedicalPractitioner`.
|
|
606
|
+
* Kept as compatibility alias for the historical SDK name.
|
|
607
|
+
*/
|
|
576
608
|
readonly Physician: "ISCO-08|2211";
|
|
577
609
|
readonly NursingProfessional: "ISCO-08|2221";
|
|
610
|
+
readonly MidwiferyProfessional: "ISCO-08|2222";
|
|
578
611
|
readonly Paramedic: "ISCO-08|2240";
|
|
579
612
|
readonly Veterinarian: "ISCO-08|2250";
|
|
580
613
|
}>;
|
|
581
614
|
export declare const HealthcareActorRoleCodes: Readonly<{
|
|
582
615
|
readonly Controller: "1120";
|
|
616
|
+
readonly MedicalDoctors: "221";
|
|
617
|
+
readonly GeneralistMedicalPractitioner: "2211";
|
|
618
|
+
readonly SpecialistMedicalPractitioner: "2212";
|
|
619
|
+
/**
|
|
620
|
+
* @deprecated Use `GeneralistMedicalPractitioner`.
|
|
621
|
+
* Kept as compatibility alias for the historical SDK name.
|
|
622
|
+
*/
|
|
583
623
|
readonly Physician: "2211";
|
|
624
|
+
/**
|
|
625
|
+
* @deprecated Use `MedicalDoctors`.
|
|
626
|
+
* Kept as compatibility alias for the historical SDK name.
|
|
627
|
+
*/
|
|
584
628
|
readonly PhysicianBroad: "221";
|
|
585
629
|
readonly NursingProfessional: "2221";
|
|
630
|
+
readonly MidwiferyProfessional: "2222";
|
|
586
631
|
readonly Paramedic: "2240";
|
|
587
632
|
readonly Veterinarian: "2250";
|
|
588
633
|
}>;
|
|
@@ -617,15 +662,15 @@ export declare const HealthcareRolesByFamily: Readonly<{
|
|
|
617
662
|
}>;
|
|
618
663
|
export declare const HealthcareAllRolesByClaim: Readonly<Record<string, HealthcareActorRoleDescriptor>>;
|
|
619
664
|
export declare const HealthcareProfessionalRoleCodesBySector: Readonly<{
|
|
620
|
-
readonly "health-care": readonly ("1120" | "2211" | "2221" | "2240")[];
|
|
621
|
-
readonly "health-research": readonly ("1120" | "2211")[];
|
|
665
|
+
readonly "health-care": readonly ("1120" | "221" | "2211" | "2212" | "2221" | "2222" | "2240")[];
|
|
666
|
+
readonly "health-research": readonly ("1120" | "221" | "2211" | "2212")[];
|
|
622
667
|
readonly "health-tech": readonly "1120"[];
|
|
623
668
|
readonly "health-insurance": readonly "1120"[];
|
|
624
669
|
readonly "animal-care": readonly ("1120" | "2250")[];
|
|
625
670
|
readonly "animal-research": readonly ("1120" | "2250")[];
|
|
626
671
|
readonly "animal-insurance": readonly "1120"[];
|
|
627
672
|
readonly "animal-tech": readonly "1120"[];
|
|
628
|
-
readonly "onehealth-research": readonly ("1120" | "2211" | "2250")[];
|
|
673
|
+
readonly "onehealth-research": readonly ("1120" | "221" | "2211" | "2212" | "2250")[];
|
|
629
674
|
readonly "onehealth-tech": readonly "1120"[];
|
|
630
675
|
}>;
|
|
631
676
|
export declare const HealthcareProfessionalRolesBySector: Readonly<{
|
|
@@ -720,10 +765,12 @@ export declare const HealthcareProfessionalRolesBySector: Readonly<{
|
|
|
720
765
|
definition?: string;
|
|
721
766
|
}>>>;
|
|
722
767
|
}>;
|
|
768
|
+
export declare const HealthcareProfessionalRolesBySectorAndClaim: Readonly<Record<DataspaceSector, Readonly<Record<string, HealthcareActorRoleDescriptor>>>>;
|
|
723
769
|
export declare const HealthcareRolesBySector: Readonly<Record<DataspaceSector, Readonly<Record<HealthcareRoleFamily, Readonly<Record<string, HealthcareActorRoleDescriptor>>>>>>;
|
|
724
770
|
export declare function getHealthcareRolesByFamily(family: HealthcareRoleFamily): Readonly<Record<string, HealthcareActorRoleDescriptor>>;
|
|
725
771
|
export declare function getHealthcareRoleByClaim(claim: string): HealthcareActorRoleDescriptor | undefined;
|
|
726
772
|
export declare function getHealthcareProfessionalRolesBySector(sector: DataspaceSector): Readonly<Record<string, HealthcareActorRoleDescriptor>>;
|
|
773
|
+
export declare function getHealthcareProfessionalRolesBySectorAndClaim(sector: DataspaceSector): Readonly<Record<string, HealthcareActorRoleDescriptor>>;
|
|
727
774
|
export declare function getHealthcareRolesBySector(sector: DataspaceSector, family: HealthcareRoleFamily): Readonly<Record<string, HealthcareActorRoleDescriptor>>;
|
|
728
775
|
export declare const HealthcareConsentActions: Readonly<{
|
|
729
776
|
readonly PatientSummaryDocument: string;
|
|
@@ -2,6 +2,14 @@ import { LOINC_SYSTEM_URL, loincI18nKey } from '../models/clinical-sections.js';
|
|
|
2
2
|
import { clinicalDocTypes, clinicalSectionAdditional, clinicalSectionsBase, } from '../models/clinical-sections.en.js';
|
|
3
3
|
import { HL7_CODING_SYSTEM_PERSONAL_RELATIONSHIP, HL7_CODING_SYSTEM_V3_ROLE_CODE, HL7_PERSONAL_RELATIONSHIP_ROLES, HL7_V3_ROLE_CODE_LEGAL_REPRESENTATIVE, } from './hl7-roles.js';
|
|
4
4
|
import { DataspaceSectors } from './sectors.js';
|
|
5
|
+
/**
|
|
6
|
+
* Canonical logical identifiers for document types backed by the LOINC
|
|
7
|
+
* ontology. These keys are stable SDK-facing names; the concrete LOINC token
|
|
8
|
+
* lives in `HealthcareDocumentTypes`.
|
|
9
|
+
*/
|
|
10
|
+
export const DocumentTypeLoincOntology = Object.freeze({
|
|
11
|
+
IPS: 'IPS',
|
|
12
|
+
});
|
|
5
13
|
export const ISCO08_CODING_SYSTEM = 'org.ilo.isco';
|
|
6
14
|
export const ISCO08_I18N_NAMESPACE = 'org.ilo.isco-08';
|
|
7
15
|
export const HealthcareRoleFamilies = Object.freeze({
|
|
@@ -20,6 +28,15 @@ function defineSection(code, titleEn) {
|
|
|
20
28
|
titleEn,
|
|
21
29
|
});
|
|
22
30
|
}
|
|
31
|
+
function defineDocumentType(id, code, titleEn) {
|
|
32
|
+
return Object.freeze({
|
|
33
|
+
id,
|
|
34
|
+
system: LOINC_SYSTEM_URL,
|
|
35
|
+
code,
|
|
36
|
+
attributeValue: `${LOINC_SYSTEM_URL}|${code}`,
|
|
37
|
+
titleEn,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
23
40
|
export const HealthcareSectionFamilies = Object.freeze({
|
|
24
41
|
Summary: 'summary',
|
|
25
42
|
Management: 'management',
|
|
@@ -42,6 +59,9 @@ export const HealthcareBasicSections = Object.freeze({
|
|
|
42
59
|
SocialHistory: defineSection('29762-2'),
|
|
43
60
|
VitalSigns: defineSection('8716-3'),
|
|
44
61
|
});
|
|
62
|
+
export const HealthcareDocumentTypes = Object.freeze({
|
|
63
|
+
[DocumentTypeLoincOntology.IPS]: defineDocumentType(DocumentTypeLoincOntology.IPS, '60591-5', 'International Patient Summary'),
|
|
64
|
+
});
|
|
45
65
|
export const HealthcareAdditionalSections = Object.freeze({
|
|
46
66
|
AdvanceDirectives: defineSection('42348-3'),
|
|
47
67
|
DiagnosticImaging: defineSection('18726-0'),
|
|
@@ -89,16 +109,36 @@ export const HealthcareConsentPurposes = Object.freeze({
|
|
|
89
109
|
});
|
|
90
110
|
export const HealthcareActorRoles = Object.freeze({
|
|
91
111
|
Controller: 'ISCO-08|1120',
|
|
112
|
+
MedicalDoctors: 'ISCO-08|221',
|
|
113
|
+
GeneralistMedicalPractitioner: 'ISCO-08|2211',
|
|
114
|
+
SpecialistMedicalPractitioner: 'ISCO-08|2212',
|
|
115
|
+
/**
|
|
116
|
+
* @deprecated Use `GeneralistMedicalPractitioner`.
|
|
117
|
+
* Kept as compatibility alias for the historical SDK name.
|
|
118
|
+
*/
|
|
92
119
|
Physician: 'ISCO-08|2211',
|
|
93
120
|
NursingProfessional: 'ISCO-08|2221',
|
|
121
|
+
MidwiferyProfessional: 'ISCO-08|2222',
|
|
94
122
|
Paramedic: 'ISCO-08|2240',
|
|
95
123
|
Veterinarian: 'ISCO-08|2250',
|
|
96
124
|
});
|
|
97
125
|
export const HealthcareActorRoleCodes = Object.freeze({
|
|
98
126
|
Controller: '1120',
|
|
127
|
+
MedicalDoctors: '221',
|
|
128
|
+
GeneralistMedicalPractitioner: '2211',
|
|
129
|
+
SpecialistMedicalPractitioner: '2212',
|
|
130
|
+
/**
|
|
131
|
+
* @deprecated Use `GeneralistMedicalPractitioner`.
|
|
132
|
+
* Kept as compatibility alias for the historical SDK name.
|
|
133
|
+
*/
|
|
99
134
|
Physician: '2211',
|
|
135
|
+
/**
|
|
136
|
+
* @deprecated Use `MedicalDoctors`.
|
|
137
|
+
* Kept as compatibility alias for the historical SDK name.
|
|
138
|
+
*/
|
|
100
139
|
PhysicianBroad: '221',
|
|
101
140
|
NursingProfessional: '2221',
|
|
141
|
+
MidwiferyProfessional: '2222',
|
|
102
142
|
Paramedic: '2240',
|
|
103
143
|
Veterinarian: '2250',
|
|
104
144
|
});
|
|
@@ -116,14 +156,36 @@ function buildProfessionalIscoRoles() {
|
|
|
116
156
|
}),
|
|
117
157
|
],
|
|
118
158
|
[
|
|
119
|
-
HealthcareActorRoleCodes.
|
|
159
|
+
HealthcareActorRoleCodes.MedicalDoctors,
|
|
160
|
+
Object.freeze({
|
|
161
|
+
family: HealthcareRoleFamilies.ProfessionalOccupationIsco08,
|
|
162
|
+
codingSystem: ISCO08_CODING_SYSTEM,
|
|
163
|
+
code: HealthcareActorRoleCodes.MedicalDoctors,
|
|
164
|
+
claim: HealthcareActorRoles.MedicalDoctors,
|
|
165
|
+
i18nKey: `${ISCO08_I18N_NAMESPACE}.${HealthcareActorRoleCodes.MedicalDoctors}`,
|
|
166
|
+
titleEn: 'Medical doctors',
|
|
167
|
+
}),
|
|
168
|
+
],
|
|
169
|
+
[
|
|
170
|
+
HealthcareActorRoleCodes.GeneralistMedicalPractitioner,
|
|
120
171
|
Object.freeze({
|
|
121
172
|
family: HealthcareRoleFamilies.ProfessionalOccupationIsco08,
|
|
122
173
|
codingSystem: ISCO08_CODING_SYSTEM,
|
|
123
|
-
code: HealthcareActorRoleCodes.
|
|
124
|
-
claim: HealthcareActorRoles.
|
|
125
|
-
i18nKey: `${ISCO08_I18N_NAMESPACE}.${HealthcareActorRoleCodes.
|
|
126
|
-
titleEn: '
|
|
174
|
+
code: HealthcareActorRoleCodes.GeneralistMedicalPractitioner,
|
|
175
|
+
claim: HealthcareActorRoles.GeneralistMedicalPractitioner,
|
|
176
|
+
i18nKey: `${ISCO08_I18N_NAMESPACE}.${HealthcareActorRoleCodes.GeneralistMedicalPractitioner}`,
|
|
177
|
+
titleEn: 'Generalist medical practitioner',
|
|
178
|
+
}),
|
|
179
|
+
],
|
|
180
|
+
[
|
|
181
|
+
HealthcareActorRoleCodes.SpecialistMedicalPractitioner,
|
|
182
|
+
Object.freeze({
|
|
183
|
+
family: HealthcareRoleFamilies.ProfessionalOccupationIsco08,
|
|
184
|
+
codingSystem: ISCO08_CODING_SYSTEM,
|
|
185
|
+
code: HealthcareActorRoleCodes.SpecialistMedicalPractitioner,
|
|
186
|
+
claim: HealthcareActorRoles.SpecialistMedicalPractitioner,
|
|
187
|
+
i18nKey: `${ISCO08_I18N_NAMESPACE}.${HealthcareActorRoleCodes.SpecialistMedicalPractitioner}`,
|
|
188
|
+
titleEn: 'Specialist medical practitioner',
|
|
127
189
|
}),
|
|
128
190
|
],
|
|
129
191
|
[
|
|
@@ -137,6 +199,17 @@ function buildProfessionalIscoRoles() {
|
|
|
137
199
|
titleEn: 'Nursing professional',
|
|
138
200
|
}),
|
|
139
201
|
],
|
|
202
|
+
[
|
|
203
|
+
HealthcareActorRoleCodes.MidwiferyProfessional,
|
|
204
|
+
Object.freeze({
|
|
205
|
+
family: HealthcareRoleFamilies.ProfessionalOccupationIsco08,
|
|
206
|
+
codingSystem: ISCO08_CODING_SYSTEM,
|
|
207
|
+
code: HealthcareActorRoleCodes.MidwiferyProfessional,
|
|
208
|
+
claim: HealthcareActorRoles.MidwiferyProfessional,
|
|
209
|
+
i18nKey: `${ISCO08_I18N_NAMESPACE}.${HealthcareActorRoleCodes.MidwiferyProfessional}`,
|
|
210
|
+
titleEn: 'Midwifery professional',
|
|
211
|
+
}),
|
|
212
|
+
],
|
|
140
213
|
[
|
|
141
214
|
HealthcareActorRoleCodes.Paramedic,
|
|
142
215
|
Object.freeze({
|
|
@@ -203,16 +276,24 @@ function pickRoleCatalogByCodes(catalog, codes) {
|
|
|
203
276
|
.map((code) => [code, catalog[code]])
|
|
204
277
|
.filter((entry) => Boolean(entry[1]))));
|
|
205
278
|
}
|
|
279
|
+
function reindexRoleCatalogByClaim(catalog) {
|
|
280
|
+
return Object.freeze(Object.fromEntries(Object.values(catalog).map((descriptor) => [descriptor.claim, descriptor])));
|
|
281
|
+
}
|
|
206
282
|
export const HealthcareProfessionalRoleCodesBySector = Object.freeze({
|
|
207
283
|
[DataspaceSectors.HealthCare]: Object.freeze([
|
|
208
284
|
HealthcareActorRoleCodes.Controller,
|
|
209
|
-
HealthcareActorRoleCodes.
|
|
285
|
+
HealthcareActorRoleCodes.MedicalDoctors,
|
|
286
|
+
HealthcareActorRoleCodes.GeneralistMedicalPractitioner,
|
|
287
|
+
HealthcareActorRoleCodes.SpecialistMedicalPractitioner,
|
|
210
288
|
HealthcareActorRoleCodes.NursingProfessional,
|
|
289
|
+
HealthcareActorRoleCodes.MidwiferyProfessional,
|
|
211
290
|
HealthcareActorRoleCodes.Paramedic,
|
|
212
291
|
]),
|
|
213
292
|
[DataspaceSectors.HealthResearch]: Object.freeze([
|
|
214
293
|
HealthcareActorRoleCodes.Controller,
|
|
215
|
-
HealthcareActorRoleCodes.
|
|
294
|
+
HealthcareActorRoleCodes.MedicalDoctors,
|
|
295
|
+
HealthcareActorRoleCodes.GeneralistMedicalPractitioner,
|
|
296
|
+
HealthcareActorRoleCodes.SpecialistMedicalPractitioner,
|
|
216
297
|
]),
|
|
217
298
|
[DataspaceSectors.HealthTech]: Object.freeze([HealthcareActorRoleCodes.Controller]),
|
|
218
299
|
[DataspaceSectors.HealthInsurance]: Object.freeze([HealthcareActorRoleCodes.Controller]),
|
|
@@ -228,7 +309,9 @@ export const HealthcareProfessionalRoleCodesBySector = Object.freeze({
|
|
|
228
309
|
[DataspaceSectors.AnimalTech]: Object.freeze([HealthcareActorRoleCodes.Controller]),
|
|
229
310
|
[DataspaceSectors.OneHealthResearch]: Object.freeze([
|
|
230
311
|
HealthcareActorRoleCodes.Controller,
|
|
231
|
-
HealthcareActorRoleCodes.
|
|
312
|
+
HealthcareActorRoleCodes.MedicalDoctors,
|
|
313
|
+
HealthcareActorRoleCodes.GeneralistMedicalPractitioner,
|
|
314
|
+
HealthcareActorRoleCodes.SpecialistMedicalPractitioner,
|
|
232
315
|
HealthcareActorRoleCodes.Veterinarian,
|
|
233
316
|
]),
|
|
234
317
|
[DataspaceSectors.OneHealthTech]: Object.freeze([HealthcareActorRoleCodes.Controller]),
|
|
@@ -245,6 +328,10 @@ export const HealthcareProfessionalRolesBySector = Object.freeze({
|
|
|
245
328
|
[DataspaceSectors.OneHealthResearch]: pickRoleCatalogByCodes(HealthcareRolesByFamily[HealthcareRoleFamilies.ProfessionalOccupationIsco08], HealthcareProfessionalRoleCodesBySector[DataspaceSectors.OneHealthResearch]),
|
|
246
329
|
[DataspaceSectors.OneHealthTech]: pickRoleCatalogByCodes(HealthcareRolesByFamily[HealthcareRoleFamilies.ProfessionalOccupationIsco08], HealthcareProfessionalRoleCodesBySector[DataspaceSectors.OneHealthTech]),
|
|
247
330
|
});
|
|
331
|
+
export const HealthcareProfessionalRolesBySectorAndClaim = Object.freeze(Object.fromEntries(Object.values(DataspaceSectors).map((sector) => [
|
|
332
|
+
sector,
|
|
333
|
+
reindexRoleCatalogByClaim(HealthcareProfessionalRolesBySector[sector] || {}),
|
|
334
|
+
])));
|
|
248
335
|
export const HealthcareRolesBySector = Object.freeze(Object.fromEntries(Object.values(DataspaceSectors).map((sector) => [
|
|
249
336
|
sector,
|
|
250
337
|
Object.freeze({
|
|
@@ -262,6 +349,9 @@ export function getHealthcareRoleByClaim(claim) {
|
|
|
262
349
|
export function getHealthcareProfessionalRolesBySector(sector) {
|
|
263
350
|
return HealthcareProfessionalRolesBySector[sector] || {};
|
|
264
351
|
}
|
|
352
|
+
export function getHealthcareProfessionalRolesBySectorAndClaim(sector) {
|
|
353
|
+
return HealthcareProfessionalRolesBySectorAndClaim[sector] || {};
|
|
354
|
+
}
|
|
265
355
|
export function getHealthcareRolesBySector(sector, family) {
|
|
266
356
|
return HealthcareRolesBySector[sector]?.[family] || {};
|
|
267
357
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare function buildExampleIpsBundleDocumentRequestFromController(): Readonly<{
|
|
2
|
+
thid?: string;
|
|
3
|
+
body: Readonly<{
|
|
4
|
+
data: ReadonlyArray<{
|
|
5
|
+
type: string;
|
|
6
|
+
meta: {
|
|
7
|
+
claims: Record<string, unknown>;
|
|
8
|
+
};
|
|
9
|
+
resource: Record<string, unknown>;
|
|
10
|
+
}>;
|
|
11
|
+
}>;
|
|
12
|
+
}>;
|
|
13
|
+
export declare function buildExampleIpsBundleDocumentRequestFromDoctor(): Readonly<{
|
|
14
|
+
thid?: string;
|
|
15
|
+
body: Readonly<{
|
|
16
|
+
data: ReadonlyArray<{
|
|
17
|
+
type: string;
|
|
18
|
+
meta: {
|
|
19
|
+
claims: Record<string, unknown>;
|
|
20
|
+
};
|
|
21
|
+
resource: Record<string, unknown>;
|
|
22
|
+
}>;
|
|
23
|
+
}>;
|
|
24
|
+
}>;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// Copyright 2026 Antifraud Services Inc. under the Apache License, Version 2.0.
|
|
2
|
+
import { DocumentTypeLoincOntology, HealthcareActorRoles, HealthcareBasicSections } from '../constants/healthcare.js';
|
|
3
|
+
import { CommunicationClaim } from '../models/interoperable-claims/communication-claims.js';
|
|
4
|
+
import { BundleDocumentRequesterKinds, communication, buildBundleDocumentRequestCommunicationPayload, createSummaryOperationRequestParameters, createSummaryOperationRequestReferencePath, } from '../utils/communication-bundle-document-request.js';
|
|
5
|
+
import { EXAMPLE_EMAIL_CONTROLLER_INDIVIDUAL, EXAMPLE_EMAIL_PROFESSIONAL, EXAMPLE_SUBJECT_DID, } from './shared.js';
|
|
6
|
+
export function buildExampleIpsBundleDocumentRequestFromController() {
|
|
7
|
+
const summaryOperationRequestParameters = createSummaryOperationRequestParameters(EXAMPLE_SUBJECT_DID);
|
|
8
|
+
const summaryOperationRequestReferencePath = createSummaryOperationRequestReferencePath(summaryOperationRequestParameters);
|
|
9
|
+
const claims = communication.newSearchWithReferencePath({
|
|
10
|
+
subjectDid: EXAMPLE_SUBJECT_DID,
|
|
11
|
+
sender: EXAMPLE_EMAIL_CONTROLLER_INDIVIDUAL,
|
|
12
|
+
requesterKind: BundleDocumentRequesterKinds.Controller,
|
|
13
|
+
requesterIdentifier: EXAMPLE_EMAIL_CONTROLLER_INDIVIDUAL,
|
|
14
|
+
requesterRole: HealthcareActorRoles.Controller,
|
|
15
|
+
documentType: DocumentTypeLoincOntology.IPS,
|
|
16
|
+
summaryOperationRequestReferencePath,
|
|
17
|
+
});
|
|
18
|
+
return buildBundleDocumentRequestCommunicationPayload({
|
|
19
|
+
subjectDid: EXAMPLE_SUBJECT_DID,
|
|
20
|
+
sender: EXAMPLE_EMAIL_CONTROLLER_INDIVIDUAL,
|
|
21
|
+
requesterKind: BundleDocumentRequesterKinds.Controller,
|
|
22
|
+
requesterIdentifier: EXAMPLE_EMAIL_CONTROLLER_INDIVIDUAL,
|
|
23
|
+
requesterRole: HealthcareActorRoles.Controller,
|
|
24
|
+
documentType: DocumentTypeLoincOntology.IPS,
|
|
25
|
+
text: String(claims[CommunicationClaim.Text] || ''),
|
|
26
|
+
noteText: String(claims[CommunicationClaim.NoteText] || ''),
|
|
27
|
+
summaryOperationRequestReferencePath: String(claims[CommunicationClaim.ContentReference] || ''),
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
export function buildExampleIpsBundleDocumentRequestFromDoctor() {
|
|
31
|
+
const sections = [
|
|
32
|
+
HealthcareBasicSections.AllergiesAndIntolerances.attributeValue,
|
|
33
|
+
HealthcareBasicSections.HistoryOfMedicationUse.attributeValue,
|
|
34
|
+
];
|
|
35
|
+
const summaryOperationRequestParameters = createSummaryOperationRequestParameters(EXAMPLE_SUBJECT_DID, sections);
|
|
36
|
+
const summaryOperationRequestReferencePath = createSummaryOperationRequestReferencePath(summaryOperationRequestParameters);
|
|
37
|
+
const claims = communication.newSearchWithReferencePath({
|
|
38
|
+
subjectDid: EXAMPLE_SUBJECT_DID,
|
|
39
|
+
sender: EXAMPLE_EMAIL_PROFESSIONAL,
|
|
40
|
+
requesterKind: BundleDocumentRequesterKinds.Employee,
|
|
41
|
+
requesterIdentifier: EXAMPLE_EMAIL_PROFESSIONAL,
|
|
42
|
+
requesterRole: HealthcareActorRoles.Physician,
|
|
43
|
+
documentType: DocumentTypeLoincOntology.IPS,
|
|
44
|
+
sections,
|
|
45
|
+
summaryOperationRequestReferencePath,
|
|
46
|
+
});
|
|
47
|
+
return buildBundleDocumentRequestCommunicationPayload({
|
|
48
|
+
subjectDid: EXAMPLE_SUBJECT_DID,
|
|
49
|
+
sender: EXAMPLE_EMAIL_PROFESSIONAL,
|
|
50
|
+
requesterKind: BundleDocumentRequesterKinds.Employee,
|
|
51
|
+
requesterIdentifier: EXAMPLE_EMAIL_PROFESSIONAL,
|
|
52
|
+
requesterRole: HealthcareActorRoles.Physician,
|
|
53
|
+
documentType: DocumentTypeLoincOntology.IPS,
|
|
54
|
+
sections,
|
|
55
|
+
text: String(claims[CommunicationClaim.Text] || ''),
|
|
56
|
+
noteText: String(claims[CommunicationClaim.NoteText] || ''),
|
|
57
|
+
summaryOperationRequestReferencePath: String(claims[CommunicationClaim.ContentReference] || ''),
|
|
58
|
+
});
|
|
59
|
+
}
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
// Always create JSDoc, do not use strings inline in keys nor values, use types instead, and reuse the data test examples.
|
|
3
3
|
import { HealthcareBasicSections } from '../constants/healthcare.js';
|
|
4
4
|
import { CommunicationCategoryCodes } from '../constants/communication.js';
|
|
5
|
-
import { ClaimConsent } from '../models/consent-rule.js';
|
|
6
|
-
import { CommunicationClaim } from '../models/interoperable-claims/communication-claims.js';
|
|
7
5
|
import { MedicationStatementClaim } from '../models/interoperable-claims/medication-statement-claims.js';
|
|
8
6
|
import { EXAMPLE_COMMUNICATION_IDENTIFIER, EXAMPLE_CONSENT_DATE, EXAMPLE_CONSENT_IDENTIFIER, EXAMPLE_CONSENT_PERIOD_END, EXAMPLE_CONSENT_PERIOD_START, EXAMPLE_CONSENT_PURPOSE_TREATMENT, EXAMPLE_EMAIL_PROFESSIONAL, EXAMPLE_HEALTHCARE_ACTOR_ROLE_PHYSICIAN, EXAMPLE_IPS_BUNDLE_NOTE_TEXT, EXAMPLE_MEDICATION_STATEMENT_IDENTIFIER, EXAMPLE_MEDICATION_STATEMENT_STATUS, EXAMPLE_MEDICATION_STATEMENT_TEXT, EXAMPLE_SUBJECT_DID, } from './shared.js';
|
|
9
7
|
import { CommunicationBundleSession } from '../utils/communication-bundle-session.js';
|
|
8
|
+
import { setCommunicationCategory, setCommunicationIdentifier, setCommunicationSubject, setCommunicationText, } from '../utils/communication-claim-helpers.js';
|
|
9
|
+
import { setActorIdentifierList, setActorRoleList, setConsentDate, setConsentDecision, setConsentIdentifier, setConsentPeriodEnd, setConsentPeriodStart, setConsentSubject, setPurposeList, setSectionList, } from '../utils/consent-claim-helpers.js';
|
|
10
10
|
/**
|
|
11
11
|
* First developer use case:
|
|
12
12
|
* - edit a Consent entry inside a Communication-attached Bundle
|
|
@@ -15,29 +15,29 @@ import { CommunicationBundleSession } from '../utils/communication-bundle-sessio
|
|
|
15
15
|
* - release active entry memory when finished
|
|
16
16
|
*/
|
|
17
17
|
export function buildConsentEditingCommunicationSessionExample() {
|
|
18
|
+
let communicationClaims = { '@context': 'org.hl7.fhir.r4' };
|
|
19
|
+
communicationClaims = setCommunicationIdentifier(communicationClaims, EXAMPLE_COMMUNICATION_IDENTIFIER);
|
|
20
|
+
communicationClaims = setCommunicationSubject(communicationClaims, EXAMPLE_SUBJECT_DID);
|
|
21
|
+
communicationClaims = setCommunicationCategory(communicationClaims, CommunicationCategoryCodes.Notification.attributeValue);
|
|
22
|
+
communicationClaims = setCommunicationText(communicationClaims, EXAMPLE_IPS_BUNDLE_NOTE_TEXT);
|
|
18
23
|
const bundleEditor = new CommunicationBundleSession({
|
|
19
|
-
communicationClaims
|
|
20
|
-
'@context': 'org.hl7.fhir.r4',
|
|
21
|
-
[CommunicationClaim.Identifier]: EXAMPLE_COMMUNICATION_IDENTIFIER,
|
|
22
|
-
[CommunicationClaim.Subject]: EXAMPLE_SUBJECT_DID,
|
|
23
|
-
[CommunicationClaim.Category]: CommunicationCategoryCodes.Notification.claim,
|
|
24
|
-
[CommunicationClaim.Text]: EXAMPLE_IPS_BUNDLE_NOTE_TEXT,
|
|
25
|
-
},
|
|
24
|
+
communicationClaims,
|
|
26
25
|
});
|
|
26
|
+
let consentClaims = { '@context': 'org.hl7.fhir.api' };
|
|
27
|
+
consentClaims = setConsentDecision(consentClaims, 'permit');
|
|
28
|
+
consentClaims = setConsentSubject(consentClaims, EXAMPLE_SUBJECT_DID);
|
|
29
|
+
consentClaims = setConsentIdentifier(consentClaims, EXAMPLE_CONSENT_IDENTIFIER);
|
|
30
|
+
consentClaims = setConsentDate(consentClaims, EXAMPLE_CONSENT_DATE);
|
|
31
|
+
consentClaims = setConsentPeriodStart(consentClaims, EXAMPLE_CONSENT_PERIOD_START);
|
|
32
|
+
consentClaims = setConsentPeriodEnd(consentClaims, EXAMPLE_CONSENT_PERIOD_END);
|
|
33
|
+
consentClaims = setPurposeList(consentClaims, [EXAMPLE_CONSENT_PURPOSE_TREATMENT]);
|
|
34
|
+
consentClaims = setSectionList(consentClaims, [
|
|
35
|
+
HealthcareBasicSections.AllergiesAndIntolerances.attributeValue,
|
|
36
|
+
]);
|
|
37
|
+
consentClaims = setActorIdentifierList(consentClaims, [EXAMPLE_EMAIL_PROFESSIONAL]);
|
|
38
|
+
consentClaims = setActorRoleList(consentClaims, [EXAMPLE_HEALTHCARE_ACTOR_ROLE_PHYSICIAN]);
|
|
27
39
|
bundleEditor.upsertActiveConsentEntry({
|
|
28
|
-
claims:
|
|
29
|
-
'@context': 'org.hl7.fhir.api',
|
|
30
|
-
[ClaimConsent.decision]: 'permit',
|
|
31
|
-
[ClaimConsent.subject]: EXAMPLE_SUBJECT_DID,
|
|
32
|
-
[ClaimConsent.identifier]: EXAMPLE_CONSENT_IDENTIFIER,
|
|
33
|
-
[ClaimConsent.date]: EXAMPLE_CONSENT_DATE,
|
|
34
|
-
[ClaimConsent.periodStart]: EXAMPLE_CONSENT_PERIOD_START,
|
|
35
|
-
[ClaimConsent.periodEnd]: EXAMPLE_CONSENT_PERIOD_END,
|
|
36
|
-
[ClaimConsent.purpose]: EXAMPLE_CONSENT_PURPOSE_TREATMENT,
|
|
37
|
-
[ClaimConsent.action]: HealthcareBasicSections.AllergiesAndIntolerances.attributeValue,
|
|
38
|
-
[ClaimConsent.actorIdentifier]: EXAMPLE_EMAIL_PROFESSIONAL,
|
|
39
|
-
[ClaimConsent.actorRole]: EXAMPLE_HEALTHCARE_ACTOR_ROLE_PHYSICIAN,
|
|
40
|
-
},
|
|
40
|
+
claims: consentClaims,
|
|
41
41
|
fullUrl: `urn:uuid:${EXAMPLE_CONSENT_IDENTIFIER}`,
|
|
42
42
|
});
|
|
43
43
|
bundleEditor.saveAndReleaseActiveEntry();
|
|
@@ -53,14 +53,13 @@ export function buildConsentEditingCommunicationSessionExample() {
|
|
|
53
53
|
* - apply save/release lifecycle consistently
|
|
54
54
|
*/
|
|
55
55
|
export function buildMedicationEditingCommunicationSessionExample() {
|
|
56
|
+
let communicationClaims = { '@context': 'org.hl7.fhir.r4' };
|
|
57
|
+
communicationClaims = setCommunicationIdentifier(communicationClaims, EXAMPLE_COMMUNICATION_IDENTIFIER);
|
|
58
|
+
communicationClaims = setCommunicationSubject(communicationClaims, EXAMPLE_SUBJECT_DID);
|
|
59
|
+
communicationClaims = setCommunicationCategory(communicationClaims, CommunicationCategoryCodes.Reminder.attributeValue);
|
|
60
|
+
communicationClaims = setCommunicationText(communicationClaims, EXAMPLE_IPS_BUNDLE_NOTE_TEXT);
|
|
56
61
|
const bundleEditor = new CommunicationBundleSession({
|
|
57
|
-
communicationClaims
|
|
58
|
-
'@context': 'org.hl7.fhir.r4',
|
|
59
|
-
[CommunicationClaim.Identifier]: EXAMPLE_COMMUNICATION_IDENTIFIER,
|
|
60
|
-
[CommunicationClaim.Subject]: EXAMPLE_SUBJECT_DID,
|
|
61
|
-
[CommunicationClaim.Category]: CommunicationCategoryCodes.Reminder.claim,
|
|
62
|
-
[CommunicationClaim.Text]: EXAMPLE_IPS_BUNDLE_NOTE_TEXT,
|
|
63
|
-
},
|
|
62
|
+
communicationClaims,
|
|
64
63
|
});
|
|
65
64
|
bundleEditor.upsertActiveMedicationStatementEntry({
|
|
66
65
|
claims: {
|
package/dist/examples/index.d.ts
CHANGED
package/dist/examples/index.js
CHANGED
|
@@ -12,4 +12,5 @@ export * from './lifecycle.js';
|
|
|
12
12
|
export * from './api-flow-examples.js';
|
|
13
13
|
export * from './contract-examples.js';
|
|
14
14
|
export * from './communication-bundle-session.js';
|
|
15
|
+
export * from './communication-bundle-document-request.js';
|
|
15
16
|
export * from './ips-bundle.js';
|
|
@@ -40,6 +40,7 @@ export declare const EXAMPLE_DEFAULT_ICA_DID: "did:web:ica.example.org";
|
|
|
40
40
|
export declare const EXAMPLE_HOSTING_OPERATOR_DID: "did:web:host.example.org";
|
|
41
41
|
export declare const EXAMPLE_TENANT_SERVICE_DID: "did:web:provider.example.org";
|
|
42
42
|
export declare const EXAMPLE_SECONDARY_TENANT_SERVICE_DID: "did:web:provider-b.example.org";
|
|
43
|
+
export declare const EXAMPLE_INDEX_PROVIDER_SECTOR_DID_WEB: "did:web:provider.example.org:acme-id:cds-es:v1:health-care";
|
|
43
44
|
export declare const EXAMPLE_HOSTING_OPERATOR_DSPACE_VERSION_URL: "https://host.example.org/host/cds-ES/v1/test/.well-known/dspace-version";
|
|
44
45
|
export declare const EXAMPLE_HOSTING_OPERATOR_CATALOG_ARTIFACT_URL: "https://host.example.org/host/cds-ES/v1/test/dsp/catalog/dcat.json";
|
|
45
46
|
/** @deprecated Use `EXAMPLE_HOSTING_OPERATOR_DSPACE_VERSION_URL`. */
|
|
@@ -72,12 +73,19 @@ export declare const EXAMPLE_CLINICAL_SECTION_HISTORY_MEDICATION: "LOINC|10160-0
|
|
|
72
73
|
export declare const EXAMPLE_CLINICAL_SECTION_ALLERGIES: string;
|
|
73
74
|
export declare const EXAMPLE_CLINICAL_CODE_PROBLEM: "LOINC|11450-4";
|
|
74
75
|
export declare const EXAMPLE_CONSENT_DATE: "2026-05-20";
|
|
76
|
+
/** @deprecated Use `ConsentDecisions.Permit`. */
|
|
77
|
+
export declare const EXAMPLE_CONSENT_DECISION_PERMIT: "permit";
|
|
75
78
|
export declare const EXAMPLE_CONSENT_PERIOD_END: "2026-05-01T00:00:00Z";
|
|
76
79
|
export declare const EXAMPLE_CONSENT_PURPOSE_TREATMENT: "TREAT";
|
|
80
|
+
export declare const EXAMPLE_CONSENT_UUID: "urn:uuid:consent-example-001";
|
|
77
81
|
export declare const EXAMPLE_CONSENT_IDENTIFIER: "urn:uuid:consent-example-001";
|
|
82
|
+
export declare const EXAMPLE_CONSENT_OPERATION_IDENTIFIER: "consent-operation-example-001";
|
|
83
|
+
export declare const EXAMPLE_CONSENT_OPERATION_THREAD_ID: "thread-consent-example-001";
|
|
78
84
|
export declare const EXAMPLE_CONSENT_PERIOD_START: "2026-05-20T00:00:00Z";
|
|
85
|
+
export declare const EXAMPLE_COMMUNICATION_UUID: "urn:uuid:communication-example-001";
|
|
79
86
|
export declare const EXAMPLE_COMMUNICATION_IDENTIFIER: "urn:uuid:communication-example-001";
|
|
80
87
|
export declare const EXAMPLE_IPS_BUNDLE_NOTE_TEXT: "IPS ingestion request";
|
|
88
|
+
export declare const EXAMPLE_MEDICATION_STATEMENT_UUID: "urn:uuid:medication-statement-example-001";
|
|
81
89
|
export declare const EXAMPLE_MEDICATION_STATEMENT_IDENTIFIER: "urn:uuid:medication-statement-example-001";
|
|
82
90
|
export declare const EXAMPLE_MEDICATION_STATEMENT_STATUS: "active";
|
|
83
91
|
export declare const EXAMPLE_MEDICATION_STATEMENT_CODE: "http://www.nlm.nih.gov/research/umls/rxnorm|313782";
|
|
@@ -90,6 +98,20 @@ export declare const EXAMPLE_DOCUMENT_REFERENCE_DESCRIPTION: "Prescription PDF";
|
|
|
90
98
|
export declare const EXAMPLE_DOCUMENT_REFERENCE_DATE: "2026-06-12T10:00:00Z";
|
|
91
99
|
export declare const EXAMPLE_EMPLOYEE_ACTIVATION_CODE: "ACT-001";
|
|
92
100
|
export declare const EXAMPLE_DEVICE_CLIENT_ID: "did:web:device-001";
|
|
101
|
+
export declare const EXAMPLE_LIVE_GW_BASE_URL_LOCAL: "http://127.0.0.1:3000";
|
|
102
|
+
export declare const EXAMPLE_LIVE_GW_BASE_URL_DOCKER: "http://127.0.0.1:8000";
|
|
103
|
+
export declare const EXAMPLE_MEDICATION_DOSE_UNIT_MG: "mg";
|
|
104
|
+
export declare const EXAMPLE_MEDICATION_TIMING_PERIOD_UNIT_HOURS: "h";
|
|
105
|
+
export declare const EXAMPLE_MEDICATION_IBUPROFEN_TEXT: "Ibuprofen 400 mg";
|
|
106
|
+
export declare const EXAMPLE_MEDICATION_IBUPROFEN_IDENTIFIER_PREFIX: "urn:uuid:med-ibuprofen";
|
|
107
|
+
export declare const EXAMPLE_MEDICATION_IBUPROFEN_EFFECTIVE: "2026-06-01T08:00:00Z";
|
|
108
|
+
export declare const EXAMPLE_MEDICATION_IBUPROFEN_NOTE: "Take every 8 hours as needed. Keep a 4 hour gap from paracetamol.";
|
|
109
|
+
export declare const EXAMPLE_MEDICATION_PARACETAMOL_TEXT: "Paracetamol 600 mg";
|
|
110
|
+
export declare const EXAMPLE_MEDICATION_PARACETAMOL_IDENTIFIER_PREFIX: "urn:uuid:med-paracetamol";
|
|
111
|
+
export declare const EXAMPLE_MEDICATION_PARACETAMOL_EFFECTIVE: "2026-06-01T12:00:00Z";
|
|
112
|
+
export declare const EXAMPLE_MEDICATION_PARACETAMOL_NOTE: "Take every 8 hours as needed. Keep a 4 hour gap from ibuprofen.";
|
|
113
|
+
export declare const EXAMPLE_IPS_BUNDLE_REFERENCE_URL: "individual/org.hl7.fhir.r4/Bundle?type=document&composition.subject=did:web:api.acme.org:individual:123&composition.type=http://loinc.org|60591-5";
|
|
114
|
+
export declare const EXAMPLE_IPS_BUNDLE_REFERENCE_ABSOLUTE_URL: "https://provider.example.org/acme-id/cds-ES/v1/health-care/individual/org.hl7.fhir.r4/Bundle?type=document&composition.subject=did:web:api.acme.org:individual:123&composition.type=http://loinc.org|60591-5";
|
|
93
115
|
export type ExampleDateRange = Readonly<{
|
|
94
116
|
start: string;
|
|
95
117
|
end: string;
|
|
@@ -106,6 +128,19 @@ export type ExampleClinicalBundleSearchInput = Readonly<{
|
|
|
106
128
|
export type ExampleLatestIpsSearchInput = Readonly<{
|
|
107
129
|
subject: string;
|
|
108
130
|
}>;
|
|
131
|
+
export type ExampleLiveMedicationCase = Readonly<{
|
|
132
|
+
identifier: string;
|
|
133
|
+
effectiveDateTime: string;
|
|
134
|
+
text: string;
|
|
135
|
+
note: string;
|
|
136
|
+
doseQuantityValue: number;
|
|
137
|
+
doseQuantityUnit: string;
|
|
138
|
+
timingFrequency: number;
|
|
139
|
+
timingPeriod: number;
|
|
140
|
+
timingPeriodUnit: string;
|
|
141
|
+
dosageAsNeeded: boolean;
|
|
142
|
+
section: string;
|
|
143
|
+
}>;
|
|
109
144
|
export declare const EXAMPLE_CONTROLLER_SIGN_KEY: {
|
|
110
145
|
readonly kid: "controller-es384-001";
|
|
111
146
|
readonly kty: "EC";
|
|
@@ -217,6 +252,7 @@ export declare function buildExampleDocumentReferenceSearchPayload(subjectDid?:
|
|
|
217
252
|
};
|
|
218
253
|
};
|
|
219
254
|
export declare function cloneExample<T>(value: T): T;
|
|
255
|
+
export declare function buildExampleLiveMedicationCases(seed?: number): ExampleLiveMedicationCase[];
|
|
220
256
|
export type ExampleHostedTenantRouteContext = Readonly<{
|
|
221
257
|
alternateName: string;
|
|
222
258
|
jurisdiction: string;
|