phenoml 17.2.0 → 17.4.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/api/resources/fhir2Omop/client/Client.d.ts +18 -21
- package/dist/cjs/api/resources/fhir2Omop/client/Client.js +20 -21
- package/dist/cjs/api/resources/fhir2Omop/errors/ServiceUnavailableError.d.ts +5 -0
- package/dist/cjs/api/resources/fhir2Omop/errors/ServiceUnavailableError.js +54 -0
- package/dist/cjs/api/resources/fhir2Omop/errors/index.d.ts +1 -0
- package/dist/cjs/api/resources/fhir2Omop/errors/index.js +1 -0
- package/dist/cjs/api/resources/fhir2Omop/types/ConditionOccurrenceRow.d.ts +1 -0
- package/dist/cjs/api/resources/fhir2Omop/types/CreateOmopResponse.d.ts +10 -10
- package/dist/cjs/api/resources/fhir2Omop/types/DrugExposureRow.d.ts +1 -0
- package/dist/cjs/api/resources/fhir2Omop/types/MappingEntry.d.ts +35 -0
- package/dist/cjs/api/resources/fhir2Omop/types/MeasurementRow.d.ts +3 -0
- package/dist/cjs/api/resources/fhir2Omop/types/ObservationRow.d.ts +1 -0
- package/dist/cjs/api/resources/fhir2Omop/types/ProcedureOccurrenceRow.d.ts +1 -0
- package/dist/cjs/api/resources/fhir2Omop/types/Summary.d.ts +17 -0
- package/dist/cjs/api/resources/fhir2Omop/types/index.d.ts +2 -2
- package/dist/cjs/api/resources/fhir2Omop/types/index.js +2 -2
- package/dist/cjs/core/fetcher/signals.js +9 -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/api/resources/fhir2Omop/client/Client.d.mts +18 -21
- package/dist/esm/api/resources/fhir2Omop/client/Client.mjs +20 -21
- package/dist/esm/api/resources/fhir2Omop/errors/ServiceUnavailableError.d.mts +5 -0
- package/dist/esm/api/resources/fhir2Omop/errors/ServiceUnavailableError.mjs +17 -0
- package/dist/esm/api/resources/fhir2Omop/errors/index.d.mts +1 -0
- package/dist/esm/api/resources/fhir2Omop/errors/index.mjs +1 -0
- package/dist/esm/api/resources/fhir2Omop/types/ConditionOccurrenceRow.d.mts +1 -0
- package/dist/esm/api/resources/fhir2Omop/types/CreateOmopResponse.d.mts +10 -10
- package/dist/esm/api/resources/fhir2Omop/types/DrugExposureRow.d.mts +1 -0
- package/dist/esm/api/resources/fhir2Omop/types/MappingEntry.d.mts +35 -0
- package/dist/esm/api/resources/fhir2Omop/types/MeasurementRow.d.mts +3 -0
- package/dist/esm/api/resources/fhir2Omop/types/ObservationRow.d.mts +1 -0
- package/dist/esm/api/resources/fhir2Omop/types/ProcedureOccurrenceRow.d.mts +1 -0
- package/dist/esm/api/resources/fhir2Omop/types/Summary.d.mts +17 -0
- package/dist/esm/api/resources/fhir2Omop/types/index.d.mts +2 -2
- package/dist/esm/api/resources/fhir2Omop/types/index.mjs +2 -2
- package/dist/esm/core/fetcher/signals.mjs +9 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/openapi/openapi.json +82 -185
- package/package.json +1 -1
- package/reference.md +18 -22
- package/dist/cjs/api/resources/fhir2Omop/types/MappingReportEntry.d.ts +0 -32
- package/dist/cjs/api/resources/fhir2Omop/types/ScanSummary.d.ts +0 -41
- package/dist/esm/api/resources/fhir2Omop/types/MappingReportEntry.d.mts +0 -32
- package/dist/esm/api/resources/fhir2Omop/types/ScanSummary.d.mts +0 -41
- /package/dist/cjs/api/resources/fhir2Omop/types/{MappingReportEntry.js → MappingEntry.js} +0 -0
- /package/dist/cjs/api/resources/fhir2Omop/types/{ScanSummary.js → Summary.js} +0 -0
- /package/dist/esm/api/resources/fhir2Omop/types/{MappingReportEntry.mjs → MappingEntry.mjs} +0 -0
- /package/dist/esm/api/resources/fhir2Omop/types/{ScanSummary.mjs → Summary.mjs} +0 -0
|
@@ -6,6 +6,7 @@ export interface ConditionOccurrenceRow {
|
|
|
6
6
|
condition_start_datetime?: string | undefined;
|
|
7
7
|
condition_end_date?: string | undefined;
|
|
8
8
|
condition_type_concept_id?: number | undefined;
|
|
9
|
+
visit_occurrence_id?: number | undefined;
|
|
9
10
|
condition_source_value?: string | undefined;
|
|
10
11
|
condition_source_concept_id?: number | undefined;
|
|
11
12
|
condition_status_source_value?: string | undefined;
|
|
@@ -2,16 +2,16 @@ import type * as phenoml from "../../../index.mjs";
|
|
|
2
2
|
export interface CreateOmopResponse {
|
|
3
3
|
success?: boolean | undefined;
|
|
4
4
|
message?: string | undefined;
|
|
5
|
+
tables?: phenoml.fhir2Omop.OmopTables | undefined;
|
|
6
|
+
/** One entry per source coding (or one entry for a text-only resource with no coding), describing how it resolved and linking back to the row it produced. */
|
|
7
|
+
mappings?: phenoml.fhir2Omop.MappingEntry[] | undefined;
|
|
8
|
+
/** Resources that could not be shaped into an OMOP row (rather than emitted as blank rows). */
|
|
9
|
+
dropped?: phenoml.fhir2Omop.DroppedResource[] | undefined;
|
|
5
10
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* resolver is wired, not the path an individual coding took — per-coding
|
|
10
|
-
* degradation is surfaced in `scan_summary`, not the mode.
|
|
11
|
+
* The OMOP vocabulary release the clinical codes were resolved against
|
|
12
|
+
* (e.g. "v20240229"), for reproducibility. Present when at least one
|
|
13
|
+
* coded concept was resolved.
|
|
11
14
|
*/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
/** One Usagi-shaped entry per source coding routed through concept resolution. */
|
|
15
|
-
report?: phenoml.fhir2Omop.MappingReportEntry[] | undefined;
|
|
16
|
-
scan_summary?: phenoml.fhir2Omop.ScanSummary | undefined;
|
|
15
|
+
vocab_version?: string | undefined;
|
|
16
|
+
summary?: phenoml.fhir2Omop.Summary | undefined;
|
|
17
17
|
}
|
|
@@ -8,6 +8,7 @@ export interface DrugExposureRow {
|
|
|
8
8
|
drug_type_concept_id?: number | undefined;
|
|
9
9
|
stop_reason?: string | undefined;
|
|
10
10
|
sig?: string | undefined;
|
|
11
|
+
visit_occurrence_id?: number | undefined;
|
|
11
12
|
drug_source_value?: string | undefined;
|
|
12
13
|
drug_source_concept_id?: number | undefined;
|
|
13
14
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How one source coding (or a text-only resource's free text) resolved to an OMOP standard concept.
|
|
3
|
+
*/
|
|
4
|
+
export interface MappingEntry {
|
|
5
|
+
resource_type?: string | undefined;
|
|
6
|
+
resource_id?: string | undefined;
|
|
7
|
+
omop_table?: string | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* The id of the OMOP row this coding produced (e.g. `condition_occurrence_id`),
|
|
10
|
+
* within `omop_table`. A resource with multiple codings yields one entry
|
|
11
|
+
* per coding, all sharing this id.
|
|
12
|
+
*/
|
|
13
|
+
omop_id?: number | undefined;
|
|
14
|
+
source_system?: string | undefined;
|
|
15
|
+
source_code?: string | undefined;
|
|
16
|
+
source_name?: string | undefined;
|
|
17
|
+
target_vocabulary?: string | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* The standard concept's own code: the source code itself for an
|
|
20
|
+
* ALREADY_STANDARD row, the standard concept's code for a MAPPED row,
|
|
21
|
+
* or the suggested code for an UNCHECKED row. Omitted for UNMAPPED
|
|
22
|
+
* rows.
|
|
23
|
+
*/
|
|
24
|
+
target_code?: string | undefined;
|
|
25
|
+
target_name?: string | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* ALREADY_STANDARD (source coding is already a standard OMOP concept),
|
|
28
|
+
* MAPPED (source coding was mapped to a standard concept), UNCHECKED (a
|
|
29
|
+
* standard code was suggested — e.g. for a text-only resource — but not
|
|
30
|
+
* verified against the OMOP vocabulary, so `concept_id` stays `0`), or
|
|
31
|
+
* UNMAPPED (no standard concept found).
|
|
32
|
+
*/
|
|
33
|
+
mapping_status?: string | undefined;
|
|
34
|
+
note?: string | undefined;
|
|
35
|
+
}
|
|
@@ -6,10 +6,13 @@ export interface MeasurementRow {
|
|
|
6
6
|
measurement_datetime?: string | undefined;
|
|
7
7
|
measurement_type_concept_id?: number | undefined;
|
|
8
8
|
value_as_number?: number | undefined;
|
|
9
|
+
/** OMOP "Meas Value Operator" standard concept qualifying value_as_number (<, <=, >, >=), parsed from a numeric-string value or a FHIR valueQuantity.comparator. 0 when no operator (a bare number). */
|
|
10
|
+
operator_concept_id?: number | undefined;
|
|
9
11
|
value_as_concept_id?: number | undefined;
|
|
10
12
|
unit_concept_id?: number | undefined;
|
|
11
13
|
range_low?: number | undefined;
|
|
12
14
|
range_high?: number | undefined;
|
|
15
|
+
visit_occurrence_id?: number | undefined;
|
|
13
16
|
measurement_source_value?: string | undefined;
|
|
14
17
|
measurement_source_concept_id?: number | undefined;
|
|
15
18
|
unit_source_value?: string | undefined;
|
|
@@ -9,6 +9,7 @@ export interface ObservationRow {
|
|
|
9
9
|
value_as_string?: string | undefined;
|
|
10
10
|
value_as_concept_id?: number | undefined;
|
|
11
11
|
unit_concept_id?: number | undefined;
|
|
12
|
+
visit_occurrence_id?: number | undefined;
|
|
12
13
|
observation_source_value?: string | undefined;
|
|
13
14
|
observation_source_concept_id?: number | undefined;
|
|
14
15
|
unit_source_value?: string | undefined;
|
|
@@ -5,6 +5,7 @@ export interface ProcedureOccurrenceRow {
|
|
|
5
5
|
procedure_date?: string | undefined;
|
|
6
6
|
procedure_datetime?: string | undefined;
|
|
7
7
|
procedure_type_concept_id?: number | undefined;
|
|
8
|
+
visit_occurrence_id?: number | undefined;
|
|
8
9
|
procedure_source_value?: string | undefined;
|
|
9
10
|
procedure_source_concept_id?: number | undefined;
|
|
10
11
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The request's data-quality headline: how the coded concepts split across
|
|
3
|
+
* resolution outcomes, and the share that was not already in a target
|
|
4
|
+
* standard vocabulary. Each coded resource is counted once (per resolved
|
|
5
|
+
* concept), even when it carried several codings — unlike `mappings`, which
|
|
6
|
+
* has one entry per coding.
|
|
7
|
+
*/
|
|
8
|
+
export interface Summary {
|
|
9
|
+
/** Coded concepts already a standard OMOP concept (ALREADY_STANDARD). */
|
|
10
|
+
codes_already_standard?: number | undefined;
|
|
11
|
+
/** Coded concepts mapped or suggested to a standard concept (MAPPED or UNCHECKED). */
|
|
12
|
+
codes_normalized?: number | undefined;
|
|
13
|
+
/** Coded concepts with no standard concept found (UNMAPPED). */
|
|
14
|
+
codes_unmapped?: number | undefined;
|
|
15
|
+
/** Share of coded concepts not already standard ((normalized + unmapped) / total). */
|
|
16
|
+
off_vocab_rate?: number | undefined;
|
|
17
|
+
}
|
|
@@ -2,11 +2,11 @@ export * from "./ConditionOccurrenceRow.mjs";
|
|
|
2
2
|
export * from "./CreateOmopResponse.mjs";
|
|
3
3
|
export * from "./DroppedResource.mjs";
|
|
4
4
|
export * from "./DrugExposureRow.mjs";
|
|
5
|
-
export * from "./
|
|
5
|
+
export * from "./MappingEntry.mjs";
|
|
6
6
|
export * from "./MeasurementRow.mjs";
|
|
7
7
|
export * from "./ObservationRow.mjs";
|
|
8
8
|
export * from "./OmopTables.mjs";
|
|
9
9
|
export * from "./PersonRow.mjs";
|
|
10
10
|
export * from "./ProcedureOccurrenceRow.mjs";
|
|
11
|
-
export * from "./
|
|
11
|
+
export * from "./Summary.mjs";
|
|
12
12
|
export * from "./VisitOccurrenceRow.mjs";
|
|
@@ -2,11 +2,11 @@ export * from "./ConditionOccurrenceRow.mjs";
|
|
|
2
2
|
export * from "./CreateOmopResponse.mjs";
|
|
3
3
|
export * from "./DroppedResource.mjs";
|
|
4
4
|
export * from "./DrugExposureRow.mjs";
|
|
5
|
-
export * from "./
|
|
5
|
+
export * from "./MappingEntry.mjs";
|
|
6
6
|
export * from "./MeasurementRow.mjs";
|
|
7
7
|
export * from "./ObservationRow.mjs";
|
|
8
8
|
export * from "./OmopTables.mjs";
|
|
9
9
|
export * from "./PersonRow.mjs";
|
|
10
10
|
export * from "./ProcedureOccurrenceRow.mjs";
|
|
11
|
-
export * from "./
|
|
11
|
+
export * from "./Summary.mjs";
|
|
12
12
|
export * from "./VisitOccurrenceRow.mjs";
|
|
@@ -10,11 +10,19 @@ export function anySignal(...args) {
|
|
|
10
10
|
for (const signal of signals) {
|
|
11
11
|
if (signal.aborted) {
|
|
12
12
|
controller.abort(signal === null || signal === void 0 ? void 0 : signal.reason);
|
|
13
|
-
|
|
13
|
+
return controller.signal;
|
|
14
14
|
}
|
|
15
15
|
signal.addEventListener("abort", () => controller.abort(signal === null || signal === void 0 ? void 0 : signal.reason), {
|
|
16
16
|
signal: controller.signal,
|
|
17
17
|
});
|
|
18
|
+
// Re-check after adding listener: the signal may have aborted
|
|
19
|
+
// between the initial `signal.aborted` check and the `addEventListener`
|
|
20
|
+
// call above. If it did, the abort event was already dispatched and
|
|
21
|
+
// the listener will never fire — we must manually abort.
|
|
22
|
+
if (signal.aborted) {
|
|
23
|
+
controller.abort(signal === null || signal === void 0 ? void 0 : signal.reason);
|
|
24
|
+
return controller.signal;
|
|
25
|
+
}
|
|
18
26
|
}
|
|
19
27
|
return controller.signal;
|
|
20
28
|
}
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "17.
|
|
1
|
+
export declare const SDK_VERSION = "17.4.0";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "17.
|
|
1
|
+
export const SDK_VERSION = "17.4.0";
|
package/openapi/openapi.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"openapi": "3.0.3",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "Phenoml API",
|
|
5
|
-
"version": "
|
|
5
|
+
"version": "788cec0a9a7651caf2b106634631d487dfa16704"
|
|
6
6
|
},
|
|
7
7
|
"x-services": [
|
|
8
8
|
{
|
|
@@ -3021,7 +3021,7 @@
|
|
|
3021
3021
|
"post": {
|
|
3022
3022
|
"operationId": "fhir2omop_create",
|
|
3023
3023
|
"summary": "Map FHIR resources to OMOP CDM v5.4",
|
|
3024
|
-
"description": "
|
|
3024
|
+
"description": "Maps a FHIR R4 resource or Bundle into OMOP Common Data Model v5.4 rows\n(person, visit_occurrence, condition_occurrence, drug_exposure,\nprocedure_occurrence, measurement, observation).\n\nEach resource's primary clinical coding is resolved to a standard OMOP\n`concept_id`. Alongside the OMOP rows grouped by table (`tables`), the\nresponse carries `mappings` (how each source coding resolved, linked back\nto the row it produced), `dropped` (resources that could not be shaped\ninto a row), `vocab_version` (the OMOP vocabulary release codes were\nresolved against), and a small `summary` of the resolution outcomes.\n\nA `concept_id` of `0` is reported, not omitted (OMOP \"no matching\nconcept\" semantics): it covers both a coding with no standard match\n(`UNMAPPED`) and an unverified suggestion for a text-only resource\n(`UNCHECKED`). Only the primary clinical coding is resolved, so\n`gender`/`race`/`ethnicity`/`visit`/`value`/`unit` `concept_id`s are\nalways `0`; the one populated non-resolved concept is measurement\n`operator_concept_id`, set from a value comparator (`<`, `<=`, `>`, `>=`)\nrather than the resolver. Each `*_source_value` carries the verbatim FHIR\ncoding (`system#code`), and `*_type_concept_id` is set to `32817` (EHR).\n\nMedication codes are resolved whether they appear inline\n(`medicationCodeableConcept`) or via a `medicationReference` to a contained,\nrelative (`Type/id`), or bundle-entry (`urn:uuid`) `Medication` resource.\nResources that cannot be shaped into a row \u2014 a medication with no usable\ncode, resolvable reference, or display, or any clinical resource whose\nsubject/patient reference cannot be tied to a person \u2014 are reported under\n`dropped` rather than emitted as blank rows. The\nbundle must contain at least one Patient resource.\n",
|
|
3025
3025
|
"requestBody": {
|
|
3026
3026
|
"required": true,
|
|
3027
3027
|
"content": {
|
|
@@ -3111,13 +3111,12 @@
|
|
|
3111
3111
|
"$ref": "#/components/schemas/fhir2omop_CreateOmopResponse"
|
|
3112
3112
|
},
|
|
3113
3113
|
"examples": {
|
|
3114
|
-
"
|
|
3115
|
-
"summary": "
|
|
3116
|
-
"description": "
|
|
3114
|
+
"mapping_result": {
|
|
3115
|
+
"summary": "Mapping result",
|
|
3116
|
+
"description": "The example bundle mapped to OMOP. Both source codes are already\nstandard, so each clinical row carries its own OMOP `concept_id`\nwith `ALREADY_STANDARD` status and a `target_code` equal to the\nsource code. Illustrative `concept_id` values.\n",
|
|
3117
3117
|
"value": {
|
|
3118
3118
|
"success": true,
|
|
3119
|
-
"message": "FHIR resources mapped to OMOP CDM v5.4
|
|
3120
|
-
"mode": "resolved",
|
|
3119
|
+
"message": "FHIR resources mapped to OMOP CDM v5.4",
|
|
3121
3120
|
"tables": {
|
|
3122
3121
|
"person": [
|
|
3123
3122
|
{
|
|
@@ -3158,105 +3157,12 @@
|
|
|
3158
3157
|
}
|
|
3159
3158
|
]
|
|
3160
3159
|
},
|
|
3161
|
-
"
|
|
3162
|
-
{
|
|
3163
|
-
"resource_type": "Condition",
|
|
3164
|
-
"resource_id": "condition-1",
|
|
3165
|
-
"omop_table": "condition_occurrence",
|
|
3166
|
-
"source_system": "http://snomed.info/sct",
|
|
3167
|
-
"source_code": "44054006",
|
|
3168
|
-
"source_name": "Type 2 diabetes mellitus",
|
|
3169
|
-
"target_vocabulary": "SNOMED",
|
|
3170
|
-
"target_name": "Type 2 diabetes mellitus",
|
|
3171
|
-
"mapping_status": "ALREADY_STANDARD"
|
|
3172
|
-
},
|
|
3173
|
-
{
|
|
3174
|
-
"resource_type": "MedicationRequest",
|
|
3175
|
-
"resource_id": "medreq-1",
|
|
3176
|
-
"omop_table": "drug_exposure",
|
|
3177
|
-
"source_system": "http://www.nlm.nih.gov/research/umls/rxnorm",
|
|
3178
|
-
"source_code": "860975",
|
|
3179
|
-
"source_name": "metformin hydrochloride 500 MG",
|
|
3180
|
-
"target_vocabulary": "RXNORM",
|
|
3181
|
-
"target_name": "metformin hydrochloride 500 MG",
|
|
3182
|
-
"mapping_status": "ALREADY_STANDARD"
|
|
3183
|
-
}
|
|
3184
|
-
],
|
|
3185
|
-
"scan_summary": {
|
|
3186
|
-
"total_resources": 3,
|
|
3187
|
-
"resource_counts": {
|
|
3188
|
-
"Patient": 1,
|
|
3189
|
-
"Condition": 1,
|
|
3190
|
-
"MedicationRequest": 1
|
|
3191
|
-
},
|
|
3192
|
-
"tables_populated": {
|
|
3193
|
-
"person": 1,
|
|
3194
|
-
"condition_occurrence": 1,
|
|
3195
|
-
"drug_exposure": 1
|
|
3196
|
-
},
|
|
3197
|
-
"coding_systems": {
|
|
3198
|
-
"http://snomed.info/sct": 1,
|
|
3199
|
-
"http://www.nlm.nih.gov/research/umls/rxnorm": 1
|
|
3200
|
-
},
|
|
3201
|
-
"codes_already_standard": 2,
|
|
3202
|
-
"codes_normalized": 0,
|
|
3203
|
-
"codes_unmapped": 0,
|
|
3204
|
-
"off_vocab_rate": 0,
|
|
3205
|
-
"resolved_vocab_version": "v20240229"
|
|
3206
|
-
}
|
|
3207
|
-
}
|
|
3208
|
-
},
|
|
3209
|
-
"structural_mapping": {
|
|
3210
|
-
"summary": "Structural mapping result (fallback / no resolver configured)",
|
|
3211
|
-
"value": {
|
|
3212
|
-
"success": true,
|
|
3213
|
-
"message": "FHIR resources mapped to OMOP CDM v5.4 (structural; concept_ids pending vocabulary crosswalk)",
|
|
3214
|
-
"mode": "structural",
|
|
3215
|
-
"tables": {
|
|
3216
|
-
"person": [
|
|
3217
|
-
{
|
|
3218
|
-
"person_id": 1,
|
|
3219
|
-
"gender_concept_id": 0,
|
|
3220
|
-
"year_of_birth": 1985,
|
|
3221
|
-
"month_of_birth": 7,
|
|
3222
|
-
"day_of_birth": 22,
|
|
3223
|
-
"birth_datetime": "1985-07-22",
|
|
3224
|
-
"race_concept_id": 0,
|
|
3225
|
-
"ethnicity_concept_id": 0,
|
|
3226
|
-
"person_source_value": "patient-1",
|
|
3227
|
-
"gender_source_value": "female"
|
|
3228
|
-
}
|
|
3229
|
-
],
|
|
3230
|
-
"condition_occurrence": [
|
|
3231
|
-
{
|
|
3232
|
-
"condition_occurrence_id": 1,
|
|
3233
|
-
"person_id": 1,
|
|
3234
|
-
"condition_concept_id": 0,
|
|
3235
|
-
"condition_start_date": "2024-01-15",
|
|
3236
|
-
"condition_start_datetime": "2024-01-15",
|
|
3237
|
-
"condition_type_concept_id": 32817,
|
|
3238
|
-
"condition_source_value": "http://snomed.info/sct#44054006",
|
|
3239
|
-
"condition_source_concept_id": 0
|
|
3240
|
-
}
|
|
3241
|
-
],
|
|
3242
|
-
"drug_exposure": [
|
|
3243
|
-
{
|
|
3244
|
-
"drug_exposure_id": 1,
|
|
3245
|
-
"person_id": 1,
|
|
3246
|
-
"drug_concept_id": 0,
|
|
3247
|
-
"drug_exposure_start_date": "2024-01-16",
|
|
3248
|
-
"drug_exposure_start_datetime": "2024-01-16",
|
|
3249
|
-
"drug_type_concept_id": 32817,
|
|
3250
|
-
"drug_source_value": "http://www.nlm.nih.gov/research/umls/rxnorm#860975",
|
|
3251
|
-
"drug_source_concept_id": 0
|
|
3252
|
-
}
|
|
3253
|
-
]
|
|
3254
|
-
},
|
|
3255
|
-
"report": [
|
|
3160
|
+
"mappings": [
|
|
3256
3161
|
{
|
|
3257
3162
|
"resource_type": "Condition",
|
|
3258
3163
|
"resource_id": "condition-1",
|
|
3259
3164
|
"omop_table": "condition_occurrence",
|
|
3165
|
+
"omop_id": 1,
|
|
3260
3166
|
"source_system": "http://snomed.info/sct",
|
|
3261
3167
|
"source_code": "44054006",
|
|
3262
3168
|
"source_name": "Type 2 diabetes mellitus",
|
|
@@ -3269,6 +3175,7 @@
|
|
|
3269
3175
|
"resource_type": "MedicationRequest",
|
|
3270
3176
|
"resource_id": "medreq-1",
|
|
3271
3177
|
"omop_table": "drug_exposure",
|
|
3178
|
+
"omop_id": 1,
|
|
3272
3179
|
"source_system": "http://www.nlm.nih.gov/research/umls/rxnorm",
|
|
3273
3180
|
"source_code": "860975",
|
|
3274
3181
|
"source_name": "metformin hydrochloride 500 MG",
|
|
@@ -3278,22 +3185,8 @@
|
|
|
3278
3185
|
"mapping_status": "ALREADY_STANDARD"
|
|
3279
3186
|
}
|
|
3280
3187
|
],
|
|
3281
|
-
"
|
|
3282
|
-
|
|
3283
|
-
"resource_counts": {
|
|
3284
|
-
"Patient": 1,
|
|
3285
|
-
"Condition": 1,
|
|
3286
|
-
"MedicationRequest": 1
|
|
3287
|
-
},
|
|
3288
|
-
"tables_populated": {
|
|
3289
|
-
"person": 1,
|
|
3290
|
-
"condition_occurrence": 1,
|
|
3291
|
-
"drug_exposure": 1
|
|
3292
|
-
},
|
|
3293
|
-
"coding_systems": {
|
|
3294
|
-
"http://snomed.info/sct": 1,
|
|
3295
|
-
"http://www.nlm.nih.gov/research/umls/rxnorm": 1
|
|
3296
|
-
},
|
|
3188
|
+
"vocab_version": "v20240229",
|
|
3189
|
+
"summary": {
|
|
3297
3190
|
"codes_already_standard": 2,
|
|
3298
3191
|
"codes_normalized": 0,
|
|
3299
3192
|
"codes_unmapped": 0,
|
|
@@ -3306,7 +3199,7 @@
|
|
|
3306
3199
|
}
|
|
3307
3200
|
},
|
|
3308
3201
|
"400": {
|
|
3309
|
-
"description": "Bad request - invalid input. Possible reasons:\n- Invalid FHIR input (
|
|
3202
|
+
"description": "Bad request - invalid input. Possible reasons:\n- Missing or malformed request body (no `fhir_resources`)\n- Invalid FHIR input (non-Bundle/non-resource payload)\n- No Patient resource found (OMOP requires at least one person)\n",
|
|
3310
3203
|
"content": {
|
|
3311
3204
|
"application/json": {
|
|
3312
3205
|
"schema": {
|
|
@@ -3320,6 +3213,16 @@
|
|
|
3320
3213
|
},
|
|
3321
3214
|
"500": {
|
|
3322
3215
|
"description": "Internal server error"
|
|
3216
|
+
},
|
|
3217
|
+
"503": {
|
|
3218
|
+
"description": "Service unavailable due to a server configuration error. No rows are\nreturned.\n",
|
|
3219
|
+
"content": {
|
|
3220
|
+
"application/json": {
|
|
3221
|
+
"schema": {
|
|
3222
|
+
"$ref": "#/components/schemas/fhir2omop_CreateOmopResponse"
|
|
3223
|
+
}
|
|
3224
|
+
}
|
|
3225
|
+
}
|
|
3323
3226
|
}
|
|
3324
3227
|
},
|
|
3325
3228
|
"security": [
|
|
@@ -8654,22 +8557,29 @@
|
|
|
8654
8557
|
"message": {
|
|
8655
8558
|
"type": "string"
|
|
8656
8559
|
},
|
|
8657
|
-
"mode": {
|
|
8658
|
-
"type": "string",
|
|
8659
|
-
"description": "Resolution mode. `resolved` (default) means clinical `concept_id`s were\nfilled by the concept-resolver service; `structural` means no resolver\nwas configured, so all clinical `concept_id`s are `0`. Reflects which\nresolver is wired, not the path an individual coding took \u2014 per-coding\ndegradation is surfaced in `scan_summary`, not the mode.\n"
|
|
8660
|
-
},
|
|
8661
8560
|
"tables": {
|
|
8662
8561
|
"$ref": "#/components/schemas/fhir2omop_OmopTables"
|
|
8663
8562
|
},
|
|
8664
|
-
"
|
|
8563
|
+
"mappings": {
|
|
8564
|
+
"type": "array",
|
|
8565
|
+
"description": "One entry per source coding (or one entry for a text-only resource with no coding), describing how it resolved and linking back to the row it produced.",
|
|
8566
|
+
"items": {
|
|
8567
|
+
"$ref": "#/components/schemas/fhir2omop_MappingEntry"
|
|
8568
|
+
}
|
|
8569
|
+
},
|
|
8570
|
+
"dropped": {
|
|
8665
8571
|
"type": "array",
|
|
8666
|
-
"description": "
|
|
8572
|
+
"description": "Resources that could not be shaped into an OMOP row (rather than emitted as blank rows).",
|
|
8667
8573
|
"items": {
|
|
8668
|
-
"$ref": "#/components/schemas/
|
|
8574
|
+
"$ref": "#/components/schemas/fhir2omop_DroppedResource"
|
|
8669
8575
|
}
|
|
8670
8576
|
},
|
|
8671
|
-
"
|
|
8672
|
-
"
|
|
8577
|
+
"vocab_version": {
|
|
8578
|
+
"type": "string",
|
|
8579
|
+
"description": "The OMOP vocabulary release the clinical codes were resolved against\n(e.g. \"v20240229\"), for reproducibility. Present when at least one\ncoded concept was resolved.\n"
|
|
8580
|
+
},
|
|
8581
|
+
"summary": {
|
|
8582
|
+
"$ref": "#/components/schemas/fhir2omop_Summary"
|
|
8673
8583
|
}
|
|
8674
8584
|
}
|
|
8675
8585
|
},
|
|
@@ -8830,6 +8740,10 @@
|
|
|
8830
8740
|
"type": "integer",
|
|
8831
8741
|
"format": "int64"
|
|
8832
8742
|
},
|
|
8743
|
+
"visit_occurrence_id": {
|
|
8744
|
+
"type": "integer",
|
|
8745
|
+
"format": "int64"
|
|
8746
|
+
},
|
|
8833
8747
|
"condition_source_value": {
|
|
8834
8748
|
"type": "string"
|
|
8835
8749
|
},
|
|
@@ -8876,6 +8790,10 @@
|
|
|
8876
8790
|
"sig": {
|
|
8877
8791
|
"type": "string"
|
|
8878
8792
|
},
|
|
8793
|
+
"visit_occurrence_id": {
|
|
8794
|
+
"type": "integer",
|
|
8795
|
+
"format": "int64"
|
|
8796
|
+
},
|
|
8879
8797
|
"drug_source_value": {
|
|
8880
8798
|
"type": "string"
|
|
8881
8799
|
},
|
|
@@ -8910,6 +8828,10 @@
|
|
|
8910
8828
|
"type": "integer",
|
|
8911
8829
|
"format": "int64"
|
|
8912
8830
|
},
|
|
8831
|
+
"visit_occurrence_id": {
|
|
8832
|
+
"type": "integer",
|
|
8833
|
+
"format": "int64"
|
|
8834
|
+
},
|
|
8913
8835
|
"procedure_source_value": {
|
|
8914
8836
|
"type": "string"
|
|
8915
8837
|
},
|
|
@@ -8948,6 +8870,11 @@
|
|
|
8948
8870
|
"type": "number",
|
|
8949
8871
|
"format": "double"
|
|
8950
8872
|
},
|
|
8873
|
+
"operator_concept_id": {
|
|
8874
|
+
"type": "integer",
|
|
8875
|
+
"format": "int64",
|
|
8876
|
+
"description": "OMOP \"Meas Value Operator\" standard concept qualifying value_as_number (<, <=, >, >=), parsed from a numeric-string value or a FHIR valueQuantity.comparator. 0 when no operator (a bare number)."
|
|
8877
|
+
},
|
|
8951
8878
|
"value_as_concept_id": {
|
|
8952
8879
|
"type": "integer",
|
|
8953
8880
|
"format": "int64"
|
|
@@ -8964,6 +8891,10 @@
|
|
|
8964
8891
|
"type": "number",
|
|
8965
8892
|
"format": "double"
|
|
8966
8893
|
},
|
|
8894
|
+
"visit_occurrence_id": {
|
|
8895
|
+
"type": "integer",
|
|
8896
|
+
"format": "int64"
|
|
8897
|
+
},
|
|
8967
8898
|
"measurement_source_value": {
|
|
8968
8899
|
"type": "string"
|
|
8969
8900
|
},
|
|
@@ -9019,6 +8950,10 @@
|
|
|
9019
8950
|
"type": "integer",
|
|
9020
8951
|
"format": "int64"
|
|
9021
8952
|
},
|
|
8953
|
+
"visit_occurrence_id": {
|
|
8954
|
+
"type": "integer",
|
|
8955
|
+
"format": "int64"
|
|
8956
|
+
},
|
|
9022
8957
|
"observation_source_value": {
|
|
9023
8958
|
"type": "string"
|
|
9024
8959
|
},
|
|
@@ -9034,9 +8969,9 @@
|
|
|
9034
8969
|
}
|
|
9035
8970
|
}
|
|
9036
8971
|
},
|
|
9037
|
-
"
|
|
8972
|
+
"fhir2omop_MappingEntry": {
|
|
9038
8973
|
"type": "object",
|
|
9039
|
-
"description": "
|
|
8974
|
+
"description": "How one source coding (or a text-only resource's free text) resolved to an OMOP standard concept.",
|
|
9040
8975
|
"properties": {
|
|
9041
8976
|
"resource_type": {
|
|
9042
8977
|
"type": "string"
|
|
@@ -9047,6 +8982,11 @@
|
|
|
9047
8982
|
"omop_table": {
|
|
9048
8983
|
"type": "string"
|
|
9049
8984
|
},
|
|
8985
|
+
"omop_id": {
|
|
8986
|
+
"type": "integer",
|
|
8987
|
+
"format": "int64",
|
|
8988
|
+
"description": "The id of the OMOP row this coding produced (e.g. `condition_occurrence_id`),\nwithin `omop_table`. A resource with multiple codings yields one entry\nper coding, all sharing this id.\n"
|
|
8989
|
+
},
|
|
9050
8990
|
"source_system": {
|
|
9051
8991
|
"type": "string"
|
|
9052
8992
|
},
|
|
@@ -9061,83 +9001,40 @@
|
|
|
9061
9001
|
},
|
|
9062
9002
|
"target_code": {
|
|
9063
9003
|
"type": "string",
|
|
9064
|
-
"description": "
|
|
9004
|
+
"description": "The standard concept's own code: the source code itself for an\nALREADY_STANDARD row, the standard concept's code for a MAPPED row,\nor the suggested code for an UNCHECKED row. Omitted for UNMAPPED\nrows.\n"
|
|
9065
9005
|
},
|
|
9066
9006
|
"target_name": {
|
|
9067
9007
|
"type": "string"
|
|
9068
9008
|
},
|
|
9069
9009
|
"mapping_status": {
|
|
9070
9010
|
"type": "string",
|
|
9071
|
-
"description": "ALREADY_STANDARD (source
|
|
9011
|
+
"description": "ALREADY_STANDARD (source coding is already a standard OMOP concept),\nMAPPED (source coding was mapped to a standard concept), UNCHECKED (a\nstandard code was suggested \u2014 e.g. for a text-only resource \u2014 but not\nverified against the OMOP vocabulary, so `concept_id` stays `0`), or\nUNMAPPED (no standard concept found).\n"
|
|
9072
9012
|
},
|
|
9073
9013
|
"note": {
|
|
9074
9014
|
"type": "string"
|
|
9075
9015
|
}
|
|
9076
9016
|
}
|
|
9077
9017
|
},
|
|
9078
|
-
"
|
|
9018
|
+
"fhir2omop_Summary": {
|
|
9079
9019
|
"type": "object",
|
|
9080
|
-
"description": "
|
|
9020
|
+
"description": "The request's data-quality headline: how the coded concepts split across\nresolution outcomes, and the share that was not already in a target\nstandard vocabulary. Each coded resource is counted once (per resolved\nconcept), even when it carried several codings \u2014 unlike `mappings`, which\nhas one entry per coding.\n",
|
|
9081
9021
|
"properties": {
|
|
9082
|
-
"total_resources": {
|
|
9083
|
-
"type": "integer"
|
|
9084
|
-
},
|
|
9085
|
-
"resource_counts": {
|
|
9086
|
-
"type": "object",
|
|
9087
|
-
"additionalProperties": {
|
|
9088
|
-
"type": "integer"
|
|
9089
|
-
}
|
|
9090
|
-
},
|
|
9091
|
-
"tables_populated": {
|
|
9092
|
-
"type": "object",
|
|
9093
|
-
"additionalProperties": {
|
|
9094
|
-
"type": "integer"
|
|
9095
|
-
}
|
|
9096
|
-
},
|
|
9097
|
-
"coding_systems": {
|
|
9098
|
-
"type": "object",
|
|
9099
|
-
"additionalProperties": {
|
|
9100
|
-
"type": "integer"
|
|
9101
|
-
}
|
|
9102
|
-
},
|
|
9103
9022
|
"codes_already_standard": {
|
|
9104
|
-
"type": "integer"
|
|
9023
|
+
"type": "integer",
|
|
9024
|
+
"description": "Coded concepts already a standard OMOP concept (ALREADY_STANDARD)."
|
|
9105
9025
|
},
|
|
9106
9026
|
"codes_normalized": {
|
|
9107
|
-
"type": "integer"
|
|
9027
|
+
"type": "integer",
|
|
9028
|
+
"description": "Coded concepts mapped or suggested to a standard concept (MAPPED or UNCHECKED)."
|
|
9108
9029
|
},
|
|
9109
9030
|
"codes_unmapped": {
|
|
9110
|
-
"type": "integer"
|
|
9031
|
+
"type": "integer",
|
|
9032
|
+
"description": "Coded concepts with no standard concept found (UNMAPPED)."
|
|
9111
9033
|
},
|
|
9112
9034
|
"off_vocab_rate": {
|
|
9113
9035
|
"type": "number",
|
|
9114
|
-
"format": "double"
|
|
9115
|
-
|
|
9116
|
-
"dropped_resources": {
|
|
9117
|
-
"type": "array",
|
|
9118
|
-
"items": {
|
|
9119
|
-
"$ref": "#/components/schemas/fhir2omop_DroppedResource"
|
|
9120
|
-
}
|
|
9121
|
-
},
|
|
9122
|
-
"resolved_vocab_version": {
|
|
9123
|
-
"type": "string",
|
|
9124
|
-
"description": "OMOP vocabulary release the resolver mapped against (e.g. \"v20240229\").\nResolved mode only; empty when no coded concept reached the service.\n"
|
|
9125
|
-
},
|
|
9126
|
-
"concept_resolver_note": {
|
|
9127
|
-
"type": "string",
|
|
9128
|
-
"description": "Set when concept resolution was degraded \u2014 the resolver was unavailable\nfor one or more codings, whose `concept_id`s fell back to the structural\n(construe) tier. Empty when resolution was clean.\n"
|
|
9129
|
-
},
|
|
9130
|
-
"concepts_bridged": {
|
|
9131
|
-
"type": "integer",
|
|
9132
|
-
"description": "Count of `concept_id`s chosen via the lower-confidence UMLS-CUI bridge\n(no direct OMOP crosswalk existed). Resolved mode only.\n"
|
|
9133
|
-
},
|
|
9134
|
-
"concept_candidates_truncated": {
|
|
9135
|
-
"type": "integer",
|
|
9136
|
-
"description": "Count of codings whose candidate list the resolver capped, so the best\nconcept may not have been among those returned.\n"
|
|
9137
|
-
},
|
|
9138
|
-
"construe_resolutions": {
|
|
9139
|
-
"type": "integer",
|
|
9140
|
-
"description": "Count of codings resolved via the construe ML extractor \u2014 the text-only\nor availability fallback path. A non-zero value bills the construe tier.\n"
|
|
9036
|
+
"format": "double",
|
|
9037
|
+
"description": "Share of coded concepts not already standard ((normalized + unmapped) / total)."
|
|
9141
9038
|
}
|
|
9142
9039
|
}
|
|
9143
9040
|
},
|