candidhealth 0.3.0 → 0.4.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 (334) hide show
  1. package/api/resources/auth/resources/v2/client/Client.js +1 -1
  2. package/api/resources/billingNotes/client/Client.js +1 -1
  3. package/api/resources/commons/types/DateRangeOptionalEnd.d.ts +8 -0
  4. package/api/resources/commons/types/Decimal.d.ts +11 -0
  5. package/api/resources/commons/types/Decimal.js +10 -0
  6. package/api/resources/commons/types/EmrPayerCrosswalk.d.ts +8 -0
  7. package/api/resources/commons/types/EmrPayerCrosswalk.js +10 -0
  8. package/api/resources/commons/types/UserId.d.ts +8 -0
  9. package/api/resources/commons/types/index.d.ts +4 -1
  10. package/api/resources/commons/types/index.js +4 -1
  11. package/api/resources/encounters/resources/v4/client/Client.js +16 -12
  12. package/api/resources/encounters/resources/v4/client/create.d.ts +7 -1
  13. package/api/resources/encounters/resources/v4/client/create.js +11 -0
  14. package/api/resources/encounters/resources/v4/client/requests/EncounterCreate.d.ts +0 -1
  15. package/api/resources/encounters/resources/v4/client/requests/EncounterUpdate.d.ts +2 -7
  16. package/api/resources/encounters/resources/v4/client/requests/GetAllEncountersRequest.d.ts +2 -1
  17. package/api/resources/encounters/resources/v4/types/BillableStatusType.d.ts +8 -0
  18. package/api/resources/encounters/resources/v4/types/BillableStatusType.js +10 -0
  19. package/api/resources/encounters/resources/v4/types/Encounter.d.ts +1 -0
  20. package/api/resources/encounters/resources/v4/types/EncounterBase.d.ts +13 -7
  21. package/api/resources/encounters/resources/v4/types/EncounterGuarantorMissingContactInfoErrorType.d.ts +6 -0
  22. package/api/resources/encounters/resources/v4/types/ResponsiblePartyType.d.ts +9 -0
  23. package/api/resources/encounters/resources/v4/types/ResponsiblePartyType.js +11 -0
  24. package/api/resources/encounters/resources/v4/types/index.d.ts +3 -0
  25. package/api/resources/encounters/resources/v4/types/index.js +3 -0
  26. package/api/resources/expectedNetworkStatus/client/Client.js +1 -1
  27. package/api/resources/guarantor/resources/v1/client/Client.d.ts +2 -2
  28. package/api/resources/guarantor/resources/v1/client/Client.js +20 -6
  29. package/api/resources/guarantor/resources/v1/client/create.d.ts +7 -1
  30. package/api/resources/guarantor/resources/v1/client/create.js +11 -0
  31. package/api/resources/guarantor/resources/v1/client/requests/GuarantorUpdate.d.ts +6 -3
  32. package/api/resources/guarantor/resources/v1/types/EncounterHasExistingGuarantorErrorType.d.ts +6 -0
  33. package/api/resources/guarantor/resources/v1/types/Guarantor.d.ts +4 -0
  34. package/api/resources/guarantor/resources/v1/types/GuarantorBase.d.ts +1 -2
  35. package/api/resources/guarantor/resources/v1/types/GuarantorCreate.d.ts +6 -0
  36. package/api/resources/guarantor/resources/v1/types/index.d.ts +1 -0
  37. package/api/resources/guarantor/resources/v1/types/index.js +1 -0
  38. package/api/resources/index.d.ts +0 -1
  39. package/api/resources/index.js +1 -2
  40. package/api/resources/individual/types/Patient.d.ts +4 -0
  41. package/api/resources/individual/types/PatientBase.d.ts +0 -1
  42. package/api/resources/individual/types/PatientCreate.d.ts +6 -0
  43. package/api/resources/insuranceCard/types/InsuranceCardBase.d.ts +1 -1
  44. package/api/resources/insuranceCard/types/InsuranceCardCreate.d.ts +1 -0
  45. package/api/resources/organizationProviders/resources/v2/types/LicenseType.d.ts +13 -1
  46. package/api/resources/organizationProviders/resources/v2/types/LicenseType.js +12 -0
  47. package/api/resources/payers/client/Client.js +2 -2
  48. package/api/resources/serviceLines/types/ServiceLine.d.ts +13 -1
  49. package/api/resources/serviceLines/types/ServiceLineCreate.d.ts +7 -1
  50. package/api/resources/tasks/resources/v3/client/Client.js +1 -1
  51. package/api/resources/workQueues/resources/v1/types/WorkQueue.d.ts +1 -1
  52. package/dist/api/resources/auth/resources/v2/client/Client.js +1 -1
  53. package/dist/api/resources/billingNotes/client/Client.js +1 -1
  54. package/dist/api/resources/commons/types/DateRangeOptionalEnd.d.ts +8 -0
  55. package/dist/api/resources/commons/types/Decimal.d.ts +11 -0
  56. package/dist/api/resources/commons/types/Decimal.js +10 -0
  57. package/dist/api/resources/commons/types/EmrPayerCrosswalk.d.ts +8 -0
  58. package/dist/api/resources/commons/types/EmrPayerCrosswalk.js +10 -0
  59. package/dist/api/resources/commons/types/UserId.d.ts +8 -0
  60. package/dist/api/resources/commons/types/index.d.ts +4 -1
  61. package/dist/api/resources/commons/types/index.js +4 -1
  62. package/dist/api/resources/encounters/resources/v4/client/Client.js +16 -12
  63. package/dist/api/resources/encounters/resources/v4/client/create.d.ts +7 -1
  64. package/dist/api/resources/encounters/resources/v4/client/create.js +11 -0
  65. package/dist/api/resources/encounters/resources/v4/client/requests/EncounterCreate.d.ts +0 -1
  66. package/dist/api/resources/encounters/resources/v4/client/requests/EncounterUpdate.d.ts +2 -7
  67. package/dist/api/resources/encounters/resources/v4/client/requests/GetAllEncountersRequest.d.ts +2 -1
  68. package/dist/api/resources/encounters/resources/v4/types/BillableStatusType.d.ts +8 -0
  69. package/dist/api/resources/encounters/resources/v4/types/BillableStatusType.js +10 -0
  70. package/dist/api/resources/encounters/resources/v4/types/Encounter.d.ts +1 -0
  71. package/dist/api/resources/encounters/resources/v4/types/EncounterBase.d.ts +13 -7
  72. package/dist/api/resources/encounters/resources/v4/types/EncounterGuarantorMissingContactInfoErrorType.d.ts +6 -0
  73. package/dist/api/resources/encounters/resources/v4/types/ResponsiblePartyType.d.ts +9 -0
  74. package/dist/api/resources/encounters/resources/v4/types/ResponsiblePartyType.js +11 -0
  75. package/dist/api/resources/encounters/resources/v4/types/index.d.ts +3 -0
  76. package/dist/api/resources/encounters/resources/v4/types/index.js +3 -0
  77. package/dist/api/resources/expectedNetworkStatus/client/Client.js +1 -1
  78. package/dist/api/resources/guarantor/resources/v1/client/Client.d.ts +2 -2
  79. package/dist/api/resources/guarantor/resources/v1/client/Client.js +20 -6
  80. package/dist/api/resources/guarantor/resources/v1/client/create.d.ts +7 -1
  81. package/dist/api/resources/guarantor/resources/v1/client/create.js +11 -0
  82. package/dist/api/resources/guarantor/resources/v1/client/requests/GuarantorUpdate.d.ts +6 -3
  83. package/dist/api/resources/guarantor/resources/v1/types/EncounterHasExistingGuarantorErrorType.d.ts +6 -0
  84. package/dist/api/resources/guarantor/resources/v1/types/Guarantor.d.ts +4 -0
  85. package/dist/api/resources/guarantor/resources/v1/types/GuarantorBase.d.ts +1 -2
  86. package/dist/api/resources/guarantor/resources/v1/types/GuarantorCreate.d.ts +6 -0
  87. package/dist/api/resources/guarantor/resources/v1/types/index.d.ts +1 -0
  88. package/dist/api/resources/guarantor/resources/v1/types/index.js +1 -0
  89. package/dist/api/resources/index.d.ts +0 -1
  90. package/dist/api/resources/index.js +1 -2
  91. package/dist/api/resources/individual/types/Patient.d.ts +4 -0
  92. package/dist/api/resources/individual/types/PatientBase.d.ts +0 -1
  93. package/dist/api/resources/individual/types/PatientCreate.d.ts +6 -0
  94. package/dist/api/resources/insuranceCard/types/InsuranceCardBase.d.ts +1 -1
  95. package/dist/api/resources/insuranceCard/types/InsuranceCardCreate.d.ts +1 -0
  96. package/dist/api/resources/organizationProviders/resources/v2/types/LicenseType.d.ts +13 -1
  97. package/dist/api/resources/organizationProviders/resources/v2/types/LicenseType.js +12 -0
  98. package/dist/api/resources/payers/client/Client.js +2 -2
  99. package/dist/api/resources/serviceLines/types/ServiceLine.d.ts +13 -1
  100. package/dist/api/resources/serviceLines/types/ServiceLineCreate.d.ts +7 -1
  101. package/dist/api/resources/tasks/resources/v3/client/Client.js +1 -1
  102. package/dist/api/resources/workQueues/resources/v1/types/WorkQueue.d.ts +1 -1
  103. package/dist/serialization/resources/commons/types/DateRangeOptionalEnd.d.ts +13 -0
  104. package/dist/serialization/resources/commons/types/DateRangeOptionalEnd.js +34 -0
  105. package/dist/serialization/resources/commons/types/Decimal.d.ts +10 -0
  106. package/dist/serialization/resources/commons/types/Decimal.js +37 -0
  107. package/dist/serialization/resources/commons/types/EmrPayerCrosswalk.d.ts +10 -0
  108. package/dist/serialization/resources/commons/types/EmrPayerCrosswalk.js +31 -0
  109. package/dist/serialization/resources/commons/types/UserId.d.ts +10 -0
  110. package/dist/serialization/resources/{users/resources/v2 → commons}/types/UserId.js +6 -4
  111. package/dist/serialization/resources/commons/types/index.d.ts +4 -1
  112. package/dist/serialization/resources/commons/types/index.js +4 -1
  113. package/dist/serialization/resources/encounters/resources/v4/client/create.d.ts +5 -1
  114. package/dist/serialization/resources/encounters/resources/v4/client/create.js +5 -0
  115. package/dist/serialization/resources/encounters/resources/v4/client/requests/EncounterCreate.d.ts +0 -1
  116. package/dist/serialization/resources/encounters/resources/v4/client/requests/EncounterCreate.js +0 -1
  117. package/dist/serialization/resources/encounters/resources/v4/client/requests/EncounterUpdate.d.ts +2 -2
  118. package/dist/serialization/resources/encounters/resources/v4/client/requests/EncounterUpdate.js +6 -2
  119. package/dist/serialization/resources/encounters/resources/v4/types/BillableStatusType.d.ts +10 -0
  120. package/{serialization/resources/users/resources/v2/types/MachineUserMetadata.js → dist/serialization/resources/encounters/resources/v4/types/BillableStatusType.js} +2 -4
  121. package/dist/serialization/resources/encounters/resources/v4/types/Encounter.d.ts +1 -0
  122. package/dist/serialization/resources/encounters/resources/v4/types/Encounter.js +3 -0
  123. package/dist/serialization/resources/encounters/resources/v4/types/EncounterBase.d.ts +3 -2
  124. package/dist/serialization/resources/encounters/resources/v4/types/EncounterBase.js +3 -2
  125. package/dist/serialization/resources/encounters/resources/v4/types/EncounterGuarantorMissingContactInfoErrorType.d.ts +12 -0
  126. package/dist/serialization/resources/{users/resources/v2/types/GoogleAppsMetadata.js → encounters/resources/v4/types/EncounterGuarantorMissingContactInfoErrorType.js} +3 -3
  127. package/dist/serialization/resources/encounters/resources/v4/types/ResponsiblePartyType.d.ts +10 -0
  128. package/dist/serialization/resources/{users/resources/v2/types/MachineUserMetadata.js → encounters/resources/v4/types/ResponsiblePartyType.js} +2 -4
  129. package/dist/serialization/resources/encounters/resources/v4/types/index.d.ts +3 -0
  130. package/dist/serialization/resources/encounters/resources/v4/types/index.js +3 -0
  131. package/dist/serialization/resources/guarantor/resources/v1/client/create.d.ts +14 -0
  132. package/dist/serialization/resources/{users/resources/v2/types/UserMetadata.js → guarantor/resources/v1/client/create.js} +14 -7
  133. package/dist/serialization/resources/guarantor/resources/v1/client/index.d.ts +1 -0
  134. package/dist/serialization/resources/guarantor/resources/v1/client/index.js +14 -0
  135. package/dist/serialization/resources/guarantor/resources/v1/client/requests/GuarantorUpdate.d.ts +6 -3
  136. package/dist/serialization/resources/guarantor/resources/v1/client/requests/GuarantorUpdate.js +8 -3
  137. package/dist/serialization/resources/guarantor/resources/v1/types/EncounterHasExistingGuarantorErrorType.d.ts +12 -0
  138. package/{serialization/resources/users/resources/v2/types/AuthZeroMetadata.js → dist/serialization/resources/guarantor/resources/v1/types/EncounterHasExistingGuarantorErrorType.js} +3 -3
  139. package/dist/serialization/resources/guarantor/resources/v1/types/Guarantor.d.ts +4 -0
  140. package/dist/serialization/resources/guarantor/resources/v1/types/Guarantor.js +4 -0
  141. package/dist/serialization/resources/guarantor/resources/v1/types/GuarantorBase.d.ts +1 -2
  142. package/dist/serialization/resources/guarantor/resources/v1/types/GuarantorBase.js +1 -2
  143. package/dist/serialization/resources/guarantor/resources/v1/types/GuarantorCreate.d.ts +4 -0
  144. package/dist/serialization/resources/guarantor/resources/v1/types/GuarantorCreate.js +8 -1
  145. package/dist/serialization/resources/guarantor/resources/v1/types/index.d.ts +1 -0
  146. package/dist/serialization/resources/guarantor/resources/v1/types/index.js +1 -0
  147. package/dist/serialization/resources/index.d.ts +0 -1
  148. package/dist/serialization/resources/index.js +1 -2
  149. package/dist/serialization/resources/individual/types/Patient.d.ts +4 -0
  150. package/dist/serialization/resources/individual/types/Patient.js +4 -0
  151. package/dist/serialization/resources/individual/types/PatientBase.d.ts +0 -1
  152. package/dist/serialization/resources/individual/types/PatientBase.js +0 -1
  153. package/dist/serialization/resources/individual/types/PatientCreate.d.ts +4 -0
  154. package/dist/serialization/resources/individual/types/PatientCreate.js +8 -1
  155. package/dist/serialization/resources/insuranceCard/types/InsuranceCardBase.d.ts +1 -1
  156. package/dist/serialization/resources/insuranceCard/types/InsuranceCardBase.js +1 -1
  157. package/dist/serialization/resources/insuranceCard/types/InsuranceCardCreate.d.ts +1 -0
  158. package/dist/serialization/resources/insuranceCard/types/InsuranceCardCreate.js +1 -0
  159. package/dist/serialization/resources/organizationProviders/resources/v2/types/LicenseType.d.ts +1 -1
  160. package/dist/serialization/resources/organizationProviders/resources/v2/types/LicenseType.js +12 -0
  161. package/dist/serialization/resources/serviceLines/types/ServiceLine.d.ts +2 -1
  162. package/dist/serialization/resources/serviceLines/types/ServiceLine.js +2 -1
  163. package/dist/serialization/resources/serviceLines/types/ServiceLineCreate.d.ts +1 -1
  164. package/dist/serialization/resources/serviceLines/types/ServiceLineCreate.js +1 -1
  165. package/dist/serialization/resources/workQueues/resources/v1/types/WorkQueue.d.ts +1 -1
  166. package/dist/serialization/resources/workQueues/resources/v1/types/WorkQueue.js +1 -1
  167. package/examples/acmeHealth.ts +4 -2
  168. package/package.json +1 -1
  169. package/serialization/resources/commons/types/DateRangeOptionalEnd.d.ts +13 -0
  170. package/serialization/resources/commons/types/DateRangeOptionalEnd.js +34 -0
  171. package/serialization/resources/commons/types/Decimal.d.ts +10 -0
  172. package/serialization/resources/commons/types/Decimal.js +37 -0
  173. package/serialization/resources/commons/types/EmrPayerCrosswalk.d.ts +10 -0
  174. package/serialization/resources/commons/types/EmrPayerCrosswalk.js +31 -0
  175. package/serialization/resources/commons/types/UserId.d.ts +10 -0
  176. package/serialization/resources/{users/resources/v2 → commons}/types/UserId.js +6 -4
  177. package/serialization/resources/commons/types/index.d.ts +4 -1
  178. package/serialization/resources/commons/types/index.js +4 -1
  179. package/serialization/resources/encounters/resources/v4/client/create.d.ts +5 -1
  180. package/serialization/resources/encounters/resources/v4/client/create.js +5 -0
  181. package/serialization/resources/encounters/resources/v4/client/requests/EncounterCreate.d.ts +0 -1
  182. package/serialization/resources/encounters/resources/v4/client/requests/EncounterCreate.js +0 -1
  183. package/serialization/resources/encounters/resources/v4/client/requests/EncounterUpdate.d.ts +2 -2
  184. package/serialization/resources/encounters/resources/v4/client/requests/EncounterUpdate.js +6 -2
  185. package/serialization/resources/encounters/resources/v4/types/BillableStatusType.d.ts +10 -0
  186. package/serialization/resources/encounters/resources/v4/types/BillableStatusType.js +31 -0
  187. package/serialization/resources/encounters/resources/v4/types/Encounter.d.ts +1 -0
  188. package/serialization/resources/encounters/resources/v4/types/Encounter.js +3 -0
  189. package/serialization/resources/encounters/resources/v4/types/EncounterBase.d.ts +3 -2
  190. package/serialization/resources/encounters/resources/v4/types/EncounterBase.js +3 -2
  191. package/serialization/resources/encounters/resources/v4/types/EncounterGuarantorMissingContactInfoErrorType.d.ts +12 -0
  192. package/{dist/serialization/resources/users/resources/v2/types/HumanUserMetadata.js → serialization/resources/encounters/resources/v4/types/EncounterGuarantorMissingContactInfoErrorType.js} +3 -4
  193. package/serialization/resources/encounters/resources/v4/types/ResponsiblePartyType.d.ts +10 -0
  194. package/serialization/resources/encounters/resources/v4/types/ResponsiblePartyType.js +31 -0
  195. package/serialization/resources/encounters/resources/v4/types/index.d.ts +3 -0
  196. package/serialization/resources/encounters/resources/v4/types/index.js +3 -0
  197. package/serialization/resources/guarantor/resources/v1/client/create.d.ts +14 -0
  198. package/serialization/resources/{users/resources/v2/types/IdpUserMetadata.js → guarantor/resources/v1/client/create.js} +14 -8
  199. package/serialization/resources/guarantor/resources/v1/client/index.d.ts +1 -0
  200. package/serialization/resources/guarantor/resources/v1/client/index.js +14 -0
  201. package/serialization/resources/guarantor/resources/v1/client/requests/GuarantorUpdate.d.ts +6 -3
  202. package/serialization/resources/guarantor/resources/v1/client/requests/GuarantorUpdate.js +8 -3
  203. package/serialization/resources/guarantor/resources/v1/types/EncounterHasExistingGuarantorErrorType.d.ts +12 -0
  204. package/{dist/serialization/resources/users/resources/v2/types/AuthZeroMetadata.js → serialization/resources/guarantor/resources/v1/types/EncounterHasExistingGuarantorErrorType.js} +3 -3
  205. package/serialization/resources/guarantor/resources/v1/types/Guarantor.d.ts +4 -0
  206. package/serialization/resources/guarantor/resources/v1/types/Guarantor.js +4 -0
  207. package/serialization/resources/guarantor/resources/v1/types/GuarantorBase.d.ts +1 -2
  208. package/serialization/resources/guarantor/resources/v1/types/GuarantorBase.js +1 -2
  209. package/serialization/resources/guarantor/resources/v1/types/GuarantorCreate.d.ts +4 -0
  210. package/serialization/resources/guarantor/resources/v1/types/GuarantorCreate.js +8 -1
  211. package/serialization/resources/guarantor/resources/v1/types/index.d.ts +1 -0
  212. package/serialization/resources/guarantor/resources/v1/types/index.js +1 -0
  213. package/serialization/resources/index.d.ts +0 -1
  214. package/serialization/resources/index.js +1 -2
  215. package/serialization/resources/individual/types/Patient.d.ts +4 -0
  216. package/serialization/resources/individual/types/Patient.js +4 -0
  217. package/serialization/resources/individual/types/PatientBase.d.ts +0 -1
  218. package/serialization/resources/individual/types/PatientBase.js +0 -1
  219. package/serialization/resources/individual/types/PatientCreate.d.ts +4 -0
  220. package/serialization/resources/individual/types/PatientCreate.js +8 -1
  221. package/serialization/resources/insuranceCard/types/InsuranceCardBase.d.ts +1 -1
  222. package/serialization/resources/insuranceCard/types/InsuranceCardBase.js +1 -1
  223. package/serialization/resources/insuranceCard/types/InsuranceCardCreate.d.ts +1 -0
  224. package/serialization/resources/insuranceCard/types/InsuranceCardCreate.js +1 -0
  225. package/serialization/resources/organizationProviders/resources/v2/types/LicenseType.d.ts +1 -1
  226. package/serialization/resources/organizationProviders/resources/v2/types/LicenseType.js +12 -0
  227. package/serialization/resources/serviceLines/types/ServiceLine.d.ts +2 -1
  228. package/serialization/resources/serviceLines/types/ServiceLine.js +2 -1
  229. package/serialization/resources/serviceLines/types/ServiceLineCreate.d.ts +1 -1
  230. package/serialization/resources/serviceLines/types/ServiceLineCreate.js +1 -1
  231. package/serialization/resources/workQueues/resources/v1/types/WorkQueue.d.ts +1 -1
  232. package/serialization/resources/workQueues/resources/v1/types/WorkQueue.js +1 -1
  233. package/api/resources/commons/types/ContactInfo.d.ts +0 -10
  234. package/api/resources/users/index.d.ts +0 -1
  235. package/api/resources/users/index.js +0 -17
  236. package/api/resources/users/resources/index.d.ts +0 -1
  237. package/api/resources/users/resources/index.js +0 -27
  238. package/api/resources/users/resources/v2/index.d.ts +0 -1
  239. package/api/resources/users/resources/v2/index.js +0 -17
  240. package/api/resources/users/resources/v2/types/AuthZeroMetadata.d.ts +0 -6
  241. package/api/resources/users/resources/v2/types/GoogleAppsMetadata.d.ts +0 -6
  242. package/api/resources/users/resources/v2/types/HumanUserMetadata.d.ts +0 -7
  243. package/api/resources/users/resources/v2/types/IdpUserMetadata.d.ts +0 -16
  244. package/api/resources/users/resources/v2/types/MachineUserMetadata.d.ts +0 -6
  245. package/api/resources/users/resources/v2/types/OtherIdpMetadata.d.ts +0 -6
  246. package/api/resources/users/resources/v2/types/OtherIdpMetadata.js +0 -5
  247. package/api/resources/users/resources/v2/types/UserId.d.ts +0 -8
  248. package/api/resources/users/resources/v2/types/UserMetadata.d.ts +0 -13
  249. package/api/resources/users/resources/v2/types/UserMetadata.js +0 -5
  250. package/api/resources/users/resources/v2/types/UserV2.d.ts +0 -11
  251. package/api/resources/users/resources/v2/types/UserV2.js +0 -5
  252. package/api/resources/users/resources/v2/types/index.d.ts +0 -9
  253. package/api/resources/users/resources/v2/types/index.js +0 -25
  254. package/dist/api/resources/commons/types/ContactInfo.d.ts +0 -10
  255. package/dist/api/resources/commons/types/ContactInfo.js +0 -5
  256. package/dist/api/resources/users/index.d.ts +0 -1
  257. package/dist/api/resources/users/index.js +0 -17
  258. package/dist/api/resources/users/resources/index.d.ts +0 -1
  259. package/dist/api/resources/users/resources/index.js +0 -27
  260. package/dist/api/resources/users/resources/v2/index.d.ts +0 -1
  261. package/dist/api/resources/users/resources/v2/index.js +0 -17
  262. package/dist/api/resources/users/resources/v2/types/AuthZeroMetadata.d.ts +0 -6
  263. package/dist/api/resources/users/resources/v2/types/AuthZeroMetadata.js +0 -5
  264. package/dist/api/resources/users/resources/v2/types/GoogleAppsMetadata.d.ts +0 -6
  265. package/dist/api/resources/users/resources/v2/types/GoogleAppsMetadata.js +0 -5
  266. package/dist/api/resources/users/resources/v2/types/HumanUserMetadata.d.ts +0 -7
  267. package/dist/api/resources/users/resources/v2/types/HumanUserMetadata.js +0 -5
  268. package/dist/api/resources/users/resources/v2/types/IdpUserMetadata.d.ts +0 -16
  269. package/dist/api/resources/users/resources/v2/types/IdpUserMetadata.js +0 -5
  270. package/dist/api/resources/users/resources/v2/types/MachineUserMetadata.d.ts +0 -6
  271. package/dist/api/resources/users/resources/v2/types/MachineUserMetadata.js +0 -5
  272. package/dist/api/resources/users/resources/v2/types/OtherIdpMetadata.d.ts +0 -6
  273. package/dist/api/resources/users/resources/v2/types/OtherIdpMetadata.js +0 -5
  274. package/dist/api/resources/users/resources/v2/types/UserId.d.ts +0 -8
  275. package/dist/api/resources/users/resources/v2/types/UserMetadata.d.ts +0 -13
  276. package/dist/api/resources/users/resources/v2/types/UserMetadata.js +0 -5
  277. package/dist/api/resources/users/resources/v2/types/UserV2.d.ts +0 -11
  278. package/dist/api/resources/users/resources/v2/types/UserV2.js +0 -5
  279. package/dist/api/resources/users/resources/v2/types/index.d.ts +0 -9
  280. package/dist/api/resources/users/resources/v2/types/index.js +0 -25
  281. package/dist/serialization/resources/commons/types/ContactInfo.d.ts +0 -15
  282. package/dist/serialization/resources/commons/types/ContactInfo.js +0 -36
  283. package/dist/serialization/resources/users/index.d.ts +0 -1
  284. package/dist/serialization/resources/users/index.js +0 -17
  285. package/dist/serialization/resources/users/resources/index.d.ts +0 -1
  286. package/dist/serialization/resources/users/resources/index.js +0 -27
  287. package/dist/serialization/resources/users/resources/v2/index.d.ts +0 -1
  288. package/dist/serialization/resources/users/resources/v2/index.js +0 -17
  289. package/dist/serialization/resources/users/resources/v2/types/AuthZeroMetadata.d.ts +0 -12
  290. package/dist/serialization/resources/users/resources/v2/types/GoogleAppsMetadata.d.ts +0 -12
  291. package/dist/serialization/resources/users/resources/v2/types/HumanUserMetadata.d.ts +0 -13
  292. package/dist/serialization/resources/users/resources/v2/types/IdpUserMetadata.d.ts +0 -19
  293. package/dist/serialization/resources/users/resources/v2/types/IdpUserMetadata.js +0 -40
  294. package/dist/serialization/resources/users/resources/v2/types/MachineUserMetadata.d.ts +0 -12
  295. package/dist/serialization/resources/users/resources/v2/types/OtherIdpMetadata.d.ts +0 -12
  296. package/dist/serialization/resources/users/resources/v2/types/OtherIdpMetadata.js +0 -33
  297. package/dist/serialization/resources/users/resources/v2/types/UserId.d.ts +0 -10
  298. package/dist/serialization/resources/users/resources/v2/types/UserMetadata.d.ts +0 -16
  299. package/dist/serialization/resources/users/resources/v2/types/UserV2.d.ts +0 -16
  300. package/dist/serialization/resources/users/resources/v2/types/UserV2.js +0 -37
  301. package/dist/serialization/resources/users/resources/v2/types/index.d.ts +0 -9
  302. package/dist/serialization/resources/users/resources/v2/types/index.js +0 -25
  303. package/serialization/resources/commons/types/ContactInfo.d.ts +0 -15
  304. package/serialization/resources/commons/types/ContactInfo.js +0 -36
  305. package/serialization/resources/users/index.d.ts +0 -1
  306. package/serialization/resources/users/index.js +0 -17
  307. package/serialization/resources/users/resources/index.d.ts +0 -1
  308. package/serialization/resources/users/resources/index.js +0 -27
  309. package/serialization/resources/users/resources/v2/index.d.ts +0 -1
  310. package/serialization/resources/users/resources/v2/index.js +0 -17
  311. package/serialization/resources/users/resources/v2/types/AuthZeroMetadata.d.ts +0 -12
  312. package/serialization/resources/users/resources/v2/types/GoogleAppsMetadata.d.ts +0 -12
  313. package/serialization/resources/users/resources/v2/types/GoogleAppsMetadata.js +0 -33
  314. package/serialization/resources/users/resources/v2/types/HumanUserMetadata.d.ts +0 -13
  315. package/serialization/resources/users/resources/v2/types/HumanUserMetadata.js +0 -34
  316. package/serialization/resources/users/resources/v2/types/IdpUserMetadata.d.ts +0 -19
  317. package/serialization/resources/users/resources/v2/types/MachineUserMetadata.d.ts +0 -12
  318. package/serialization/resources/users/resources/v2/types/OtherIdpMetadata.d.ts +0 -12
  319. package/serialization/resources/users/resources/v2/types/OtherIdpMetadata.js +0 -33
  320. package/serialization/resources/users/resources/v2/types/UserId.d.ts +0 -10
  321. package/serialization/resources/users/resources/v2/types/UserMetadata.d.ts +0 -16
  322. package/serialization/resources/users/resources/v2/types/UserMetadata.js +0 -39
  323. package/serialization/resources/users/resources/v2/types/UserV2.d.ts +0 -16
  324. package/serialization/resources/users/resources/v2/types/UserV2.js +0 -37
  325. package/serialization/resources/users/resources/v2/types/index.d.ts +0 -9
  326. package/serialization/resources/users/resources/v2/types/index.js +0 -25
  327. /package/api/resources/commons/types/{ContactInfo.js → DateRangeOptionalEnd.js} +0 -0
  328. /package/api/resources/{users/resources/v2 → commons}/types/UserId.js +0 -0
  329. /package/api/resources/{users/resources/v2/types/AuthZeroMetadata.js → encounters/resources/v4/types/EncounterGuarantorMissingContactInfoErrorType.js} +0 -0
  330. /package/api/resources/{users/resources/v2/types/GoogleAppsMetadata.js → guarantor/resources/v1/types/EncounterHasExistingGuarantorErrorType.js} +0 -0
  331. /package/{api/resources/users/resources/v2/types/HumanUserMetadata.js → dist/api/resources/commons/types/DateRangeOptionalEnd.js} +0 -0
  332. /package/dist/api/resources/{users/resources/v2 → commons}/types/UserId.js +0 -0
  333. /package/{api/resources/users/resources/v2/types/IdpUserMetadata.js → dist/api/resources/encounters/resources/v4/types/EncounterGuarantorMissingContactInfoErrorType.js} +0 -0
  334. /package/{api/resources/users/resources/v2/types/MachineUserMetadata.js → dist/api/resources/guarantor/resources/v1/types/EncounterHasExistingGuarantorErrorType.js} +0 -0
@@ -48,7 +48,7 @@ class V2 {
48
48
  Authorization: await this._getAuthorizationHeader(),
49
49
  "X-Fern-Language": "JavaScript",
50
50
  "X-Fern-SDK-Name": "candidhealth",
51
- "X-Fern-SDK-Version": "0.3.0",
51
+ "X-Fern-SDK-Version": "0.4.0",
52
52
  },
53
53
  contentType: "application/json",
54
54
  body: await serializers.auth.v2.AuthGetTokenRequest.jsonOrThrow(request, {
@@ -48,7 +48,7 @@ class BillingNotes {
48
48
  Authorization: await this._getAuthorizationHeader(),
49
49
  "X-Fern-Language": "JavaScript",
50
50
  "X-Fern-SDK-Name": "candidhealth",
51
- "X-Fern-SDK-Version": "0.3.0",
51
+ "X-Fern-SDK-Version": "0.4.0",
52
52
  },
53
53
  contentType: "application/json",
54
54
  body: await serializers.StandaloneBillingNoteCreate.jsonOrThrow(request, {
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as CandidApi from "../../..";
5
+ export interface DateRangeOptionalEnd {
6
+ startDate: CandidApi.Date_;
7
+ endDate?: CandidApi.Date_;
8
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as CandidApi from "../../..";
5
+ /**
6
+ * String representation of a Decimal that can be parsed by most libraries.
7
+ */
8
+ export declare type Decimal = string & {
9
+ Decimal: void;
10
+ };
11
+ export declare function Decimal(value: string): CandidApi.Decimal;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Decimal = void 0;
7
+ function Decimal(value) {
8
+ return value;
9
+ }
10
+ exports.Decimal = Decimal;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export declare type EmrPayerCrosswalk = "HEALTHIE" | "CANVAS";
5
+ export declare const EmrPayerCrosswalk: {
6
+ readonly Healthie: "HEALTHIE";
7
+ readonly Canvas: "CANVAS";
8
+ };
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.EmrPayerCrosswalk = void 0;
7
+ exports.EmrPayerCrosswalk = {
8
+ Healthie: "HEALTHIE",
9
+ Canvas: "CANVAS",
10
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as CandidApi from "../../..";
5
+ export declare type UserId = string & {
6
+ UserId: void;
7
+ };
8
+ export declare function UserId(value: string): CandidApi.UserId;
@@ -6,10 +6,13 @@ export * from "./PatientExternalId";
6
6
  export * from "./EncounterExternalId";
7
7
  export * from "./Npi";
8
8
  export * from "./WorkQueueId";
9
+ export * from "./UserId";
9
10
  export * from "./LinkUrl";
10
11
  export * from "./ContentDownloadUrl";
11
12
  export * from "./PageToken";
12
13
  export * from "./Date_";
14
+ export * from "./DateRangeOptionalEnd";
15
+ export * from "./Decimal";
13
16
  export * from "./ResourcePage";
14
17
  export * from "./StreetAddressBase";
15
18
  export * from "./StreetAddressShortZip";
@@ -24,7 +27,7 @@ export * from "./PatientRelationshipToInsuredCodeAll";
24
27
  export * from "./ProcedureModifier";
25
28
  export * from "./ServiceLineUnits";
26
29
  export * from "./InsuranceTypeCode";
30
+ export * from "./EmrPayerCrosswalk";
27
31
  export * from "./PhoneNumber";
28
32
  export * from "./PhoneNumberType";
29
33
  export * from "./Email";
30
- export * from "./ContactInfo";
@@ -22,10 +22,13 @@ __exportStar(require("./PatientExternalId"), exports);
22
22
  __exportStar(require("./EncounterExternalId"), exports);
23
23
  __exportStar(require("./Npi"), exports);
24
24
  __exportStar(require("./WorkQueueId"), exports);
25
+ __exportStar(require("./UserId"), exports);
25
26
  __exportStar(require("./LinkUrl"), exports);
26
27
  __exportStar(require("./ContentDownloadUrl"), exports);
27
28
  __exportStar(require("./PageToken"), exports);
28
29
  __exportStar(require("./Date_"), exports);
30
+ __exportStar(require("./DateRangeOptionalEnd"), exports);
31
+ __exportStar(require("./Decimal"), exports);
29
32
  __exportStar(require("./ResourcePage"), exports);
30
33
  __exportStar(require("./StreetAddressBase"), exports);
31
34
  __exportStar(require("./StreetAddressShortZip"), exports);
@@ -40,7 +43,7 @@ __exportStar(require("./PatientRelationshipToInsuredCodeAll"), exports);
40
43
  __exportStar(require("./ProcedureModifier"), exports);
41
44
  __exportStar(require("./ServiceLineUnits"), exports);
42
45
  __exportStar(require("./InsuranceTypeCode"), exports);
46
+ __exportStar(require("./EmrPayerCrosswalk"), exports);
43
47
  __exportStar(require("./PhoneNumber"), exports);
44
48
  __exportStar(require("./PhoneNumberType"), exports);
45
49
  __exportStar(require("./Email"), exports);
46
- __exportStar(require("./ContactInfo"), exports);
@@ -42,7 +42,7 @@ class V4 {
42
42
  this.options = options;
43
43
  }
44
44
  async getAll(request = {}) {
45
- const { limit, claimStatus, sort, pageToken, dateOfServiceMin, dateOfServiceMax, primaryPayerNames, searchTerm, externalId, diagnosesUpdatedSince, tagIds, doNotBill, workQueueId, } = request;
45
+ const { limit, claimStatus, sort, pageToken, dateOfServiceMin, dateOfServiceMax, primaryPayerNames, searchTerm, externalId, diagnosesUpdatedSince, tagIds, workQueueId, billableStatus, responsibleParty, } = request;
46
46
  const _queryParams = new url_search_params_1.default();
47
47
  if (limit != null) {
48
48
  _queryParams.append("limit", limit.toString());
@@ -84,12 +84,15 @@ class V4 {
84
84
  _queryParams.append("tag_ids", tagIds);
85
85
  }
86
86
  }
87
- if (doNotBill != null) {
88
- _queryParams.append("do_not_bill", doNotBill.toString());
89
- }
90
87
  if (workQueueId != null) {
91
88
  _queryParams.append("work_queue_id", workQueueId);
92
89
  }
90
+ if (billableStatus != null) {
91
+ _queryParams.append("billable_status", billableStatus);
92
+ }
93
+ if (responsibleParty != null) {
94
+ _queryParams.append("responsible_party", responsibleParty);
95
+ }
93
96
  const _response = await core.fetcher({
94
97
  url: (0, url_join_1.default)(this.options.environment ?? environments.CandidApiEnvironment.Production, "/api/encounters/v4"),
95
98
  method: "GET",
@@ -97,7 +100,7 @@ class V4 {
97
100
  Authorization: await this._getAuthorizationHeader(),
98
101
  "X-Fern-Language": "JavaScript",
99
102
  "X-Fern-SDK-Name": "candidhealth",
100
- "X-Fern-SDK-Version": "0.3.0",
103
+ "X-Fern-SDK-Version": "0.4.0",
101
104
  },
102
105
  contentType: "application/json",
103
106
  queryParameters: _queryParams,
@@ -127,7 +130,7 @@ class V4 {
127
130
  Authorization: await this._getAuthorizationHeader(),
128
131
  "X-Fern-Language": "JavaScript",
129
132
  "X-Fern-SDK-Name": "candidhealth",
130
- "X-Fern-SDK-Version": "0.3.0",
133
+ "X-Fern-SDK-Version": "0.4.0",
131
134
  },
132
135
  contentType: "application/json",
133
136
  timeoutMs: 60000,
@@ -156,7 +159,7 @@ class V4 {
156
159
  Authorization: await this._getAuthorizationHeader(),
157
160
  "X-Fern-Language": "JavaScript",
158
161
  "X-Fern-SDK-Name": "candidhealth",
159
- "X-Fern-SDK-Version": "0.3.0",
162
+ "X-Fern-SDK-Version": "0.4.0",
160
163
  },
161
164
  contentType: "application/json",
162
165
  body: await serializers.encounters.v4.EncounterCreate.jsonOrThrow(request, {
@@ -178,6 +181,7 @@ class V4 {
178
181
  if (_response.error.reason === "status-code") {
179
182
  switch (_response.error.body?.errorName) {
180
183
  case "EncounterExternalIdUniquenessError":
184
+ case "EncounterGuarantorMissingContactInfoError":
181
185
  return {
182
186
  ok: false,
183
187
  error: await serializers.encounters.v4.create.Error.parseOrThrow(_response.error.body, {
@@ -202,7 +206,7 @@ class V4 {
202
206
  Authorization: await this._getAuthorizationHeader(),
203
207
  "X-Fern-Language": "JavaScript",
204
208
  "X-Fern-SDK-Name": "candidhealth",
205
- "X-Fern-SDK-Version": "0.3.0",
209
+ "X-Fern-SDK-Version": "0.4.0",
206
210
  },
207
211
  contentType: "application/json",
208
212
  body: await serializers.encounters.v4.EncounterUpdate.jsonOrThrow(request, {
@@ -248,7 +252,7 @@ class V4 {
248
252
  Authorization: await this._getAuthorizationHeader(),
249
253
  "X-Fern-Language": "JavaScript",
250
254
  "X-Fern-SDK-Name": "candidhealth",
251
- "X-Fern-SDK-Version": "0.3.0",
255
+ "X-Fern-SDK-Version": "0.4.0",
252
256
  },
253
257
  contentType: "application/json",
254
258
  timeoutMs: 60000,
@@ -277,7 +281,7 @@ class V4 {
277
281
  Authorization: await this._getAuthorizationHeader(),
278
282
  "X-Fern-Language": "JavaScript",
279
283
  "X-Fern-SDK-Name": "candidhealth",
280
- "X-Fern-SDK-Version": "0.3.0",
284
+ "X-Fern-SDK-Version": "0.4.0",
281
285
  },
282
286
  contentType: "application/json",
283
287
  timeoutMs: 60000,
@@ -309,7 +313,7 @@ class V4 {
309
313
  Authorization: await this._getAuthorizationHeader(),
310
314
  "X-Fern-Language": "JavaScript",
311
315
  "X-Fern-SDK-Name": "candidhealth",
312
- "X-Fern-SDK-Version": "0.3.0",
316
+ "X-Fern-SDK-Version": "0.4.0",
313
317
  },
314
318
  contentType: "application/json",
315
319
  timeoutMs: 60000,
@@ -338,7 +342,7 @@ class V4 {
338
342
  Authorization: await this._getAuthorizationHeader(),
339
343
  "X-Fern-Language": "JavaScript",
340
344
  "X-Fern-SDK-Name": "candidhealth",
341
- "X-Fern-SDK-Version": "0.3.0",
345
+ "X-Fern-SDK-Version": "0.4.0",
342
346
  },
343
347
  contentType: "application/json",
344
348
  timeoutMs: 60000,
@@ -3,12 +3,16 @@
3
3
  */
4
4
  import * as CandidApi from "../../../../..";
5
5
  import * as core from "../../../../../../core";
6
- export declare type Error = CandidApi.encounters.v4.create.Error.EncounterExternalIdUniquenessError | CandidApi.encounters.v4.create.Error._Unknown;
6
+ export declare type Error = CandidApi.encounters.v4.create.Error.EncounterExternalIdUniquenessError | CandidApi.encounters.v4.create.Error.EncounterGuarantorMissingContactInfoError | CandidApi.encounters.v4.create.Error._Unknown;
7
7
  export declare namespace Error {
8
8
  interface EncounterExternalIdUniquenessError extends _Utils {
9
9
  errorName: "EncounterExternalIdUniquenessError";
10
10
  content: CandidApi.encounters.v4.EncounterExternalIdUniquenessErrorType;
11
11
  }
12
+ interface EncounterGuarantorMissingContactInfoError extends _Utils {
13
+ errorName: "EncounterGuarantorMissingContactInfoError";
14
+ content: CandidApi.encounters.v4.EncounterGuarantorMissingContactInfoErrorType;
15
+ }
12
16
  interface _Unknown extends _Utils {
13
17
  errorName: void;
14
18
  content: core.Fetcher.Error;
@@ -18,11 +22,13 @@ export declare namespace Error {
18
22
  }
19
23
  interface _Visitor<_Result> {
20
24
  encounterExternalIdUniquenessError: (value: CandidApi.encounters.v4.EncounterExternalIdUniquenessErrorType) => _Result;
25
+ encounterGuarantorMissingContactInfoError: (value: CandidApi.encounters.v4.EncounterGuarantorMissingContactInfoErrorType) => _Result;
21
26
  _other: (value: core.Fetcher.Error) => _Result;
22
27
  }
23
28
  }
24
29
  export declare const Error: {
25
30
  readonly encounterExternalIdUniquenessError: (value: CandidApi.encounters.v4.EncounterExternalIdUniquenessErrorType) => CandidApi.encounters.v4.create.Error.EncounterExternalIdUniquenessError;
31
+ readonly encounterGuarantorMissingContactInfoError: (value: CandidApi.encounters.v4.EncounterGuarantorMissingContactInfoErrorType) => CandidApi.encounters.v4.create.Error.EncounterGuarantorMissingContactInfoError;
26
32
  readonly _unknown: (fetcherError: core.Fetcher.Error) => CandidApi.encounters.v4.create.Error._Unknown;
27
33
  readonly _visit: <_Result>(value: CandidApi.encounters.v4.create.Error, visitor: CandidApi.encounters.v4.create.Error._Visitor<_Result>) => _Result;
28
34
  };
@@ -38,6 +38,15 @@ exports.Error = {
38
38
  },
39
39
  };
40
40
  },
41
+ encounterGuarantorMissingContactInfoError: (value) => {
42
+ return {
43
+ content: value,
44
+ errorName: "EncounterGuarantorMissingContactInfoError",
45
+ _visit: function (visitor) {
46
+ return CandidApi.encounters.v4.create.Error._visit(this, visitor);
47
+ },
48
+ };
49
+ },
41
50
  _unknown: (fetcherError) => {
42
51
  return {
43
52
  errorName: undefined,
@@ -51,6 +60,8 @@ exports.Error = {
51
60
  switch (value.errorName) {
52
61
  case "EncounterExternalIdUniquenessError":
53
62
  return visitor.encounterExternalIdUniquenessError(value.content);
63
+ case "EncounterGuarantorMissingContactInfoError":
64
+ return visitor.encounterGuarantorMissingContactInfoError(value.content);
54
65
  default:
55
66
  return visitor._other(value);
56
67
  }
@@ -4,7 +4,6 @@
4
4
  import * as CandidApi from "../../../../../..";
5
5
  export interface EncounterCreate extends CandidApi.encounters.v4.EncounterBase {
6
6
  patient: CandidApi.PatientCreate;
7
- patientIsSelfGuarantor?: boolean;
8
7
  billingProvider: CandidApi.encounterProviders.v2.BillingProvider;
9
8
  renderingProvider: CandidApi.encounterProviders.v2.RenderingProvider;
10
9
  /**
@@ -30,13 +30,8 @@ export interface EncounterUpdate {
30
30
  tagIds?: CandidApi.TagId[];
31
31
  clinicalNotes?: CandidApi.encounters.v4.ClinicalNoteCategoryCreate[];
32
32
  payToAddress?: CandidApi.StreetAddressLongZip;
33
- patientIsSelfGuarantor?: boolean;
34
- /**
35
- * If a patient is no longer a self-guarantor, a newly-created guarantor object can be passed
36
- * via this field. Note that patient_is_self_guarantor should be toggled to False
37
- *
38
- */
39
- guarantorId?: CandidApi.guarantor.v1.GuarantorId;
33
+ billableStatus?: CandidApi.encounters.v4.BillableStatusType;
34
+ responsibleParty?: CandidApi.encounters.v4.ResponsiblePartyType;
40
35
  providerAcceptsAssignment?: boolean;
41
36
  benefitsAssignedToProvider?: boolean;
42
37
  synchronicity?: CandidApi.encounters.v4.SynchronicityType;
@@ -36,6 +36,7 @@ export interface GetAllEncountersRequest {
36
36
  */
37
37
  diagnosesUpdatedSince?: Date;
38
38
  tagIds?: CandidApi.TagId | CandidApi.TagId[];
39
- doNotBill?: boolean;
40
39
  workQueueId?: CandidApi.WorkQueueId;
40
+ billableStatus?: CandidApi.encounters.v4.BillableStatusType;
41
+ responsibleParty?: CandidApi.encounters.v4.ResponsiblePartyType;
41
42
  }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export declare type BillableStatusType = "BILLABLE" | "NOT_BILLABLE";
5
+ export declare const BillableStatusType: {
6
+ readonly Billable: "BILLABLE";
7
+ readonly NotBillable: "NOT_BILLABLE";
8
+ };
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.BillableStatusType = void 0;
7
+ exports.BillableStatusType = {
8
+ Billable: "BILLABLE",
9
+ NotBillable: "NOT_BILLABLE",
10
+ };
@@ -6,6 +6,7 @@ export interface Encounter extends CandidApi.encounters.v4.EncounterBase {
6
6
  encounterId: CandidApi.EncounterId;
7
7
  claims: CandidApi.Claim[];
8
8
  patient: CandidApi.Patient;
9
+ guarantor?: CandidApi.guarantor.v1.Guarantor;
9
10
  billingProvider: CandidApi.encounterProviders.v2.EncounterProvider;
10
11
  renderingProvider: CandidApi.encounterProviders.v2.EncounterProvider;
11
12
  referringProvider?: CandidApi.encounterProviders.v2.EncounterProvider;
@@ -9,7 +9,7 @@ export interface EncounterBase {
9
9
  * This field should not contain PHI.
10
10
  *
11
11
  */
12
- externalId?: CandidApi.EncounterExternalId;
12
+ externalId: CandidApi.EncounterExternalId;
13
13
  /**
14
14
  * Date formatted as YYYY-MM-DD; eg: 2019-08-24.
15
15
  * This date must be the local date in the timezone where the service occurred.
@@ -54,12 +54,6 @@ export interface EncounterBase {
54
54
  *
55
55
  */
56
56
  appointmentType?: string;
57
- /**
58
- * Should be set to true if Candid should not create or submit a claim but you'd
59
- * like us to track this encounter anyway (ex: patient is paying cash)
60
- *
61
- */
62
- doNotBill?: boolean;
63
57
  existingMedications?: CandidApi.encounters.v4.Medication[];
64
58
  vitals?: CandidApi.encounters.v4.Vitals;
65
59
  interventions?: CandidApi.encounters.v4.Intervention[];
@@ -73,4 +67,16 @@ export interface EncounterBase {
73
67
  *
74
68
  */
75
69
  synchronicity?: CandidApi.encounters.v4.SynchronicityType;
70
+ /**
71
+ * Defines if the Encounter is to be billed by Candid to the responsible_party.
72
+ * Examples for when this should be set to NOT_BILLABLE include
73
+ * if the Encounter has not occurred yet or if there is no intention of ever billing the responsible_party.
74
+ *
75
+ */
76
+ billableStatus: CandidApi.encounters.v4.BillableStatusType;
77
+ /**
78
+ * Defines the party to be billed with the initial balance owed on the claim.
79
+ *
80
+ */
81
+ responsibleParty: CandidApi.encounters.v4.ResponsiblePartyType;
76
82
  }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface EncounterGuarantorMissingContactInfoErrorType {
5
+ missingFields: string[];
6
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export declare type ResponsiblePartyType = "INSURANCE_PAY" | "SELF_PAY" | "UNKNOWN";
5
+ export declare const ResponsiblePartyType: {
6
+ readonly InsurancePay: "INSURANCE_PAY";
7
+ readonly SelfPay: "SELF_PAY";
8
+ readonly Unknown: "UNKNOWN";
9
+ };
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ResponsiblePartyType = void 0;
7
+ exports.ResponsiblePartyType = {
8
+ InsurancePay: "INSURANCE_PAY",
9
+ SelfPay: "SELF_PAY",
10
+ Unknown: "UNKNOWN",
11
+ };
@@ -16,6 +16,8 @@ export * from "./ClinicalNoteCategoryCreate";
16
16
  export * from "./ClinicalNoteCategory";
17
17
  export * from "./NoteCategory";
18
18
  export * from "./ClinicalNote";
19
+ export * from "./ResponsiblePartyType";
20
+ export * from "./BillableStatusType";
19
21
  export * from "./SynchronicityType";
20
22
  export * from "./CodingAttributionType";
21
23
  export * from "./AttachmentId";
@@ -37,3 +39,4 @@ export * from "./RxCui";
37
39
  export * from "./IntakeQuestionId";
38
40
  export * from "./IntakeFollowUpId";
39
41
  export * from "./EncounterExternalIdUniquenessErrorType";
42
+ export * from "./EncounterGuarantorMissingContactInfoErrorType";
@@ -32,6 +32,8 @@ __exportStar(require("./ClinicalNoteCategoryCreate"), exports);
32
32
  __exportStar(require("./ClinicalNoteCategory"), exports);
33
33
  __exportStar(require("./NoteCategory"), exports);
34
34
  __exportStar(require("./ClinicalNote"), exports);
35
+ __exportStar(require("./ResponsiblePartyType"), exports);
36
+ __exportStar(require("./BillableStatusType"), exports);
35
37
  __exportStar(require("./SynchronicityType"), exports);
36
38
  __exportStar(require("./CodingAttributionType"), exports);
37
39
  __exportStar(require("./AttachmentId"), exports);
@@ -53,3 +55,4 @@ __exportStar(require("./RxCui"), exports);
53
55
  __exportStar(require("./IntakeQuestionId"), exports);
54
56
  __exportStar(require("./IntakeFollowUpId"), exports);
55
57
  __exportStar(require("./EncounterExternalIdUniquenessErrorType"), exports);
58
+ __exportStar(require("./EncounterGuarantorMissingContactInfoErrorType"), exports);
@@ -48,7 +48,7 @@ class ExpectedNetworkStatus {
48
48
  Authorization: await this._getAuthorizationHeader(),
49
49
  "X-Fern-Language": "JavaScript",
50
50
  "X-Fern-SDK-Name": "candidhealth",
51
- "X-Fern-SDK-Version": "0.3.0",
51
+ "X-Fern-SDK-Version": "0.4.0",
52
52
  },
53
53
  contentType: "application/json",
54
54
  body: await serializers.ExpectedNetworkStatusRequest.jsonOrThrow(request, {
@@ -13,8 +13,8 @@ export declare namespace V1 {
13
13
  export declare class V1 {
14
14
  protected readonly options: V1.Options;
15
15
  constructor(options: V1.Options);
16
- create(request: CandidApi.guarantor.v1.GuarantorCreate): Promise<core.APIResponse<CandidApi.guarantor.v1.Guarantor, CandidApi.guarantor.v1.create.Error>>;
16
+ create(encounterId: CandidApi.EncounterId, request: CandidApi.guarantor.v1.GuarantorCreate): Promise<core.APIResponse<CandidApi.guarantor.v1.Guarantor, CandidApi.guarantor.v1.create.Error>>;
17
17
  get(guarantorId: CandidApi.guarantor.v1.GuarantorId): Promise<core.APIResponse<CandidApi.guarantor.v1.Guarantor, CandidApi.guarantor.v1.get.Error>>;
18
- update(guarantorId: CandidApi.guarantor.v1.GuarantorId, request: CandidApi.guarantor.v1.GuarantorUpdate): Promise<core.APIResponse<CandidApi.guarantor.v1.Guarantor, CandidApi.guarantor.v1.update.Error>>;
18
+ update(guarantorId: CandidApi.guarantor.v1.GuarantorId, request?: CandidApi.guarantor.v1.GuarantorUpdate): Promise<core.APIResponse<CandidApi.guarantor.v1.Guarantor, CandidApi.guarantor.v1.update.Error>>;
19
19
  protected _getAuthorizationHeader(): Promise<string | undefined>;
20
20
  }
@@ -40,15 +40,15 @@ class V1 {
40
40
  constructor(options) {
41
41
  this.options = options;
42
42
  }
43
- async create(request) {
43
+ async create(encounterId, request) {
44
44
  const _response = await core.fetcher({
45
- url: (0, url_join_1.default)(this.options.environment ?? environments.CandidApiEnvironment.Production, "/api/guarantors/v1"),
45
+ url: (0, url_join_1.default)(this.options.environment ?? environments.CandidApiEnvironment.Production, `/api/guarantors/v1/${await serializers.EncounterId.jsonOrThrow(encounterId)}`),
46
46
  method: "POST",
47
47
  headers: {
48
48
  Authorization: await this._getAuthorizationHeader(),
49
49
  "X-Fern-Language": "JavaScript",
50
50
  "X-Fern-SDK-Name": "candidhealth",
51
- "X-Fern-SDK-Version": "0.3.0",
51
+ "X-Fern-SDK-Version": "0.4.0",
52
52
  },
53
53
  contentType: "application/json",
54
54
  body: await serializers.guarantor.v1.GuarantorCreate.jsonOrThrow(request, {
@@ -67,6 +67,20 @@ class V1 {
67
67
  }),
68
68
  };
69
69
  }
70
+ if (_response.error.reason === "status-code") {
71
+ switch (_response.error.body?.errorName) {
72
+ case "EncounterHasExistingGuarantorError":
73
+ return {
74
+ ok: false,
75
+ error: await serializers.guarantor.v1.create.Error.parseOrThrow(_response.error.body, {
76
+ unrecognizedObjectKeys: "passthrough",
77
+ allowUnrecognizedUnionMembers: true,
78
+ allowUnrecognizedEnumValues: true,
79
+ breadcrumbsPrefix: ["response"],
80
+ }),
81
+ };
82
+ }
83
+ }
70
84
  return {
71
85
  ok: false,
72
86
  error: CandidApi.guarantor.v1.create.Error._unknown(_response.error),
@@ -80,7 +94,7 @@ class V1 {
80
94
  Authorization: await this._getAuthorizationHeader(),
81
95
  "X-Fern-Language": "JavaScript",
82
96
  "X-Fern-SDK-Name": "candidhealth",
83
- "X-Fern-SDK-Version": "0.3.0",
97
+ "X-Fern-SDK-Version": "0.4.0",
84
98
  },
85
99
  contentType: "application/json",
86
100
  timeoutMs: 60000,
@@ -101,7 +115,7 @@ class V1 {
101
115
  error: CandidApi.guarantor.v1.get.Error._unknown(_response.error),
102
116
  };
103
117
  }
104
- async update(guarantorId, request) {
118
+ async update(guarantorId, request = {}) {
105
119
  const _response = await core.fetcher({
106
120
  url: (0, url_join_1.default)(this.options.environment ?? environments.CandidApiEnvironment.Production, `/api/guarantors/v1/${await serializers.guarantor.v1.GuarantorId.jsonOrThrow(guarantorId)}`),
107
121
  method: "PATCH",
@@ -109,7 +123,7 @@ class V1 {
109
123
  Authorization: await this._getAuthorizationHeader(),
110
124
  "X-Fern-Language": "JavaScript",
111
125
  "X-Fern-SDK-Name": "candidhealth",
112
- "X-Fern-SDK-Version": "0.3.0",
126
+ "X-Fern-SDK-Version": "0.4.0",
113
127
  },
114
128
  contentType: "application/json",
115
129
  body: await serializers.guarantor.v1.GuarantorUpdate.jsonOrThrow(request, {
@@ -3,8 +3,12 @@
3
3
  */
4
4
  import * as CandidApi from "../../../../..";
5
5
  import * as core from "../../../../../../core";
6
- export declare type Error = CandidApi.guarantor.v1.create.Error._Unknown;
6
+ export declare type Error = CandidApi.guarantor.v1.create.Error.EncounterHasExistingGuarantorError | CandidApi.guarantor.v1.create.Error._Unknown;
7
7
  export declare namespace Error {
8
+ interface EncounterHasExistingGuarantorError extends _Utils {
9
+ errorName: "EncounterHasExistingGuarantorError";
10
+ content: CandidApi.guarantor.v1.EncounterHasExistingGuarantorErrorType;
11
+ }
8
12
  interface _Unknown extends _Utils {
9
13
  errorName: void;
10
14
  content: core.Fetcher.Error;
@@ -13,10 +17,12 @@ export declare namespace Error {
13
17
  _visit: <_Result>(visitor: CandidApi.guarantor.v1.create.Error._Visitor<_Result>) => _Result;
14
18
  }
15
19
  interface _Visitor<_Result> {
20
+ encounterHasExistingGuarantorError: (value: CandidApi.guarantor.v1.EncounterHasExistingGuarantorErrorType) => _Result;
16
21
  _other: (value: core.Fetcher.Error) => _Result;
17
22
  }
18
23
  }
19
24
  export declare const Error: {
25
+ readonly encounterHasExistingGuarantorError: (value: CandidApi.guarantor.v1.EncounterHasExistingGuarantorErrorType) => CandidApi.guarantor.v1.create.Error.EncounterHasExistingGuarantorError;
20
26
  readonly _unknown: (fetcherError: core.Fetcher.Error) => CandidApi.guarantor.v1.create.Error._Unknown;
21
27
  readonly _visit: <_Result>(value: CandidApi.guarantor.v1.create.Error, visitor: CandidApi.guarantor.v1.create.Error._Visitor<_Result>) => _Result;
22
28
  };
@@ -29,6 +29,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.Error = void 0;
30
30
  const CandidApi = __importStar(require("../../../../.."));
31
31
  exports.Error = {
32
+ encounterHasExistingGuarantorError: (value) => {
33
+ return {
34
+ content: value,
35
+ errorName: "EncounterHasExistingGuarantorError",
36
+ _visit: function (visitor) {
37
+ return CandidApi.guarantor.v1.create.Error._visit(this, visitor);
38
+ },
39
+ };
40
+ },
32
41
  _unknown: (fetcherError) => {
33
42
  return {
34
43
  errorName: undefined,
@@ -40,6 +49,8 @@ exports.Error = {
40
49
  },
41
50
  _visit: (value, visitor) => {
42
51
  switch (value.errorName) {
52
+ case "EncounterHasExistingGuarantorError":
53
+ return visitor.encounterHasExistingGuarantorError(value.content);
43
54
  default:
44
55
  return visitor._other(value);
45
56
  }
@@ -6,7 +6,10 @@ export interface GuarantorUpdate {
6
6
  firstName?: string;
7
7
  lastName?: string;
8
8
  externalId?: string;
9
- dateOfBirth: string;
10
- address?: CandidApi.StreetAddressLongZip;
11
- contactInfo?: CandidApi.ContactInfo;
9
+ dateOfBirth?: string;
10
+ address?: CandidApi.StreetAddressShortZip;
11
+ phoneNumbers?: CandidApi.PhoneNumber[];
12
+ phoneConsent?: boolean;
13
+ email?: CandidApi.Email;
14
+ emailConsent?: boolean;
12
15
  }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface EncounterHasExistingGuarantorErrorType {
5
+ message: string;
6
+ }
@@ -4,4 +4,8 @@
4
4
  import * as CandidApi from "../../../../..";
5
5
  export interface Guarantor extends CandidApi.guarantor.v1.GuarantorBase {
6
6
  guarantorId: CandidApi.guarantor.v1.GuarantorId;
7
+ phoneNumbers: CandidApi.PhoneNumber[];
8
+ phoneConsent: boolean;
9
+ email?: CandidApi.Email;
10
+ emailConsent: boolean;
7
11
  }