phenoml 17.0.1 → 17.1.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/cjs/BaseClient.js +2 -2
- package/dist/cjs/Client.d.ts +3 -0
- package/dist/cjs/Client.js +15 -10
- package/dist/cjs/api/resources/fhir2Omop/client/Client.d.ts +110 -0
- package/dist/cjs/api/resources/fhir2Omop/client/Client.js +198 -0
- package/dist/cjs/api/resources/fhir2Omop/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/fhir2Omop/client/index.js +17 -0
- package/dist/cjs/api/resources/fhir2Omop/client/requests/CreateOmopRequest.d.ts +76 -0
- package/dist/cjs/api/resources/fhir2Omop/client/requests/CreateOmopRequest.js +3 -0
- package/dist/cjs/api/resources/fhir2Omop/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/fhir2Omop/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/fhir2Omop/errors/BadRequestError.d.ts +5 -0
- package/dist/cjs/api/resources/fhir2Omop/errors/BadRequestError.js +54 -0
- package/dist/cjs/api/resources/fhir2Omop/errors/InternalServerError.d.ts +5 -0
- package/dist/cjs/api/resources/fhir2Omop/errors/InternalServerError.js +54 -0
- package/dist/cjs/api/resources/fhir2Omop/errors/UnauthorizedError.d.ts +5 -0
- package/dist/cjs/api/resources/fhir2Omop/errors/UnauthorizedError.js +54 -0
- package/dist/cjs/api/resources/fhir2Omop/errors/index.d.ts +3 -0
- package/dist/cjs/api/resources/fhir2Omop/errors/index.js +19 -0
- package/dist/cjs/api/resources/fhir2Omop/exports.d.ts +2 -0
- package/dist/cjs/api/resources/fhir2Omop/exports.js +21 -0
- package/dist/cjs/api/resources/fhir2Omop/index.d.ts +3 -0
- package/dist/cjs/api/resources/fhir2Omop/index.js +19 -0
- package/dist/cjs/api/resources/fhir2Omop/types/ConditionOccurrenceRow.d.ts +12 -0
- package/dist/cjs/api/resources/fhir2Omop/types/ConditionOccurrenceRow.js +3 -0
- package/dist/cjs/api/resources/fhir2Omop/types/CreateOmopResponse.d.ts +11 -0
- package/dist/cjs/api/resources/fhir2Omop/types/CreateOmopResponse.js +3 -0
- package/dist/cjs/api/resources/fhir2Omop/types/DroppedResource.d.ts +5 -0
- package/dist/cjs/api/resources/fhir2Omop/types/DroppedResource.js +3 -0
- package/dist/cjs/api/resources/fhir2Omop/types/DrugExposureRow.d.ts +13 -0
- package/dist/cjs/api/resources/fhir2Omop/types/DrugExposureRow.js +3 -0
- package/dist/cjs/api/resources/fhir2Omop/types/MappingReportEntry.d.ts +18 -0
- package/dist/cjs/api/resources/fhir2Omop/types/MappingReportEntry.js +3 -0
- package/dist/cjs/api/resources/fhir2Omop/types/MeasurementRow.d.ts +17 -0
- package/dist/cjs/api/resources/fhir2Omop/types/MeasurementRow.js +3 -0
- package/dist/cjs/api/resources/fhir2Omop/types/ObservationRow.d.ts +16 -0
- package/dist/cjs/api/resources/fhir2Omop/types/ObservationRow.js +3 -0
- package/dist/cjs/api/resources/fhir2Omop/types/OmopTables.d.ts +13 -0
- package/dist/cjs/api/resources/fhir2Omop/types/OmopTables.js +3 -0
- package/dist/cjs/api/resources/fhir2Omop/types/PersonRow.d.ts +14 -0
- package/dist/cjs/api/resources/fhir2Omop/types/PersonRow.js +3 -0
- package/dist/cjs/api/resources/fhir2Omop/types/ProcedureOccurrenceRow.d.ts +10 -0
- package/dist/cjs/api/resources/fhir2Omop/types/ProcedureOccurrenceRow.js +3 -0
- package/dist/cjs/api/resources/fhir2Omop/types/ScanSummary.d.ts +15 -0
- package/dist/cjs/api/resources/fhir2Omop/types/ScanSummary.js +3 -0
- package/dist/cjs/api/resources/fhir2Omop/types/VisitOccurrenceRow.d.ts +11 -0
- package/dist/cjs/api/resources/fhir2Omop/types/VisitOccurrenceRow.js +3 -0
- package/dist/cjs/api/resources/fhir2Omop/types/index.d.ts +12 -0
- package/dist/cjs/api/resources/fhir2Omop/types/index.js +28 -0
- package/dist/cjs/api/resources/index.d.ts +1 -0
- package/dist/cjs/api/resources/index.js +2 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/Client.d.mts +3 -0
- package/dist/esm/Client.mjs +5 -0
- package/dist/esm/api/resources/fhir2Omop/client/Client.d.mts +110 -0
- package/dist/esm/api/resources/fhir2Omop/client/Client.mjs +161 -0
- package/dist/esm/api/resources/fhir2Omop/client/index.d.mts +1 -0
- package/dist/esm/api/resources/fhir2Omop/client/index.mjs +1 -0
- package/dist/esm/api/resources/fhir2Omop/client/requests/CreateOmopRequest.d.mts +76 -0
- package/dist/esm/api/resources/fhir2Omop/client/requests/CreateOmopRequest.mjs +2 -0
- package/dist/esm/api/resources/fhir2Omop/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/fhir2Omop/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/fhir2Omop/errors/BadRequestError.d.mts +5 -0
- package/dist/esm/api/resources/fhir2Omop/errors/BadRequestError.mjs +17 -0
- package/dist/esm/api/resources/fhir2Omop/errors/InternalServerError.d.mts +5 -0
- package/dist/esm/api/resources/fhir2Omop/errors/InternalServerError.mjs +17 -0
- package/dist/esm/api/resources/fhir2Omop/errors/UnauthorizedError.d.mts +5 -0
- package/dist/esm/api/resources/fhir2Omop/errors/UnauthorizedError.mjs +17 -0
- package/dist/esm/api/resources/fhir2Omop/errors/index.d.mts +3 -0
- package/dist/esm/api/resources/fhir2Omop/errors/index.mjs +3 -0
- package/dist/esm/api/resources/fhir2Omop/exports.d.mts +2 -0
- package/dist/esm/api/resources/fhir2Omop/exports.mjs +3 -0
- package/dist/esm/api/resources/fhir2Omop/index.d.mts +3 -0
- package/dist/esm/api/resources/fhir2Omop/index.mjs +3 -0
- package/dist/esm/api/resources/fhir2Omop/types/ConditionOccurrenceRow.d.mts +12 -0
- package/dist/esm/api/resources/fhir2Omop/types/ConditionOccurrenceRow.mjs +2 -0
- package/dist/esm/api/resources/fhir2Omop/types/CreateOmopResponse.d.mts +11 -0
- package/dist/esm/api/resources/fhir2Omop/types/CreateOmopResponse.mjs +2 -0
- package/dist/esm/api/resources/fhir2Omop/types/DroppedResource.d.mts +5 -0
- package/dist/esm/api/resources/fhir2Omop/types/DroppedResource.mjs +2 -0
- package/dist/esm/api/resources/fhir2Omop/types/DrugExposureRow.d.mts +13 -0
- package/dist/esm/api/resources/fhir2Omop/types/DrugExposureRow.mjs +2 -0
- package/dist/esm/api/resources/fhir2Omop/types/MappingReportEntry.d.mts +18 -0
- package/dist/esm/api/resources/fhir2Omop/types/MappingReportEntry.mjs +2 -0
- package/dist/esm/api/resources/fhir2Omop/types/MeasurementRow.d.mts +17 -0
- package/dist/esm/api/resources/fhir2Omop/types/MeasurementRow.mjs +2 -0
- package/dist/esm/api/resources/fhir2Omop/types/ObservationRow.d.mts +16 -0
- package/dist/esm/api/resources/fhir2Omop/types/ObservationRow.mjs +2 -0
- package/dist/esm/api/resources/fhir2Omop/types/OmopTables.d.mts +13 -0
- package/dist/esm/api/resources/fhir2Omop/types/OmopTables.mjs +2 -0
- package/dist/esm/api/resources/fhir2Omop/types/PersonRow.d.mts +14 -0
- package/dist/esm/api/resources/fhir2Omop/types/PersonRow.mjs +2 -0
- package/dist/esm/api/resources/fhir2Omop/types/ProcedureOccurrenceRow.d.mts +10 -0
- package/dist/esm/api/resources/fhir2Omop/types/ProcedureOccurrenceRow.mjs +2 -0
- package/dist/esm/api/resources/fhir2Omop/types/ScanSummary.d.mts +15 -0
- package/dist/esm/api/resources/fhir2Omop/types/ScanSummary.mjs +2 -0
- package/dist/esm/api/resources/fhir2Omop/types/VisitOccurrenceRow.d.mts +11 -0
- package/dist/esm/api/resources/fhir2Omop/types/VisitOccurrenceRow.mjs +2 -0
- package/dist/esm/api/resources/fhir2Omop/types/index.d.mts +12 -0
- package/dist/esm/api/resources/fhir2Omop/types/index.mjs +12 -0
- package/dist/esm/api/resources/index.d.mts +1 -0
- package/dist/esm/api/resources/index.mjs +1 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/openapi/openapi.json +731 -1
- package/package.json +15 -4
- package/reference.md +146 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "phenoml",
|
|
3
|
-
"version": "17.0
|
|
3
|
+
"version": "17.1.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -121,6 +121,17 @@
|
|
|
121
121
|
},
|
|
122
122
|
"default": "./dist/cjs/api/resources/fhir/exports.js"
|
|
123
123
|
},
|
|
124
|
+
"./fhir2Omop": {
|
|
125
|
+
"import": {
|
|
126
|
+
"types": "./dist/esm/api/resources/fhir2Omop/exports.d.mts",
|
|
127
|
+
"default": "./dist/esm/api/resources/fhir2Omop/exports.mjs"
|
|
128
|
+
},
|
|
129
|
+
"require": {
|
|
130
|
+
"types": "./dist/cjs/api/resources/fhir2Omop/exports.d.ts",
|
|
131
|
+
"default": "./dist/cjs/api/resources/fhir2Omop/exports.js"
|
|
132
|
+
},
|
|
133
|
+
"default": "./dist/cjs/api/resources/fhir2Omop/exports.js"
|
|
134
|
+
},
|
|
124
135
|
"./fhirProvider": {
|
|
125
136
|
"import": {
|
|
126
137
|
"types": "./dist/esm/api/resources/fhirProvider/exports.d.mts",
|
|
@@ -220,12 +231,12 @@
|
|
|
220
231
|
},
|
|
221
232
|
"default": "./dist/cjs/api/resources/workflows/exports.js"
|
|
222
233
|
},
|
|
223
|
-
"./
|
|
224
|
-
"./
|
|
234
|
+
"./package.json": "./package.json",
|
|
235
|
+
"./openapi.json": "./openapi/openapi.json"
|
|
225
236
|
},
|
|
226
237
|
"files": [
|
|
227
|
-
"dist",
|
|
228
238
|
"openapi",
|
|
239
|
+
"dist",
|
|
229
240
|
"reference.md",
|
|
230
241
|
"README.md",
|
|
231
242
|
"LICENSE"
|
package/reference.md
CHANGED
|
@@ -2656,6 +2656,152 @@ The ID of the FHIR provider to use. Can be either:
|
|
|
2656
2656
|
</dl>
|
|
2657
2657
|
|
|
2658
2658
|
|
|
2659
|
+
</dd>
|
|
2660
|
+
</dl>
|
|
2661
|
+
</details>
|
|
2662
|
+
|
|
2663
|
+
## Fhir2Omop
|
|
2664
|
+
<details><summary><code>client.fhir2Omop.<a href="/src/api/resources/fhir2Omop/client/Client.ts">create</a>({ ...params }) -> phenoml.CreateOmopResponse</code></summary>
|
|
2665
|
+
<dl>
|
|
2666
|
+
<dd>
|
|
2667
|
+
|
|
2668
|
+
#### 📝 Description
|
|
2669
|
+
|
|
2670
|
+
<dl>
|
|
2671
|
+
<dd>
|
|
2672
|
+
|
|
2673
|
+
<dl>
|
|
2674
|
+
<dd>
|
|
2675
|
+
|
|
2676
|
+
Shapes a FHIR R4 resource or Bundle into OMOP Common Data Model v5.4 rows
|
|
2677
|
+
(person, visit_occurrence, condition_occurrence, drug_exposure,
|
|
2678
|
+
procedure_occurrence, measurement, observation).
|
|
2679
|
+
|
|
2680
|
+
**This is a structural mapping (`mode: "structural"`).** Rows are
|
|
2681
|
+
structurally valid OMOP, but every clinical and source `concept_id` is `0`:
|
|
2682
|
+
the vocabulary crosswalk that assigns real OMOP `concept_id`s is a planned
|
|
2683
|
+
follow-up. Each `*_source_value` carries the verbatim FHIR coding
|
|
2684
|
+
(`system#code`), `*_type_concept_id` is set to `32817` (EHR), and the
|
|
2685
|
+
response `report` lists a standard-code *suggestion* for each source coding
|
|
2686
|
+
(already-standard, an unchecked normalization suggestion, or unmapped). Do
|
|
2687
|
+
not treat the output as analytically resolved OMOP until `concept_id`s are
|
|
2688
|
+
populated.
|
|
2689
|
+
|
|
2690
|
+
Medication codes are resolved whether they appear inline
|
|
2691
|
+
(`medicationCodeableConcept`) or via a `medicationReference` to a contained,
|
|
2692
|
+
relative (`Type/id`), or bundle-entry (`urn:uuid`) `Medication` resource.
|
|
2693
|
+
A medication with no usable code, resolvable reference, or display is
|
|
2694
|
+
reported under `scan_summary.dropped_resources` rather than emitted as a
|
|
2695
|
+
blank row. The bundle must contain at least one Patient resource.
|
|
2696
|
+
</dd>
|
|
2697
|
+
</dl>
|
|
2698
|
+
</dd>
|
|
2699
|
+
</dl>
|
|
2700
|
+
|
|
2701
|
+
#### 🔌 Usage
|
|
2702
|
+
|
|
2703
|
+
<dl>
|
|
2704
|
+
<dd>
|
|
2705
|
+
|
|
2706
|
+
<dl>
|
|
2707
|
+
<dd>
|
|
2708
|
+
|
|
2709
|
+
```typescript
|
|
2710
|
+
await client.fhir2Omop.create({
|
|
2711
|
+
fhir_resources: {
|
|
2712
|
+
"resourceType": "Bundle",
|
|
2713
|
+
"type": "collection",
|
|
2714
|
+
"entry": [
|
|
2715
|
+
{
|
|
2716
|
+
"resource": {
|
|
2717
|
+
"resourceType": "Patient",
|
|
2718
|
+
"id": "patient-1",
|
|
2719
|
+
"gender": "female",
|
|
2720
|
+
"birthDate": "1985-07-22"
|
|
2721
|
+
}
|
|
2722
|
+
},
|
|
2723
|
+
{
|
|
2724
|
+
"resource": {
|
|
2725
|
+
"resourceType": "Condition",
|
|
2726
|
+
"id": "condition-1",
|
|
2727
|
+
"subject": {
|
|
2728
|
+
"reference": "Patient/patient-1"
|
|
2729
|
+
},
|
|
2730
|
+
"code": {
|
|
2731
|
+
"coding": [
|
|
2732
|
+
{
|
|
2733
|
+
"system": "http://snomed.info/sct",
|
|
2734
|
+
"code": "44054006",
|
|
2735
|
+
"display": "Type 2 diabetes mellitus"
|
|
2736
|
+
}
|
|
2737
|
+
]
|
|
2738
|
+
},
|
|
2739
|
+
"onsetDateTime": "2024-01-15"
|
|
2740
|
+
}
|
|
2741
|
+
},
|
|
2742
|
+
{
|
|
2743
|
+
"resource": {
|
|
2744
|
+
"resourceType": "MedicationRequest",
|
|
2745
|
+
"id": "medreq-1",
|
|
2746
|
+
"status": "active",
|
|
2747
|
+
"subject": {
|
|
2748
|
+
"reference": "Patient/patient-1"
|
|
2749
|
+
},
|
|
2750
|
+
"medicationReference": {
|
|
2751
|
+
"reference": "#med0"
|
|
2752
|
+
},
|
|
2753
|
+
"authoredOn": "2024-01-16",
|
|
2754
|
+
"contained": [
|
|
2755
|
+
{
|
|
2756
|
+
"resourceType": "Medication",
|
|
2757
|
+
"id": "med0",
|
|
2758
|
+
"code": {
|
|
2759
|
+
"coding": [
|
|
2760
|
+
{
|
|
2761
|
+
"system": "http://www.nlm.nih.gov/research/umls/rxnorm",
|
|
2762
|
+
"code": "860975",
|
|
2763
|
+
"display": "metformin hydrochloride 500 MG"
|
|
2764
|
+
}
|
|
2765
|
+
]
|
|
2766
|
+
}
|
|
2767
|
+
}
|
|
2768
|
+
]
|
|
2769
|
+
}
|
|
2770
|
+
}
|
|
2771
|
+
]
|
|
2772
|
+
}
|
|
2773
|
+
});
|
|
2774
|
+
|
|
2775
|
+
```
|
|
2776
|
+
</dd>
|
|
2777
|
+
</dl>
|
|
2778
|
+
</dd>
|
|
2779
|
+
</dl>
|
|
2780
|
+
|
|
2781
|
+
#### ⚙️ Parameters
|
|
2782
|
+
|
|
2783
|
+
<dl>
|
|
2784
|
+
<dd>
|
|
2785
|
+
|
|
2786
|
+
<dl>
|
|
2787
|
+
<dd>
|
|
2788
|
+
|
|
2789
|
+
**request:** `phenoml.fhir2Omop.CreateOmopRequest`
|
|
2790
|
+
|
|
2791
|
+
</dd>
|
|
2792
|
+
</dl>
|
|
2793
|
+
|
|
2794
|
+
<dl>
|
|
2795
|
+
<dd>
|
|
2796
|
+
|
|
2797
|
+
**requestOptions:** `Fhir2OmopClient.RequestOptions`
|
|
2798
|
+
|
|
2799
|
+
</dd>
|
|
2800
|
+
</dl>
|
|
2801
|
+
</dd>
|
|
2802
|
+
</dl>
|
|
2803
|
+
|
|
2804
|
+
|
|
2659
2805
|
</dd>
|
|
2660
2806
|
</dl>
|
|
2661
2807
|
</details>
|