saferx-pharma-sdk 1.4.2 → 2.0.1
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 +0 -12
- package/dist/cjs/Client.js +0 -67
- package/dist/cjs/api/resources/developers/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/developers/client/Client.js +1 -1
- package/dist/cjs/api/resources/drugSafety/client/Client.d.ts +5 -37
- package/dist/cjs/api/resources/drugSafety/client/Client.js +5 -37
- package/dist/cjs/api/resources/drugSafety/client/requests/DrugSafetyCheckRequest.d.ts +4 -38
- package/dist/cjs/api/resources/drugSafety/types/GetDrugSafetyHealthResponse.d.ts +14 -2
- package/dist/cjs/api/resources/drugSafety/types/GetDrugSafetyHealthResponse.js +11 -0
- package/dist/cjs/api/types/Alert.d.ts +2 -8
- package/dist/cjs/api/types/Alert.js +1 -5
- package/dist/cjs/api/types/ClinicalAlert.d.ts +0 -8
- package/dist/cjs/api/types/ClinicalData.d.ts +4 -7
- package/dist/cjs/api/types/DailyLimit.d.ts +1 -1
- package/dist/cjs/api/types/DomainCode.d.ts +2 -4
- package/dist/cjs/api/types/DomainCode.js +2 -4
- package/dist/cjs/api/types/DosingData.d.ts +12 -22
- package/dist/cjs/api/types/DosingData.js +3 -3
- package/dist/cjs/api/types/DrugSafetyCheckResponse.d.ts +0 -1
- package/dist/cjs/api/types/ErrorResponse.d.ts +0 -5
- package/dist/cjs/api/types/Interaction.d.ts +2 -0
- package/dist/cjs/api/types/InteractionSummary.d.ts +4 -4
- package/dist/cjs/api/types/Meta.d.ts +0 -2
- package/dist/cjs/api/types/Meta.js +0 -1
- package/dist/cjs/api/types/MetadataResponse.d.ts +6 -14
- package/dist/cjs/api/types/MetadataResponse.js +0 -1
- package/dist/cjs/api/types/PatientProfile.d.ts +0 -31
- package/dist/cjs/api/types/PatientProfile.js +0 -17
- package/dist/cjs/api/types/RateLimitResponse.d.ts +0 -11
- package/dist/cjs/api/types/RateLimitResponse.js +0 -1
- package/dist/cjs/api/types/ReproductiveSafetyData.d.ts +3 -3
- package/dist/cjs/api/types/ResolvedDrug.d.ts +0 -26
- package/dist/cjs/api/types/SafetyData.d.ts +0 -1
- package/dist/cjs/api/types/index.d.ts +0 -16
- package/dist/cjs/api/types/index.js +0 -16
- package/dist/cjs/core/fetcher/BinaryResponse.d.ts +1 -1
- package/dist/cjs/core/fetcher/Fetcher.js +1 -1
- package/dist/cjs/core/fetcher/index.d.ts +0 -2
- package/dist/cjs/core/fetcher/index.js +1 -3
- package/dist/cjs/core/fetcher/makeRequest.d.ts +1 -6
- package/dist/cjs/core/fetcher/makeRequest.js +9 -30
- package/dist/cjs/core/runtime/runtime.js +7 -8
- 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 +0 -12
- package/dist/esm/Client.mjs +0 -34
- package/dist/esm/api/resources/developers/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/developers/client/Client.mjs +1 -1
- package/dist/esm/api/resources/drugSafety/client/Client.d.mts +5 -37
- package/dist/esm/api/resources/drugSafety/client/Client.mjs +5 -37
- package/dist/esm/api/resources/drugSafety/client/requests/DrugSafetyCheckRequest.d.mts +4 -38
- package/dist/esm/api/resources/drugSafety/types/GetDrugSafetyHealthResponse.d.mts +14 -2
- package/dist/esm/api/resources/drugSafety/types/GetDrugSafetyHealthResponse.mjs +11 -0
- package/dist/esm/api/types/Alert.d.mts +2 -8
- package/dist/esm/api/types/Alert.mjs +1 -5
- package/dist/esm/api/types/ClinicalAlert.d.mts +0 -8
- package/dist/esm/api/types/ClinicalData.d.mts +4 -7
- package/dist/esm/api/types/DailyLimit.d.mts +1 -1
- package/dist/esm/api/types/DomainCode.d.mts +2 -4
- package/dist/esm/api/types/DomainCode.mjs +2 -4
- package/dist/esm/api/types/DosingData.d.mts +12 -22
- package/dist/esm/api/types/DosingData.mjs +3 -3
- package/dist/esm/api/types/DrugSafetyCheckResponse.d.mts +0 -1
- package/dist/esm/api/types/ErrorResponse.d.mts +0 -5
- package/dist/esm/api/types/Interaction.d.mts +2 -0
- package/dist/esm/api/types/InteractionSummary.d.mts +4 -4
- package/dist/esm/api/types/Meta.d.mts +0 -2
- package/dist/esm/api/types/Meta.mjs +0 -1
- package/dist/esm/api/types/MetadataResponse.d.mts +6 -14
- package/dist/esm/api/types/MetadataResponse.mjs +0 -1
- package/dist/esm/api/types/PatientProfile.d.mts +0 -31
- package/dist/esm/api/types/PatientProfile.mjs +1 -16
- package/dist/esm/api/types/RateLimitResponse.d.mts +0 -11
- package/dist/esm/api/types/RateLimitResponse.mjs +0 -1
- package/dist/esm/api/types/ReproductiveSafetyData.d.mts +3 -3
- package/dist/esm/api/types/ResolvedDrug.d.mts +0 -26
- package/dist/esm/api/types/SafetyData.d.mts +0 -1
- package/dist/esm/api/types/index.d.mts +0 -16
- package/dist/esm/api/types/index.mjs +0 -16
- package/dist/esm/core/fetcher/BinaryResponse.d.mts +1 -1
- package/dist/esm/core/fetcher/Fetcher.mjs +1 -1
- package/dist/esm/core/fetcher/index.d.mts +0 -2
- package/dist/esm/core/fetcher/index.mjs +0 -1
- package/dist/esm/core/fetcher/makeRequest.d.mts +1 -6
- package/dist/esm/core/fetcher/makeRequest.mjs +9 -28
- package/dist/esm/core/runtime/runtime.mjs +7 -8
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +9 -31
- package/dist/cjs/api/resources/developers/exports.d.ts +0 -2
- package/dist/cjs/api/resources/developers/exports.js +0 -21
- package/dist/cjs/api/resources/drugSafety/exports.d.ts +0 -2
- package/dist/cjs/api/resources/drugSafety/exports.js +0 -21
- package/dist/cjs/api/types/AllergyCrossReactivityReference.d.ts +0 -16
- package/dist/cjs/api/types/AllergyCrossReactivityReference.js +0 -3
- package/dist/cjs/api/types/AllergyData.d.ts +0 -24
- package/dist/cjs/api/types/AllergyData.js +0 -11
- package/dist/cjs/api/types/AllergyFamilyReference.d.ts +0 -10
- package/dist/cjs/api/types/AllergyFamilyReference.js +0 -3
- package/dist/cjs/api/types/AllergyInputEntry.d.ts +0 -10
- package/dist/cjs/api/types/AllergyInputEntry.js +0 -3
- package/dist/cjs/api/types/AllergyProductFamilyReference.d.ts +0 -9
- package/dist/cjs/api/types/AllergyProductFamilyReference.js +0 -3
- package/dist/cjs/api/types/AllergySummary.d.ts +0 -14
- package/dist/cjs/api/types/AllergySummary.js +0 -3
- package/dist/cjs/api/types/AllergyWarning.d.ts +0 -30
- package/dist/cjs/api/types/AllergyWarning.js +0 -11
- package/dist/cjs/api/types/ClinicalContextApplied.d.ts +0 -10
- package/dist/cjs/api/types/ClinicalContextApplied.js +0 -3
- package/dist/cjs/api/types/IdentityMatch.d.ts +0 -13
- package/dist/cjs/api/types/IdentityMatch.js +0 -3
- package/dist/cjs/api/types/IntelligenceClinicalProfile.d.ts +0 -24
- package/dist/cjs/api/types/IntelligenceClinicalProfile.js +0 -13
- package/dist/cjs/api/types/IntelligenceContext.d.ts +0 -17
- package/dist/cjs/api/types/IntelligenceContext.js +0 -3
- package/dist/cjs/api/types/IntelligenceProcessorError.d.ts +0 -4
- package/dist/cjs/api/types/IntelligenceProcessorError.js +0 -3
- package/dist/cjs/api/types/IntelligenceResult.d.ts +0 -16
- package/dist/cjs/api/types/IntelligenceResult.js +0 -3
- package/dist/cjs/api/types/IntelligenceSynthesis.d.ts +0 -6
- package/dist/cjs/api/types/IntelligenceSynthesis.js +0 -3
- package/dist/cjs/api/types/MedicationHistoryItem.d.ts +0 -22
- package/dist/cjs/api/types/MedicationHistoryItem.js +0 -15
- package/dist/cjs/api/types/QuotaMeta.d.ts +0 -11
- package/dist/cjs/api/types/QuotaMeta.js +0 -3
- package/dist/cjs/core/fetcher/makePassthroughRequest.d.ts +0 -49
- package/dist/cjs/core/fetcher/makePassthroughRequest.js +0 -135
- package/dist/esm/api/resources/developers/exports.d.mts +0 -2
- package/dist/esm/api/resources/developers/exports.mjs +0 -3
- package/dist/esm/api/resources/drugSafety/exports.d.mts +0 -2
- package/dist/esm/api/resources/drugSafety/exports.mjs +0 -3
- package/dist/esm/api/types/AllergyCrossReactivityReference.d.mts +0 -16
- package/dist/esm/api/types/AllergyCrossReactivityReference.mjs +0 -2
- package/dist/esm/api/types/AllergyData.d.mts +0 -24
- package/dist/esm/api/types/AllergyData.mjs +0 -8
- package/dist/esm/api/types/AllergyFamilyReference.d.mts +0 -10
- package/dist/esm/api/types/AllergyFamilyReference.mjs +0 -2
- package/dist/esm/api/types/AllergyInputEntry.d.mts +0 -10
- package/dist/esm/api/types/AllergyInputEntry.mjs +0 -2
- package/dist/esm/api/types/AllergyProductFamilyReference.d.mts +0 -9
- package/dist/esm/api/types/AllergyProductFamilyReference.mjs +0 -2
- package/dist/esm/api/types/AllergySummary.d.mts +0 -14
- package/dist/esm/api/types/AllergySummary.mjs +0 -2
- package/dist/esm/api/types/AllergyWarning.d.mts +0 -30
- package/dist/esm/api/types/AllergyWarning.mjs +0 -8
- package/dist/esm/api/types/ClinicalContextApplied.d.mts +0 -10
- package/dist/esm/api/types/ClinicalContextApplied.mjs +0 -2
- package/dist/esm/api/types/IdentityMatch.d.mts +0 -13
- package/dist/esm/api/types/IdentityMatch.mjs +0 -2
- package/dist/esm/api/types/IntelligenceClinicalProfile.d.mts +0 -24
- package/dist/esm/api/types/IntelligenceClinicalProfile.mjs +0 -10
- package/dist/esm/api/types/IntelligenceContext.d.mts +0 -17
- package/dist/esm/api/types/IntelligenceContext.mjs +0 -2
- package/dist/esm/api/types/IntelligenceProcessorError.d.mts +0 -4
- package/dist/esm/api/types/IntelligenceProcessorError.mjs +0 -2
- package/dist/esm/api/types/IntelligenceResult.d.mts +0 -16
- package/dist/esm/api/types/IntelligenceResult.mjs +0 -2
- package/dist/esm/api/types/IntelligenceSynthesis.d.mts +0 -6
- package/dist/esm/api/types/IntelligenceSynthesis.mjs +0 -2
- package/dist/esm/api/types/MedicationHistoryItem.d.mts +0 -22
- package/dist/esm/api/types/MedicationHistoryItem.mjs +0 -12
- package/dist/esm/api/types/QuotaMeta.d.mts +0 -11
- package/dist/esm/api/types/QuotaMeta.mjs +0 -2
- package/dist/esm/core/fetcher/makePassthroughRequest.d.mts +0 -49
- package/dist/esm/core/fetcher/makePassthroughRequest.mjs +0 -132
|
@@ -14,7 +14,7 @@ export declare class DrugSafetyClient {
|
|
|
14
14
|
protected readonly _options: NormalizedClientOptionsWithAuth<DrugSafetyClient.Options>;
|
|
15
15
|
constructor(options?: DrugSafetyClient.Options);
|
|
16
16
|
/**
|
|
17
|
-
* Screen one or more drugs across
|
|
17
|
+
* Screen one or more drugs across six safety domains in a single request.
|
|
18
18
|
*
|
|
19
19
|
* The API resolves drug names via fuzzy matching, runs all requested safety
|
|
20
20
|
* checks in parallel, and returns a unified response with alerts bubbled to
|
|
@@ -44,40 +44,9 @@ export declare class DrugSafetyClient {
|
|
|
44
44
|
* drugs: ["Augmentin 1g", "Glucophage 500mg", "Marivan"],
|
|
45
45
|
* patient_profile: {
|
|
46
46
|
* populations: ["geriatric", "renal"],
|
|
47
|
-
* conditions: ["diabetes", "hypertension"]
|
|
48
|
-
* allergies: ["penicillin"]
|
|
47
|
+
* conditions: ["diabetes", "hypertension"]
|
|
49
48
|
* },
|
|
50
|
-
* include: ["ae", "ddi", "pllr", "
|
|
51
|
-
* lang: "en"
|
|
52
|
-
* })
|
|
53
|
-
*
|
|
54
|
-
* @example
|
|
55
|
-
* await client.drugSafety.check({
|
|
56
|
-
* drugs: ["Augmentin 1g", "Marivan"],
|
|
57
|
-
* intelligence_context: {
|
|
58
|
-
* user_id: "patient-123",
|
|
59
|
-
* clinical_profile: {
|
|
60
|
-
* age: 72,
|
|
61
|
-
* crcl: 38,
|
|
62
|
-
* hepatic_status: "normal",
|
|
63
|
-
* pregnancy: false,
|
|
64
|
-
* lactation: false,
|
|
65
|
-
* conditions: ["renal impairment", "hypertension"],
|
|
66
|
-
* populations: ["geriatric", "renal"],
|
|
67
|
-
* allergies: ["penicillin"],
|
|
68
|
-
* diet_habits: ["low_sodium"]
|
|
69
|
-
* },
|
|
70
|
-
* medication_history: [{
|
|
71
|
-
* sfrx_id: "SRX-010-004748",
|
|
72
|
-
* start_date: "2026-01-10",
|
|
73
|
-
* status: "active"
|
|
74
|
-
* }, {
|
|
75
|
-
* sfrx_id: "SRX-050-000123",
|
|
76
|
-
* start_date: "2025-09-01",
|
|
77
|
-
* status: "historical"
|
|
78
|
-
* }]
|
|
79
|
-
* },
|
|
80
|
-
* include: ["ae", "ddi", "pllr", "food", "clinical", "dose", "allergy"],
|
|
49
|
+
* include: ["ae", "ddi", "pllr", "clinical"],
|
|
81
50
|
* lang: "en"
|
|
82
51
|
* })
|
|
83
52
|
*
|
|
@@ -116,11 +85,10 @@ export declare class DrugSafetyClient {
|
|
|
116
85
|
getMetadata(requestOptions?: DrugSafetyClient.RequestOptions): core.HttpResponsePromise<SafeRx.MetadataResponse>;
|
|
117
86
|
private __getMetadata;
|
|
118
87
|
/**
|
|
119
|
-
* Returns
|
|
88
|
+
* Returns health status of the Drug Safety API subsystem including
|
|
89
|
+
* overall system health and availability.
|
|
120
90
|
*
|
|
121
91
|
* No authentication required. Designed for monitoring services.
|
|
122
|
-
* The public enterprise health endpoint intentionally does not expose
|
|
123
|
-
* database counts, module internals, or detailed dependency checks.
|
|
124
92
|
*
|
|
125
93
|
* @param {DrugSafetyClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
126
94
|
*
|
|
@@ -23,7 +23,7 @@ export class DrugSafetyClient {
|
|
|
23
23
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
|
-
* Screen one or more drugs across
|
|
26
|
+
* Screen one or more drugs across six safety domains in a single request.
|
|
27
27
|
*
|
|
28
28
|
* The API resolves drug names via fuzzy matching, runs all requested safety
|
|
29
29
|
* checks in parallel, and returns a unified response with alerts bubbled to
|
|
@@ -53,40 +53,9 @@ export class DrugSafetyClient {
|
|
|
53
53
|
* drugs: ["Augmentin 1g", "Glucophage 500mg", "Marivan"],
|
|
54
54
|
* patient_profile: {
|
|
55
55
|
* populations: ["geriatric", "renal"],
|
|
56
|
-
* conditions: ["diabetes", "hypertension"]
|
|
57
|
-
* allergies: ["penicillin"]
|
|
56
|
+
* conditions: ["diabetes", "hypertension"]
|
|
58
57
|
* },
|
|
59
|
-
* include: ["ae", "ddi", "pllr", "
|
|
60
|
-
* lang: "en"
|
|
61
|
-
* })
|
|
62
|
-
*
|
|
63
|
-
* @example
|
|
64
|
-
* await client.drugSafety.check({
|
|
65
|
-
* drugs: ["Augmentin 1g", "Marivan"],
|
|
66
|
-
* intelligence_context: {
|
|
67
|
-
* user_id: "patient-123",
|
|
68
|
-
* clinical_profile: {
|
|
69
|
-
* age: 72,
|
|
70
|
-
* crcl: 38,
|
|
71
|
-
* hepatic_status: "normal",
|
|
72
|
-
* pregnancy: false,
|
|
73
|
-
* lactation: false,
|
|
74
|
-
* conditions: ["renal impairment", "hypertension"],
|
|
75
|
-
* populations: ["geriatric", "renal"],
|
|
76
|
-
* allergies: ["penicillin"],
|
|
77
|
-
* diet_habits: ["low_sodium"]
|
|
78
|
-
* },
|
|
79
|
-
* medication_history: [{
|
|
80
|
-
* sfrx_id: "SRX-010-004748",
|
|
81
|
-
* start_date: "2026-01-10",
|
|
82
|
-
* status: "active"
|
|
83
|
-
* }, {
|
|
84
|
-
* sfrx_id: "SRX-050-000123",
|
|
85
|
-
* start_date: "2025-09-01",
|
|
86
|
-
* status: "historical"
|
|
87
|
-
* }]
|
|
88
|
-
* },
|
|
89
|
-
* include: ["ae", "ddi", "pllr", "food", "clinical", "dose", "allergy"],
|
|
58
|
+
* include: ["ae", "ddi", "pllr", "clinical"],
|
|
90
59
|
* lang: "en"
|
|
91
60
|
* })
|
|
92
61
|
*
|
|
@@ -208,11 +177,10 @@ export class DrugSafetyClient {
|
|
|
208
177
|
});
|
|
209
178
|
}
|
|
210
179
|
/**
|
|
211
|
-
* Returns
|
|
180
|
+
* Returns health status of the Drug Safety API subsystem including
|
|
181
|
+
* overall system health and availability.
|
|
212
182
|
*
|
|
213
183
|
* No authentication required. Designed for monitoring services.
|
|
214
|
-
* The public enterprise health endpoint intentionally does not expose
|
|
215
|
-
* database counts, module internals, or detailed dependency checks.
|
|
216
184
|
*
|
|
217
185
|
* @param {DrugSafetyClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
218
186
|
*
|
|
@@ -11,40 +11,9 @@ import type * as SafeRx from "../../../../index.mjs";
|
|
|
11
11
|
* drugs: ["Augmentin 1g", "Glucophage 500mg", "Marivan"],
|
|
12
12
|
* patient_profile: {
|
|
13
13
|
* populations: ["geriatric", "renal"],
|
|
14
|
-
* conditions: ["diabetes", "hypertension"]
|
|
15
|
-
* allergies: ["penicillin"]
|
|
14
|
+
* conditions: ["diabetes", "hypertension"]
|
|
16
15
|
* },
|
|
17
|
-
* include: ["ae", "ddi", "pllr", "
|
|
18
|
-
* lang: "en"
|
|
19
|
-
* }
|
|
20
|
-
*
|
|
21
|
-
* @example
|
|
22
|
-
* {
|
|
23
|
-
* drugs: ["Augmentin 1g", "Marivan"],
|
|
24
|
-
* intelligence_context: {
|
|
25
|
-
* user_id: "patient-123",
|
|
26
|
-
* clinical_profile: {
|
|
27
|
-
* age: 72,
|
|
28
|
-
* crcl: 38,
|
|
29
|
-
* hepatic_status: "normal",
|
|
30
|
-
* pregnancy: false,
|
|
31
|
-
* lactation: false,
|
|
32
|
-
* conditions: ["renal impairment", "hypertension"],
|
|
33
|
-
* populations: ["geriatric", "renal"],
|
|
34
|
-
* allergies: ["penicillin"],
|
|
35
|
-
* diet_habits: ["low_sodium"]
|
|
36
|
-
* },
|
|
37
|
-
* medication_history: [{
|
|
38
|
-
* sfrx_id: "SRX-010-004748",
|
|
39
|
-
* start_date: "2026-01-10",
|
|
40
|
-
* status: "active"
|
|
41
|
-
* }, {
|
|
42
|
-
* sfrx_id: "SRX-050-000123",
|
|
43
|
-
* start_date: "2025-09-01",
|
|
44
|
-
* status: "historical"
|
|
45
|
-
* }]
|
|
46
|
-
* },
|
|
47
|
-
* include: ["ae", "ddi", "pllr", "food", "clinical", "dose", "allergy"],
|
|
16
|
+
* include: ["ae", "ddi", "pllr", "clinical"],
|
|
48
17
|
* lang: "en"
|
|
49
18
|
* }
|
|
50
19
|
*
|
|
@@ -71,12 +40,9 @@ export interface DrugSafetyCheckRequest {
|
|
|
71
40
|
*/
|
|
72
41
|
drugs: string[];
|
|
73
42
|
patient_profile?: SafeRx.PatientProfile;
|
|
74
|
-
intelligence_context?: SafeRx.IntelligenceContext;
|
|
75
43
|
/**
|
|
76
|
-
* Safety domains to check. Omit
|
|
77
|
-
*
|
|
78
|
-
* domain codes. Unknown domain codes return `400 INVALID_INCLUDE_DOMAIN`.
|
|
79
|
-
* Duplicate valid domains are accepted and de-duplicated.
|
|
44
|
+
* Safety domains to check. Omit to run all six domains.
|
|
45
|
+
* Including fewer domains reduces response size and may improve latency.
|
|
80
46
|
*/
|
|
81
47
|
include?: SafeRx.DomainCode[];
|
|
82
48
|
/**
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
export interface GetDrugSafetyHealthResponse {
|
|
2
2
|
status?: GetDrugSafetyHealthResponse.Status | undefined;
|
|
3
3
|
subsystem?: string | undefined;
|
|
4
|
-
|
|
5
|
-
checks?: Record<string, unknown> | undefined;
|
|
4
|
+
checks?: Record<string, GetDrugSafetyHealthResponse.Checks.Value> | undefined;
|
|
6
5
|
latency_ms?: number | undefined;
|
|
7
6
|
}
|
|
8
7
|
export declare namespace GetDrugSafetyHealthResponse {
|
|
@@ -11,4 +10,17 @@ export declare namespace GetDrugSafetyHealthResponse {
|
|
|
11
10
|
readonly Degraded: "degraded";
|
|
12
11
|
};
|
|
13
12
|
type Status = (typeof Status)[keyof typeof Status];
|
|
13
|
+
namespace Checks {
|
|
14
|
+
interface Value {
|
|
15
|
+
status?: Value.Status | undefined;
|
|
16
|
+
}
|
|
17
|
+
namespace Value {
|
|
18
|
+
const Status: {
|
|
19
|
+
readonly Healthy: "healthy";
|
|
20
|
+
readonly Degraded: "degraded";
|
|
21
|
+
readonly Unhealthy: "unhealthy";
|
|
22
|
+
};
|
|
23
|
+
type Status = (typeof Status)[keyof typeof Status];
|
|
24
|
+
}
|
|
25
|
+
}
|
|
14
26
|
}
|
|
@@ -5,4 +5,15 @@ export var GetDrugSafetyHealthResponse;
|
|
|
5
5
|
Healthy: "healthy",
|
|
6
6
|
Degraded: "degraded",
|
|
7
7
|
};
|
|
8
|
+
let Checks;
|
|
9
|
+
(function (Checks) {
|
|
10
|
+
let Value;
|
|
11
|
+
(function (Value) {
|
|
12
|
+
Value.Status = {
|
|
13
|
+
Healthy: "healthy",
|
|
14
|
+
Degraded: "degraded",
|
|
15
|
+
Unhealthy: "unhealthy",
|
|
16
|
+
};
|
|
17
|
+
})(Value = Checks.Value || (Checks.Value = {}));
|
|
18
|
+
})(Checks = GetDrugSafetyHealthResponse.Checks || (GetDrugSafetyHealthResponse.Checks = {}));
|
|
8
19
|
})(GetDrugSafetyHealthResponse || (GetDrugSafetyHealthResponse = {}));
|
|
@@ -14,13 +14,11 @@ export interface Alert {
|
|
|
14
14
|
/**
|
|
15
15
|
* Alert source domain and trigger.
|
|
16
16
|
* - `ae_bbw` — Drug has a Black Box Warning
|
|
17
|
-
* - `ddi` — Major (severity
|
|
17
|
+
* - `ddi` — Major (severity 4) or contraindicated (severity 5) interaction
|
|
18
18
|
* - `pllr_pregnancy` — Pregnancy risk >= 6 (Contraindicated or Absolutely Contraindicated)
|
|
19
19
|
* - `pllr_lactation` — Lactation risk >= 6
|
|
20
20
|
* - `clinical_condition` — Clinical condition severity >= 4
|
|
21
21
|
* - `clinical_population` — Clinical population severity >= 4
|
|
22
|
-
* - `allergy_direct` — Product directly matches a supplied patient allergy
|
|
23
|
-
* - `allergy_cross_reactivity` — Product cross-reacts with a supplied patient allergy
|
|
24
22
|
*/
|
|
25
23
|
type: Alert.Type;
|
|
26
24
|
/** Human-readable alert message (English) */
|
|
@@ -48,13 +46,11 @@ export declare namespace Alert {
|
|
|
48
46
|
/**
|
|
49
47
|
* Alert source domain and trigger.
|
|
50
48
|
* - `ae_bbw` — Drug has a Black Box Warning
|
|
51
|
-
* - `ddi` — Major (severity
|
|
49
|
+
* - `ddi` — Major (severity 4) or contraindicated (severity 5) interaction
|
|
52
50
|
* - `pllr_pregnancy` — Pregnancy risk >= 6 (Contraindicated or Absolutely Contraindicated)
|
|
53
51
|
* - `pllr_lactation` — Lactation risk >= 6
|
|
54
52
|
* - `clinical_condition` — Clinical condition severity >= 4
|
|
55
53
|
* - `clinical_population` — Clinical population severity >= 4
|
|
56
|
-
* - `allergy_direct` — Product directly matches a supplied patient allergy
|
|
57
|
-
* - `allergy_cross_reactivity` — Product cross-reacts with a supplied patient allergy
|
|
58
54
|
*/
|
|
59
55
|
const Type: {
|
|
60
56
|
readonly AeBbw: "ae_bbw";
|
|
@@ -63,8 +59,6 @@ export declare namespace Alert {
|
|
|
63
59
|
readonly PllrLactation: "pllr_lactation";
|
|
64
60
|
readonly ClinicalCondition: "clinical_condition";
|
|
65
61
|
readonly ClinicalPopulation: "clinical_population";
|
|
66
|
-
readonly AllergyDirect: "allergy_direct";
|
|
67
|
-
readonly AllergyCrossReactivity: "allergy_cross_reactivity";
|
|
68
62
|
};
|
|
69
63
|
type Type = (typeof Type)[keyof typeof Type];
|
|
70
64
|
}
|
|
@@ -17,13 +17,11 @@ export var Alert;
|
|
|
17
17
|
/**
|
|
18
18
|
* Alert source domain and trigger.
|
|
19
19
|
* - `ae_bbw` — Drug has a Black Box Warning
|
|
20
|
-
* - `ddi` — Major (severity
|
|
20
|
+
* - `ddi` — Major (severity 4) or contraindicated (severity 5) interaction
|
|
21
21
|
* - `pllr_pregnancy` — Pregnancy risk >= 6 (Contraindicated or Absolutely Contraindicated)
|
|
22
22
|
* - `pllr_lactation` — Lactation risk >= 6
|
|
23
23
|
* - `clinical_condition` — Clinical condition severity >= 4
|
|
24
24
|
* - `clinical_population` — Clinical population severity >= 4
|
|
25
|
-
* - `allergy_direct` — Product directly matches a supplied patient allergy
|
|
26
|
-
* - `allergy_cross_reactivity` — Product cross-reacts with a supplied patient allergy
|
|
27
25
|
*/
|
|
28
26
|
Alert.Type = {
|
|
29
27
|
AeBbw: "ae_bbw",
|
|
@@ -32,7 +30,5 @@ export var Alert;
|
|
|
32
30
|
PllrLactation: "pllr_lactation",
|
|
33
31
|
ClinicalCondition: "clinical_condition",
|
|
34
32
|
ClinicalPopulation: "clinical_population",
|
|
35
|
-
AllergyDirect: "allergy_direct",
|
|
36
|
-
AllergyCrossReactivity: "allergy_cross_reactivity",
|
|
37
33
|
};
|
|
38
34
|
})(Alert || (Alert = {}));
|
|
@@ -26,14 +26,6 @@ export interface ClinicalAlert {
|
|
|
26
26
|
contraindicated?: boolean | undefined;
|
|
27
27
|
/** Whether dose adjustment is needed */
|
|
28
28
|
requires_dose_adjustment?: boolean | undefined;
|
|
29
|
-
/** Matched dose-adjustment instruction from the population band, when available. */
|
|
30
|
-
dose_adjustment?: (string | null) | undefined;
|
|
31
|
-
/** Matched dosing recommendation in English, when available. */
|
|
32
|
-
dose_recommendation?: (string | null) | undefined;
|
|
33
|
-
/** Matched dosing recommendation in Arabic, when available. */
|
|
34
|
-
dose_recommendation_ar?: (string | null) | undefined;
|
|
35
|
-
/** Matched renal/hepatic/pediatric context, including the selected band or grade when available. */
|
|
36
|
-
matched_context?: Record<string, unknown> | undefined;
|
|
37
29
|
/** Whether additional monitoring is needed */
|
|
38
30
|
monitoring_required?: boolean | undefined;
|
|
39
31
|
/** Clinical rationale (English) */
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
import type * as SafeRx from "../index.mjs";
|
|
2
2
|
/**
|
|
3
3
|
* Clinical safety considerations combining per-drug population/condition
|
|
4
|
-
* data with cross-drug clinical alerts.
|
|
5
|
-
*
|
|
6
|
-
* lists are narrowed to the supplied populations and conditions.
|
|
4
|
+
* data with cross-drug clinical alerts. Enhanced when `patient_profile`
|
|
5
|
+
* is provided in the request.
|
|
7
6
|
*/
|
|
8
7
|
export interface ClinicalData {
|
|
9
8
|
/** Per-drug clinical data keyed by sfrx_id */
|
|
10
9
|
drug_specific?: Record<string, SafeRx.DrugClinicalData> | undefined;
|
|
11
|
-
/**
|
|
10
|
+
/** Cross-drug condition-related alerts (requires `patient_profile.conditions`) */
|
|
12
11
|
condition_alerts?: SafeRx.ClinicalAlert[] | undefined;
|
|
13
|
-
/**
|
|
12
|
+
/** Cross-drug population-related alerts (requires `patient_profile.populations`) */
|
|
14
13
|
population_alerts?: SafeRx.ClinicalAlert[] | undefined;
|
|
15
|
-
/** Patient context actually applied to clinical-dose matching, including inferred populations from age, renal, or hepatic values. */
|
|
16
|
-
context_applied?: SafeRx.ClinicalContextApplied | undefined;
|
|
17
14
|
}
|
|
@@ -4,9 +4,8 @@
|
|
|
4
4
|
* - `ddi` — Drug-drug interactions (requires 2+ drugs)
|
|
5
5
|
* - `pllr` — Pregnancy & lactation risk ratings
|
|
6
6
|
* - `food` — Meal timing & food-drug conflicts
|
|
7
|
-
* - `clinical` — Population & condition safety
|
|
8
|
-
* - `dose` —
|
|
9
|
-
* - `allergy` — Patient allergy matching plus direct and cross-reactivity warnings
|
|
7
|
+
* - `clinical` — Population & condition safety (enhanced with `patient_profile`)
|
|
8
|
+
* - `dose` — Maximum daily dose (V3: dual-source, 19K+ products, tier-based safety)
|
|
10
9
|
*/
|
|
11
10
|
export declare const DomainCode: {
|
|
12
11
|
readonly Ae: "ae";
|
|
@@ -15,6 +14,5 @@ export declare const DomainCode: {
|
|
|
15
14
|
readonly Food: "food";
|
|
16
15
|
readonly Clinical: "clinical";
|
|
17
16
|
readonly Dose: "dose";
|
|
18
|
-
readonly Allergy: "allergy";
|
|
19
17
|
};
|
|
20
18
|
export type DomainCode = (typeof DomainCode)[keyof typeof DomainCode];
|
|
@@ -5,9 +5,8 @@
|
|
|
5
5
|
* - `ddi` — Drug-drug interactions (requires 2+ drugs)
|
|
6
6
|
* - `pllr` — Pregnancy & lactation risk ratings
|
|
7
7
|
* - `food` — Meal timing & food-drug conflicts
|
|
8
|
-
* - `clinical` — Population & condition safety
|
|
9
|
-
* - `dose` —
|
|
10
|
-
* - `allergy` — Patient allergy matching plus direct and cross-reactivity warnings
|
|
8
|
+
* - `clinical` — Population & condition safety (enhanced with `patient_profile`)
|
|
9
|
+
* - `dose` — Maximum daily dose (V3: dual-source, 19K+ products, tier-based safety)
|
|
11
10
|
*/
|
|
12
11
|
export const DomainCode = {
|
|
13
12
|
Ae: "ae",
|
|
@@ -16,5 +15,4 @@ export const DomainCode = {
|
|
|
16
15
|
Food: "food",
|
|
17
16
|
Clinical: "clinical",
|
|
18
17
|
Dose: "dose",
|
|
19
|
-
Allergy: "allergy",
|
|
20
18
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type * as SafeRx from "../index.mjs";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
3
|
+
* Maximum daily dose data from Dose V3 — dual-source system combining
|
|
4
|
+
* WHO Defined Daily Dose (DDD) and OpenFDA Maximum Daily Dose (MDD).
|
|
5
|
+
* Covers 19,341 products (67.7% of database) with tier-based safety calculations.
|
|
6
6
|
*/
|
|
7
7
|
export interface DosingData {
|
|
8
8
|
/**
|
|
9
9
|
* Data quality tier.
|
|
10
|
-
* - `1`
|
|
11
|
-
* - `2`
|
|
10
|
+
* - `1` — Full reference data (WHO DDD + OpenFDA MDD available)
|
|
11
|
+
* - `2` — Regulatory label data only
|
|
12
12
|
*/
|
|
13
13
|
tier?: number | undefined;
|
|
14
14
|
/** Maximum safe units (tablets, capsules) per day */
|
|
@@ -25,34 +25,24 @@ export interface DosingData {
|
|
|
25
25
|
caveat?: (string | null) | undefined;
|
|
26
26
|
/** WHO DDD reference dose data */
|
|
27
27
|
reference_dose?: (SafeRx.ReferenceDose | null) | undefined;
|
|
28
|
-
/**
|
|
28
|
+
/** OpenFDA maximum daily dose data */
|
|
29
29
|
daily_limit?: (SafeRx.DailyLimit | null) | undefined;
|
|
30
|
-
/** Standard-dose summary when available, including route, frequency, and verification flags. */
|
|
31
|
-
standard_dose?: (Record<string, unknown> | null) | undefined;
|
|
32
|
-
/** Dose-limit records used by the unified dosing path. */
|
|
33
|
-
dose_limits?: Record<string, unknown>[] | undefined;
|
|
34
|
-
/** Clinician/patient display summary for dose limits and caveats, when available. */
|
|
35
|
-
display_summary?: (Record<string, unknown> | null) | undefined;
|
|
36
|
-
/** Calculation uncertainty or review requirement, when available. */
|
|
37
|
-
dose_uncertainty?: (Record<string, unknown> | null) | undefined;
|
|
38
|
-
/** Display-safe monitoring instructions linked to the dose record, when available. */
|
|
39
|
-
monitoring_display?: (Record<string, unknown> | null) | undefined;
|
|
40
30
|
/** Per-ingredient dose data for combination drugs */
|
|
41
31
|
components?: ((SafeRx.DoseComponent | null)[] | null) | undefined;
|
|
42
32
|
/**
|
|
43
33
|
* Data source for this dose calculation.
|
|
44
|
-
* - `reference_standard` —
|
|
45
|
-
* - `regulatory_label` —
|
|
46
|
-
* - `dual_source` —
|
|
34
|
+
* - `reference_standard` — WHO DDD only
|
|
35
|
+
* - `regulatory_label` — OpenFDA MDD only
|
|
36
|
+
* - `dual_source` — Both WHO DDD and OpenFDA MDD available
|
|
47
37
|
*/
|
|
48
38
|
source?: DosingData.Source | undefined;
|
|
49
39
|
}
|
|
50
40
|
export declare namespace DosingData {
|
|
51
41
|
/**
|
|
52
42
|
* Data source for this dose calculation.
|
|
53
|
-
* - `reference_standard` —
|
|
54
|
-
* - `regulatory_label` —
|
|
55
|
-
* - `dual_source` —
|
|
43
|
+
* - `reference_standard` — WHO DDD only
|
|
44
|
+
* - `regulatory_label` — OpenFDA MDD only
|
|
45
|
+
* - `dual_source` — Both WHO DDD and OpenFDA MDD available
|
|
56
46
|
*/
|
|
57
47
|
const Source: {
|
|
58
48
|
readonly ReferenceStandard: "reference_standard";
|
|
@@ -3,9 +3,9 @@ export var DosingData;
|
|
|
3
3
|
(function (DosingData) {
|
|
4
4
|
/**
|
|
5
5
|
* Data source for this dose calculation.
|
|
6
|
-
* - `reference_standard` —
|
|
7
|
-
* - `regulatory_label` —
|
|
8
|
-
* - `dual_source` —
|
|
6
|
+
* - `reference_standard` — WHO DDD only
|
|
7
|
+
* - `regulatory_label` — OpenFDA MDD only
|
|
8
|
+
* - `dual_source` — Both WHO DDD and OpenFDA MDD available
|
|
9
9
|
*/
|
|
10
10
|
DosingData.Source = {
|
|
11
11
|
ReferenceStandard: "reference_standard",
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type * as SafeRx from "../index.mjs";
|
|
2
1
|
export interface ErrorResponse {
|
|
3
2
|
/** Error indicator or error message */
|
|
4
3
|
error?: ErrorResponse.Error_ | undefined;
|
|
@@ -16,10 +15,6 @@ export interface ErrorResponse {
|
|
|
16
15
|
hint?: string | undefined;
|
|
17
16
|
/** Support email for assistance */
|
|
18
17
|
support?: string | undefined;
|
|
19
|
-
/** Invalid safety domain codes supplied in `include`. */
|
|
20
|
-
invalid_domains?: string[] | undefined;
|
|
21
|
-
/** Valid safety domain codes. */
|
|
22
|
-
valid_domains?: SafeRx.DomainCode[] | undefined;
|
|
23
18
|
}
|
|
24
19
|
export declare namespace ErrorResponse {
|
|
25
20
|
/**
|
|
@@ -46,6 +46,8 @@ export interface Interaction {
|
|
|
46
46
|
recommendation?: string | undefined;
|
|
47
47
|
/** Clinical recommendation in Arabic */
|
|
48
48
|
recommendation_ar?: string | undefined;
|
|
49
|
+
/** Data source */
|
|
50
|
+
source?: string | undefined;
|
|
49
51
|
}
|
|
50
52
|
export declare namespace Interaction {
|
|
51
53
|
/** Human-readable severity label */
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
* Interaction count by severity level for quick triage
|
|
3
3
|
*/
|
|
4
4
|
export interface InteractionSummary {
|
|
5
|
-
/** Number of contraindicated (severity
|
|
5
|
+
/** Number of contraindicated (severity 5) interactions */
|
|
6
6
|
contraindicated?: number | undefined;
|
|
7
|
-
/** Number of major (severity
|
|
7
|
+
/** Number of major (severity 4) interactions */
|
|
8
8
|
major?: number | undefined;
|
|
9
|
-
/** Number of moderate (severity
|
|
9
|
+
/** Number of moderate (severity 3) interactions */
|
|
10
10
|
moderate?: number | undefined;
|
|
11
|
-
/** Number of minor (severity
|
|
11
|
+
/** Number of minor (severity 2) interactions */
|
|
12
12
|
minor?: number | undefined;
|
|
13
13
|
}
|
|
@@ -15,13 +15,11 @@ export interface Meta {
|
|
|
15
15
|
unresolved_count?: number | undefined;
|
|
16
16
|
/** Caller's current tier */
|
|
17
17
|
tier?: Meta.Tier | undefined;
|
|
18
|
-
quota?: SafeRx.QuotaMeta | undefined;
|
|
19
18
|
}
|
|
20
19
|
export declare namespace Meta {
|
|
21
20
|
/** Caller's current tier */
|
|
22
21
|
const Tier: {
|
|
23
22
|
readonly Free: "free";
|
|
24
|
-
readonly Startup: "startup";
|
|
25
23
|
readonly Pro: "pro";
|
|
26
24
|
readonly Enterprise: "enterprise";
|
|
27
25
|
};
|
|
@@ -42,8 +42,6 @@ export declare namespace MetadataResponse {
|
|
|
42
42
|
ae_risk_levels?: string[] | undefined;
|
|
43
43
|
/** DDI severity scale: integer key → label */
|
|
44
44
|
ddi_severity?: Record<string, string> | undefined;
|
|
45
|
-
/** Allergy warning severity scale: integer key → label */
|
|
46
|
-
allergy_severity?: Record<string, string> | undefined;
|
|
47
45
|
}
|
|
48
46
|
/**
|
|
49
47
|
* Current database versions
|
|
@@ -54,8 +52,7 @@ export declare namespace MetadataResponse {
|
|
|
54
52
|
clinical?: string | undefined;
|
|
55
53
|
pllr?: string | undefined;
|
|
56
54
|
food?: string | undefined;
|
|
57
|
-
|
|
58
|
-
allergy?: string | undefined;
|
|
55
|
+
dose?: string | undefined;
|
|
59
56
|
}
|
|
60
57
|
/**
|
|
61
58
|
* Database coverage statistics
|
|
@@ -72,20 +69,15 @@ export declare namespace MetadataResponse {
|
|
|
72
69
|
/** Number of supported populations */
|
|
73
70
|
clinical_populations?: number | undefined;
|
|
74
71
|
/** Products with dose data */
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
|
|
78
|
-
/** Products with
|
|
79
|
-
|
|
80
|
-
/** Allergy family count */
|
|
81
|
-
allergy_families?: number | undefined;
|
|
82
|
-
/** Allergy family cross-reaction pair count */
|
|
83
|
-
allergy_cross_reaction_pairs?: number | undefined;
|
|
72
|
+
dose_products?: number | undefined;
|
|
73
|
+
/** Percentage of products with dose coverage */
|
|
74
|
+
dose_coverage_percent?: number | undefined;
|
|
75
|
+
/** Products with max units/day calculation */
|
|
76
|
+
dose_with_calculation?: number | undefined;
|
|
84
77
|
}
|
|
85
78
|
/** Caller's current tier */
|
|
86
79
|
const Tier: {
|
|
87
80
|
readonly Free: "free";
|
|
88
|
-
readonly Startup: "startup";
|
|
89
81
|
readonly Pro: "pro";
|
|
90
82
|
readonly Enterprise: "enterprise";
|
|
91
83
|
};
|
|
@@ -9,35 +9,4 @@ export interface PatientProfile {
|
|
|
9
9
|
populations?: SafeRx.Population[] | undefined;
|
|
10
10
|
/** Patient comorbidities (e.g., diabetes, hypertension) */
|
|
11
11
|
conditions?: SafeRx.Condition[] | undefined;
|
|
12
|
-
/** Known patient allergies for the `allergy` domain. */
|
|
13
|
-
allergies?: string[] | undefined;
|
|
14
|
-
/** Patient age in years. Used to infer pediatric or geriatric clinical-dose context. */
|
|
15
|
-
age?: number | undefined;
|
|
16
|
-
/** Patient weight in kilograms. Used for pediatric weight-based dose context when available. */
|
|
17
|
-
weight_kg?: number | undefined;
|
|
18
|
-
/** Creatinine clearance in mL/min. Supplying this infers the `renal` population and returns matched renal dose-adjustment context when available. */
|
|
19
|
-
crcl?: number | undefined;
|
|
20
|
-
/** eGFR value accepted as a fallback renal-function input when `crcl` is not supplied. */
|
|
21
|
-
egfr?: number | undefined;
|
|
22
|
-
/** Child-Pugh class. Supplying this infers the `hepatic` population and returns matched hepatic dose-adjustment context when available. */
|
|
23
|
-
child_pugh?: PatientProfile.ChildPugh | undefined;
|
|
24
|
-
/** Hepatic impairment severity. `mild`, `moderate`, and `severe` map to hepatic clinical-dose context when `child_pugh` is not supplied. */
|
|
25
|
-
hepatic_status?: PatientProfile.HepaticStatus | undefined;
|
|
26
|
-
}
|
|
27
|
-
export declare namespace PatientProfile {
|
|
28
|
-
/** Child-Pugh class. Supplying this infers the `hepatic` population and returns matched hepatic dose-adjustment context when available. */
|
|
29
|
-
const ChildPugh: {
|
|
30
|
-
readonly A: "A";
|
|
31
|
-
readonly B: "B";
|
|
32
|
-
readonly C: "C";
|
|
33
|
-
};
|
|
34
|
-
type ChildPugh = (typeof ChildPugh)[keyof typeof ChildPugh];
|
|
35
|
-
/** Hepatic impairment severity. `mild`, `moderate`, and `severe` map to hepatic clinical-dose context when `child_pugh` is not supplied. */
|
|
36
|
-
const HepaticStatus: {
|
|
37
|
-
readonly Normal: "normal";
|
|
38
|
-
readonly Mild: "mild";
|
|
39
|
-
readonly Moderate: "moderate";
|
|
40
|
-
readonly Severe: "severe";
|
|
41
|
-
};
|
|
42
|
-
type HepaticStatus = (typeof HepaticStatus)[keyof typeof HepaticStatus];
|
|
43
12
|
}
|