@imranq2/fhirpatientsummary 1.0.16 → 1.0.18
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 +6 -6
- package/dist/index.cjs +661 -340
- package/dist/index.d.cts +74 -8
- package/dist/index.d.ts +74 -8
- package/dist/index.js +661 -340
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ npm install
|
|
|
18
18
|
|
|
19
19
|
You can use the `ComprehensiveIPSCompositionBuilder` in your TypeScript or JavaScript project to generate an IPS-compliant FHIR Bundle. The builder supports both fluent section addition and a convenient `read_bundle()` method to extract all supported sections from a FHIR Bundle.
|
|
20
20
|
|
|
21
|
-
### Example: Using setPatient and
|
|
21
|
+
### Example: Using setPatient and makeSectionAsync
|
|
22
22
|
|
|
23
23
|
```typescript
|
|
24
24
|
import { ComprehensiveIPSCompositionBuilder } from './src/generators/fhir_summary_generator';
|
|
@@ -26,10 +26,10 @@ import { IPSSections } from './src/structures/ips_sections';
|
|
|
26
26
|
|
|
27
27
|
const builder = new ComprehensiveIPSCompositionBuilder()
|
|
28
28
|
.setPatient(patientResource)
|
|
29
|
-
.
|
|
30
|
-
.
|
|
31
|
-
.
|
|
32
|
-
.
|
|
29
|
+
.makeSectionAsync(IPSSections.ALLERGIES, allergiesArray, 'America/New_York')
|
|
30
|
+
.makeSectionAsync(IPSSections.MEDICATIONS, medicationsArray, 'America/New_York')
|
|
31
|
+
.makeSectionAsync(IPSSections.PROBLEMS, problemsArray, 'America/New_York')
|
|
32
|
+
.makeSectionAsync(IPSSections.IMMUNIZATIONS, immunizationsArray, 'America/New_York');
|
|
33
33
|
|
|
34
34
|
const bundle = builder.build_bundle(
|
|
35
35
|
'example-organization',
|
|
@@ -61,7 +61,7 @@ console.log(JSON.stringify(bundle, null, 2));
|
|
|
61
61
|
```
|
|
62
62
|
|
|
63
63
|
- Use `setPatient(patientResource)` to set the patient.
|
|
64
|
-
- Use `
|
|
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
67
|
## Running Tests
|