@oystehr/sdk 3.0.16 → 4.0.0-alpha.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 (127) hide show
  1. package/dist/cjs/config.d.ts +2 -1
  2. package/dist/cjs/index.cjs +82 -12
  3. package/dist/cjs/index.cjs.map +1 -1
  4. package/dist/cjs/index.min.cjs +1 -1
  5. package/dist/cjs/index.min.cjs.map +1 -1
  6. package/dist/cjs/resources/classes/developer.d.ts +2 -2
  7. package/dist/cjs/resources/classes/erx.d.ts +17 -17
  8. package/dist/cjs/resources/classes/erxV1.d.ts +31 -0
  9. package/dist/cjs/resources/classes/erxV2.d.ts +15 -0
  10. package/dist/cjs/resources/classes/index.d.ts +5 -1
  11. package/dist/cjs/resources/classes/m2m.d.ts +2 -2
  12. package/dist/cjs/resources/classes/user.d.ts +2 -2
  13. package/dist/cjs/resources/types/ErxCheckAllergyInteractionsParams.d.ts +3 -0
  14. package/dist/cjs/resources/types/ErxCheckAllergyInteractionsResponse.d.ts +9 -0
  15. package/dist/cjs/resources/types/ErxCheckMedicationInteractionsParams.d.ts +3 -0
  16. package/dist/cjs/resources/types/ErxCheckMedicationInteractionsResponse.d.ts +21 -0
  17. package/dist/cjs/resources/types/ErxCheckPrecheckInteractionsParams.d.ts +4 -0
  18. package/dist/cjs/resources/types/ErxCheckPrecheckInteractionsResponse.d.ts +29 -0
  19. package/dist/cjs/resources/types/ErxConnectPractitionerParams.d.ts +4 -0
  20. package/dist/cjs/resources/types/ErxConnectPractitionerResponse.d.ts +9 -0
  21. package/dist/cjs/resources/types/ErxSearchAllergensParams.d.ts +3 -0
  22. package/dist/cjs/resources/types/ErxSearchAllergensResponse.d.ts +21 -0
  23. package/dist/cjs/resources/types/ErxSearchMedicationsParams.d.ts +3 -0
  24. package/dist/cjs/resources/types/ErxSearchMedicationsResponse.d.ts +27 -0
  25. package/dist/cjs/resources/types/ErxV1AllergySearchParams.d.ts +3 -0
  26. package/dist/{esm/resources/types/ErxAllergySearchResponse.d.ts → cjs/resources/types/ErxV1AllergySearchResponse.d.ts} +1 -1
  27. package/dist/{esm/resources/types/ErxCancelOrderParams.d.ts → cjs/resources/types/ErxV1CancelOrderParams.d.ts} +1 -1
  28. package/dist/{esm/resources/types/ErxCancelOrderResponse.d.ts → cjs/resources/types/ErxV1CancelOrderResponse.d.ts} +1 -1
  29. package/dist/cjs/resources/types/{ErxCancelPrescriptionParams.d.ts → ErxV1CancelPrescriptionParams.d.ts} +1 -1
  30. package/dist/cjs/resources/types/{ErxCancelPrescriptionResponse.d.ts → ErxV1CancelPrescriptionResponse.d.ts} +1 -1
  31. package/dist/cjs/resources/types/{ErxMedicationSearchParams.d.ts → ErxV1MedicationSearchParams.d.ts} +1 -1
  32. package/dist/cjs/resources/types/{ErxMedicationSearchResponse.d.ts → ErxV1MedicationSearchResponse.d.ts} +1 -1
  33. package/dist/cjs/resources/types/ErxV1SyncPatientParams.d.ts +3 -0
  34. package/dist/{esm/resources/types/ErxSyncPatientResponse.d.ts → cjs/resources/types/ErxV1SyncPatientResponse.d.ts} +1 -1
  35. package/dist/cjs/resources/types/ErxV2MedicationSearchParams.d.ts +4 -0
  36. package/dist/cjs/resources/types/{ErxMedicationSearchV2Response.d.ts → ErxV2MedicationSearchResponse.d.ts} +1 -1
  37. package/dist/cjs/resources/types/index.d.ts +25 -12
  38. package/dist/esm/config.d.ts +2 -1
  39. package/dist/esm/index.min.js +1 -1
  40. package/dist/esm/index.min.js.map +1 -1
  41. package/dist/esm/resources/classes/developer.d.ts +2 -2
  42. package/dist/esm/resources/classes/developer.js +1 -1
  43. package/dist/esm/resources/classes/developer.js.map +1 -1
  44. package/dist/esm/resources/classes/erx.d.ts +17 -17
  45. package/dist/esm/resources/classes/erx.js +25 -19
  46. package/dist/esm/resources/classes/erx.js.map +1 -1
  47. package/dist/esm/resources/classes/erxV1.d.ts +31 -0
  48. package/dist/esm/resources/classes/erxV1.js +48 -0
  49. package/dist/esm/resources/classes/erxV1.js.map +1 -0
  50. package/dist/esm/resources/classes/erxV2.d.ts +15 -0
  51. package/dist/esm/resources/classes/erxV2.js +24 -0
  52. package/dist/esm/resources/classes/erxV2.js.map +1 -0
  53. package/dist/esm/resources/classes/index.d.ts +5 -1
  54. package/dist/esm/resources/classes/index.js +5 -1
  55. package/dist/esm/resources/classes/index.js.map +1 -1
  56. package/dist/esm/resources/classes/m2m.d.ts +2 -2
  57. package/dist/esm/resources/classes/m2m.js +1 -1
  58. package/dist/esm/resources/classes/m2m.js.map +1 -1
  59. package/dist/esm/resources/classes/user.d.ts +2 -2
  60. package/dist/esm/resources/classes/user.js +1 -1
  61. package/dist/esm/resources/classes/user.js.map +1 -1
  62. package/dist/esm/resources/types/ErxCheckAllergyInteractionsParams.d.ts +3 -0
  63. package/dist/esm/resources/types/ErxCheckAllergyInteractionsResponse.d.ts +9 -0
  64. package/dist/esm/resources/types/ErxCheckMedicationInteractionsParams.d.ts +3 -0
  65. package/dist/esm/resources/types/ErxCheckMedicationInteractionsResponse.d.ts +21 -0
  66. package/dist/esm/resources/types/ErxCheckPrecheckInteractionsParams.d.ts +4 -0
  67. package/dist/esm/resources/types/ErxCheckPrecheckInteractionsResponse.d.ts +29 -0
  68. package/dist/esm/resources/types/ErxConnectPractitionerParams.d.ts +4 -0
  69. package/dist/esm/resources/types/ErxConnectPractitionerResponse.d.ts +9 -0
  70. package/dist/esm/resources/types/ErxSearchAllergensParams.d.ts +3 -0
  71. package/dist/esm/resources/types/ErxSearchAllergensResponse.d.ts +21 -0
  72. package/dist/esm/resources/types/ErxSearchMedicationsParams.d.ts +3 -0
  73. package/dist/esm/resources/types/ErxSearchMedicationsResponse.d.ts +27 -0
  74. package/dist/esm/resources/types/ErxV1AllergySearchParams.d.ts +3 -0
  75. package/dist/{cjs/resources/types/ErxAllergySearchResponse.d.ts → esm/resources/types/ErxV1AllergySearchResponse.d.ts} +1 -1
  76. package/dist/{cjs/resources/types/ErxCancelOrderParams.d.ts → esm/resources/types/ErxV1CancelOrderParams.d.ts} +1 -1
  77. package/dist/{cjs/resources/types/ErxCancelOrderResponse.d.ts → esm/resources/types/ErxV1CancelOrderResponse.d.ts} +1 -1
  78. package/dist/esm/resources/types/{ErxCancelPrescriptionParams.d.ts → ErxV1CancelPrescriptionParams.d.ts} +1 -1
  79. package/dist/esm/resources/types/{ErxCancelPrescriptionResponse.d.ts → ErxV1CancelPrescriptionResponse.d.ts} +1 -1
  80. package/dist/esm/resources/types/{ErxMedicationSearchParams.d.ts → ErxV1MedicationSearchParams.d.ts} +1 -1
  81. package/dist/esm/resources/types/{ErxMedicationSearchResponse.d.ts → ErxV1MedicationSearchResponse.d.ts} +1 -1
  82. package/dist/esm/resources/types/ErxV1SyncPatientParams.d.ts +3 -0
  83. package/dist/{cjs/resources/types/ErxSyncPatientResponse.d.ts → esm/resources/types/ErxV1SyncPatientResponse.d.ts} +1 -1
  84. package/dist/esm/resources/types/ErxV2MedicationSearchParams.d.ts +4 -0
  85. package/dist/esm/resources/types/{ErxMedicationSearchV2Response.d.ts → ErxV2MedicationSearchResponse.d.ts} +1 -1
  86. package/dist/esm/resources/types/index.d.ts +25 -12
  87. package/package.json +3 -3
  88. package/src/config.ts +2 -1
  89. package/src/resources/classes/developer.ts +3 -3
  90. package/src/resources/classes/erx.ts +68 -51
  91. package/src/resources/classes/erxV1.ts +73 -0
  92. package/src/resources/classes/erxV2.ts +34 -0
  93. package/src/resources/classes/index.ts +8 -2
  94. package/src/resources/classes/m2m.ts +3 -3
  95. package/src/resources/classes/user.ts +3 -3
  96. package/src/resources/types/ErxCheckAllergyInteractionsParams.ts +5 -0
  97. package/src/resources/types/ErxCheckAllergyInteractionsResponse.ts +11 -0
  98. package/src/resources/types/ErxCheckMedicationInteractionsParams.ts +5 -0
  99. package/src/resources/types/ErxCheckMedicationInteractionsResponse.ts +23 -0
  100. package/src/resources/types/ErxCheckPrecheckInteractionsParams.ts +6 -0
  101. package/src/resources/types/ErxCheckPrecheckInteractionsResponse.ts +31 -0
  102. package/src/resources/types/ErxConnectPractitionerParams.ts +6 -0
  103. package/src/resources/types/ErxConnectPractitionerResponse.ts +11 -0
  104. package/src/resources/types/{ErxAllergySearchParams.ts → ErxSearchAllergensParams.ts} +1 -1
  105. package/src/resources/types/ErxSearchAllergensResponse.ts +28 -0
  106. package/src/resources/types/ErxSearchMedicationsParams.ts +5 -0
  107. package/src/resources/types/ErxSearchMedicationsResponse.ts +29 -0
  108. package/src/resources/types/ErxV1AllergySearchParams.ts +5 -0
  109. package/src/resources/types/{ErxAllergySearchResponse.ts → ErxV1AllergySearchResponse.ts} +1 -1
  110. package/src/resources/types/{ErxCancelOrderParams.ts → ErxV1CancelOrderParams.ts} +1 -1
  111. package/src/resources/types/{ErxCancelOrderResponse.ts → ErxV1CancelOrderResponse.ts} +1 -1
  112. package/src/resources/types/{ErxCancelPrescriptionParams.ts → ErxV1CancelPrescriptionParams.ts} +1 -1
  113. package/src/resources/types/{ErxCancelPrescriptionResponse.ts → ErxV1CancelPrescriptionResponse.ts} +1 -1
  114. package/src/resources/types/{ErxMedicationSearchParams.ts → ErxV1MedicationSearchParams.ts} +1 -1
  115. package/src/resources/types/{ErxMedicationSearchResponse.ts → ErxV1MedicationSearchResponse.ts} +1 -1
  116. package/src/resources/types/ErxV1SyncPatientParams.ts +5 -0
  117. package/src/resources/types/{ErxSyncPatientResponse.ts → ErxV1SyncPatientResponse.ts} +1 -1
  118. package/src/resources/types/{ErxMedicationSearchV2Params.ts → ErxV2MedicationSearchParams.ts} +1 -1
  119. package/src/resources/types/{ErxMedicationSearchV2Response.ts → ErxV2MedicationSearchResponse.ts} +1 -1
  120. package/src/resources/types/index.ts +25 -12
  121. package/dist/cjs/resources/types/ErxAllergySearchParams.d.ts +0 -3
  122. package/dist/cjs/resources/types/ErxMedicationSearchV2Params.d.ts +0 -4
  123. package/dist/esm/node_modules/tslib/package.json +0 -1
  124. package/dist/esm/node_modules/tslib/tslib.es6.js +0 -40
  125. package/dist/esm/node_modules/tslib/tslib.es6.js.map +0 -1
  126. package/dist/esm/resources/types/ErxAllergySearchParams.d.ts +0 -3
  127. package/dist/esm/resources/types/ErxMedicationSearchV2Params.d.ts +0 -4
@@ -1 +1 @@
1
- {"version":3,"file":"user.js","sources":["../../../../src/resources/classes/user.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport {\n OystehrClientRequest,\n UserDeleteParams,\n UserGetParams,\n UserGetResponse,\n UserInviteParams,\n UserInviteResponse,\n UserListResponse,\n UserListV2Params,\n UserListV2Response,\n UserMeResponse,\n UserUpdateParams,\n UserUpdateResponse,\n} from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\n\nexport class User extends SDKResource {\n constructor(config: OystehrConfig) {\n super(config);\n }\n #baseUrlThunk(): string {\n return this.config.services?.['projectApiUrl'] ?? 'https://project-api.zapehr.com/v1';\n }\n /**\n * Get your own User details. [Users](https://docs.oystehr.com/oystehr/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) you configure for securing the apps you build on top of Oystehr.\n *\n * Fetch details about the calling User. This endpoint has no access policy requirements, it is available to all authenticated Users.\n */\n me(request?: OystehrClientRequest): Promise<UserMeResponse> {\n return this.request('/user/me', 'get', this.#baseUrlThunk.bind(this))(request);\n }\n /**\n * Get the User with the provided ID. [Users](https://docs.oystehr.com/oystehr/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) you configure for securing the apps you build on top of Oystehr.\n *\n * Access Policy Action: `App:GetUser`\n * Access Policy Resource: `App:User`\n */\n get(params: UserGetParams, request?: OystehrClientRequest): Promise<UserGetResponse> {\n return this.request('/user/{id}', 'get', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Update the User with the provided ID. [Users](https://docs.oystehr.com/oystehr/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) you configure for securing the apps you build on top of Oystehr.\n *\n * Access Policy Action: `App:UpdateUser`\n * Access Policy Resource: `App:User`\n */\n update(params: UserUpdateParams, request?: OystehrClientRequest): Promise<UserUpdateResponse> {\n return this.request('/user/{id}', 'patch', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Delete the User with the provided ID. [Users](https://docs.oystehr.com/oystehr/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) you configure for securing the apps you build on top of Oystehr.\n *\n * Access Policy Action: `App:DeleteUser`\n * Access Policy Resource: `App:User`\n */\n delete(params: UserDeleteParams, request?: OystehrClientRequest): Promise<void> {\n return this.request('/user/{id}', 'delete', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Invite a User to the Project. [Users](https://docs.oystehr.com/oystehr/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) you configure for securing the apps you build on top of Oystehr.\n *\n * Access Policy Action: `App:CreateUser`\n * Access Policy Resource: `App:User`\n */\n invite(params: UserInviteParams, request?: OystehrClientRequest): Promise<UserInviteResponse> {\n return this.request('/user/invite', 'post', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * DEPRECATED. Please use [v2/list](https://api-reference.oystehr.com/reference/get_user-v2-list) instead.\n *\n * Get all Users in the Project. [Users](https://docs.oystehr.com/oystehr/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) you configure for securing the apps you build on top of Oystehr.\n *\n * Access Policy Action: `App:ListAllUsers`\n * Access Policy Resource: `App:User`\n */\n list(request?: OystehrClientRequest): Promise<UserListResponse> {\n return this.request('/user', 'get', this.#baseUrlThunk.bind(this))(request);\n }\n /**\n * Get Users in the Project with pagination, sort, sort Order and filtering. [Users](https://docs.oystehr.com/oystehr/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) you configure for securing the apps you build on top of Oystehr.\n *\n * Access Policy Action: `Project:ListAllUsers`\n * Access Policy Resource: `Project:Settings`\n */\n listV2(params: UserListV2Params, request?: OystehrClientRequest): Promise<UserListV2Response>;\n /**\n * Get Users in the Project with pagination, sort, sort Order and filtering. [Users](https://docs.oystehr.com/oystehr/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) you configure for securing the apps you build on top of Oystehr.\n *\n * Access Policy Action: `Project:ListAllUsers`\n * Access Policy Resource: `Project:Settings`\n */\n listV2(request?: OystehrClientRequest): Promise<UserListV2Response>;\n /**\n * Get Users in the Project with pagination, sort, sort Order and filtering. [Users](https://docs.oystehr.com/oystehr/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) you configure for securing the apps you build on top of Oystehr.\n *\n * Access Policy Action: `Project:ListAllUsers`\n * Access Policy Resource: `Project:Settings`\n */\n listV2(\n params?: UserListV2Params | OystehrClientRequest,\n request?: OystehrClientRequest\n ): Promise<UserListV2Response> {\n return this.request('/user/v2/list', 'get', this.#baseUrlThunk.bind(this))(params, request);\n }\n}\n"],"names":[],"mappings":";;;AAAA;;AAmBM,MAAO,IAAK,SAAQ,WAAW,CAAA;AACnC,IAAA,WAAA,CAAY,MAAqB,EAAA;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;;KACf;AAID;;;;AAIG;AACH,IAAA,EAAE,CAAC,OAA8B,EAAA;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,KAAK,EAAE,sBAAA,CAAA,IAAI,2CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;KAChF;AACD;;;;;AAKG;IACH,GAAG,CAAC,MAAqB,EAAE,OAA8B,EAAA;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,KAAK,EAAE,sBAAA,CAAA,IAAI,EAAA,eAAA,EAAA,GAAA,EAAA,kBAAA,CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC1F;AACD;;;;;AAKG;IACH,MAAM,CAAC,MAAwB,EAAE,OAA8B,EAAA;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,OAAO,EAAE,sBAAA,CAAA,IAAI,EAAA,eAAA,EAAA,GAAA,EAAA,kBAAA,CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC5F;AACD;;;;;AAKG;IACH,MAAM,CAAC,MAAwB,EAAE,OAA8B,EAAA;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,QAAQ,EAAE,sBAAA,CAAA,IAAI,EAAA,eAAA,EAAA,GAAA,EAAA,kBAAA,CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC7F;AACD;;;;;AAKG;IACH,MAAM,CAAC,MAAwB,EAAE,OAA8B,EAAA;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,MAAM,EAAE,sBAAA,CAAA,IAAI,EAAA,eAAA,EAAA,GAAA,EAAA,kBAAA,CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC7F;AACD;;;;;;;AAOG;AACH,IAAA,IAAI,CAAC,OAA8B,EAAA;QACjC,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,KAAK,EAAE,sBAAA,CAAA,IAAI,2CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;KAC7E;AAeD;;;;;AAKG;IACH,MAAM,CACJ,MAAgD,EAChD,OAA8B,EAAA;QAE9B,OAAO,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE,KAAK,EAAE,sBAAA,CAAA,IAAI,EAAA,eAAA,EAAA,GAAA,EAAA,kBAAA,CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC7F;AACF,CAAA;;;AAnFG,IAAA,OAAO,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,IAAI,CAAC,MAAM,CAAC,QAAQ,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAG,eAAe,CAAC,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAA,mCAAmC,CAAC;AACxF,CAAC;;;;"}
1
+ {"version":3,"file":"user.js","sources":["../../../../src/resources/classes/user.ts"],"sourcesContent":["// AUTOGENERATED -- DO NOT EDIT\n\nimport {\n OystehrClientRequest,\n UserDeleteParams,\n UserGetParams,\n UserGetResponse,\n UserInviteParams,\n UserInviteResponse,\n UserListResponse,\n UserListV2Params,\n UserListV2Response,\n UserMeResponse,\n UserUpdateParams,\n UserUpdateResponse,\n} from '../..';\nimport { SDKResource } from '../../client/client';\nimport { OystehrConfig } from '../../config';\n\nexport class User extends SDKResource {\n constructor(config: OystehrConfig) {\n super(config);\n }\n #baseUrlThunk(): string {\n return this.config.services?.['projectApiUrl'] ?? 'https://project-api.zapehr.com/v1';\n }\n /**\n * Get your own User details. [Users](https://docs.oystehr.com/oystehr/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) you configure for securing the apps you build on top of Oystehr.\n *\n * Fetch details about the calling User. This endpoint has no access policy requirements, it is available to all authenticated Users.\n */\n me(request?: OystehrClientRequest): Promise<UserMeResponse> {\n return this.request('/user/me', 'get', this.#baseUrlThunk.bind(this))(request);\n }\n /**\n * Get the User with the provided ID. [Users](https://docs.oystehr.com/oystehr/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) you configure for securing the apps you build on top of Oystehr.\n *\n * Access Policy Action: `App:GetUser`\n * Access Policy Resource: `App:User`\n */\n get(params: UserGetParams, request?: OystehrClientRequest): Promise<UserGetResponse> {\n return this.request('/user/{id}', 'get', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Update the User with the provided ID. [Users](https://docs.oystehr.com/oystehr/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) you configure for securing the apps you build on top of Oystehr.\n *\n * Access Policy Action: `App:UpdateUser`\n * Access Policy Resource: `App:User`\n */\n update(params: UserUpdateParams, request?: OystehrClientRequest): Promise<UserUpdateResponse> {\n return this.request('/user/{id}', 'patch', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Delete the User with the provided ID. [Users](https://docs.oystehr.com/oystehr/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) you configure for securing the apps you build on top of Oystehr.\n *\n * Access Policy Action: `App:DeleteUser`\n * Access Policy Resource: `App:User`\n */\n delete(params: UserDeleteParams, request?: OystehrClientRequest): Promise<void> {\n return this.request('/user/{id}', 'delete', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * Invite a User to the Project. [Users](https://docs.oystehr.com/oystehr/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) you configure for securing the apps you build on top of Oystehr.\n *\n * Access Policy Action: `App:CreateUser`\n * Access Policy Resource: `App:User`\n */\n invite(params: UserInviteParams, request?: OystehrClientRequest): Promise<UserInviteResponse> {\n return this.request('/user/invite', 'post', this.#baseUrlThunk.bind(this))(params, request);\n }\n /**\n * DEPRECATED. Please use [v2/list](https://api-reference.oystehr.com/reference/get_user-v2-list) instead.\n *\n * Get all Users in the Project. [Users](https://docs.oystehr.com/oystehr/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) you configure for securing the apps you build on top of Oystehr.\n *\n * Access Policy Action: `App:ListAllUsers`\n * Access Policy Resource: `App:User`\n */\n list(request?: OystehrClientRequest): Promise<UserListResponse> {\n return this.request('/user', 'get', this.#baseUrlThunk.bind(this))(request);\n }\n /**\n * Get Users in the Project with pagination, sort, sort order and filtering. [Users](https://docs.oystehr.com/oystehr/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) you configure for securing the apps you build on top of Oystehr.\n *\n * Access Policy Action: `Project:ListAllUsers`\n * Access Policy Resource: `Project:Settings`\n */\n listV2(params: UserListV2Params, request?: OystehrClientRequest): Promise<UserListV2Response>;\n /**\n * Get Users in the Project with pagination, sort, sort order and filtering. [Users](https://docs.oystehr.com/oystehr/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) you configure for securing the apps you build on top of Oystehr.\n *\n * Access Policy Action: `Project:ListAllUsers`\n * Access Policy Resource: `Project:Settings`\n */\n listV2(request?: OystehrClientRequest): Promise<UserListV2Response>;\n /**\n * Get Users in the Project with pagination, sort, sort order and filtering. [Users](https://docs.oystehr.com/oystehr/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) you configure for securing the apps you build on top of Oystehr.\n *\n * Access Policy Action: `Project:ListAllUsers`\n * Access Policy Resource: `Project:Settings`\n */\n listV2(\n params?: UserListV2Params | OystehrClientRequest,\n request?: OystehrClientRequest\n ): Promise<UserListV2Response> {\n return this.request('/user/v2/list', 'get', this.#baseUrlThunk.bind(this))(params, request);\n }\n}\n"],"names":[],"mappings":";;;AAAA;;AAmBM,MAAO,IAAK,SAAQ,WAAW,CAAA;AACnC,IAAA,WAAA,CAAY,MAAqB,EAAA;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;;KACf;AAID;;;;AAIG;AACH,IAAA,EAAE,CAAC,OAA8B,EAAA;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,KAAK,EAAE,sBAAA,CAAA,IAAI,2CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;KAChF;AACD;;;;;AAKG;IACH,GAAG,CAAC,MAAqB,EAAE,OAA8B,EAAA;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,KAAK,EAAE,sBAAA,CAAA,IAAI,EAAA,eAAA,EAAA,GAAA,EAAA,kBAAA,CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC1F;AACD;;;;;AAKG;IACH,MAAM,CAAC,MAAwB,EAAE,OAA8B,EAAA;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,OAAO,EAAE,sBAAA,CAAA,IAAI,EAAA,eAAA,EAAA,GAAA,EAAA,kBAAA,CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC5F;AACD;;;;;AAKG;IACH,MAAM,CAAC,MAAwB,EAAE,OAA8B,EAAA;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,QAAQ,EAAE,sBAAA,CAAA,IAAI,EAAA,eAAA,EAAA,GAAA,EAAA,kBAAA,CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC7F;AACD;;;;;AAKG;IACH,MAAM,CAAC,MAAwB,EAAE,OAA8B,EAAA;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,cAAc,EAAE,MAAM,EAAE,sBAAA,CAAA,IAAI,EAAA,eAAA,EAAA,GAAA,EAAA,kBAAA,CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC7F;AACD;;;;;;;AAOG;AACH,IAAA,IAAI,CAAC,OAA8B,EAAA;QACjC,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,KAAK,EAAE,sBAAA,CAAA,IAAI,2CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;KAC7E;AAeD;;;;;AAKG;IACH,MAAM,CACJ,MAAgD,EAChD,OAA8B,EAAA;QAE9B,OAAO,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE,KAAK,EAAE,sBAAA,CAAA,IAAI,EAAA,eAAA,EAAA,GAAA,EAAA,kBAAA,CAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC7F;AACF,CAAA;;;AAnFG,IAAA,OAAO,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,IAAI,CAAC,MAAM,CAAC,QAAQ,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAG,eAAe,CAAC,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAA,mCAAmC,CAAC;AACxF,CAAC;;;;"}
@@ -0,0 +1,3 @@
1
+ export interface ErxCheckAllergyInteractionsParams {
2
+ patientId: string;
3
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Success
3
+ */
4
+ export type ErxCheckAllergyInteractionsResponse = {
5
+ /**
6
+ * Message describing the interaction.
7
+ */
8
+ message: string;
9
+ }[];
@@ -0,0 +1,3 @@
1
+ export interface ErxCheckMedicationInteractionsParams {
2
+ patientId: string;
3
+ }
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Success
3
+ */
4
+ export type ErxCheckMedicationInteractionsResponse = {
5
+ /**
6
+ * Message describing the interaction.
7
+ */
8
+ message: string;
9
+ /**
10
+ * Severity level of the interaction.
11
+ */
12
+ severityLevel: 'MajorInteraction' | 'ModerateInteraction' | 'MinorInteraction' | 'Unknown';
13
+ /**
14
+ * List of drug IDs involved in the interaction.
15
+ */
16
+ drugIds: number[];
17
+ /**
18
+ * Indicates if the interaction includes pending medications.
19
+ */
20
+ includesPending: boolean;
21
+ }[];
@@ -0,0 +1,4 @@
1
+ export interface ErxCheckPrecheckInteractionsParams {
2
+ patientId: string;
3
+ drugId: string;
4
+ }
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Success
3
+ */
4
+ export interface ErxCheckPrecheckInteractionsResponse {
5
+ allergies: {
6
+ /**
7
+ * Message describing the interaction.
8
+ */
9
+ message: string;
10
+ }[];
11
+ medications: {
12
+ /**
13
+ * Message describing the interaction.
14
+ */
15
+ message: string;
16
+ /**
17
+ * Severity level of the interaction.
18
+ */
19
+ severityLevel: 'MajorInteraction' | 'ModerateInteraction' | 'MinorInteraction' | 'Unknown';
20
+ /**
21
+ * List of drug IDs involved in the interaction.
22
+ */
23
+ drugIds: number[];
24
+ /**
25
+ * Indicates if the interaction includes pending medications.
26
+ */
27
+ includesPending: boolean;
28
+ }[];
29
+ }
@@ -0,0 +1,4 @@
1
+ export interface ErxConnectPractitionerParams {
2
+ patientId?: string;
3
+ encounterId?: string;
4
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Success
3
+ */
4
+ export interface ErxConnectPractitionerResponse {
5
+ /**
6
+ * The SSO link for the practitioner.
7
+ */
8
+ ssoLink: string;
9
+ }
@@ -0,0 +1,3 @@
1
+ export interface ErxSearchAllergensParams {
2
+ name: string;
3
+ }
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Allergens
3
+ */
4
+ export type ErxSearchAllergensResponse = {
5
+ /**
6
+ * The identifier for the allergen.
7
+ */
8
+ id?: number;
9
+ /**
10
+ * Human readable name of allergen.
11
+ */
12
+ name?: string;
13
+ /**
14
+ * Type of allergen.
15
+ */
16
+ type?: 'AllergenClass' | 'FoodAndEnvironmentalAllergens' | 'NoKnownAllergy' | 'RoutedDoseFormDrugs' | 'ScreenableIngredient';
17
+ /**
18
+ * Category of allergen.
19
+ */
20
+ category?: 'CommonAllergens' | 'UncommonAllergens' | 'OtherBrandDrugs';
21
+ }[];
@@ -0,0 +1,3 @@
1
+ export interface ErxSearchMedicationsParams {
2
+ name: string;
3
+ }
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Medications
3
+ */
4
+ export type ErxSearchMedicationsResponse = {
5
+ /**
6
+ * The identifier for the medication.
7
+ */
8
+ id: number;
9
+ /**
10
+ * The identifier for the combination of route, dose form, and drug.
11
+ */
12
+ routedDoseFormDrugId: number;
13
+ /**
14
+ * Human readable name of medication.
15
+ */
16
+ name: string;
17
+ /**
18
+ * RxNorm Concept Unique (RxCUI) identifier of medication.
19
+ */
20
+ rxcui: number | null;
21
+ /**
22
+ * RxNorm Concept Unique (RxCUI) identifier of medication.
23
+ */
24
+ ndc: string | null;
25
+ strength: string;
26
+ isObsolete: boolean;
27
+ }[];
@@ -0,0 +1,3 @@
1
+ export interface ErxV1AllergySearchParams {
2
+ name: string;
3
+ }
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Allergens
3
3
  */
4
- export interface ErxAllergySearchResponse {
4
+ export interface ErxV1AllergySearchResponse {
5
5
  allergens?: {
6
6
  /**
7
7
  * The Photon identifier for the allergen.
@@ -1,4 +1,4 @@
1
- export interface ErxCancelOrderParams {
1
+ export interface ErxV1CancelOrderParams {
2
2
  /**
3
3
  * A photon id of the order to cancel.
4
4
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Cancelled order
3
3
  */
4
- export interface ErxCancelOrderResponse {
4
+ export interface ErxV1CancelOrderResponse {
5
5
  orderId: string;
6
6
  }
@@ -1,4 +1,4 @@
1
- export interface ErxCancelPrescriptionParams {
1
+ export interface ErxV1CancelPrescriptionParams {
2
2
  /**
3
3
  * A photon id of the prescription to cancel.
4
4
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Cancelled prescription
3
3
  */
4
- export interface ErxCancelPrescriptionResponse {
4
+ export interface ErxV1CancelPrescriptionResponse {
5
5
  prescriptionId: string;
6
6
  }
@@ -1,4 +1,4 @@
1
- export interface ErxMedicationSearchParams {
1
+ export interface ErxV1MedicationSearchParams {
2
2
  name?: string;
3
3
  code?: string;
4
4
  after?: string;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Medications
3
3
  */
4
- export interface ErxMedicationSearchResponse {
4
+ export interface ErxV1MedicationSearchResponse {
5
5
  medications?: {
6
6
  /**
7
7
  * The Photon identifier for the medication.
@@ -0,0 +1,3 @@
1
+ export interface ErxV1SyncPatientParams {
2
+ patientId: string;
3
+ }
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Photon sync response
3
3
  */
4
- export interface ErxSyncPatientResponse {
4
+ export interface ErxV1SyncPatientResponse {
5
5
  /**
6
6
  * The Photon identifier for the patient.
7
7
  */
@@ -0,0 +1,4 @@
1
+ export interface ErxV2MedicationSearchParams {
2
+ name?: string;
3
+ code?: string;
4
+ }
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Medications
3
3
  */
4
- export interface ErxMedicationSearchV2Response {
4
+ export interface ErxV2MedicationSearchResponse {
5
5
  medications?: {
6
6
  /**
7
7
  * Internal identifier for the medication.
@@ -91,18 +91,18 @@ export * from './RcmValidateProfessionalClaimParams';
91
91
  export * from './RcmValidateProfessionalClaimResponse';
92
92
  export * from './RcmSubmitProfessionalClaimParams';
93
93
  export * from './RcmSubmitProfessionalClaimResponse';
94
- export * from './ErxSyncPatientParams';
95
- export * from './ErxSyncPatientResponse';
96
- export * from './ErxAllergySearchParams';
97
- export * from './ErxAllergySearchResponse';
98
- export * from './ErxCancelOrderParams';
99
- export * from './ErxCancelOrderResponse';
100
- export * from './ErxCancelPrescriptionParams';
101
- export * from './ErxCancelPrescriptionResponse';
102
- export * from './ErxMedicationSearchParams';
103
- export * from './ErxMedicationSearchResponse';
104
- export * from './ErxMedicationSearchV2Params';
105
- export * from './ErxMedicationSearchV2Response';
94
+ export * from './ErxV1SyncPatientParams';
95
+ export * from './ErxV1SyncPatientResponse';
96
+ export * from './ErxV1AllergySearchParams';
97
+ export * from './ErxV1AllergySearchResponse';
98
+ export * from './ErxV1CancelOrderParams';
99
+ export * from './ErxV1CancelOrderResponse';
100
+ export * from './ErxV1CancelPrescriptionParams';
101
+ export * from './ErxV1CancelPrescriptionResponse';
102
+ export * from './ErxV1MedicationSearchParams';
103
+ export * from './ErxV1MedicationSearchResponse';
104
+ export * from './ErxV2MedicationSearchParams';
105
+ export * from './ErxV2MedicationSearchResponse';
106
106
  export * from './RoleListResponse';
107
107
  export * from './RoleCreateParams';
108
108
  export * from './RoleCreateResponse';
@@ -172,3 +172,16 @@ export * from './LabOrderableItemListResponse';
172
172
  export * from './LabOrderableItemQuestionnaireGetParams';
173
173
  export * from './LabOrderableItemQuestionnaireGetResponse';
174
174
  export * from './LabOrderSubmitParams';
175
+ export * from './ErxSearchAllergensParams';
176
+ export * from './ErxSearchAllergensResponse';
177
+ export * from './ErxSearchMedicationsParams';
178
+ export * from './ErxSearchMedicationsResponse';
179
+ export * from './ErxCheckAllergyInteractionsParams';
180
+ export * from './ErxCheckAllergyInteractionsResponse';
181
+ export * from './ErxCheckMedicationInteractionsParams';
182
+ export * from './ErxCheckMedicationInteractionsResponse';
183
+ export * from './ErxCheckPrecheckInteractionsParams';
184
+ export * from './ErxCheckPrecheckInteractionsResponse';
185
+ export * from './ErxSyncPatientParams';
186
+ export * from './ErxConnectPractitionerParams';
187
+ export * from './ErxConnectPractitionerResponse';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oystehr/sdk",
3
- "version": "3.0.16",
3
+ "version": "4.0.0-alpha.0",
4
4
  "description": "Oystehr SDK",
5
5
  "scripts": {
6
6
  "lint": "eslint .",
@@ -14,7 +14,7 @@
14
14
  "parser": "ts-node debug-parser.ts",
15
15
  "publish-to-npmjs": "npm run build && npm publish",
16
16
  "publish-to-npmjs-next": "npm run build && npm publish --tag next",
17
- "generate": "ts-node scripts/generate-sdk-v3 project,fax,lab src/resources"
17
+ "generate": "ts-node scripts/generate-sdk-v3 project,fax,lab,erx src/resources"
18
18
  },
19
19
  "engines": {
20
20
  "npm": ">=8.0.0",
@@ -56,4 +56,4 @@
56
56
  "stu3",
57
57
  "hl7"
58
58
  ]
59
- }
59
+ }
package/src/config.ts CHANGED
@@ -13,10 +13,11 @@ export interface OystehrConfig {
13
13
  fhirApiUrl?: string;
14
14
  projectApiUrl?: string;
15
15
  services?: {
16
+ erxApiUrl?: string;
16
17
  faxApiUrl?: string;
17
18
  fhirApiUrl?: string;
18
- projectApiUrl?: string;
19
19
  labApiUrl?: string;
20
+ projectApiUrl?: string;
20
21
  };
21
22
  /**
22
23
  * Optionally provide a custom fetch implementation. This must conform to the
@@ -71,21 +71,21 @@ export class Developer extends SDKResource {
71
71
  return this.request('/developer', 'get', this.#baseUrlThunk.bind(this))(request);
72
72
  }
73
73
  /**
74
- * Get Developers in the Project with pagination, sort, sort Order and filtering. [Users](https://docs.oystehr.com/oystehr/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) you configure for securing the apps you build on top of Oystehr.
74
+ * Get Developers in the Project with pagination, sort, sort order and filtering. [Users](https://docs.oystehr.com/oystehr/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) you configure for securing the apps you build on top of Oystehr.
75
75
  *
76
76
  * Access Policy Action: `Project:ListAllUsers`
77
77
  * Access Policy Resource: `Project:Settings`
78
78
  */
79
79
  listV2(params: DeveloperListV2Params, request?: OystehrClientRequest): Promise<DeveloperListV2Response>;
80
80
  /**
81
- * Get Developers in the Project with pagination, sort, sort Order and filtering. [Users](https://docs.oystehr.com/oystehr/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) you configure for securing the apps you build on top of Oystehr.
81
+ * Get Developers in the Project with pagination, sort, sort order and filtering. [Users](https://docs.oystehr.com/oystehr/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) you configure for securing the apps you build on top of Oystehr.
82
82
  *
83
83
  * Access Policy Action: `Project:ListAllUsers`
84
84
  * Access Policy Resource: `Project:Settings`
85
85
  */
86
86
  listV2(request?: OystehrClientRequest): Promise<DeveloperListV2Response>;
87
87
  /**
88
- * Get Developers in the Project with pagination, sort, sort Order and filtering. [Users](https://docs.oystehr.com/oystehr/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) you configure for securing the apps you build on top of Oystehr.
88
+ * Get Developers in the Project with pagination, sort, sort order and filtering. [Users](https://docs.oystehr.com/oystehr/services/app/users/) are the people who log into the [Applications](https://docs.oystehr.com/oystehr/services/app/applications/) you configure for securing the apps you build on top of Oystehr.
89
89
  *
90
90
  * Access Policy Action: `Project:ListAllUsers`
91
91
  * Access Policy Resource: `Project:Settings`
@@ -1,18 +1,19 @@
1
1
  // AUTOGENERATED -- DO NOT EDIT
2
2
 
3
3
  import {
4
- ErxAllergySearchParams,
5
- ErxAllergySearchResponse,
6
- ErxCancelOrderParams,
7
- ErxCancelOrderResponse,
8
- ErxCancelPrescriptionParams,
9
- ErxCancelPrescriptionResponse,
10
- ErxMedicationSearchParams,
11
- ErxMedicationSearchResponse,
12
- ErxMedicationSearchV2Params,
13
- ErxMedicationSearchV2Response,
4
+ ErxCheckAllergyInteractionsParams,
5
+ ErxCheckAllergyInteractionsResponse,
6
+ ErxCheckMedicationInteractionsParams,
7
+ ErxCheckMedicationInteractionsResponse,
8
+ ErxCheckPrecheckInteractionsParams,
9
+ ErxCheckPrecheckInteractionsResponse,
10
+ ErxConnectPractitionerParams,
11
+ ErxConnectPractitionerResponse,
12
+ ErxSearchAllergensParams,
13
+ ErxSearchAllergensResponse,
14
+ ErxSearchMedicationsParams,
15
+ ErxSearchMedicationsResponse,
14
16
  ErxSyncPatientParams,
15
- ErxSyncPatientResponse,
16
17
  OystehrClientRequest,
17
18
  } from '../..';
18
19
  import { SDKResource } from '../../client/client';
@@ -23,73 +24,89 @@ export class Erx extends SDKResource {
23
24
  super(config);
24
25
  }
25
26
  #baseUrlThunk(): string {
26
- return this.config.services?.['projectApiUrl'] ?? 'https://project-api.zapehr.com/v1';
27
+ return this.config.services?.['erxApiUrl'] ?? 'https://erx-api.zapehr.com/v3';
27
28
  }
28
29
  /**
29
- * Retrieve patient properties from FHIR service and sync them with eRx service
30
+ * Search for allergens
30
31
  */
31
- syncPatient(params: ErxSyncPatientParams, request?: OystehrClientRequest): Promise<ErxSyncPatientResponse> {
32
- return this.request('/erx/sync-patient/{patientId}', 'post', this.#baseUrlThunk.bind(this))(params, request);
32
+ searchAllergens(
33
+ params: ErxSearchAllergensParams,
34
+ request?: OystehrClientRequest
35
+ ): Promise<ErxSearchAllergensResponse> {
36
+ return this.request('/allergen', 'get', this.#baseUrlThunk.bind(this))(params, request);
33
37
  }
34
38
  /**
35
- * Search for allergies
39
+ * Search for medications. Provide at least one of code or name filters
36
40
  */
37
- allergySearch(params: ErxAllergySearchParams, request?: OystehrClientRequest): Promise<ErxAllergySearchResponse> {
38
- return this.request('/erx/allergy/search', 'get', this.#baseUrlThunk.bind(this))(params, request);
41
+ searchMedications(
42
+ params: ErxSearchMedicationsParams,
43
+ request?: OystehrClientRequest
44
+ ): Promise<ErxSearchMedicationsResponse> {
45
+ return this.request('/medication', 'get', this.#baseUrlThunk.bind(this))(params, request);
39
46
  }
40
47
  /**
41
- * Cancel photon order
48
+ * Checks for drug-allergy interactions for a patient. This endpoint requires the patient's allergies to be synced with the upstream eRx provider.
42
49
  */
43
- cancelOrder(params: ErxCancelOrderParams, request?: OystehrClientRequest): Promise<ErxCancelOrderResponse> {
44
- return this.request('/erx/cancel-order', 'post', this.#baseUrlThunk.bind(this))(params, request);
50
+ checkAllergyInteractions(
51
+ params: ErxCheckAllergyInteractionsParams,
52
+ request?: OystehrClientRequest
53
+ ): Promise<ErxCheckAllergyInteractionsResponse> {
54
+ return this.request(
55
+ '/patient/{patientId}/interactions/allergy',
56
+ 'get',
57
+ this.#baseUrlThunk.bind(this)
58
+ )(params, request);
45
59
  }
46
60
  /**
47
- * Cancel photon prescription
61
+ * Checks for drug-drug interactions for a patient. This endpoint requires the patient's medications to be synced with the upstream eRx provider.
48
62
  */
49
- cancelPrescription(
50
- params: ErxCancelPrescriptionParams,
63
+ checkMedicationInteractions(
64
+ params: ErxCheckMedicationInteractionsParams,
51
65
  request?: OystehrClientRequest
52
- ): Promise<ErxCancelPrescriptionResponse> {
53
- return this.request('/erx/cancel-prescription', 'post', this.#baseUrlThunk.bind(this))(params, request);
66
+ ): Promise<ErxCheckMedicationInteractionsResponse> {
67
+ return this.request(
68
+ '/patient/{patientId}/interactions/medication',
69
+ 'get',
70
+ this.#baseUrlThunk.bind(this)
71
+ )(params, request);
54
72
  }
55
73
  /**
56
- * Search for medications. Provide at least one of code or name filters
74
+ * Checks for drug-allergy and drug-drug interactions with a specific drug for a patient. This endpoint requires the patient's allergies and medications to be synced with the upstream eRx provider.
57
75
  */
58
- medicationSearch(
59
- params: ErxMedicationSearchParams,
76
+ checkPrecheckInteractions(
77
+ params: ErxCheckPrecheckInteractionsParams,
60
78
  request?: OystehrClientRequest
61
- ): Promise<ErxMedicationSearchResponse>;
62
- /**
63
- * Search for medications. Provide at least one of code or name filters
64
- */
65
- medicationSearch(request?: OystehrClientRequest): Promise<ErxMedicationSearchResponse>;
79
+ ): Promise<ErxCheckPrecheckInteractionsResponse> {
80
+ return this.request(
81
+ '/patient/{patientId}/interactions/precheck/{drugId}',
82
+ 'get',
83
+ this.#baseUrlThunk.bind(this)
84
+ )(params, request);
85
+ }
66
86
  /**
67
- * Search for medications. Provide at least one of code or name filters
87
+ * Syncs demographic, allergy, and medication data for a patient with the upstream eRx provider.
68
88
  */
69
- medicationSearch(
70
- params?: ErxMedicationSearchParams | OystehrClientRequest,
71
- request?: OystehrClientRequest
72
- ): Promise<ErxMedicationSearchResponse> {
73
- return this.request('/erx/medication/search', 'get', this.#baseUrlThunk.bind(this))(params, request);
89
+ syncPatient(params: ErxSyncPatientParams, request?: OystehrClientRequest): Promise<void> {
90
+ return this.request('/patient/{patientId}/sync', 'post', this.#baseUrlThunk.bind(this))(params, request);
74
91
  }
75
92
  /**
76
- * Search for medications. Provide at least one of code or name filters
93
+ * Create an SSO link for a practitioner. This link can be used to log in to the eRx service as the specified practitioner.
77
94
  */
78
- medicationSearchV2(
79
- params: ErxMedicationSearchV2Params,
95
+ connectPractitioner(
96
+ params: ErxConnectPractitionerParams,
80
97
  request?: OystehrClientRequest
81
- ): Promise<ErxMedicationSearchV2Response>;
98
+ ): Promise<ErxConnectPractitionerResponse>;
82
99
  /**
83
- * Search for medications. Provide at least one of code or name filters
100
+ * Create an SSO link for a practitioner. This link can be used to log in to the eRx service as the specified practitioner.
84
101
  */
85
- medicationSearchV2(request?: OystehrClientRequest): Promise<ErxMedicationSearchV2Response>;
102
+ connectPractitioner(request?: OystehrClientRequest): Promise<ErxConnectPractitionerResponse>;
86
103
  /**
87
- * Search for medications. Provide at least one of code or name filters
104
+ * Create an SSO link for a practitioner. This link can be used to log in to the eRx service as the specified practitioner.
88
105
  */
89
- medicationSearchV2(
90
- params?: ErxMedicationSearchV2Params | OystehrClientRequest,
106
+ connectPractitioner(
107
+ params?: ErxConnectPractitionerParams | OystehrClientRequest,
91
108
  request?: OystehrClientRequest
92
- ): Promise<ErxMedicationSearchV2Response> {
93
- return this.request('/erx/v2/medication/search', 'get', this.#baseUrlThunk.bind(this))(params, request);
109
+ ): Promise<ErxConnectPractitionerResponse> {
110
+ return this.request('/practitioner/connect', 'get', this.#baseUrlThunk.bind(this))(params, request);
94
111
  }
95
112
  }