gdc-common-utils-ts 2.2.2 → 2.3.1
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/README.md +4 -2
- package/dist/constants/data-collections.js +0 -1
- package/dist/constants/fhir-resource-types.d.ts +14 -0
- package/dist/constants/fhir-resource-types.js +6 -0
- package/dist/constants/healthcare.d.ts +348 -193
- package/dist/constants/healthcare.js +99 -37
- package/dist/constants/hl7-roles.d.ts +38 -4
- package/dist/constants/hl7-roles.js +92 -4
- package/dist/examples/shared.d.ts +1 -1
- package/dist/examples/shared.js +1 -1
- package/dist/i18n/role-codes.i18n.d.ts +9 -1
- package/dist/i18n/role-codes.i18n.js +12 -1
- package/dist/models/device-license.d.ts +20 -0
- package/dist/models/interoperable-claims/invoice-claims.d.ts +1 -1
- package/dist/models/interoperable-claims/invoice-claims.js +2 -2
- package/dist/models/interoperable-claims/observation-claims.d.ts +2 -2
- package/dist/models/interoperable-claims/observation-claims.js +2 -2
- package/dist/models/interoperable-claims/related-person-claims.d.ts +13 -0
- package/dist/models/interoperable-claims/related-person-claims.js +16 -0
- package/dist/utils/allergy-intolerance-entry-editor.js +2 -2
- package/dist/utils/bundle-document-builder.d.ts +35 -0
- package/dist/utils/bundle-document-builder.js +176 -0
- package/dist/utils/clinical-resource-view.d.ts +16 -0
- package/dist/utils/clinical-resource-view.js +267 -33
- package/dist/utils/communication-consent-access-editor.d.ts +8 -4
- package/dist/utils/communication-consent-access-editor.js +8 -4
- package/dist/utils/condition-entry-editor.js +2 -2
- package/dist/utils/consent-duplicate-rules.js +1 -1
- package/dist/utils/did.d.ts +2 -2
- package/dist/utils/did.js +3 -3
- package/dist/utils/license-list-search.d.ts +5 -0
- package/dist/utils/license-list-search.js +9 -0
- package/dist/utils/license.d.ts +45 -1
- package/dist/utils/license.js +86 -2
- package/dist/utils/related-person-list.d.ts +4 -0
- package/dist/utils/related-person-list.js +26 -6
- package/package.json +1 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { LOINC_SYSTEM_URL, loincI18nKey } from '../models/clinical-sections.js';
|
|
2
2
|
import { clinicalWorkbookSummaryLabelI18nEn } from '../models/clinical-workbook-summary.js';
|
|
3
|
-
import {
|
|
3
|
+
import { 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
|
+
import { ResourceTypesFhirR4, } from './fhir-resource-types.js';
|
|
5
6
|
/**
|
|
6
7
|
* Canonical logical identifiers for document types backed by the LOINC
|
|
7
8
|
* ontology. These keys are stable SDK-facing names; the concrete LOINC token
|
|
@@ -63,55 +64,63 @@ function workbookLabel(code) {
|
|
|
63
64
|
function buildWorkbookSectionCatalog(codes) {
|
|
64
65
|
return Object.freeze(Object.fromEntries(codes.map((code) => [code, defineSection(code, workbookLabel(code))])));
|
|
65
66
|
}
|
|
66
|
-
|
|
67
|
-
|
|
67
|
+
const planOfCareSection = defineSection('18776-5', 'Plan of care');
|
|
68
|
+
const healthcareCoreSections = {
|
|
69
|
+
ProblemList: defineSection('11450-4', 'Problem list'),
|
|
68
70
|
AllergiesAndIntolerances: defineSection('48765-2', 'Allergies and adverse reactions'),
|
|
69
|
-
Alert: defineSection('104605-1', 'Alert'),
|
|
70
|
-
DietAndNutrition: defineSection('61144-2', 'Diet and nutrition'),
|
|
71
71
|
HistoryOfMedicationUse: defineSection('10160-0', 'History of medication use'),
|
|
72
|
-
|
|
73
|
-
HistoryOfHospitalizationsAndOutpatientVisits: defineSection('46240-8', 'History of hospitalizations+History of outpatient visits'),
|
|
74
|
-
HistoryOfPastIllness: defineSection('11348-0', 'History of past illness'),
|
|
75
|
-
HistoryOfPresentIllness: defineSection('10164-2', 'History of present illness'),
|
|
76
|
-
PregnancyHistory: defineSection('10162-6', 'Pregnancy History'),
|
|
77
|
-
ProblemList: defineSection('11450-4', 'Problem list'),
|
|
78
|
-
ProblemListNarrativeReported: defineSection('57852-6', 'Problem list'),
|
|
72
|
+
Immunizations: defineSection('11369-6', 'History of immunization'),
|
|
79
73
|
Results: defineSection('30954-2', 'Relevant diagnostic tests/laboratory data'),
|
|
80
74
|
Procedures: defineSection('47519-4', 'History of Procedures'),
|
|
81
|
-
Immunizations: defineSection('11369-6', 'History of immunization'),
|
|
82
75
|
MedicalDevices: defineSection('46264-8', 'History of medical device use'),
|
|
83
|
-
FunctionalStatus: defineSection('47420-5', 'Functional status'),
|
|
84
|
-
GoalsAndPreferences: defineSection('81338-6', 'Goals / Preferences'),
|
|
85
|
-
PlanOfTreatment: defineSection('18776-5', 'Plan of treatment'),
|
|
86
|
-
/** @deprecated Use `PlanOfTreatment`. */
|
|
87
|
-
PlanOfCare: defineSection('18776-5', 'Plan of treatment'),
|
|
88
|
-
SocialHistory: defineSection('29762-2', 'Social history'),
|
|
89
76
|
VitalSigns: defineSection('8716-3', 'Vital signs'),
|
|
77
|
+
SocialHistory: defineSection('29762-2', 'Social history'),
|
|
78
|
+
Alert: defineSection('104605-1', 'Alert'),
|
|
79
|
+
GoalsAndPreferences: defineSection('81338-6', 'Goals / Preferences'),
|
|
90
80
|
AdvanceDirectives: defineSection('42348-3', 'Advance directives'),
|
|
81
|
+
FunctionalStatus: defineSection('47420-5', 'Functional status'),
|
|
82
|
+
HistoryOfPastIllness: defineSection('11348-0', 'History of past illness'),
|
|
83
|
+
PregnancyHistory: defineSection('10162-6', 'Pregnancy History'),
|
|
84
|
+
PlanOfCare: planOfCareSection,
|
|
85
|
+
DietAndNutrition: defineSection('61144-2', 'Diet and nutrition'),
|
|
86
|
+
HistoryOfFamilyMemberDiseases: defineSection('10157-6', 'History of family member diseases'),
|
|
87
|
+
HistoryOfHospitalizationsAndOutpatientVisits: defineSection('46240-8', 'History of hospitalizations+History of outpatient visits'),
|
|
88
|
+
HistoryOfPresentIllness: defineSection('10164-2', 'History of present illness'),
|
|
89
|
+
ProblemListNarrativeReported: defineSection('57852-6', 'Problem list'),
|
|
91
90
|
Instructions: defineSection('69730-0', 'Instructions'),
|
|
92
|
-
}
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* Application healthcare sections: the 16 IPS sections followed by six
|
|
94
|
+
* LOINC-coded extensions. Deprecated aliases remain accessible but are not
|
|
95
|
+
* enumerable, so section pickers and `HealthcareAllSections` do not duplicate
|
|
96
|
+
* the IPS document or plan-of-care entry.
|
|
97
|
+
*/
|
|
98
|
+
export const HealthcareCoreSections = Object.freeze(Object.defineProperties(healthcareCoreSections, {
|
|
99
|
+
PatientSummaryDocument: {
|
|
100
|
+
value: defineSection('60591-5', 'Patient summary document'),
|
|
101
|
+
enumerable: false,
|
|
102
|
+
},
|
|
103
|
+
PlanOfTreatment: {
|
|
104
|
+
value: planOfCareSection,
|
|
105
|
+
enumerable: false,
|
|
106
|
+
},
|
|
107
|
+
}));
|
|
93
108
|
/** @deprecated Use `HealthcareCoreSections`. */
|
|
94
109
|
export const HealthcareBasicSections = HealthcareCoreSections;
|
|
95
110
|
/**
|
|
96
|
-
*
|
|
97
|
-
*
|
|
111
|
+
* The 16 clinical sections from the official HL7 IPS 2.0 all-sections example.
|
|
112
|
+
* Order follows `Composition.section`. The `60591-5` IPS document descriptor
|
|
113
|
+
* is represented by `HealthcareDocumentTypes.IPS`, not as a section.
|
|
98
114
|
*
|
|
99
|
-
*
|
|
100
|
-
* - Diet and Nutrition
|
|
101
|
-
* - History of Family Member Diseases
|
|
102
|
-
* - History of Hospitalizations and Outpatient Visits
|
|
103
|
-
* - History of Present Illness
|
|
104
|
-
* - Problem List Narrative Reported
|
|
105
|
-
* - Instructions
|
|
115
|
+
* @see https://hl7.org/fhir/uv/ips/STU2/Bundle-bundle-ips-all-sections.html
|
|
106
116
|
*/
|
|
107
117
|
export const HealthcareSummarySections = Object.freeze({
|
|
108
|
-
|
|
118
|
+
ProblemList: HealthcareCoreSections.ProblemList,
|
|
109
119
|
AllergiesAndIntolerances: HealthcareCoreSections.AllergiesAndIntolerances,
|
|
110
120
|
HistoryOfMedicationUse: HealthcareCoreSections.HistoryOfMedicationUse,
|
|
111
|
-
|
|
121
|
+
Immunizations: HealthcareCoreSections.Immunizations,
|
|
112
122
|
Results: HealthcareCoreSections.Results,
|
|
113
123
|
Procedures: HealthcareCoreSections.Procedures,
|
|
114
|
-
Immunizations: HealthcareCoreSections.Immunizations,
|
|
115
124
|
MedicalDevices: HealthcareCoreSections.MedicalDevices,
|
|
116
125
|
VitalSigns: HealthcareCoreSections.VitalSigns,
|
|
117
126
|
SocialHistory: HealthcareCoreSections.SocialHistory,
|
|
@@ -122,8 +131,61 @@ export const HealthcareSummarySections = Object.freeze({
|
|
|
122
131
|
HistoryOfPastIllness: HealthcareCoreSections.HistoryOfPastIllness,
|
|
123
132
|
PregnancyHistory: HealthcareCoreSections.PregnancyHistory,
|
|
124
133
|
PlanOfCare: HealthcareCoreSections.PlanOfCare,
|
|
125
|
-
PlanOfTreatment: HealthcareCoreSections.PlanOfTreatment,
|
|
126
134
|
});
|
|
135
|
+
function defineIpsSectionResourceProfile(section, requirement, expectedResourceTypes, acceptsAnyResource) {
|
|
136
|
+
return Object.freeze({
|
|
137
|
+
section,
|
|
138
|
+
requirement,
|
|
139
|
+
expectedResourceTypes: Object.freeze([...expectedResourceTypes]),
|
|
140
|
+
acceptsOtherSupportingResources: true,
|
|
141
|
+
...(acceptsAnyResource ? { acceptsAnyResource } : {}),
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Resource-profile expectations for the 16 IPS 2.0 sections.
|
|
146
|
+
*
|
|
147
|
+
* Consumers must group a document by `Composition.section.entry` references;
|
|
148
|
+
* they must not infer a section from `resourceType` alone because the same
|
|
149
|
+
* type, especially Observation, is valid in several sections.
|
|
150
|
+
*
|
|
151
|
+
* @see https://hl7.org/fhir/uv/ips/STU2/Structure-of-the-International-Patient-Summary.html
|
|
152
|
+
* @see https://hl7.org/fhir/uv/ips/STU2/profiles.html
|
|
153
|
+
*/
|
|
154
|
+
export const HealthcareIpsSectionResourceProfiles = Object.freeze({
|
|
155
|
+
ProblemList: defineIpsSectionResourceProfile(HealthcareSummarySections.ProblemList, 'required', [ResourceTypesFhirR4.Condition]),
|
|
156
|
+
AllergiesAndIntolerances: defineIpsSectionResourceProfile(HealthcareSummarySections.AllergiesAndIntolerances, 'required', [ResourceTypesFhirR4.AllergyIntolerance]),
|
|
157
|
+
HistoryOfMedicationUse: defineIpsSectionResourceProfile(HealthcareSummarySections.HistoryOfMedicationUse, 'required', [
|
|
158
|
+
ResourceTypesFhirR4.MedicationStatement,
|
|
159
|
+
ResourceTypesFhirR4.MedicationRequest,
|
|
160
|
+
ResourceTypesFhirR4.Medication,
|
|
161
|
+
]),
|
|
162
|
+
Immunizations: defineIpsSectionResourceProfile(HealthcareSummarySections.Immunizations, 'recommended', [ResourceTypesFhirR4.Immunization]),
|
|
163
|
+
Results: defineIpsSectionResourceProfile(HealthcareSummarySections.Results, 'recommended', [
|
|
164
|
+
ResourceTypesFhirR4.DiagnosticReport,
|
|
165
|
+
ResourceTypesFhirR4.Observation,
|
|
166
|
+
ResourceTypesFhirR4.Specimen,
|
|
167
|
+
ResourceTypesFhirR4.Device,
|
|
168
|
+
ResourceTypesFhirR4.ImagingStudy,
|
|
169
|
+
]),
|
|
170
|
+
Procedures: defineIpsSectionResourceProfile(HealthcareSummarySections.Procedures, 'recommended', [ResourceTypesFhirR4.Procedure, ResourceTypesFhirR4.Device]),
|
|
171
|
+
MedicalDevices: defineIpsSectionResourceProfile(HealthcareSummarySections.MedicalDevices, 'recommended', [ResourceTypesFhirR4.DeviceUseStatement, ResourceTypesFhirR4.Device]),
|
|
172
|
+
VitalSigns: defineIpsSectionResourceProfile(HealthcareSummarySections.VitalSigns, 'optional', [ResourceTypesFhirR4.Observation]),
|
|
173
|
+
SocialHistory: defineIpsSectionResourceProfile(HealthcareSummarySections.SocialHistory, 'optional', [ResourceTypesFhirR4.Observation]),
|
|
174
|
+
Alert: defineIpsSectionResourceProfile(HealthcareSummarySections.Alert, 'optional', [ResourceTypesFhirR4.Flag]),
|
|
175
|
+
GoalsAndPreferences: defineIpsSectionResourceProfile(HealthcareSummarySections.GoalsAndPreferences, 'optional', [], true),
|
|
176
|
+
AdvanceDirectives: defineIpsSectionResourceProfile(HealthcareSummarySections.AdvanceDirectives, 'optional', [ResourceTypesFhirR4.Consent]),
|
|
177
|
+
FunctionalStatus: defineIpsSectionResourceProfile(HealthcareSummarySections.FunctionalStatus, 'optional', [ResourceTypesFhirR4.Condition, ResourceTypesFhirR4.ClinicalImpression]),
|
|
178
|
+
HistoryOfPastIllness: defineIpsSectionResourceProfile(HealthcareSummarySections.HistoryOfPastIllness, 'optional', [ResourceTypesFhirR4.Condition]),
|
|
179
|
+
PregnancyHistory: defineIpsSectionResourceProfile(HealthcareSummarySections.PregnancyHistory, 'optional', [ResourceTypesFhirR4.Observation]),
|
|
180
|
+
PlanOfCare: defineIpsSectionResourceProfile(HealthcareSummarySections.PlanOfCare, 'optional', [ResourceTypesFhirR4.CarePlan, ResourceTypesFhirR4.ImmunizationRecommendation]),
|
|
181
|
+
});
|
|
182
|
+
/** IPS profiles used across sections rather than owned by one section. */
|
|
183
|
+
export const HealthcareIpsSharedResourceTypes = Object.freeze([
|
|
184
|
+
ResourceTypesFhirR4.Organization,
|
|
185
|
+
ResourceTypesFhirR4.Practitioner,
|
|
186
|
+
ResourceTypesFhirR4.PractitionerRole,
|
|
187
|
+
ResourceTypesFhirR4.DocumentReference,
|
|
188
|
+
]);
|
|
127
189
|
export const HealthcareDocumentTypes = Object.freeze({
|
|
128
190
|
[DocumentTypeLoincOntology.IPS]: defineDocumentType(DocumentTypeLoincOntology.IPS, '60591-5', 'International Patient Summary'),
|
|
129
191
|
});
|
|
@@ -413,10 +475,10 @@ function buildPersonalRelationshipRoles() {
|
|
|
413
475
|
item.code,
|
|
414
476
|
Object.freeze({
|
|
415
477
|
family: HealthcareRoleFamilies.PersonalRelationshipHl7,
|
|
416
|
-
codingSystem:
|
|
478
|
+
codingSystem: HL7_CODING_SYSTEM_V3_ROLE_CODE,
|
|
417
479
|
code: item.code,
|
|
418
|
-
claim: `v3-
|
|
419
|
-
i18nKey: `org.hl7.v3
|
|
480
|
+
claim: `v3-RoleCode|${item.code}`,
|
|
481
|
+
i18nKey: `org.hl7.terminology.CodeSystem.v3-RoleCode.${item.code}`,
|
|
420
482
|
titleEn: item.display,
|
|
421
483
|
definition: item.definition,
|
|
422
484
|
}),
|
|
@@ -430,7 +492,7 @@ function buildLegalRepresentativeRoles() {
|
|
|
430
492
|
codingSystem: HL7_CODING_SYSTEM_V3_ROLE_CODE,
|
|
431
493
|
code: item.code,
|
|
432
494
|
claim: `v3-RoleCode|${item.code}`,
|
|
433
|
-
i18nKey: `org.hl7.v3
|
|
495
|
+
i18nKey: `org.hl7.terminology.CodeSystem.v3-RoleCode.${item.code}`,
|
|
434
496
|
titleEn: item.display,
|
|
435
497
|
definition: item.definition,
|
|
436
498
|
}),
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* HL7 role constants shared across GDC projects.
|
|
3
3
|
*
|
|
4
|
-
* Two
|
|
4
|
+
* Two curated HL7 role families are exposed:
|
|
5
5
|
*
|
|
6
|
-
* 1.
|
|
6
|
+
* 1. personal relationship roles
|
|
7
7
|
* "Who are you in relation to the subject?" (family / social relationship)
|
|
8
8
|
* Source: http://terminology.hl7.org/ValueSet/v3-PersonalRelationshipRoleType
|
|
9
9
|
*
|
|
10
|
-
* 2.
|
|
10
|
+
* 2. legal / functional representative roles
|
|
11
11
|
* "What legal role do you exercise over the subject?" (guardian, attorney…)
|
|
12
12
|
* Source: http://terminology.hl7.org/ValueSet/v3-RoleCode
|
|
13
13
|
* Used as default for non-human subjects (e.g. animal-care sector).
|
|
@@ -19,7 +19,7 @@ export type Hl7RoleEntry = {
|
|
|
19
19
|
definition: string;
|
|
20
20
|
};
|
|
21
21
|
export declare const HL7_CODING_SYSTEM_PERSONAL_RELATIONSHIP = "http://terminology.hl7.org/CodeSystem/v3-PersonalRelationshipRoleType";
|
|
22
|
-
/** Canonical
|
|
22
|
+
/** Canonical GDC compatibility claim namespace used by legacy payloads. */
|
|
23
23
|
export declare const HL7_CLAIMS_CODING_SYSTEM = "org.hl7.v3.RoleCode";
|
|
24
24
|
/**
|
|
25
25
|
* Full ordered list of HL7 v3-PersonalRelationshipRoleType entries.
|
|
@@ -27,7 +27,30 @@ export declare const HL7_CLAIMS_CODING_SYSTEM = "org.hl7.v3.RoleCode";
|
|
|
27
27
|
* Default role: `ONESELF` (patient represents themselves).
|
|
28
28
|
*/
|
|
29
29
|
export declare const HL7_PERSONAL_RELATIONSHIP_ROLES: Hl7RoleEntry[];
|
|
30
|
+
/**
|
|
31
|
+
* Small, non-gender-forcing family-role catalog used by individual-member
|
|
32
|
+
* selectors. `FAMMEMB` is the safe fallback when no more specific relationship
|
|
33
|
+
* applies. The generic great-grandparent code is `GGRPRN`; `GGRFTH` means a
|
|
34
|
+
* male great-grandfather and therefore must not be used as its substitute.
|
|
35
|
+
*/
|
|
36
|
+
export declare const HL7_INDIVIDUAL_MEMBER_RELATIONSHIP_CODES: readonly ["FAMMEMB", "WIFE", "HUSB", "DOMPART", "SIS", "BRO", "SON", "DAU", "PRN", "GRPRN", "GRNDCHILD", "GGRPRN", "FRND", "NBOR", "ROOM"];
|
|
37
|
+
export type Hl7IndividualMemberRelationshipCode = typeof HL7_INDIVIDUAL_MEMBER_RELATIONSHIP_CODES[number];
|
|
38
|
+
/** Returns whether a code belongs to the intentionally simplified member picker. */
|
|
39
|
+
export declare function isHl7IndividualMemberRelationshipCode(value: unknown): value is Hl7IndividualMemberRelationshipCode;
|
|
40
|
+
/** Ordered descriptors for the individual/family member role selector. */
|
|
41
|
+
export declare const HL7_INDIVIDUAL_MEMBER_RELATIONSHIP_ROLES: readonly Hl7RoleEntry[];
|
|
42
|
+
/**
|
|
43
|
+
* Complete personal-relationship catalog. It is the extended picker surface:
|
|
44
|
+
* every entry from the compact individual-member catalog is included together
|
|
45
|
+
* with all more specific HL7 personal relationship choices.
|
|
46
|
+
*/
|
|
47
|
+
export declare const HL7_INDIVIDUAL_MEMBER_RELATIONSHIP_ROLES_FULL: readonly Hl7RoleEntry[];
|
|
30
48
|
export declare const HL7_CODING_SYSTEM_V3_ROLE_CODE = "http://terminology.hl7.org/CodeSystem/v3-RoleCode";
|
|
49
|
+
/** Canonical system for functional RelatedPerson role-class values. */
|
|
50
|
+
export declare const HL7_CODING_SYSTEM_V3_ROLE_CLASS = "http://terminology.hl7.org/CodeSystem/v3-RoleClass";
|
|
51
|
+
export type Hl7RelatedPersonFunctionalRoleEntry = Hl7RoleEntry & {
|
|
52
|
+
codingSystem: typeof HL7_CODING_SYSTEM_V3_ROLE_CODE | typeof HL7_CODING_SYSTEM_V3_ROLE_CLASS;
|
|
53
|
+
};
|
|
31
54
|
/**
|
|
32
55
|
* Legal representative / guardian roles from HL7 v3-RoleCode.
|
|
33
56
|
*
|
|
@@ -38,6 +61,17 @@ export declare const HL7_CODING_SYSTEM_V3_ROLE_CODE = "http://terminology.hl7.or
|
|
|
38
61
|
* Default for animal-care sector: `RESPRSN` (Responsible party).
|
|
39
62
|
*/
|
|
40
63
|
export declare const HL7_V3_ROLE_CODE_LEGAL_REPRESENTATIVE: Hl7RoleEntry[];
|
|
64
|
+
/**
|
|
65
|
+
* Functional tags accepted by the GDC `RelatedPerson.role` flat-claim
|
|
66
|
+
* extension. They do not replace `RelatedPerson.relationship`: kinship belongs
|
|
67
|
+
* in `relationship`, while these comma-separated values describe an explicit
|
|
68
|
+
* operational or legal function. CAREGIVER/ECON/DEPEN use v3-RoleClass;
|
|
69
|
+
* RESPRSN/BILL/POWATT use v3-RoleCode. `POWATT` must only be assigned when a
|
|
70
|
+
* real power of attorney exists; it is never inferred from controller status.
|
|
71
|
+
* The bare CSV is resolved through the descriptors below when a Coding system
|
|
72
|
+
* is required.
|
|
73
|
+
*/
|
|
74
|
+
export declare const HL7_RELATED_PERSON_FUNCTIONAL_ROLES: readonly Hl7RelatedPersonFunctionalRoleEntry[];
|
|
41
75
|
/** Default role code for animal-care and non-human subjects. */
|
|
42
76
|
export declare const HL7_DEFAULT_ROLE_ANIMAL_CARE = "RESPRSN";
|
|
43
77
|
/** Default role code for health sector (patient self-represents). */
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* HL7 role constants shared across GDC projects.
|
|
3
3
|
*
|
|
4
|
-
* Two
|
|
4
|
+
* Two curated HL7 role families are exposed:
|
|
5
5
|
*
|
|
6
|
-
* 1.
|
|
6
|
+
* 1. personal relationship roles
|
|
7
7
|
* "Who are you in relation to the subject?" (family / social relationship)
|
|
8
8
|
* Source: http://terminology.hl7.org/ValueSet/v3-PersonalRelationshipRoleType
|
|
9
9
|
*
|
|
10
|
-
* 2.
|
|
10
|
+
* 2. legal / functional representative roles
|
|
11
11
|
* "What legal role do you exercise over the subject?" (guardian, attorney…)
|
|
12
12
|
* Source: http://terminology.hl7.org/ValueSet/v3-RoleCode
|
|
13
13
|
* Used as default for non-human subjects (e.g. animal-care sector).
|
|
@@ -17,9 +17,10 @@
|
|
|
17
17
|
// 1. v3-PersonalRelationshipRoleType
|
|
18
18
|
// ---------------------------------------------------------------------------
|
|
19
19
|
export const HL7_CODING_SYSTEM_PERSONAL_RELATIONSHIP = 'http://terminology.hl7.org/CodeSystem/v3-PersonalRelationshipRoleType';
|
|
20
|
-
/** Canonical
|
|
20
|
+
/** Canonical GDC compatibility claim namespace used by legacy payloads. */
|
|
21
21
|
export const HL7_CLAIMS_CODING_SYSTEM = 'org.hl7.v3.RoleCode';
|
|
22
22
|
const PERSONAL_RELATIONSHIP_LIST = [
|
|
23
|
+
{ code: 'FAMMEMB', display: 'family member', definition: 'A relationship between two people characterizing their family association.' },
|
|
23
24
|
{ code: 'ONESELF', display: 'self', definition: 'The relationship that a person has with himself or herself.' },
|
|
24
25
|
{ code: 'CHILD', display: 'child', definition: 'The player of the role is a child of the scoping entity.' },
|
|
25
26
|
{ code: 'CHLDADOPT', display: 'adopted child', definition: 'The player of the role is a child taken into a family through legal means and raised by the scoping person as his or her own child.' },
|
|
@@ -162,10 +163,53 @@ export const HL7_PERSONAL_RELATIONSHIP_ROLES = [
|
|
|
162
163
|
..._personalPreferred,
|
|
163
164
|
..._personalRemaining,
|
|
164
165
|
];
|
|
166
|
+
/**
|
|
167
|
+
* Small, non-gender-forcing family-role catalog used by individual-member
|
|
168
|
+
* selectors. `FAMMEMB` is the safe fallback when no more specific relationship
|
|
169
|
+
* applies. The generic great-grandparent code is `GGRPRN`; `GGRFTH` means a
|
|
170
|
+
* male great-grandfather and therefore must not be used as its substitute.
|
|
171
|
+
*/
|
|
172
|
+
export const HL7_INDIVIDUAL_MEMBER_RELATIONSHIP_CODES = [
|
|
173
|
+
'FAMMEMB',
|
|
174
|
+
'WIFE',
|
|
175
|
+
'HUSB',
|
|
176
|
+
'DOMPART',
|
|
177
|
+
'SIS',
|
|
178
|
+
'BRO',
|
|
179
|
+
'SON',
|
|
180
|
+
'DAU',
|
|
181
|
+
'PRN',
|
|
182
|
+
'GRPRN',
|
|
183
|
+
'GRNDCHILD',
|
|
184
|
+
'GGRPRN',
|
|
185
|
+
'FRND',
|
|
186
|
+
'NBOR',
|
|
187
|
+
'ROOM',
|
|
188
|
+
];
|
|
189
|
+
const _individualMemberRelationshipCodeSet = new Set(HL7_INDIVIDUAL_MEMBER_RELATIONSHIP_CODES);
|
|
190
|
+
/** Returns whether a code belongs to the intentionally simplified member picker. */
|
|
191
|
+
export function isHl7IndividualMemberRelationshipCode(value) {
|
|
192
|
+
return _individualMemberRelationshipCodeSet.has(String(value || '').trim().toUpperCase());
|
|
193
|
+
}
|
|
194
|
+
/** Ordered descriptors for the individual/family member role selector. */
|
|
195
|
+
export const HL7_INDIVIDUAL_MEMBER_RELATIONSHIP_ROLES = HL7_INDIVIDUAL_MEMBER_RELATIONSHIP_CODES.map((code) => {
|
|
196
|
+
const descriptor = PERSONAL_RELATIONSHIP_LIST.find((entry) => entry.code === code);
|
|
197
|
+
if (!descriptor)
|
|
198
|
+
throw new Error(`Missing HL7 relationship descriptor for ${code}.`);
|
|
199
|
+
return descriptor;
|
|
200
|
+
});
|
|
201
|
+
/**
|
|
202
|
+
* Complete personal-relationship catalog. It is the extended picker surface:
|
|
203
|
+
* every entry from the compact individual-member catalog is included together
|
|
204
|
+
* with all more specific HL7 personal relationship choices.
|
|
205
|
+
*/
|
|
206
|
+
export const HL7_INDIVIDUAL_MEMBER_RELATIONSHIP_ROLES_FULL = HL7_PERSONAL_RELATIONSHIP_ROLES;
|
|
165
207
|
// ---------------------------------------------------------------------------
|
|
166
208
|
// 2. v3-RoleCode — legal / functional representative subset
|
|
167
209
|
// ---------------------------------------------------------------------------
|
|
168
210
|
export const HL7_CODING_SYSTEM_V3_ROLE_CODE = 'http://terminology.hl7.org/CodeSystem/v3-RoleCode';
|
|
211
|
+
/** Canonical system for functional RelatedPerson role-class values. */
|
|
212
|
+
export const HL7_CODING_SYSTEM_V3_ROLE_CLASS = 'http://terminology.hl7.org/CodeSystem/v3-RoleClass';
|
|
169
213
|
/**
|
|
170
214
|
* Legal representative / guardian roles from HL7 v3-RoleCode.
|
|
171
215
|
*
|
|
@@ -202,6 +246,50 @@ export const HL7_V3_ROLE_CODE_LEGAL_REPRESENTATIVE = [
|
|
|
202
246
|
definition: 'A relationship between two people in which one person acts on behalf of another even if the grantor becomes incapacitated.',
|
|
203
247
|
},
|
|
204
248
|
];
|
|
249
|
+
/**
|
|
250
|
+
* Functional tags accepted by the GDC `RelatedPerson.role` flat-claim
|
|
251
|
+
* extension. They do not replace `RelatedPerson.relationship`: kinship belongs
|
|
252
|
+
* in `relationship`, while these comma-separated values describe an explicit
|
|
253
|
+
* operational or legal function. CAREGIVER/ECON/DEPEN use v3-RoleClass;
|
|
254
|
+
* RESPRSN/BILL/POWATT use v3-RoleCode. `POWATT` must only be assigned when a
|
|
255
|
+
* real power of attorney exists; it is never inferred from controller status.
|
|
256
|
+
* The bare CSV is resolved through the descriptors below when a Coding system
|
|
257
|
+
* is required.
|
|
258
|
+
*/
|
|
259
|
+
export const HL7_RELATED_PERSON_FUNCTIONAL_ROLES = [
|
|
260
|
+
{
|
|
261
|
+
...HL7_V3_ROLE_CODE_LEGAL_REPRESENTATIVE[0],
|
|
262
|
+
codingSystem: HL7_CODING_SYSTEM_V3_ROLE_CODE,
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
code: 'CAREGIVER',
|
|
266
|
+
display: 'Caregiver',
|
|
267
|
+
definition: 'A person responsible for the primary care of a patient at home.',
|
|
268
|
+
codingSystem: HL7_CODING_SYSTEM_V3_ROLE_CLASS,
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
code: 'ECON',
|
|
272
|
+
display: 'Emergency contact',
|
|
273
|
+
definition: 'A contact for use in an emergency.',
|
|
274
|
+
codingSystem: HL7_CODING_SYSTEM_V3_ROLE_CLASS,
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
code: 'DEPEN',
|
|
278
|
+
display: 'Dependent',
|
|
279
|
+
definition: 'A person covered under a policy or program based on an association with a subscriber.',
|
|
280
|
+
codingSystem: HL7_CODING_SYSTEM_V3_ROLE_CLASS,
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
code: 'BILL',
|
|
284
|
+
display: 'Billing contact',
|
|
285
|
+
definition: 'A contact used for billing in the applicable provider-organization context.',
|
|
286
|
+
codingSystem: HL7_CODING_SYSTEM_V3_ROLE_CODE,
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
...HL7_V3_ROLE_CODE_LEGAL_REPRESENTATIVE[3],
|
|
290
|
+
codingSystem: HL7_CODING_SYSTEM_V3_ROLE_CODE,
|
|
291
|
+
},
|
|
292
|
+
];
|
|
205
293
|
/** Default role code for animal-care and non-human subjects. */
|
|
206
294
|
export const HL7_DEFAULT_ROLE_ANIMAL_CARE = 'RESPRSN';
|
|
207
295
|
/** Default role code for health sector (patient self-represents). */
|
|
@@ -131,7 +131,7 @@ export declare const EXAMPLE_PROVIDER_SECTOR_DID: string;
|
|
|
131
131
|
*
|
|
132
132
|
* There are two valid base roots:
|
|
133
133
|
* - hosted provider root:
|
|
134
|
-
* `did:web:<host.domain>:<sector
|
|
134
|
+
* `did:web:<host.domain>:<sector>:organization:taxid:<provider-tax-id>`
|
|
135
135
|
* - external provider custom-domain root:
|
|
136
136
|
* `did:web:<sector.provider.domain>`
|
|
137
137
|
*
|
package/dist/examples/shared.js
CHANGED
|
@@ -156,7 +156,7 @@ export const EXAMPLE_PROVIDER_SECTOR_DID = EXAMPLE_PROVIDER_DOMAIN_DID;
|
|
|
156
156
|
*
|
|
157
157
|
* There are two valid base roots:
|
|
158
158
|
* - hosted provider root:
|
|
159
|
-
* `did:web:<host.domain>:<sector
|
|
159
|
+
* `did:web:<host.domain>:<sector>:organization:taxid:<provider-tax-id>`
|
|
160
160
|
* - external provider custom-domain root:
|
|
161
161
|
* `did:web:<sector.provider.domain>`
|
|
162
162
|
*
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
export type RoleCodeI18nKey = `org.ilo.isco-08.${string}` | `org.isco08.${string}` | `org.hl7.
|
|
1
|
+
export type RoleCodeI18nKey = `org.ilo.isco-08.${string}` | `org.isco08.${string}` | `org.hl7.terminology.CodeSystem.v3-RoleCode.${string}`
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated Use `org.hl7.terminology.CodeSystem.v3-RoleCode.<code>`.
|
|
4
|
+
*/
|
|
5
|
+
| `org.hl7.v3.personalRelationship.${string}`
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated Use `org.hl7.terminology.CodeSystem.v3-RoleCode.<code>`.
|
|
8
|
+
*/
|
|
9
|
+
| `org.hl7.v3.roleCode.${string}`;
|
|
2
10
|
export type RoleCodeI18nMap = Readonly<Record<RoleCodeI18nKey, string>>;
|
|
3
11
|
export declare const roleCodeI18nEn: Readonly<Record<RoleCodeI18nKey, string>>;
|
|
4
12
|
export declare const healthcareRoleI18nEn: Readonly<Record<RoleCodeI18nKey, string>>;
|
|
@@ -6,7 +6,18 @@ function buildRoleCodeI18nMap() {
|
|
|
6
6
|
const legacyIscoAliases = baseEntries
|
|
7
7
|
.filter(([key]) => key.startsWith('org.ilo.isco-08.'))
|
|
8
8
|
.map(([key, label]) => [key.replace('org.ilo.isco-08.', 'org.isco08.'), label]);
|
|
9
|
-
const
|
|
9
|
+
const legacyHl7Aliases = baseEntries
|
|
10
|
+
.filter(([key]) => key.startsWith('org.hl7.terminology.CodeSystem.v3-RoleCode.'))
|
|
11
|
+
.flatMap(([key, label]) => {
|
|
12
|
+
const suffix = key.replace('org.hl7.terminology.CodeSystem.v3-RoleCode.', '');
|
|
13
|
+
return [
|
|
14
|
+
/** @deprecated Compatibility alias for older consumers. */
|
|
15
|
+
[`org.hl7.v3.personalRelationship.${suffix}`, label],
|
|
16
|
+
/** @deprecated Compatibility alias for older consumers. */
|
|
17
|
+
[`org.hl7.v3.roleCode.${suffix}`, label],
|
|
18
|
+
];
|
|
19
|
+
});
|
|
20
|
+
const entries = [...baseEntries, ...legacyIscoAliases, ...legacyHl7Aliases];
|
|
10
21
|
return Object.freeze(Object.fromEntries(entries));
|
|
11
22
|
}
|
|
12
23
|
export const roleCodeI18nEn = buildRoleCodeI18nMap();
|
|
@@ -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'.
|
|
@@ -12,7 +12,7 @@ export declare const InvoiceClaim: {
|
|
|
12
12
|
readonly Date: "Invoice.date";
|
|
13
13
|
/** Invoice lifecycle status. Example: `issued`. */
|
|
14
14
|
readonly Status: "Invoice.status";
|
|
15
|
-
/** Subject or tenant context reference. Example: `did:web:host.example.com:health-care
|
|
15
|
+
/** Subject or tenant context reference. Example: `did:web:host.example.com:health-care:organization:taxid:VATES-B00112233:individual:multibase:zExampleIndividualId`. */
|
|
16
16
|
readonly Subject: "Invoice.subject";
|
|
17
17
|
/** Billed recipient reference. Example: `did:web:portal.example.org:billing`. */
|
|
18
18
|
readonly Recipient: "Invoice.recipient";
|
|
@@ -13,7 +13,7 @@ export const InvoiceClaim = {
|
|
|
13
13
|
Date: 'Invoice.date',
|
|
14
14
|
/** Invoice lifecycle status. Example: `issued`. */
|
|
15
15
|
Status: 'Invoice.status',
|
|
16
|
-
/** Subject or tenant context reference. Example: `did:web:host.example.com:health-care
|
|
16
|
+
/** Subject or tenant context reference. Example: `did:web:host.example.com:health-care:organization:taxid:VATES-B00112233:individual:multibase:zExampleIndividualId`. */
|
|
17
17
|
Subject: 'Invoice.subject',
|
|
18
18
|
/** Billed recipient reference. Example: `did:web:portal.example.org:billing`. */
|
|
19
19
|
Recipient: 'Invoice.recipient',
|
|
@@ -156,7 +156,7 @@ export const InvoiceClaimSpecs = [
|
|
|
156
156
|
{
|
|
157
157
|
key: InvoiceClaim.Subject,
|
|
158
158
|
meaning: 'Subject or tenant context reference.',
|
|
159
|
-
example: 'did:web:host.example.com:health-care
|
|
159
|
+
example: 'did:web:host.example.com:health-care:organization:taxid:VATES-B00112233:individual:multibase:zExampleIndividualId',
|
|
160
160
|
},
|
|
161
161
|
{ key: InvoiceClaim.Recipient, meaning: 'Billed recipient reference.', example: 'did:web:portal.example.org:billing' },
|
|
162
162
|
{ key: InvoiceClaim.Issuer, meaning: 'Invoice issuer reference.', example: 'did:web:api.acme.org' },
|
|
@@ -72,7 +72,7 @@ export declare const ObservationClaim: {
|
|
|
72
72
|
readonly Language: "Observation.language";
|
|
73
73
|
/** Observation method token. Example: `http://snomed.info/sct|252465000`. */
|
|
74
74
|
readonly Method: "Observation.method";
|
|
75
|
-
/** Optional compatibility alias of `Observation.subject`. Example: `did:web:host.example.com:health-care
|
|
75
|
+
/** Optional compatibility alias of `Observation.subject`. Example: `did:web:host.example.com:health-care:organization:taxid:VATES-B00112233:individual:multibase:zExampleIndividualId`. */
|
|
76
76
|
readonly Patient: "Observation.patient";
|
|
77
77
|
/** Performer reference list. Example: `Practitioner/prac-1`. */
|
|
78
78
|
readonly Performer: "Observation.performer";
|
|
@@ -80,7 +80,7 @@ export declare const ObservationClaim: {
|
|
|
80
80
|
readonly Specimen: "Observation.specimen";
|
|
81
81
|
/** Observation status. Presence marks one visible/searchable main observation. Example: `final`. */
|
|
82
82
|
readonly Status: "Observation.status";
|
|
83
|
-
/** Canonical subject reference. Example: `did:web:host.example.com:health-care
|
|
83
|
+
/** Canonical subject reference. Example: `did:web:host.example.com:health-care:organization:taxid:VATES-B00112233:individual:multibase:zExampleIndividualId`. */
|
|
84
84
|
readonly Subject: "Observation.subject";
|
|
85
85
|
/** Value as coded concept token. Example: `http://terminology.hl7.org/CodeSystem/data-absent-reason|not-performed`. */
|
|
86
86
|
readonly ValueConcept: "Observation.value-concept";
|
|
@@ -74,7 +74,7 @@ export const ObservationClaim = {
|
|
|
74
74
|
Language: 'Observation.language',
|
|
75
75
|
/** Observation method token. Example: `http://snomed.info/sct|252465000`. */
|
|
76
76
|
Method: 'Observation.method',
|
|
77
|
-
/** Optional compatibility alias of `Observation.subject`. Example: `did:web:host.example.com:health-care
|
|
77
|
+
/** Optional compatibility alias of `Observation.subject`. Example: `did:web:host.example.com:health-care:organization:taxid:VATES-B00112233:individual:multibase:zExampleIndividualId`. */
|
|
78
78
|
Patient: 'Observation.patient',
|
|
79
79
|
/** Performer reference list. Example: `Practitioner/prac-1`. */
|
|
80
80
|
Performer: 'Observation.performer',
|
|
@@ -82,7 +82,7 @@ export const ObservationClaim = {
|
|
|
82
82
|
Specimen: 'Observation.specimen',
|
|
83
83
|
/** Observation status. Presence marks one visible/searchable main observation. Example: `final`. */
|
|
84
84
|
Status: 'Observation.status',
|
|
85
|
-
/** Canonical subject reference. Example: `did:web:host.example.com:health-care
|
|
85
|
+
/** Canonical subject reference. Example: `did:web:host.example.com:health-care:organization:taxid:VATES-B00112233:individual:multibase:zExampleIndividualId`. */
|
|
86
86
|
Subject: 'Observation.subject',
|
|
87
87
|
/** Value as coded concept token. Example: `http://terminology.hl7.org/CodeSystem/data-absent-reason|not-performed`. */
|
|
88
88
|
ValueConcept: 'Observation.value-concept',
|
|
@@ -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
|
];
|
|
@@ -48,8 +48,8 @@ export class AllergyIntoleranceEntryEditor extends ClinicalResourceEntryEditor {
|
|
|
48
48
|
/** Reads the recorder reference. */
|
|
49
49
|
getRecorder() { return this.getScalarClaim(AllergyIntoleranceClaim.Recorder); }
|
|
50
50
|
/** Writes the linked contained-document identifier list. */
|
|
51
|
-
setContainedDocumentIdentifierList(identifiers) { return this.setCsvClaimList(AllergyIntoleranceClaim.
|
|
51
|
+
setContainedDocumentIdentifierList(identifiers) { return this.setCsvClaimList(AllergyIntoleranceClaim.ContainedReferenceList, identifiers); }
|
|
52
52
|
/** Reads the linked contained-document identifier list. */
|
|
53
|
-
getContainedDocumentIdentifierList() { return this.getCsvClaimList(AllergyIntoleranceClaim.
|
|
53
|
+
getContainedDocumentIdentifierList() { return this.getCsvClaimList(AllergyIntoleranceClaim.ContainedReferenceList); }
|
|
54
54
|
}
|
|
55
55
|
registerBundleEntryEditor(BundleEditableResourceTypes.allergyIntolerance, AllergyIntoleranceEntryEditor);
|