phenoml 12.5.0 → 13.1.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 (106) hide show
  1. package/dist/cjs/BaseClient.d.ts +3 -0
  2. package/dist/cjs/BaseClient.js +17 -2
  3. package/dist/cjs/api/resources/agent/client/Client.js +17 -9
  4. package/dist/cjs/api/resources/agent/resources/prompts/client/Client.js +7 -7
  5. package/dist/cjs/api/resources/authtoken/resources/auth/client/Client.js +1 -1
  6. package/dist/cjs/api/resources/cohort/client/Client.js +1 -1
  7. package/dist/cjs/api/resources/construe/client/Client.js +39 -11
  8. package/dist/cjs/api/resources/fhir/client/Client.js +10 -6
  9. package/dist/cjs/api/resources/fhirProvider/client/Client.js +7 -7
  10. package/dist/cjs/api/resources/lang2Fhir/client/Client.d.ts +11 -3
  11. package/dist/cjs/api/resources/lang2Fhir/client/Client.js +16 -8
  12. package/dist/cjs/api/resources/lang2Fhir/client/requests/DocumentMultiRequest.d.ts +2 -0
  13. package/dist/cjs/api/resources/lang2Fhir/client/requests/DocumentRequest.d.ts +2 -0
  14. package/dist/cjs/api/resources/lang2Fhir/types/CreateMultiResponse.d.ts +3 -1
  15. package/dist/cjs/api/resources/lang2Fhir/types/DocumentConfig.d.ts +7 -0
  16. package/dist/cjs/api/resources/lang2Fhir/types/DocumentConfig.js +3 -0
  17. package/dist/cjs/api/resources/lang2Fhir/types/DocumentMultiResponse.d.ts +5 -0
  18. package/dist/cjs/api/resources/lang2Fhir/types/DocumentMultiResponse.js +3 -0
  19. package/dist/cjs/api/resources/lang2Fhir/types/PageClassification.d.ts +11 -0
  20. package/dist/cjs/api/resources/lang2Fhir/types/PageClassification.js +3 -0
  21. package/dist/cjs/api/resources/lang2Fhir/types/PageFilter.d.ts +7 -0
  22. package/dist/cjs/api/resources/lang2Fhir/types/PageFilter.js +3 -0
  23. package/dist/cjs/api/resources/lang2Fhir/types/index.d.ts +4 -0
  24. package/dist/cjs/api/resources/lang2Fhir/types/index.js +4 -0
  25. package/dist/cjs/api/resources/summary/client/Client.js +6 -6
  26. package/dist/cjs/api/resources/tools/client/Client.js +4 -4
  27. package/dist/cjs/api/resources/tools/client/requests/Lang2FhirAndSearchRequest.d.ts +0 -2
  28. package/dist/cjs/api/resources/tools/resources/mcpServer/client/Client.js +4 -4
  29. package/dist/cjs/api/resources/tools/resources/mcpServer/resources/tools/client/Client.js +4 -4
  30. package/dist/cjs/api/resources/workflows/client/Client.js +22 -6
  31. package/dist/cjs/core/auth/AuthProvider.d.ts +1 -0
  32. package/dist/cjs/core/auth/AuthProvider.js +7 -0
  33. package/dist/cjs/core/auth/BasicAuth.d.ts +2 -2
  34. package/dist/cjs/core/auth/BasicAuth.js +7 -1
  35. package/dist/cjs/core/auth/index.d.ts +1 -1
  36. package/dist/cjs/core/auth/index.js +3 -1
  37. package/dist/cjs/core/fetcher/Fetcher.d.ts +8 -0
  38. package/dist/cjs/core/fetcher/Fetcher.js +13 -8
  39. package/dist/cjs/core/fetcher/requestWithRetries.js +4 -1
  40. package/dist/cjs/core/url/QueryStringBuilder.d.ts +47 -0
  41. package/dist/cjs/core/url/QueryStringBuilder.js +83 -0
  42. package/dist/cjs/core/url/index.d.ts +1 -0
  43. package/dist/cjs/core/url/index.js +3 -1
  44. package/dist/cjs/core/url/qs.d.ts +2 -1
  45. package/dist/cjs/core/url/qs.js +24 -12
  46. package/dist/cjs/errors/handleNonStatusCodeError.js +4 -1
  47. package/dist/cjs/errors/phenomlError.d.ts +3 -1
  48. package/dist/cjs/errors/phenomlError.js +4 -1
  49. package/dist/cjs/errors/phenomlTimeoutError.d.ts +4 -1
  50. package/dist/cjs/errors/phenomlTimeoutError.js +4 -1
  51. package/dist/cjs/version.d.ts +1 -1
  52. package/dist/cjs/version.js +1 -1
  53. package/dist/esm/BaseClient.d.mts +3 -0
  54. package/dist/esm/BaseClient.mjs +17 -2
  55. package/dist/esm/api/resources/agent/client/Client.mjs +17 -9
  56. package/dist/esm/api/resources/agent/resources/prompts/client/Client.mjs +7 -7
  57. package/dist/esm/api/resources/authtoken/resources/auth/client/Client.mjs +1 -1
  58. package/dist/esm/api/resources/cohort/client/Client.mjs +1 -1
  59. package/dist/esm/api/resources/construe/client/Client.mjs +39 -11
  60. package/dist/esm/api/resources/fhir/client/Client.mjs +10 -6
  61. package/dist/esm/api/resources/fhirProvider/client/Client.mjs +7 -7
  62. package/dist/esm/api/resources/lang2Fhir/client/Client.d.mts +11 -3
  63. package/dist/esm/api/resources/lang2Fhir/client/Client.mjs +16 -8
  64. package/dist/esm/api/resources/lang2Fhir/client/requests/DocumentMultiRequest.d.mts +2 -0
  65. package/dist/esm/api/resources/lang2Fhir/client/requests/DocumentRequest.d.mts +2 -0
  66. package/dist/esm/api/resources/lang2Fhir/types/CreateMultiResponse.d.mts +3 -1
  67. package/dist/esm/api/resources/lang2Fhir/types/DocumentConfig.d.mts +7 -0
  68. package/dist/esm/api/resources/lang2Fhir/types/DocumentConfig.mjs +2 -0
  69. package/dist/esm/api/resources/lang2Fhir/types/DocumentMultiResponse.d.mts +5 -0
  70. package/dist/esm/api/resources/lang2Fhir/types/DocumentMultiResponse.mjs +2 -0
  71. package/dist/esm/api/resources/lang2Fhir/types/PageClassification.d.mts +11 -0
  72. package/dist/esm/api/resources/lang2Fhir/types/PageClassification.mjs +2 -0
  73. package/dist/esm/api/resources/lang2Fhir/types/PageFilter.d.mts +7 -0
  74. package/dist/esm/api/resources/lang2Fhir/types/PageFilter.mjs +2 -0
  75. package/dist/esm/api/resources/lang2Fhir/types/index.d.mts +4 -0
  76. package/dist/esm/api/resources/lang2Fhir/types/index.mjs +4 -0
  77. package/dist/esm/api/resources/summary/client/Client.mjs +6 -6
  78. package/dist/esm/api/resources/tools/client/Client.mjs +4 -4
  79. package/dist/esm/api/resources/tools/client/requests/Lang2FhirAndSearchRequest.d.mts +0 -2
  80. package/dist/esm/api/resources/tools/resources/mcpServer/client/Client.mjs +4 -4
  81. package/dist/esm/api/resources/tools/resources/mcpServer/resources/tools/client/Client.mjs +4 -4
  82. package/dist/esm/api/resources/workflows/client/Client.mjs +22 -6
  83. package/dist/esm/core/auth/AuthProvider.d.mts +1 -0
  84. package/dist/esm/core/auth/AuthProvider.mjs +6 -1
  85. package/dist/esm/core/auth/BasicAuth.d.mts +2 -2
  86. package/dist/esm/core/auth/BasicAuth.mjs +7 -1
  87. package/dist/esm/core/auth/index.d.mts +1 -1
  88. package/dist/esm/core/auth/index.mjs +1 -0
  89. package/dist/esm/core/fetcher/Fetcher.d.mts +8 -0
  90. package/dist/esm/core/fetcher/Fetcher.mjs +13 -8
  91. package/dist/esm/core/fetcher/requestWithRetries.mjs +4 -1
  92. package/dist/esm/core/url/QueryStringBuilder.d.mts +47 -0
  93. package/dist/esm/core/url/QueryStringBuilder.mjs +80 -0
  94. package/dist/esm/core/url/index.d.mts +1 -0
  95. package/dist/esm/core/url/index.mjs +1 -0
  96. package/dist/esm/core/url/qs.d.mts +2 -1
  97. package/dist/esm/core/url/qs.mjs +24 -12
  98. package/dist/esm/errors/handleNonStatusCodeError.mjs +4 -1
  99. package/dist/esm/errors/phenomlError.d.mts +3 -1
  100. package/dist/esm/errors/phenomlError.mjs +4 -1
  101. package/dist/esm/errors/phenomlTimeoutError.d.mts +4 -1
  102. package/dist/esm/errors/phenomlTimeoutError.mjs +4 -1
  103. package/dist/esm/version.d.mts +1 -1
  104. package/dist/esm/version.mjs +1 -1
  105. package/package.json +2 -2
  106. package/reference.md +11 -3
@@ -1,11 +1,14 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
2
  export class phenomlTimeoutError extends Error {
3
- constructor(message) {
3
+ constructor(message, opts) {
4
4
  super(message);
5
5
  Object.setPrototypeOf(this, new.target.prototype);
6
6
  if (Error.captureStackTrace) {
7
7
  Error.captureStackTrace(this, this.constructor);
8
8
  }
9
9
  this.name = this.constructor.name;
10
+ if ((opts === null || opts === void 0 ? void 0 : opts.cause) != null) {
11
+ this.cause = opts.cause;
12
+ }
10
13
  }
11
14
  }
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "12.5.0";
1
+ export declare const SDK_VERSION = "13.1.0";
@@ -1 +1 @@
1
- export const SDK_VERSION = "12.5.0";
1
+ export const SDK_VERSION = "13.1.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phenoml",
3
- "version": "12.5.0",
3
+ "version": "13.1.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -204,7 +204,7 @@
204
204
  "ts-loader": "^9.5.4",
205
205
  "vitest": "^4.1.1",
206
206
  "msw": "2.11.2",
207
- "@types/node": "^18.19.70",
207
+ "@types/node": "^20.0.0",
208
208
  "typescript": "~5.9.3",
209
209
  "@biomejs/biome": "2.4.10"
210
210
  },
package/reference.md CHANGED
@@ -3171,7 +3171,9 @@ await client.fhirProvider.removeAuthConfig("1716d214-de93-43a4-aa6b-a878d864e2ad
3171
3171
  <dl>
3172
3172
  <dd>
3173
3173
 
3174
- Converts natural language text into a structured FHIR resource
3174
+ Converts natural language text into a structured FHIR resource.
3175
+
3176
+ **Patient identifier handling.** When generating a `patient` (or `patient-canvas`) resource, US Core requires `Patient.identifier` (a business identifier such as an MRN). When the source text contains an identifier, it is extracted with an appropriate URI system. When the source text does not contain a detectable identifier, a synthetic one is generated with `system: "urn:phenoml:lang2fhir-generated-id"` and a UUID `value` so the resource remains FHIR-valid and US Core conformant. Callers who need a tenant-specific namespace should rewrite the synthetic system after extraction.
3175
3177
  </dd>
3176
3178
  </dl>
3177
3179
  </dd>
@@ -3241,6 +3243,8 @@ await client.lang2Fhir.create({
3241
3243
  Analyzes natural language text and extracts multiple FHIR resources, returning them as a transaction Bundle.
3242
3244
  Automatically detects Patient, Condition, MedicationRequest, Observation, and other resource types from the text.
3243
3245
  Resources are linked with proper references (e.g., Conditions reference the Patient).
3246
+
3247
+ **Patient identifier handling.** US Core requires `Patient.identifier` (a business identifier such as an MRN). When the source text contains an identifier, it is extracted with an appropriate URI system. When the source text does not contain a detectable identifier, a synthetic one is generated with `system: "urn:phenoml:lang2fhir-generated-id"` and a UUID `value` so the bundle remains FHIR-valid and US Core conformant. Callers who need a tenant-specific namespace should rewrite the synthetic system after extraction.
3244
3248
  </dd>
3245
3249
  </dl>
3246
3250
  </dd>
@@ -3451,7 +3455,9 @@ await client.lang2Fhir.uploadProfile({
3451
3455
  <dl>
3452
3456
  <dd>
3453
3457
 
3454
- Extracts text from a document (PDF or image) and converts it into a structured FHIR resource
3458
+ Extracts text from a document (PDF or image) and converts it into a structured FHIR resource.
3459
+
3460
+ **Patient identifier handling.** When generating a `patient` (or `patient-canvas`) resource, US Core requires `Patient.identifier` (a business identifier such as an MRN). When the source text contains an identifier, it is extracted with an appropriate URI system. When the source text does not contain a detectable identifier, a synthetic one is generated with `system: "urn:phenoml:lang2fhir-generated-id"` and a UUID `value` so the resource remains FHIR-valid and US Core conformant. Callers who need a tenant-specific namespace should rewrite the synthetic system after extraction.
3455
3461
  </dd>
3456
3462
  </dl>
3457
3463
  </dd>
@@ -3506,7 +3512,7 @@ await client.lang2Fhir.document({
3506
3512
  </dl>
3507
3513
  </details>
3508
3514
 
3509
- <details><summary><code>client.lang2Fhir.<a href="/src/api/resources/lang2Fhir/client/Client.ts">extractMultipleFhirResourcesFromADocument</a>({ ...params }) -> phenoml.CreateMultiResponse</code></summary>
3515
+ <details><summary><code>client.lang2Fhir.<a href="/src/api/resources/lang2Fhir/client/Client.ts">extractMultipleFhirResourcesFromADocument</a>({ ...params }) -> phenoml.DocumentMultiResponse</code></summary>
3510
3516
  <dl>
3511
3517
  <dd>
3512
3518
 
@@ -3522,6 +3528,8 @@ Extracts text from a document (PDF or image) and converts it into multiple FHIR
3522
3528
  returned as a transaction Bundle. Combines document text extraction with multi-resource detection.
3523
3529
  Automatically detects Patient, Condition, MedicationRequest, Observation, and other resource types.
3524
3530
  Resources are linked with proper references (e.g., Conditions reference the Patient).
3531
+
3532
+ **Patient identifier handling.** US Core requires `Patient.identifier` (a business identifier such as an MRN). When the source text contains an identifier, it is extracted with an appropriate URI system. When the source text does not contain a detectable identifier, a synthetic one is generated with `system: "urn:phenoml:lang2fhir-generated-id"` and a UUID `value` so the bundle remains FHIR-valid and US Core conformant. Callers who need a tenant-specific namespace should rewrite the synthetic system after extraction.
3525
3533
  </dd>
3526
3534
  </dl>
3527
3535
  </dd>