@metriport/fhir-sdk 1.4.1 → 1.5.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.
- package/dist/internal/coding-systems.d.ts +6 -0
- package/dist/internal/coding-systems.d.ts.map +1 -1
- package/dist/internal/coding-systems.js +15 -7
- package/dist/internal/coding-systems.js.map +1 -1
- package/package.json +3 -2
- package/dist/demo-reverse-references.d.ts +0 -7
- package/dist/demo-reverse-references.d.ts.map +0 -1
- package/dist/demo-reverse-references.js +0 -207
- package/dist/demo-reverse-references.js.map +0 -1
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
5
|
* Standard FHIR coding system URLs
|
|
6
|
+
*
|
|
7
|
+
* TODO: Add CPT, CVX, and many others.
|
|
6
8
|
*/
|
|
7
9
|
export declare const CODING_SYSTEMS: {
|
|
8
10
|
readonly LOINC: "http://loinc.org";
|
|
@@ -10,6 +12,7 @@ export declare const CODING_SYSTEMS: {
|
|
|
10
12
|
readonly SNOMED: "http://snomed.info/sct";
|
|
11
13
|
readonly RXNORM: "http://www.nlm.nih.gov/research/umls/rxnorm";
|
|
12
14
|
readonly NDC: "http://hl7.org/fhir/sid/ndc";
|
|
15
|
+
readonly CCSR: "https://hcup-us.ahrq.gov/toolssoftware/ccsr/ccs_refined.jsp";
|
|
13
16
|
};
|
|
14
17
|
/**
|
|
15
18
|
* Configuration for dynamically generated coding system methods.
|
|
@@ -34,6 +37,9 @@ export declare const CODING_SYSTEM_CONFIG: readonly [{
|
|
|
34
37
|
}, {
|
|
35
38
|
readonly systemName: "Ndc";
|
|
36
39
|
readonly systemUrl: "http://hl7.org/fhir/sid/ndc";
|
|
40
|
+
}, {
|
|
41
|
+
readonly systemName: "Ccsr";
|
|
42
|
+
readonly systemUrl: "https://hcup-us.ahrq.gov/toolssoftware/ccsr/ccs_refined.jsp";
|
|
37
43
|
}];
|
|
38
44
|
/**
|
|
39
45
|
* Type helper to extract system names from configuration
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coding-systems.d.ts","sourceRoot":"","sources":["../../src/internal/coding-systems.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"coding-systems.d.ts","sourceRoot":"","sources":["../../src/internal/coding-systems.ts"],"names":[],"mappings":"AASA;;GAEG;AAEH;;;;GAIG;AACH,eAAO,MAAM,cAAc;;;;;;;CAOjB,CAAC;AAEX;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;EAyBvB,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC,CAAC"}
|
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CODING_SYSTEM_CONFIG = exports.CODING_SYSTEMS = void 0;
|
|
4
|
+
const constants_1 = require("@metriport/shared/medical/fhir/constants");
|
|
2
5
|
/**
|
|
3
6
|
* FHIR Coding System URLs and configuration for common coding systems
|
|
4
7
|
*/
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.CODING_SYSTEM_CONFIG = exports.CODING_SYSTEMS = void 0;
|
|
7
8
|
/**
|
|
8
9
|
* Standard FHIR coding system URLs
|
|
10
|
+
*
|
|
11
|
+
* TODO: Add CPT, CVX, and many others.
|
|
9
12
|
*/
|
|
10
13
|
exports.CODING_SYSTEMS = {
|
|
11
|
-
LOINC:
|
|
12
|
-
ICD10:
|
|
13
|
-
SNOMED:
|
|
14
|
-
RXNORM:
|
|
15
|
-
NDC:
|
|
14
|
+
LOINC: constants_1.LOINC_URL,
|
|
15
|
+
ICD10: constants_1.ICD_10_URL,
|
|
16
|
+
SNOMED: constants_1.SNOMED_URL,
|
|
17
|
+
RXNORM: constants_1.RXNORM_URL,
|
|
18
|
+
NDC: constants_1.NDC_URL,
|
|
19
|
+
CCSR: constants_1.CONDITION_CCSR_CATEGORY_SYSTEM_URL,
|
|
16
20
|
};
|
|
17
21
|
/**
|
|
18
22
|
* Configuration for dynamically generated coding system methods.
|
|
@@ -43,5 +47,9 @@ exports.CODING_SYSTEM_CONFIG = [
|
|
|
43
47
|
systemName: "Ndc",
|
|
44
48
|
systemUrl: exports.CODING_SYSTEMS.NDC,
|
|
45
49
|
},
|
|
50
|
+
{
|
|
51
|
+
systemName: "Ccsr",
|
|
52
|
+
systemUrl: exports.CODING_SYSTEMS.CCSR,
|
|
53
|
+
},
|
|
46
54
|
];
|
|
47
55
|
//# sourceMappingURL=coding-systems.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coding-systems.js","sourceRoot":"","sources":["../../src/internal/coding-systems.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"coding-systems.js","sourceRoot":"","sources":["../../src/internal/coding-systems.ts"],"names":[],"mappings":";;;AAAA,wEAOkD;AAElD;;GAEG;AAEH;;;;GAIG;AACU,QAAA,cAAc,GAAG;IAC5B,KAAK,EAAE,qBAAS;IAChB,KAAK,EAAE,sBAAU;IACjB,MAAM,EAAE,sBAAU;IAClB,MAAM,EAAE,sBAAU;IAClB,GAAG,EAAE,mBAAO;IACZ,IAAI,EAAE,8CAAkC;CAChC,CAAC;AAEX;;;;;;;GAOG;AACU,QAAA,oBAAoB,GAAG;IAClC;QACE,UAAU,EAAE,OAAO;QACnB,SAAS,EAAE,sBAAc,CAAC,KAAK;KAChC;IACD;QACE,UAAU,EAAE,OAAO;QACnB,SAAS,EAAE,sBAAc,CAAC,KAAK;KAChC;IACD;QACE,UAAU,EAAE,QAAQ;QACpB,SAAS,EAAE,sBAAc,CAAC,MAAM;KACjC;IACD;QACE,UAAU,EAAE,QAAQ;QACpB,SAAS,EAAE,sBAAc,CAAC,MAAM;KACjC;IACD;QACE,UAAU,EAAE,KAAK;QACjB,SAAS,EAAE,sBAAc,CAAC,GAAG;KAC9B;IACD;QACE,UAAU,EAAE,MAAM;QAClB,SAAS,EAAE,sBAAc,CAAC,IAAI;KAC/B;CACO,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metriport/fhir-sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "FHIR Bundle SDK for parsing, querying, and manipulating FHIR bundles with reference resolution",
|
|
5
5
|
"author": "Metriport Inc. <contact@metriport.com>",
|
|
6
6
|
"homepage": "https://metriport.com/",
|
|
@@ -64,5 +64,6 @@
|
|
|
64
64
|
"rimraf": "^5.0.1",
|
|
65
65
|
"ts-jest": "29.1.1",
|
|
66
66
|
"typescript": "^4.9.5"
|
|
67
|
-
}
|
|
67
|
+
},
|
|
68
|
+
"gitHead": "4cce00b5850067145829bff8f3cf2c80405f736b"
|
|
68
69
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"demo-reverse-references.d.ts","sourceRoot":"","sources":["../src/demo-reverse-references.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Demo script showcasing reverse reference functionality in FHIR SDK
|
|
4
|
-
*
|
|
5
|
-
* Run with: npx ts-node src/demo-reverse-references.ts
|
|
6
|
-
*/
|
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
const index_1 = require("./index");
|
|
9
|
-
const fhir_bundles_1 = require("./__tests__/fixtures/fhir-bundles");
|
|
10
|
-
async function demonstrateReverseReferences() {
|
|
11
|
-
console.log("=".repeat(80));
|
|
12
|
-
console.log("FHIR SDK - Reverse Reference Lookup Demo");
|
|
13
|
-
console.log("=".repeat(80));
|
|
14
|
-
console.log();
|
|
15
|
-
// Create SDK instance with sample bundle
|
|
16
|
-
const sdk = await index_1.FhirBundleSdk.create(fhir_bundles_1.validCompleteBundle);
|
|
17
|
-
console.log(`📦 Loaded bundle with ${sdk.total} resources`);
|
|
18
|
-
console.log();
|
|
19
|
-
// ============================================================================
|
|
20
|
-
// DEMO 1: Find all resources that reference a patient
|
|
21
|
-
// ============================================================================
|
|
22
|
-
console.log("─".repeat(80));
|
|
23
|
-
console.log("DEMO 1: Find all resources that reference a specific patient");
|
|
24
|
-
console.log("─".repeat(80));
|
|
25
|
-
const patientId = "patient-123";
|
|
26
|
-
console.log(`\n🔍 Finding all resources that reference Patient/${patientId}...\n`);
|
|
27
|
-
const referencingPatient = sdk.getResourcesReferencingId(patientId);
|
|
28
|
-
console.log(`Found ${referencingPatient.length} resources:\n`);
|
|
29
|
-
for (const resource of referencingPatient) {
|
|
30
|
-
console.log(` ✓ ${resource.resourceType}/${resource.id}`);
|
|
31
|
-
}
|
|
32
|
-
console.log();
|
|
33
|
-
// ============================================================================
|
|
34
|
-
// DEMO 2: Filter by resource type
|
|
35
|
-
// ============================================================================
|
|
36
|
-
console.log("─".repeat(80));
|
|
37
|
-
console.log("DEMO 2: Filter reverse references by resource type");
|
|
38
|
-
console.log("─".repeat(80));
|
|
39
|
-
console.log(`\n🔍 Finding only Observations that reference Patient/${patientId}...\n`);
|
|
40
|
-
const observations = sdk.getResourcesReferencingId(patientId, {
|
|
41
|
-
resourceType: "Observation",
|
|
42
|
-
});
|
|
43
|
-
console.log(`Found ${observations.length} Observation(s):\n`);
|
|
44
|
-
for (const obs of observations) {
|
|
45
|
-
const obsData = obs;
|
|
46
|
-
console.log(` ✓ Observation/${obs.id}`);
|
|
47
|
-
console.log(` Code: ${obsData.code?.text || "N/A"}`);
|
|
48
|
-
console.log(
|
|
49
|
-
` Value: ${obsData.valueQuantity?.value || "N/A"} ${obsData.valueQuantity?.unit || ""}`
|
|
50
|
-
);
|
|
51
|
-
}
|
|
52
|
-
console.log();
|
|
53
|
-
// ============================================================================
|
|
54
|
-
// DEMO 3: Filter by reference field
|
|
55
|
-
// ============================================================================
|
|
56
|
-
console.log("─".repeat(80));
|
|
57
|
-
console.log("DEMO 3: Filter reverse references by field name");
|
|
58
|
-
console.log("─".repeat(80));
|
|
59
|
-
console.log(
|
|
60
|
-
`\n🔍 Finding resources that reference Patient/${patientId} via 'subject' field...\n`
|
|
61
|
-
);
|
|
62
|
-
const subjectReferences = sdk.getResourcesReferencingId(patientId, {
|
|
63
|
-
referenceField: "subject",
|
|
64
|
-
});
|
|
65
|
-
console.log(`Found ${subjectReferences.length} resource(s) with 'subject' reference:\n`);
|
|
66
|
-
for (const resource of subjectReferences) {
|
|
67
|
-
console.log(` ✓ ${resource.resourceType}/${resource.id}`);
|
|
68
|
-
}
|
|
69
|
-
console.log();
|
|
70
|
-
// ============================================================================
|
|
71
|
-
// DEMO 4: Combined filters
|
|
72
|
-
// ============================================================================
|
|
73
|
-
console.log("─".repeat(80));
|
|
74
|
-
console.log("DEMO 4: Combine resource type and field filters");
|
|
75
|
-
console.log("─".repeat(80));
|
|
76
|
-
const practitionerId = "practitioner-456";
|
|
77
|
-
console.log(
|
|
78
|
-
`\n🔍 Finding Observations that reference Practitioner/${practitionerId} via 'performer'...\n`
|
|
79
|
-
);
|
|
80
|
-
const performerObs = sdk.getResourcesReferencingId(practitionerId, {
|
|
81
|
-
resourceType: "Observation",
|
|
82
|
-
referenceField: "performer",
|
|
83
|
-
});
|
|
84
|
-
console.log(`Found ${performerObs.length} Observation(s):\n`);
|
|
85
|
-
for (const obs of performerObs) {
|
|
86
|
-
console.log(` ✓ Observation/${obs.id}`);
|
|
87
|
-
console.log(` Performed by: Practitioner/${practitionerId}`);
|
|
88
|
-
}
|
|
89
|
-
console.log();
|
|
90
|
-
// ============================================================================
|
|
91
|
-
// DEMO 5: Smart resource method
|
|
92
|
-
// ============================================================================
|
|
93
|
-
console.log("─".repeat(80));
|
|
94
|
-
console.log("DEMO 5: Using smart resource getReferencingResources() method");
|
|
95
|
-
console.log("─".repeat(80));
|
|
96
|
-
const patient = sdk.getPatientById(patientId);
|
|
97
|
-
if (patient) {
|
|
98
|
-
console.log(`\n👤 Patient: ${patient.name?.[0]?.family}, ${patient.name?.[0]?.given?.[0]}`);
|
|
99
|
-
console.log(` Gender: ${patient.gender}`);
|
|
100
|
-
console.log(` Birth Date: ${patient.birthDate}\n`);
|
|
101
|
-
// Use the smart resource method
|
|
102
|
-
const referencingResources = patient.getReferencingResources();
|
|
103
|
-
console.log(`📊 This patient is referenced by ${referencingResources.length} resources:\n`);
|
|
104
|
-
// Group by resource type
|
|
105
|
-
const byType = referencingResources.reduce((acc, r) => {
|
|
106
|
-
acc[r.resourceType] = (acc[r.resourceType] || 0) + 1;
|
|
107
|
-
return acc;
|
|
108
|
-
}, {});
|
|
109
|
-
for (const [type, count] of Object.entries(byType)) {
|
|
110
|
-
console.log(` • ${type}: ${count}`);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
console.log();
|
|
114
|
-
// ============================================================================
|
|
115
|
-
// DEMO 6: Discover related encounters
|
|
116
|
-
// ============================================================================
|
|
117
|
-
console.log("─".repeat(80));
|
|
118
|
-
console.log("DEMO 6: Discover what happened during an encounter");
|
|
119
|
-
console.log("─".repeat(80));
|
|
120
|
-
const encounterId = "encounter-789";
|
|
121
|
-
console.log(`\n🏥 Finding all clinical activities during Encounter/${encounterId}...\n`);
|
|
122
|
-
const encounterReferences = sdk.getResourcesReferencingId(encounterId, {
|
|
123
|
-
referenceField: "encounter",
|
|
124
|
-
});
|
|
125
|
-
console.log(`Found ${encounterReferences.length} clinical record(s) from this encounter:\n`);
|
|
126
|
-
for (const resource of encounterReferences) {
|
|
127
|
-
const data = resource;
|
|
128
|
-
console.log(` 📋 ${resource.resourceType}/${resource.id}`);
|
|
129
|
-
if (resource.resourceType === "Observation") {
|
|
130
|
-
console.log(` Type: ${data.code?.text || "N/A"}`);
|
|
131
|
-
console.log(` Status: ${data.status}`);
|
|
132
|
-
} else if (resource.resourceType === "DiagnosticReport") {
|
|
133
|
-
console.log(` Type: ${data.code?.text || "N/A"}`);
|
|
134
|
-
console.log(` Status: ${data.status}`);
|
|
135
|
-
console.log(` Results: ${data.result?.length || 0} observation(s)`);
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
console.log();
|
|
139
|
-
// ============================================================================
|
|
140
|
-
// DEMO 7: Performance comparison
|
|
141
|
-
// ============================================================================
|
|
142
|
-
console.log("─".repeat(80));
|
|
143
|
-
console.log("DEMO 7: Performance - O(1) reverse lookup");
|
|
144
|
-
console.log("─".repeat(80));
|
|
145
|
-
console.log("\n⚡ Running 1000 reverse reference lookups...\n");
|
|
146
|
-
const iterations = 1000;
|
|
147
|
-
const startTime = performance.now();
|
|
148
|
-
for (let i = 0; i < iterations; i++) {
|
|
149
|
-
sdk.getResourcesReferencingId(patientId);
|
|
150
|
-
}
|
|
151
|
-
const endTime = performance.now();
|
|
152
|
-
const avgTime = (endTime - startTime) / iterations;
|
|
153
|
-
console.log(` Total time: ${(endTime - startTime).toFixed(2)}ms`);
|
|
154
|
-
console.log(` Average per lookup: ${avgTime.toFixed(4)}ms`);
|
|
155
|
-
console.log(
|
|
156
|
-
` Performance: ${
|
|
157
|
-
avgTime < 0.1
|
|
158
|
-
? "✅ Excellent (< 0.1ms)"
|
|
159
|
-
: avgTime < 1
|
|
160
|
-
? "✅ Good (< 1ms)"
|
|
161
|
-
: "⚠️ Could be better"
|
|
162
|
-
}`
|
|
163
|
-
);
|
|
164
|
-
console.log();
|
|
165
|
-
// ============================================================================
|
|
166
|
-
// DEMO 8: Bi-directional reference navigation
|
|
167
|
-
// ============================================================================
|
|
168
|
-
console.log("─".repeat(80));
|
|
169
|
-
console.log("DEMO 8: Bi-directional reference navigation");
|
|
170
|
-
console.log("─".repeat(80));
|
|
171
|
-
console.log("\n🔄 Demonstrating forward and reverse reference navigation...\n");
|
|
172
|
-
const observation = sdk.getObservationById("observation-001");
|
|
173
|
-
if (observation) {
|
|
174
|
-
console.log(`Starting from: Observation/${observation.id}`);
|
|
175
|
-
console.log();
|
|
176
|
-
// Forward reference: Get the patient
|
|
177
|
-
console.log("➡️ Forward: observation.getSubject()");
|
|
178
|
-
const subject = observation.getSubject();
|
|
179
|
-
if (subject) {
|
|
180
|
-
console.log(` Found: ${subject.resourceType}/${subject.id}`);
|
|
181
|
-
console.log();
|
|
182
|
-
// Reverse reference: Get all resources referencing this patient
|
|
183
|
-
console.log("⬅️ Reverse: patient.getReferencingResources()");
|
|
184
|
-
const backReferences = subject.getReferencingResources();
|
|
185
|
-
console.log(` Found ${backReferences.length} resources referencing this patient:`);
|
|
186
|
-
for (const ref of backReferences) {
|
|
187
|
-
console.log(` • ${ref.resourceType}/${ref.id}`);
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
console.log();
|
|
192
|
-
// ============================================================================
|
|
193
|
-
console.log("=".repeat(80));
|
|
194
|
-
console.log("✨ Demo complete! All reverse reference features showcased.");
|
|
195
|
-
console.log("=".repeat(80));
|
|
196
|
-
}
|
|
197
|
-
// Run the demo
|
|
198
|
-
demonstrateReverseReferences()
|
|
199
|
-
.then(() => {
|
|
200
|
-
console.log("\n✅ Demo completed successfully\n");
|
|
201
|
-
process.exit(0);
|
|
202
|
-
})
|
|
203
|
-
.catch(error => {
|
|
204
|
-
console.error("\n❌ Demo failed:", error);
|
|
205
|
-
process.exit(1);
|
|
206
|
-
});
|
|
207
|
-
//# sourceMappingURL=demo-reverse-references.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"demo-reverse-references.js","sourceRoot":"","sources":["../src/demo-reverse-references.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AAEH,mCAAwC;AACxC,oEAAwE;AAExE,KAAK,UAAU,4BAA4B;IACzC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;IAC5B,OAAO,CAAC,GAAG,CAAC,0CAA0C,CAAC,CAAC;IACxD,OAAO,CAAC,GAAG,CAA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