@awell-health/awell-extensions 2.0.151 → 2.0.153

Sign up to get free protection for your applications and to get access to all the features.
Files changed (325) hide show
  1. package/dist/extensions/cerner/actions/createPatient/__testdata__/CreateFhirPatient.mock.d.ts +8 -0
  2. package/dist/extensions/cerner/actions/createPatient/__testdata__/CreateFhirPatient.mock.js +12 -0
  3. package/dist/extensions/cerner/actions/createPatient/__testdata__/CreateFhirPatient.mock.js.map +1 -0
  4. package/dist/extensions/cerner/actions/createPatient/config/datapoints.d.ts +6 -1
  5. package/dist/extensions/cerner/actions/createPatient/config/datapoints.js +6 -1
  6. package/dist/extensions/cerner/actions/createPatient/config/datapoints.js.map +1 -1
  7. package/dist/extensions/cerner/actions/createPatient/config/fields.d.ts +70 -2
  8. package/dist/extensions/cerner/actions/createPatient/config/fields.js +61 -2
  9. package/dist/extensions/cerner/actions/createPatient/config/fields.js.map +1 -1
  10. package/dist/extensions/cerner/actions/createPatient/createPatient.js +61 -1
  11. package/dist/extensions/cerner/actions/createPatient/createPatient.js.map +1 -1
  12. package/dist/extensions/cerner/actions/getPatient/__testdata__/PatientRead.mock.d.ts +37 -0
  13. package/dist/extensions/cerner/actions/getPatient/__testdata__/PatientRead.mock.js +55 -0
  14. package/dist/extensions/cerner/actions/getPatient/__testdata__/PatientRead.mock.js.map +1 -0
  15. package/dist/extensions/cerner/actions/getPatient/config/datapoints.d.ts +6 -1
  16. package/dist/extensions/cerner/actions/getPatient/config/datapoints.js +6 -1
  17. package/dist/extensions/cerner/actions/getPatient/config/datapoints.js.map +1 -1
  18. package/dist/extensions/cerner/actions/getPatient/config/fields.d.ts +17 -2
  19. package/dist/extensions/cerner/actions/getPatient/config/fields.js +13 -2
  20. package/dist/extensions/cerner/actions/getPatient/config/fields.js.map +1 -1
  21. package/dist/extensions/cerner/actions/getPatient/getPatient.js +33 -2
  22. package/dist/extensions/cerner/actions/getPatient/getPatient.js.map +1 -1
  23. package/dist/extensions/cerner/actions/index.d.ts +31 -4
  24. package/dist/extensions/cerner/actions/index.js +2 -6
  25. package/dist/extensions/cerner/actions/index.js.map +1 -1
  26. package/dist/extensions/cerner/index.js +1 -1
  27. package/dist/extensions/cerner/index.js.map +1 -1
  28. package/dist/extensions/cerner/lib/api/FhirR4/FhirR4client-backup.d.ts +0 -0
  29. package/dist/extensions/cerner/lib/api/FhirR4/FhirR4client-backup.js +172 -0
  30. package/dist/extensions/cerner/lib/api/FhirR4/FhirR4client-backup.js.map +1 -0
  31. package/dist/extensions/cerner/lib/api/FhirR4/FhirR4client.d.ts +19 -0
  32. package/dist/extensions/cerner/lib/api/FhirR4/FhirR4client.js +45 -0
  33. package/dist/extensions/cerner/lib/api/FhirR4/FhirR4client.js.map +1 -0
  34. package/dist/extensions/cerner/lib/api/FhirR4/cacheService.d.ts +11 -0
  35. package/dist/extensions/cerner/lib/api/FhirR4/cacheService.js +15 -0
  36. package/dist/extensions/cerner/lib/api/FhirR4/cacheService.js.map +1 -0
  37. package/dist/extensions/cerner/lib/api/FhirR4/index.d.ts +1 -0
  38. package/dist/extensions/cerner/lib/api/FhirR4/index.js +18 -0
  39. package/dist/extensions/cerner/lib/api/FhirR4/index.js.map +1 -0
  40. package/dist/extensions/cerner/lib/api/FhirR4/schema/AppointmentRead.schema.d.ts +9 -0
  41. package/dist/extensions/cerner/lib/api/FhirR4/schema/AppointmentRead.schema.js +6 -0
  42. package/dist/extensions/cerner/lib/api/FhirR4/schema/AppointmentRead.schema.js.map +1 -0
  43. package/dist/extensions/cerner/lib/api/FhirR4/schema/DocumentReferenceCreate.schema.d.ts +7 -0
  44. package/dist/extensions/cerner/lib/api/FhirR4/schema/DocumentReferenceCreate.schema.js +3 -0
  45. package/dist/extensions/cerner/lib/api/FhirR4/schema/DocumentReferenceCreate.schema.js.map +1 -0
  46. package/dist/extensions/cerner/lib/api/FhirR4/schema/PatientCreate.schema.d.ts +7 -0
  47. package/dist/extensions/cerner/lib/api/FhirR4/schema/PatientCreate.schema.js +3 -0
  48. package/dist/extensions/cerner/lib/api/FhirR4/schema/PatientCreate.schema.js.map +1 -0
  49. package/dist/extensions/cerner/lib/api/FhirR4/schema/PatientMatch.schema.d.ts +37 -0
  50. package/dist/extensions/cerner/lib/api/FhirR4/schema/PatientMatch.schema.js +3 -0
  51. package/dist/extensions/cerner/lib/api/FhirR4/schema/PatientMatch.schema.js.map +1 -0
  52. package/dist/extensions/cerner/lib/api/FhirR4/schema/PatientRead.schema.d.ts +9 -0
  53. package/dist/extensions/cerner/lib/api/FhirR4/schema/PatientRead.schema.js +6 -0
  54. package/dist/extensions/cerner/lib/api/FhirR4/schema/PatientRead.schema.js.map +1 -0
  55. package/dist/extensions/cerner/lib/api/FhirR4/schema/PatientSearch.schema.d.ts +8 -0
  56. package/dist/extensions/cerner/lib/api/FhirR4/schema/PatientSearch.schema.js +3 -0
  57. package/dist/extensions/cerner/lib/api/FhirR4/schema/PatientSearch.schema.js.map +1 -0
  58. package/dist/extensions/cerner/lib/api/FhirR4/schema/index.d.ts +6 -0
  59. package/dist/extensions/cerner/lib/api/FhirR4/schema/index.js +23 -0
  60. package/dist/extensions/cerner/lib/api/FhirR4/schema/index.js.map +1 -0
  61. package/dist/extensions/cerner/lib/api/auth/constructCernerUrls.d.ts +4 -0
  62. package/dist/extensions/cerner/lib/api/auth/constructCernerUrls.js +11 -0
  63. package/dist/extensions/cerner/lib/api/auth/constructCernerUrls.js.map +1 -0
  64. package/dist/extensions/cerner/lib/api/auth/index.d.ts +1 -0
  65. package/dist/extensions/cerner/lib/api/auth/index.js +18 -0
  66. package/dist/extensions/cerner/lib/api/auth/index.js.map +1 -0
  67. package/dist/extensions/cerner/lib/validatePayloadAndCreateSdks.d.ts +18 -0
  68. package/dist/extensions/cerner/lib/validatePayloadAndCreateSdks.js +41 -0
  69. package/dist/extensions/cerner/lib/validatePayloadAndCreateSdks.js.map +1 -0
  70. package/dist/extensions/cerner/settings.d.ts +36 -2
  71. package/dist/extensions/cerner/settings.js +28 -2
  72. package/dist/extensions/cerner/settings.js.map +1 -1
  73. package/dist/extensions/dockHealth/lib/dock.types.d.ts +2 -2
  74. package/dist/extensions/elation/actions/findAppointmentsByPrompt/findAppointmentsByPrompt.js +33 -113
  75. package/dist/extensions/elation/actions/findAppointmentsByPrompt/findAppointmentsByPrompt.js.map +1 -1
  76. package/dist/extensions/elation/actions/findAppointmentsByPrompt/getAppoitnmentCountByStatus.d.ts +2 -0
  77. package/dist/extensions/elation/actions/findAppointmentsByPrompt/getAppoitnmentCountByStatus.js +15 -0
  78. package/dist/extensions/elation/actions/findAppointmentsByPrompt/getAppoitnmentCountByStatus.js.map +1 -0
  79. package/dist/extensions/elation/actions/findAppointmentsByPrompt/lib/findAppointmentsByPromptWithLLM/findAppointmentsByPromptWithLLM.d.ts +14 -0
  80. package/dist/extensions/elation/actions/findAppointmentsByPrompt/lib/findAppointmentsByPromptWithLLM/findAppointmentsByPromptWithLLM.js +36 -0
  81. package/dist/extensions/elation/actions/findAppointmentsByPrompt/lib/findAppointmentsByPromptWithLLM/findAppointmentsByPromptWithLLM.js.map +1 -0
  82. package/dist/extensions/elation/actions/findAppointmentsByPrompt/lib/findAppointmentsByPromptWithLLM/parser.d.ts +17 -0
  83. package/dist/extensions/elation/actions/findAppointmentsByPrompt/lib/findAppointmentsByPromptWithLLM/parser.js +14 -0
  84. package/dist/extensions/elation/actions/findAppointmentsByPrompt/lib/findAppointmentsByPromptWithLLM/parser.js.map +1 -0
  85. package/dist/extensions/elation/actions/findAppointmentsByPrompt/lib/findAppointmentsByPromptWithLLM/prompt.d.ts +2 -0
  86. package/dist/extensions/elation/actions/findAppointmentsByPrompt/lib/findAppointmentsByPromptWithLLM/prompt.js +24 -0
  87. package/dist/extensions/elation/actions/findAppointmentsByPrompt/lib/findAppointmentsByPromptWithLLM/prompt.js.map +1 -0
  88. package/dist/extensions/elation/actions/findFutureAppointment/findFutureAppointment.d.ts +1 -1
  89. package/dist/extensions/elation/actions/findFutureAppointment/findFutureAppointment.js +32 -90
  90. package/dist/extensions/elation/actions/findFutureAppointment/findFutureAppointment.js.map +1 -1
  91. package/dist/extensions/elation/actions/findFutureAppointment/formatAppointments.d.ts +2 -0
  92. package/dist/extensions/elation/actions/findFutureAppointment/formatAppointments.js +18 -0
  93. package/dist/extensions/elation/actions/findFutureAppointment/formatAppointments.js.map +1 -0
  94. package/dist/extensions/elation/actions/findFutureAppointment/getFutureAppoitnments.d.ts +3 -0
  95. package/dist/extensions/elation/actions/findFutureAppointment/getFutureAppoitnments.js +15 -0
  96. package/dist/extensions/elation/actions/findFutureAppointment/getFutureAppoitnments.js.map +1 -0
  97. package/dist/extensions/elation/actions/findFutureAppointment/lib/findAppointmentWithLLM/findAppointmentWithLLM.d.ts +14 -0
  98. package/dist/extensions/elation/actions/findFutureAppointment/lib/findAppointmentWithLLM/findAppointmentWithLLM.js +29 -0
  99. package/dist/extensions/elation/actions/findFutureAppointment/lib/findAppointmentWithLLM/findAppointmentWithLLM.js.map +1 -0
  100. package/dist/extensions/elation/actions/findFutureAppointment/lib/findAppointmentWithLLM/parser.d.ts +17 -0
  101. package/dist/extensions/elation/actions/findFutureAppointment/lib/findAppointmentWithLLM/parser.js +16 -0
  102. package/dist/extensions/elation/actions/findFutureAppointment/lib/findAppointmentWithLLM/parser.js.map +1 -0
  103. package/dist/extensions/elation/actions/findFutureAppointment/lib/findAppointmentWithLLM/prompt.d.ts +2 -0
  104. package/dist/extensions/elation/actions/findFutureAppointment/lib/findAppointmentWithLLM/prompt.js +20 -0
  105. package/dist/extensions/elation/actions/findFutureAppointment/lib/findAppointmentWithLLM/prompt.js.map +1 -0
  106. package/dist/extensions/elation/actions/index.d.ts +0 -210
  107. package/dist/extensions/elation/actions/updatePatientTags/config/types.d.ts +29 -0
  108. package/dist/extensions/elation/actions/updatePatientTags/config/types.js +21 -0
  109. package/dist/extensions/elation/actions/updatePatientTags/config/types.js.map +1 -0
  110. package/dist/extensions/elation/actions/updatePatientTags/lib/getTagsFromLLM/getTagsFromLLM.d.ts +13 -0
  111. package/dist/extensions/elation/actions/updatePatientTags/lib/getTagsFromLLM/getTagsFromLLM.js +29 -0
  112. package/dist/extensions/elation/actions/updatePatientTags/lib/getTagsFromLLM/getTagsFromLLM.js.map +1 -0
  113. package/dist/extensions/elation/actions/updatePatientTags/lib/getTagsFromLLM/parser.d.ts +13 -0
  114. package/dist/extensions/elation/actions/updatePatientTags/lib/getTagsFromLLM/parser.js +7 -0
  115. package/dist/extensions/elation/actions/updatePatientTags/lib/getTagsFromLLM/parser.js.map +1 -0
  116. package/dist/extensions/elation/actions/updatePatientTags/lib/getTagsFromLLM/prompt.d.ts +2 -0
  117. package/dist/extensions/elation/actions/updatePatientTags/lib/getTagsFromLLM/prompt.js +22 -0
  118. package/dist/extensions/elation/actions/updatePatientTags/lib/getTagsFromLLM/prompt.js.map +1 -0
  119. package/dist/extensions/elation/actions/updatePatientTags/updatePatientTags.d.ts +8 -0
  120. package/dist/extensions/elation/actions/updatePatientTags/updatePatientTags.js +35 -77
  121. package/dist/extensions/elation/actions/updatePatientTags/updatePatientTags.js.map +1 -1
  122. package/dist/extensions/elation/actions/updatePatientTags/updateTags.d.ts +2 -0
  123. package/dist/extensions/elation/actions/updatePatientTags/updateTags.js +18 -0
  124. package/dist/extensions/elation/actions/updatePatientTags/updateTags.js.map +1 -0
  125. package/dist/extensions/elation/settings.d.ts +1 -10
  126. package/dist/extensions/elation/settings.js +0 -8
  127. package/dist/extensions/elation/settings.js.map +1 -1
  128. package/dist/extensions/elation/validation/referralOrder.zod.d.ts +17 -17
  129. package/dist/extensions/epic/actions/createClinicalNote/config/fields.js +1 -1
  130. package/dist/extensions/epic/actions/createClinicalNote/config/fields.js.map +1 -1
  131. package/dist/extensions/epic/actions/createClinicalNote/createClinicalNote.js +1 -1
  132. package/dist/extensions/epic/actions/createClinicalNote/createClinicalNote.js.map +1 -1
  133. package/dist/extensions/epic/actions/createPatient/config/fields.js +1 -1
  134. package/dist/extensions/epic/actions/createPatient/config/fields.js.map +1 -1
  135. package/dist/extensions/epic/actions/matchPatient/config/fields.js +1 -1
  136. package/dist/extensions/epic/actions/matchPatient/config/fields.js.map +1 -1
  137. package/dist/extensions/epic/lib/api/customFhirSchemas/DocumentReference/Status.schema.js.map +1 -0
  138. package/dist/extensions/epic/lib/api/customFhirSchemas/DocumentReference/Type.schema.js.map +1 -0
  139. package/dist/extensions/epic/lib/api/{schemas → customFhirSchemas}/DocumentReference/index.js +1 -1
  140. package/dist/extensions/epic/lib/api/customFhirSchemas/DocumentReference/index.js.map +1 -0
  141. package/dist/extensions/markdown.json +1 -1
  142. package/dist/extensions/medplum/actions/createServiceRequest/config/fields.js +4 -6
  143. package/dist/extensions/medplum/actions/createServiceRequest/config/fields.js.map +1 -1
  144. package/dist/extensions/medplum/actions/createTask/config/fields.js +4 -6
  145. package/dist/extensions/medplum/actions/createTask/config/fields.js.map +1 -1
  146. package/dist/extensions/medplum/fhir/schemas/resources/patient.schema.js +2 -2
  147. package/dist/extensions/medplum/fhir/schemas/resources/patient.schema.js.map +1 -1
  148. package/dist/extensions/medplum/fhir/schemas/resources/serviceRequest.schema.js +5 -5
  149. package/dist/extensions/medplum/fhir/schemas/resources/serviceRequest.schema.js.map +1 -1
  150. package/dist/extensions/medplum/fhir/schemas/resources/task.schema.js +4 -4
  151. package/dist/extensions/medplum/fhir/schemas/resources/task.schema.js.map +1 -1
  152. package/dist/extensions/shelly/actions/categorizeMessage/categorizeMessage.d.ts +10 -2
  153. package/dist/extensions/shelly/actions/categorizeMessage/categorizeMessage.js +32 -24
  154. package/dist/extensions/shelly/actions/categorizeMessage/categorizeMessage.js.map +1 -1
  155. package/dist/extensions/shelly/actions/categorizeMessage/lib/categorizeMessageWithLLM/categorizeMessageWithLLM.d.ts +22 -2
  156. package/dist/extensions/shelly/actions/categorizeMessage/lib/categorizeMessageWithLLM/categorizeMessageWithLLM.js +22 -7
  157. package/dist/extensions/shelly/actions/categorizeMessage/lib/categorizeMessageWithLLM/categorizeMessageWithLLM.js.map +1 -1
  158. package/dist/extensions/shelly/actions/categorizeMessage/lib/categorizeMessageWithLLM/parser.d.ts +20 -0
  159. package/dist/extensions/shelly/actions/categorizeMessage/lib/categorizeMessageWithLLM/parser.js +18 -0
  160. package/dist/extensions/shelly/actions/categorizeMessage/lib/categorizeMessageWithLLM/parser.js.map +1 -0
  161. package/dist/extensions/shelly/actions/categorizeMessage/lib/categorizeMessageWithLLM/prompt.d.ts +13 -0
  162. package/dist/extensions/shelly/actions/categorizeMessage/lib/categorizeMessageWithLLM/prompt.js +35 -0
  163. package/dist/extensions/shelly/actions/categorizeMessage/lib/categorizeMessageWithLLM/prompt.js.map +1 -0
  164. package/dist/extensions/shelly/actions/generateMessage/generateMessage.d.ts +10 -2
  165. package/dist/extensions/shelly/actions/generateMessage/generateMessage.js +33 -25
  166. package/dist/extensions/shelly/actions/generateMessage/generateMessage.js.map +1 -1
  167. package/dist/extensions/shelly/actions/generateMessage/lib/generateMessageWithLLM/generateMessageWithLLM.d.ts +18 -2
  168. package/dist/extensions/shelly/actions/generateMessage/lib/generateMessageWithLLM/generateMessageWithLLM.js +23 -10
  169. package/dist/extensions/shelly/actions/generateMessage/lib/generateMessageWithLLM/generateMessageWithLLM.js.map +1 -1
  170. package/dist/extensions/shelly/actions/generateMessage/lib/generateMessageWithLLM/parser.d.ts +28 -0
  171. package/dist/extensions/shelly/actions/generateMessage/lib/generateMessageWithLLM/parser.js +17 -0
  172. package/dist/extensions/shelly/actions/generateMessage/lib/generateMessageWithLLM/parser.js.map +1 -0
  173. package/dist/extensions/shelly/actions/generateMessage/lib/generateMessageWithLLM/prompt.d.ts +10 -0
  174. package/dist/extensions/shelly/actions/generateMessage/lib/generateMessageWithLLM/prompt.js +121 -0
  175. package/dist/extensions/shelly/actions/generateMessage/lib/generateMessageWithLLM/prompt.js.map +1 -0
  176. package/dist/extensions/shelly/actions/index.d.ts +7 -63
  177. package/dist/extensions/shelly/actions/medicationFromImage/medicationFromImage.d.ts +1 -2
  178. package/dist/extensions/shelly/actions/medicationFromImage/medicationFromImage.js.map +1 -1
  179. package/dist/extensions/shelly/actions/reviewMedicationExtraction/reviewMedicationExtraction.d.ts +1 -2
  180. package/dist/extensions/shelly/actions/reviewMedicationExtraction/reviewMedicationExtraction.js.map +1 -1
  181. package/dist/extensions/shelly/actions/summarizeCareFlow/lib/summarizeCareFlowWithLLM/{constants.js → prompt.js} +1 -1
  182. package/dist/extensions/shelly/actions/summarizeCareFlow/lib/summarizeCareFlowWithLLM/prompt.js.map +1 -0
  183. package/dist/extensions/shelly/actions/summarizeCareFlow/lib/summarizeCareFlowWithLLM/summarizeCareFlowWithLLM.d.ts +22 -2
  184. package/dist/extensions/shelly/actions/summarizeCareFlow/lib/summarizeCareFlowWithLLM/summarizeCareFlowWithLLM.js +30 -8
  185. package/dist/extensions/shelly/actions/summarizeCareFlow/lib/summarizeCareFlowWithLLM/summarizeCareFlowWithLLM.js.map +1 -1
  186. package/dist/extensions/shelly/actions/summarizeCareFlow/summarizeCareFlow.d.ts +1 -2
  187. package/dist/extensions/shelly/actions/summarizeCareFlow/summarizeCareFlow.js +24 -21
  188. package/dist/extensions/shelly/actions/summarizeCareFlow/summarizeCareFlow.js.map +1 -1
  189. package/dist/extensions/shelly/actions/summarizeForm/summarizeForm.d.ts +10 -2
  190. package/dist/extensions/shelly/actions/summarizeForm/summarizeForm.js +42 -28
  191. package/dist/extensions/shelly/actions/summarizeForm/summarizeForm.js.map +1 -1
  192. package/dist/extensions/shelly/actions/summarizeFormsInStep/summarizeFormsInStep.d.ts +1 -2
  193. package/dist/extensions/shelly/actions/summarizeFormsInStep/summarizeFormsInStep.js +29 -26
  194. package/dist/extensions/shelly/actions/summarizeFormsInStep/summarizeFormsInStep.js.map +1 -1
  195. package/dist/extensions/shelly/index.js +2 -3
  196. package/dist/extensions/shelly/index.js.map +1 -1
  197. package/dist/extensions/shelly/lib/summarizeFormWithLLM/{constants.js → prompt.js} +1 -1
  198. package/dist/extensions/shelly/lib/summarizeFormWithLLM/prompt.js.map +1 -0
  199. package/dist/extensions/shelly/lib/summarizeFormWithLLM/summarizeFormWithLLM.d.ts +23 -2
  200. package/dist/extensions/shelly/lib/summarizeFormWithLLM/summarizeFormWithLLM.js +33 -9
  201. package/dist/extensions/shelly/lib/summarizeFormWithLLM/summarizeFormWithLLM.js.map +1 -1
  202. package/dist/extensions/shelly/lib/validatePayloadAndCreateSdk.d.ts +1 -5
  203. package/dist/extensions/shelly/lib/validatePayloadAndCreateSdk.js +5 -20
  204. package/dist/extensions/shelly/lib/validatePayloadAndCreateSdk.js.map +1 -1
  205. package/dist/extensions/zendesk/v1/actions/createTask/config/fields.d.ts +2 -2
  206. package/dist/src/lib/fhir/schemas/Appointment/Status.schema.js.map +1 -0
  207. package/dist/src/lib/fhir/schemas/Appointment/index.js.map +1 -0
  208. package/dist/src/lib/fhir/schemas/Patient/Gender.schema.js.map +1 -0
  209. package/dist/src/lib/fhir/schemas/Patient/index.js.map +1 -0
  210. package/dist/{extensions/medplum/fhir/schemas/atoms/IntentSchema.d.ts → src/lib/fhir/schemas/ServiceRequest/Intent.schema.d.ts} +0 -1
  211. package/dist/{extensions/medplum/fhir/schemas/atoms/IntentSchema.js → src/lib/fhir/schemas/ServiceRequest/Intent.schema.js} +2 -13
  212. package/dist/src/lib/fhir/schemas/ServiceRequest/Intent.schema.js.map +1 -0
  213. package/dist/{extensions/medplum/fhir/schemas/atoms/PrioritySchema.js → src/lib/fhir/schemas/ServiceRequest/Priority.schema.js} +1 -1
  214. package/dist/src/lib/fhir/schemas/ServiceRequest/Priority.schema.js.map +1 -0
  215. package/dist/src/lib/fhir/schemas/ServiceRequest/Status.schema.d.ts +2 -0
  216. package/dist/src/lib/fhir/schemas/ServiceRequest/Status.schema.js +14 -0
  217. package/dist/src/lib/fhir/schemas/ServiceRequest/Status.schema.js.map +1 -0
  218. package/dist/src/lib/fhir/schemas/ServiceRequest/index.d.ts +3 -0
  219. package/dist/src/lib/fhir/schemas/ServiceRequest/index.js +20 -0
  220. package/dist/src/lib/fhir/schemas/ServiceRequest/index.js.map +1 -0
  221. package/dist/src/lib/fhir/schemas/Shared/PeriodSchema.js.map +1 -0
  222. package/dist/src/lib/fhir/schemas/Shared/index.d.ts +1 -0
  223. package/dist/src/lib/fhir/schemas/Shared/index.js +18 -0
  224. package/dist/src/lib/fhir/schemas/Shared/index.js.map +1 -0
  225. package/dist/src/lib/fhir/schemas/Task/IntentSchema.d.ts +2 -0
  226. package/dist/src/lib/fhir/schemas/Task/IntentSchema.js +16 -0
  227. package/dist/src/lib/fhir/schemas/Task/IntentSchema.js.map +1 -0
  228. package/dist/src/lib/fhir/schemas/Task/Priority.schema.d.ts +2 -0
  229. package/dist/src/lib/fhir/schemas/Task/Priority.schema.js +6 -0
  230. package/dist/src/lib/fhir/schemas/Task/Priority.schema.js.map +1 -0
  231. package/dist/{extensions/medplum/fhir/schemas/atoms/StatusSchema.d.ts → src/lib/fhir/schemas/Task/Status.schema.d.ts} +0 -1
  232. package/dist/{extensions/medplum/fhir/schemas/atoms/StatusSchema.js → src/lib/fhir/schemas/Task/Status.schema.js} +2 -11
  233. package/dist/src/lib/fhir/schemas/Task/Status.schema.js.map +1 -0
  234. package/dist/src/lib/fhir/schemas/Task/index.d.ts +3 -0
  235. package/dist/src/lib/fhir/schemas/Task/index.js +20 -0
  236. package/dist/src/lib/fhir/schemas/Task/index.js.map +1 -0
  237. package/dist/src/lib/llm/openai/constants.d.ts +28 -0
  238. package/dist/src/lib/llm/openai/constants.js +32 -0
  239. package/dist/src/lib/llm/openai/constants.js.map +1 -0
  240. package/dist/src/lib/llm/openai/createOpenAIModel.d.ts +23 -0
  241. package/dist/src/lib/llm/openai/createOpenAIModel.js +89 -0
  242. package/dist/src/lib/llm/openai/createOpenAIModel.js.map +1 -0
  243. package/dist/src/lib/llm/openai/index.d.ts +3 -0
  244. package/dist/src/lib/llm/openai/index.js +20 -0
  245. package/dist/src/lib/llm/openai/index.js.map +1 -0
  246. package/dist/src/lib/llm/openai/types.d.ts +63 -0
  247. package/dist/src/lib/llm/openai/types.js +3 -0
  248. package/dist/src/lib/llm/openai/types.js.map +1 -0
  249. package/package.json +5 -4
  250. package/dist/extensions/cerner/actions/createClinicalNote/config/datapoints.d.ts +0 -1
  251. package/dist/extensions/cerner/actions/createClinicalNote/config/datapoints.js +0 -5
  252. package/dist/extensions/cerner/actions/createClinicalNote/config/datapoints.js.map +0 -1
  253. package/dist/extensions/cerner/actions/createClinicalNote/config/fields.d.ts +0 -3
  254. package/dist/extensions/cerner/actions/createClinicalNote/config/fields.js +0 -10
  255. package/dist/extensions/cerner/actions/createClinicalNote/config/fields.js.map +0 -1
  256. package/dist/extensions/cerner/actions/createClinicalNote/config/index.d.ts +0 -2
  257. package/dist/extensions/cerner/actions/createClinicalNote/config/index.js +0 -9
  258. package/dist/extensions/cerner/actions/createClinicalNote/config/index.js.map +0 -1
  259. package/dist/extensions/cerner/actions/createClinicalNote/createClinicalNote.d.ts +0 -4
  260. package/dist/extensions/cerner/actions/createClinicalNote/createClinicalNote.js +0 -18
  261. package/dist/extensions/cerner/actions/createClinicalNote/createClinicalNote.js.map +0 -1
  262. package/dist/extensions/cerner/actions/createClinicalNote/index.d.ts +0 -1
  263. package/dist/extensions/cerner/actions/createClinicalNote/index.js +0 -6
  264. package/dist/extensions/cerner/actions/createClinicalNote/index.js.map +0 -1
  265. package/dist/extensions/cerner/actions/getAppointment/config/datapoints.d.ts +0 -1
  266. package/dist/extensions/cerner/actions/getAppointment/config/datapoints.js +0 -5
  267. package/dist/extensions/cerner/actions/getAppointment/config/datapoints.js.map +0 -1
  268. package/dist/extensions/cerner/actions/getAppointment/config/fields.d.ts +0 -3
  269. package/dist/extensions/cerner/actions/getAppointment/config/fields.js +0 -10
  270. package/dist/extensions/cerner/actions/getAppointment/config/fields.js.map +0 -1
  271. package/dist/extensions/cerner/actions/getAppointment/config/index.d.ts +0 -2
  272. package/dist/extensions/cerner/actions/getAppointment/config/index.js +0 -9
  273. package/dist/extensions/cerner/actions/getAppointment/config/index.js.map +0 -1
  274. package/dist/extensions/cerner/actions/getAppointment/getAppointment.d.ts +0 -4
  275. package/dist/extensions/cerner/actions/getAppointment/getAppointment.js +0 -18
  276. package/dist/extensions/cerner/actions/getAppointment/getAppointment.js.map +0 -1
  277. package/dist/extensions/cerner/actions/getAppointment/index.d.ts +0 -1
  278. package/dist/extensions/cerner/actions/getAppointment/index.js +0 -6
  279. package/dist/extensions/cerner/actions/getAppointment/index.js.map +0 -1
  280. package/dist/extensions/epic/lib/api/schemas/Appointment/Status.schema.js.map +0 -1
  281. package/dist/extensions/epic/lib/api/schemas/Appointment/index.js.map +0 -1
  282. package/dist/extensions/epic/lib/api/schemas/DocumentReference/Status.schema.js.map +0 -1
  283. package/dist/extensions/epic/lib/api/schemas/DocumentReference/Type.schema.js.map +0 -1
  284. package/dist/extensions/epic/lib/api/schemas/DocumentReference/index.js.map +0 -1
  285. package/dist/extensions/epic/lib/api/schemas/Patient/Gender.schema.js.map +0 -1
  286. package/dist/extensions/epic/lib/api/schemas/Patient/index.js.map +0 -1
  287. package/dist/extensions/medplum/fhir/schemas/atoms/GenderSchema.d.ts +0 -2
  288. package/dist/extensions/medplum/fhir/schemas/atoms/GenderSchema.js +0 -6
  289. package/dist/extensions/medplum/fhir/schemas/atoms/GenderSchema.js.map +0 -1
  290. package/dist/extensions/medplum/fhir/schemas/atoms/IntentSchema.js.map +0 -1
  291. package/dist/extensions/medplum/fhir/schemas/atoms/PeriodSchema.js.map +0 -1
  292. package/dist/extensions/medplum/fhir/schemas/atoms/PrioritySchema.js.map +0 -1
  293. package/dist/extensions/medplum/fhir/schemas/atoms/StatusSchema.js.map +0 -1
  294. package/dist/extensions/medplum/fhir/schemas/atoms/index.d.ts +0 -5
  295. package/dist/extensions/medplum/fhir/schemas/atoms/index.js +0 -16
  296. package/dist/extensions/medplum/fhir/schemas/atoms/index.js.map +0 -1
  297. package/dist/extensions/shelly/actions/categorizeMessage/lib/categorizeMessageWithLLM/constants.d.ts +0 -24
  298. package/dist/extensions/shelly/actions/categorizeMessage/lib/categorizeMessageWithLLM/constants.js +0 -33
  299. package/dist/extensions/shelly/actions/categorizeMessage/lib/categorizeMessageWithLLM/constants.js.map +0 -1
  300. package/dist/extensions/shelly/actions/generateMessage/lib/generateMessageWithLLM/constants.d.ts +0 -24
  301. package/dist/extensions/shelly/actions/generateMessage/lib/generateMessageWithLLM/constants.js +0 -123
  302. package/dist/extensions/shelly/actions/generateMessage/lib/generateMessageWithLLM/constants.js.map +0 -1
  303. package/dist/extensions/shelly/actions/summarizeCareFlow/lib/summarizeCareFlowWithLLM/constants.js.map +0 -1
  304. package/dist/extensions/shelly/lib/summarizeFormWithLLM/constants.js.map +0 -1
  305. package/dist/extensions/shelly/settings.d.ts +0 -17
  306. package/dist/extensions/shelly/settings.js +0 -17
  307. package/dist/extensions/shelly/settings.js.map +0 -1
  308. package/dist/extensions/epic/lib/api/{schemas → customFhirSchemas}/DocumentReference/Status.schema.d.ts +0 -0
  309. package/dist/extensions/epic/lib/api/{schemas → customFhirSchemas}/DocumentReference/Status.schema.js +0 -0
  310. package/dist/extensions/epic/lib/api/{schemas → customFhirSchemas}/DocumentReference/Type.schema.d.ts +0 -0
  311. package/dist/extensions/epic/lib/api/{schemas → customFhirSchemas}/DocumentReference/Type.schema.js +0 -0
  312. package/dist/extensions/epic/lib/api/{schemas → customFhirSchemas}/DocumentReference/index.d.ts +1 -1
  313. /package/dist/extensions/shelly/actions/summarizeCareFlow/lib/summarizeCareFlowWithLLM/{constants.d.ts → prompt.d.ts} +0 -0
  314. /package/dist/extensions/shelly/lib/summarizeFormWithLLM/{constants.d.ts → prompt.d.ts} +0 -0
  315. /package/dist/{extensions/epic/lib/api → src/lib/fhir}/schemas/Appointment/Status.schema.d.ts +0 -0
  316. /package/dist/{extensions/epic/lib/api → src/lib/fhir}/schemas/Appointment/Status.schema.js +0 -0
  317. /package/dist/{extensions/epic/lib/api → src/lib/fhir}/schemas/Appointment/index.d.ts +0 -0
  318. /package/dist/{extensions/epic/lib/api → src/lib/fhir}/schemas/Appointment/index.js +0 -0
  319. /package/dist/{extensions/epic/lib/api → src/lib/fhir}/schemas/Patient/Gender.schema.d.ts +0 -0
  320. /package/dist/{extensions/epic/lib/api → src/lib/fhir}/schemas/Patient/Gender.schema.js +0 -0
  321. /package/dist/{extensions/epic/lib/api → src/lib/fhir}/schemas/Patient/index.d.ts +0 -0
  322. /package/dist/{extensions/epic/lib/api → src/lib/fhir}/schemas/Patient/index.js +0 -0
  323. /package/dist/{extensions/medplum/fhir/schemas/atoms/PrioritySchema.d.ts → src/lib/fhir/schemas/ServiceRequest/Priority.schema.d.ts} +0 -0
  324. /package/dist/{extensions/medplum/fhir/schemas/atoms → src/lib/fhir/schemas/Shared}/PeriodSchema.d.ts +0 -0
  325. /package/dist/{extensions/medplum/fhir/schemas/atoms → src/lib/fhir/schemas/Shared}/PeriodSchema.js +0 -0
@@ -0,0 +1,172 @@
1
+ "use strict";
2
+ // import axios, {
3
+ // type AxiosResponse,
4
+ // type AxiosInstance,
5
+ // type InternalAxiosRequestConfig,
6
+ // AxiosHeaders,
7
+ // } from 'axios'
8
+ // import {
9
+ // type PatientReadInputType,
10
+ // type PatientReadResponseType,
11
+ // type PatientCreateInputType,
12
+ // type PatientCreateResponseType,
13
+ // type PatientMatchInputType,
14
+ // type PatientMatchResponseType,
15
+ // type DocumentReferenceCreateInputType,
16
+ // type DocumentReferenceCreateResponseType,
17
+ // type AppointmentReadResponseType,
18
+ // type AppointmentReadInputType,
19
+ // type PatientSearchInputType,
20
+ // type PatientSearchResponseType,
21
+ // } from './schema'
22
+ // import { endsWith, isNil } from 'lodash'
23
+ // /**
24
+ // * FHIR R4 API Client
25
+ // */
26
+ // export class CernerFhirR4Client {
27
+ // private readonly client: AxiosInstance
28
+ // private readonly authUrl: string
29
+ // private readonly clientId: string
30
+ // private readonly privateKey: string
31
+ // private accessToken: string | null = null
32
+ // private tokenExpiry: number | null = null // Store token expiry time in UNIX timestamp
33
+ // constructor({
34
+ // baseUrl,
35
+ // authUrl,
36
+ // clientId,
37
+ // privateKey,
38
+ // }: {
39
+ // baseUrl: string
40
+ // authUrl: string
41
+ // clientId: string
42
+ // privateKey: string
43
+ // }) {
44
+ // this.authUrl = authUrl
45
+ // this.clientId = clientId
46
+ // this.privateKey = privateKey
47
+ // this.client = axios.create({
48
+ // baseURL: new URL(
49
+ // 'FHIR/R4/',
50
+ // endsWith(baseUrl, '/') ? baseUrl : `${baseUrl}/`,
51
+ // ).toString(),
52
+ // headers: new AxiosHeaders({
53
+ // 'Content-Type': 'application/json',
54
+ // }),
55
+ // })
56
+ // this.client.interceptors.request.use(
57
+ // async (
58
+ // config: InternalAxiosRequestConfig,
59
+ // ): Promise<InternalAxiosRequestConfig> => {
60
+ // if (isNil(this.accessToken) || this.isTokenExpired()) {
61
+ // await this.refreshAccessToken()
62
+ // }
63
+ // // Add the Authorization header to the request
64
+ // if (!isNil(this.accessToken)) {
65
+ // config.headers = AxiosHeaders.from(config?.headers ?? {})
66
+ // config.headers.set('Authorization', `Bearer ${this.accessToken}`)
67
+ // }
68
+ // return config
69
+ // },
70
+ // )
71
+ // }
72
+ // private async refreshAccessToken(): Promise<void> {
73
+ // try {
74
+ // const tokenResponse = await axios.post<{
75
+ // access_token: string
76
+ // expires_in: number
77
+ // scope: string
78
+ // }>(
79
+ // this.authUrl,
80
+ // {
81
+ // grant_type: 'client_credentials',
82
+ // client_assertion_type:
83
+ // 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer',
84
+ // client_assertion: generateJWT(
85
+ // this.clientId,
86
+ // this.authUrl,
87
+ // this.privateKey,
88
+ // ),
89
+ // },
90
+ // {
91
+ // headers: {
92
+ // 'Content-Type': 'application/x-www-form-urlencoded',
93
+ // },
94
+ // },
95
+ // )
96
+ // this.accessToken = tokenResponse.data.access_token
97
+ // this.tokenExpiry =
98
+ // Math.floor(Date.now() / 1000) + tokenResponse.data.expires_in // Current time + expiry
99
+ // } catch (error) {
100
+ // console.error('Failed to refresh access token:', error)
101
+ // throw new Error('Unable to refresh access token')
102
+ // }
103
+ // }
104
+ // private isTokenExpired(): boolean {
105
+ // const now = Math.floor(Date.now() / 1000) // Current time in seconds
106
+ // return (
107
+ // isNil(this.tokenExpiry) || now >= this.tokenExpiry - 60 // Refresh 1 minute before expiry
108
+ // )
109
+ // }
110
+ // async getPatient(
111
+ // resourceId: PatientReadInputType,
112
+ // ): Promise<AxiosResponse<PatientReadResponseType>> {
113
+ // const url = new URL(`Patient/${resourceId}`, this.client.defaults.baseURL)
114
+ // const response = await this.client.get<PatientReadResponseType>(
115
+ // url.toString(),
116
+ // )
117
+ // return response
118
+ // }
119
+ // async createPatient(
120
+ // data: PatientCreateInputType,
121
+ // ): Promise<AxiosResponse<PatientCreateResponseType>> {
122
+ // const url = new URL(`Patient`, this.client.defaults.baseURL)
123
+ // const response = await this.client.post<PatientReadResponseType>(
124
+ // url.toString(),
125
+ // data,
126
+ // )
127
+ // return response
128
+ // }
129
+ // async matchPatient(
130
+ // data: PatientMatchInputType,
131
+ // ): Promise<AxiosResponse<PatientMatchResponseType>> {
132
+ // const url = new URL(`Patient/$match`, this.client.defaults.baseURL)
133
+ // const response = await this.client.post<PatientMatchResponseType>(
134
+ // url.toString(),
135
+ // data,
136
+ // )
137
+ // return response
138
+ // }
139
+ // async searchPatient(
140
+ // data: PatientSearchInputType,
141
+ // ): Promise<AxiosResponse<PatientSearchResponseType>> {
142
+ // const url = new URL(`Patient`, this.client.defaults.baseURL)
143
+ // const response = await this.client.get<PatientSearchResponseType>(
144
+ // `${url.toString()}?identifier=MRN|${data.MRN}`,
145
+ // )
146
+ // return response
147
+ // }
148
+ // async createDocumentReference(
149
+ // data: DocumentReferenceCreateInputType,
150
+ // ): Promise<AxiosResponse<DocumentReferenceCreateResponseType>> {
151
+ // const url = new URL(`DocumentReference`, this.client.defaults.baseURL)
152
+ // const response =
153
+ // await this.client.post<DocumentReferenceCreateResponseType>(
154
+ // url.toString(),
155
+ // data,
156
+ // )
157
+ // return response
158
+ // }
159
+ // async getAppointment(
160
+ // resourceId: AppointmentReadInputType,
161
+ // ): Promise<AxiosResponse<AppointmentReadResponseType>> {
162
+ // const url = new URL(
163
+ // `Appointment/${resourceId}`,
164
+ // this.client.defaults.baseURL,
165
+ // )
166
+ // const response = await this.client.get<AppointmentReadResponseType>(
167
+ // url.toString(),
168
+ // )
169
+ // return response
170
+ // }
171
+ // }
172
+ //# sourceMappingURL=FhirR4client-backup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FhirR4client-backup.js","sourceRoot":"","sources":["../../../../../../extensions/cerner/lib/api/FhirR4/FhirR4client-backup.ts"],"names":[],"mappings":";AAAA,kBAAkB;AAClB,wBAAwB;AACxB,wBAAwB;AACxB,qCAAqC;AACrC,kBAAkB;AAClB,iBAAiB;AACjB,WAAW;AACX,+BAA+B;AAC/B,kCAAkC;AAClC,iCAAiC;AACjC,oCAAoC;AACpC,gCAAgC;AAChC,mCAAmC;AACnC,2CAA2C;AAC3C,8CAA8C;AAC9C,sCAAsC;AACtC,mCAAmC;AACnC,iCAAiC;AACjC,oCAAoC;AACpC,oBAAoB;AACpB,2CAA2C;AAE3C,MAAM;AACN,wBAAwB;AACxB,MAAM;AACN,oCAAoC;AACpC,2CAA2C;AAE3C,qCAAqC;AACrC,sCAAsC;AACtC,wCAAwC;AACxC,8CAA8C;AAC9C,2FAA2F;AAE3F,kBAAkB;AAClB,eAAe;AACf,eAAe;AACf,gBAAgB;AAChB,kBAAkB;AAClB,SAAS;AACT,sBAAsB;AACtB,sBAAsB;AACtB,uBAAuB;AACvB,yBAAyB;AACzB,SAAS;AACT,6BAA6B;AAC7B,+BAA+B;AAC/B,mCAAmC;AAEnC,mCAAmC;AACnC,0BAA0B;AAC1B,sBAAsB;AACtB,4DAA4D;AAC5D,sBAAsB;AACtB,oCAAoC;AACpC,8CAA8C;AAC9C,YAAY;AACZ,SAAS;AAET,4CAA4C;AAC5C,gBAAgB;AAChB,8CAA8C;AAC9C,oDAAoD;AACpD,kEAAkE;AAClE,4CAA4C;AAC5C,YAAY;AAEZ,yDAAyD;AACzD,0CAA0C;AAC1C,sEAAsE;AACtE,8EAA8E;AAC9E,YAAY;AAEZ,wBAAwB;AACxB,WAAW;AACX,QAAQ;AACR,MAAM;AAEN,wDAAwD;AACxD,YAAY;AACZ,iDAAiD;AACjD,+BAA+B;AAC/B,6BAA6B;AAC7B,wBAAwB;AACxB,YAAY;AACZ,wBAAwB;AACxB,YAAY;AACZ,8CAA8C;AAC9C,mCAAmC;AACnC,wEAAwE;AACxE,2CAA2C;AAC3C,6BAA6B;AAC7B,4BAA4B;AAC5B,+BAA+B;AAC/B,eAAe;AACf,aAAa;AACb,YAAY;AACZ,uBAAuB;AACvB,mEAAmE;AACnE,eAAe;AACf,aAAa;AACb,UAAU;AAEV,2DAA2D;AAC3D,2BAA2B;AAC3B,iGAAiG;AACjG,wBAAwB;AACxB,gEAAgE;AAChE,0DAA0D;AAC1D,QAAQ;AACR,MAAM;AAEN,wCAAwC;AACxC,2EAA2E;AAC3E,eAAe;AACf,kGAAkG;AAClG,QAAQ;AACR,MAAM;AAEN,sBAAsB;AACtB,wCAAwC;AACxC,yDAAyD;AACzD,iFAAiF;AAEjF,uEAAuE;AACvE,wBAAwB;AACxB,QAAQ;AAER,sBAAsB;AACtB,MAAM;AAEN,yBAAyB;AACzB,oCAAoC;AACpC,2DAA2D;AAC3D,mEAAmE;AAEnE,wEAAwE;AACxE,wBAAwB;AACxB,cAAc;AACd,QAAQ;AAER,sBAAsB;AACtB,MAAM;AAEN,wBAAwB;AACxB,mCAAmC;AACnC,0DAA0D;AAC1D,0EAA0E;AAE1E,yEAAyE;AACzE,wBAAwB;AACxB,cAAc;AACd,QAAQ;AAER,sBAAsB;AACtB,MAAM;AAEN,yBAAyB;AACzB,oCAAoC;AACpC,2DAA2D;AAC3D,mEAAmE;AAEnE,yEAAyE;AACzE,wDAAwD;AACxD,QAAQ;AAER,sBAAsB;AACtB,MAAM;AAEN,mCAAmC;AACnC,8CAA8C;AAC9C,qEAAqE;AACrE,6EAA6E;AAE7E,uBAAuB;AACvB,qEAAqE;AACrE,0BAA0B;AAC1B,gBAAgB;AAChB,UAAU;AAEV,sBAAsB;AACtB,MAAM;AAEN,0BAA0B;AAC1B,4CAA4C;AAC5C,6DAA6D;AAC7D,2BAA2B;AAC3B,qCAAqC;AACrC,sCAAsC;AACtC,QAAQ;AAER,2EAA2E;AAC3E,wBAAwB;AACxB,QAAQ;AAER,sBAAsB;AACtB,MAAM;AACN,IAAI"}
@@ -0,0 +1,19 @@
1
+ import { APIClient, DataWrapper, type DataWrapperCtor, type OAuthGrantClientCredentialsRequest } from '@awell-health/extensions-core';
2
+ import { type PatientReadInputType, type PatientReadResponseType, type PatientCreateInputType, type PatientCreateResponseType } from './schema';
3
+ import { type AxiosResponse } from 'axios';
4
+ export declare class CernerR4DataWrapper extends DataWrapper {
5
+ getPatient(id: PatientReadInputType): Promise<AxiosResponse<PatientReadResponseType>>;
6
+ createPatient(patient: PatientCreateInputType): Promise<AxiosResponse<PatientCreateResponseType>>;
7
+ }
8
+ interface CernerR4ClientConstructorProps {
9
+ authUrl: string;
10
+ requestConfig: Omit<OAuthGrantClientCredentialsRequest, 'grant_type'>;
11
+ baseUrl: string;
12
+ }
13
+ export declare class CernerR4APIClient extends APIClient<CernerR4DataWrapper> {
14
+ readonly ctor: DataWrapperCtor<CernerR4DataWrapper>;
15
+ constructor({ authUrl, requestConfig, ...opts }: CernerR4ClientConstructorProps);
16
+ getPatient(id: PatientReadInputType): Promise<AxiosResponse<PatientReadResponseType>>;
17
+ createPatient(patient: PatientCreateInputType): Promise<AxiosResponse<PatientCreateResponseType>>;
18
+ }
19
+ export {};
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CernerR4APIClient = exports.CernerR4DataWrapper = void 0;
4
+ const extensions_core_1 = require("@awell-health/extensions-core");
5
+ const cacheService_1 = require("./cacheService");
6
+ class CernerR4DataWrapper extends extensions_core_1.DataWrapper {
7
+ async getPatient(id) {
8
+ const result = await this.RequestRaw({
9
+ method: 'GET',
10
+ url: `/Patient/${id}`,
11
+ });
12
+ return result;
13
+ }
14
+ async createPatient(patient) {
15
+ const result = await this.RequestRaw({
16
+ method: 'POST',
17
+ url: `/Patient`,
18
+ data: patient,
19
+ });
20
+ return result;
21
+ }
22
+ }
23
+ exports.CernerR4DataWrapper = CernerR4DataWrapper;
24
+ class CernerR4APIClient extends extensions_core_1.APIClient {
25
+ constructor({ authUrl, requestConfig, ...opts }) {
26
+ super({
27
+ ...opts,
28
+ auth: new extensions_core_1.OAuthClientCredentials({
29
+ auth_url: authUrl,
30
+ request_config: requestConfig,
31
+ useHeaderInAuthorization: true,
32
+ cacheService: cacheService_1.cernerCacheService,
33
+ }),
34
+ });
35
+ this.ctor = (token, baseUrl) => new CernerR4DataWrapper(token, baseUrl);
36
+ }
37
+ async getPatient(id) {
38
+ return await this.FetchData(async (dw) => await dw.getPatient(id));
39
+ }
40
+ async createPatient(patient) {
41
+ return await this.FetchData(async (dw) => await dw.createPatient(patient));
42
+ }
43
+ }
44
+ exports.CernerR4APIClient = CernerR4APIClient;
45
+ //# sourceMappingURL=FhirR4client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FhirR4client.js","sourceRoot":"","sources":["../../../../../../extensions/cerner/lib/api/FhirR4/FhirR4client.ts"],"names":[],"mappings":";;;AAAA,mEAMsC;AAOtC,iDAAmD;AAGnD,MAAa,mBAAoB,SAAQ,6BAAW;IAC3C,KAAK,CAAC,UAAU,CACrB,EAAwB;QAExB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAA0B;YAC5D,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,YAAY,EAAE,EAAE;SACtB,CAAC,CAAA;QAEF,OAAO,MAAM,CAAA;IACf,CAAC;IAEM,KAAK,CAAC,aAAa,CACxB,OAA+B;QAE/B,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAA4B;YAC9D,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,UAAU;YACf,IAAI,EAAE,OAAO;SACd,CAAC,CAAA;QAEF,OAAO,MAAM,CAAA;IACf,CAAC;CACF;AAvBD,kDAuBC;AAQD,MAAa,iBAAkB,SAAQ,2BAA8B;IAMnE,YAAmB,EACjB,OAAO,EACP,aAAa,EACb,GAAG,IAAI,EACwB;QAC/B,KAAK,CAAC;YACJ,GAAG,IAAI;YACP,IAAI,EAAE,IAAI,wCAAsB,CAAC;gBAC/B,QAAQ,EAAE,OAAO;gBACjB,cAAc,EAAE,aAAa;gBAC7B,wBAAwB,EAAE,IAAI;gBAC9B,YAAY,EAAE,iCAAkB;aACjC,CAAC;SACH,CAAC,CAAA;QAlBK,SAAI,GAAyC,CACpD,KAAa,EACb,OAAe,EACf,EAAE,CAAC,IAAI,mBAAmB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;IAgB5C,CAAC;IAEM,KAAK,CAAC,UAAU,CACrB,EAAwB;QAExB,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,EAAE,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAA;IACpE,CAAC;IAEM,KAAK,CAAC,aAAa,CACxB,OAA+B;QAE/B,OAAO,MAAM,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,EAAE,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAA;IAC5E,CAAC;CACF;AAjCD,8CAiCC"}
@@ -0,0 +1,11 @@
1
+ import { cache } from '@awell-health/extensions-core';
2
+ /**
3
+ * A cache service can be used in combination with the OAuth API client
4
+ * to automatically cache tokens between requests.
5
+ * The only cache implementation available is a simple in-memory cache,
6
+ * so it has to be initialised as a singleton to preserve the data across
7
+ * the lifecycle of the server running your extension.
8
+ * Note that we will soon be releasing another implementation of the cache
9
+ * service that will remove this restriction.
10
+ */
11
+ export declare const cernerCacheService: cache.NoCache;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.cernerCacheService = void 0;
4
+ const extensions_core_1 = require("@awell-health/extensions-core");
5
+ /**
6
+ * A cache service can be used in combination with the OAuth API client
7
+ * to automatically cache tokens between requests.
8
+ * The only cache implementation available is a simple in-memory cache,
9
+ * so it has to be initialised as a singleton to preserve the data across
10
+ * the lifecycle of the server running your extension.
11
+ * Note that we will soon be releasing another implementation of the cache
12
+ * service that will remove this restriction.
13
+ */
14
+ exports.cernerCacheService = new extensions_core_1.cache.NoCache();
15
+ //# sourceMappingURL=cacheService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cacheService.js","sourceRoot":"","sources":["../../../../../../extensions/cerner/lib/api/FhirR4/cacheService.ts"],"names":[],"mappings":";;;AAAA,mEAAqD;AAErD;;;;;;;;GAQG;AACU,QAAA,kBAAkB,GAAG,IAAI,uBAAK,CAAC,OAAO,EAAE,CAAA"}
@@ -0,0 +1 @@
1
+ export * from './FhirR4client';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./FhirR4client"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../extensions/cerner/lib/api/FhirR4/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA8B"}
@@ -0,0 +1,9 @@
1
+ import { z } from 'zod';
2
+ import { type Appointment } from '@medplum/fhirtypes';
3
+ export declare const AppointmentReadInputSchema: z.ZodString;
4
+ export type AppointmentReadInputType = z.infer<typeof AppointmentReadInputSchema>;
5
+ /**
6
+ * This is probably imperfect as Medplum's FHIR type might
7
+ * not be fully compatible with Epic's FHIR type but good enough for now
8
+ */
9
+ export type AppointmentReadResponseType = Appointment;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AppointmentReadInputSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.AppointmentReadInputSchema = zod_1.z.string();
6
+ //# sourceMappingURL=AppointmentRead.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppointmentRead.schema.js","sourceRoot":"","sources":["../../../../../../../extensions/cerner/lib/api/FhirR4/schema/AppointmentRead.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAGV,QAAA,0BAA0B,GAAG,OAAC,CAAC,MAAM,EAAE,CAAA"}
@@ -0,0 +1,7 @@
1
+ import { type DocumentReference } from '@medplum/fhirtypes';
2
+ /**
3
+ * This is probably imperfect as Medplum's FHIR type might
4
+ * not be fully compatible with Epic's FHIR type but good enough for now
5
+ */
6
+ export type DocumentReferenceCreateInputType = Partial<DocumentReference>;
7
+ export type DocumentReferenceCreateResponseType = DocumentReference;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=DocumentReferenceCreate.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DocumentReferenceCreate.schema.js","sourceRoot":"","sources":["../../../../../../../extensions/cerner/lib/api/FhirR4/schema/DocumentReferenceCreate.schema.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ import { type Patient } from '@medplum/fhirtypes';
2
+ /**
3
+ * This is probably imperfect as Medplum's FHIR type might
4
+ * not be fully compatible with Epic's FHIR type but good enough for now
5
+ */
6
+ export type PatientCreateInputType = Partial<Patient>;
7
+ export type PatientCreateResponseType = Patient;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=PatientCreate.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PatientCreate.schema.js","sourceRoot":"","sources":["../../../../../../../extensions/cerner/lib/api/FhirR4/schema/PatientCreate.schema.ts"],"names":[],"mappings":""}
@@ -0,0 +1,37 @@
1
+ import { type Patient } from '@medplum/fhirtypes';
2
+ export interface PatientMatchInputType {
3
+ resourceType: 'Parameters';
4
+ parameter: [
5
+ {
6
+ name: 'resource';
7
+ resource: Partial<Patient>;
8
+ },
9
+ {
10
+ name: 'onlyCertainMatches';
11
+ valueBoolean: 'true' | 'false';
12
+ }
13
+ ];
14
+ }
15
+ export interface PatientMatchResponseType {
16
+ resourceType: 'Bundle';
17
+ type: 'searchset';
18
+ total: number;
19
+ link: unknown;
20
+ entry: [
21
+ {
22
+ link: unknown;
23
+ fullUrl: string;
24
+ resource: Partial<Patient>;
25
+ search: {
26
+ extension: [
27
+ {
28
+ valueCode: 'certain' | 'probable' | 'possible' | 'certainly-not';
29
+ url: 'http://hl7.org/fhir/StructureDefinition/match-grade';
30
+ }
31
+ ];
32
+ mode: 'match';
33
+ score: number;
34
+ };
35
+ }
36
+ ];
37
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=PatientMatch.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PatientMatch.schema.js","sourceRoot":"","sources":["../../../../../../../extensions/cerner/lib/api/FhirR4/schema/PatientMatch.schema.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ import { z } from 'zod';
2
+ import { type Patient } from '@medplum/fhirtypes';
3
+ export declare const PatientReadInputSchema: z.ZodString;
4
+ export type PatientReadInputType = z.infer<typeof PatientReadInputSchema>;
5
+ /**
6
+ * This is probably imperfect as Medplum's FHIR type might
7
+ * not be fully compatible with Epic's FHIR type but good enough for now
8
+ */
9
+ export type PatientReadResponseType = Patient;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PatientReadInputSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.PatientReadInputSchema = zod_1.z.string();
6
+ //# sourceMappingURL=PatientRead.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PatientRead.schema.js","sourceRoot":"","sources":["../../../../../../../extensions/cerner/lib/api/FhirR4/schema/PatientRead.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AAGV,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,EAAE,CAAA"}
@@ -0,0 +1,8 @@
1
+ import { type Patient, type Bundle } from '@medplum/fhirtypes';
2
+ /**
3
+ * Search supports more fields but we only need MRN for now
4
+ */
5
+ export interface PatientSearchInputType {
6
+ MRN: string;
7
+ }
8
+ export type PatientSearchResponseType = Bundle<Patient>;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=PatientSearch.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PatientSearch.schema.js","sourceRoot":"","sources":["../../../../../../../extensions/cerner/lib/api/FhirR4/schema/PatientSearch.schema.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ export * from './PatientRead.schema';
2
+ export * from './PatientCreate.schema';
3
+ export * from './PatientMatch.schema';
4
+ export * from './DocumentReferenceCreate.schema';
5
+ export * from './AppointmentRead.schema';
6
+ export * from './PatientSearch.schema';
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./PatientRead.schema"), exports);
18
+ __exportStar(require("./PatientCreate.schema"), exports);
19
+ __exportStar(require("./PatientMatch.schema"), exports);
20
+ __exportStar(require("./DocumentReferenceCreate.schema"), exports);
21
+ __exportStar(require("./AppointmentRead.schema"), exports);
22
+ __exportStar(require("./PatientSearch.schema"), exports);
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../extensions/cerner/lib/api/FhirR4/schema/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAoC;AACpC,yDAAsC;AACtC,wDAAqC;AACrC,mEAAgD;AAChD,2DAAwC;AACxC,yDAAsC"}
@@ -0,0 +1,4 @@
1
+ export declare const constructCernerUrls: (tenantId: string) => {
2
+ r4BaseUrl: string;
3
+ authUrl: string;
4
+ };
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.constructCernerUrls = void 0;
4
+ const constructCernerUrls = (tenantId) => {
5
+ return {
6
+ authUrl: `https://authorization.cerner.com/tenants/${tenantId}/protocols/oauth2/profiles/smart-v1/token`,
7
+ r4BaseUrl: `https://fhir-ehr-code.cerner.com/r4/${tenantId}`,
8
+ };
9
+ };
10
+ exports.constructCernerUrls = constructCernerUrls;
11
+ //# sourceMappingURL=constructCernerUrls.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constructCernerUrls.js","sourceRoot":"","sources":["../../../../../../extensions/cerner/lib/api/auth/constructCernerUrls.ts"],"names":[],"mappings":";;;AAAO,MAAM,mBAAmB,GAAG,CACjC,QAAgB,EACwB,EAAE;IAC1C,OAAO;QACL,OAAO,EAAE,4CAA4C,QAAQ,2CAA2C;QACxG,SAAS,EAAE,uCAAuC,QAAQ,EAAE;KAC7D,CAAA;AACH,CAAC,CAAA;AAPY,QAAA,mBAAmB,uBAO/B"}
@@ -0,0 +1 @@
1
+ export * from './constructCernerUrls';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./constructCernerUrls"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../extensions/cerner/lib/api/auth/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAqC"}
@@ -0,0 +1,18 @@
1
+ import { type NewActivityPayload, type Pathway, type Patient } from '@awell-health/extensions-core';
2
+ import z from 'zod';
3
+ import { SettingsValidationSchema } from '../settings';
4
+ import { type Activity } from '@awell-health/extensions-core/dist/types/Activity';
5
+ import { CernerR4APIClient } from './api/FhirR4';
6
+ type ValidatePayloadAndCreateSdks = <T extends z.ZodTypeAny, P extends NewActivityPayload<any, any>>(args: {
7
+ fieldsSchema: T;
8
+ payload: P;
9
+ }) => Promise<{
10
+ cernerFhirR4Sdk: CernerR4APIClient;
11
+ fields: z.infer<(typeof args)['fieldsSchema']>;
12
+ settings: z.infer<typeof SettingsValidationSchema>;
13
+ pathway: Pathway;
14
+ patient: Patient;
15
+ activity: Activity;
16
+ }>;
17
+ export declare const validatePayloadAndCreateSdks: ValidatePayloadAndCreateSdks;
18
+ export {};
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.validatePayloadAndCreateSdks = void 0;
7
+ const extensions_core_1 = require("@awell-health/extensions-core");
8
+ const zod_1 = __importDefault(require("zod"));
9
+ const settings_1 = require("../settings");
10
+ const FhirR4_1 = require("./api/FhirR4");
11
+ const auth_1 = require("./api/auth");
12
+ const validatePayloadAndCreateSdks = async ({ fieldsSchema, payload }) => {
13
+ const { settings, fields } = (0, extensions_core_1.validate)({
14
+ schema: zod_1.default.object({
15
+ fields: fieldsSchema,
16
+ settings: settings_1.SettingsValidationSchema,
17
+ }),
18
+ payload,
19
+ });
20
+ const { patient, pathway, activity } = payload;
21
+ const { authUrl, r4BaseUrl } = (0, auth_1.constructCernerUrls)(settings.tenantId);
22
+ const cernerFhirR4Sdk = new FhirR4_1.CernerR4APIClient({
23
+ authUrl,
24
+ baseUrl: r4BaseUrl,
25
+ requestConfig: {
26
+ client_id: settings.clientId,
27
+ client_secret: settings.clientSecret,
28
+ scope: 'system/Patient.r',
29
+ },
30
+ });
31
+ return {
32
+ cernerFhirR4Sdk,
33
+ settings,
34
+ fields,
35
+ patient,
36
+ pathway,
37
+ activity,
38
+ };
39
+ };
40
+ exports.validatePayloadAndCreateSdks = validatePayloadAndCreateSdks;
41
+ //# sourceMappingURL=validatePayloadAndCreateSdks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validatePayloadAndCreateSdks.js","sourceRoot":"","sources":["../../../../extensions/cerner/lib/validatePayloadAndCreateSdks.ts"],"names":[],"mappings":";;;;;;AAAA,mEAKsC;AACtC,8CAAmB;AACnB,0CAAsD;AAEtD,yCAAgD;AAChD,qCAAgD;AAiBzC,MAAM,4BAA4B,GACvC,KAAK,EAAE,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,EAAE;IAClC,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAA,0BAAQ,EAAC;QACpC,MAAM,EAAE,aAAC,CAAC,MAAM,CAAC;YACf,MAAM,EAAE,YAAY;YACpB,QAAQ,EAAE,mCAAwB;SACnC,CAAC;QACF,OAAO;KACR,CAAC,CAAA;IAEF,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAA;IAE9C,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,IAAA,0BAAmB,EAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;IAErE,MAAM,eAAe,GAAG,IAAI,0BAAiB,CAAC;QAC5C,OAAO;QACP,OAAO,EAAE,SAAS;QAClB,aAAa,EAAE;YACb,SAAS,EAAE,QAAQ,CAAC,QAAQ;YAC5B,aAAa,EAAE,QAAQ,CAAC,YAAY;YACpC,KAAK,EAAE,kBAAkB;SAC1B;KACF,CAAC,CAAA;IAEF,OAAO;QACL,eAAe;QACf,QAAQ;QACR,MAAM;QACN,OAAO;QACP,OAAO;QACP,QAAQ;KACT,CAAA;AACH,CAAC,CAAA;AAhCU,QAAA,4BAA4B,gCAgCtC"}