gdc-common-utils-ts 2.3.12 → 2.3.13
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/data-collections.d.ts +4 -0
- package/dist/constants/data-collections.js +6 -2
- package/dist/convert/convert-device-use-statement.js +7 -1
- package/dist/models/interoperable-claims/device-use-statement-claims.d.ts +1 -0
- package/dist/models/interoperable-claims/device-use-statement-claims.js +2 -0
- package/package.json +1 -1
|
@@ -15,8 +15,10 @@ export declare const DataCollectionIds: Readonly<{
|
|
|
15
15
|
readonly conditions: "conditions";
|
|
16
16
|
readonly consents: "consents";
|
|
17
17
|
readonly diagnosticReports: "diagnostic-reports";
|
|
18
|
+
readonly deviceUseStatements: "device-use-statements";
|
|
18
19
|
readonly documentReferences: "document-references";
|
|
19
20
|
readonly encounters: "encounters";
|
|
21
|
+
readonly flags: "flags";
|
|
20
22
|
readonly imagingStudies: "imaging-studies";
|
|
21
23
|
readonly immunizations: "immunizations";
|
|
22
24
|
readonly medications: "medications";
|
|
@@ -43,7 +45,9 @@ export declare const FhirResourceTypeDataCollections: Readonly<{
|
|
|
43
45
|
readonly Condition: "conditions";
|
|
44
46
|
readonly Consent: "consents";
|
|
45
47
|
readonly DiagnosticReport: "diagnostic-reports";
|
|
48
|
+
readonly DeviceUseStatement: "device-use-statements";
|
|
46
49
|
readonly Encounter: "encounters";
|
|
50
|
+
readonly Flag: "flags";
|
|
47
51
|
readonly ImagingStudy: "imaging-studies";
|
|
48
52
|
readonly Immunization: "immunizations";
|
|
49
53
|
readonly MedicationStatement: "medications";
|
|
@@ -17,8 +17,10 @@ export const DataCollectionIds = Object.freeze({
|
|
|
17
17
|
conditions: 'conditions',
|
|
18
18
|
consents: 'consents',
|
|
19
19
|
diagnosticReports: 'diagnostic-reports',
|
|
20
|
+
deviceUseStatements: 'device-use-statements',
|
|
20
21
|
documentReferences: 'document-references',
|
|
21
22
|
encounters: 'encounters',
|
|
23
|
+
flags: 'flags',
|
|
22
24
|
imagingStudies: 'imaging-studies',
|
|
23
25
|
immunizations: 'immunizations',
|
|
24
26
|
medications: 'medications',
|
|
@@ -51,8 +53,8 @@ export const HealthcareSummarySectionDataCollections = Object.freeze({
|
|
|
51
53
|
[HealthcareSummarySections.HistoryOfPastIllness.attributeValue]: Object.freeze([DataCollectionIds.conditions]),
|
|
52
54
|
[HealthcareSummarySections.PregnancyHistory.attributeValue]: Object.freeze([DataCollectionIds.observations]),
|
|
53
55
|
[HealthcareSummarySections.GoalsAndPreferences.attributeValue]: Object.freeze([DataCollectionIds.consents]),
|
|
54
|
-
[HealthcareSummarySections.Alert.attributeValue]: Object.freeze([]),
|
|
55
|
-
[HealthcareSummarySections.MedicalDevices.attributeValue]: Object.freeze([]),
|
|
56
|
+
[HealthcareSummarySections.Alert.attributeValue]: Object.freeze([DataCollectionIds.flags]),
|
|
57
|
+
[HealthcareSummarySections.MedicalDevices.attributeValue]: Object.freeze([DataCollectionIds.deviceUseStatements]),
|
|
56
58
|
});
|
|
57
59
|
/**
|
|
58
60
|
* Canonical FHIR R4 resource family -> collection mapping for normalized
|
|
@@ -65,7 +67,9 @@ export const FhirResourceTypeDataCollections = Object.freeze({
|
|
|
65
67
|
[ResourceTypesFhirR4.Condition]: DataCollectionIds.conditions,
|
|
66
68
|
[ResourceTypesFhirR4.Consent]: DataCollectionIds.consents,
|
|
67
69
|
[ResourceTypesFhirR4.DiagnosticReport]: DataCollectionIds.diagnosticReports,
|
|
70
|
+
[ResourceTypesFhirR4.DeviceUseStatement]: DataCollectionIds.deviceUseStatements,
|
|
68
71
|
[ResourceTypesFhirR4.Encounter]: DataCollectionIds.encounters,
|
|
72
|
+
[ResourceTypesFhirR4.Flag]: DataCollectionIds.flags,
|
|
69
73
|
[ResourceTypesFhirR4.ImagingStudy]: DataCollectionIds.imagingStudies,
|
|
70
74
|
[ResourceTypesFhirR4.Immunization]: DataCollectionIds.immunizations,
|
|
71
75
|
[ResourceTypesFhirR4.MedicationStatement]: DataCollectionIds.medications,
|
|
@@ -10,7 +10,12 @@ export function deviceUseStatementFlatToFhirR4(claims) {
|
|
|
10
10
|
resourceType: 'DeviceUseStatement',
|
|
11
11
|
identifier: claims[DeviceUseStatementClaim.Identifier] ? [{ value: claims[DeviceUseStatementClaim.Identifier] }] : undefined,
|
|
12
12
|
subject: { reference: subject },
|
|
13
|
-
device: {
|
|
13
|
+
device: {
|
|
14
|
+
reference: device,
|
|
15
|
+
...(claims[DeviceUseStatementClaim.DeviceDisplay]
|
|
16
|
+
? { display: claims[DeviceUseStatementClaim.DeviceDisplay] }
|
|
17
|
+
: {}),
|
|
18
|
+
},
|
|
14
19
|
status,
|
|
15
20
|
recordedOn: claims[DeviceUseStatementClaim.RecordedOn],
|
|
16
21
|
timingDateTime: claims[DeviceUseStatementClaim.TimingDateTime],
|
|
@@ -21,6 +26,7 @@ export function deviceUseStatementFhirR4ToFlat(resource) {
|
|
|
21
26
|
[DeviceUseStatementClaim.Identifier]: resource.identifier?.[0]?.value,
|
|
22
27
|
[DeviceUseStatementClaim.Subject]: resource.subject?.reference,
|
|
23
28
|
[DeviceUseStatementClaim.Device]: resource.device?.reference,
|
|
29
|
+
[DeviceUseStatementClaim.DeviceDisplay]: resource.device?.display,
|
|
24
30
|
[DeviceUseStatementClaim.Status]: resource.status,
|
|
25
31
|
[DeviceUseStatementClaim.RecordedOn]: resource.recordedOn,
|
|
26
32
|
[DeviceUseStatementClaim.TimingDateTime]: resource.timingDateTime,
|
|
@@ -4,6 +4,7 @@ export declare const DeviceUseStatementClaim: {
|
|
|
4
4
|
readonly Subject: "DeviceUseStatement.subject";
|
|
5
5
|
readonly Status: "DeviceUseStatement.status";
|
|
6
6
|
readonly Device: "DeviceUseStatement.device";
|
|
7
|
+
readonly DeviceDisplay: "DeviceUseStatement.device-display";
|
|
7
8
|
readonly RecordedOn: "DeviceUseStatement.recordedon";
|
|
8
9
|
readonly TimingDateTime: "DeviceUseStatement.timing-datetime";
|
|
9
10
|
readonly ReasonCode: "DeviceUseStatement.reasoncode";
|
|
@@ -6,6 +6,7 @@ export const DeviceUseStatementClaim = {
|
|
|
6
6
|
Subject: 'DeviceUseStatement.subject',
|
|
7
7
|
Status: 'DeviceUseStatement.status',
|
|
8
8
|
Device: 'DeviceUseStatement.device',
|
|
9
|
+
DeviceDisplay: 'DeviceUseStatement.device-display',
|
|
9
10
|
RecordedOn: 'DeviceUseStatement.recordedon',
|
|
10
11
|
TimingDateTime: 'DeviceUseStatement.timing-datetime',
|
|
11
12
|
ReasonCode: 'DeviceUseStatement.reasoncode',
|
|
@@ -16,6 +17,7 @@ export const DeviceUseStatementClaimSpecs = [
|
|
|
16
17
|
{ key: DeviceUseStatementClaim.Subject, meaning: 'Patient subject reference.', example: 'Patient/pat-123' },
|
|
17
18
|
{ key: DeviceUseStatementClaim.Status, meaning: 'Use statement status.', example: 'active' },
|
|
18
19
|
{ key: DeviceUseStatementClaim.Device, meaning: 'Device reference.', example: 'Device/dev-777' },
|
|
20
|
+
{ key: DeviceUseStatementClaim.DeviceDisplay, meaning: 'Human-readable device name accompanying the reference.', example: 'Hip prosthesis' },
|
|
19
21
|
{ key: DeviceUseStatementClaim.RecordedOn, meaning: 'Record creation date/time.', example: '2026-03-01T12:00:00Z' },
|
|
20
22
|
{ key: DeviceUseStatementClaim.TimingDateTime, meaning: 'When the use happened.', example: '2026-03-01T08:00:00Z' },
|
|
21
23
|
{ key: DeviceUseStatementClaim.ReasonCode, meaning: 'Reason code for use.', example: 'http://snomed.info/sct|182840001' },
|