phenoml 17.0.1 → 17.2.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 +123 -0
- package/dist/cjs/api/resources/fhir2Omop/client/Client.js +211 -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 +17 -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 +32 -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 +41 -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 +123 -0
- package/dist/esm/api/resources/fhir2Omop/client/Client.mjs +174 -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 +17 -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 +32 -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 +41 -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 +844 -1
- package/package.json +15 -4
- package/reference.md +159 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "phenoml",
|
|
3
|
-
"version": "17.0
|
|
3
|
+
"version": "17.2.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,165 @@ 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
|
+
**Two resolution modes, reported in `mode`.** `mode` reflects which
|
|
2681
|
+
resolver is wired, not the path an individual coding took. With a
|
|
2682
|
+
concept-resolver configured (the default), `mode` is `"resolved"` and the
|
|
2683
|
+
resource's primary clinical coding is resolved to a real OMOP `concept_id`;
|
|
2684
|
+
with no resolver configured, `mode` is `"structural"` and every clinical
|
|
2685
|
+
and source `concept_id` is `0`. In `"resolved"` mode individual codings can
|
|
2686
|
+
still land at `concept_id` `0` without changing the mode: a coding the
|
|
2687
|
+
service finds no match for is `UNMAPPED`, and a coding that fell back to the
|
|
2688
|
+
structural tier (the resolver was briefly unavailable, or the resource was
|
|
2689
|
+
text-only) is surfaced in `scan_summary` (`concept_resolver_note`,
|
|
2690
|
+
`construe_resolutions`). A `concept_id` of `0` is "no matching concept" per
|
|
2691
|
+
OMOP semantics, deliberately not omitted. Only the primary clinical coding
|
|
2692
|
+
is resolved — `gender`/`race`/`ethnicity`/`visit`/`value`/`unit`
|
|
2693
|
+
`concept_id`s are always `0`.
|
|
2694
|
+
|
|
2695
|
+
In every mode each `*_source_value` carries the verbatim FHIR coding
|
|
2696
|
+
(`system#code`), `*_type_concept_id` is set to `32817` (EHR), and the
|
|
2697
|
+
response `report` lists one Usagi-shaped entry per source coding describing
|
|
2698
|
+
how it resolved (`ALREADY_STANDARD`, `MAPPED`, an `UNCHECKED` suggestion,
|
|
2699
|
+
or `UNMAPPED`).
|
|
2700
|
+
|
|
2701
|
+
Medication codes are resolved whether they appear inline
|
|
2702
|
+
(`medicationCodeableConcept`) or via a `medicationReference` to a contained,
|
|
2703
|
+
relative (`Type/id`), or bundle-entry (`urn:uuid`) `Medication` resource.
|
|
2704
|
+
Resources that cannot be shaped into a row — a medication with no usable
|
|
2705
|
+
code, resolvable reference, or display, or any clinical resource whose
|
|
2706
|
+
subject/patient reference cannot be tied to a person — are reported under
|
|
2707
|
+
`scan_summary.dropped_resources` rather than emitted as blank rows. The
|
|
2708
|
+
bundle must contain at least one Patient resource.
|
|
2709
|
+
</dd>
|
|
2710
|
+
</dl>
|
|
2711
|
+
</dd>
|
|
2712
|
+
</dl>
|
|
2713
|
+
|
|
2714
|
+
#### 🔌 Usage
|
|
2715
|
+
|
|
2716
|
+
<dl>
|
|
2717
|
+
<dd>
|
|
2718
|
+
|
|
2719
|
+
<dl>
|
|
2720
|
+
<dd>
|
|
2721
|
+
|
|
2722
|
+
```typescript
|
|
2723
|
+
await client.fhir2Omop.create({
|
|
2724
|
+
fhir_resources: {
|
|
2725
|
+
"resourceType": "Bundle",
|
|
2726
|
+
"type": "collection",
|
|
2727
|
+
"entry": [
|
|
2728
|
+
{
|
|
2729
|
+
"resource": {
|
|
2730
|
+
"resourceType": "Patient",
|
|
2731
|
+
"id": "patient-1",
|
|
2732
|
+
"gender": "female",
|
|
2733
|
+
"birthDate": "1985-07-22"
|
|
2734
|
+
}
|
|
2735
|
+
},
|
|
2736
|
+
{
|
|
2737
|
+
"resource": {
|
|
2738
|
+
"resourceType": "Condition",
|
|
2739
|
+
"id": "condition-1",
|
|
2740
|
+
"subject": {
|
|
2741
|
+
"reference": "Patient/patient-1"
|
|
2742
|
+
},
|
|
2743
|
+
"code": {
|
|
2744
|
+
"coding": [
|
|
2745
|
+
{
|
|
2746
|
+
"system": "http://snomed.info/sct",
|
|
2747
|
+
"code": "44054006",
|
|
2748
|
+
"display": "Type 2 diabetes mellitus"
|
|
2749
|
+
}
|
|
2750
|
+
]
|
|
2751
|
+
},
|
|
2752
|
+
"onsetDateTime": "2024-01-15"
|
|
2753
|
+
}
|
|
2754
|
+
},
|
|
2755
|
+
{
|
|
2756
|
+
"resource": {
|
|
2757
|
+
"resourceType": "MedicationRequest",
|
|
2758
|
+
"id": "medreq-1",
|
|
2759
|
+
"status": "active",
|
|
2760
|
+
"subject": {
|
|
2761
|
+
"reference": "Patient/patient-1"
|
|
2762
|
+
},
|
|
2763
|
+
"medicationReference": {
|
|
2764
|
+
"reference": "#med0"
|
|
2765
|
+
},
|
|
2766
|
+
"authoredOn": "2024-01-16",
|
|
2767
|
+
"contained": [
|
|
2768
|
+
{
|
|
2769
|
+
"resourceType": "Medication",
|
|
2770
|
+
"id": "med0",
|
|
2771
|
+
"code": {
|
|
2772
|
+
"coding": [
|
|
2773
|
+
{
|
|
2774
|
+
"system": "http://www.nlm.nih.gov/research/umls/rxnorm",
|
|
2775
|
+
"code": "860975",
|
|
2776
|
+
"display": "metformin hydrochloride 500 MG"
|
|
2777
|
+
}
|
|
2778
|
+
]
|
|
2779
|
+
}
|
|
2780
|
+
}
|
|
2781
|
+
]
|
|
2782
|
+
}
|
|
2783
|
+
}
|
|
2784
|
+
]
|
|
2785
|
+
}
|
|
2786
|
+
});
|
|
2787
|
+
|
|
2788
|
+
```
|
|
2789
|
+
</dd>
|
|
2790
|
+
</dl>
|
|
2791
|
+
</dd>
|
|
2792
|
+
</dl>
|
|
2793
|
+
|
|
2794
|
+
#### ⚙️ Parameters
|
|
2795
|
+
|
|
2796
|
+
<dl>
|
|
2797
|
+
<dd>
|
|
2798
|
+
|
|
2799
|
+
<dl>
|
|
2800
|
+
<dd>
|
|
2801
|
+
|
|
2802
|
+
**request:** `phenoml.fhir2Omop.CreateOmopRequest`
|
|
2803
|
+
|
|
2804
|
+
</dd>
|
|
2805
|
+
</dl>
|
|
2806
|
+
|
|
2807
|
+
<dl>
|
|
2808
|
+
<dd>
|
|
2809
|
+
|
|
2810
|
+
**requestOptions:** `Fhir2OmopClient.RequestOptions`
|
|
2811
|
+
|
|
2812
|
+
</dd>
|
|
2813
|
+
</dl>
|
|
2814
|
+
</dd>
|
|
2815
|
+
</dl>
|
|
2816
|
+
|
|
2817
|
+
|
|
2659
2818
|
</dd>
|
|
2660
2819
|
</dl>
|
|
2661
2820
|
</details>
|