candidhealth 1.13.0 → 1.14.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 (250) hide show
  1. package/Client.d.ts +0 -3
  2. package/Client.js +10 -15
  3. package/api/resources/commons/types/ProcedureModifier.d.ts +3 -0
  4. package/api/resources/commons/types/ProcedureModifier.js +3 -0
  5. package/api/resources/encounters/resources/v4/client/Client.d.ts +97 -0
  6. package/api/resources/encounters/resources/v4/client/Client.js +312 -0
  7. package/api/resources/encounters/resources/v4/client/createFromPreEncounterPatientUniversal.d.ts +67 -0
  8. package/api/resources/encounters/resources/v4/client/createFromPreEncounterPatientUniversal.js +143 -0
  9. package/api/resources/encounters/resources/v4/client/createUniversal.d.ts +91 -0
  10. package/api/resources/encounters/resources/v4/client/createUniversal.js +187 -0
  11. package/api/resources/encounters/resources/v4/client/index.d.ts +3 -0
  12. package/api/resources/encounters/resources/v4/client/index.js +4 -1
  13. package/api/resources/encounters/resources/v4/client/updateUniversal.d.ts +67 -0
  14. package/api/resources/encounters/resources/v4/client/updateUniversal.js +143 -0
  15. package/api/resources/encountersUniversal/types/UniversalEncounterCreate.d.ts +46 -0
  16. package/api/resources/encountersUniversal/types/UniversalEncounterCreate.js +3 -0
  17. package/api/resources/encountersUniversal/types/UniversalEncounterCreateFromPreEncounter.d.ts +44 -0
  18. package/api/resources/encountersUniversal/types/UniversalEncounterCreateFromPreEncounter.js +3 -0
  19. package/api/resources/encountersUniversal/types/UniversalEncounterUpdate.d.ts +36 -0
  20. package/api/resources/encountersUniversal/types/UniversalEncounterUpdate.js +3 -0
  21. package/api/resources/encountersUniversal/types/index.d.ts +3 -0
  22. package/api/resources/encountersUniversal/types/index.js +3 -0
  23. package/api/resources/healthCareCodeInformation/resources/v1/types/AdmittingDiagnosisNew.d.ts +8 -0
  24. package/api/resources/healthCareCodeInformation/resources/v1/types/AdmittingDiagnosisNew.js +3 -0
  25. package/api/resources/healthCareCodeInformation/resources/v1/types/ConditionInformationNew.d.ts +8 -0
  26. package/api/resources/healthCareCodeInformation/resources/v1/types/ConditionInformationNew.js +3 -0
  27. package/api/resources/healthCareCodeInformation/resources/v1/types/DiagnosisRelatedGroupNew.d.ts +8 -0
  28. package/api/resources/healthCareCodeInformation/resources/v1/types/DiagnosisRelatedGroupNew.js +3 -0
  29. package/api/resources/healthCareCodeInformation/resources/v1/types/ExternalCauseOfInjuryNew.d.ts +9 -0
  30. package/api/resources/healthCareCodeInformation/resources/v1/types/ExternalCauseOfInjuryNew.js +3 -0
  31. package/api/resources/healthCareCodeInformation/resources/v1/types/HealthCareCodeInformationCreate.d.ts +27 -0
  32. package/api/resources/healthCareCodeInformation/resources/v1/types/HealthCareCodeInformationCreate.js +3 -0
  33. package/api/resources/healthCareCodeInformation/resources/v1/types/OccurrenceInformationNew.d.ts +15 -0
  34. package/api/resources/healthCareCodeInformation/resources/v1/types/OccurrenceInformationNew.js +3 -0
  35. package/api/resources/healthCareCodeInformation/resources/v1/types/OccurrenceSpanInformationNew.d.ts +9 -0
  36. package/api/resources/healthCareCodeInformation/resources/v1/types/OccurrenceSpanInformationNew.js +3 -0
  37. package/api/resources/healthCareCodeInformation/resources/v1/types/OtherDiagnosisInformationNew.d.ts +9 -0
  38. package/api/resources/healthCareCodeInformation/resources/v1/types/OtherDiagnosisInformationNew.js +3 -0
  39. package/api/resources/healthCareCodeInformation/resources/v1/types/OtherProcedureInformationNew.d.ts +15 -0
  40. package/api/resources/healthCareCodeInformation/resources/v1/types/OtherProcedureInformationNew.js +3 -0
  41. package/api/resources/healthCareCodeInformation/resources/v1/types/PatientReasonForVisitNew.d.ts +8 -0
  42. package/api/resources/healthCareCodeInformation/resources/v1/types/PatientReasonForVisitNew.js +3 -0
  43. package/api/resources/healthCareCodeInformation/resources/v1/types/PrincipalDiagnosisNew.d.ts +9 -0
  44. package/api/resources/healthCareCodeInformation/resources/v1/types/PrincipalDiagnosisNew.js +3 -0
  45. package/api/resources/healthCareCodeInformation/resources/v1/types/PrincipalProcedureInformationNew.d.ts +15 -0
  46. package/api/resources/healthCareCodeInformation/resources/v1/types/PrincipalProcedureInformationNew.js +3 -0
  47. package/api/resources/healthCareCodeInformation/resources/v1/types/TreatmentCodeInformationNew.d.ts +8 -0
  48. package/api/resources/healthCareCodeInformation/resources/v1/types/TreatmentCodeInformationNew.js +3 -0
  49. package/api/resources/healthCareCodeInformation/resources/v1/types/ValueInformationNew.d.ts +9 -0
  50. package/api/resources/healthCareCodeInformation/resources/v1/types/ValueInformationNew.js +3 -0
  51. package/api/resources/healthCareCodeInformation/resources/v1/types/index.d.ts +14 -0
  52. package/api/resources/healthCareCodeInformation/resources/v1/types/index.js +14 -0
  53. package/api/resources/serviceFacility/index.d.ts +0 -1
  54. package/api/resources/serviceFacility/index.js +0 -1
  55. package/api/resources/serviceLines/resources/v2/types/UniversalServiceLineCreate.d.ts +8 -0
  56. package/api/resources/serviceLines/resources/v2/types/UniversalServiceLineCreate.js +3 -0
  57. package/api/resources/serviceLines/resources/v2/types/index.d.ts +1 -0
  58. package/api/resources/serviceLines/resources/v2/types/index.js +1 -0
  59. package/api/resources/x12/resources/v1/types/TypeOfBillCompositeUpdate.d.ts +27 -0
  60. package/api/resources/x12/resources/v1/types/TypeOfBillCompositeUpdate.js +3 -0
  61. package/api/resources/x12/resources/v1/types/index.d.ts +1 -0
  62. package/api/resources/x12/resources/v1/types/index.js +1 -0
  63. package/dist/Client.d.ts +0 -3
  64. package/dist/Client.js +10 -15
  65. package/dist/api/resources/commons/types/ProcedureModifier.d.ts +3 -0
  66. package/dist/api/resources/commons/types/ProcedureModifier.js +3 -0
  67. package/dist/api/resources/encounters/resources/v4/client/Client.d.ts +97 -0
  68. package/dist/api/resources/encounters/resources/v4/client/Client.js +312 -0
  69. package/dist/api/resources/encounters/resources/v4/client/createFromPreEncounterPatientUniversal.d.ts +67 -0
  70. package/dist/api/resources/encounters/resources/v4/client/createFromPreEncounterPatientUniversal.js +143 -0
  71. package/dist/api/resources/encounters/resources/v4/client/createUniversal.d.ts +91 -0
  72. package/dist/api/resources/encounters/resources/v4/client/createUniversal.js +187 -0
  73. package/dist/api/resources/encounters/resources/v4/client/index.d.ts +3 -0
  74. package/dist/api/resources/encounters/resources/v4/client/index.js +4 -1
  75. package/dist/api/resources/encounters/resources/v4/client/updateUniversal.d.ts +67 -0
  76. package/dist/api/resources/encounters/resources/v4/client/updateUniversal.js +143 -0
  77. package/dist/api/resources/encountersUniversal/types/UniversalEncounterCreate.d.ts +46 -0
  78. package/dist/api/resources/encountersUniversal/types/UniversalEncounterCreate.js +3 -0
  79. package/dist/api/resources/encountersUniversal/types/UniversalEncounterCreateFromPreEncounter.d.ts +44 -0
  80. package/dist/api/resources/encountersUniversal/types/UniversalEncounterCreateFromPreEncounter.js +3 -0
  81. package/dist/api/resources/encountersUniversal/types/UniversalEncounterUpdate.d.ts +36 -0
  82. package/dist/api/resources/encountersUniversal/types/UniversalEncounterUpdate.js +3 -0
  83. package/dist/api/resources/encountersUniversal/types/index.d.ts +3 -0
  84. package/dist/api/resources/encountersUniversal/types/index.js +3 -0
  85. package/dist/api/resources/healthCareCodeInformation/resources/v1/types/AdmittingDiagnosisNew.d.ts +8 -0
  86. package/dist/api/resources/healthCareCodeInformation/resources/v1/types/AdmittingDiagnosisNew.js +3 -0
  87. package/dist/api/resources/healthCareCodeInformation/resources/v1/types/ConditionInformationNew.d.ts +8 -0
  88. package/dist/api/resources/healthCareCodeInformation/resources/v1/types/ConditionInformationNew.js +3 -0
  89. package/dist/api/resources/healthCareCodeInformation/resources/v1/types/DiagnosisRelatedGroupNew.d.ts +8 -0
  90. package/dist/api/resources/healthCareCodeInformation/resources/v1/types/DiagnosisRelatedGroupNew.js +3 -0
  91. package/dist/api/resources/healthCareCodeInformation/resources/v1/types/ExternalCauseOfInjuryNew.d.ts +9 -0
  92. package/dist/api/resources/healthCareCodeInformation/resources/v1/types/ExternalCauseOfInjuryNew.js +3 -0
  93. package/dist/api/resources/healthCareCodeInformation/resources/v1/types/HealthCareCodeInformationCreate.d.ts +27 -0
  94. package/dist/api/resources/healthCareCodeInformation/resources/v1/types/HealthCareCodeInformationCreate.js +3 -0
  95. package/dist/api/resources/healthCareCodeInformation/resources/v1/types/OccurrenceInformationNew.d.ts +15 -0
  96. package/dist/api/resources/healthCareCodeInformation/resources/v1/types/OccurrenceInformationNew.js +3 -0
  97. package/dist/api/resources/healthCareCodeInformation/resources/v1/types/OccurrenceSpanInformationNew.d.ts +9 -0
  98. package/dist/api/resources/healthCareCodeInformation/resources/v1/types/OccurrenceSpanInformationNew.js +3 -0
  99. package/dist/api/resources/healthCareCodeInformation/resources/v1/types/OtherDiagnosisInformationNew.d.ts +9 -0
  100. package/dist/api/resources/healthCareCodeInformation/resources/v1/types/OtherDiagnosisInformationNew.js +3 -0
  101. package/dist/api/resources/healthCareCodeInformation/resources/v1/types/OtherProcedureInformationNew.d.ts +15 -0
  102. package/dist/api/resources/healthCareCodeInformation/resources/v1/types/OtherProcedureInformationNew.js +3 -0
  103. package/dist/api/resources/healthCareCodeInformation/resources/v1/types/PatientReasonForVisitNew.d.ts +8 -0
  104. package/dist/api/resources/healthCareCodeInformation/resources/v1/types/PatientReasonForVisitNew.js +3 -0
  105. package/dist/api/resources/healthCareCodeInformation/resources/v1/types/PrincipalDiagnosisNew.d.ts +9 -0
  106. package/dist/api/resources/healthCareCodeInformation/resources/v1/types/PrincipalDiagnosisNew.js +3 -0
  107. package/dist/api/resources/healthCareCodeInformation/resources/v1/types/PrincipalProcedureInformationNew.d.ts +15 -0
  108. package/dist/api/resources/healthCareCodeInformation/resources/v1/types/PrincipalProcedureInformationNew.js +3 -0
  109. package/dist/api/resources/healthCareCodeInformation/resources/v1/types/TreatmentCodeInformationNew.d.ts +8 -0
  110. package/dist/api/resources/healthCareCodeInformation/resources/v1/types/TreatmentCodeInformationNew.js +3 -0
  111. package/dist/api/resources/healthCareCodeInformation/resources/v1/types/ValueInformationNew.d.ts +9 -0
  112. package/dist/api/resources/healthCareCodeInformation/resources/v1/types/ValueInformationNew.js +3 -0
  113. package/dist/api/resources/healthCareCodeInformation/resources/v1/types/index.d.ts +14 -0
  114. package/dist/api/resources/healthCareCodeInformation/resources/v1/types/index.js +14 -0
  115. package/dist/api/resources/serviceFacility/index.d.ts +0 -1
  116. package/dist/api/resources/serviceFacility/index.js +0 -1
  117. package/dist/api/resources/serviceLines/resources/v2/types/UniversalServiceLineCreate.d.ts +8 -0
  118. package/dist/api/resources/serviceLines/resources/v2/types/UniversalServiceLineCreate.js +3 -0
  119. package/dist/api/resources/serviceLines/resources/v2/types/index.d.ts +1 -0
  120. package/dist/api/resources/serviceLines/resources/v2/types/index.js +1 -0
  121. package/dist/api/resources/x12/resources/v1/types/TypeOfBillCompositeUpdate.d.ts +27 -0
  122. package/dist/api/resources/x12/resources/v1/types/TypeOfBillCompositeUpdate.js +3 -0
  123. package/dist/api/resources/x12/resources/v1/types/index.d.ts +1 -0
  124. package/dist/api/resources/x12/resources/v1/types/index.js +1 -0
  125. package/dist/serialization/resources/commons/types/ProcedureModifier.d.ts +1 -1
  126. package/dist/serialization/resources/commons/types/ProcedureModifier.js +1 -0
  127. package/dist/serialization/resources/encounters/resources/v4/client/createFromPreEncounterPatientUniversal.d.ts +46 -0
  128. package/dist/serialization/resources/encounters/resources/v4/client/createFromPreEncounterPatientUniversal.js +110 -0
  129. package/dist/serialization/resources/encounters/resources/v4/client/createUniversal.d.ts +66 -0
  130. package/dist/serialization/resources/encounters/resources/v4/client/createUniversal.js +134 -0
  131. package/dist/serialization/resources/encounters/resources/v4/client/index.d.ts +3 -0
  132. package/dist/serialization/resources/encounters/resources/v4/client/index.js +4 -1
  133. package/dist/serialization/resources/encounters/resources/v4/client/updateUniversal.d.ts +47 -0
  134. package/dist/serialization/resources/encounters/resources/v4/client/updateUniversal.js +111 -0
  135. package/dist/serialization/resources/encountersUniversal/types/UniversalEncounterCreate.d.ts +36 -0
  136. package/dist/serialization/resources/encountersUniversal/types/UniversalEncounterCreate.js +70 -0
  137. package/dist/serialization/resources/encountersUniversal/types/UniversalEncounterCreateFromPreEncounter.d.ts +34 -0
  138. package/dist/serialization/resources/encountersUniversal/types/UniversalEncounterCreateFromPreEncounter.js +68 -0
  139. package/dist/serialization/resources/encountersUniversal/types/UniversalEncounterUpdate.d.ts +29 -0
  140. package/dist/serialization/resources/encountersUniversal/types/UniversalEncounterUpdate.js +63 -0
  141. package/dist/serialization/resources/encountersUniversal/types/index.d.ts +3 -0
  142. package/dist/serialization/resources/encountersUniversal/types/index.js +3 -0
  143. package/dist/serialization/resources/healthCareCodeInformation/resources/v1/types/AdmittingDiagnosisNew.d.ts +13 -0
  144. package/dist/serialization/resources/healthCareCodeInformation/resources/v1/types/AdmittingDiagnosisNew.js +47 -0
  145. package/dist/serialization/resources/healthCareCodeInformation/resources/v1/types/ConditionInformationNew.d.ts +13 -0
  146. package/dist/serialization/resources/healthCareCodeInformation/resources/v1/types/ConditionInformationNew.js +47 -0
  147. package/dist/serialization/resources/healthCareCodeInformation/resources/v1/types/DiagnosisRelatedGroupNew.d.ts +13 -0
  148. package/dist/serialization/resources/healthCareCodeInformation/resources/v1/types/DiagnosisRelatedGroupNew.js +47 -0
  149. package/dist/serialization/resources/healthCareCodeInformation/resources/v1/types/ExternalCauseOfInjuryNew.d.ts +15 -0
  150. package/dist/serialization/resources/healthCareCodeInformation/resources/v1/types/ExternalCauseOfInjuryNew.js +49 -0
  151. package/dist/serialization/resources/healthCareCodeInformation/resources/v1/types/HealthCareCodeInformationCreate.d.ts +34 -0
  152. package/dist/serialization/resources/healthCareCodeInformation/resources/v1/types/HealthCareCodeInformationCreate.js +66 -0
  153. package/dist/serialization/resources/healthCareCodeInformation/resources/v1/types/OccurrenceInformationNew.d.ts +15 -0
  154. package/dist/serialization/resources/healthCareCodeInformation/resources/v1/types/OccurrenceInformationNew.js +49 -0
  155. package/dist/serialization/resources/healthCareCodeInformation/resources/v1/types/OccurrenceSpanInformationNew.d.ts +15 -0
  156. package/dist/serialization/resources/healthCareCodeInformation/resources/v1/types/OccurrenceSpanInformationNew.js +49 -0
  157. package/dist/serialization/resources/healthCareCodeInformation/resources/v1/types/OtherDiagnosisInformationNew.d.ts +15 -0
  158. package/dist/serialization/resources/healthCareCodeInformation/resources/v1/types/OtherDiagnosisInformationNew.js +49 -0
  159. package/dist/serialization/resources/healthCareCodeInformation/resources/v1/types/OtherProcedureInformationNew.d.ts +15 -0
  160. package/dist/serialization/resources/healthCareCodeInformation/resources/v1/types/OtherProcedureInformationNew.js +49 -0
  161. package/dist/serialization/resources/healthCareCodeInformation/resources/v1/types/PatientReasonForVisitNew.d.ts +13 -0
  162. package/dist/serialization/resources/healthCareCodeInformation/resources/v1/types/PatientReasonForVisitNew.js +47 -0
  163. package/dist/serialization/resources/healthCareCodeInformation/resources/v1/types/PrincipalDiagnosisNew.d.ts +15 -0
  164. package/dist/serialization/resources/healthCareCodeInformation/resources/v1/types/PrincipalDiagnosisNew.js +49 -0
  165. package/dist/serialization/resources/healthCareCodeInformation/resources/v1/types/PrincipalProcedureInformationNew.d.ts +15 -0
  166. package/dist/serialization/resources/healthCareCodeInformation/resources/v1/types/PrincipalProcedureInformationNew.js +49 -0
  167. package/dist/serialization/resources/healthCareCodeInformation/resources/v1/types/TreatmentCodeInformationNew.d.ts +13 -0
  168. package/dist/serialization/resources/healthCareCodeInformation/resources/v1/types/TreatmentCodeInformationNew.js +47 -0
  169. package/dist/serialization/resources/healthCareCodeInformation/resources/v1/types/ValueInformationNew.d.ts +15 -0
  170. package/dist/serialization/resources/healthCareCodeInformation/resources/v1/types/ValueInformationNew.js +49 -0
  171. package/dist/serialization/resources/healthCareCodeInformation/resources/v1/types/index.d.ts +14 -0
  172. package/dist/serialization/resources/healthCareCodeInformation/resources/v1/types/index.js +14 -0
  173. package/dist/serialization/resources/serviceLines/resources/v2/types/UniversalServiceLineCreate.d.ts +12 -0
  174. package/dist/{api/resources/serviceFacility/client/index.js → serialization/resources/serviceLines/resources/v2/types/UniversalServiceLineCreate.js} +11 -2
  175. package/dist/serialization/resources/serviceLines/resources/v2/types/index.d.ts +1 -0
  176. package/dist/serialization/resources/serviceLines/resources/v2/types/index.js +1 -0
  177. package/dist/serialization/resources/x12/resources/v1/types/TypeOfBillCompositeUpdate.d.ts +15 -0
  178. package/{api/resources/serviceFacility/client/update.js → dist/serialization/resources/x12/resources/v1/types/TypeOfBillCompositeUpdate.js} +14 -19
  179. package/dist/serialization/resources/x12/resources/v1/types/index.d.ts +1 -0
  180. package/dist/serialization/resources/x12/resources/v1/types/index.js +1 -0
  181. package/dist/version.d.ts +1 -1
  182. package/dist/version.js +1 -1
  183. package/package.json +1 -1
  184. package/reference.md +236 -58
  185. package/serialization/resources/commons/types/ProcedureModifier.d.ts +1 -1
  186. package/serialization/resources/commons/types/ProcedureModifier.js +1 -0
  187. package/serialization/resources/encounters/resources/v4/client/createFromPreEncounterPatientUniversal.d.ts +46 -0
  188. package/serialization/resources/encounters/resources/v4/client/createFromPreEncounterPatientUniversal.js +110 -0
  189. package/serialization/resources/encounters/resources/v4/client/createUniversal.d.ts +66 -0
  190. package/serialization/resources/encounters/resources/v4/client/createUniversal.js +134 -0
  191. package/serialization/resources/encounters/resources/v4/client/index.d.ts +3 -0
  192. package/serialization/resources/encounters/resources/v4/client/index.js +4 -1
  193. package/serialization/resources/encounters/resources/v4/client/updateUniversal.d.ts +47 -0
  194. package/serialization/resources/encounters/resources/v4/client/updateUniversal.js +111 -0
  195. package/serialization/resources/encountersUniversal/types/UniversalEncounterCreate.d.ts +36 -0
  196. package/serialization/resources/encountersUniversal/types/UniversalEncounterCreate.js +70 -0
  197. package/serialization/resources/encountersUniversal/types/UniversalEncounterCreateFromPreEncounter.d.ts +34 -0
  198. package/serialization/resources/encountersUniversal/types/UniversalEncounterCreateFromPreEncounter.js +68 -0
  199. package/serialization/resources/encountersUniversal/types/UniversalEncounterUpdate.d.ts +29 -0
  200. package/serialization/resources/encountersUniversal/types/UniversalEncounterUpdate.js +63 -0
  201. package/serialization/resources/encountersUniversal/types/index.d.ts +3 -0
  202. package/serialization/resources/encountersUniversal/types/index.js +3 -0
  203. package/serialization/resources/healthCareCodeInformation/resources/v1/types/AdmittingDiagnosisNew.d.ts +13 -0
  204. package/serialization/resources/healthCareCodeInformation/resources/v1/types/AdmittingDiagnosisNew.js +47 -0
  205. package/serialization/resources/healthCareCodeInformation/resources/v1/types/ConditionInformationNew.d.ts +13 -0
  206. package/serialization/resources/healthCareCodeInformation/resources/v1/types/ConditionInformationNew.js +47 -0
  207. package/serialization/resources/healthCareCodeInformation/resources/v1/types/DiagnosisRelatedGroupNew.d.ts +13 -0
  208. package/serialization/resources/healthCareCodeInformation/resources/v1/types/DiagnosisRelatedGroupNew.js +47 -0
  209. package/serialization/resources/healthCareCodeInformation/resources/v1/types/ExternalCauseOfInjuryNew.d.ts +15 -0
  210. package/serialization/resources/healthCareCodeInformation/resources/v1/types/ExternalCauseOfInjuryNew.js +49 -0
  211. package/serialization/resources/healthCareCodeInformation/resources/v1/types/HealthCareCodeInformationCreate.d.ts +34 -0
  212. package/serialization/resources/healthCareCodeInformation/resources/v1/types/HealthCareCodeInformationCreate.js +66 -0
  213. package/serialization/resources/healthCareCodeInformation/resources/v1/types/OccurrenceInformationNew.d.ts +15 -0
  214. package/serialization/resources/healthCareCodeInformation/resources/v1/types/OccurrenceInformationNew.js +49 -0
  215. package/serialization/resources/healthCareCodeInformation/resources/v1/types/OccurrenceSpanInformationNew.d.ts +15 -0
  216. package/serialization/resources/healthCareCodeInformation/resources/v1/types/OccurrenceSpanInformationNew.js +49 -0
  217. package/serialization/resources/healthCareCodeInformation/resources/v1/types/OtherDiagnosisInformationNew.d.ts +15 -0
  218. package/serialization/resources/healthCareCodeInformation/resources/v1/types/OtherDiagnosisInformationNew.js +49 -0
  219. package/serialization/resources/healthCareCodeInformation/resources/v1/types/OtherProcedureInformationNew.d.ts +15 -0
  220. package/serialization/resources/healthCareCodeInformation/resources/v1/types/OtherProcedureInformationNew.js +49 -0
  221. package/serialization/resources/healthCareCodeInformation/resources/v1/types/PatientReasonForVisitNew.d.ts +13 -0
  222. package/serialization/resources/healthCareCodeInformation/resources/v1/types/PatientReasonForVisitNew.js +47 -0
  223. package/serialization/resources/healthCareCodeInformation/resources/v1/types/PrincipalDiagnosisNew.d.ts +15 -0
  224. package/serialization/resources/healthCareCodeInformation/resources/v1/types/PrincipalDiagnosisNew.js +49 -0
  225. package/serialization/resources/healthCareCodeInformation/resources/v1/types/PrincipalProcedureInformationNew.d.ts +15 -0
  226. package/serialization/resources/healthCareCodeInformation/resources/v1/types/PrincipalProcedureInformationNew.js +49 -0
  227. package/serialization/resources/healthCareCodeInformation/resources/v1/types/TreatmentCodeInformationNew.d.ts +13 -0
  228. package/serialization/resources/healthCareCodeInformation/resources/v1/types/TreatmentCodeInformationNew.js +47 -0
  229. package/serialization/resources/healthCareCodeInformation/resources/v1/types/ValueInformationNew.d.ts +15 -0
  230. package/serialization/resources/healthCareCodeInformation/resources/v1/types/ValueInformationNew.js +49 -0
  231. package/serialization/resources/healthCareCodeInformation/resources/v1/types/index.d.ts +14 -0
  232. package/serialization/resources/healthCareCodeInformation/resources/v1/types/index.js +14 -0
  233. package/serialization/resources/serviceLines/resources/v2/types/UniversalServiceLineCreate.d.ts +12 -0
  234. package/{api/resources/serviceFacility/client/index.js → serialization/resources/serviceLines/resources/v2/types/UniversalServiceLineCreate.js} +11 -2
  235. package/serialization/resources/serviceLines/resources/v2/types/index.d.ts +1 -0
  236. package/serialization/resources/serviceLines/resources/v2/types/index.js +1 -0
  237. package/serialization/resources/x12/resources/v1/types/TypeOfBillCompositeUpdate.d.ts +15 -0
  238. package/{dist/api/resources/serviceFacility/client/update.js → serialization/resources/x12/resources/v1/types/TypeOfBillCompositeUpdate.js} +14 -19
  239. package/serialization/resources/x12/resources/v1/types/index.d.ts +1 -0
  240. package/serialization/resources/x12/resources/v1/types/index.js +1 -0
  241. package/version.d.ts +1 -1
  242. package/version.js +1 -1
  243. package/api/resources/serviceFacility/client/Client.d.ts +0 -25
  244. package/api/resources/serviceFacility/client/Client.js +0 -119
  245. package/api/resources/serviceFacility/client/index.d.ts +0 -1
  246. package/api/resources/serviceFacility/client/update.d.ts +0 -19
  247. package/dist/api/resources/serviceFacility/client/Client.d.ts +0 -25
  248. package/dist/api/resources/serviceFacility/client/Client.js +0 -119
  249. package/dist/api/resources/serviceFacility/client/index.d.ts +0 -1
  250. package/dist/api/resources/serviceFacility/client/update.d.ts +0 -19
@@ -0,0 +1,27 @@
1
+ import type * as CandidApi from "../../../../../index";
2
+ /**
3
+ * A type of bill can either be seen as a compositio of structured parts, or as a literal string.
4
+ * This union represents the potential to express a type of bill either as one of those two shapes.
5
+ * Passing a string, this update will be seen as a complete 4 digit code, along with a padding code 0, that
6
+ * should match a valid composition.
7
+ * Passing as a structure, the update will be seen as three parts and will be joined together by the server
8
+ * to represent a valid composition for you.
9
+ * Which you use depends upon whether you are "passing through" coded information or making a decision about its
10
+ * structure explicitly.
11
+ */
12
+ export type TypeOfBillCompositeUpdate =
13
+ /**
14
+ * Full 4 digit type of bill code, starting with a leading 0. */
15
+ CandidApi.x12.v1.TypeOfBillCompositeUpdate.RawCode
16
+ /**
17
+ * Use composite_codes to send type_of_care, type_of_facility and frequency_code as separate enums. */
18
+ | CandidApi.x12.v1.TypeOfBillCompositeUpdate.CompositeCodes;
19
+ export declare namespace TypeOfBillCompositeUpdate {
20
+ interface RawCode {
21
+ type: "raw_code";
22
+ value: string;
23
+ }
24
+ interface CompositeCodes extends CandidApi.x12.v1.TypeOfBillCompositeBase {
25
+ type: "composite_codes";
26
+ }
27
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -7,6 +7,7 @@ export * from "./RemittanceAdviceRemarkCode";
7
7
  export * from "./TypeOfAdmissionOrVisitCode";
8
8
  export * from "./TypeOfBillComposite";
9
9
  export * from "./TypeOfBillCompositeBase";
10
+ export * from "./TypeOfBillCompositeUpdate";
10
11
  export * from "./TypeOfBillFrequencyCode";
11
12
  export * from "./TypeOfCareCode";
12
13
  export * from "./TypeOfFacilityCode";
@@ -23,6 +23,7 @@ __exportStar(require("./RemittanceAdviceRemarkCode"), exports);
23
23
  __exportStar(require("./TypeOfAdmissionOrVisitCode"), exports);
24
24
  __exportStar(require("./TypeOfBillComposite"), exports);
25
25
  __exportStar(require("./TypeOfBillCompositeBase"), exports);
26
+ __exportStar(require("./TypeOfBillCompositeUpdate"), exports);
26
27
  __exportStar(require("./TypeOfBillFrequencyCode"), exports);
27
28
  __exportStar(require("./TypeOfCareCode"), exports);
28
29
  __exportStar(require("./TypeOfFacilityCode"), exports);
package/dist/Client.d.ts CHANGED
@@ -33,7 +33,6 @@ import { PatientRefunds } from "./api/resources/patientRefunds/client/Client";
33
33
  import { PayerPlanGroups } from "./api/resources/payerPlanGroups/client/Client";
34
34
  import { Payers } from "./api/resources/payers/client/Client";
35
35
  import { PreEncounter } from "./api/resources/preEncounter/client/Client";
36
- import { ServiceFacility } from "./api/resources/serviceFacility/client/Client";
37
36
  import { ServiceLines } from "./api/resources/serviceLines/client/Client";
38
37
  import { Superbills } from "./api/resources/superbills/client/Client";
39
38
  import { Tasks } from "./api/resources/tasks/client/Client";
@@ -90,7 +89,6 @@ export declare class CandidApiClient {
90
89
  protected _writeOffs: WriteOffs | undefined;
91
90
  protected _preEncounter: PreEncounter | undefined;
92
91
  protected _diagnoses: Diagnoses | undefined;
93
- protected _serviceFacility: ServiceFacility | undefined;
94
92
  constructor(_options: CandidApiClient.Options);
95
93
  get auth(): Auth;
96
94
  get billingNotes(): BillingNotes;
@@ -131,5 +129,4 @@ export declare class CandidApiClient {
131
129
  get writeOffs(): WriteOffs;
132
130
  get preEncounter(): PreEncounter;
133
131
  get diagnoses(): Diagnoses;
134
- get serviceFacility(): ServiceFacility;
135
132
  }
package/dist/Client.js CHANGED
@@ -80,11 +80,10 @@ const Client_33 = require("./api/resources/patientRefunds/client/Client");
80
80
  const Client_34 = require("./api/resources/payerPlanGroups/client/Client");
81
81
  const Client_35 = require("./api/resources/payers/client/Client");
82
82
  const Client_36 = require("./api/resources/preEncounter/client/Client");
83
- const Client_37 = require("./api/resources/serviceFacility/client/Client");
84
- const Client_38 = require("./api/resources/serviceLines/client/Client");
85
- const Client_39 = require("./api/resources/superbills/client/Client");
86
- const Client_40 = require("./api/resources/tasks/client/Client");
87
- const Client_41 = require("./api/resources/writeOffs/client/Client");
83
+ const Client_37 = require("./api/resources/serviceLines/client/Client");
84
+ const Client_38 = require("./api/resources/superbills/client/Client");
85
+ const Client_39 = require("./api/resources/tasks/client/Client");
86
+ const Client_40 = require("./api/resources/writeOffs/client/Client");
88
87
  const core = __importStar(require("./core"));
89
88
  const headers_1 = require("./core/headers");
90
89
  class CandidApiClient {
@@ -92,8 +91,8 @@ class CandidApiClient {
92
91
  this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_1.mergeHeaders)({
93
92
  "X-Fern-Language": "JavaScript",
94
93
  "X-Fern-SDK-Name": "candidhealth",
95
- "X-Fern-SDK-Version": "1.13.0",
96
- "User-Agent": "candidhealth/1.13.0",
94
+ "X-Fern-SDK-Version": "1.14.0",
95
+ "User-Agent": "candidhealth/1.14.0",
97
96
  "X-Fern-Runtime": core.RUNTIME.type,
98
97
  "X-Fern-Runtime-Version": core.RUNTIME.version,
99
98
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -237,19 +236,19 @@ class CandidApiClient {
237
236
  }
238
237
  get serviceLines() {
239
238
  var _a;
240
- return ((_a = this._serviceLines) !== null && _a !== void 0 ? _a : (this._serviceLines = new Client_38.ServiceLines(Object.assign(Object.assign({}, this._options), { token: () => __awaiter(this, void 0, void 0, function* () { return yield this._oauthTokenProvider.getToken(); }) }))));
239
+ return ((_a = this._serviceLines) !== null && _a !== void 0 ? _a : (this._serviceLines = new Client_37.ServiceLines(Object.assign(Object.assign({}, this._options), { token: () => __awaiter(this, void 0, void 0, function* () { return yield this._oauthTokenProvider.getToken(); }) }))));
241
240
  }
242
241
  get superbills() {
243
242
  var _a;
244
- return ((_a = this._superbills) !== null && _a !== void 0 ? _a : (this._superbills = new Client_39.Superbills(Object.assign(Object.assign({}, this._options), { token: () => __awaiter(this, void 0, void 0, function* () { return yield this._oauthTokenProvider.getToken(); }) }))));
243
+ return ((_a = this._superbills) !== null && _a !== void 0 ? _a : (this._superbills = new Client_38.Superbills(Object.assign(Object.assign({}, this._options), { token: () => __awaiter(this, void 0, void 0, function* () { return yield this._oauthTokenProvider.getToken(); }) }))));
245
244
  }
246
245
  get tasks() {
247
246
  var _a;
248
- return ((_a = this._tasks) !== null && _a !== void 0 ? _a : (this._tasks = new Client_40.Tasks(Object.assign(Object.assign({}, this._options), { token: () => __awaiter(this, void 0, void 0, function* () { return yield this._oauthTokenProvider.getToken(); }) }))));
247
+ return ((_a = this._tasks) !== null && _a !== void 0 ? _a : (this._tasks = new Client_39.Tasks(Object.assign(Object.assign({}, this._options), { token: () => __awaiter(this, void 0, void 0, function* () { return yield this._oauthTokenProvider.getToken(); }) }))));
249
248
  }
250
249
  get writeOffs() {
251
250
  var _a;
252
- return ((_a = this._writeOffs) !== null && _a !== void 0 ? _a : (this._writeOffs = new Client_41.WriteOffs(Object.assign(Object.assign({}, this._options), { token: () => __awaiter(this, void 0, void 0, function* () { return yield this._oauthTokenProvider.getToken(); }) }))));
251
+ return ((_a = this._writeOffs) !== null && _a !== void 0 ? _a : (this._writeOffs = new Client_40.WriteOffs(Object.assign(Object.assign({}, this._options), { token: () => __awaiter(this, void 0, void 0, function* () { return yield this._oauthTokenProvider.getToken(); }) }))));
253
252
  }
254
253
  get preEncounter() {
255
254
  var _a;
@@ -259,9 +258,5 @@ class CandidApiClient {
259
258
  var _a;
260
259
  return ((_a = this._diagnoses) !== null && _a !== void 0 ? _a : (this._diagnoses = new Client_9.Diagnoses(Object.assign(Object.assign({}, this._options), { token: () => __awaiter(this, void 0, void 0, function* () { return yield this._oauthTokenProvider.getToken(); }) }))));
261
260
  }
262
- get serviceFacility() {
263
- var _a;
264
- return ((_a = this._serviceFacility) !== null && _a !== void 0 ? _a : (this._serviceFacility = new Client_37.ServiceFacility(Object.assign(Object.assign({}, this._options), { token: () => __awaiter(this, void 0, void 0, function* () { return yield this._oauthTokenProvider.getToken(); }) }))));
265
- }
266
261
  }
267
262
  exports.CandidApiClient = CandidApiClient;
@@ -334,6 +334,9 @@ export declare const ProcedureModifier: {
334
334
  /**
335
335
  * Emergency services */
336
336
  readonly Et: "ET";
337
+ /**
338
+ * Electronic visit verification */
339
+ readonly Ev: "EV";
337
340
  /**
338
341
  * Expatriate beneficiary */
339
342
  readonly Ex: "EX";
@@ -338,6 +338,9 @@ exports.ProcedureModifier = {
338
338
  /**
339
339
  * Emergency services */
340
340
  Et: "ET",
341
+ /**
342
+ * Electronic visit verification */
343
+ Ev: "EV",
341
344
  /**
342
345
  * Expatriate beneficiary */
343
346
  Ex: "EX",
@@ -40,6 +40,47 @@ export declare class V4 {
40
40
  */
41
41
  get(encounterId: CandidApi.EncounterId, requestOptions?: V4.RequestOptions): core.HttpResponsePromise<core.APIResponse<CandidApi.encounters.v4.Encounter, CandidApi.encounters.v4.get.Error>>;
42
42
  private __get;
43
+ /**
44
+ * @param {CandidApi.encountersUniversal.UniversalEncounterCreate} request
45
+ * @param {V4.RequestOptions} requestOptions - Request-specific configuration.
46
+ *
47
+ * @example
48
+ * await client.encounters.v4.createUniversal({
49
+ * billingProvider: {
50
+ * address: {
51
+ * zipPlusFourCode: "zip_plus_four_code",
52
+ * address1: "address1",
53
+ * city: "city",
54
+ * state: "AA",
55
+ * zipCode: "zip_code"
56
+ * },
57
+ * taxId: "tax_id",
58
+ * npi: "npi"
59
+ * },
60
+ * submissionExpectation: "TARGET_PROFESSIONAL",
61
+ * patient: {
62
+ * externalId: "external_id",
63
+ * dateOfBirth: "2023-01-15",
64
+ * address: {
65
+ * address1: "address1",
66
+ * city: "city",
67
+ * state: "AA",
68
+ * zipCode: "zip_code"
69
+ * },
70
+ * firstName: "first_name",
71
+ * lastName: "last_name",
72
+ * gender: "male"
73
+ * },
74
+ * responsibleParty: "INSURANCE_PAY",
75
+ * externalId: CandidApi.EncounterExternalId("external_id"),
76
+ * patientAuthorizedRelease: true,
77
+ * benefitsAssignedToProvider: true,
78
+ * providerAcceptsAssignment: true,
79
+ * billableStatus: "BILLABLE"
80
+ * })
81
+ */
82
+ createUniversal(request: CandidApi.encountersUniversal.UniversalEncounterCreate, requestOptions?: V4.RequestOptions): core.HttpResponsePromise<core.APIResponse<CandidApi.encounters.v4.Encounter, CandidApi.encounters.v4.createUniversal.Error>>;
83
+ private __createUniversal;
43
84
  /**
44
85
  * @param {CandidApi.encounters.v4.EncounterCreate} request
45
86
  * @param {V4.RequestOptions} requestOptions - Request-specific configuration.
@@ -91,6 +132,52 @@ export declare class V4 {
91
132
  */
92
133
  create(request: CandidApi.encounters.v4.EncounterCreate, requestOptions?: V4.RequestOptions): core.HttpResponsePromise<core.APIResponse<CandidApi.encounters.v4.Encounter, CandidApi.encounters.v4.create.Error>>;
93
134
  private __create;
135
+ /**
136
+ * Create an encounter from a pre-encounter patient and appointment. This endpoint is intended to be used by consumers who are managing
137
+ * patients and appointments in the pre-encounter service and is currently under development. Consumers who are not taking advantage
138
+ * of the pre-encounter service should use the standard create endpoint.
139
+ *
140
+ * The endpoint will create an encounter from the provided fields, pulling information from the provided patient and appointment objects
141
+ * where applicable. In particular, the following fields are populated from the patient and appointment objects:
142
+ * - Patient
143
+ * - Referring Provider
144
+ * - Subscriber Primary
145
+ * - Subscriber Secondary
146
+ * - Referral Number
147
+ * - Responsible Party
148
+ * - Guarantor
149
+ *
150
+ * Utilizing this endpoint opts you into automatic updating of the encounter when the patient or appointment is updated, assuming the
151
+ * encounter has not already been submitted or adjudicated.
152
+ *
153
+ * @param {CandidApi.encountersUniversal.UniversalEncounterCreateFromPreEncounter} request
154
+ * @param {V4.RequestOptions} requestOptions - Request-specific configuration.
155
+ *
156
+ * @example
157
+ * await client.encounters.v4.createFromPreEncounterPatientUniversal({
158
+ * submissionExpectation: "TARGET_PROFESSIONAL",
159
+ * preEncounterPatientId: CandidApi.PreEncounterPatientId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"),
160
+ * preEncounterAppointmentIds: [CandidApi.PreEncounterAppointmentId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), CandidApi.PreEncounterAppointmentId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")],
161
+ * billingProvider: {
162
+ * address: {
163
+ * zipPlusFourCode: "zip_plus_four_code",
164
+ * address1: "address1",
165
+ * city: "city",
166
+ * state: "AA",
167
+ * zipCode: "zip_code"
168
+ * },
169
+ * taxId: "tax_id",
170
+ * npi: "npi"
171
+ * },
172
+ * externalId: CandidApi.EncounterExternalId("external_id"),
173
+ * patientAuthorizedRelease: true,
174
+ * benefitsAssignedToProvider: true,
175
+ * providerAcceptsAssignment: true,
176
+ * billableStatus: "BILLABLE"
177
+ * })
178
+ */
179
+ createFromPreEncounterPatientUniversal(request: CandidApi.encountersUniversal.UniversalEncounterCreateFromPreEncounter, requestOptions?: V4.RequestOptions): core.HttpResponsePromise<core.APIResponse<CandidApi.encounters.v4.Encounter, CandidApi.encounters.v4.createFromPreEncounterPatientUniversal.Error>>;
180
+ private __createFromPreEncounterPatientUniversal;
94
181
  /**
95
182
  * Create an encounter from a pre-encounter patient and appointment. This endpoint is intended to be used by consumers who are managing
96
183
  * patients and appointments in the pre-encounter service and is currently under development. Consumers who are not taking advantage
@@ -147,6 +234,16 @@ export declare class V4 {
147
234
  */
148
235
  createFromPreEncounterPatient(request: CandidApi.encounters.v4.EncounterCreateFromPreEncounter, requestOptions?: V4.RequestOptions): core.HttpResponsePromise<core.APIResponse<CandidApi.encounters.v4.Encounter, CandidApi.encounters.v4.createFromPreEncounterPatient.Error>>;
149
236
  private __createFromPreEncounterPatient;
237
+ /**
238
+ * @param {CandidApi.EncounterId} encounterId
239
+ * @param {CandidApi.encountersUniversal.UniversalEncounterUpdate} request
240
+ * @param {V4.RequestOptions} requestOptions - Request-specific configuration.
241
+ *
242
+ * @example
243
+ * await client.encounters.v4.updateUniversal(CandidApi.EncounterId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), {})
244
+ */
245
+ updateUniversal(encounterId: CandidApi.EncounterId, request: CandidApi.encountersUniversal.UniversalEncounterUpdate, requestOptions?: V4.RequestOptions): core.HttpResponsePromise<core.APIResponse<CandidApi.encounters.v4.Encounter, CandidApi.encounters.v4.updateUniversal.Error>>;
246
+ private __updateUniversal;
150
247
  /**
151
248
  * @param {CandidApi.EncounterId} encounterId
152
249
  * @param {CandidApi.encounters.v4.EncounterUpdate} request
@@ -223,6 +223,121 @@ class V4 {
223
223
  };
224
224
  });
225
225
  }
226
+ /**
227
+ * @param {CandidApi.encountersUniversal.UniversalEncounterCreate} request
228
+ * @param {V4.RequestOptions} requestOptions - Request-specific configuration.
229
+ *
230
+ * @example
231
+ * await client.encounters.v4.createUniversal({
232
+ * billingProvider: {
233
+ * address: {
234
+ * zipPlusFourCode: "zip_plus_four_code",
235
+ * address1: "address1",
236
+ * city: "city",
237
+ * state: "AA",
238
+ * zipCode: "zip_code"
239
+ * },
240
+ * taxId: "tax_id",
241
+ * npi: "npi"
242
+ * },
243
+ * submissionExpectation: "TARGET_PROFESSIONAL",
244
+ * patient: {
245
+ * externalId: "external_id",
246
+ * dateOfBirth: "2023-01-15",
247
+ * address: {
248
+ * address1: "address1",
249
+ * city: "city",
250
+ * state: "AA",
251
+ * zipCode: "zip_code"
252
+ * },
253
+ * firstName: "first_name",
254
+ * lastName: "last_name",
255
+ * gender: "male"
256
+ * },
257
+ * responsibleParty: "INSURANCE_PAY",
258
+ * externalId: CandidApi.EncounterExternalId("external_id"),
259
+ * patientAuthorizedRelease: true,
260
+ * benefitsAssignedToProvider: true,
261
+ * providerAcceptsAssignment: true,
262
+ * billableStatus: "BILLABLE"
263
+ * })
264
+ */
265
+ createUniversal(request, requestOptions) {
266
+ return core.HttpResponsePromise.fromPromise(this.__createUniversal(request, requestOptions));
267
+ }
268
+ __createUniversal(request, requestOptions) {
269
+ return __awaiter(this, void 0, void 0, function* () {
270
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
271
+ const _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
272
+ const _response = yield core.fetcher({
273
+ url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CandidApiEnvironment.Production).candidApi, "/api/encounters/v4/universal"),
274
+ method: "POST",
275
+ headers: _headers,
276
+ contentType: "application/json",
277
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
278
+ requestType: "json",
279
+ body: serializers.encountersUniversal.UniversalEncounterCreate.jsonOrThrow(request, {
280
+ unrecognizedObjectKeys: "strip",
281
+ }),
282
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
283
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
284
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
285
+ });
286
+ if (_response.ok) {
287
+ return {
288
+ data: {
289
+ ok: true,
290
+ body: serializers.encounters.v4.Encounter.parseOrThrow(_response.body, {
291
+ unrecognizedObjectKeys: "passthrough",
292
+ allowUnrecognizedUnionMembers: true,
293
+ allowUnrecognizedEnumValues: true,
294
+ breadcrumbsPrefix: ["response"],
295
+ }),
296
+ headers: _response.headers,
297
+ rawResponse: _response.rawResponse,
298
+ },
299
+ rawResponse: _response.rawResponse,
300
+ };
301
+ }
302
+ if (_response.error.reason === "status-code") {
303
+ switch ((_j = _response.error.body) === null || _j === void 0 ? void 0 : _j.errorName) {
304
+ case "EncounterExternalIdUniquenessError":
305
+ case "EncounterPatientControlNumberUniquenessError":
306
+ case "EntityNotFoundError":
307
+ case "UnauthorizedError":
308
+ case "EncounterGuarantorMissingContactInfoError":
309
+ case "HttpRequestValidationsError":
310
+ case "CashPayPayerError":
311
+ case "SchemaInstanceValidationHttpFailure":
312
+ case "InvalidTagNamesError":
313
+ case "HttpRequestValidationError":
314
+ case "PayerPlanGroupPayerDoesNotMatchInsuranceCardHttpError":
315
+ case "EncounterRenderingOrAttendingProviderRequired":
316
+ return {
317
+ data: {
318
+ ok: false,
319
+ error: serializers.encounters.v4.createUniversal.Error.parseOrThrow(_response.error.body, {
320
+ unrecognizedObjectKeys: "passthrough",
321
+ allowUnrecognizedUnionMembers: true,
322
+ allowUnrecognizedEnumValues: true,
323
+ breadcrumbsPrefix: ["response"],
324
+ }),
325
+ rawResponse: _response.rawResponse,
326
+ },
327
+ rawResponse: _response.rawResponse,
328
+ };
329
+ }
330
+ }
331
+ return {
332
+ data: {
333
+ ok: false,
334
+ error: CandidApi.encounters.v4.createUniversal.Error._unknown(_response.error),
335
+ rawResponse: _response.rawResponse,
336
+ },
337
+ rawResponse: _response.rawResponse,
338
+ };
339
+ });
340
+ }
226
341
  /**
227
342
  * @param {CandidApi.encounters.v4.EncounterCreate} request
228
343
  * @param {V4.RequestOptions} requestOptions - Request-specific configuration.
@@ -346,6 +461,123 @@ class V4 {
346
461
  };
347
462
  });
348
463
  }
464
+ /**
465
+ * Create an encounter from a pre-encounter patient and appointment. This endpoint is intended to be used by consumers who are managing
466
+ * patients and appointments in the pre-encounter service and is currently under development. Consumers who are not taking advantage
467
+ * of the pre-encounter service should use the standard create endpoint.
468
+ *
469
+ * The endpoint will create an encounter from the provided fields, pulling information from the provided patient and appointment objects
470
+ * where applicable. In particular, the following fields are populated from the patient and appointment objects:
471
+ * - Patient
472
+ * - Referring Provider
473
+ * - Subscriber Primary
474
+ * - Subscriber Secondary
475
+ * - Referral Number
476
+ * - Responsible Party
477
+ * - Guarantor
478
+ *
479
+ * Utilizing this endpoint opts you into automatic updating of the encounter when the patient or appointment is updated, assuming the
480
+ * encounter has not already been submitted or adjudicated.
481
+ *
482
+ * @param {CandidApi.encountersUniversal.UniversalEncounterCreateFromPreEncounter} request
483
+ * @param {V4.RequestOptions} requestOptions - Request-specific configuration.
484
+ *
485
+ * @example
486
+ * await client.encounters.v4.createFromPreEncounterPatientUniversal({
487
+ * submissionExpectation: "TARGET_PROFESSIONAL",
488
+ * preEncounterPatientId: CandidApi.PreEncounterPatientId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"),
489
+ * preEncounterAppointmentIds: [CandidApi.PreEncounterAppointmentId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), CandidApi.PreEncounterAppointmentId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32")],
490
+ * billingProvider: {
491
+ * address: {
492
+ * zipPlusFourCode: "zip_plus_four_code",
493
+ * address1: "address1",
494
+ * city: "city",
495
+ * state: "AA",
496
+ * zipCode: "zip_code"
497
+ * },
498
+ * taxId: "tax_id",
499
+ * npi: "npi"
500
+ * },
501
+ * externalId: CandidApi.EncounterExternalId("external_id"),
502
+ * patientAuthorizedRelease: true,
503
+ * benefitsAssignedToProvider: true,
504
+ * providerAcceptsAssignment: true,
505
+ * billableStatus: "BILLABLE"
506
+ * })
507
+ */
508
+ createFromPreEncounterPatientUniversal(request, requestOptions) {
509
+ return core.HttpResponsePromise.fromPromise(this.__createFromPreEncounterPatientUniversal(request, requestOptions));
510
+ }
511
+ __createFromPreEncounterPatientUniversal(request, requestOptions) {
512
+ return __awaiter(this, void 0, void 0, function* () {
513
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
514
+ const _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
515
+ const _response = yield core.fetcher({
516
+ url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CandidApiEnvironment.Production).candidApi, "/api/encounters/v4/create-from-pre-encounter/universal"),
517
+ method: "POST",
518
+ headers: _headers,
519
+ contentType: "application/json",
520
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
521
+ requestType: "json",
522
+ body: serializers.encountersUniversal.UniversalEncounterCreateFromPreEncounter.jsonOrThrow(request, {
523
+ unrecognizedObjectKeys: "strip",
524
+ }),
525
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
526
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
527
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
528
+ });
529
+ if (_response.ok) {
530
+ return {
531
+ data: {
532
+ ok: true,
533
+ body: serializers.encounters.v4.Encounter.parseOrThrow(_response.body, {
534
+ unrecognizedObjectKeys: "passthrough",
535
+ allowUnrecognizedUnionMembers: true,
536
+ allowUnrecognizedEnumValues: true,
537
+ breadcrumbsPrefix: ["response"],
538
+ }),
539
+ headers: _response.headers,
540
+ rawResponse: _response.rawResponse,
541
+ },
542
+ rawResponse: _response.rawResponse,
543
+ };
544
+ }
545
+ if (_response.error.reason === "status-code") {
546
+ switch ((_j = _response.error.body) === null || _j === void 0 ? void 0 : _j.errorName) {
547
+ case "EncounterExternalIdUniquenessError":
548
+ case "EncounterPatientControlNumberUniquenessError":
549
+ case "EntityNotFoundError":
550
+ case "UnauthorizedError":
551
+ case "HttpRequestValidationsError":
552
+ case "SchemaInstanceValidationHttpFailure":
553
+ case "HttpRequestValidationError":
554
+ case "PayerPlanGroupPayerDoesNotMatchInsuranceCardHttpError":
555
+ return {
556
+ data: {
557
+ ok: false,
558
+ error: serializers.encounters.v4.createFromPreEncounterPatientUniversal.Error.parseOrThrow(_response.error
559
+ .body, {
560
+ unrecognizedObjectKeys: "passthrough",
561
+ allowUnrecognizedUnionMembers: true,
562
+ allowUnrecognizedEnumValues: true,
563
+ breadcrumbsPrefix: ["response"],
564
+ }),
565
+ rawResponse: _response.rawResponse,
566
+ },
567
+ rawResponse: _response.rawResponse,
568
+ };
569
+ }
570
+ }
571
+ return {
572
+ data: {
573
+ ok: false,
574
+ error: CandidApi.encounters.v4.createFromPreEncounterPatientUniversal.Error._unknown(_response.error),
575
+ rawResponse: _response.rawResponse,
576
+ },
577
+ rawResponse: _response.rawResponse,
578
+ };
579
+ });
580
+ }
349
581
  /**
350
582
  * Create an encounter from a pre-encounter patient and appointment. This endpoint is intended to be used by consumers who are managing
351
583
  * patients and appointments in the pre-encounter service and is currently under development. Consumers who are not taking advantage
@@ -473,6 +705,86 @@ class V4 {
473
705
  };
474
706
  });
475
707
  }
708
+ /**
709
+ * @param {CandidApi.EncounterId} encounterId
710
+ * @param {CandidApi.encountersUniversal.UniversalEncounterUpdate} request
711
+ * @param {V4.RequestOptions} requestOptions - Request-specific configuration.
712
+ *
713
+ * @example
714
+ * await client.encounters.v4.updateUniversal(CandidApi.EncounterId("d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"), {})
715
+ */
716
+ updateUniversal(encounterId, request, requestOptions) {
717
+ return core.HttpResponsePromise.fromPromise(this.__updateUniversal(encounterId, request, requestOptions));
718
+ }
719
+ __updateUniversal(encounterId, request, requestOptions) {
720
+ return __awaiter(this, void 0, void 0, function* () {
721
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
722
+ const _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
723
+ const _response = yield core.fetcher({
724
+ url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CandidApiEnvironment.Production).candidApi, `/api/encounters/v4/${core.url.encodePathParam(serializers.EncounterId.jsonOrThrow(encounterId))}/universal`),
725
+ method: "PATCH",
726
+ headers: _headers,
727
+ contentType: "application/json",
728
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
729
+ requestType: "json",
730
+ body: serializers.encountersUniversal.UniversalEncounterUpdate.jsonOrThrow(request, {
731
+ unrecognizedObjectKeys: "strip",
732
+ }),
733
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
734
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
735
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
736
+ });
737
+ if (_response.ok) {
738
+ return {
739
+ data: {
740
+ ok: true,
741
+ body: serializers.encounters.v4.Encounter.parseOrThrow(_response.body, {
742
+ unrecognizedObjectKeys: "passthrough",
743
+ allowUnrecognizedUnionMembers: true,
744
+ allowUnrecognizedEnumValues: true,
745
+ breadcrumbsPrefix: ["response"],
746
+ }),
747
+ headers: _response.headers,
748
+ rawResponse: _response.rawResponse,
749
+ },
750
+ rawResponse: _response.rawResponse,
751
+ };
752
+ }
753
+ if (_response.error.reason === "status-code") {
754
+ switch ((_j = _response.error.body) === null || _j === void 0 ? void 0 : _j.errorName) {
755
+ case "EncounterExternalIdUniquenessError":
756
+ case "EntityNotFoundError":
757
+ case "UnauthorizedError":
758
+ case "HttpRequestValidationsError":
759
+ case "SchemaInstanceValidationHttpFailure":
760
+ case "UnprocessableEntityError":
761
+ case "InvalidTagNamesError":
762
+ case "PayerPlanGroupPayerDoesNotMatchInsuranceCardHttpError":
763
+ return {
764
+ data: {
765
+ ok: false,
766
+ error: serializers.encounters.v4.updateUniversal.Error.parseOrThrow(_response.error.body, {
767
+ unrecognizedObjectKeys: "passthrough",
768
+ allowUnrecognizedUnionMembers: true,
769
+ allowUnrecognizedEnumValues: true,
770
+ breadcrumbsPrefix: ["response"],
771
+ }),
772
+ rawResponse: _response.rawResponse,
773
+ },
774
+ rawResponse: _response.rawResponse,
775
+ };
776
+ }
777
+ }
778
+ return {
779
+ data: {
780
+ ok: false,
781
+ error: CandidApi.encounters.v4.updateUniversal.Error._unknown(_response.error),
782
+ rawResponse: _response.rawResponse,
783
+ },
784
+ rawResponse: _response.rawResponse,
785
+ };
786
+ });
787
+ }
476
788
  /**
477
789
  * @param {CandidApi.EncounterId} encounterId
478
790
  * @param {CandidApi.encounters.v4.EncounterUpdate} request