phenoml 17.3.0 → 17.5.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.
Files changed (31) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/fhir2Omop/client/Client.d.ts +8 -5
  3. package/dist/cjs/api/resources/fhir2Omop/client/Client.js +8 -5
  4. package/dist/cjs/api/resources/fhir2Omop/types/ConditionOccurrenceRow.d.ts +1 -0
  5. package/dist/cjs/api/resources/fhir2Omop/types/DrugExposureRow.d.ts +1 -0
  6. package/dist/cjs/api/resources/fhir2Omop/types/MappingEntry.d.ts +4 -6
  7. package/dist/cjs/api/resources/fhir2Omop/types/MeasurementRow.d.ts +3 -0
  8. package/dist/cjs/api/resources/fhir2Omop/types/ObservationRow.d.ts +1 -0
  9. package/dist/cjs/api/resources/fhir2Omop/types/ProcedureOccurrenceRow.d.ts +1 -0
  10. package/dist/cjs/api/resources/fhir2Omop/types/Summary.d.ts +6 -4
  11. package/dist/cjs/api/resources/fhirProvider/types/Provider.d.ts +1 -0
  12. package/dist/cjs/api/resources/fhirProvider/types/Provider.js +1 -0
  13. package/dist/cjs/version.d.ts +1 -1
  14. package/dist/cjs/version.js +1 -1
  15. package/dist/esm/BaseClient.mjs +2 -2
  16. package/dist/esm/api/resources/fhir2Omop/client/Client.d.mts +8 -5
  17. package/dist/esm/api/resources/fhir2Omop/client/Client.mjs +8 -5
  18. package/dist/esm/api/resources/fhir2Omop/types/ConditionOccurrenceRow.d.mts +1 -0
  19. package/dist/esm/api/resources/fhir2Omop/types/DrugExposureRow.d.mts +1 -0
  20. package/dist/esm/api/resources/fhir2Omop/types/MappingEntry.d.mts +4 -6
  21. package/dist/esm/api/resources/fhir2Omop/types/MeasurementRow.d.mts +3 -0
  22. package/dist/esm/api/resources/fhir2Omop/types/ObservationRow.d.mts +1 -0
  23. package/dist/esm/api/resources/fhir2Omop/types/ProcedureOccurrenceRow.d.mts +1 -0
  24. package/dist/esm/api/resources/fhir2Omop/types/Summary.d.mts +6 -4
  25. package/dist/esm/api/resources/fhirProvider/types/Provider.d.mts +1 -0
  26. package/dist/esm/api/resources/fhirProvider/types/Provider.mjs +1 -0
  27. package/dist/esm/version.d.mts +1 -1
  28. package/dist/esm/version.mjs +1 -1
  29. package/openapi/openapi.json +36 -8
  30. package/package.json +1 -1
  31. package/reference.md +8 -5
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
43
43
  const headers = (0, headers_js_1.mergeHeaders)({
44
44
  "X-Fern-Language": "JavaScript",
45
45
  "X-Fern-SDK-Name": "phenoml",
46
- "X-Fern-SDK-Version": "17.3.0",
47
- "User-Agent": "phenoml/17.3.0",
46
+ "X-Fern-SDK-Version": "17.5.0",
47
+ "User-Agent": "phenoml/17.5.0",
48
48
  "X-Fern-Runtime": core.RUNTIME.type,
49
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
50
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -22,12 +22,15 @@ export declare class Fhir2OmopClient {
22
22
  * into a row), `vocab_version` (the OMOP vocabulary release codes were
23
23
  * resolved against), and a small `summary` of the resolution outcomes.
24
24
  *
25
- * A `concept_id` of `0` means "no matching standard concept" (OMOP
26
- * semantics) and is reported, not omitted — a coding with no match is
27
- * `UNMAPPED`. Only the primary clinical coding is resolved;
25
+ * A `concept_id` of `0` is reported, not omitted (OMOP "no matching
26
+ * concept" semantics): it covers both a coding with no standard match
27
+ * (`UNMAPPED`) and an unverified suggestion for a text-only resource
28
+ * (`UNCHECKED`). Only the primary clinical coding is resolved, so
28
29
  * `gender`/`race`/`ethnicity`/`visit`/`value`/`unit` `concept_id`s are
29
- * always `0`. Each `*_source_value` carries the verbatim FHIR coding
30
- * (`system#code`), and `*_type_concept_id` is set to `32817` (EHR).
30
+ * always `0`; the one populated non-resolved concept is measurement
31
+ * `operator_concept_id`, set from a value comparator (`<`, `<=`, `>`, `>=`)
32
+ * rather than the resolver. Each `*_source_value` carries the verbatim FHIR
33
+ * coding (`system#code`), and `*_type_concept_id` is set to `32817` (EHR).
31
34
  *
32
35
  * Medication codes are resolved whether they appear inline
33
36
  * (`medicationCodeableConcept`) or via a `medicationReference` to a contained,
@@ -67,12 +67,15 @@ class Fhir2OmopClient {
67
67
  * into a row), `vocab_version` (the OMOP vocabulary release codes were
68
68
  * resolved against), and a small `summary` of the resolution outcomes.
69
69
  *
70
- * A `concept_id` of `0` means "no matching standard concept" (OMOP
71
- * semantics) and is reported, not omitted — a coding with no match is
72
- * `UNMAPPED`. Only the primary clinical coding is resolved;
70
+ * A `concept_id` of `0` is reported, not omitted (OMOP "no matching
71
+ * concept" semantics): it covers both a coding with no standard match
72
+ * (`UNMAPPED`) and an unverified suggestion for a text-only resource
73
+ * (`UNCHECKED`). Only the primary clinical coding is resolved, so
73
74
  * `gender`/`race`/`ethnicity`/`visit`/`value`/`unit` `concept_id`s are
74
- * always `0`. Each `*_source_value` carries the verbatim FHIR coding
75
- * (`system#code`), and `*_type_concept_id` is set to `32817` (EHR).
75
+ * always `0`; the one populated non-resolved concept is measurement
76
+ * `operator_concept_id`, set from a value comparator (`<`, `<=`, `>`, `>=`)
77
+ * rather than the resolver. Each `*_source_value` carries the verbatim FHIR
78
+ * coding (`system#code`), and `*_type_concept_id` is set to `32817` (EHR).
76
79
  *
77
80
  * Medication codes are resolved whether they appear inline
78
81
  * (`medicationCodeableConcept`) or via a `medicationReference` to a contained,
@@ -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;
@@ -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
  }
@@ -16,12 +16,10 @@ export interface MappingEntry {
16
16
  source_name?: string | undefined;
17
17
  target_vocabulary?: string | undefined;
18
18
  /**
19
- * The standard concept's code, when present. Populated only for an
20
- * `UNCHECKED` suggestion (where the API normalized a text-only resource
21
- * to a suggested code); omitted for codings resolved through concept
22
- * resolution (`ALREADY_STANDARD` / `MAPPED` / `UNMAPPED`), which are
23
- * identified by `target_vocabulary`, `target_name`, and the row's
24
- * `*_concept_id` rather than by code.
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.
25
23
  */
26
24
  target_code?: string | undefined;
27
25
  target_name?: string | undefined;
@@ -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
  }
@@ -1,14 +1,16 @@
1
1
  /**
2
2
  * The request's data-quality headline: how the coded concepts split across
3
3
  * resolution outcomes, and the share that was not already in a target
4
- * standard vocabulary.
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.
5
7
  */
6
8
  export interface Summary {
7
- /** Codings already a standard OMOP concept. */
9
+ /** Coded concepts already a standard OMOP concept (ALREADY_STANDARD). */
8
10
  codes_already_standard?: number | undefined;
9
- /** Codings mapped or suggested to a standard concept (MAPPED or UNCHECKED). */
11
+ /** Coded concepts mapped or suggested to a standard concept (MAPPED or UNCHECKED). */
10
12
  codes_normalized?: number | undefined;
11
- /** Codings with no standard concept found. */
13
+ /** Coded concepts with no standard concept found (UNMAPPED). */
12
14
  codes_unmapped?: number | undefined;
13
15
  /** Share of coded concepts not already standard ((normalized + unmapped) / total). */
14
16
  off_vocab_rate?: number | undefined;
@@ -5,6 +5,7 @@
5
5
  * It is used on shared instances.
6
6
  */
7
7
  export declare const Provider: {
8
+ readonly Aidbox: "aidbox";
8
9
  readonly Athenahealth: "athenahealth";
9
10
  readonly Canvas: "canvas";
10
11
  readonly Cerner: "cerner";
@@ -9,6 +9,7 @@ exports.Provider = void 0;
9
9
  * It is used on shared instances.
10
10
  */
11
11
  exports.Provider = {
12
+ Aidbox: "aidbox",
12
13
  Athenahealth: "athenahealth",
13
14
  Canvas: "canvas",
14
15
  Cerner: "cerner",
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "17.3.0";
1
+ export declare const SDK_VERSION = "17.5.0";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "17.3.0";
4
+ exports.SDK_VERSION = "17.5.0";
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
6
6
  const headers = mergeHeaders({
7
7
  "X-Fern-Language": "JavaScript",
8
8
  "X-Fern-SDK-Name": "phenoml",
9
- "X-Fern-SDK-Version": "17.3.0",
10
- "User-Agent": "phenoml/17.3.0",
9
+ "X-Fern-SDK-Version": "17.5.0",
10
+ "User-Agent": "phenoml/17.5.0",
11
11
  "X-Fern-Runtime": core.RUNTIME.type,
12
12
  "X-Fern-Runtime-Version": core.RUNTIME.version,
13
13
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -22,12 +22,15 @@ export declare class Fhir2OmopClient {
22
22
  * into a row), `vocab_version` (the OMOP vocabulary release codes were
23
23
  * resolved against), and a small `summary` of the resolution outcomes.
24
24
  *
25
- * A `concept_id` of `0` means "no matching standard concept" (OMOP
26
- * semantics) and is reported, not omitted — a coding with no match is
27
- * `UNMAPPED`. Only the primary clinical coding is resolved;
25
+ * A `concept_id` of `0` is reported, not omitted (OMOP "no matching
26
+ * concept" semantics): it covers both a coding with no standard match
27
+ * (`UNMAPPED`) and an unverified suggestion for a text-only resource
28
+ * (`UNCHECKED`). Only the primary clinical coding is resolved, so
28
29
  * `gender`/`race`/`ethnicity`/`visit`/`value`/`unit` `concept_id`s are
29
- * always `0`. Each `*_source_value` carries the verbatim FHIR coding
30
- * (`system#code`), and `*_type_concept_id` is set to `32817` (EHR).
30
+ * always `0`; the one populated non-resolved concept is measurement
31
+ * `operator_concept_id`, set from a value comparator (`<`, `<=`, `>`, `>=`)
32
+ * rather than the resolver. Each `*_source_value` carries the verbatim FHIR
33
+ * coding (`system#code`), and `*_type_concept_id` is set to `32817` (EHR).
31
34
  *
32
35
  * Medication codes are resolved whether they appear inline
33
36
  * (`medicationCodeableConcept`) or via a `medicationReference` to a contained,
@@ -31,12 +31,15 @@ export class Fhir2OmopClient {
31
31
  * into a row), `vocab_version` (the OMOP vocabulary release codes were
32
32
  * resolved against), and a small `summary` of the resolution outcomes.
33
33
  *
34
- * A `concept_id` of `0` means "no matching standard concept" (OMOP
35
- * semantics) and is reported, not omitted — a coding with no match is
36
- * `UNMAPPED`. Only the primary clinical coding is resolved;
34
+ * A `concept_id` of `0` is reported, not omitted (OMOP "no matching
35
+ * concept" semantics): it covers both a coding with no standard match
36
+ * (`UNMAPPED`) and an unverified suggestion for a text-only resource
37
+ * (`UNCHECKED`). Only the primary clinical coding is resolved, so
37
38
  * `gender`/`race`/`ethnicity`/`visit`/`value`/`unit` `concept_id`s are
38
- * always `0`. Each `*_source_value` carries the verbatim FHIR coding
39
- * (`system#code`), and `*_type_concept_id` is set to `32817` (EHR).
39
+ * always `0`; the one populated non-resolved concept is measurement
40
+ * `operator_concept_id`, set from a value comparator (`<`, `<=`, `>`, `>=`)
41
+ * rather than the resolver. Each `*_source_value` carries the verbatim FHIR
42
+ * coding (`system#code`), and `*_type_concept_id` is set to `32817` (EHR).
40
43
  *
41
44
  * Medication codes are resolved whether they appear inline
42
45
  * (`medicationCodeableConcept`) or via a `medicationReference` to a contained,
@@ -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;
@@ -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
  }
@@ -16,12 +16,10 @@ export interface MappingEntry {
16
16
  source_name?: string | undefined;
17
17
  target_vocabulary?: string | undefined;
18
18
  /**
19
- * The standard concept's code, when present. Populated only for an
20
- * `UNCHECKED` suggestion (where the API normalized a text-only resource
21
- * to a suggested code); omitted for codings resolved through concept
22
- * resolution (`ALREADY_STANDARD` / `MAPPED` / `UNMAPPED`), which are
23
- * identified by `target_vocabulary`, `target_name`, and the row's
24
- * `*_concept_id` rather than by code.
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.
25
23
  */
26
24
  target_code?: string | undefined;
27
25
  target_name?: string | undefined;
@@ -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
  }
@@ -1,14 +1,16 @@
1
1
  /**
2
2
  * The request's data-quality headline: how the coded concepts split across
3
3
  * resolution outcomes, and the share that was not already in a target
4
- * standard vocabulary.
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.
5
7
  */
6
8
  export interface Summary {
7
- /** Codings already a standard OMOP concept. */
9
+ /** Coded concepts already a standard OMOP concept (ALREADY_STANDARD). */
8
10
  codes_already_standard?: number | undefined;
9
- /** Codings mapped or suggested to a standard concept (MAPPED or UNCHECKED). */
11
+ /** Coded concepts mapped or suggested to a standard concept (MAPPED or UNCHECKED). */
10
12
  codes_normalized?: number | undefined;
11
- /** Codings with no standard concept found. */
13
+ /** Coded concepts with no standard concept found (UNMAPPED). */
12
14
  codes_unmapped?: number | undefined;
13
15
  /** Share of coded concepts not already standard ((normalized + unmapped) / total). */
14
16
  off_vocab_rate?: number | undefined;
@@ -5,6 +5,7 @@
5
5
  * It is used on shared instances.
6
6
  */
7
7
  export declare const Provider: {
8
+ readonly Aidbox: "aidbox";
8
9
  readonly Athenahealth: "athenahealth";
9
10
  readonly Canvas: "canvas";
10
11
  readonly Cerner: "cerner";
@@ -6,6 +6,7 @@
6
6
  * It is used on shared instances.
7
7
  */
8
8
  export const Provider = {
9
+ Aidbox: "aidbox",
9
10
  Athenahealth: "athenahealth",
10
11
  Canvas: "canvas",
11
12
  Cerner: "cerner",
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "17.3.0";
1
+ export declare const SDK_VERSION = "17.5.0";
@@ -1 +1 @@
1
- export const SDK_VERSION = "17.3.0";
1
+ export const SDK_VERSION = "17.5.0";
@@ -2,7 +2,7 @@
2
2
  "openapi": "3.0.3",
3
3
  "info": {
4
4
  "title": "Phenoml API",
5
- "version": "5084e3096e5bd89bf2e86ea44d96e3407f6f5c6b"
5
+ "version": "64f369254225bd6c2d4c58d87f59165d7e8e8dc9"
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": "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` means \"no matching standard concept\" (OMOP\nsemantics) and is reported, not omitted \u2014 a coding with no match is\n`UNMAPPED`. Only the primary clinical coding is resolved;\n`gender`/`race`/`ethnicity`/`visit`/`value`/`unit` `concept_id`s are\nalways `0`. Each `*_source_value` carries the verbatim FHIR coding\n(`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",
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": {
@@ -3113,7 +3113,7 @@
3113
3113
  "examples": {
3114
3114
  "mapping_result": {
3115
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. `target_code` is omitted for a\nresolved concept \u2014 it is identified by `target_vocabulary` and\n`target_name` (and the row's `*_concept_id`). Illustrative\n`concept_id` values.\n",
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
3119
  "message": "FHIR resources mapped to OMOP CDM v5.4",
@@ -3167,6 +3167,7 @@
3167
3167
  "source_code": "44054006",
3168
3168
  "source_name": "Type 2 diabetes mellitus",
3169
3169
  "target_vocabulary": "SNOMED",
3170
+ "target_code": "44054006",
3170
3171
  "target_name": "Type 2 diabetes mellitus",
3171
3172
  "mapping_status": "ALREADY_STANDARD"
3172
3173
  },
@@ -3179,6 +3180,7 @@
3179
3180
  "source_code": "860975",
3180
3181
  "source_name": "metformin hydrochloride 500 MG",
3181
3182
  "target_vocabulary": "RXNORM",
3183
+ "target_code": "860975",
3182
3184
  "target_name": "metformin hydrochloride 500 MG",
3183
3185
  "mapping_status": "ALREADY_STANDARD"
3184
3186
  }
@@ -8738,6 +8740,10 @@
8738
8740
  "type": "integer",
8739
8741
  "format": "int64"
8740
8742
  },
8743
+ "visit_occurrence_id": {
8744
+ "type": "integer",
8745
+ "format": "int64"
8746
+ },
8741
8747
  "condition_source_value": {
8742
8748
  "type": "string"
8743
8749
  },
@@ -8784,6 +8790,10 @@
8784
8790
  "sig": {
8785
8791
  "type": "string"
8786
8792
  },
8793
+ "visit_occurrence_id": {
8794
+ "type": "integer",
8795
+ "format": "int64"
8796
+ },
8787
8797
  "drug_source_value": {
8788
8798
  "type": "string"
8789
8799
  },
@@ -8818,6 +8828,10 @@
8818
8828
  "type": "integer",
8819
8829
  "format": "int64"
8820
8830
  },
8831
+ "visit_occurrence_id": {
8832
+ "type": "integer",
8833
+ "format": "int64"
8834
+ },
8821
8835
  "procedure_source_value": {
8822
8836
  "type": "string"
8823
8837
  },
@@ -8856,6 +8870,11 @@
8856
8870
  "type": "number",
8857
8871
  "format": "double"
8858
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
+ },
8859
8878
  "value_as_concept_id": {
8860
8879
  "type": "integer",
8861
8880
  "format": "int64"
@@ -8872,6 +8891,10 @@
8872
8891
  "type": "number",
8873
8892
  "format": "double"
8874
8893
  },
8894
+ "visit_occurrence_id": {
8895
+ "type": "integer",
8896
+ "format": "int64"
8897
+ },
8875
8898
  "measurement_source_value": {
8876
8899
  "type": "string"
8877
8900
  },
@@ -8927,6 +8950,10 @@
8927
8950
  "type": "integer",
8928
8951
  "format": "int64"
8929
8952
  },
8953
+ "visit_occurrence_id": {
8954
+ "type": "integer",
8955
+ "format": "int64"
8956
+ },
8930
8957
  "observation_source_value": {
8931
8958
  "type": "string"
8932
8959
  },
@@ -8974,7 +9001,7 @@
8974
9001
  },
8975
9002
  "target_code": {
8976
9003
  "type": "string",
8977
- "description": "The standard concept's code, when present. Populated only for an\n`UNCHECKED` suggestion (where the API normalized a text-only resource\nto a suggested code); omitted for codings resolved through concept\nresolution (`ALREADY_STANDARD` / `MAPPED` / `UNMAPPED`), which are\nidentified by `target_vocabulary`, `target_name`, and the row's\n`*_concept_id` rather than by code.\n"
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"
8978
9005
  },
8979
9006
  "target_name": {
8980
9007
  "type": "string"
@@ -8990,19 +9017,19 @@
8990
9017
  },
8991
9018
  "fhir2omop_Summary": {
8992
9019
  "type": "object",
8993
- "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.\n",
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",
8994
9021
  "properties": {
8995
9022
  "codes_already_standard": {
8996
9023
  "type": "integer",
8997
- "description": "Codings already a standard OMOP concept."
9024
+ "description": "Coded concepts already a standard OMOP concept (ALREADY_STANDARD)."
8998
9025
  },
8999
9026
  "codes_normalized": {
9000
9027
  "type": "integer",
9001
- "description": "Codings mapped or suggested to a standard concept (MAPPED or UNCHECKED)."
9028
+ "description": "Coded concepts mapped or suggested to a standard concept (MAPPED or UNCHECKED)."
9002
9029
  },
9003
9030
  "codes_unmapped": {
9004
9031
  "type": "integer",
9005
- "description": "Codings with no standard concept found."
9032
+ "description": "Coded concepts with no standard concept found (UNMAPPED)."
9006
9033
  },
9007
9034
  "off_vocab_rate": {
9008
9035
  "type": "number",
@@ -9296,6 +9323,7 @@
9296
9323
  "type": "string",
9297
9324
  "description": "Type of FHIR server provider.\n\nThe \"sandbox\" provider type is managed internally and cannot be created via API.\nIt is used on shared instances.\n",
9298
9325
  "enum": [
9326
+ "aidbox",
9299
9327
  "athenahealth",
9300
9328
  "canvas",
9301
9329
  "cerner",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phenoml",
3
- "version": "17.3.0",
3
+ "version": "17.5.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
package/reference.md CHANGED
@@ -2684,12 +2684,15 @@ to the row it produced), `dropped` (resources that could not be shaped
2684
2684
  into a row), `vocab_version` (the OMOP vocabulary release codes were
2685
2685
  resolved against), and a small `summary` of the resolution outcomes.
2686
2686
 
2687
- A `concept_id` of `0` means "no matching standard concept" (OMOP
2688
- semantics) and is reported, not omitted — a coding with no match is
2689
- `UNMAPPED`. Only the primary clinical coding is resolved;
2687
+ A `concept_id` of `0` is reported, not omitted (OMOP "no matching
2688
+ concept" semantics): it covers both a coding with no standard match
2689
+ (`UNMAPPED`) and an unverified suggestion for a text-only resource
2690
+ (`UNCHECKED`). Only the primary clinical coding is resolved, so
2690
2691
  `gender`/`race`/`ethnicity`/`visit`/`value`/`unit` `concept_id`s are
2691
- always `0`. Each `*_source_value` carries the verbatim FHIR coding
2692
- (`system#code`), and `*_type_concept_id` is set to `32817` (EHR).
2692
+ always `0`; the one populated non-resolved concept is measurement
2693
+ `operator_concept_id`, set from a value comparator (`<`, `<=`, `>`, `>=`)
2694
+ rather than the resolver. Each `*_source_value` carries the verbatim FHIR
2695
+ coding (`system#code`), and `*_type_concept_id` is set to `32817` (EHR).
2693
2696
 
2694
2697
  Medication codes are resolved whether they appear inline
2695
2698
  (`medicationCodeableConcept`) or via a `medicationReference` to a contained,