saferx-pharma-sdk 1.0.0 → 1.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.
@@ -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": "saferx-pharma-sdk",
46
- "X-Fern-SDK-Version": "1.0.0",
47
- "User-Agent": "saferx-pharma-sdk/1.0.0",
46
+ "X-Fern-SDK-Version": "1.2.0",
47
+ "User-Agent": "saferx-pharma-sdk/1.2.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);
@@ -2,7 +2,7 @@
2
2
  * Clinical safety alert from cross-drug analysis
3
3
  */
4
4
  export interface ClinicalAlert {
5
- /** SFX_ID of the drug involved */
5
+ /** sfrx_id of the drug involved */
6
6
  drug_id?: string | undefined;
7
7
  /** Drug name (English) */
8
8
  drug?: string | undefined;
@@ -5,7 +5,7 @@ import type * as SafeRx from "../index.js";
5
5
  * is provided in the request.
6
6
  */
7
7
  export interface ClinicalData {
8
- /** Per-drug clinical data keyed by SFX_ID */
8
+ /** Per-drug clinical data keyed by sfrx_id */
9
9
  drug_specific?: Record<string, SafeRx.DrugClinicalData> | undefined;
10
10
  /** Cross-drug condition-related alerts (requires `patient_profile.conditions`) */
11
11
  condition_alerts?: SafeRx.ClinicalAlert[] | undefined;
@@ -1,8 +1,8 @@
1
1
  export interface Interaction {
2
- /** SFX_ID of the first drug in the interaction pair */
3
- drug_1_id?: string | undefined;
4
- /** SFX_ID of the second drug in the interaction pair */
5
- drug_2_id?: string | undefined;
2
+ /** sfrx_id of the first drug in the interaction pair */
3
+ sfrx_id_1?: string | undefined;
4
+ /** sfrx_id of the second drug in the interaction pair */
5
+ sfrx_id_2?: string | undefined;
6
6
  /**
7
7
  * Interaction severity level.
8
8
  * - `2` — Minor: minimal clinical significance
@@ -11,12 +11,30 @@ export interface Interaction {
11
11
  * - `5` — Contraindicated: do not use together
12
12
  */
13
13
  severity?: number | undefined;
14
+ /**
15
+ * Original severity before noise-type adjustments.
16
+ * Same scale as `severity`. Useful for understanding if severity was modified.
17
+ */
18
+ base_severity?: number | undefined;
14
19
  /** Human-readable severity label */
15
20
  severity_name?: Interaction.SeverityName | undefined;
21
+ /**
22
+ * Noise classification for this interaction, if applicable.
23
+ * Null when the interaction is clinically significant.
24
+ */
25
+ noise_type?: (string | null) | undefined;
16
26
  /** Interaction mechanism or clinical description (English) */
17
27
  description?: string | undefined;
18
28
  /** Interaction description in Arabic */
19
29
  description_ar?: string | undefined;
30
+ /** Expected clinical effect of the interaction (English) */
31
+ clinical_effect?: (string | null) | undefined;
32
+ /** Expected clinical effect in Arabic */
33
+ clinical_effect_ar?: (string | null) | undefined;
34
+ /** Clinical management strategy (English) */
35
+ management?: (string | null) | undefined;
36
+ /** Clinical management strategy in Arabic */
37
+ management_ar?: (string | null) | undefined;
20
38
  /** Clinical recommendation for managing this interaction (English) */
21
39
  recommendation?: string | undefined;
22
40
  /** Clinical recommendation in Arabic */
@@ -27,4 +27,28 @@ export interface ReproductiveSafetyData {
27
27
  lactation_rationale?: string | undefined;
28
28
  pregnancy_warning?: SafeRx.ReproductiveWarning | undefined;
29
29
  lactation_warning?: SafeRx.ReproductiveWarning | undefined;
30
+ /** First trimester pregnancy risk classification */
31
+ preg_t1_risk?: (string | null) | undefined;
32
+ /** First trimester clinical note */
33
+ preg_t1_note?: (string | null) | undefined;
34
+ /** First trimester note in Arabic */
35
+ preg_t1_ar?: (string | null) | undefined;
36
+ /** Second trimester pregnancy risk classification */
37
+ preg_t2_risk?: (string | null) | undefined;
38
+ /** Second trimester clinical note */
39
+ preg_t2_note?: (string | null) | undefined;
40
+ /** Second trimester note in Arabic */
41
+ preg_t2_ar?: (string | null) | undefined;
42
+ /** Third trimester pregnancy risk classification */
43
+ preg_t3_risk?: (string | null) | undefined;
44
+ /** Third trimester clinical note */
45
+ preg_t3_note?: (string | null) | undefined;
46
+ /** Third trimester note in Arabic */
47
+ preg_t3_ar?: (string | null) | undefined;
48
+ /** Measured drug concentration in breast milk (mg/L) */
49
+ lact_milk_level_mgl?: (number | null) | undefined;
50
+ /** Milk-to-plasma concentration ratio */
51
+ lact_mp_ratio?: (number | null) | undefined;
52
+ /** Relative Infant Dose (%) — percentage of maternal dose received by infant */
53
+ lact_rid?: (number | null) | undefined;
30
54
  }
@@ -7,7 +7,12 @@ export interface ResolvedDrug {
7
7
  * SafeRx product identifier. Primary key used across all safety
8
8
  * domains. Format: `SRX-{category}-{sequence}`.
9
9
  */
10
- SFX_ID: string;
10
+ sfrx_id: string;
11
+ /**
12
+ * Parent product identifier for strength/pack variants of the same drug.
13
+ * Null if this product has no parent.
14
+ */
15
+ parent_sfrx_id?: (string | null) | undefined;
11
16
  /** Registered trade name with strength and pack size */
12
17
  brand_name: string;
13
18
  /** Active pharmaceutical ingredient(s), pipe-separated for combinations */
@@ -15,13 +20,13 @@ export interface ResolvedDrug {
15
20
  /** Pharmaceutical dosage form */
16
21
  form: string;
17
22
  /** Marketing authorization holder */
18
- manufacturer?: string | undefined;
23
+ manufacturer_en?: string | undefined;
19
24
  /** ATC-based therapeutic classification, pipe-separated hierarchy */
20
25
  therapeutic_class?: string | undefined;
21
26
  /** Primary prescribing specialty */
22
27
  medical_specialty?: string | undefined;
23
- /** Distribution company (may be empty) */
24
- distributor?: string | undefined;
28
+ /** Distribution/supply company (may be empty) */
29
+ supplier_en?: string | undefined;
25
30
  /** Product barcode (may be empty) */
26
31
  barcode?: string | undefined;
27
32
  /** Current price in Egyptian Pounds (EGP) */
@@ -6,17 +6,17 @@ import type * as SafeRx from "../index.js";
6
6
  */
7
7
  export interface SafetyData {
8
8
  /**
9
- * Adverse effects data keyed by SFX_ID. Includes risk level,
9
+ * Adverse effects data keyed by sfrx_id. Includes risk level,
10
10
  * Black Box Warnings, severe/common effects, monitoring, and
11
11
  * dose classification.
12
12
  */
13
13
  side_effects?: Record<string, SafeRx.SideEffectsData> | undefined;
14
14
  interactions?: SafeRx.InteractionsData | undefined;
15
- /** Pregnancy & lactation risk data keyed by SFX_ID */
15
+ /** Pregnancy & lactation risk data keyed by sfrx_id */
16
16
  reproductive_safety?: Record<string, SafeRx.ReproductiveSafetyData> | undefined;
17
- /** Food-drug interaction data keyed by SFX_ID */
17
+ /** Food-drug interaction data keyed by sfrx_id */
18
18
  food?: Record<string, SafeRx.FoodData> | undefined;
19
19
  clinical?: SafeRx.ClinicalData | undefined;
20
- /** Maximum daily dose data keyed by SFX_ID */
20
+ /** Maximum daily dose data keyed by sfrx_id */
21
21
  dosing?: Record<string, SafeRx.DosingData> | undefined;
22
22
  }
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.0.0";
1
+ export declare const SDK_VERSION = "1.2.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 = "1.0.0";
4
+ exports.SDK_VERSION = "1.2.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": "saferx-pharma-sdk",
9
- "X-Fern-SDK-Version": "1.0.0",
10
- "User-Agent": "saferx-pharma-sdk/1.0.0",
9
+ "X-Fern-SDK-Version": "1.2.0",
10
+ "User-Agent": "saferx-pharma-sdk/1.2.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);
@@ -2,7 +2,7 @@
2
2
  * Clinical safety alert from cross-drug analysis
3
3
  */
4
4
  export interface ClinicalAlert {
5
- /** SFX_ID of the drug involved */
5
+ /** sfrx_id of the drug involved */
6
6
  drug_id?: string | undefined;
7
7
  /** Drug name (English) */
8
8
  drug?: string | undefined;
@@ -5,7 +5,7 @@ import type * as SafeRx from "../index.mjs";
5
5
  * is provided in the request.
6
6
  */
7
7
  export interface ClinicalData {
8
- /** Per-drug clinical data keyed by SFX_ID */
8
+ /** Per-drug clinical data keyed by sfrx_id */
9
9
  drug_specific?: Record<string, SafeRx.DrugClinicalData> | undefined;
10
10
  /** Cross-drug condition-related alerts (requires `patient_profile.conditions`) */
11
11
  condition_alerts?: SafeRx.ClinicalAlert[] | undefined;
@@ -1,8 +1,8 @@
1
1
  export interface Interaction {
2
- /** SFX_ID of the first drug in the interaction pair */
3
- drug_1_id?: string | undefined;
4
- /** SFX_ID of the second drug in the interaction pair */
5
- drug_2_id?: string | undefined;
2
+ /** sfrx_id of the first drug in the interaction pair */
3
+ sfrx_id_1?: string | undefined;
4
+ /** sfrx_id of the second drug in the interaction pair */
5
+ sfrx_id_2?: string | undefined;
6
6
  /**
7
7
  * Interaction severity level.
8
8
  * - `2` — Minor: minimal clinical significance
@@ -11,12 +11,30 @@ export interface Interaction {
11
11
  * - `5` — Contraindicated: do not use together
12
12
  */
13
13
  severity?: number | undefined;
14
+ /**
15
+ * Original severity before noise-type adjustments.
16
+ * Same scale as `severity`. Useful for understanding if severity was modified.
17
+ */
18
+ base_severity?: number | undefined;
14
19
  /** Human-readable severity label */
15
20
  severity_name?: Interaction.SeverityName | undefined;
21
+ /**
22
+ * Noise classification for this interaction, if applicable.
23
+ * Null when the interaction is clinically significant.
24
+ */
25
+ noise_type?: (string | null) | undefined;
16
26
  /** Interaction mechanism or clinical description (English) */
17
27
  description?: string | undefined;
18
28
  /** Interaction description in Arabic */
19
29
  description_ar?: string | undefined;
30
+ /** Expected clinical effect of the interaction (English) */
31
+ clinical_effect?: (string | null) | undefined;
32
+ /** Expected clinical effect in Arabic */
33
+ clinical_effect_ar?: (string | null) | undefined;
34
+ /** Clinical management strategy (English) */
35
+ management?: (string | null) | undefined;
36
+ /** Clinical management strategy in Arabic */
37
+ management_ar?: (string | null) | undefined;
20
38
  /** Clinical recommendation for managing this interaction (English) */
21
39
  recommendation?: string | undefined;
22
40
  /** Clinical recommendation in Arabic */
@@ -27,4 +27,28 @@ export interface ReproductiveSafetyData {
27
27
  lactation_rationale?: string | undefined;
28
28
  pregnancy_warning?: SafeRx.ReproductiveWarning | undefined;
29
29
  lactation_warning?: SafeRx.ReproductiveWarning | undefined;
30
+ /** First trimester pregnancy risk classification */
31
+ preg_t1_risk?: (string | null) | undefined;
32
+ /** First trimester clinical note */
33
+ preg_t1_note?: (string | null) | undefined;
34
+ /** First trimester note in Arabic */
35
+ preg_t1_ar?: (string | null) | undefined;
36
+ /** Second trimester pregnancy risk classification */
37
+ preg_t2_risk?: (string | null) | undefined;
38
+ /** Second trimester clinical note */
39
+ preg_t2_note?: (string | null) | undefined;
40
+ /** Second trimester note in Arabic */
41
+ preg_t2_ar?: (string | null) | undefined;
42
+ /** Third trimester pregnancy risk classification */
43
+ preg_t3_risk?: (string | null) | undefined;
44
+ /** Third trimester clinical note */
45
+ preg_t3_note?: (string | null) | undefined;
46
+ /** Third trimester note in Arabic */
47
+ preg_t3_ar?: (string | null) | undefined;
48
+ /** Measured drug concentration in breast milk (mg/L) */
49
+ lact_milk_level_mgl?: (number | null) | undefined;
50
+ /** Milk-to-plasma concentration ratio */
51
+ lact_mp_ratio?: (number | null) | undefined;
52
+ /** Relative Infant Dose (%) — percentage of maternal dose received by infant */
53
+ lact_rid?: (number | null) | undefined;
30
54
  }
@@ -7,7 +7,12 @@ export interface ResolvedDrug {
7
7
  * SafeRx product identifier. Primary key used across all safety
8
8
  * domains. Format: `SRX-{category}-{sequence}`.
9
9
  */
10
- SFX_ID: string;
10
+ sfrx_id: string;
11
+ /**
12
+ * Parent product identifier for strength/pack variants of the same drug.
13
+ * Null if this product has no parent.
14
+ */
15
+ parent_sfrx_id?: (string | null) | undefined;
11
16
  /** Registered trade name with strength and pack size */
12
17
  brand_name: string;
13
18
  /** Active pharmaceutical ingredient(s), pipe-separated for combinations */
@@ -15,13 +20,13 @@ export interface ResolvedDrug {
15
20
  /** Pharmaceutical dosage form */
16
21
  form: string;
17
22
  /** Marketing authorization holder */
18
- manufacturer?: string | undefined;
23
+ manufacturer_en?: string | undefined;
19
24
  /** ATC-based therapeutic classification, pipe-separated hierarchy */
20
25
  therapeutic_class?: string | undefined;
21
26
  /** Primary prescribing specialty */
22
27
  medical_specialty?: string | undefined;
23
- /** Distribution company (may be empty) */
24
- distributor?: string | undefined;
28
+ /** Distribution/supply company (may be empty) */
29
+ supplier_en?: string | undefined;
25
30
  /** Product barcode (may be empty) */
26
31
  barcode?: string | undefined;
27
32
  /** Current price in Egyptian Pounds (EGP) */
@@ -6,17 +6,17 @@ import type * as SafeRx from "../index.mjs";
6
6
  */
7
7
  export interface SafetyData {
8
8
  /**
9
- * Adverse effects data keyed by SFX_ID. Includes risk level,
9
+ * Adverse effects data keyed by sfrx_id. Includes risk level,
10
10
  * Black Box Warnings, severe/common effects, monitoring, and
11
11
  * dose classification.
12
12
  */
13
13
  side_effects?: Record<string, SafeRx.SideEffectsData> | undefined;
14
14
  interactions?: SafeRx.InteractionsData | undefined;
15
- /** Pregnancy & lactation risk data keyed by SFX_ID */
15
+ /** Pregnancy & lactation risk data keyed by sfrx_id */
16
16
  reproductive_safety?: Record<string, SafeRx.ReproductiveSafetyData> | undefined;
17
- /** Food-drug interaction data keyed by SFX_ID */
17
+ /** Food-drug interaction data keyed by sfrx_id */
18
18
  food?: Record<string, SafeRx.FoodData> | undefined;
19
19
  clinical?: SafeRx.ClinicalData | undefined;
20
- /** Maximum daily dose data keyed by SFX_ID */
20
+ /** Maximum daily dose data keyed by sfrx_id */
21
21
  dosing?: Record<string, SafeRx.DosingData> | undefined;
22
22
  }
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.0.0";
1
+ export declare const SDK_VERSION = "1.2.0";
@@ -1 +1 @@
1
- export const SDK_VERSION = "1.0.0";
1
+ export const SDK_VERSION = "1.2.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "saferx-pharma-sdk",
3
- "version": "1.0.0",
3
+ "version": "1.2.0",
4
4
  "private": false,
5
5
  "type": "commonjs",
6
6
  "main": "./dist/cjs/index.js",