@imranq2/fhirpatientsummary 1.0.32 → 1.0.34
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 +38 -0
- package/dist/index.cjs +332 -134
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +332 -134
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -64,6 +64,44 @@ console.log(JSON.stringify(bundle, null, 2));
|
|
|
64
64
|
- Use `makeSectionAsync(sectionType, resources, timezone)` to add each IPS section, or use `read_bundle(fhirBundle, timezone)` to extract all supported sections from a FHIR Bundle.
|
|
65
65
|
- Use `build_bundle` to generate the final FHIR Bundle.
|
|
66
66
|
|
|
67
|
+
## Patient Summary Composition
|
|
68
|
+
|
|
69
|
+
When generating patient summaries from FHIR Bundles, the library can use pre-computed summary compositions instead of raw resources. Summary compositions are specially structured FHIR Composition resources that contain curated, filtered, or aggregated data for specific sections.
|
|
70
|
+
|
|
71
|
+
### How Summary Compositions Work
|
|
72
|
+
|
|
73
|
+
The `readBundleAsync` method supports a `useSummaryCompositions` parameter. When enabled, the library follows this priority order when processing each IPS section:
|
|
74
|
+
|
|
75
|
+
1. **IPS-Specific Composition** (highest priority): Compositions with IPS-specific type codes (e.g., `ips_patient_summary_document`, `ips_vital_summary_document`)
|
|
76
|
+
2. **Summary Composition** (medium priority): Compositions with summary type codes (e.g., `allergy_summary_document`, `condition_summary_document`, `medication_summary_document`)
|
|
77
|
+
3. **Raw Resources** (fallback): Individual FHIR resources when no composition is available
|
|
78
|
+
|
|
79
|
+
This priority order ensures that the most refined and curated data is used when available, while still supporting raw resource processing as a fallback.
|
|
80
|
+
|
|
81
|
+
### Environment Variables for enabling Composition Summary
|
|
82
|
+
|
|
83
|
+
The following environment variables can be used to configure the behavior of the patient summary generator:
|
|
84
|
+
|
|
85
|
+
#### SUMMARY_IPS_COMPOSITION_SECTIONS
|
|
86
|
+
|
|
87
|
+
Controls which IPS sections should include IPS-specific composition.
|
|
88
|
+
|
|
89
|
+
- **Default**: Disabled
|
|
90
|
+
- **Format**: Comma-separated list of section names
|
|
91
|
+
- **Example**: `SUMMARY_IPS_COMPOSITION_SECTIONS=Patient,VitalSignsSection`
|
|
92
|
+
|
|
93
|
+
When set to `all`, all supported sections will use IPS composition. To enable only specific sections, provide a comma-separated list of [section names](src/structures/ips_sections.ts).
|
|
94
|
+
|
|
95
|
+
#### SUMMARY_COMPOSITION_SECTIONS
|
|
96
|
+
|
|
97
|
+
Controls which IPS sections should include summary composition.
|
|
98
|
+
|
|
99
|
+
- **Default**: Disabled
|
|
100
|
+
- **Format**: Comma-separated list of section names
|
|
101
|
+
- **Example**: `SUMMARY_COMPOSITION_SECTIONS=AllergyIntoleranceSection,ProblemSection,MedicationSummarySection`
|
|
102
|
+
|
|
103
|
+
When set to `all`, all supported sections will use summary composition. To enable only specific sections, provide a comma-separated list of [section names](src/structures/ips_sections.ts).
|
|
104
|
+
|
|
67
105
|
## Running Tests
|
|
68
106
|
|
|
69
107
|
To run the test suite:
|