phenoml 13.1.0 → 14.0.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 (124) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/agent/client/Client.d.ts +24 -12
  3. package/dist/cjs/api/resources/agent/client/Client.js +24 -12
  4. package/dist/cjs/api/resources/agent/client/requests/AgentChatRequest.d.ts +11 -0
  5. package/dist/cjs/api/resources/agent/client/requests/AgentStreamChatRequest.d.ts +1 -0
  6. package/dist/cjs/api/resources/agent/resources/prompts/client/Client.d.ts +13 -25
  7. package/dist/cjs/api/resources/agent/resources/prompts/client/Client.js +13 -64
  8. package/dist/cjs/api/resources/agent/resources/prompts/client/requests/AgentPromptsCreateRequest.d.ts +4 -1
  9. package/dist/cjs/api/resources/agent/resources/prompts/client/requests/AgentPromptsUpdateRequest.d.ts +7 -1
  10. package/dist/cjs/api/resources/authtoken/resources/auth/client/Client.d.ts +4 -1
  11. package/dist/cjs/api/resources/authtoken/resources/auth/client/Client.js +4 -1
  12. package/dist/cjs/api/resources/authtoken/resources/auth/client/requests/ClientCredentialsRequest.d.ts +4 -1
  13. package/dist/cjs/api/resources/construe/client/Client.d.ts +95 -11
  14. package/dist/cjs/api/resources/construe/client/Client.js +95 -11
  15. package/dist/cjs/api/resources/construe/client/requests/ExtractRequest.d.ts +60 -1
  16. package/dist/cjs/api/resources/construe/client/requests/FeedbackRequest.d.ts +14 -7
  17. package/dist/cjs/api/resources/construe/client/requests/UploadRequest.d.ts +18 -1
  18. package/dist/cjs/api/resources/fhirProvider/client/Client.d.ts +10 -7
  19. package/dist/cjs/api/resources/fhirProvider/client/Client.js +10 -7
  20. package/dist/cjs/api/resources/fhirProvider/client/requests/FhirProviderCreateRequest.d.ts +5 -3
  21. package/dist/cjs/api/resources/fhirProvider/client/requests/FhirProviderRemoveAuthConfigRequest.d.ts +1 -1
  22. package/dist/cjs/api/resources/fhirProvider/client/requests/FhirProviderSetActiveAuthConfigRequest.d.ts +1 -1
  23. package/dist/cjs/api/resources/fhirProvider/types/FhirProviderSandboxInfo.d.ts +6 -4
  24. package/dist/cjs/api/resources/fhirProvider/types/FhirProviderTemplate.d.ts +10 -5
  25. package/dist/cjs/api/resources/lang2Fhir/client/Client.d.ts +17 -6
  26. package/dist/cjs/api/resources/lang2Fhir/client/Client.js +17 -6
  27. package/dist/cjs/api/resources/lang2Fhir/client/requests/CreateMultiRequest.d.ts +2 -1
  28. package/dist/cjs/api/resources/lang2Fhir/client/requests/CreateRequest.d.ts +9 -2
  29. package/dist/cjs/api/resources/lang2Fhir/client/requests/DocumentMultiRequest.d.ts +2 -1
  30. package/dist/cjs/api/resources/lang2Fhir/client/requests/DocumentRequest.d.ts +1 -1
  31. package/dist/cjs/api/resources/lang2Fhir/client/requests/ProfileUploadRequest.d.ts +3 -1
  32. package/dist/cjs/api/resources/lang2Fhir/types/SearchResponse.d.ts +2 -2
  33. package/dist/cjs/api/resources/summary/client/Client.d.ts +74 -9
  34. package/dist/cjs/api/resources/summary/client/Client.js +74 -9
  35. package/dist/cjs/api/resources/summary/client/requests/CreateSummaryRequest.d.ts +67 -11
  36. package/dist/cjs/api/resources/summary/client/requests/CreateSummaryTemplateRequest.d.ts +4 -4
  37. package/dist/cjs/api/resources/summary/client/requests/UpdateSummaryTemplateRequest.d.ts +4 -4
  38. package/dist/cjs/api/resources/summary/types/index.d.ts +0 -2
  39. package/dist/cjs/api/resources/summary/types/index.js +0 -2
  40. package/dist/cjs/api/resources/tools/client/Client.d.ts +7 -3
  41. package/dist/cjs/api/resources/tools/client/Client.js +7 -3
  42. package/dist/cjs/api/resources/tools/client/requests/Lang2FhirAndCreateMultiRequest.d.ts +1 -0
  43. package/dist/cjs/api/resources/tools/client/requests/Lang2FhirAndCreateRequest.d.ts +3 -2
  44. package/dist/cjs/api/resources/tools/client/requests/Lang2FhirAndSearchRequest.d.ts +3 -1
  45. package/dist/cjs/api/resources/tools/types/McpServer.d.ts +10 -0
  46. package/dist/cjs/api/resources/tools/types/McpServerResponse.d.ts +12 -16
  47. package/dist/cjs/api/resources/tools/types/McpServerTool.d.ts +14 -0
  48. package/dist/cjs/api/resources/tools/types/McpServerToolResponse.d.ts +7 -20
  49. package/dist/cjs/api/resources/tools/types/index.d.ts +2 -0
  50. package/dist/cjs/api/resources/tools/types/index.js +2 -0
  51. package/dist/cjs/api/resources/workflows/client/Client.d.ts +21 -9
  52. package/dist/cjs/api/resources/workflows/client/Client.js +21 -9
  53. package/dist/cjs/api/resources/workflows/client/requests/CreateWorkflowRequest.d.ts +3 -2
  54. package/dist/cjs/api/resources/workflows/client/requests/ExecuteWorkflowRequest.d.ts +11 -1
  55. package/dist/cjs/api/resources/workflows/client/requests/UpdateWorkflowRequest.d.ts +6 -5
  56. package/dist/cjs/version.d.ts +1 -1
  57. package/dist/cjs/version.js +1 -1
  58. package/dist/esm/BaseClient.mjs +2 -2
  59. package/dist/esm/api/resources/agent/client/Client.d.mts +24 -12
  60. package/dist/esm/api/resources/agent/client/Client.mjs +24 -12
  61. package/dist/esm/api/resources/agent/client/requests/AgentChatRequest.d.mts +11 -0
  62. package/dist/esm/api/resources/agent/client/requests/AgentStreamChatRequest.d.mts +1 -0
  63. package/dist/esm/api/resources/agent/resources/prompts/client/Client.d.mts +13 -25
  64. package/dist/esm/api/resources/agent/resources/prompts/client/Client.mjs +13 -64
  65. package/dist/esm/api/resources/agent/resources/prompts/client/requests/AgentPromptsCreateRequest.d.mts +4 -1
  66. package/dist/esm/api/resources/agent/resources/prompts/client/requests/AgentPromptsUpdateRequest.d.mts +7 -1
  67. package/dist/esm/api/resources/authtoken/resources/auth/client/Client.d.mts +4 -1
  68. package/dist/esm/api/resources/authtoken/resources/auth/client/Client.mjs +4 -1
  69. package/dist/esm/api/resources/authtoken/resources/auth/client/requests/ClientCredentialsRequest.d.mts +4 -1
  70. package/dist/esm/api/resources/construe/client/Client.d.mts +95 -11
  71. package/dist/esm/api/resources/construe/client/Client.mjs +95 -11
  72. package/dist/esm/api/resources/construe/client/requests/ExtractRequest.d.mts +60 -1
  73. package/dist/esm/api/resources/construe/client/requests/FeedbackRequest.d.mts +14 -7
  74. package/dist/esm/api/resources/construe/client/requests/UploadRequest.d.mts +18 -1
  75. package/dist/esm/api/resources/fhirProvider/client/Client.d.mts +10 -7
  76. package/dist/esm/api/resources/fhirProvider/client/Client.mjs +10 -7
  77. package/dist/esm/api/resources/fhirProvider/client/requests/FhirProviderCreateRequest.d.mts +5 -3
  78. package/dist/esm/api/resources/fhirProvider/client/requests/FhirProviderRemoveAuthConfigRequest.d.mts +1 -1
  79. package/dist/esm/api/resources/fhirProvider/client/requests/FhirProviderSetActiveAuthConfigRequest.d.mts +1 -1
  80. package/dist/esm/api/resources/fhirProvider/types/FhirProviderSandboxInfo.d.mts +6 -4
  81. package/dist/esm/api/resources/fhirProvider/types/FhirProviderTemplate.d.mts +10 -5
  82. package/dist/esm/api/resources/lang2Fhir/client/Client.d.mts +17 -6
  83. package/dist/esm/api/resources/lang2Fhir/client/Client.mjs +17 -6
  84. package/dist/esm/api/resources/lang2Fhir/client/requests/CreateMultiRequest.d.mts +2 -1
  85. package/dist/esm/api/resources/lang2Fhir/client/requests/CreateRequest.d.mts +9 -2
  86. package/dist/esm/api/resources/lang2Fhir/client/requests/DocumentMultiRequest.d.mts +2 -1
  87. package/dist/esm/api/resources/lang2Fhir/client/requests/DocumentRequest.d.mts +1 -1
  88. package/dist/esm/api/resources/lang2Fhir/client/requests/ProfileUploadRequest.d.mts +3 -1
  89. package/dist/esm/api/resources/lang2Fhir/types/SearchResponse.d.mts +2 -2
  90. package/dist/esm/api/resources/summary/client/Client.d.mts +74 -9
  91. package/dist/esm/api/resources/summary/client/Client.mjs +74 -9
  92. package/dist/esm/api/resources/summary/client/requests/CreateSummaryRequest.d.mts +67 -11
  93. package/dist/esm/api/resources/summary/client/requests/CreateSummaryTemplateRequest.d.mts +4 -4
  94. package/dist/esm/api/resources/summary/client/requests/UpdateSummaryTemplateRequest.d.mts +4 -4
  95. package/dist/esm/api/resources/summary/types/index.d.mts +0 -2
  96. package/dist/esm/api/resources/summary/types/index.mjs +0 -2
  97. package/dist/esm/api/resources/tools/client/Client.d.mts +7 -3
  98. package/dist/esm/api/resources/tools/client/Client.mjs +7 -3
  99. package/dist/esm/api/resources/tools/client/requests/Lang2FhirAndCreateMultiRequest.d.mts +1 -0
  100. package/dist/esm/api/resources/tools/client/requests/Lang2FhirAndCreateRequest.d.mts +3 -2
  101. package/dist/esm/api/resources/tools/client/requests/Lang2FhirAndSearchRequest.d.mts +3 -1
  102. package/dist/esm/api/resources/tools/types/McpServer.d.mts +10 -0
  103. package/dist/esm/api/resources/tools/types/McpServerResponse.d.mts +12 -16
  104. package/dist/esm/api/resources/tools/types/McpServerTool.d.mts +14 -0
  105. package/dist/esm/api/resources/tools/types/McpServerToolResponse.d.mts +7 -20
  106. package/dist/esm/api/resources/tools/types/index.d.mts +2 -0
  107. package/dist/esm/api/resources/tools/types/index.mjs +2 -0
  108. package/dist/esm/api/resources/workflows/client/Client.d.mts +21 -9
  109. package/dist/esm/api/resources/workflows/client/Client.mjs +21 -9
  110. package/dist/esm/api/resources/workflows/client/requests/CreateWorkflowRequest.d.mts +3 -2
  111. package/dist/esm/api/resources/workflows/client/requests/ExecuteWorkflowRequest.d.mts +11 -1
  112. package/dist/esm/api/resources/workflows/client/requests/UpdateWorkflowRequest.d.mts +6 -5
  113. package/dist/esm/version.d.mts +1 -1
  114. package/dist/esm/version.mjs +1 -1
  115. package/package.json +1 -1
  116. package/reference.md +140 -124
  117. package/dist/cjs/api/resources/summary/types/FhirBundle.d.ts +0 -13
  118. package/dist/cjs/api/resources/summary/types/FhirResource.d.ts +0 -6
  119. package/dist/esm/api/resources/summary/types/FhirBundle.d.mts +0 -13
  120. package/dist/esm/api/resources/summary/types/FhirResource.d.mts +0 -6
  121. /package/dist/cjs/api/resources/{summary/types/FhirBundle.js → tools/types/McpServer.js} +0 -0
  122. /package/dist/cjs/api/resources/{summary/types/FhirResource.js → tools/types/McpServerTool.js} +0 -0
  123. /package/dist/esm/api/resources/{summary/types/FhirBundle.mjs → tools/types/McpServer.mjs} +0 -0
  124. /package/dist/esm/api/resources/{summary/types/FhirResource.mjs → tools/types/McpServerTool.mjs} +0 -0
@@ -30,7 +30,24 @@ export declare class ConstrueClient {
30
30
  * await client.construe.uploadCodeSystem({
31
31
  * name: "CUSTOM_CODES",
32
32
  * version: "1.0",
33
- * format: "csv"
33
+ * format: "json",
34
+ * codes: [{
35
+ * code: "X001",
36
+ * description: "Example custom code 1"
37
+ * }, {
38
+ * code: "X002",
39
+ * description: "Example custom code 2"
40
+ * }]
41
+ * })
42
+ *
43
+ * @example
44
+ * await client.construe.uploadCodeSystem({
45
+ * name: "CUSTOM_CODES",
46
+ * version: "1.0",
47
+ * format: "csv",
48
+ * file: "Y29kZSxkZXNjcmlwdGlvbgpYMDAxLEV4YW1wbGUgY3VzdG9tIGNvZGUgMQo=",
49
+ * code_col: "code",
50
+ * desc_col: "description"
34
51
  * })
35
52
  */
36
53
  uploadCodeSystem(request: phenoml.construe.UploadRequest, requestOptions?: ConstrueClient.RequestOptions): core.HttpResponsePromise<phenoml.construe.ConstrueUploadCodeSystemResponse>;
@@ -52,7 +69,66 @@ export declare class ConstrueClient {
52
69
  *
53
70
  * @example
54
71
  * await client.construe.extractCodes({
55
- * text: "Patient is a 14-year-old female, previously healthy, who is here for evaluation of abnormal renal ultrasound with atrophic right kidney"
72
+ * text: "Patient is a 14-year-old female, previously healthy, who is here for evaluation of abnormal renal ultrasound with atrophic right kidney.",
73
+ * system: {
74
+ * name: "ICD-10-CM",
75
+ * version: "2025"
76
+ * }
77
+ * })
78
+ *
79
+ * @example
80
+ * await client.construe.extractCodes({
81
+ * text: "45-year-old male presents with chest pain radiating to left arm, shortness of breath, and diaphoresis. ECG shows ST elevation in leads II, III, and aVF.",
82
+ * system: {
83
+ * name: "SNOMED_CT_US_LITE",
84
+ * version: "20240901"
85
+ * },
86
+ * config: {
87
+ * chunking_method: "sentences",
88
+ * validation_method: "simple",
89
+ * include_rationale: true,
90
+ * include_citations: true
91
+ * }
92
+ * })
93
+ *
94
+ * @example
95
+ * await client.construe.extractCodes({
96
+ * text: "Start Metformin 500mg twice daily for type 2 diabetes. Continue Lisinopril 10mg daily for hypertension. Add Atorvastatin 20mg at bedtime.",
97
+ * system: {
98
+ * name: "RXNORM",
99
+ * version: "11042024"
100
+ * },
101
+ * config: {
102
+ * validation_method: "medication_search",
103
+ * include_rationale: true
104
+ * }
105
+ * })
106
+ *
107
+ * @example
108
+ * await client.construe.extractCodes({
109
+ * text: "Patient diagnosed with Type 2 diabetes mellitus with diabetic chronic kidney disease, stage 3.",
110
+ * system: {
111
+ * name: "ICD-10-CM",
112
+ * version: "2025"
113
+ * },
114
+ * config: {
115
+ * validation_method: "simple",
116
+ * include_ancestors: true
117
+ * }
118
+ * })
119
+ *
120
+ * @example
121
+ * await client.construe.extractCodes({
122
+ * text: "5-year-old male with seizures, severe intellectual disability, microcephaly, and hypotonia.",
123
+ * system: {
124
+ * name: "HPO",
125
+ * version: "2025"
126
+ * },
127
+ * config: {
128
+ * chunking_method: "fasthpocr",
129
+ * validation_method: "none",
130
+ * include_rationale: false
131
+ * }
56
132
  * })
57
133
  */
58
134
  extractCodes(request: phenoml.construe.ExtractRequest, requestOptions?: ConstrueClient.RequestOptions): core.HttpResponsePromise<phenoml.construe.ExtractCodesResult>;
@@ -163,7 +239,8 @@ export declare class ConstrueClient {
163
239
  * Usage of CPT is subject to AMA requirements: see PhenoML Terms of Service.
164
240
  *
165
241
  * @param {string} codesystem - Code system name
166
- * @param {string} codeID - The code identifier
242
+ * @param {string} codeID - The code identifier. ICD-10-CM codes are stored without their
243
+ * cosmetic dot (use "E1165", not "E11.65").
167
244
  * @param {phenoml.construe.GetConstrueCodesCodesystemCodeIdRequest} request
168
245
  * @param {ConstrueClient.RequestOptions} requestOptions - Request-specific configuration.
169
246
  *
@@ -173,7 +250,7 @@ export declare class ConstrueClient {
173
250
  * @throws {@link phenoml.construe.InternalServerError}
174
251
  *
175
252
  * @example
176
- * await client.construe.getASpecificCode("ICD-10-CM", "E11.65", {
253
+ * await client.construe.getASpecificCode("ICD-10-CM", "E1165", {
177
254
  * version: "version"
178
255
  * })
179
256
  */
@@ -234,21 +311,28 @@ export declare class ConstrueClient {
234
311
  * await client.construe.submitFeedbackOnExtractionResults({
235
312
  * text: "Patient has type 2 diabetes with hyperglycemia",
236
313
  * received_result: {
237
- * system: {},
314
+ * system: {
315
+ * name: "ICD-10-CM",
316
+ * version: "2025"
317
+ * },
238
318
  * codes: [{
239
- * code: "195967001",
240
- * description: "Asthma",
319
+ * code: "E11.9",
320
+ * description: "Type 2 diabetes mellitus without complications",
241
321
  * valid: true
242
322
  * }]
243
323
  * },
244
324
  * expected_result: {
245
- * system: {},
325
+ * system: {
326
+ * name: "ICD-10-CM",
327
+ * version: "2025"
328
+ * },
246
329
  * codes: [{
247
- * code: "195967001",
248
- * description: "Asthma",
330
+ * code: "E11.65",
331
+ * description: "Type 2 diabetes mellitus with hyperglycemia",
249
332
  * valid: true
250
333
  * }]
251
- * }
334
+ * },
335
+ * detail: "Expected code E11.65 because the text mentions hyperglycemia"
252
336
  * })
253
337
  */
254
338
  submitFeedbackOnExtractionResults(request: phenoml.construe.FeedbackRequest, requestOptions?: ConstrueClient.RequestOptions): core.HttpResponsePromise<phenoml.construe.FeedbackResponse>;
@@ -39,7 +39,24 @@ export class ConstrueClient {
39
39
  * await client.construe.uploadCodeSystem({
40
40
  * name: "CUSTOM_CODES",
41
41
  * version: "1.0",
42
- * format: "csv"
42
+ * format: "json",
43
+ * codes: [{
44
+ * code: "X001",
45
+ * description: "Example custom code 1"
46
+ * }, {
47
+ * code: "X002",
48
+ * description: "Example custom code 2"
49
+ * }]
50
+ * })
51
+ *
52
+ * @example
53
+ * await client.construe.uploadCodeSystem({
54
+ * name: "CUSTOM_CODES",
55
+ * version: "1.0",
56
+ * format: "csv",
57
+ * file: "Y29kZSxkZXNjcmlwdGlvbgpYMDAxLEV4YW1wbGUgY3VzdG9tIGNvZGUgMQo=",
58
+ * code_col: "code",
59
+ * desc_col: "description"
43
60
  * })
44
61
  */
45
62
  uploadCodeSystem(request, requestOptions) {
@@ -112,7 +129,66 @@ export class ConstrueClient {
112
129
  *
113
130
  * @example
114
131
  * await client.construe.extractCodes({
115
- * text: "Patient is a 14-year-old female, previously healthy, who is here for evaluation of abnormal renal ultrasound with atrophic right kidney"
132
+ * text: "Patient is a 14-year-old female, previously healthy, who is here for evaluation of abnormal renal ultrasound with atrophic right kidney.",
133
+ * system: {
134
+ * name: "ICD-10-CM",
135
+ * version: "2025"
136
+ * }
137
+ * })
138
+ *
139
+ * @example
140
+ * await client.construe.extractCodes({
141
+ * text: "45-year-old male presents with chest pain radiating to left arm, shortness of breath, and diaphoresis. ECG shows ST elevation in leads II, III, and aVF.",
142
+ * system: {
143
+ * name: "SNOMED_CT_US_LITE",
144
+ * version: "20240901"
145
+ * },
146
+ * config: {
147
+ * chunking_method: "sentences",
148
+ * validation_method: "simple",
149
+ * include_rationale: true,
150
+ * include_citations: true
151
+ * }
152
+ * })
153
+ *
154
+ * @example
155
+ * await client.construe.extractCodes({
156
+ * text: "Start Metformin 500mg twice daily for type 2 diabetes. Continue Lisinopril 10mg daily for hypertension. Add Atorvastatin 20mg at bedtime.",
157
+ * system: {
158
+ * name: "RXNORM",
159
+ * version: "11042024"
160
+ * },
161
+ * config: {
162
+ * validation_method: "medication_search",
163
+ * include_rationale: true
164
+ * }
165
+ * })
166
+ *
167
+ * @example
168
+ * await client.construe.extractCodes({
169
+ * text: "Patient diagnosed with Type 2 diabetes mellitus with diabetic chronic kidney disease, stage 3.",
170
+ * system: {
171
+ * name: "ICD-10-CM",
172
+ * version: "2025"
173
+ * },
174
+ * config: {
175
+ * validation_method: "simple",
176
+ * include_ancestors: true
177
+ * }
178
+ * })
179
+ *
180
+ * @example
181
+ * await client.construe.extractCodes({
182
+ * text: "5-year-old male with seizures, severe intellectual disability, microcephaly, and hypotonia.",
183
+ * system: {
184
+ * name: "HPO",
185
+ * version: "2025"
186
+ * },
187
+ * config: {
188
+ * chunking_method: "fasthpocr",
189
+ * validation_method: "none",
190
+ * include_rationale: false
191
+ * }
116
192
  * })
117
193
  */
118
194
  extractCodes(request, requestOptions) {
@@ -526,7 +602,8 @@ export class ConstrueClient {
526
602
  * Usage of CPT is subject to AMA requirements: see PhenoML Terms of Service.
527
603
  *
528
604
  * @param {string} codesystem - Code system name
529
- * @param {string} codeID - The code identifier
605
+ * @param {string} codeID - The code identifier. ICD-10-CM codes are stored without their
606
+ * cosmetic dot (use "E1165", not "E11.65").
530
607
  * @param {phenoml.construe.GetConstrueCodesCodesystemCodeIdRequest} request
531
608
  * @param {ConstrueClient.RequestOptions} requestOptions - Request-specific configuration.
532
609
  *
@@ -536,7 +613,7 @@ export class ConstrueClient {
536
613
  * @throws {@link phenoml.construe.InternalServerError}
537
614
  *
538
615
  * @example
539
- * await client.construe.getASpecificCode("ICD-10-CM", "E11.65", {
616
+ * await client.construe.getASpecificCode("ICD-10-CM", "E1165", {
540
617
  * version: "version"
541
618
  * })
542
619
  */
@@ -700,21 +777,28 @@ export class ConstrueClient {
700
777
  * await client.construe.submitFeedbackOnExtractionResults({
701
778
  * text: "Patient has type 2 diabetes with hyperglycemia",
702
779
  * received_result: {
703
- * system: {},
780
+ * system: {
781
+ * name: "ICD-10-CM",
782
+ * version: "2025"
783
+ * },
704
784
  * codes: [{
705
- * code: "195967001",
706
- * description: "Asthma",
785
+ * code: "E11.9",
786
+ * description: "Type 2 diabetes mellitus without complications",
707
787
  * valid: true
708
788
  * }]
709
789
  * },
710
790
  * expected_result: {
711
- * system: {},
791
+ * system: {
792
+ * name: "ICD-10-CM",
793
+ * version: "2025"
794
+ * },
712
795
  * codes: [{
713
- * code: "195967001",
714
- * description: "Asthma",
796
+ * code: "E11.65",
797
+ * description: "Type 2 diabetes mellitus with hyperglycemia",
715
798
  * valid: true
716
799
  * }]
717
- * }
800
+ * },
801
+ * detail: "Expected code E11.65 because the text mentions hyperglycemia"
718
802
  * })
719
803
  */
720
804
  submitFeedbackOnExtractionResults(request, requestOptions) {
@@ -2,7 +2,66 @@ import type * as phenoml from "../../../../index.mjs";
2
2
  /**
3
3
  * @example
4
4
  * {
5
- * text: "Patient is a 14-year-old female, previously healthy, who is here for evaluation of abnormal renal ultrasound with atrophic right kidney"
5
+ * text: "Patient is a 14-year-old female, previously healthy, who is here for evaluation of abnormal renal ultrasound with atrophic right kidney.",
6
+ * system: {
7
+ * name: "ICD-10-CM",
8
+ * version: "2025"
9
+ * }
10
+ * }
11
+ *
12
+ * @example
13
+ * {
14
+ * text: "45-year-old male presents with chest pain radiating to left arm, shortness of breath, and diaphoresis. ECG shows ST elevation in leads II, III, and aVF.",
15
+ * system: {
16
+ * name: "SNOMED_CT_US_LITE",
17
+ * version: "20240901"
18
+ * },
19
+ * config: {
20
+ * chunking_method: "sentences",
21
+ * validation_method: "simple",
22
+ * include_rationale: true,
23
+ * include_citations: true
24
+ * }
25
+ * }
26
+ *
27
+ * @example
28
+ * {
29
+ * text: "Start Metformin 500mg twice daily for type 2 diabetes. Continue Lisinopril 10mg daily for hypertension. Add Atorvastatin 20mg at bedtime.",
30
+ * system: {
31
+ * name: "RXNORM",
32
+ * version: "11042024"
33
+ * },
34
+ * config: {
35
+ * validation_method: "medication_search",
36
+ * include_rationale: true
37
+ * }
38
+ * }
39
+ *
40
+ * @example
41
+ * {
42
+ * text: "Patient diagnosed with Type 2 diabetes mellitus with diabetic chronic kidney disease, stage 3.",
43
+ * system: {
44
+ * name: "ICD-10-CM",
45
+ * version: "2025"
46
+ * },
47
+ * config: {
48
+ * validation_method: "simple",
49
+ * include_ancestors: true
50
+ * }
51
+ * }
52
+ *
53
+ * @example
54
+ * {
55
+ * text: "5-year-old male with seizures, severe intellectual disability, microcephaly, and hypotonia.",
56
+ * system: {
57
+ * name: "HPO",
58
+ * version: "2025"
59
+ * },
60
+ * config: {
61
+ * chunking_method: "fasthpocr",
62
+ * validation_method: "none",
63
+ * include_rationale: false
64
+ * }
6
65
  * }
7
66
  */
8
67
  export interface ExtractRequest {
@@ -4,21 +4,28 @@ import type * as phenoml from "../../../../index.mjs";
4
4
  * {
5
5
  * text: "Patient has type 2 diabetes with hyperglycemia",
6
6
  * received_result: {
7
- * system: {},
7
+ * system: {
8
+ * name: "ICD-10-CM",
9
+ * version: "2025"
10
+ * },
8
11
  * codes: [{
9
- * code: "195967001",
10
- * description: "Asthma",
12
+ * code: "E11.9",
13
+ * description: "Type 2 diabetes mellitus without complications",
11
14
  * valid: true
12
15
  * }]
13
16
  * },
14
17
  * expected_result: {
15
- * system: {},
18
+ * system: {
19
+ * name: "ICD-10-CM",
20
+ * version: "2025"
21
+ * },
16
22
  * codes: [{
17
- * code: "195967001",
18
- * description: "Asthma",
23
+ * code: "E11.65",
24
+ * description: "Type 2 diabetes mellitus with hyperglycemia",
19
25
  * valid: true
20
26
  * }]
21
- * }
27
+ * },
28
+ * detail: "Expected code E11.65 because the text mentions hyperglycemia"
22
29
  * }
23
30
  */
24
31
  export interface FeedbackRequest {
@@ -4,7 +4,24 @@ import type * as phenoml from "../../../../index.mjs";
4
4
  * {
5
5
  * name: "CUSTOM_CODES",
6
6
  * version: "1.0",
7
- * format: "csv"
7
+ * format: "json",
8
+ * codes: [{
9
+ * code: "X001",
10
+ * description: "Example custom code 1"
11
+ * }, {
12
+ * code: "X002",
13
+ * description: "Example custom code 2"
14
+ * }]
15
+ * }
16
+ *
17
+ * @example
18
+ * {
19
+ * name: "CUSTOM_CODES",
20
+ * version: "1.0",
21
+ * format: "csv",
22
+ * file: "Y29kZSxkZXNjcmlwdGlvbgpYMDAxLEV4YW1wbGUgY3VzdG9tIGNvZGUgMQo=",
23
+ * code_col: "code",
24
+ * desc_col: "description"
8
25
  * }
9
26
  */
10
27
  export interface UploadRequest {
@@ -26,11 +26,13 @@ export declare class FhirProviderClient {
26
26
  * @example
27
27
  * await client.fhirProvider.create({
28
28
  * name: "Epic Sandbox",
29
- * provider: "athenahealth",
29
+ * description: "Epic sandbox environment for testing",
30
+ * provider: "epic",
30
31
  * base_url: "https://fhir.epic.com/interconnect-fhir-oauth/api/FHIR/R4",
31
32
  * auth: {
32
- * auth_method: "jwt",
33
- * client_id: "your-client-id"
33
+ * auth_method: "client_secret",
34
+ * client_id: "your-client-id",
35
+ * client_secret: "your-client-secret"
34
36
  * }
35
37
  * })
36
38
  */
@@ -106,8 +108,9 @@ export declare class FhirProviderClient {
106
108
  *
107
109
  * @example
108
110
  * await client.fhirProvider.addAuthConfig("1716d214-de93-43a4-aa6b-a878d864e2ad", {
109
- * auth_method: "jwt",
110
- * client_id: "your-client-id"
111
+ * auth_method: "client_secret",
112
+ * client_id: "your-client-id",
113
+ * client_secret: "your-client-secret"
111
114
  * })
112
115
  */
113
116
  addAuthConfig(fhir_provider_id: string, request: phenoml.fhirProvider.FhirProviderAddAuthConfigRequest, requestOptions?: FhirProviderClient.RequestOptions): core.HttpResponsePromise<phenoml.fhirProvider.FhirProviderResponse>;
@@ -133,7 +136,7 @@ export declare class FhirProviderClient {
133
136
  *
134
137
  * @example
135
138
  * await client.fhirProvider.setActiveAuthConfig("1716d214-de93-43a4-aa6b-a878d864e2ad", {
136
- * auth_config_id: "auth-config-123"
139
+ * auth_config_id: "auth-config-456"
137
140
  * })
138
141
  */
139
142
  setActiveAuthConfig(fhir_provider_id: string, request: phenoml.fhirProvider.FhirProviderSetActiveAuthConfigRequest, requestOptions?: FhirProviderClient.RequestOptions): core.HttpResponsePromise<phenoml.fhirProvider.FhirProviderResponse>;
@@ -156,7 +159,7 @@ export declare class FhirProviderClient {
156
159
  *
157
160
  * @example
158
161
  * await client.fhirProvider.removeAuthConfig("1716d214-de93-43a4-aa6b-a878d864e2ad", {
159
- * auth_config_id: "auth-config-123"
162
+ * auth_config_id: "auth-config-456"
160
163
  * })
161
164
  */
162
165
  removeAuthConfig(fhir_provider_id: string, request: phenoml.fhirProvider.FhirProviderRemoveAuthConfigRequest, requestOptions?: FhirProviderClient.RequestOptions): core.HttpResponsePromise<phenoml.fhirProvider.FhirProviderRemoveAuthConfigResponse>;
@@ -35,11 +35,13 @@ export class FhirProviderClient {
35
35
  * @example
36
36
  * await client.fhirProvider.create({
37
37
  * name: "Epic Sandbox",
38
- * provider: "athenahealth",
38
+ * description: "Epic sandbox environment for testing",
39
+ * provider: "epic",
39
40
  * base_url: "https://fhir.epic.com/interconnect-fhir-oauth/api/FHIR/R4",
40
41
  * auth: {
41
- * auth_method: "jwt",
42
- * client_id: "your-client-id"
42
+ * auth_method: "client_secret",
43
+ * client_id: "your-client-id",
44
+ * client_secret: "your-client-secret"
43
45
  * }
44
46
  * })
45
47
  */
@@ -288,8 +290,9 @@ export class FhirProviderClient {
288
290
  *
289
291
  * @example
290
292
  * await client.fhirProvider.addAuthConfig("1716d214-de93-43a4-aa6b-a878d864e2ad", {
291
- * auth_method: "jwt",
292
- * client_id: "your-client-id"
293
+ * auth_method: "client_secret",
294
+ * client_id: "your-client-id",
295
+ * client_secret: "your-client-secret"
293
296
  * })
294
297
  */
295
298
  addAuthConfig(fhir_provider_id, request, requestOptions) {
@@ -364,7 +367,7 @@ export class FhirProviderClient {
364
367
  *
365
368
  * @example
366
369
  * await client.fhirProvider.setActiveAuthConfig("1716d214-de93-43a4-aa6b-a878d864e2ad", {
367
- * auth_config_id: "auth-config-123"
370
+ * auth_config_id: "auth-config-456"
368
371
  * })
369
372
  */
370
373
  setActiveAuthConfig(fhir_provider_id, request, requestOptions) {
@@ -436,7 +439,7 @@ export class FhirProviderClient {
436
439
  *
437
440
  * @example
438
441
  * await client.fhirProvider.removeAuthConfig("1716d214-de93-43a4-aa6b-a878d864e2ad", {
439
- * auth_config_id: "auth-config-123"
442
+ * auth_config_id: "auth-config-456"
440
443
  * })
441
444
  */
442
445
  removeAuthConfig(fhir_provider_id, request, requestOptions) {
@@ -3,11 +3,13 @@ import type * as phenoml from "../../../../index.mjs";
3
3
  * @example
4
4
  * {
5
5
  * name: "Epic Sandbox",
6
- * provider: "athenahealth",
6
+ * description: "Epic sandbox environment for testing",
7
+ * provider: "epic",
7
8
  * base_url: "https://fhir.epic.com/interconnect-fhir-oauth/api/FHIR/R4",
8
9
  * auth: {
9
- * auth_method: "jwt",
10
- * client_id: "your-client-id"
10
+ * auth_method: "client_secret",
11
+ * client_id: "your-client-id",
12
+ * client_secret: "your-client-secret"
11
13
  * }
12
14
  * }
13
15
  */
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @example
3
3
  * {
4
- * auth_config_id: "auth-config-123"
4
+ * auth_config_id: "auth-config-456"
5
5
  * }
6
6
  */
7
7
  export interface FhirProviderRemoveAuthConfigRequest {
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @example
3
3
  * {
4
- * auth_config_id: "auth-config-123"
4
+ * auth_config_id: "auth-config-456"
5
5
  * }
6
6
  */
7
7
  export interface FhirProviderSetActiveAuthConfigRequest {
@@ -1,13 +1,15 @@
1
1
  /**
2
- * Information returned for sandbox FHIR providers.
2
+ * Limited information returned for sandbox FHIR providers. Sandbox
3
+ * responses omit `auth_configs` and `last_updated`, which is what
4
+ * distinguishes this shape from `FhirProviderTemplate` in `oneOf`.
3
5
  */
4
6
  export interface FhirProviderSandboxInfo {
5
7
  /** Unique identifier for the FHIR provider */
6
- id?: string | undefined;
8
+ id: string;
7
9
  /** Display name for the FHIR provider */
8
- name?: string | undefined;
10
+ name: string;
9
11
  /** Optional description of the FHIR provider */
10
12
  description?: string | undefined;
11
13
  /** Provider type (always "sandbox" for this schema) */
12
- provider?: "sandbox" | undefined;
14
+ provider: "sandbox";
13
15
  }
@@ -1,18 +1,23 @@
1
1
  import type * as phenoml from "../../../index.mjs";
2
+ /**
3
+ * Full FHIR provider configuration returned for non-sandbox providers.
4
+ * `auth_configs` and `last_updated` are always populated, which is how
5
+ * list responses distinguish this shape from `FhirProviderSandboxInfo`.
6
+ */
2
7
  export interface FhirProviderTemplate {
3
8
  /** Unique identifier for the FHIR provider */
4
- id?: string | undefined;
9
+ id: string;
5
10
  /** Display name for the FHIR provider */
6
- name?: string | undefined;
11
+ name: string;
7
12
  /** Optional description of the FHIR provider */
8
13
  description?: string | undefined;
9
- provider?: phenoml.fhirProvider.Provider | undefined;
14
+ provider: phenoml.fhirProvider.Provider;
10
15
  /** Base URL of the FHIR server */
11
16
  base_url?: string | undefined;
12
17
  /** OAuth client ID. Deprecated: use client_id on FhirProviderAuthConfig instead. Retained for backward compatibility with existing providers. */
13
18
  client_id?: string | undefined;
14
19
  /** Map of authentication configurations (key is auth_config_id) */
15
- auth_configs?: Record<string, phenoml.fhirProvider.FhirProviderAuthConfig> | undefined;
20
+ auth_configs: Record<string, phenoml.fhirProvider.FhirProviderAuthConfig>;
16
21
  /** Timestamp when the provider was last updated */
17
- last_updated?: string | undefined;
22
+ last_updated: string;
18
23
  }
@@ -25,8 +25,15 @@ export declare class Lang2FhirClient {
25
25
  * @example
26
26
  * await client.lang2Fhir.create({
27
27
  * version: "R4",
28
- * resource: "auto",
29
- * text: "Patient has severe asthma with acute exacerbation"
28
+ * resource: "condition-encounter-diagnosis",
29
+ * text: "Patient has severe persistent asthma with acute exacerbation"
30
+ * })
31
+ *
32
+ * @example
33
+ * await client.lang2Fhir.create({
34
+ * version: "R4",
35
+ * resource: "medicationrequest",
36
+ * text: "Prescribe Amoxicillin 500mg capsules, take one capsule three times daily for 10 days"
30
37
  * })
31
38
  */
32
39
  create(request: phenoml.lang2Fhir.CreateRequest, requestOptions?: Lang2FhirClient.RequestOptions): core.HttpResponsePromise<phenoml.lang2Fhir.FhirResource>;
@@ -47,7 +54,8 @@ export declare class Lang2FhirClient {
47
54
  *
48
55
  * @example
49
56
  * await client.lang2Fhir.createMulti({
50
- * text: "John Smith, male born on 1980-03-12, diagnosed with Type 2 Diabetes. Prescribed Metformin 500mg twice daily."
57
+ * text: "John Smith, 45-year-old male, diagnosed with Type 2 Diabetes. Prescribed Metformin 500mg twice daily. Blood pressure 140/90.",
58
+ * version: "R4"
51
59
  * })
52
60
  */
53
61
  createMulti(request: phenoml.lang2Fhir.CreateMultiRequest, requestOptions?: Lang2FhirClient.RequestOptions): core.HttpResponsePromise<phenoml.lang2Fhir.CreateMultiResponse>;
@@ -99,7 +107,9 @@ export declare class Lang2FhirClient {
99
107
  *
100
108
  * @example
101
109
  * await client.lang2Fhir.uploadProfile({
102
- * profile: "(base64 encoded FHIR StructureDefinition JSON)"
110
+ * profile: "eyJyZXNvdXJjZVR5cGUiOiJTdHJ1Y3R1cmVEZWZpbml0aW9uIiwiaWQiOiJjdXN0b20tcGF0aWVudCIsInVybCI6Imh0dHA6Ly9waGVub21sLmNvbS9maGlyL1N0cnVjdHVyZURlZmluaXRpb24vY3VzdG9tLXBhdGllbnQiLCJuYW1lIjoiQ3VzdG9tUGF0aWVudCIsInN0YXR1cyI6ImFjdGl2ZSIsImZoaXJWZXJzaW9uIjoiNC4wLjEiLCJraW5kIjoicmVzb3VyY2UiLCJhYnN0cmFjdCI6ZmFsc2UsInR5cGUiOiJQYXRpZW50IiwiYmFzZURlZmluaXRpb24iOiJodHRwOi8vaGw3Lm9yZy9maGlyL1N0cnVjdHVyZURlZmluaXRpb24vUGF0aWVudCIsImRlcml2YXRpb24iOiJjb25zdHJhaW50Iiwic25hcHNob3QiOnsiZWxlbWVudCI6W3siaWQiOiJQYXRpZW50IiwicGF0aCI6IlBhdGllbnQiLCJtaW4iOjAsIm1heCI6IioifSx7ImlkIjoiUGF0aWVudC5uYW1lIiwicGF0aCI6IlBhdGllbnQubmFtZSIsIm1pbiI6MSwibWF4IjoiKiJ9XX19Cg==",
111
+ * implementation_guide: "acme-cardiology",
112
+ * profile_context: "When clinical text describes cardiology-specific findings, prefer this profile over the generic US Core Condition."
103
113
  * })
104
114
  */
105
115
  uploadProfile(request: phenoml.lang2Fhir.ProfileUploadRequest, requestOptions?: Lang2FhirClient.RequestOptions): core.HttpResponsePromise<phenoml.lang2Fhir.Lang2FhirUploadProfileResponse>;
@@ -120,7 +130,7 @@ export declare class Lang2FhirClient {
120
130
  * await client.lang2Fhir.document({
121
131
  * version: "R4",
122
132
  * resource: "questionnaire",
123
- * content: "content"
133
+ * content: "JVBERi0xLjQKJeLjz9MK...(base64-encoded PDF or image bytes)"
124
134
  * })
125
135
  */
126
136
  document(request: phenoml.lang2Fhir.DocumentRequest, requestOptions?: Lang2FhirClient.RequestOptions): core.HttpResponsePromise<phenoml.lang2Fhir.FhirResource>;
@@ -144,7 +154,8 @@ export declare class Lang2FhirClient {
144
154
  * @example
145
155
  * await client.lang2Fhir.extractMultipleFhirResourcesFromADocument({
146
156
  * version: "R4",
147
- * content: "content"
157
+ * content: "JVBERi0xLjQKJeLjz9MK...(base64-encoded PDF or image bytes)",
158
+ * provider: "medplum"
148
159
  * })
149
160
  */
150
161
  extractMultipleFhirResourcesFromADocument(request: phenoml.lang2Fhir.DocumentMultiRequest, requestOptions?: Lang2FhirClient.RequestOptions): core.HttpResponsePromise<phenoml.lang2Fhir.DocumentMultiResponse>;