phenoml 17.7.0 → 17.9.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 (467) hide show
  1. package/dist/cjs/BaseClient.d.ts +12 -0
  2. package/dist/cjs/BaseClient.js +2 -2
  3. package/dist/cjs/Client.d.ts +6 -0
  4. package/dist/cjs/Client.js +20 -10
  5. package/dist/cjs/api/resources/agent/client/Client.js +4 -3
  6. package/dist/cjs/api/resources/agent/errors/BadRequestError.js +1 -1
  7. package/dist/cjs/api/resources/agent/errors/ConflictError.js +1 -1
  8. package/dist/cjs/api/resources/agent/errors/ForbiddenError.js +1 -1
  9. package/dist/cjs/api/resources/agent/errors/GatewayTimeoutError.js +1 -1
  10. package/dist/cjs/api/resources/agent/errors/InternalServerError.js +1 -1
  11. package/dist/cjs/api/resources/agent/errors/NotFoundError.js +1 -1
  12. package/dist/cjs/api/resources/agent/errors/UnauthorizedError.js +1 -1
  13. package/dist/cjs/api/resources/agent/resources/chat/client/Client.js +3 -2
  14. package/dist/cjs/api/resources/agent/resources/prompts/client/Client.js +4 -3
  15. package/dist/cjs/api/resources/authtoken/client/Client.js +2 -1
  16. package/dist/cjs/api/resources/authtoken/errors/BadRequestError.js +1 -1
  17. package/dist/cjs/api/resources/authtoken/errors/InternalServerError.js +1 -1
  18. package/dist/cjs/api/resources/authtoken/errors/UnauthorizedError.js +1 -1
  19. package/dist/cjs/api/resources/cohort/client/Client.js +2 -1
  20. package/dist/cjs/api/resources/cohort/errors/BadRequestError.js +1 -1
  21. package/dist/cjs/api/resources/cohort/errors/InternalServerError.js +1 -1
  22. package/dist/cjs/api/resources/cohort/errors/UnauthorizedError.js +1 -1
  23. package/dist/cjs/api/resources/construe/client/Client.js +2 -1
  24. package/dist/cjs/api/resources/construe/errors/BadRequestError.js +1 -1
  25. package/dist/cjs/api/resources/construe/errors/ConflictError.js +1 -1
  26. package/dist/cjs/api/resources/construe/errors/FailedDependencyError.js +1 -1
  27. package/dist/cjs/api/resources/construe/errors/ForbiddenError.js +1 -1
  28. package/dist/cjs/api/resources/construe/errors/GatewayTimeoutError.js +1 -1
  29. package/dist/cjs/api/resources/construe/errors/InternalServerError.js +1 -1
  30. package/dist/cjs/api/resources/construe/errors/NotFoundError.js +1 -1
  31. package/dist/cjs/api/resources/construe/errors/NotImplementedError.js +1 -1
  32. package/dist/cjs/api/resources/construe/errors/ServiceUnavailableError.js +1 -1
  33. package/dist/cjs/api/resources/construe/errors/UnauthorizedError.js +1 -1
  34. package/dist/cjs/api/resources/construe/resources/codeSystems/client/Client.js +2 -1
  35. package/dist/cjs/api/resources/construe/resources/codeSystems/client/requests/DeleteRequest.d.ts +1 -1
  36. package/dist/cjs/api/resources/construe/resources/codeSystems/client/requests/ExportRequest.d.ts +1 -1
  37. package/dist/cjs/api/resources/construe/resources/codeSystems/client/requests/FindRequest.d.ts +1 -1
  38. package/dist/cjs/api/resources/construe/resources/codes/client/Client.d.ts +47 -0
  39. package/dist/cjs/api/resources/construe/resources/codes/client/Client.js +97 -1
  40. package/dist/cjs/api/resources/construe/resources/codes/client/requests/CodesListRequest.d.ts +1 -1
  41. package/dist/cjs/api/resources/construe/resources/codes/client/requests/ExtractRequest.d.ts +12 -0
  42. package/dist/cjs/api/resources/construe/resources/codes/client/requests/LookupRequest.d.ts +1 -1
  43. package/dist/cjs/api/resources/construe/resources/codes/client/requests/PhenoCrRequest.d.ts +16 -0
  44. package/dist/cjs/api/resources/construe/resources/codes/client/requests/SearchSemanticRequest.d.ts +1 -1
  45. package/dist/cjs/api/resources/construe/resources/codes/client/requests/SearchTextRequest.d.ts +1 -1
  46. package/dist/cjs/api/resources/construe/resources/codes/client/requests/index.d.ts +1 -0
  47. package/dist/cjs/api/resources/construe/types/ExtractRequestSystem.d.ts +11 -8
  48. package/dist/cjs/api/resources/construe/types/PhenocrExtractRequestSystem.d.ts +6 -0
  49. package/dist/cjs/api/resources/construe/types/PhenocrExtractRequestSystem.js +3 -0
  50. package/dist/cjs/api/resources/construe/types/index.d.ts +1 -0
  51. package/dist/cjs/api/resources/construe/types/index.js +1 -0
  52. package/dist/cjs/api/resources/fhir/client/Client.js +5 -4
  53. package/dist/cjs/api/resources/fhir2Omop/client/Client.js +2 -1
  54. package/dist/cjs/api/resources/fhir2Omop/errors/BadRequestError.js +1 -1
  55. package/dist/cjs/api/resources/fhir2Omop/errors/InternalServerError.js +1 -1
  56. package/dist/cjs/api/resources/fhir2Omop/errors/ServiceUnavailableError.js +1 -1
  57. package/dist/cjs/api/resources/fhir2Omop/errors/UnauthorizedError.js +1 -1
  58. package/dist/cjs/api/resources/fhir2Omop/types/CareSiteRow.d.ts +8 -0
  59. package/dist/cjs/api/resources/fhir2Omop/types/CareSiteRow.js +3 -0
  60. package/dist/cjs/api/resources/fhir2Omop/types/ConditionOccurrenceRow.d.ts +1 -0
  61. package/dist/cjs/api/resources/fhir2Omop/types/DeathRow.d.ts +9 -0
  62. package/dist/cjs/api/resources/fhir2Omop/types/DeathRow.js +3 -0
  63. package/dist/cjs/api/resources/fhir2Omop/types/DrugExposureRow.d.ts +1 -0
  64. package/dist/cjs/api/resources/fhir2Omop/types/LocationRow.d.ts +14 -0
  65. package/dist/cjs/api/resources/fhir2Omop/types/LocationRow.js +3 -0
  66. package/dist/cjs/api/resources/fhir2Omop/types/MeasurementRow.d.ts +1 -0
  67. package/dist/cjs/api/resources/fhir2Omop/types/ObservationPeriodRow.d.ts +7 -0
  68. package/dist/cjs/api/resources/fhir2Omop/types/ObservationPeriodRow.js +3 -0
  69. package/dist/cjs/api/resources/fhir2Omop/types/ObservationRow.d.ts +1 -0
  70. package/dist/cjs/api/resources/fhir2Omop/types/OmopTables.d.ts +5 -0
  71. package/dist/cjs/api/resources/fhir2Omop/types/PersonRow.d.ts +1 -0
  72. package/dist/cjs/api/resources/fhir2Omop/types/ProcedureOccurrenceRow.d.ts +1 -0
  73. package/dist/cjs/api/resources/fhir2Omop/types/ProviderRow.d.ts +15 -0
  74. package/dist/cjs/api/resources/fhir2Omop/types/ProviderRow.js +3 -0
  75. package/dist/cjs/api/resources/fhir2Omop/types/VisitOccurrenceRow.d.ts +2 -0
  76. package/dist/cjs/api/resources/fhir2Omop/types/index.d.ts +5 -0
  77. package/dist/cjs/api/resources/fhir2Omop/types/index.js +5 -0
  78. package/dist/cjs/api/resources/fhirProvider/client/Client.js +2 -1
  79. package/dist/cjs/api/resources/fhirProvider/errors/BadRequestError.js +1 -1
  80. package/dist/cjs/api/resources/fhirProvider/errors/ForbiddenError.js +1 -1
  81. package/dist/cjs/api/resources/fhirProvider/errors/InternalServerError.js +1 -1
  82. package/dist/cjs/api/resources/fhirProvider/errors/NotFoundError.js +1 -1
  83. package/dist/cjs/api/resources/fhirProvider/errors/UnauthorizedError.js +1 -1
  84. package/dist/cjs/api/resources/fhirProvider/resources/authConfig/client/Client.js +4 -3
  85. package/dist/cjs/api/resources/implementationGuides/client/Client.d.ts +12 -0
  86. package/dist/cjs/api/resources/implementationGuides/client/Client.js +16 -0
  87. package/dist/cjs/api/resources/implementationGuides/client/index.d.ts +1 -0
  88. package/dist/cjs/api/resources/implementationGuides/client/index.js +2 -0
  89. package/dist/cjs/api/resources/implementationGuides/errors/BadRequestError.d.ts +5 -0
  90. package/dist/cjs/api/resources/implementationGuides/errors/BadRequestError.js +54 -0
  91. package/dist/cjs/api/resources/implementationGuides/errors/ForbiddenError.d.ts +5 -0
  92. package/dist/cjs/api/resources/implementationGuides/errors/ForbiddenError.js +54 -0
  93. package/dist/cjs/api/resources/implementationGuides/errors/InternalServerError.d.ts +5 -0
  94. package/dist/cjs/api/resources/implementationGuides/errors/InternalServerError.js +54 -0
  95. package/dist/cjs/api/resources/implementationGuides/errors/NotFoundError.d.ts +5 -0
  96. package/dist/cjs/api/resources/implementationGuides/errors/NotFoundError.js +54 -0
  97. package/dist/cjs/api/resources/implementationGuides/errors/UnauthorizedError.d.ts +5 -0
  98. package/dist/cjs/api/resources/implementationGuides/errors/UnauthorizedError.js +54 -0
  99. package/dist/cjs/api/resources/implementationGuides/errors/index.d.ts +5 -0
  100. package/dist/cjs/api/resources/implementationGuides/errors/index.js +21 -0
  101. package/dist/cjs/api/resources/implementationGuides/exports.d.ts +3 -0
  102. package/dist/cjs/api/resources/implementationGuides/exports.js +22 -0
  103. package/dist/cjs/api/resources/implementationGuides/index.d.ts +4 -0
  104. package/dist/cjs/api/resources/implementationGuides/index.js +20 -0
  105. package/dist/cjs/api/resources/implementationGuides/resources/implementationGuides/client/Client.d.ts +91 -0
  106. package/dist/cjs/api/resources/implementationGuides/resources/implementationGuides/client/Client.js +316 -0
  107. package/dist/cjs/api/resources/implementationGuides/resources/implementationGuides/client/index.d.ts +1 -0
  108. package/dist/cjs/api/resources/implementationGuides/resources/implementationGuides/client/index.js +17 -0
  109. package/dist/cjs/api/resources/implementationGuides/resources/implementationGuides/client/requests/UpdateImplementationGuideRequest.d.ts +8 -0
  110. package/dist/cjs/api/resources/implementationGuides/resources/implementationGuides/client/requests/UpdateImplementationGuideRequest.js +3 -0
  111. package/dist/cjs/api/resources/implementationGuides/resources/implementationGuides/client/requests/index.d.ts +1 -0
  112. package/dist/cjs/api/resources/implementationGuides/resources/implementationGuides/client/requests/index.js +2 -0
  113. package/dist/cjs/api/resources/implementationGuides/resources/implementationGuides/exports.d.ts +2 -0
  114. package/dist/cjs/api/resources/implementationGuides/resources/implementationGuides/exports.js +21 -0
  115. package/dist/cjs/api/resources/implementationGuides/resources/implementationGuides/index.d.ts +1 -0
  116. package/dist/cjs/api/resources/implementationGuides/resources/implementationGuides/index.js +17 -0
  117. package/dist/cjs/api/resources/implementationGuides/resources/index.d.ts +2 -0
  118. package/dist/cjs/api/resources/implementationGuides/resources/index.js +41 -0
  119. package/dist/cjs/api/resources/implementationGuides/types/ImplementationGuideDetail.d.ts +5 -0
  120. package/dist/cjs/api/resources/implementationGuides/types/ImplementationGuideDetail.js +3 -0
  121. package/dist/cjs/api/resources/implementationGuides/types/ImplementationGuideListResponse.d.ts +4 -0
  122. package/dist/cjs/api/resources/implementationGuides/types/ImplementationGuideListResponse.js +3 -0
  123. package/dist/cjs/api/resources/implementationGuides/types/ImplementationGuideSummary.d.ts +15 -0
  124. package/dist/cjs/api/resources/implementationGuides/types/ImplementationGuideSummary.js +3 -0
  125. package/dist/cjs/api/resources/implementationGuides/types/index.d.ts +3 -0
  126. package/dist/cjs/api/resources/implementationGuides/types/index.js +19 -0
  127. package/dist/cjs/api/resources/index.d.ts +2 -0
  128. package/dist/cjs/api/resources/index.js +3 -1
  129. package/dist/cjs/api/resources/lang2Fhir/client/Client.d.ts +8 -0
  130. package/dist/cjs/api/resources/lang2Fhir/client/Client.js +15 -6
  131. package/dist/cjs/api/resources/lang2Fhir/client/requests/index.d.ts +0 -1
  132. package/dist/cjs/api/resources/lang2Fhir/errors/BadRequestError.js +1 -1
  133. package/dist/cjs/api/resources/lang2Fhir/errors/ClientClosedRequestError.js +1 -1
  134. package/dist/cjs/api/resources/lang2Fhir/errors/ForbiddenError.js +1 -1
  135. package/dist/cjs/api/resources/lang2Fhir/errors/GatewayTimeoutError.js +1 -1
  136. package/dist/cjs/api/resources/lang2Fhir/errors/InternalServerError.js +1 -1
  137. package/dist/cjs/api/resources/lang2Fhir/errors/NotFoundError.js +1 -1
  138. package/dist/cjs/api/resources/lang2Fhir/errors/UnauthorizedError.js +1 -1
  139. package/dist/cjs/api/resources/lang2Fhir/errors/UnprocessableEntityError.js +1 -1
  140. package/dist/cjs/api/resources/lang2Fhir/types/CreateMultiResponse.d.ts +2 -0
  141. package/dist/cjs/api/resources/lang2Fhir/{client/requests → types}/ProfileUploadRequest.d.ts +2 -10
  142. package/dist/cjs/api/resources/lang2Fhir/types/ProfileUploadRequest.js +3 -0
  143. package/dist/cjs/api/resources/lang2Fhir/types/index.d.ts +1 -0
  144. package/dist/cjs/api/resources/lang2Fhir/types/index.js +1 -0
  145. package/dist/cjs/api/resources/profiles/client/Client.d.ts +12 -0
  146. package/dist/cjs/api/resources/profiles/client/Client.js +16 -0
  147. package/dist/cjs/api/resources/profiles/client/index.d.ts +1 -0
  148. package/dist/cjs/api/resources/profiles/client/index.js +2 -0
  149. package/dist/cjs/api/resources/profiles/errors/BadRequestError.d.ts +5 -0
  150. package/dist/cjs/api/resources/profiles/errors/BadRequestError.js +54 -0
  151. package/dist/cjs/api/resources/profiles/errors/ForbiddenError.d.ts +5 -0
  152. package/dist/cjs/api/resources/profiles/errors/ForbiddenError.js +54 -0
  153. package/dist/cjs/api/resources/profiles/errors/InternalServerError.d.ts +5 -0
  154. package/dist/cjs/api/resources/profiles/errors/InternalServerError.js +54 -0
  155. package/dist/cjs/api/resources/profiles/errors/NotFoundError.d.ts +5 -0
  156. package/dist/cjs/api/resources/profiles/errors/NotFoundError.js +54 -0
  157. package/dist/cjs/api/resources/profiles/errors/UnauthorizedError.d.ts +5 -0
  158. package/dist/cjs/api/resources/profiles/errors/UnauthorizedError.js +54 -0
  159. package/dist/cjs/api/resources/profiles/errors/index.d.ts +5 -0
  160. package/dist/cjs/api/resources/profiles/errors/index.js +21 -0
  161. package/dist/cjs/api/resources/profiles/exports.d.ts +3 -0
  162. package/dist/cjs/api/resources/profiles/exports.js +22 -0
  163. package/dist/cjs/api/resources/profiles/index.d.ts +4 -0
  164. package/dist/cjs/api/resources/profiles/index.js +20 -0
  165. package/dist/cjs/api/resources/profiles/resources/index.d.ts +2 -0
  166. package/dist/cjs/api/resources/profiles/resources/index.js +41 -0
  167. package/dist/cjs/api/resources/profiles/resources/profiles/client/Client.d.ts +127 -0
  168. package/dist/cjs/api/resources/profiles/resources/profiles/client/Client.js +397 -0
  169. package/dist/cjs/api/resources/profiles/resources/profiles/client/index.d.ts +1 -0
  170. package/dist/cjs/api/resources/profiles/resources/profiles/client/index.js +17 -0
  171. package/dist/cjs/api/resources/profiles/resources/profiles/client/requests/ListRequest.d.ts +10 -0
  172. package/dist/cjs/api/resources/profiles/resources/profiles/client/requests/ListRequest.js +3 -0
  173. package/dist/cjs/api/resources/profiles/resources/profiles/client/requests/index.d.ts +1 -0
  174. package/dist/cjs/api/resources/profiles/resources/profiles/client/requests/index.js +2 -0
  175. package/dist/cjs/api/resources/profiles/resources/profiles/exports.d.ts +2 -0
  176. package/dist/cjs/api/resources/profiles/resources/profiles/exports.js +21 -0
  177. package/dist/cjs/api/resources/profiles/resources/profiles/index.d.ts +1 -0
  178. package/dist/cjs/api/resources/profiles/resources/profiles/index.js +17 -0
  179. package/dist/cjs/api/resources/profiles/types/FhirResource.d.ts +4 -0
  180. package/dist/cjs/api/resources/profiles/types/FhirResource.js +3 -0
  181. package/dist/cjs/api/resources/profiles/types/ProfileGetResponse.d.ts +5 -0
  182. package/dist/cjs/api/resources/profiles/types/ProfileGetResponse.js +3 -0
  183. package/dist/cjs/api/resources/profiles/types/ProfileListResponse.d.ts +4 -0
  184. package/dist/cjs/api/resources/profiles/types/ProfileListResponse.js +3 -0
  185. package/dist/cjs/api/resources/profiles/types/ProfileSummary.d.ts +26 -0
  186. package/dist/cjs/api/resources/profiles/types/ProfileSummary.js +12 -0
  187. package/dist/cjs/api/resources/profiles/types/ProfileUploadRequest.d.ts +7 -0
  188. package/dist/cjs/api/resources/profiles/types/ProfileUploadRequest.js +3 -0
  189. package/dist/cjs/api/resources/profiles/types/index.d.ts +5 -0
  190. package/dist/cjs/api/resources/profiles/types/index.js +21 -0
  191. package/dist/cjs/api/resources/summary/client/Client.js +2 -1
  192. package/dist/cjs/api/resources/summary/errors/BadRequestError.js +1 -1
  193. package/dist/cjs/api/resources/summary/errors/ForbiddenError.js +1 -1
  194. package/dist/cjs/api/resources/summary/errors/InternalServerError.js +1 -1
  195. package/dist/cjs/api/resources/summary/errors/NotFoundError.js +1 -1
  196. package/dist/cjs/api/resources/summary/errors/UnauthorizedError.js +1 -1
  197. package/dist/cjs/api/resources/summary/resources/templates/client/Client.js +3 -2
  198. package/dist/cjs/api/resources/tools/client/Client.js +5 -4
  199. package/dist/cjs/api/resources/tools/errors/BadRequestError.js +1 -1
  200. package/dist/cjs/api/resources/tools/errors/ForbiddenError.js +1 -1
  201. package/dist/cjs/api/resources/tools/errors/InternalServerError.js +1 -1
  202. package/dist/cjs/api/resources/tools/errors/NotFoundError.js +1 -1
  203. package/dist/cjs/api/resources/tools/errors/UnauthorizedError.js +1 -1
  204. package/dist/cjs/api/resources/tools/resources/mcpServers/client/Client.js +2 -1
  205. package/dist/cjs/api/resources/voice/errors/BadGatewayError.js +1 -1
  206. package/dist/cjs/api/resources/voice/errors/BadRequestError.js +1 -1
  207. package/dist/cjs/api/resources/voice/errors/ContentTooLargeError.js +1 -1
  208. package/dist/cjs/api/resources/voice/errors/GatewayTimeoutError.js +1 -1
  209. package/dist/cjs/api/resources/voice/errors/PaymentRequiredError.js +1 -1
  210. package/dist/cjs/api/resources/voice/errors/ServiceUnavailableError.js +1 -1
  211. package/dist/cjs/api/resources/voice/errors/UnauthorizedError.js +1 -1
  212. package/dist/cjs/api/resources/workflows/client/Client.js +4 -3
  213. package/dist/cjs/api/resources/workflows/errors/BadRequestError.js +1 -1
  214. package/dist/cjs/api/resources/workflows/errors/ForbiddenError.js +1 -1
  215. package/dist/cjs/api/resources/workflows/errors/GatewayTimeoutError.js +1 -1
  216. package/dist/cjs/api/resources/workflows/errors/InternalServerError.js +1 -1
  217. package/dist/cjs/api/resources/workflows/errors/NotFoundError.js +1 -1
  218. package/dist/cjs/api/resources/workflows/errors/UnauthorizedError.js +1 -1
  219. package/dist/cjs/core/file/file.js +3 -0
  220. package/dist/cjs/core/requestBody.d.ts +12 -0
  221. package/dist/cjs/core/requestBody.js +26 -0
  222. package/dist/cjs/core/stream/Stream.d.ts +45 -1
  223. package/dist/cjs/core/stream/Stream.js +323 -84
  224. package/dist/cjs/core/stream/index.d.ts +1 -0
  225. package/dist/cjs/core/url/qs.js +2 -2
  226. package/dist/cjs/errors/phenomlError.d.ts +1 -0
  227. package/dist/cjs/errors/phenomlError.js +5 -1
  228. package/dist/cjs/errors/phenomlTimeoutError.d.ts +2 -2
  229. package/dist/cjs/errors/phenomlTimeoutError.js +40 -6
  230. package/dist/cjs/version.d.ts +1 -1
  231. package/dist/cjs/version.js +1 -1
  232. package/dist/esm/BaseClient.d.mts +12 -0
  233. package/dist/esm/BaseClient.mjs +2 -2
  234. package/dist/esm/Client.d.mts +6 -0
  235. package/dist/esm/Client.mjs +10 -0
  236. package/dist/esm/api/resources/agent/client/Client.mjs +4 -3
  237. package/dist/esm/api/resources/agent/errors/BadRequestError.mjs +1 -1
  238. package/dist/esm/api/resources/agent/errors/ConflictError.mjs +1 -1
  239. package/dist/esm/api/resources/agent/errors/ForbiddenError.mjs +1 -1
  240. package/dist/esm/api/resources/agent/errors/GatewayTimeoutError.mjs +1 -1
  241. package/dist/esm/api/resources/agent/errors/InternalServerError.mjs +1 -1
  242. package/dist/esm/api/resources/agent/errors/NotFoundError.mjs +1 -1
  243. package/dist/esm/api/resources/agent/errors/UnauthorizedError.mjs +1 -1
  244. package/dist/esm/api/resources/agent/resources/chat/client/Client.mjs +3 -2
  245. package/dist/esm/api/resources/agent/resources/prompts/client/Client.mjs +4 -3
  246. package/dist/esm/api/resources/authtoken/client/Client.mjs +2 -1
  247. package/dist/esm/api/resources/authtoken/errors/BadRequestError.mjs +1 -1
  248. package/dist/esm/api/resources/authtoken/errors/InternalServerError.mjs +1 -1
  249. package/dist/esm/api/resources/authtoken/errors/UnauthorizedError.mjs +1 -1
  250. package/dist/esm/api/resources/cohort/client/Client.mjs +2 -1
  251. package/dist/esm/api/resources/cohort/errors/BadRequestError.mjs +1 -1
  252. package/dist/esm/api/resources/cohort/errors/InternalServerError.mjs +1 -1
  253. package/dist/esm/api/resources/cohort/errors/UnauthorizedError.mjs +1 -1
  254. package/dist/esm/api/resources/construe/client/Client.mjs +2 -1
  255. package/dist/esm/api/resources/construe/errors/BadRequestError.mjs +1 -1
  256. package/dist/esm/api/resources/construe/errors/ConflictError.mjs +1 -1
  257. package/dist/esm/api/resources/construe/errors/FailedDependencyError.mjs +1 -1
  258. package/dist/esm/api/resources/construe/errors/ForbiddenError.mjs +1 -1
  259. package/dist/esm/api/resources/construe/errors/GatewayTimeoutError.mjs +1 -1
  260. package/dist/esm/api/resources/construe/errors/InternalServerError.mjs +1 -1
  261. package/dist/esm/api/resources/construe/errors/NotFoundError.mjs +1 -1
  262. package/dist/esm/api/resources/construe/errors/NotImplementedError.mjs +1 -1
  263. package/dist/esm/api/resources/construe/errors/ServiceUnavailableError.mjs +1 -1
  264. package/dist/esm/api/resources/construe/errors/UnauthorizedError.mjs +1 -1
  265. package/dist/esm/api/resources/construe/resources/codeSystems/client/Client.mjs +2 -1
  266. package/dist/esm/api/resources/construe/resources/codeSystems/client/requests/DeleteRequest.d.mts +1 -1
  267. package/dist/esm/api/resources/construe/resources/codeSystems/client/requests/ExportRequest.d.mts +1 -1
  268. package/dist/esm/api/resources/construe/resources/codeSystems/client/requests/FindRequest.d.mts +1 -1
  269. package/dist/esm/api/resources/construe/resources/codes/client/Client.d.mts +47 -0
  270. package/dist/esm/api/resources/construe/resources/codes/client/Client.mjs +97 -1
  271. package/dist/esm/api/resources/construe/resources/codes/client/requests/CodesListRequest.d.mts +1 -1
  272. package/dist/esm/api/resources/construe/resources/codes/client/requests/ExtractRequest.d.mts +12 -0
  273. package/dist/esm/api/resources/construe/resources/codes/client/requests/LookupRequest.d.mts +1 -1
  274. package/dist/esm/api/resources/construe/resources/codes/client/requests/PhenoCrRequest.d.mts +16 -0
  275. package/dist/esm/api/resources/construe/resources/codes/client/requests/SearchSemanticRequest.d.mts +1 -1
  276. package/dist/esm/api/resources/construe/resources/codes/client/requests/SearchTextRequest.d.mts +1 -1
  277. package/dist/esm/api/resources/construe/resources/codes/client/requests/index.d.mts +1 -0
  278. package/dist/esm/api/resources/construe/types/ExtractRequestSystem.d.mts +11 -8
  279. package/dist/esm/api/resources/construe/types/PhenocrExtractRequestSystem.d.mts +6 -0
  280. package/dist/esm/api/resources/construe/types/PhenocrExtractRequestSystem.mjs +2 -0
  281. package/dist/esm/api/resources/construe/types/index.d.mts +1 -0
  282. package/dist/esm/api/resources/construe/types/index.mjs +1 -0
  283. package/dist/esm/api/resources/fhir/client/Client.mjs +5 -4
  284. package/dist/esm/api/resources/fhir2Omop/client/Client.mjs +2 -1
  285. package/dist/esm/api/resources/fhir2Omop/errors/BadRequestError.mjs +1 -1
  286. package/dist/esm/api/resources/fhir2Omop/errors/InternalServerError.mjs +1 -1
  287. package/dist/esm/api/resources/fhir2Omop/errors/ServiceUnavailableError.mjs +1 -1
  288. package/dist/esm/api/resources/fhir2Omop/errors/UnauthorizedError.mjs +1 -1
  289. package/dist/esm/api/resources/fhir2Omop/types/CareSiteRow.d.mts +8 -0
  290. package/dist/esm/api/resources/fhir2Omop/types/CareSiteRow.mjs +2 -0
  291. package/dist/esm/api/resources/fhir2Omop/types/ConditionOccurrenceRow.d.mts +1 -0
  292. package/dist/esm/api/resources/fhir2Omop/types/DeathRow.d.mts +9 -0
  293. package/dist/esm/api/resources/fhir2Omop/types/DeathRow.mjs +2 -0
  294. package/dist/esm/api/resources/fhir2Omop/types/DrugExposureRow.d.mts +1 -0
  295. package/dist/esm/api/resources/fhir2Omop/types/LocationRow.d.mts +14 -0
  296. package/dist/esm/api/resources/fhir2Omop/types/LocationRow.mjs +2 -0
  297. package/dist/esm/api/resources/fhir2Omop/types/MeasurementRow.d.mts +1 -0
  298. package/dist/esm/api/resources/fhir2Omop/types/ObservationPeriodRow.d.mts +7 -0
  299. package/dist/esm/api/resources/fhir2Omop/types/ObservationPeriodRow.mjs +2 -0
  300. package/dist/esm/api/resources/fhir2Omop/types/ObservationRow.d.mts +1 -0
  301. package/dist/esm/api/resources/fhir2Omop/types/OmopTables.d.mts +5 -0
  302. package/dist/esm/api/resources/fhir2Omop/types/PersonRow.d.mts +1 -0
  303. package/dist/esm/api/resources/fhir2Omop/types/ProcedureOccurrenceRow.d.mts +1 -0
  304. package/dist/esm/api/resources/fhir2Omop/types/ProviderRow.d.mts +15 -0
  305. package/dist/esm/api/resources/fhir2Omop/types/ProviderRow.mjs +2 -0
  306. package/dist/esm/api/resources/fhir2Omop/types/VisitOccurrenceRow.d.mts +2 -0
  307. package/dist/esm/api/resources/fhir2Omop/types/index.d.mts +5 -0
  308. package/dist/esm/api/resources/fhir2Omop/types/index.mjs +5 -0
  309. package/dist/esm/api/resources/fhirProvider/client/Client.mjs +2 -1
  310. package/dist/esm/api/resources/fhirProvider/errors/BadRequestError.mjs +1 -1
  311. package/dist/esm/api/resources/fhirProvider/errors/ForbiddenError.mjs +1 -1
  312. package/dist/esm/api/resources/fhirProvider/errors/InternalServerError.mjs +1 -1
  313. package/dist/esm/api/resources/fhirProvider/errors/NotFoundError.mjs +1 -1
  314. package/dist/esm/api/resources/fhirProvider/errors/UnauthorizedError.mjs +1 -1
  315. package/dist/esm/api/resources/fhirProvider/resources/authConfig/client/Client.mjs +4 -3
  316. package/dist/esm/api/resources/implementationGuides/client/Client.d.mts +12 -0
  317. package/dist/esm/api/resources/implementationGuides/client/Client.mjs +12 -0
  318. package/dist/esm/api/resources/implementationGuides/client/index.d.mts +1 -0
  319. package/dist/esm/api/resources/implementationGuides/client/index.mjs +1 -0
  320. package/dist/esm/api/resources/implementationGuides/errors/BadRequestError.d.mts +5 -0
  321. package/dist/esm/api/resources/implementationGuides/errors/BadRequestError.mjs +17 -0
  322. package/dist/esm/api/resources/implementationGuides/errors/ForbiddenError.d.mts +5 -0
  323. package/dist/esm/api/resources/implementationGuides/errors/ForbiddenError.mjs +17 -0
  324. package/dist/esm/api/resources/implementationGuides/errors/InternalServerError.d.mts +5 -0
  325. package/dist/esm/api/resources/implementationGuides/errors/InternalServerError.mjs +17 -0
  326. package/dist/esm/api/resources/implementationGuides/errors/NotFoundError.d.mts +5 -0
  327. package/dist/esm/api/resources/implementationGuides/errors/NotFoundError.mjs +17 -0
  328. package/dist/esm/api/resources/implementationGuides/errors/UnauthorizedError.d.mts +5 -0
  329. package/dist/esm/api/resources/implementationGuides/errors/UnauthorizedError.mjs +17 -0
  330. package/dist/esm/api/resources/implementationGuides/errors/index.d.mts +5 -0
  331. package/dist/esm/api/resources/implementationGuides/errors/index.mjs +5 -0
  332. package/dist/esm/api/resources/implementationGuides/exports.d.mts +3 -0
  333. package/dist/esm/api/resources/implementationGuides/exports.mjs +4 -0
  334. package/dist/esm/api/resources/implementationGuides/index.d.mts +4 -0
  335. package/dist/esm/api/resources/implementationGuides/index.mjs +4 -0
  336. package/dist/esm/api/resources/implementationGuides/resources/implementationGuides/client/Client.d.mts +91 -0
  337. package/dist/esm/api/resources/implementationGuides/resources/implementationGuides/client/Client.mjs +279 -0
  338. package/dist/esm/api/resources/implementationGuides/resources/implementationGuides/client/index.d.mts +1 -0
  339. package/dist/esm/api/resources/implementationGuides/resources/implementationGuides/client/index.mjs +1 -0
  340. package/dist/esm/api/resources/implementationGuides/resources/implementationGuides/client/requests/UpdateImplementationGuideRequest.d.mts +8 -0
  341. package/dist/esm/api/resources/implementationGuides/resources/implementationGuides/client/requests/UpdateImplementationGuideRequest.mjs +2 -0
  342. package/dist/esm/api/resources/implementationGuides/resources/implementationGuides/client/requests/index.d.mts +1 -0
  343. package/dist/esm/api/resources/implementationGuides/resources/implementationGuides/client/requests/index.mjs +1 -0
  344. package/dist/esm/api/resources/implementationGuides/resources/implementationGuides/exports.d.mts +2 -0
  345. package/dist/esm/api/resources/implementationGuides/resources/implementationGuides/exports.mjs +3 -0
  346. package/dist/esm/api/resources/implementationGuides/resources/implementationGuides/index.d.mts +1 -0
  347. package/dist/esm/api/resources/implementationGuides/resources/implementationGuides/index.mjs +1 -0
  348. package/dist/esm/api/resources/implementationGuides/resources/index.d.mts +2 -0
  349. package/dist/esm/api/resources/implementationGuides/resources/index.mjs +2 -0
  350. package/dist/esm/api/resources/implementationGuides/types/ImplementationGuideDetail.d.mts +5 -0
  351. package/dist/esm/api/resources/implementationGuides/types/ImplementationGuideDetail.mjs +2 -0
  352. package/dist/esm/api/resources/implementationGuides/types/ImplementationGuideListResponse.d.mts +4 -0
  353. package/dist/esm/api/resources/implementationGuides/types/ImplementationGuideListResponse.mjs +2 -0
  354. package/dist/esm/api/resources/implementationGuides/types/ImplementationGuideSummary.d.mts +15 -0
  355. package/dist/esm/api/resources/implementationGuides/types/ImplementationGuideSummary.mjs +2 -0
  356. package/dist/esm/api/resources/implementationGuides/types/index.d.mts +3 -0
  357. package/dist/esm/api/resources/implementationGuides/types/index.mjs +3 -0
  358. package/dist/esm/api/resources/index.d.mts +2 -0
  359. package/dist/esm/api/resources/index.mjs +2 -0
  360. package/dist/esm/api/resources/lang2Fhir/client/Client.d.mts +8 -0
  361. package/dist/esm/api/resources/lang2Fhir/client/Client.mjs +15 -6
  362. package/dist/esm/api/resources/lang2Fhir/client/requests/index.d.mts +0 -1
  363. package/dist/esm/api/resources/lang2Fhir/errors/BadRequestError.mjs +1 -1
  364. package/dist/esm/api/resources/lang2Fhir/errors/ClientClosedRequestError.mjs +1 -1
  365. package/dist/esm/api/resources/lang2Fhir/errors/ForbiddenError.mjs +1 -1
  366. package/dist/esm/api/resources/lang2Fhir/errors/GatewayTimeoutError.mjs +1 -1
  367. package/dist/esm/api/resources/lang2Fhir/errors/InternalServerError.mjs +1 -1
  368. package/dist/esm/api/resources/lang2Fhir/errors/NotFoundError.mjs +1 -1
  369. package/dist/esm/api/resources/lang2Fhir/errors/UnauthorizedError.mjs +1 -1
  370. package/dist/esm/api/resources/lang2Fhir/errors/UnprocessableEntityError.mjs +1 -1
  371. package/dist/esm/api/resources/lang2Fhir/types/CreateMultiResponse.d.mts +2 -0
  372. package/dist/esm/api/resources/lang2Fhir/{client/requests → types}/ProfileUploadRequest.d.mts +2 -10
  373. package/dist/esm/api/resources/lang2Fhir/types/ProfileUploadRequest.mjs +2 -0
  374. package/dist/esm/api/resources/lang2Fhir/types/index.d.mts +1 -0
  375. package/dist/esm/api/resources/lang2Fhir/types/index.mjs +1 -0
  376. package/dist/esm/api/resources/profiles/client/Client.d.mts +12 -0
  377. package/dist/esm/api/resources/profiles/client/Client.mjs +12 -0
  378. package/dist/esm/api/resources/profiles/client/index.d.mts +1 -0
  379. package/dist/esm/api/resources/profiles/client/index.mjs +1 -0
  380. package/dist/esm/api/resources/profiles/errors/BadRequestError.d.mts +5 -0
  381. package/dist/esm/api/resources/profiles/errors/BadRequestError.mjs +17 -0
  382. package/dist/esm/api/resources/profiles/errors/ForbiddenError.d.mts +5 -0
  383. package/dist/esm/api/resources/profiles/errors/ForbiddenError.mjs +17 -0
  384. package/dist/esm/api/resources/profiles/errors/InternalServerError.d.mts +5 -0
  385. package/dist/esm/api/resources/profiles/errors/InternalServerError.mjs +17 -0
  386. package/dist/esm/api/resources/profiles/errors/NotFoundError.d.mts +5 -0
  387. package/dist/esm/api/resources/profiles/errors/NotFoundError.mjs +17 -0
  388. package/dist/esm/api/resources/profiles/errors/UnauthorizedError.d.mts +5 -0
  389. package/dist/esm/api/resources/profiles/errors/UnauthorizedError.mjs +17 -0
  390. package/dist/esm/api/resources/profiles/errors/index.d.mts +5 -0
  391. package/dist/esm/api/resources/profiles/errors/index.mjs +5 -0
  392. package/dist/esm/api/resources/profiles/exports.d.mts +3 -0
  393. package/dist/esm/api/resources/profiles/exports.mjs +4 -0
  394. package/dist/esm/api/resources/profiles/index.d.mts +4 -0
  395. package/dist/esm/api/resources/profiles/index.mjs +4 -0
  396. package/dist/esm/api/resources/profiles/resources/index.d.mts +2 -0
  397. package/dist/esm/api/resources/profiles/resources/index.mjs +2 -0
  398. package/dist/esm/api/resources/profiles/resources/profiles/client/Client.d.mts +127 -0
  399. package/dist/esm/api/resources/profiles/resources/profiles/client/Client.mjs +360 -0
  400. package/dist/esm/api/resources/profiles/resources/profiles/client/index.d.mts +1 -0
  401. package/dist/esm/api/resources/profiles/resources/profiles/client/index.mjs +1 -0
  402. package/dist/esm/api/resources/profiles/resources/profiles/client/requests/ListRequest.d.mts +10 -0
  403. package/dist/esm/api/resources/profiles/resources/profiles/client/requests/ListRequest.mjs +2 -0
  404. package/dist/esm/api/resources/profiles/resources/profiles/client/requests/index.d.mts +1 -0
  405. package/dist/esm/api/resources/profiles/resources/profiles/client/requests/index.mjs +1 -0
  406. package/dist/esm/api/resources/profiles/resources/profiles/exports.d.mts +2 -0
  407. package/dist/esm/api/resources/profiles/resources/profiles/exports.mjs +3 -0
  408. package/dist/esm/api/resources/profiles/resources/profiles/index.d.mts +1 -0
  409. package/dist/esm/api/resources/profiles/resources/profiles/index.mjs +1 -0
  410. package/dist/esm/api/resources/profiles/types/FhirResource.d.mts +4 -0
  411. package/dist/esm/api/resources/profiles/types/FhirResource.mjs +2 -0
  412. package/dist/esm/api/resources/profiles/types/ProfileGetResponse.d.mts +5 -0
  413. package/dist/esm/api/resources/profiles/types/ProfileGetResponse.mjs +2 -0
  414. package/dist/esm/api/resources/profiles/types/ProfileListResponse.d.mts +4 -0
  415. package/dist/esm/api/resources/profiles/types/ProfileListResponse.mjs +2 -0
  416. package/dist/esm/api/resources/profiles/types/ProfileSummary.d.mts +26 -0
  417. package/dist/esm/api/resources/profiles/types/ProfileSummary.mjs +9 -0
  418. package/dist/esm/api/resources/profiles/types/ProfileUploadRequest.d.mts +7 -0
  419. package/dist/esm/api/resources/profiles/types/ProfileUploadRequest.mjs +2 -0
  420. package/dist/esm/api/resources/profiles/types/index.d.mts +5 -0
  421. package/dist/esm/api/resources/profiles/types/index.mjs +5 -0
  422. package/dist/esm/api/resources/summary/client/Client.mjs +2 -1
  423. package/dist/esm/api/resources/summary/errors/BadRequestError.mjs +1 -1
  424. package/dist/esm/api/resources/summary/errors/ForbiddenError.mjs +1 -1
  425. package/dist/esm/api/resources/summary/errors/InternalServerError.mjs +1 -1
  426. package/dist/esm/api/resources/summary/errors/NotFoundError.mjs +1 -1
  427. package/dist/esm/api/resources/summary/errors/UnauthorizedError.mjs +1 -1
  428. package/dist/esm/api/resources/summary/resources/templates/client/Client.mjs +3 -2
  429. package/dist/esm/api/resources/tools/client/Client.mjs +5 -4
  430. package/dist/esm/api/resources/tools/errors/BadRequestError.mjs +1 -1
  431. package/dist/esm/api/resources/tools/errors/ForbiddenError.mjs +1 -1
  432. package/dist/esm/api/resources/tools/errors/InternalServerError.mjs +1 -1
  433. package/dist/esm/api/resources/tools/errors/NotFoundError.mjs +1 -1
  434. package/dist/esm/api/resources/tools/errors/UnauthorizedError.mjs +1 -1
  435. package/dist/esm/api/resources/tools/resources/mcpServers/client/Client.mjs +2 -1
  436. package/dist/esm/api/resources/voice/errors/BadGatewayError.mjs +1 -1
  437. package/dist/esm/api/resources/voice/errors/BadRequestError.mjs +1 -1
  438. package/dist/esm/api/resources/voice/errors/ContentTooLargeError.mjs +1 -1
  439. package/dist/esm/api/resources/voice/errors/GatewayTimeoutError.mjs +1 -1
  440. package/dist/esm/api/resources/voice/errors/PaymentRequiredError.mjs +1 -1
  441. package/dist/esm/api/resources/voice/errors/ServiceUnavailableError.mjs +1 -1
  442. package/dist/esm/api/resources/voice/errors/UnauthorizedError.mjs +1 -1
  443. package/dist/esm/api/resources/workflows/client/Client.mjs +4 -3
  444. package/dist/esm/api/resources/workflows/errors/BadRequestError.mjs +1 -1
  445. package/dist/esm/api/resources/workflows/errors/ForbiddenError.mjs +1 -1
  446. package/dist/esm/api/resources/workflows/errors/GatewayTimeoutError.mjs +1 -1
  447. package/dist/esm/api/resources/workflows/errors/InternalServerError.mjs +1 -1
  448. package/dist/esm/api/resources/workflows/errors/NotFoundError.mjs +1 -1
  449. package/dist/esm/api/resources/workflows/errors/UnauthorizedError.mjs +1 -1
  450. package/dist/esm/core/file/file.mjs +3 -0
  451. package/dist/esm/core/requestBody.d.mts +12 -0
  452. package/dist/esm/core/requestBody.mjs +23 -0
  453. package/dist/esm/core/stream/Stream.d.mts +45 -1
  454. package/dist/esm/core/stream/Stream.mjs +323 -84
  455. package/dist/esm/core/stream/index.d.mts +1 -0
  456. package/dist/esm/core/url/qs.mjs +2 -2
  457. package/dist/esm/errors/phenomlError.d.mts +1 -0
  458. package/dist/esm/errors/phenomlError.mjs +5 -1
  459. package/dist/esm/errors/phenomlTimeoutError.d.mts +2 -2
  460. package/dist/esm/errors/phenomlTimeoutError.mjs +7 -6
  461. package/dist/esm/version.d.mts +1 -1
  462. package/dist/esm/version.mjs +1 -1
  463. package/openapi/openapi.json +1224 -150
  464. package/package.json +23 -1
  465. package/reference.md +772 -71
  466. /package/dist/cjs/api/resources/{lang2Fhir/client/requests/ProfileUploadRequest.js → construe/resources/codes/client/requests/PhenoCrRequest.js} +0 -0
  467. /package/dist/esm/api/resources/{lang2Fhir/client/requests/ProfileUploadRequest.mjs → construe/resources/codes/client/requests/PhenoCrRequest.mjs} +0 -0
package/reference.md CHANGED
@@ -1627,6 +1627,9 @@ await client.construe.codeSystems.export("CUSTOM_CODES", {
1627
1627
 
1628
1628
  Converts natural language text into structured medical codes.
1629
1629
 
1630
+ Pass `system.version` to select a specific code system version, for example
1631
+ `umls-2026aa` for UMLS 2026AA-backed systems.
1632
+
1630
1633
  Usage of CPT is subject to AMA requirements: see PhenoML Terms of Service.
1631
1634
  </dd>
1632
1635
  </dl>
@@ -1680,6 +1683,83 @@ await client.construe.codes.extract({
1680
1683
  </dl>
1681
1684
 
1682
1685
 
1686
+ </dd>
1687
+ </dl>
1688
+ </details>
1689
+
1690
+ <details><summary><code>client.construe.codes.<a href="/src/api/resources/construe/resources/codes/client/Client.ts">phenocr</a>({ ...params }) -> phenoml.ExtractCodesResult</code></summary>
1691
+ <dl>
1692
+ <dd>
1693
+
1694
+ #### 📝 Description
1695
+
1696
+ <dl>
1697
+ <dd>
1698
+
1699
+ <dl>
1700
+ <dd>
1701
+
1702
+ **Alpha:** phenocr is an alpha feature. The API contract — request
1703
+ parameters and response shape — may change as its internals evolve, and
1704
+ results may vary between releases. Do not depend on it for production
1705
+ workloads yet.
1706
+
1707
+ Extracts medical codes from natural language clinical text using phenocr.
1708
+
1709
+ Supported code systems: HPO, ICD-10-CM, and SNOMED_CT_US. The code
1710
+ system name and version are both required.
1711
+ </dd>
1712
+ </dl>
1713
+ </dd>
1714
+ </dl>
1715
+
1716
+ #### 🔌 Usage
1717
+
1718
+ <dl>
1719
+ <dd>
1720
+
1721
+ <dl>
1722
+ <dd>
1723
+
1724
+ ```typescript
1725
+ await client.construe.codes.phenocr({
1726
+ text: "5-year-old male with seizures, severe intellectual disability, microcephaly, and hypotonia.",
1727
+ system: {
1728
+ name: "HPO",
1729
+ version: "umls-2026AA"
1730
+ }
1731
+ });
1732
+
1733
+ ```
1734
+ </dd>
1735
+ </dl>
1736
+ </dd>
1737
+ </dl>
1738
+
1739
+ #### ⚙️ Parameters
1740
+
1741
+ <dl>
1742
+ <dd>
1743
+
1744
+ <dl>
1745
+ <dd>
1746
+
1747
+ **request:** `phenoml.construe.PhenoCrRequest`
1748
+
1749
+ </dd>
1750
+ </dl>
1751
+
1752
+ <dl>
1753
+ <dd>
1754
+
1755
+ **requestOptions:** `CodesClient.RequestOptions`
1756
+
1757
+ </dd>
1758
+ </dl>
1759
+ </dd>
1760
+ </dl>
1761
+
1762
+
1683
1763
  </dd>
1684
1764
  </dl>
1685
1765
  </details>
@@ -3340,8 +3420,8 @@ await client.fhirProvider.authConfig.remove("1716d214-de93-43a4-aa6b-a878d864e2a
3340
3420
  </dl>
3341
3421
  </details>
3342
3422
 
3343
- ## Lang2Fhir
3344
- <details><summary><code>client.lang2Fhir.<a href="/src/api/resources/lang2Fhir/client/Client.ts">create</a>({ ...params }) -> phenoml.FhirResource</code></summary>
3423
+ ## Implementation Guides
3424
+ <details><summary><code>client.implementationGuides.implementationGuides.<a href="/src/api/resources/implementationGuides/resources/implementationGuides/client/Client.ts">list</a>() -> phenoml.ImplementationGuideListResponse</code></summary>
3345
3425
  <dl>
3346
3426
  <dd>
3347
3427
 
@@ -3353,9 +3433,65 @@ await client.fhirProvider.authConfig.remove("1716d214-de93-43a4-aa6b-a878d864e2a
3353
3433
  <dl>
3354
3434
  <dd>
3355
3435
 
3356
- Converts natural language text into a structured FHIR resource.
3436
+ Returns every implementation guide on this instance both guides that
3437
+ have stored metadata (a profile_context) and guides referenced by at
3438
+ least one custom profile — with the number of profiles in each.
3439
+ </dd>
3440
+ </dl>
3441
+ </dd>
3442
+ </dl>
3357
3443
 
3358
- **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.
3444
+ #### 🔌 Usage
3445
+
3446
+ <dl>
3447
+ <dd>
3448
+
3449
+ <dl>
3450
+ <dd>
3451
+
3452
+ ```typescript
3453
+ await client.implementationGuides.implementationGuides.list();
3454
+
3455
+ ```
3456
+ </dd>
3457
+ </dl>
3458
+ </dd>
3459
+ </dl>
3460
+
3461
+ #### ⚙️ Parameters
3462
+
3463
+ <dl>
3464
+ <dd>
3465
+
3466
+ <dl>
3467
+ <dd>
3468
+
3469
+ **requestOptions:** `ImplementationGuidesClient.RequestOptions`
3470
+
3471
+ </dd>
3472
+ </dl>
3473
+ </dd>
3474
+ </dl>
3475
+
3476
+
3477
+ </dd>
3478
+ </dl>
3479
+ </details>
3480
+
3481
+ <details><summary><code>client.implementationGuides.implementationGuides.<a href="/src/api/resources/implementationGuides/resources/implementationGuides/client/Client.ts">get</a>(name) -> phenoml.ImplementationGuideDetail</code></summary>
3482
+ <dl>
3483
+ <dd>
3484
+
3485
+ #### 📝 Description
3486
+
3487
+ <dl>
3488
+ <dd>
3489
+
3490
+ <dl>
3491
+ <dd>
3492
+
3493
+ Returns a single implementation guide, including its profile_context and
3494
+ the ids of the profiles that belong to it.
3359
3495
  </dd>
3360
3496
  </dl>
3361
3497
  </dd>
@@ -3370,11 +3506,7 @@ Converts natural language text into a structured FHIR resource.
3370
3506
  <dd>
3371
3507
 
3372
3508
  ```typescript
3373
- await client.lang2Fhir.create({
3374
- version: "R4",
3375
- resource: "condition-encounter-diagnosis",
3376
- text: "Patient has severe persistent asthma with acute exacerbation"
3377
- });
3509
+ await client.implementationGuides.implementationGuides.get("acme-cardiology");
3378
3510
 
3379
3511
  ```
3380
3512
  </dd>
@@ -3390,7 +3522,7 @@ await client.lang2Fhir.create({
3390
3522
  <dl>
3391
3523
  <dd>
3392
3524
 
3393
- **request:** `phenoml.lang2Fhir.CreateRequest`
3525
+ **name:** `string` — The implementation guide name.
3394
3526
 
3395
3527
  </dd>
3396
3528
  </dl>
@@ -3398,7 +3530,7 @@ await client.lang2Fhir.create({
3398
3530
  <dl>
3399
3531
  <dd>
3400
3532
 
3401
- **requestOptions:** `Lang2FhirClient.RequestOptions`
3533
+ **requestOptions:** `ImplementationGuidesClient.RequestOptions`
3402
3534
 
3403
3535
  </dd>
3404
3536
  </dl>
@@ -3410,7 +3542,7 @@ await client.lang2Fhir.create({
3410
3542
  </dl>
3411
3543
  </details>
3412
3544
 
3413
- <details><summary><code>client.lang2Fhir.<a href="/src/api/resources/lang2Fhir/client/Client.ts">createMulti</a>({ ...params }) -> phenoml.CreateMultiResponse</code></summary>
3545
+ <details><summary><code>client.implementationGuides.implementationGuides.<a href="/src/api/resources/implementationGuides/resources/implementationGuides/client/Client.ts">update</a>(name, { ...params }) -> phenoml.ImplementationGuideSummary</code></summary>
3414
3546
  <dl>
3415
3547
  <dd>
3416
3548
 
@@ -3422,11 +3554,10 @@ await client.lang2Fhir.create({
3422
3554
  <dl>
3423
3555
  <dd>
3424
3556
 
3425
- Analyzes natural language text and extracts multiple FHIR resources, returning them as a transaction Bundle.
3426
- Automatically detects Patient, Condition, MedicationRequest, Observation, and other resource types from the text.
3427
- Resources are linked with proper references (e.g., Conditions reference the Patient).
3428
-
3429
- **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.
3557
+ Sets (or clears, with an empty value) the natural-language profile_context
3558
+ for an implementation guide. The context is injected into the LLM during
3559
+ resource detection to help select the right profiles from this guide.
3560
+ It applies to every profile in the guide.
3430
3561
  </dd>
3431
3562
  </dl>
3432
3563
  </dd>
@@ -3441,10 +3572,7 @@ Resources are linked with proper references (e.g., Conditions reference the Pati
3441
3572
  <dd>
3442
3573
 
3443
3574
  ```typescript
3444
- await client.lang2Fhir.createMulti({
3445
- text: "John Smith, 45-year-old male, diagnosed with Type 2 Diabetes. Prescribed Metformin 500mg twice daily. Blood pressure 140/90.",
3446
- version: "R4"
3447
- });
3575
+ await client.implementationGuides.implementationGuides.update("acme-cardiology");
3448
3576
 
3449
3577
  ```
3450
3578
  </dd>
@@ -3460,7 +3588,7 @@ await client.lang2Fhir.createMulti({
3460
3588
  <dl>
3461
3589
  <dd>
3462
3590
 
3463
- **request:** `phenoml.lang2Fhir.CreateMultiRequest`
3591
+ **name:** `string` — The implementation guide name.
3464
3592
 
3465
3593
  </dd>
3466
3594
  </dl>
@@ -3468,7 +3596,15 @@ await client.lang2Fhir.createMulti({
3468
3596
  <dl>
3469
3597
  <dd>
3470
3598
 
3471
- **requestOptions:** `Lang2FhirClient.RequestOptions`
3599
+ **request:** `phenoml.implementationGuides.UpdateImplementationGuideRequest`
3600
+
3601
+ </dd>
3602
+ </dl>
3603
+
3604
+ <dl>
3605
+ <dd>
3606
+
3607
+ **requestOptions:** `ImplementationGuidesClient.RequestOptions`
3472
3608
 
3473
3609
  </dd>
3474
3610
  </dl>
@@ -3480,7 +3616,7 @@ await client.lang2Fhir.createMulti({
3480
3616
  </dl>
3481
3617
  </details>
3482
3618
 
3483
- <details><summary><code>client.lang2Fhir.<a href="/src/api/resources/lang2Fhir/client/Client.ts">search</a>({ ...params }) -> phenoml.SearchResponse</code></summary>
3619
+ <details><summary><code>client.implementationGuides.implementationGuides.<a href="/src/api/resources/implementationGuides/resources/implementationGuides/client/Client.ts">delete</a>(name) -> void</code></summary>
3484
3620
  <dl>
3485
3621
  <dd>
3486
3622
 
@@ -3492,14 +3628,11 @@ await client.lang2Fhir.createMulti({
3492
3628
  <dl>
3493
3629
  <dd>
3494
3630
 
3495
- Converts natural language text into FHIR search parameters.
3496
- Automatically identifies the appropriate FHIR resource type and generates valid search query parameters.
3497
-
3498
- Supported resource types include: AllergyIntolerance, Appointment, CarePlan, CareTeam, Condition,
3499
- Coverage, Device, DiagnosticReport, DocumentReference, Encounter, Goal, Immunization, Location,
3500
- Medication, MedicationRequest, Observation, Organization, Patient, PlanDefinition, Practitioner,
3501
- PractitionerRole, Procedure, Provenance, Questionnaire, QuestionnaireResponse, RelatedPerson,
3502
- Schedule, ServiceRequest, Slot, and Specimen.
3631
+ Deletes the stored metadata for an implementation guide — its
3632
+ profile_context and timestamps. Member profiles keep their
3633
+ implementation_guide assignment, so a guide still referenced by at least
3634
+ one profile continues to appear in listings, just without context or
3635
+ timestamps.
3503
3636
  </dd>
3504
3637
  </dl>
3505
3638
  </dd>
@@ -3514,9 +3647,7 @@ Schedule, ServiceRequest, Slot, and Specimen.
3514
3647
  <dd>
3515
3648
 
3516
3649
  ```typescript
3517
- await client.lang2Fhir.search({
3518
- text: "Appointments between March 2-9, 2025"
3519
- });
3650
+ await client.implementationGuides.implementationGuides.delete("acme-cardiology");
3520
3651
 
3521
3652
  ```
3522
3653
  </dd>
@@ -3532,7 +3663,7 @@ await client.lang2Fhir.search({
3532
3663
  <dl>
3533
3664
  <dd>
3534
3665
 
3535
- **request:** `phenoml.lang2Fhir.SearchRequest`
3666
+ **name:** `string` — The implementation guide name.
3536
3667
 
3537
3668
  </dd>
3538
3669
  </dl>
@@ -3540,7 +3671,7 @@ await client.lang2Fhir.search({
3540
3671
  <dl>
3541
3672
  <dd>
3542
3673
 
3543
- **requestOptions:** `Lang2FhirClient.RequestOptions`
3674
+ **requestOptions:** `ImplementationGuidesClient.RequestOptions`
3544
3675
 
3545
3676
  </dd>
3546
3677
  </dl>
@@ -3552,7 +3683,8 @@ await client.lang2Fhir.search({
3552
3683
  </dl>
3553
3684
  </details>
3554
3685
 
3555
- <details><summary><code>client.lang2Fhir.<a href="/src/api/resources/lang2Fhir/client/Client.ts">uploadProfile</a>({ ...params }) -> phenoml.UploadProfileResponse</code></summary>
3686
+ ## Lang2Fhir
3687
+ <details><summary><code>client.lang2Fhir.<a href="/src/api/resources/lang2Fhir/client/Client.ts">create</a>({ ...params }) -> phenoml.FhirResource</code></summary>
3556
3688
  <dl>
3557
3689
  <dd>
3558
3690
 
@@ -3564,16 +3696,9 @@ await client.lang2Fhir.search({
3564
3696
  <dl>
3565
3697
  <dd>
3566
3698
 
3567
- Upload a custom FHIR StructureDefinition profile for use with the lang2fhir service.
3568
-
3569
- All metadata is derived from the StructureDefinition JSON itself. The lowercase `id` field
3570
- from the StructureDefinition is used as the profile's unique identifier and lookup key.
3571
- To use the uploaded profile with `/lang2fhir/create`, pass this id as the `resource` parameter.
3699
+ Converts natural language text into a structured FHIR resource.
3572
3700
 
3573
- Uploads will be rejected if:
3574
- - A built-in US Core or R4 base profile already exists with the same id
3575
- - A custom profile with the same id has already been uploaded
3576
- - A custom profile with the same url has already been uploaded
3701
+ **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.
3577
3702
  </dd>
3578
3703
  </dl>
3579
3704
  </dd>
@@ -3588,10 +3713,10 @@ Uploads will be rejected if:
3588
3713
  <dd>
3589
3714
 
3590
3715
  ```typescript
3591
- await client.lang2Fhir.uploadProfile({
3592
- profile: "eyJyZXNvdXJjZVR5cGUiOiJTdHJ1Y3R1cmVEZWZpbml0aW9uIiwiaWQiOiJjdXN0b20tcGF0aWVudCIsInVybCI6Imh0dHA6Ly9waGVub21sLmNvbS9maGlyL1N0cnVjdHVyZURlZmluaXRpb24vY3VzdG9tLXBhdGllbnQiLCJuYW1lIjoiQ3VzdG9tUGF0aWVudCIsInN0YXR1cyI6ImFjdGl2ZSIsImZoaXJWZXJzaW9uIjoiNC4wLjEiLCJraW5kIjoicmVzb3VyY2UiLCJhYnN0cmFjdCI6ZmFsc2UsInR5cGUiOiJQYXRpZW50IiwiYmFzZURlZmluaXRpb24iOiJodHRwOi8vaGw3Lm9yZy9maGlyL1N0cnVjdHVyZURlZmluaXRpb24vUGF0aWVudCIsImRlcml2YXRpb24iOiJjb25zdHJhaW50Iiwic25hcHNob3QiOnsiZWxlbWVudCI6W3siaWQiOiJQYXRpZW50IiwicGF0aCI6IlBhdGllbnQiLCJtaW4iOjAsIm1heCI6IioifSx7ImlkIjoiUGF0aWVudC5uYW1lIiwicGF0aCI6IlBhdGllbnQubmFtZSIsIm1pbiI6MSwibWF4IjoiKiJ9XX19Cg==",
3593
- implementation_guide: "acme-cardiology",
3594
- profile_context: "When clinical text describes cardiology-specific findings, prefer this profile over the generic US Core Condition."
3716
+ await client.lang2Fhir.create({
3717
+ version: "R4",
3718
+ resource: "condition-encounter-diagnosis",
3719
+ text: "Patient has severe persistent asthma with acute exacerbation"
3595
3720
  });
3596
3721
 
3597
3722
  ```
@@ -3608,7 +3733,7 @@ await client.lang2Fhir.uploadProfile({
3608
3733
  <dl>
3609
3734
  <dd>
3610
3735
 
3611
- **request:** `phenoml.lang2Fhir.ProfileUploadRequest`
3736
+ **request:** `phenoml.lang2Fhir.CreateRequest`
3612
3737
 
3613
3738
  </dd>
3614
3739
  </dl>
@@ -3628,7 +3753,7 @@ await client.lang2Fhir.uploadProfile({
3628
3753
  </dl>
3629
3754
  </details>
3630
3755
 
3631
- <details><summary><code>client.lang2Fhir.<a href="/src/api/resources/lang2Fhir/client/Client.ts">document</a>({ ...params }) -> phenoml.FhirResource</code></summary>
3756
+ <details><summary><code>client.lang2Fhir.<a href="/src/api/resources/lang2Fhir/client/Client.ts">createMulti</a>({ ...params }) -> phenoml.CreateMultiResponse</code></summary>
3632
3757
  <dl>
3633
3758
  <dd>
3634
3759
 
@@ -3640,9 +3765,11 @@ await client.lang2Fhir.uploadProfile({
3640
3765
  <dl>
3641
3766
  <dd>
3642
3767
 
3643
- Extracts text from a document (PDF or image) and converts it into a structured FHIR resource.
3768
+ Analyzes natural language text and extracts multiple FHIR resources, returning them as a transaction Bundle.
3769
+ Automatically detects Patient, Condition, MedicationRequest, Observation, and other resource types from the text.
3770
+ Resources are linked with proper references (e.g., Conditions reference the Patient).
3644
3771
 
3645
- **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.
3772
+ **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.
3646
3773
  </dd>
3647
3774
  </dl>
3648
3775
  </dd>
@@ -3657,10 +3784,9 @@ Extracts text from a document (PDF or image) and converts it into a structured F
3657
3784
  <dd>
3658
3785
 
3659
3786
  ```typescript
3660
- await client.lang2Fhir.document({
3661
- version: "R4",
3662
- resource: "questionnaire",
3663
- content: "JVBERi0xLjQKJeLjz9MK...(base64-encoded PDF or image bytes)"
3787
+ await client.lang2Fhir.createMulti({
3788
+ text: "John Smith, 45-year-old male, diagnosed with Type 2 Diabetes. Prescribed Metformin 500mg twice daily. Blood pressure 140/90.",
3789
+ version: "R4"
3664
3790
  });
3665
3791
 
3666
3792
  ```
@@ -3677,7 +3803,7 @@ await client.lang2Fhir.document({
3677
3803
  <dl>
3678
3804
  <dd>
3679
3805
 
3680
- **request:** `phenoml.lang2Fhir.DocumentRequest`
3806
+ **request:** `phenoml.lang2Fhir.CreateMultiRequest`
3681
3807
 
3682
3808
  </dd>
3683
3809
  </dl>
@@ -3697,7 +3823,7 @@ await client.lang2Fhir.document({
3697
3823
  </dl>
3698
3824
  </details>
3699
3825
 
3700
- <details><summary><code>client.lang2Fhir.<a href="/src/api/resources/lang2Fhir/client/Client.ts">documentMulti</a>({ ...params }) -> phenoml.DocumentMultiResponse</code></summary>
3826
+ <details><summary><code>client.lang2Fhir.<a href="/src/api/resources/lang2Fhir/client/Client.ts">search</a>({ ...params }) -> phenoml.SearchResponse</code></summary>
3701
3827
  <dl>
3702
3828
  <dd>
3703
3829
 
@@ -3709,12 +3835,14 @@ await client.lang2Fhir.document({
3709
3835
  <dl>
3710
3836
  <dd>
3711
3837
 
3712
- Extracts text from a document (PDF or image) and converts it into multiple FHIR resources,
3713
- returned as a transaction Bundle. Combines document text extraction with multi-resource detection.
3714
- Automatically detects Patient, Condition, MedicationRequest, Observation, and other resource types.
3715
- Resources are linked with proper references (e.g., Conditions reference the Patient).
3838
+ Converts natural language text into FHIR search parameters.
3839
+ Automatically identifies the appropriate FHIR resource type and generates valid search query parameters.
3716
3840
 
3717
- **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.
3841
+ Supported resource types include: AllergyIntolerance, Appointment, CarePlan, CareTeam, Condition,
3842
+ Coverage, Device, DiagnosticReport, DocumentReference, Encounter, Goal, Immunization, Location,
3843
+ Medication, MedicationRequest, Observation, Organization, Patient, PlanDefinition, Practitioner,
3844
+ PractitionerRole, Procedure, Provenance, Questionnaire, QuestionnaireResponse, RelatedPerson,
3845
+ Schedule, ServiceRequest, Slot, and Specimen.
3718
3846
  </dd>
3719
3847
  </dl>
3720
3848
  </dd>
@@ -3729,10 +3857,8 @@ Resources are linked with proper references (e.g., Conditions reference the Pati
3729
3857
  <dd>
3730
3858
 
3731
3859
  ```typescript
3732
- await client.lang2Fhir.documentMulti({
3733
- version: "R4",
3734
- content: "JVBERi0xLjQKJeLjz9MK...(base64-encoded PDF or image bytes)",
3735
- provider: "medplum"
3860
+ await client.lang2Fhir.search({
3861
+ text: "Appointments between March 2-9, 2025"
3736
3862
  });
3737
3863
 
3738
3864
  ```
@@ -3749,7 +3875,7 @@ await client.lang2Fhir.documentMulti({
3749
3875
  <dl>
3750
3876
  <dd>
3751
3877
 
3752
- **request:** `phenoml.lang2Fhir.DocumentMultiRequest`
3878
+ **request:** `phenoml.lang2Fhir.SearchRequest`
3753
3879
 
3754
3880
  </dd>
3755
3881
  </dl>
@@ -3765,6 +3891,581 @@ await client.lang2Fhir.documentMulti({
3765
3891
  </dl>
3766
3892
 
3767
3893
 
3894
+ </dd>
3895
+ </dl>
3896
+ </details>
3897
+
3898
+ <details><summary><code>client.lang2Fhir.<a href="/src/api/resources/lang2Fhir/client/Client.ts">uploadProfile</a>({ ...params }) -> phenoml.UploadProfileResponse</code></summary>
3899
+ <dl>
3900
+ <dd>
3901
+
3902
+ #### 📝 Description
3903
+
3904
+ <dl>
3905
+ <dd>
3906
+
3907
+ <dl>
3908
+ <dd>
3909
+
3910
+ **Deprecated — use `POST /fhir/profiles` instead.** This route continues to work
3911
+ and operates on the same custom profiles, so no migration is required; it
3912
+ will be removed in a future release. Note that `POST /fhir/profiles` does not
3913
+ accept `profile_context`; set implementation-guide context with
3914
+ `PUT /fhir/implementation-guides/{name}`.
3915
+
3916
+ Upload a custom FHIR StructureDefinition profile for use with the lang2fhir service.
3917
+
3918
+ All metadata is derived from the StructureDefinition JSON itself. The lowercase `id` field
3919
+ from the StructureDefinition is used as the profile's unique identifier and lookup key.
3920
+ To use the uploaded profile with `/lang2fhir/create`, pass this id as the `resource` parameter.
3921
+
3922
+ Uploads will be rejected if:
3923
+ - A built-in US Core or R4 base profile already exists with the same id
3924
+ - A custom profile with the same id has already been uploaded
3925
+ - A custom profile with the same url has already been uploaded
3926
+ </dd>
3927
+ </dl>
3928
+ </dd>
3929
+ </dl>
3930
+
3931
+ #### 🔌 Usage
3932
+
3933
+ <dl>
3934
+ <dd>
3935
+
3936
+ <dl>
3937
+ <dd>
3938
+
3939
+ ```typescript
3940
+ await client.lang2Fhir.uploadProfile({
3941
+ profile: "eyJyZXNvdXJjZVR5cGUiOiJTdHJ1Y3R1cmVEZWZpbml0aW9uIiwiaWQiOiJjdXN0b20tcGF0aWVudCIsInVybCI6Imh0dHA6Ly9waGVub21sLmNvbS9maGlyL1N0cnVjdHVyZURlZmluaXRpb24vY3VzdG9tLXBhdGllbnQiLCJuYW1lIjoiQ3VzdG9tUGF0aWVudCIsInN0YXR1cyI6ImFjdGl2ZSIsImZoaXJWZXJzaW9uIjoiNC4wLjEiLCJraW5kIjoicmVzb3VyY2UiLCJhYnN0cmFjdCI6ZmFsc2UsInR5cGUiOiJQYXRpZW50IiwiYmFzZURlZmluaXRpb24iOiJodHRwOi8vaGw3Lm9yZy9maGlyL1N0cnVjdHVyZURlZmluaXRpb24vUGF0aWVudCIsImRlcml2YXRpb24iOiJjb25zdHJhaW50Iiwic25hcHNob3QiOnsiZWxlbWVudCI6W3siaWQiOiJQYXRpZW50IiwicGF0aCI6IlBhdGllbnQiLCJtaW4iOjAsIm1heCI6IioifSx7ImlkIjoiUGF0aWVudC5uYW1lIiwicGF0aCI6IlBhdGllbnQubmFtZSIsIm1pbiI6MSwibWF4IjoiKiJ9XX19Cg==",
3942
+ implementation_guide: "acme-cardiology",
3943
+ profile_context: "When clinical text describes cardiology-specific findings, prefer this profile over the generic US Core Condition."
3944
+ });
3945
+
3946
+ ```
3947
+ </dd>
3948
+ </dl>
3949
+ </dd>
3950
+ </dl>
3951
+
3952
+ #### ⚙️ Parameters
3953
+
3954
+ <dl>
3955
+ <dd>
3956
+
3957
+ <dl>
3958
+ <dd>
3959
+
3960
+ **request:** `phenoml.ProfileUploadRequest`
3961
+
3962
+ </dd>
3963
+ </dl>
3964
+
3965
+ <dl>
3966
+ <dd>
3967
+
3968
+ **requestOptions:** `Lang2FhirClient.RequestOptions`
3969
+
3970
+ </dd>
3971
+ </dl>
3972
+ </dd>
3973
+ </dl>
3974
+
3975
+
3976
+ </dd>
3977
+ </dl>
3978
+ </details>
3979
+
3980
+ <details><summary><code>client.lang2Fhir.<a href="/src/api/resources/lang2Fhir/client/Client.ts">document</a>({ ...params }) -> phenoml.FhirResource</code></summary>
3981
+ <dl>
3982
+ <dd>
3983
+
3984
+ #### 📝 Description
3985
+
3986
+ <dl>
3987
+ <dd>
3988
+
3989
+ <dl>
3990
+ <dd>
3991
+
3992
+ Extracts text from a document (PDF or image) and converts it into a structured FHIR resource.
3993
+
3994
+ **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.
3995
+ </dd>
3996
+ </dl>
3997
+ </dd>
3998
+ </dl>
3999
+
4000
+ #### 🔌 Usage
4001
+
4002
+ <dl>
4003
+ <dd>
4004
+
4005
+ <dl>
4006
+ <dd>
4007
+
4008
+ ```typescript
4009
+ await client.lang2Fhir.document({
4010
+ version: "R4",
4011
+ resource: "questionnaire",
4012
+ content: "JVBERi0xLjQKJeLjz9MK...(base64-encoded PDF or image bytes)"
4013
+ });
4014
+
4015
+ ```
4016
+ </dd>
4017
+ </dl>
4018
+ </dd>
4019
+ </dl>
4020
+
4021
+ #### ⚙️ Parameters
4022
+
4023
+ <dl>
4024
+ <dd>
4025
+
4026
+ <dl>
4027
+ <dd>
4028
+
4029
+ **request:** `phenoml.lang2Fhir.DocumentRequest`
4030
+
4031
+ </dd>
4032
+ </dl>
4033
+
4034
+ <dl>
4035
+ <dd>
4036
+
4037
+ **requestOptions:** `Lang2FhirClient.RequestOptions`
4038
+
4039
+ </dd>
4040
+ </dl>
4041
+ </dd>
4042
+ </dl>
4043
+
4044
+
4045
+ </dd>
4046
+ </dl>
4047
+ </details>
4048
+
4049
+ <details><summary><code>client.lang2Fhir.<a href="/src/api/resources/lang2Fhir/client/Client.ts">documentMulti</a>({ ...params }) -> phenoml.DocumentMultiResponse</code></summary>
4050
+ <dl>
4051
+ <dd>
4052
+
4053
+ #### 📝 Description
4054
+
4055
+ <dl>
4056
+ <dd>
4057
+
4058
+ <dl>
4059
+ <dd>
4060
+
4061
+ Extracts text from a document (PDF or image) and converts it into multiple FHIR resources,
4062
+ returned as a transaction Bundle. Combines document text extraction with multi-resource detection.
4063
+ Automatically detects Patient, Condition, MedicationRequest, Observation, and other resource types.
4064
+ Resources are linked with proper references (e.g., Conditions reference the Patient).
4065
+
4066
+ **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.
4067
+ </dd>
4068
+ </dl>
4069
+ </dd>
4070
+ </dl>
4071
+
4072
+ #### 🔌 Usage
4073
+
4074
+ <dl>
4075
+ <dd>
4076
+
4077
+ <dl>
4078
+ <dd>
4079
+
4080
+ ```typescript
4081
+ await client.lang2Fhir.documentMulti({
4082
+ version: "R4",
4083
+ content: "JVBERi0xLjQKJeLjz9MK...(base64-encoded PDF or image bytes)",
4084
+ provider: "medplum"
4085
+ });
4086
+
4087
+ ```
4088
+ </dd>
4089
+ </dl>
4090
+ </dd>
4091
+ </dl>
4092
+
4093
+ #### ⚙️ Parameters
4094
+
4095
+ <dl>
4096
+ <dd>
4097
+
4098
+ <dl>
4099
+ <dd>
4100
+
4101
+ **request:** `phenoml.lang2Fhir.DocumentMultiRequest`
4102
+
4103
+ </dd>
4104
+ </dl>
4105
+
4106
+ <dl>
4107
+ <dd>
4108
+
4109
+ **requestOptions:** `Lang2FhirClient.RequestOptions`
4110
+
4111
+ </dd>
4112
+ </dl>
4113
+ </dd>
4114
+ </dl>
4115
+
4116
+
4117
+ </dd>
4118
+ </dl>
4119
+ </details>
4120
+
4121
+ ## Profiles
4122
+ <details><summary><code>client.profiles.profiles.<a href="/src/api/resources/profiles/resources/profiles/client/Client.ts">list</a>({ ...params }) -> phenoml.ProfileListResponse</code></summary>
4123
+ <dl>
4124
+ <dd>
4125
+
4126
+ #### 📝 Description
4127
+
4128
+ <dl>
4129
+ <dd>
4130
+
4131
+ <dl>
4132
+ <dd>
4133
+
4134
+ Returns metadata for every custom (uploaded) FHIR profile on this
4135
+ instance, across all implementation guides. The full StructureDefinition
4136
+ JSON is omitted from each entry; fetch a single profile by id to retrieve it.
4137
+
4138
+ The `url` query parameter filters by canonical URL. The canonical URL is the
4139
+ stable key other platform features use to reference a profile (FHIR's
4140
+ `meta.profile`, `baseDefinition`), since StructureDefinition ids are only
4141
+ unique within a package. A non-matching filter returns an empty list, not a 404.
4142
+ </dd>
4143
+ </dl>
4144
+ </dd>
4145
+ </dl>
4146
+
4147
+ #### 🔌 Usage
4148
+
4149
+ <dl>
4150
+ <dd>
4151
+
4152
+ <dl>
4153
+ <dd>
4154
+
4155
+ ```typescript
4156
+ await client.profiles.profiles.list({
4157
+ url: "http://phenoml.com/fhir/StructureDefinition/custom-patient|1.0.0"
4158
+ });
4159
+
4160
+ ```
4161
+ </dd>
4162
+ </dl>
4163
+ </dd>
4164
+ </dl>
4165
+
4166
+ #### ⚙️ Parameters
4167
+
4168
+ <dl>
4169
+ <dd>
4170
+
4171
+ <dl>
4172
+ <dd>
4173
+
4174
+ **request:** `phenoml.profiles.ListRequest`
4175
+
4176
+ </dd>
4177
+ </dl>
4178
+
4179
+ <dl>
4180
+ <dd>
4181
+
4182
+ **requestOptions:** `ProfilesClient.RequestOptions`
4183
+
4184
+ </dd>
4185
+ </dl>
4186
+ </dd>
4187
+ </dl>
4188
+
4189
+
4190
+ </dd>
4191
+ </dl>
4192
+ </details>
4193
+
4194
+ <details><summary><code>client.profiles.profiles.<a href="/src/api/resources/profiles/resources/profiles/client/Client.ts">create</a>({ ...params }) -> phenoml.ProfileSummary</code></summary>
4195
+ <dl>
4196
+ <dd>
4197
+
4198
+ #### 📝 Description
4199
+
4200
+ <dl>
4201
+ <dd>
4202
+
4203
+ <dl>
4204
+ <dd>
4205
+
4206
+ Creates a custom profile from a FHIR StructureDefinition supplied as a JSON
4207
+ object. All metadata (version, resource type, id, url) is derived from the
4208
+ StructureDefinition; the lowercase StructureDefinition id becomes the
4209
+ profile's lookup key. Code system configuration is auto-extracted from the
4210
+ snapshot. Optionally group the profile under a named implementation guide.
4211
+ </dd>
4212
+ </dl>
4213
+ </dd>
4214
+ </dl>
4215
+
4216
+ #### 🔌 Usage
4217
+
4218
+ <dl>
4219
+ <dd>
4220
+
4221
+ <dl>
4222
+ <dd>
4223
+
4224
+ ```typescript
4225
+ await client.profiles.profiles.create({
4226
+ structure_definition: {
4227
+ "key": "value"
4228
+ }
4229
+ });
4230
+
4231
+ ```
4232
+ </dd>
4233
+ </dl>
4234
+ </dd>
4235
+ </dl>
4236
+
4237
+ #### ⚙️ Parameters
4238
+
4239
+ <dl>
4240
+ <dd>
4241
+
4242
+ <dl>
4243
+ <dd>
4244
+
4245
+ **request:** `phenoml.ProfileUploadRequest`
4246
+
4247
+ </dd>
4248
+ </dl>
4249
+
4250
+ <dl>
4251
+ <dd>
4252
+
4253
+ **requestOptions:** `ProfilesClient.RequestOptions`
4254
+
4255
+ </dd>
4256
+ </dl>
4257
+ </dd>
4258
+ </dl>
4259
+
4260
+
4261
+ </dd>
4262
+ </dl>
4263
+ </details>
4264
+
4265
+ <details><summary><code>client.profiles.profiles.<a href="/src/api/resources/profiles/resources/profiles/client/Client.ts">get</a>(id) -> phenoml.ProfileGetResponse</code></summary>
4266
+ <dl>
4267
+ <dd>
4268
+
4269
+ #### 📝 Description
4270
+
4271
+ <dl>
4272
+ <dd>
4273
+
4274
+ <dl>
4275
+ <dd>
4276
+
4277
+ Returns a single custom profile by id, including its full StructureDefinition JSON.
4278
+ </dd>
4279
+ </dl>
4280
+ </dd>
4281
+ </dl>
4282
+
4283
+ #### 🔌 Usage
4284
+
4285
+ <dl>
4286
+ <dd>
4287
+
4288
+ <dl>
4289
+ <dd>
4290
+
4291
+ ```typescript
4292
+ await client.profiles.profiles.get("custom-patient");
4293
+
4294
+ ```
4295
+ </dd>
4296
+ </dl>
4297
+ </dd>
4298
+ </dl>
4299
+
4300
+ #### ⚙️ Parameters
4301
+
4302
+ <dl>
4303
+ <dd>
4304
+
4305
+ <dl>
4306
+ <dd>
4307
+
4308
+ **id:** `string` — The lowercase StructureDefinition id of the custom profile.
4309
+
4310
+ </dd>
4311
+ </dl>
4312
+
4313
+ <dl>
4314
+ <dd>
4315
+
4316
+ **requestOptions:** `ProfilesClient.RequestOptions`
4317
+
4318
+ </dd>
4319
+ </dl>
4320
+ </dd>
4321
+ </dl>
4322
+
4323
+
4324
+ </dd>
4325
+ </dl>
4326
+ </details>
4327
+
4328
+ <details><summary><code>client.profiles.profiles.<a href="/src/api/resources/profiles/resources/profiles/client/Client.ts">update</a>(id, { ...params }) -> phenoml.ProfileSummary</code></summary>
4329
+ <dl>
4330
+ <dd>
4331
+
4332
+ #### 📝 Description
4333
+
4334
+ <dl>
4335
+ <dd>
4336
+
4337
+ <dl>
4338
+ <dd>
4339
+
4340
+ Replaces an existing custom profile with a new StructureDefinition. The
4341
+ `id` path parameter is authoritative: if the StructureDefinition includes
4342
+ an `id` it must match the path parameter, and if it omits one the path
4343
+ parameter is used. The FHIR resource type of the profile cannot change.
4344
+ Code system configuration is
4345
+ re-derived from the new StructureDefinition. When `implementation_guide` is
4346
+ omitted, the profile keeps its existing implementation guide. The instance
4347
+ stores a single version per canonical URL, so this replaces it in place.
4348
+ </dd>
4349
+ </dl>
4350
+ </dd>
4351
+ </dl>
4352
+
4353
+ #### 🔌 Usage
4354
+
4355
+ <dl>
4356
+ <dd>
4357
+
4358
+ <dl>
4359
+ <dd>
4360
+
4361
+ ```typescript
4362
+ await client.profiles.profiles.update("custom-patient", {
4363
+ structure_definition: {
4364
+ "key": "value"
4365
+ }
4366
+ });
4367
+
4368
+ ```
4369
+ </dd>
4370
+ </dl>
4371
+ </dd>
4372
+ </dl>
4373
+
4374
+ #### ⚙️ Parameters
4375
+
4376
+ <dl>
4377
+ <dd>
4378
+
4379
+ <dl>
4380
+ <dd>
4381
+
4382
+ **id:** `string` — The lowercase StructureDefinition id of the custom profile.
4383
+
4384
+ </dd>
4385
+ </dl>
4386
+
4387
+ <dl>
4388
+ <dd>
4389
+
4390
+ **request:** `phenoml.ProfileUploadRequest`
4391
+
4392
+ </dd>
4393
+ </dl>
4394
+
4395
+ <dl>
4396
+ <dd>
4397
+
4398
+ **requestOptions:** `ProfilesClient.RequestOptions`
4399
+
4400
+ </dd>
4401
+ </dl>
4402
+ </dd>
4403
+ </dl>
4404
+
4405
+
4406
+ </dd>
4407
+ </dl>
4408
+ </details>
4409
+
4410
+ <details><summary><code>client.profiles.profiles.<a href="/src/api/resources/profiles/resources/profiles/client/Client.ts">delete</a>(id) -> void</code></summary>
4411
+ <dl>
4412
+ <dd>
4413
+
4414
+ #### 📝 Description
4415
+
4416
+ <dl>
4417
+ <dd>
4418
+
4419
+ <dl>
4420
+ <dd>
4421
+
4422
+ Permanently deletes a custom profile by id.
4423
+ </dd>
4424
+ </dl>
4425
+ </dd>
4426
+ </dl>
4427
+
4428
+ #### 🔌 Usage
4429
+
4430
+ <dl>
4431
+ <dd>
4432
+
4433
+ <dl>
4434
+ <dd>
4435
+
4436
+ ```typescript
4437
+ await client.profiles.profiles.delete("custom-patient");
4438
+
4439
+ ```
4440
+ </dd>
4441
+ </dl>
4442
+ </dd>
4443
+ </dl>
4444
+
4445
+ #### ⚙️ Parameters
4446
+
4447
+ <dl>
4448
+ <dd>
4449
+
4450
+ <dl>
4451
+ <dd>
4452
+
4453
+ **id:** `string` — The lowercase StructureDefinition id of the custom profile.
4454
+
4455
+ </dd>
4456
+ </dl>
4457
+
4458
+ <dl>
4459
+ <dd>
4460
+
4461
+ **requestOptions:** `ProfilesClient.RequestOptions`
4462
+
4463
+ </dd>
4464
+ </dl>
4465
+ </dd>
4466
+ </dl>
4467
+
4468
+
3768
4469
  </dd>
3769
4470
  </dl>
3770
4471
  </details>