@medplum/core 0.2.1 → 0.4.1

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 (660) hide show
  1. package/README.md +32 -26
  2. package/dist/cjs/index.js +1818 -0
  3. package/dist/cjs/index.js.map +1 -0
  4. package/dist/cjs/index.min.js +16 -0
  5. package/dist/cjs/index.min.js.map +1 -0
  6. package/dist/esm/index.js +1769 -0
  7. package/dist/esm/index.js.map +1 -0
  8. package/dist/esm/index.min.js +16 -0
  9. package/dist/esm/index.min.js.map +1 -0
  10. package/dist/{cache.d.ts → types/cache.d.ts} +2 -3
  11. package/dist/types/client.d.ts +230 -0
  12. package/dist/{crypto.d.ts → types/crypto.d.ts} +0 -0
  13. package/dist/{eventtarget.d.ts → types/eventtarget.d.ts} +3 -3
  14. package/dist/{format.d.ts → types/format.d.ts} +1 -1
  15. package/dist/{index.d.ts → types/index.d.ts} +0 -2
  16. package/dist/types/jwt.d.ts +5 -0
  17. package/dist/{outcomes.d.ts → types/outcomes.d.ts} +7 -2
  18. package/dist/{search.d.ts → types/search.d.ts} +4 -0
  19. package/dist/{searchparams.d.ts → types/searchparams.d.ts} +1 -1
  20. package/dist/{storage.d.ts → types/storage.d.ts} +2 -2
  21. package/dist/{types.d.ts → types/types.d.ts} +18 -4
  22. package/dist/{utils.d.ts → types/utils.d.ts} +7 -1
  23. package/package.json +14 -9
  24. package/dist/cache.js +0 -36
  25. package/dist/cache.js.map +0 -1
  26. package/dist/client.d.ts +0 -233
  27. package/dist/client.js +0 -541
  28. package/dist/client.js.map +0 -1
  29. package/dist/crypto.js +0 -33
  30. package/dist/crypto.js.map +0 -1
  31. package/dist/eventtarget.js +0 -38
  32. package/dist/eventtarget.js.map +0 -1
  33. package/dist/fhir/AccessPolicy.d.ts +0 -75
  34. package/dist/fhir/AccessPolicy.js +0 -7
  35. package/dist/fhir/AccessPolicy.js.map +0 -1
  36. package/dist/fhir/Account.d.ts +0 -247
  37. package/dist/fhir/Account.js +0 -7
  38. package/dist/fhir/Account.js.map +0 -1
  39. package/dist/fhir/ActivityDefinition.d.ts +0 -500
  40. package/dist/fhir/ActivityDefinition.js +0 -7
  41. package/dist/fhir/ActivityDefinition.js.map +0 -1
  42. package/dist/fhir/Address.d.ts +0 -75
  43. package/dist/fhir/Address.js +0 -7
  44. package/dist/fhir/Address.js.map +0 -1
  45. package/dist/fhir/AdverseEvent.d.ts +0 -303
  46. package/dist/fhir/AdverseEvent.js +0 -7
  47. package/dist/fhir/AdverseEvent.js.map +0 -1
  48. package/dist/fhir/Age.d.ts +0 -47
  49. package/dist/fhir/Age.js +0 -7
  50. package/dist/fhir/Age.js.map +0 -1
  51. package/dist/fhir/AllergyIntolerance.d.ts +0 -283
  52. package/dist/fhir/AllergyIntolerance.js +0 -7
  53. package/dist/fhir/AllergyIntolerance.js.map +0 -1
  54. package/dist/fhir/Annotation.d.ts +0 -42
  55. package/dist/fhir/Annotation.js +0 -7
  56. package/dist/fhir/Annotation.js.map +0 -1
  57. package/dist/fhir/Appointment.d.ts +0 -284
  58. package/dist/fhir/Appointment.js +0 -7
  59. package/dist/fhir/Appointment.js.map +0 -1
  60. package/dist/fhir/AppointmentResponse.d.ts +0 -131
  61. package/dist/fhir/AppointmentResponse.js +0 -7
  62. package/dist/fhir/AppointmentResponse.js.map +0 -1
  63. package/dist/fhir/Attachment.d.ts +0 -58
  64. package/dist/fhir/Attachment.js +0 -7
  65. package/dist/fhir/Attachment.js.map +0 -1
  66. package/dist/fhir/AuditEvent.d.ts +0 -458
  67. package/dist/fhir/AuditEvent.js +0 -7
  68. package/dist/fhir/AuditEvent.js.map +0 -1
  69. package/dist/fhir/Basic.d.ts +0 -110
  70. package/dist/fhir/Basic.js +0 -7
  71. package/dist/fhir/Basic.js.map +0 -1
  72. package/dist/fhir/Binary.d.ts +0 -59
  73. package/dist/fhir/Binary.js +0 -7
  74. package/dist/fhir/Binary.js.map +0 -1
  75. package/dist/fhir/BiologicallyDerivedProduct.d.ts +0 -358
  76. package/dist/fhir/BiologicallyDerivedProduct.js +0 -7
  77. package/dist/fhir/BiologicallyDerivedProduct.js.map +0 -1
  78. package/dist/fhir/BodyStructure.d.ts +0 -119
  79. package/dist/fhir/BodyStructure.js +0 -7
  80. package/dist/fhir/BodyStructure.js.map +0 -1
  81. package/dist/fhir/Bot.d.ts +0 -49
  82. package/dist/fhir/Bot.js +0 -7
  83. package/dist/fhir/Bot.js.map +0 -1
  84. package/dist/fhir/Bundle.d.ts +0 -379
  85. package/dist/fhir/Bundle.js +0 -7
  86. package/dist/fhir/Bundle.js.map +0 -1
  87. package/dist/fhir/CapabilityStatement.d.ts +0 -1044
  88. package/dist/fhir/CapabilityStatement.js +0 -7
  89. package/dist/fhir/CapabilityStatement.js.map +0 -1
  90. package/dist/fhir/CarePlan.d.ts +0 -446
  91. package/dist/fhir/CarePlan.js +0 -7
  92. package/dist/fhir/CarePlan.js.map +0 -1
  93. package/dist/fhir/CareTeam.d.ts +0 -211
  94. package/dist/fhir/CareTeam.js +0 -7
  95. package/dist/fhir/CareTeam.js.map +0 -1
  96. package/dist/fhir/CatalogEntry.d.ts +0 -195
  97. package/dist/fhir/CatalogEntry.js +0 -7
  98. package/dist/fhir/CatalogEntry.js.map +0 -1
  99. package/dist/fhir/ChargeItem.d.ts +0 -287
  100. package/dist/fhir/ChargeItem.js +0 -7
  101. package/dist/fhir/ChargeItem.js.map +0 -1
  102. package/dist/fhir/ChargeItemDefinition.d.ts +0 -401
  103. package/dist/fhir/ChargeItemDefinition.js +0 -7
  104. package/dist/fhir/ChargeItemDefinition.js.map +0 -1
  105. package/dist/fhir/Claim.d.ts +0 -1092
  106. package/dist/fhir/Claim.js +0 -7
  107. package/dist/fhir/Claim.js.map +0 -1
  108. package/dist/fhir/ClaimResponse.d.ts +0 -1040
  109. package/dist/fhir/ClaimResponse.js +0 -7
  110. package/dist/fhir/ClaimResponse.js.map +0 -1
  111. package/dist/fhir/ClientApplication.d.ts +0 -46
  112. package/dist/fhir/ClientApplication.js +0 -7
  113. package/dist/fhir/ClientApplication.js.map +0 -1
  114. package/dist/fhir/ClinicalImpression.d.ts +0 -306
  115. package/dist/fhir/ClinicalImpression.js +0 -7
  116. package/dist/fhir/ClinicalImpression.js.map +0 -1
  117. package/dist/fhir/CodeSystem.d.ts +0 -541
  118. package/dist/fhir/CodeSystem.js +0 -7
  119. package/dist/fhir/CodeSystem.js.map +0 -1
  120. package/dist/fhir/CodeableConcept.d.ts +0 -33
  121. package/dist/fhir/CodeableConcept.js +0 -7
  122. package/dist/fhir/CodeableConcept.js.map +0 -1
  123. package/dist/fhir/Coding.d.ts +0 -50
  124. package/dist/fhir/Coding.js +0 -7
  125. package/dist/fhir/Coding.js.map +0 -1
  126. package/dist/fhir/Communication.d.ts +0 -264
  127. package/dist/fhir/Communication.js +0 -7
  128. package/dist/fhir/Communication.js.map +0 -1
  129. package/dist/fhir/CommunicationRequest.d.ts +0 -261
  130. package/dist/fhir/CommunicationRequest.js +0 -7
  131. package/dist/fhir/CommunicationRequest.js.map +0 -1
  132. package/dist/fhir/CompartmentDefinition.d.ts +0 -217
  133. package/dist/fhir/CompartmentDefinition.js +0 -7
  134. package/dist/fhir/CompartmentDefinition.js.map +0 -1
  135. package/dist/fhir/Composition.d.ts +0 -429
  136. package/dist/fhir/Composition.js +0 -7
  137. package/dist/fhir/Composition.js.map +0 -1
  138. package/dist/fhir/ConceptMap.d.ts +0 -518
  139. package/dist/fhir/ConceptMap.js +0 -7
  140. package/dist/fhir/ConceptMap.js.map +0 -1
  141. package/dist/fhir/Condition.d.ts +0 -326
  142. package/dist/fhir/Condition.js +0 -7
  143. package/dist/fhir/Condition.js.map +0 -1
  144. package/dist/fhir/Consent.d.ts +0 -460
  145. package/dist/fhir/Consent.js +0 -7
  146. package/dist/fhir/Consent.js.map +0 -1
  147. package/dist/fhir/ContactDetail.d.ts +0 -31
  148. package/dist/fhir/ContactDetail.js +0 -7
  149. package/dist/fhir/ContactDetail.js.map +0 -1
  150. package/dist/fhir/ContactPoint.d.ts +0 -47
  151. package/dist/fhir/ContactPoint.js +0 -7
  152. package/dist/fhir/ContactPoint.js.map +0 -1
  153. package/dist/fhir/Contract.d.ts +0 -1452
  154. package/dist/fhir/Contract.js +0 -7
  155. package/dist/fhir/Contract.js.map +0 -1
  156. package/dist/fhir/Contributor.d.ts +0 -37
  157. package/dist/fhir/Contributor.js +0 -7
  158. package/dist/fhir/Contributor.js.map +0 -1
  159. package/dist/fhir/Count.d.ts +0 -49
  160. package/dist/fhir/Count.js +0 -7
  161. package/dist/fhir/Count.js.map +0 -1
  162. package/dist/fhir/Coverage.d.ts +0 -327
  163. package/dist/fhir/Coverage.js +0 -7
  164. package/dist/fhir/Coverage.js.map +0 -1
  165. package/dist/fhir/CoverageEligibilityRequest.d.ts +0 -404
  166. package/dist/fhir/CoverageEligibilityRequest.js +0 -7
  167. package/dist/fhir/CoverageEligibilityRequest.js.map +0 -1
  168. package/dist/fhir/CoverageEligibilityResponse.d.ts +0 -434
  169. package/dist/fhir/CoverageEligibilityResponse.js +0 -7
  170. package/dist/fhir/CoverageEligibilityResponse.js.map +0 -1
  171. package/dist/fhir/DataRequirement.d.ts +0 -239
  172. package/dist/fhir/DataRequirement.js +0 -7
  173. package/dist/fhir/DataRequirement.js.map +0 -1
  174. package/dist/fhir/DetectedIssue.d.ts +0 -252
  175. package/dist/fhir/DetectedIssue.js +0 -7
  176. package/dist/fhir/DetectedIssue.js.map +0 -1
  177. package/dist/fhir/Device.d.ts +0 -493
  178. package/dist/fhir/Device.js +0 -7
  179. package/dist/fhir/Device.js.map +0 -1
  180. package/dist/fhir/DeviceDefinition.d.ts +0 -486
  181. package/dist/fhir/DeviceDefinition.js +0 -7
  182. package/dist/fhir/DeviceDefinition.js.map +0 -1
  183. package/dist/fhir/DeviceMetric.d.ts +0 -199
  184. package/dist/fhir/DeviceMetric.js +0 -7
  185. package/dist/fhir/DeviceMetric.js.map +0 -1
  186. package/dist/fhir/DeviceRequest.d.ts +0 -296
  187. package/dist/fhir/DeviceRequest.js +0 -7
  188. package/dist/fhir/DeviceRequest.js.map +0 -1
  189. package/dist/fhir/DeviceUseStatement.d.ts +0 -168
  190. package/dist/fhir/DeviceUseStatement.js +0 -7
  191. package/dist/fhir/DeviceUseStatement.js.map +0 -1
  192. package/dist/fhir/DiagnosticReport.d.ts +0 -254
  193. package/dist/fhir/DiagnosticReport.js +0 -7
  194. package/dist/fhir/DiagnosticReport.js.map +0 -1
  195. package/dist/fhir/Distance.d.ts +0 -47
  196. package/dist/fhir/Distance.js +0 -7
  197. package/dist/fhir/Distance.js.map +0 -1
  198. package/dist/fhir/DocumentManifest.d.ts +0 -196
  199. package/dist/fhir/DocumentManifest.js +0 -7
  200. package/dist/fhir/DocumentManifest.js.map +0 -1
  201. package/dist/fhir/DocumentReference.d.ts +0 -349
  202. package/dist/fhir/DocumentReference.js +0 -7
  203. package/dist/fhir/DocumentReference.js.map +0 -1
  204. package/dist/fhir/Dosage.d.ts +0 -152
  205. package/dist/fhir/Dosage.js +0 -7
  206. package/dist/fhir/Dosage.js.map +0 -1
  207. package/dist/fhir/Duration.d.ts +0 -46
  208. package/dist/fhir/Duration.js +0 -7
  209. package/dist/fhir/Duration.js.map +0 -1
  210. package/dist/fhir/EffectEvidenceSynthesis.d.ts +0 -591
  211. package/dist/fhir/EffectEvidenceSynthesis.js +0 -7
  212. package/dist/fhir/EffectEvidenceSynthesis.js.map +0 -1
  213. package/dist/fhir/Element.d.ts +0 -21
  214. package/dist/fhir/Element.js +0 -7
  215. package/dist/fhir/Element.js.map +0 -1
  216. package/dist/fhir/ElementDefinition.d.ts +0 -2701
  217. package/dist/fhir/ElementDefinition.js +0 -7
  218. package/dist/fhir/ElementDefinition.js.map +0 -1
  219. package/dist/fhir/Encounter.d.ts +0 -558
  220. package/dist/fhir/Encounter.js +0 -7
  221. package/dist/fhir/Encounter.js.map +0 -1
  222. package/dist/fhir/Endpoint.d.ts +0 -140
  223. package/dist/fhir/Endpoint.js +0 -7
  224. package/dist/fhir/Endpoint.js.map +0 -1
  225. package/dist/fhir/EnrollmentRequest.d.ts +0 -113
  226. package/dist/fhir/EnrollmentRequest.js +0 -7
  227. package/dist/fhir/EnrollmentRequest.js.map +0 -1
  228. package/dist/fhir/EnrollmentResponse.d.ts +0 -117
  229. package/dist/fhir/EnrollmentResponse.js +0 -7
  230. package/dist/fhir/EnrollmentResponse.js.map +0 -1
  231. package/dist/fhir/EpisodeOfCare.d.ts +0 -246
  232. package/dist/fhir/EpisodeOfCare.js +0 -7
  233. package/dist/fhir/EpisodeOfCare.js.map +0 -1
  234. package/dist/fhir/EventDefinition.d.ts +0 -253
  235. package/dist/fhir/EventDefinition.js +0 -7
  236. package/dist/fhir/EventDefinition.js.map +0 -1
  237. package/dist/fhir/Evidence.d.ts +0 -252
  238. package/dist/fhir/Evidence.js +0 -7
  239. package/dist/fhir/Evidence.js.map +0 -1
  240. package/dist/fhir/EvidenceVariable.d.ts +0 -370
  241. package/dist/fhir/EvidenceVariable.js +0 -7
  242. package/dist/fhir/EvidenceVariable.js.map +0 -1
  243. package/dist/fhir/ExampleScenario.d.ts +0 -628
  244. package/dist/fhir/ExampleScenario.js +0 -7
  245. package/dist/fhir/ExampleScenario.js.map +0 -1
  246. package/dist/fhir/ExplanationOfBenefit.d.ts +0 -1841
  247. package/dist/fhir/ExplanationOfBenefit.js +0 -7
  248. package/dist/fhir/ExplanationOfBenefit.js.map +0 -1
  249. package/dist/fhir/Expression.d.ts +0 -45
  250. package/dist/fhir/Expression.js +0 -7
  251. package/dist/fhir/Expression.js.map +0 -1
  252. package/dist/fhir/Extension.d.ts +0 -306
  253. package/dist/fhir/Extension.js +0 -7
  254. package/dist/fhir/Extension.js.map +0 -1
  255. package/dist/fhir/FamilyMemberHistory.d.ts +0 -306
  256. package/dist/fhir/FamilyMemberHistory.js +0 -7
  257. package/dist/fhir/FamilyMemberHistory.js.map +0 -1
  258. package/dist/fhir/Flag.d.ts +0 -132
  259. package/dist/fhir/Flag.js +0 -7
  260. package/dist/fhir/Flag.js.map +0 -1
  261. package/dist/fhir/Goal.d.ts +0 -299
  262. package/dist/fhir/Goal.js +0 -7
  263. package/dist/fhir/Goal.js.map +0 -1
  264. package/dist/fhir/GraphDefinition.d.ts +0 -350
  265. package/dist/fhir/GraphDefinition.js +0 -7
  266. package/dist/fhir/GraphDefinition.js.map +0 -1
  267. package/dist/fhir/Group.d.ts +0 -271
  268. package/dist/fhir/Group.js +0 -7
  269. package/dist/fhir/Group.js.map +0 -1
  270. package/dist/fhir/GuidanceResponse.d.ts +0 -196
  271. package/dist/fhir/GuidanceResponse.js +0 -7
  272. package/dist/fhir/GuidanceResponse.js.map +0 -1
  273. package/dist/fhir/HealthcareService.d.ts +0 -356
  274. package/dist/fhir/HealthcareService.js +0 -7
  275. package/dist/fhir/HealthcareService.js.map +0 -1
  276. package/dist/fhir/HumanName.d.ts +0 -58
  277. package/dist/fhir/HumanName.js +0 -7
  278. package/dist/fhir/HumanName.js.map +0 -1
  279. package/dist/fhir/Identifier.d.ts +0 -53
  280. package/dist/fhir/Identifier.js +0 -7
  281. package/dist/fhir/Identifier.js.map +0 -1
  282. package/dist/fhir/ImagingStudy.d.ts +0 -407
  283. package/dist/fhir/ImagingStudy.js +0 -7
  284. package/dist/fhir/ImagingStudy.js.map +0 -1
  285. package/dist/fhir/Immunization.d.ts +0 -444
  286. package/dist/fhir/Immunization.js +0 -7
  287. package/dist/fhir/Immunization.js.map +0 -1
  288. package/dist/fhir/ImmunizationEvaluation.d.ts +0 -149
  289. package/dist/fhir/ImmunizationEvaluation.js +0 -7
  290. package/dist/fhir/ImmunizationEvaluation.js.map +0 -1
  291. package/dist/fhir/ImmunizationRecommendation.d.ts +0 -254
  292. package/dist/fhir/ImmunizationRecommendation.js +0 -7
  293. package/dist/fhir/ImmunizationRecommendation.js.map +0 -1
  294. package/dist/fhir/ImplementationGuide.d.ts +0 -824
  295. package/dist/fhir/ImplementationGuide.js +0 -7
  296. package/dist/fhir/ImplementationGuide.js.map +0 -1
  297. package/dist/fhir/InsurancePlan.d.ts +0 -624
  298. package/dist/fhir/InsurancePlan.js +0 -7
  299. package/dist/fhir/InsurancePlan.js.map +0 -1
  300. package/dist/fhir/Invoice.d.ts +0 -346
  301. package/dist/fhir/Invoice.js +0 -7
  302. package/dist/fhir/Invoice.js.map +0 -1
  303. package/dist/fhir/JsonWebKey.d.ts +0 -99
  304. package/dist/fhir/JsonWebKey.js +0 -7
  305. package/dist/fhir/JsonWebKey.js.map +0 -1
  306. package/dist/fhir/Library.d.ts +0 -277
  307. package/dist/fhir/Library.js +0 -7
  308. package/dist/fhir/Library.js.map +0 -1
  309. package/dist/fhir/Linkage.d.ts +0 -146
  310. package/dist/fhir/Linkage.js +0 -7
  311. package/dist/fhir/Linkage.js.map +0 -1
  312. package/dist/fhir/List.d.ts +0 -200
  313. package/dist/fhir/List.js +0 -7
  314. package/dist/fhir/List.js.map +0 -1
  315. package/dist/fhir/Location.d.ts +0 -277
  316. package/dist/fhir/Location.js +0 -7
  317. package/dist/fhir/Location.js.map +0 -1
  318. package/dist/fhir/Login.d.ts +0 -119
  319. package/dist/fhir/Login.js +0 -7
  320. package/dist/fhir/Login.js.map +0 -1
  321. package/dist/fhir/MarketingStatus.d.ts +0 -82
  322. package/dist/fhir/MarketingStatus.js +0 -7
  323. package/dist/fhir/MarketingStatus.js.map +0 -1
  324. package/dist/fhir/Measure.d.ts +0 -620
  325. package/dist/fhir/Measure.js +0 -7
  326. package/dist/fhir/Measure.js.map +0 -1
  327. package/dist/fhir/MeasureReport.d.ts +0 -463
  328. package/dist/fhir/MeasureReport.js +0 -7
  329. package/dist/fhir/MeasureReport.js.map +0 -1
  330. package/dist/fhir/Media.d.ts +0 -205
  331. package/dist/fhir/Media.js +0 -7
  332. package/dist/fhir/Media.js.map +0 -1
  333. package/dist/fhir/Medication.d.ts +0 -230
  334. package/dist/fhir/Medication.js +0 -7
  335. package/dist/fhir/Medication.js.map +0 -1
  336. package/dist/fhir/MedicationAdministration.d.ts +0 -352
  337. package/dist/fhir/MedicationAdministration.js +0 -7
  338. package/dist/fhir/MedicationAdministration.js.map +0 -1
  339. package/dist/fhir/MedicationDispense.d.ts +0 -343
  340. package/dist/fhir/MedicationDispense.js +0 -7
  341. package/dist/fhir/MedicationDispense.js.map +0 -1
  342. package/dist/fhir/MedicationKnowledge.d.ts +0 -992
  343. package/dist/fhir/MedicationKnowledge.js +0 -7
  344. package/dist/fhir/MedicationKnowledge.js.map +0 -1
  345. package/dist/fhir/MedicationRequest.d.ts +0 -481
  346. package/dist/fhir/MedicationRequest.js +0 -7
  347. package/dist/fhir/MedicationRequest.js.map +0 -1
  348. package/dist/fhir/MedicationStatement.d.ts +0 -228
  349. package/dist/fhir/MedicationStatement.js +0 -7
  350. package/dist/fhir/MedicationStatement.js.map +0 -1
  351. package/dist/fhir/MedicinalProduct.d.ts +0 -453
  352. package/dist/fhir/MedicinalProduct.js +0 -7
  353. package/dist/fhir/MedicinalProduct.js.map +0 -1
  354. package/dist/fhir/MedicinalProductAuthorization.d.ts +0 -271
  355. package/dist/fhir/MedicinalProductAuthorization.js +0 -7
  356. package/dist/fhir/MedicinalProductAuthorization.js.map +0 -1
  357. package/dist/fhir/MedicinalProductContraindication.d.ts +0 -170
  358. package/dist/fhir/MedicinalProductContraindication.js +0 -7
  359. package/dist/fhir/MedicinalProductContraindication.js.map +0 -1
  360. package/dist/fhir/MedicinalProductIndication.d.ts +0 -179
  361. package/dist/fhir/MedicinalProductIndication.js +0 -7
  362. package/dist/fhir/MedicinalProductIndication.js.map +0 -1
  363. package/dist/fhir/MedicinalProductIngredient.d.ts +0 -336
  364. package/dist/fhir/MedicinalProductIngredient.js +0 -7
  365. package/dist/fhir/MedicinalProductIngredient.js.map +0 -1
  366. package/dist/fhir/MedicinalProductInteraction.d.ts +0 -158
  367. package/dist/fhir/MedicinalProductInteraction.js +0 -7
  368. package/dist/fhir/MedicinalProductInteraction.js.map +0 -1
  369. package/dist/fhir/MedicinalProductManufactured.d.ts +0 -113
  370. package/dist/fhir/MedicinalProductManufactured.js +0 -7
  371. package/dist/fhir/MedicinalProductManufactured.js.map +0 -1
  372. package/dist/fhir/MedicinalProductPackaged.d.ts +0 -259
  373. package/dist/fhir/MedicinalProductPackaged.js +0 -7
  374. package/dist/fhir/MedicinalProductPackaged.js.map +0 -1
  375. package/dist/fhir/MedicinalProductPharmaceutical.d.ts +0 -331
  376. package/dist/fhir/MedicinalProductPharmaceutical.js +0 -7
  377. package/dist/fhir/MedicinalProductPharmaceutical.js.map +0 -1
  378. package/dist/fhir/MedicinalProductUndesirableEffect.d.ts +0 -101
  379. package/dist/fhir/MedicinalProductUndesirableEffect.js +0 -7
  380. package/dist/fhir/MedicinalProductUndesirableEffect.js.map +0 -1
  381. package/dist/fhir/MessageDefinition.d.ts +0 -330
  382. package/dist/fhir/MessageDefinition.js +0 -7
  383. package/dist/fhir/MessageDefinition.js.map +0 -1
  384. package/dist/fhir/MessageHeader.d.ts +0 -323
  385. package/dist/fhir/MessageHeader.js +0 -7
  386. package/dist/fhir/MessageHeader.js.map +0 -1
  387. package/dist/fhir/Meta.d.ts +0 -75
  388. package/dist/fhir/Meta.js +0 -7
  389. package/dist/fhir/Meta.js.map +0 -1
  390. package/dist/fhir/MolecularSequence.d.ts +0 -760
  391. package/dist/fhir/MolecularSequence.js +0 -7
  392. package/dist/fhir/MolecularSequence.js.map +0 -1
  393. package/dist/fhir/Money.d.ts +0 -29
  394. package/dist/fhir/Money.js +0 -7
  395. package/dist/fhir/Money.js.map +0 -1
  396. package/dist/fhir/NamingSystem.d.ts +0 -218
  397. package/dist/fhir/NamingSystem.js +0 -7
  398. package/dist/fhir/NamingSystem.js.map +0 -1
  399. package/dist/fhir/Narrative.d.ts +0 -32
  400. package/dist/fhir/Narrative.js +0 -7
  401. package/dist/fhir/Narrative.js.map +0 -1
  402. package/dist/fhir/NutritionOrder.d.ts +0 -566
  403. package/dist/fhir/NutritionOrder.js +0 -7
  404. package/dist/fhir/NutritionOrder.js.map +0 -1
  405. package/dist/fhir/Observation.d.ts +0 -520
  406. package/dist/fhir/Observation.js +0 -7
  407. package/dist/fhir/Observation.js.map +0 -1
  408. package/dist/fhir/ObservationDefinition.d.ts +0 -278
  409. package/dist/fhir/ObservationDefinition.js +0 -7
  410. package/dist/fhir/ObservationDefinition.js.map +0 -1
  411. package/dist/fhir/OperationDefinition.d.ts +0 -468
  412. package/dist/fhir/OperationDefinition.js +0 -7
  413. package/dist/fhir/OperationDefinition.js.map +0 -1
  414. package/dist/fhir/OperationOutcome.d.ts +0 -160
  415. package/dist/fhir/OperationOutcome.js +0 -7
  416. package/dist/fhir/OperationOutcome.js.map +0 -1
  417. package/dist/fhir/Organization.d.ts +0 -184
  418. package/dist/fhir/Organization.js +0 -7
  419. package/dist/fhir/Organization.js.map +0 -1
  420. package/dist/fhir/OrganizationAffiliation.d.ts +0 -145
  421. package/dist/fhir/OrganizationAffiliation.js +0 -7
  422. package/dist/fhir/OrganizationAffiliation.js.map +0 -1
  423. package/dist/fhir/ParameterDefinition.d.ts +0 -57
  424. package/dist/fhir/ParameterDefinition.js +0 -7
  425. package/dist/fhir/ParameterDefinition.js.map +0 -1
  426. package/dist/fhir/Parameters.d.ts +0 -319
  427. package/dist/fhir/Parameters.js +0 -7
  428. package/dist/fhir/Parameters.js.map +0 -1
  429. package/dist/fhir/PasswordChangeRequest.d.ts +0 -51
  430. package/dist/fhir/PasswordChangeRequest.js +0 -7
  431. package/dist/fhir/PasswordChangeRequest.js.map +0 -1
  432. package/dist/fhir/Patient.d.ts +0 -342
  433. package/dist/fhir/Patient.js +0 -7
  434. package/dist/fhir/Patient.js.map +0 -1
  435. package/dist/fhir/PaymentNotice.d.ts +0 -135
  436. package/dist/fhir/PaymentNotice.js +0 -7
  437. package/dist/fhir/PaymentNotice.js.map +0 -1
  438. package/dist/fhir/PaymentReconciliation.d.ts +0 -280
  439. package/dist/fhir/PaymentReconciliation.js +0 -7
  440. package/dist/fhir/PaymentReconciliation.js.map +0 -1
  441. package/dist/fhir/Period.d.ts +0 -32
  442. package/dist/fhir/Period.js +0 -7
  443. package/dist/fhir/Period.js.map +0 -1
  444. package/dist/fhir/Person.d.ts +0 -175
  445. package/dist/fhir/Person.js +0 -7
  446. package/dist/fhir/Person.js.map +0 -1
  447. package/dist/fhir/PlanDefinition.d.ts +0 -837
  448. package/dist/fhir/PlanDefinition.js +0 -7
  449. package/dist/fhir/PlanDefinition.js.map +0 -1
  450. package/dist/fhir/Population.d.ts +0 -62
  451. package/dist/fhir/Population.js +0 -7
  452. package/dist/fhir/Population.js.map +0 -1
  453. package/dist/fhir/Practitioner.d.ts +0 -191
  454. package/dist/fhir/Practitioner.js +0 -7
  455. package/dist/fhir/Practitioner.js.map +0 -1
  456. package/dist/fhir/PractitionerRole.d.ts +0 -259
  457. package/dist/fhir/PractitionerRole.js +0 -7
  458. package/dist/fhir/PractitionerRole.js.map +0 -1
  459. package/dist/fhir/Procedure.d.ts +0 -372
  460. package/dist/fhir/Procedure.js +0 -7
  461. package/dist/fhir/Procedure.js.map +0 -1
  462. package/dist/fhir/ProdCharacteristic.d.ts +0 -112
  463. package/dist/fhir/ProdCharacteristic.js +0 -7
  464. package/dist/fhir/ProdCharacteristic.js.map +0 -1
  465. package/dist/fhir/ProductShelfLife.d.ts +0 -70
  466. package/dist/fhir/ProductShelfLife.js +0 -7
  467. package/dist/fhir/ProductShelfLife.js.map +0 -1
  468. package/dist/fhir/Project.d.ts +0 -43
  469. package/dist/fhir/Project.js +0 -7
  470. package/dist/fhir/Project.js.map +0 -1
  471. package/dist/fhir/ProjectMembership.d.ts +0 -66
  472. package/dist/fhir/ProjectMembership.js +0 -7
  473. package/dist/fhir/ProjectMembership.js.map +0 -1
  474. package/dist/fhir/Provenance.d.ts +0 -258
  475. package/dist/fhir/Provenance.js +0 -7
  476. package/dist/fhir/Provenance.js.map +0 -1
  477. package/dist/fhir/Quantity.d.ts +0 -46
  478. package/dist/fhir/Quantity.js +0 -7
  479. package/dist/fhir/Quantity.js.map +0 -1
  480. package/dist/fhir/Questionnaire.d.ts +0 -603
  481. package/dist/fhir/Questionnaire.js +0 -7
  482. package/dist/fhir/Questionnaire.js.map +0 -1
  483. package/dist/fhir/QuestionnaireResponse.d.ts +0 -313
  484. package/dist/fhir/QuestionnaireResponse.js +0 -7
  485. package/dist/fhir/QuestionnaireResponse.js.map +0 -1
  486. package/dist/fhir/Range.d.ts +0 -30
  487. package/dist/fhir/Range.js +0 -7
  488. package/dist/fhir/Range.js.map +0 -1
  489. package/dist/fhir/Ratio.d.ts +0 -30
  490. package/dist/fhir/Ratio.js +0 -7
  491. package/dist/fhir/Ratio.js.map +0 -1
  492. package/dist/fhir/Reference.d.ts +0 -67
  493. package/dist/fhir/Reference.js +0 -7
  494. package/dist/fhir/Reference.js.map +0 -1
  495. package/dist/fhir/RefreshToken.d.ts +0 -45
  496. package/dist/fhir/RefreshToken.js +0 -7
  497. package/dist/fhir/RefreshToken.js.map +0 -1
  498. package/dist/fhir/RelatedArtifact.d.ts +0 -57
  499. package/dist/fhir/RelatedArtifact.js +0 -7
  500. package/dist/fhir/RelatedArtifact.js.map +0 -1
  501. package/dist/fhir/RelatedPerson.d.ts +0 -190
  502. package/dist/fhir/RelatedPerson.js +0 -7
  503. package/dist/fhir/RelatedPerson.js.map +0 -1
  504. package/dist/fhir/RequestGroup.d.ts +0 -434
  505. package/dist/fhir/RequestGroup.js +0 -7
  506. package/dist/fhir/RequestGroup.js.map +0 -1
  507. package/dist/fhir/ResearchDefinition.d.ts +0 -291
  508. package/dist/fhir/ResearchDefinition.js +0 -7
  509. package/dist/fhir/ResearchDefinition.js.map +0 -1
  510. package/dist/fhir/ResearchElementDefinition.d.ts +0 -431
  511. package/dist/fhir/ResearchElementDefinition.js +0 -7
  512. package/dist/fhir/ResearchElementDefinition.js.map +0 -1
  513. package/dist/fhir/ResearchStudy.d.ts +0 -318
  514. package/dist/fhir/ResearchStudy.js +0 -7
  515. package/dist/fhir/ResearchStudy.js.map +0 -1
  516. package/dist/fhir/ResearchSubject.d.ts +0 -119
  517. package/dist/fhir/ResearchSubject.js +0 -7
  518. package/dist/fhir/ResearchSubject.js.map +0 -1
  519. package/dist/fhir/Resource.d.ts +0 -156
  520. package/dist/fhir/Resource.js +0 -7
  521. package/dist/fhir/Resource.js.map +0 -1
  522. package/dist/fhir/RiskAssessment.d.ts +0 -246
  523. package/dist/fhir/RiskAssessment.js +0 -7
  524. package/dist/fhir/RiskAssessment.js.map +0 -1
  525. package/dist/fhir/RiskEvidenceSynthesis.d.ts +0 -530
  526. package/dist/fhir/RiskEvidenceSynthesis.js +0 -7
  527. package/dist/fhir/RiskEvidenceSynthesis.js.map +0 -1
  528. package/dist/fhir/SampledData.d.ts +0 -62
  529. package/dist/fhir/SampledData.js +0 -7
  530. package/dist/fhir/SampledData.js.map +0 -1
  531. package/dist/fhir/Schedule.d.ts +0 -129
  532. package/dist/fhir/Schedule.js +0 -7
  533. package/dist/fhir/Schedule.js.map +0 -1
  534. package/dist/fhir/SearchParameter.d.ts +0 -277
  535. package/dist/fhir/SearchParameter.js +0 -7
  536. package/dist/fhir/SearchParameter.js.map +0 -1
  537. package/dist/fhir/ServiceRequest.d.ts +0 -309
  538. package/dist/fhir/ServiceRequest.js +0 -7
  539. package/dist/fhir/ServiceRequest.js.map +0 -1
  540. package/dist/fhir/Signature.d.ts +0 -71
  541. package/dist/fhir/Signature.js +0 -7
  542. package/dist/fhir/Signature.js.map +0 -1
  543. package/dist/fhir/Slot.d.ts +0 -134
  544. package/dist/fhir/Slot.js +0 -7
  545. package/dist/fhir/Slot.js.map +0 -1
  546. package/dist/fhir/Specimen.d.ts +0 -366
  547. package/dist/fhir/Specimen.js +0 -7
  548. package/dist/fhir/Specimen.js.map +0 -1
  549. package/dist/fhir/SpecimenDefinition.d.ts +0 -363
  550. package/dist/fhir/SpecimenDefinition.js +0 -7
  551. package/dist/fhir/SpecimenDefinition.js.map +0 -1
  552. package/dist/fhir/StructureDefinition.d.ts +0 -438
  553. package/dist/fhir/StructureDefinition.js +0 -7
  554. package/dist/fhir/StructureDefinition.js.map +0 -1
  555. package/dist/fhir/StructureMap.d.ts +0 -904
  556. package/dist/fhir/StructureMap.js +0 -7
  557. package/dist/fhir/StructureMap.js.map +0 -1
  558. package/dist/fhir/Subscription.d.ts +0 -172
  559. package/dist/fhir/Subscription.js +0 -7
  560. package/dist/fhir/Subscription.js.map +0 -1
  561. package/dist/fhir/Substance.d.ts +0 -213
  562. package/dist/fhir/Substance.js +0 -7
  563. package/dist/fhir/Substance.js.map +0 -1
  564. package/dist/fhir/SubstanceAmount.d.ts +0 -115
  565. package/dist/fhir/SubstanceAmount.js +0 -7
  566. package/dist/fhir/SubstanceAmount.js.map +0 -1
  567. package/dist/fhir/SubstanceNucleicAcid.d.ts +0 -309
  568. package/dist/fhir/SubstanceNucleicAcid.js +0 -7
  569. package/dist/fhir/SubstanceNucleicAcid.js.map +0 -1
  570. package/dist/fhir/SubstancePolymer.d.ts +0 -405
  571. package/dist/fhir/SubstancePolymer.js +0 -7
  572. package/dist/fhir/SubstancePolymer.js.map +0 -1
  573. package/dist/fhir/SubstanceProtein.d.ts +0 -218
  574. package/dist/fhir/SubstanceProtein.js +0 -7
  575. package/dist/fhir/SubstanceProtein.js.map +0 -1
  576. package/dist/fhir/SubstanceReferenceInformation.d.ts +0 -330
  577. package/dist/fhir/SubstanceReferenceInformation.js +0 -7
  578. package/dist/fhir/SubstanceReferenceInformation.js.map +0 -1
  579. package/dist/fhir/SubstanceSourceMaterial.d.ts +0 -521
  580. package/dist/fhir/SubstanceSourceMaterial.js +0 -7
  581. package/dist/fhir/SubstanceSourceMaterial.js.map +0 -1
  582. package/dist/fhir/SubstanceSpecification.d.ts +0 -827
  583. package/dist/fhir/SubstanceSpecification.js +0 -7
  584. package/dist/fhir/SubstanceSpecification.js.map +0 -1
  585. package/dist/fhir/SupplyDelivery.d.ts +0 -205
  586. package/dist/fhir/SupplyDelivery.js +0 -7
  587. package/dist/fhir/SupplyDelivery.js.map +0 -1
  588. package/dist/fhir/SupplyRequest.d.ts +0 -237
  589. package/dist/fhir/SupplyRequest.js +0 -7
  590. package/dist/fhir/SupplyRequest.js.map +0 -1
  591. package/dist/fhir/Task.d.ts +0 -807
  592. package/dist/fhir/Task.js +0 -7
  593. package/dist/fhir/Task.js.map +0 -1
  594. package/dist/fhir/TerminologyCapabilities.d.ts +0 -716
  595. package/dist/fhir/TerminologyCapabilities.js +0 -7
  596. package/dist/fhir/TerminologyCapabilities.js.map +0 -1
  597. package/dist/fhir/TestReport.d.ts +0 -549
  598. package/dist/fhir/TestReport.js +0 -7
  599. package/dist/fhir/TestReport.js.map +0 -1
  600. package/dist/fhir/TestScript.d.ts +0 -1184
  601. package/dist/fhir/TestScript.js +0 -7
  602. package/dist/fhir/TestScript.js.map +0 -1
  603. package/dist/fhir/Timing.d.ts +0 -178
  604. package/dist/fhir/Timing.js +0 -7
  605. package/dist/fhir/Timing.js.map +0 -1
  606. package/dist/fhir/TriggerDefinition.d.ts +0 -65
  607. package/dist/fhir/TriggerDefinition.js +0 -7
  608. package/dist/fhir/TriggerDefinition.js.map +0 -1
  609. package/dist/fhir/UsageContext.d.ts +0 -61
  610. package/dist/fhir/UsageContext.js +0 -7
  611. package/dist/fhir/UsageContext.js.map +0 -1
  612. package/dist/fhir/User.d.ts +0 -45
  613. package/dist/fhir/User.js +0 -7
  614. package/dist/fhir/User.js.map +0 -1
  615. package/dist/fhir/ValueSet.d.ts +0 -725
  616. package/dist/fhir/ValueSet.js +0 -7
  617. package/dist/fhir/ValueSet.js.map +0 -1
  618. package/dist/fhir/VerificationResult.d.ts +0 -340
  619. package/dist/fhir/VerificationResult.js +0 -7
  620. package/dist/fhir/VerificationResult.js.map +0 -1
  621. package/dist/fhir/VisionPrescription.d.ts +0 -264
  622. package/dist/fhir/VisionPrescription.js +0 -7
  623. package/dist/fhir/VisionPrescription.js.map +0 -1
  624. package/dist/fhir/index.d.ts +0 -196
  625. package/dist/fhir/index.js +0 -213
  626. package/dist/fhir/index.js.map +0 -1
  627. package/dist/fhirpath/functions.d.ts +0 -6
  628. package/dist/fhirpath/functions.js +0 -349
  629. package/dist/fhirpath/functions.js.map +0 -1
  630. package/dist/fhirpath/index.d.ts +0 -2
  631. package/dist/fhirpath/index.js +0 -15
  632. package/dist/fhirpath/index.js.map +0 -1
  633. package/dist/fhirpath/parse.d.ts +0 -10
  634. package/dist/fhirpath/parse.js +0 -266
  635. package/dist/fhirpath/parse.js.map +0 -1
  636. package/dist/fhirpath/tokenize.d.ts +0 -13
  637. package/dist/fhirpath/tokenize.js +0 -39
  638. package/dist/fhirpath/tokenize.js.map +0 -1
  639. package/dist/fhirpath/utils.d.ts +0 -13
  640. package/dist/fhirpath/utils.js +0 -34
  641. package/dist/fhirpath/utils.js.map +0 -1
  642. package/dist/format.js +0 -56
  643. package/dist/format.js.map +0 -1
  644. package/dist/index.js +0 -22
  645. package/dist/index.js.map +0 -1
  646. package/dist/jwt.d.ts +0 -5
  647. package/dist/jwt.js +0 -28
  648. package/dist/jwt.js.map +0 -1
  649. package/dist/outcomes.js +0 -140
  650. package/dist/outcomes.js.map +0 -1
  651. package/dist/search.js +0 -120
  652. package/dist/search.js.map +0 -1
  653. package/dist/searchparams.js +0 -129
  654. package/dist/searchparams.js.map +0 -1
  655. package/dist/storage.js +0 -90
  656. package/dist/storage.js.map +0 -1
  657. package/dist/types.js +0 -171
  658. package/dist/types.js.map +0 -1
  659. package/dist/utils.js +0 -234
  660. package/dist/utils.js.map +0 -1
@@ -1,213 +0,0 @@
1
- "use strict";
2
- /*
3
- * Generated by @medplum/generator
4
- * Do not edit manually.
5
- */
6
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
- if (k2 === undefined) k2 = k;
8
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./AccessPolicy"), exports);
18
- __exportStar(require("./Account"), exports);
19
- __exportStar(require("./ActivityDefinition"), exports);
20
- __exportStar(require("./Address"), exports);
21
- __exportStar(require("./AdverseEvent"), exports);
22
- __exportStar(require("./Age"), exports);
23
- __exportStar(require("./AllergyIntolerance"), exports);
24
- __exportStar(require("./Annotation"), exports);
25
- __exportStar(require("./Appointment"), exports);
26
- __exportStar(require("./AppointmentResponse"), exports);
27
- __exportStar(require("./Attachment"), exports);
28
- __exportStar(require("./AuditEvent"), exports);
29
- __exportStar(require("./Basic"), exports);
30
- __exportStar(require("./Binary"), exports);
31
- __exportStar(require("./BiologicallyDerivedProduct"), exports);
32
- __exportStar(require("./BodyStructure"), exports);
33
- __exportStar(require("./Bot"), exports);
34
- __exportStar(require("./Bundle"), exports);
35
- __exportStar(require("./CapabilityStatement"), exports);
36
- __exportStar(require("./CarePlan"), exports);
37
- __exportStar(require("./CareTeam"), exports);
38
- __exportStar(require("./CatalogEntry"), exports);
39
- __exportStar(require("./ChargeItem"), exports);
40
- __exportStar(require("./ChargeItemDefinition"), exports);
41
- __exportStar(require("./Claim"), exports);
42
- __exportStar(require("./ClaimResponse"), exports);
43
- __exportStar(require("./ClientApplication"), exports);
44
- __exportStar(require("./ClinicalImpression"), exports);
45
- __exportStar(require("./CodeSystem"), exports);
46
- __exportStar(require("./CodeableConcept"), exports);
47
- __exportStar(require("./Coding"), exports);
48
- __exportStar(require("./Communication"), exports);
49
- __exportStar(require("./CommunicationRequest"), exports);
50
- __exportStar(require("./CompartmentDefinition"), exports);
51
- __exportStar(require("./Composition"), exports);
52
- __exportStar(require("./ConceptMap"), exports);
53
- __exportStar(require("./Condition"), exports);
54
- __exportStar(require("./Consent"), exports);
55
- __exportStar(require("./ContactDetail"), exports);
56
- __exportStar(require("./ContactPoint"), exports);
57
- __exportStar(require("./Contract"), exports);
58
- __exportStar(require("./Contributor"), exports);
59
- __exportStar(require("./Count"), exports);
60
- __exportStar(require("./Coverage"), exports);
61
- __exportStar(require("./CoverageEligibilityRequest"), exports);
62
- __exportStar(require("./CoverageEligibilityResponse"), exports);
63
- __exportStar(require("./DataRequirement"), exports);
64
- __exportStar(require("./DetectedIssue"), exports);
65
- __exportStar(require("./Device"), exports);
66
- __exportStar(require("./DeviceDefinition"), exports);
67
- __exportStar(require("./DeviceMetric"), exports);
68
- __exportStar(require("./DeviceRequest"), exports);
69
- __exportStar(require("./DeviceUseStatement"), exports);
70
- __exportStar(require("./DiagnosticReport"), exports);
71
- __exportStar(require("./Distance"), exports);
72
- __exportStar(require("./DocumentManifest"), exports);
73
- __exportStar(require("./DocumentReference"), exports);
74
- __exportStar(require("./Dosage"), exports);
75
- __exportStar(require("./Duration"), exports);
76
- __exportStar(require("./EffectEvidenceSynthesis"), exports);
77
- __exportStar(require("./Element"), exports);
78
- __exportStar(require("./ElementDefinition"), exports);
79
- __exportStar(require("./Encounter"), exports);
80
- __exportStar(require("./Endpoint"), exports);
81
- __exportStar(require("./EnrollmentRequest"), exports);
82
- __exportStar(require("./EnrollmentResponse"), exports);
83
- __exportStar(require("./EpisodeOfCare"), exports);
84
- __exportStar(require("./EventDefinition"), exports);
85
- __exportStar(require("./Evidence"), exports);
86
- __exportStar(require("./EvidenceVariable"), exports);
87
- __exportStar(require("./ExampleScenario"), exports);
88
- __exportStar(require("./ExplanationOfBenefit"), exports);
89
- __exportStar(require("./Expression"), exports);
90
- __exportStar(require("./Extension"), exports);
91
- __exportStar(require("./FamilyMemberHistory"), exports);
92
- __exportStar(require("./Flag"), exports);
93
- __exportStar(require("./Goal"), exports);
94
- __exportStar(require("./GraphDefinition"), exports);
95
- __exportStar(require("./Group"), exports);
96
- __exportStar(require("./GuidanceResponse"), exports);
97
- __exportStar(require("./HealthcareService"), exports);
98
- __exportStar(require("./HumanName"), exports);
99
- __exportStar(require("./Identifier"), exports);
100
- __exportStar(require("./ImagingStudy"), exports);
101
- __exportStar(require("./Immunization"), exports);
102
- __exportStar(require("./ImmunizationEvaluation"), exports);
103
- __exportStar(require("./ImmunizationRecommendation"), exports);
104
- __exportStar(require("./ImplementationGuide"), exports);
105
- __exportStar(require("./InsurancePlan"), exports);
106
- __exportStar(require("./Invoice"), exports);
107
- __exportStar(require("./JsonWebKey"), exports);
108
- __exportStar(require("./Library"), exports);
109
- __exportStar(require("./Linkage"), exports);
110
- __exportStar(require("./List"), exports);
111
- __exportStar(require("./Location"), exports);
112
- __exportStar(require("./Login"), exports);
113
- __exportStar(require("./MarketingStatus"), exports);
114
- __exportStar(require("./Measure"), exports);
115
- __exportStar(require("./MeasureReport"), exports);
116
- __exportStar(require("./Media"), exports);
117
- __exportStar(require("./Medication"), exports);
118
- __exportStar(require("./MedicationAdministration"), exports);
119
- __exportStar(require("./MedicationDispense"), exports);
120
- __exportStar(require("./MedicationKnowledge"), exports);
121
- __exportStar(require("./MedicationRequest"), exports);
122
- __exportStar(require("./MedicationStatement"), exports);
123
- __exportStar(require("./MedicinalProduct"), exports);
124
- __exportStar(require("./MedicinalProductAuthorization"), exports);
125
- __exportStar(require("./MedicinalProductContraindication"), exports);
126
- __exportStar(require("./MedicinalProductIndication"), exports);
127
- __exportStar(require("./MedicinalProductIngredient"), exports);
128
- __exportStar(require("./MedicinalProductInteraction"), exports);
129
- __exportStar(require("./MedicinalProductManufactured"), exports);
130
- __exportStar(require("./MedicinalProductPackaged"), exports);
131
- __exportStar(require("./MedicinalProductPharmaceutical"), exports);
132
- __exportStar(require("./MedicinalProductUndesirableEffect"), exports);
133
- __exportStar(require("./MessageDefinition"), exports);
134
- __exportStar(require("./MessageHeader"), exports);
135
- __exportStar(require("./Meta"), exports);
136
- __exportStar(require("./MolecularSequence"), exports);
137
- __exportStar(require("./Money"), exports);
138
- __exportStar(require("./NamingSystem"), exports);
139
- __exportStar(require("./Narrative"), exports);
140
- __exportStar(require("./NutritionOrder"), exports);
141
- __exportStar(require("./Observation"), exports);
142
- __exportStar(require("./ObservationDefinition"), exports);
143
- __exportStar(require("./OperationDefinition"), exports);
144
- __exportStar(require("./OperationOutcome"), exports);
145
- __exportStar(require("./Organization"), exports);
146
- __exportStar(require("./OrganizationAffiliation"), exports);
147
- __exportStar(require("./ParameterDefinition"), exports);
148
- __exportStar(require("./Parameters"), exports);
149
- __exportStar(require("./PasswordChangeRequest"), exports);
150
- __exportStar(require("./Patient"), exports);
151
- __exportStar(require("./PaymentNotice"), exports);
152
- __exportStar(require("./PaymentReconciliation"), exports);
153
- __exportStar(require("./Period"), exports);
154
- __exportStar(require("./Person"), exports);
155
- __exportStar(require("./PlanDefinition"), exports);
156
- __exportStar(require("./Population"), exports);
157
- __exportStar(require("./Practitioner"), exports);
158
- __exportStar(require("./PractitionerRole"), exports);
159
- __exportStar(require("./Procedure"), exports);
160
- __exportStar(require("./ProdCharacteristic"), exports);
161
- __exportStar(require("./ProductShelfLife"), exports);
162
- __exportStar(require("./Project"), exports);
163
- __exportStar(require("./ProjectMembership"), exports);
164
- __exportStar(require("./Provenance"), exports);
165
- __exportStar(require("./Quantity"), exports);
166
- __exportStar(require("./Questionnaire"), exports);
167
- __exportStar(require("./QuestionnaireResponse"), exports);
168
- __exportStar(require("./Range"), exports);
169
- __exportStar(require("./Ratio"), exports);
170
- __exportStar(require("./Reference"), exports);
171
- __exportStar(require("./RelatedArtifact"), exports);
172
- __exportStar(require("./RelatedPerson"), exports);
173
- __exportStar(require("./RequestGroup"), exports);
174
- __exportStar(require("./ResearchDefinition"), exports);
175
- __exportStar(require("./ResearchElementDefinition"), exports);
176
- __exportStar(require("./ResearchStudy"), exports);
177
- __exportStar(require("./ResearchSubject"), exports);
178
- __exportStar(require("./Resource"), exports);
179
- __exportStar(require("./RiskAssessment"), exports);
180
- __exportStar(require("./RiskEvidenceSynthesis"), exports);
181
- __exportStar(require("./SampledData"), exports);
182
- __exportStar(require("./Schedule"), exports);
183
- __exportStar(require("./SearchParameter"), exports);
184
- __exportStar(require("./ServiceRequest"), exports);
185
- __exportStar(require("./Signature"), exports);
186
- __exportStar(require("./Slot"), exports);
187
- __exportStar(require("./Specimen"), exports);
188
- __exportStar(require("./SpecimenDefinition"), exports);
189
- __exportStar(require("./StructureDefinition"), exports);
190
- __exportStar(require("./StructureMap"), exports);
191
- __exportStar(require("./Subscription"), exports);
192
- __exportStar(require("./Substance"), exports);
193
- __exportStar(require("./SubstanceAmount"), exports);
194
- __exportStar(require("./SubstanceNucleicAcid"), exports);
195
- __exportStar(require("./SubstancePolymer"), exports);
196
- __exportStar(require("./SubstanceProtein"), exports);
197
- __exportStar(require("./SubstanceReferenceInformation"), exports);
198
- __exportStar(require("./SubstanceSourceMaterial"), exports);
199
- __exportStar(require("./SubstanceSpecification"), exports);
200
- __exportStar(require("./SupplyDelivery"), exports);
201
- __exportStar(require("./SupplyRequest"), exports);
202
- __exportStar(require("./Task"), exports);
203
- __exportStar(require("./TerminologyCapabilities"), exports);
204
- __exportStar(require("./TestReport"), exports);
205
- __exportStar(require("./TestScript"), exports);
206
- __exportStar(require("./Timing"), exports);
207
- __exportStar(require("./TriggerDefinition"), exports);
208
- __exportStar(require("./UsageContext"), exports);
209
- __exportStar(require("./User"), exports);
210
- __exportStar(require("./ValueSet"), exports);
211
- __exportStar(require("./VerificationResult"), exports);
212
- __exportStar(require("./VisionPrescription"), exports);
213
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/fhir/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;AAEH,iDAA+B;AAC/B,4CAA0B;AAC1B,uDAAqC;AACrC,4CAA0B;AAC1B,iDAA+B;AAC/B,wCAAsB;AACtB,uDAAqC;AACrC,+CAA6B;AAC7B,gDAA8B;AAC9B,wDAAsC;AACtC,+CAA6B;AAC7B,+CAA6B;AAC7B,0CAAwB;AAC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vC,qDAAmC;AACnC,qDAAmC;AACnC,kEAAgD;AAChD,4DAA0C;AAC1C,2DAAyC;AACzC,mDAAiC;AACjC,kDAAgC;AAChC,yCAAuB;AACvB,4DAA0C;AAC1C,+CAA6B;AAC7B,+CAA6B;AAC7B,2CAAyB;AACzB,sDAAoC;AACpC,iDAA+B;AAC/B,yCAAuB;AACvB,6CAA2B;AAC3B,uDAAqC;AACrC,uDAAqC","sourcesContent":["/*\n * Generated by @medplum/generator\n * Do not edit manually.\n */\n\nexport * from './AccessPolicy';\nexport * from './Account';\nexport * from './ActivityDefinition';\nexport * from './Address';\nexport * from './AdverseEvent';\nexport * from './Age';\nexport * from './AllergyIntolerance';\nexport * from './Annotation';\nexport * from './Appointment';\nexport * from './AppointmentResponse';\nexport * from './Attachment';\nexport * from './AuditEvent';\nexport * from './Basic';\nexport * from './Binary';\nexport * from './BiologicallyDerivedProduct';\nexport * from './BodyStructure';\nexport * from './Bot';\nexport * from './Bundle';\nexport * from './CapabilityStatement';\nexport * from './CarePlan';\nexport * from './CareTeam';\nexport * from './CatalogEntry';\nexport * from './ChargeItem';\nexport * from './ChargeItemDefinition';\nexport * from './Claim';\nexport * from './ClaimResponse';\nexport * from './ClientApplication';\nexport * from './ClinicalImpression';\nexport * from './CodeSystem';\nexport * from './CodeableConcept';\nexport * from './Coding';\nexport * from './Communication';\nexport * from './CommunicationRequest';\nexport * from './CompartmentDefinition';\nexport * from './Composition';\nexport * from './ConceptMap';\nexport * from './Condition';\nexport * from './Consent';\nexport * from './ContactDetail';\nexport * from './ContactPoint';\nexport * from './Contract';\nexport * from './Contributor';\nexport * from './Count';\nexport * from './Coverage';\nexport * from './CoverageEligibilityRequest';\nexport * from './CoverageEligibilityResponse';\nexport * from './DataRequirement';\nexport * from './DetectedIssue';\nexport * from './Device';\nexport * from './DeviceDefinition';\nexport * from './DeviceMetric';\nexport * from './DeviceRequest';\nexport * from './DeviceUseStatement';\nexport * from './DiagnosticReport';\nexport * from './Distance';\nexport * from './DocumentManifest';\nexport * from './DocumentReference';\nexport * from './Dosage';\nexport * from './Duration';\nexport * from './EffectEvidenceSynthesis';\nexport * from './Element';\nexport * from './ElementDefinition';\nexport * from './Encounter';\nexport * from './Endpoint';\nexport * from './EnrollmentRequest';\nexport * from './EnrollmentResponse';\nexport * from './EpisodeOfCare';\nexport * from './EventDefinition';\nexport * from './Evidence';\nexport * from './EvidenceVariable';\nexport * from './ExampleScenario';\nexport * from './ExplanationOfBenefit';\nexport * from './Expression';\nexport * from './Extension';\nexport * from './FamilyMemberHistory';\nexport * from './Flag';\nexport * from './Goal';\nexport * from './GraphDefinition';\nexport * from './Group';\nexport * from './GuidanceResponse';\nexport * from './HealthcareService';\nexport * from './HumanName';\nexport * from './Identifier';\nexport * from './ImagingStudy';\nexport * from './Immunization';\nexport * from './ImmunizationEvaluation';\nexport * from './ImmunizationRecommendation';\nexport * from './ImplementationGuide';\nexport * from './InsurancePlan';\nexport * from './Invoice';\nexport * from './JsonWebKey';\nexport * from './Library';\nexport * from './Linkage';\nexport * from './List';\nexport * from './Location';\nexport * from './Login';\nexport * from './MarketingStatus';\nexport * from './Measure';\nexport * from './MeasureReport';\nexport * from './Media';\nexport * from './Medication';\nexport * from './MedicationAdministration';\nexport * from './MedicationDispense';\nexport * from './MedicationKnowledge';\nexport * from './MedicationRequest';\nexport * from './MedicationStatement';\nexport * from './MedicinalProduct';\nexport * from './MedicinalProductAuthorization';\nexport * from './MedicinalProductContraindication';\nexport * from './MedicinalProductIndication';\nexport * from './MedicinalProductIngredient';\nexport * from './MedicinalProductInteraction';\nexport * from './MedicinalProductManufactured';\nexport * from './MedicinalProductPackaged';\nexport * from './MedicinalProductPharmaceutical';\nexport * from './MedicinalProductUndesirableEffect';\nexport * from './MessageDefinition';\nexport * from './MessageHeader';\nexport * from './Meta';\nexport * from './MolecularSequence';\nexport * from './Money';\nexport * from './NamingSystem';\nexport * from './Narrative';\nexport * from './NutritionOrder';\nexport * from './Observation';\nexport * from './ObservationDefinition';\nexport * from './OperationDefinition';\nexport * from './OperationOutcome';\nexport * from './Organization';\nexport * from './OrganizationAffiliation';\nexport * from './ParameterDefinition';\nexport * from './Parameters';\nexport * from './PasswordChangeRequest';\nexport * from './Patient';\nexport * from './PaymentNotice';\nexport * from './PaymentReconciliation';\nexport * from './Period';\nexport * from './Person';\nexport * from './PlanDefinition';\nexport * from './Population';\nexport * from './Practitioner';\nexport * from './PractitionerRole';\nexport * from './Procedure';\nexport * from './ProdCharacteristic';\nexport * from './ProductShelfLife';\nexport * from './Project';\nexport * from './ProjectMembership';\nexport * from './Provenance';\nexport * from './Quantity';\nexport * from './Questionnaire';\nexport * from './QuestionnaireResponse';\nexport * from './Range';\nexport * from './Ratio';\nexport * from './Reference';\nexport * from './RelatedArtifact';\nexport * from './RelatedPerson';\nexport * from './RequestGroup';\nexport * from './ResearchDefinition';\nexport * from './ResearchElementDefinition';\nexport * from './ResearchStudy';\nexport * from './ResearchSubject';\nexport * from './Resource';\nexport * from './RiskAssessment';\nexport * from './RiskEvidenceSynthesis';\nexport * from './SampledData';\nexport * from './Schedule';\nexport * from './SearchParameter';\nexport * from './ServiceRequest';\nexport * from './Signature';\nexport * from './Slot';\nexport * from './Specimen';\nexport * from './SpecimenDefinition';\nexport * from './StructureDefinition';\nexport * from './StructureMap';\nexport * from './Subscription';\nexport * from './Substance';\nexport * from './SubstanceAmount';\nexport * from './SubstanceNucleicAcid';\nexport * from './SubstancePolymer';\nexport * from './SubstanceProtein';\nexport * from './SubstanceReferenceInformation';\nexport * from './SubstanceSourceMaterial';\nexport * from './SubstanceSpecification';\nexport * from './SupplyDelivery';\nexport * from './SupplyRequest';\nexport * from './Task';\nexport * from './TerminologyCapabilities';\nexport * from './TestReport';\nexport * from './TestScript';\nexport * from './Timing';\nexport * from './TriggerDefinition';\nexport * from './UsageContext';\nexport * from './User';\nexport * from './ValueSet';\nexport * from './VerificationResult';\nexport * from './VisionPrescription';\n"]}
@@ -1,6 +0,0 @@
1
- import { Atom } from './parse';
2
- /**
3
- * Collection of FHIRPath functions.
4
- * See: https://hl7.org/fhirpath/#functions
5
- */
6
- export declare const functions: Record<string, (input: any[], ...args: Atom[]) => any>;
@@ -1,349 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.functions = void 0;
4
- const utils_1 = require("./utils");
5
- /**
6
- * Collection of FHIRPath functions.
7
- * See: https://hl7.org/fhirpath/#functions
8
- */
9
- exports.functions = {
10
- /*
11
- * 5.1 Existence
12
- * See: https://hl7.org/fhirpath/#existence
13
- */
14
- /**
15
- * Returns true if the input collection is empty ({ }) and false otherwise.
16
- *
17
- * See: https://hl7.org/fhirpath/#empty-boolean
18
- *
19
- * @param input The input collection.
20
- * @returns True if the input collection is empty ({ }) and false otherwise.
21
- */
22
- empty(input) {
23
- return input.length === 0;
24
- },
25
- /**
26
- * Returns true if the collection has any elements, and false otherwise.
27
- * This is the opposite of empty(), and as such is a shorthand for empty().not().
28
- * If the input collection is empty ({ }), the result is false.
29
- *
30
- * The function can also take an optional criteria to be applied to the collection
31
- * prior to the determination of the exists. In this case, the function is shorthand
32
- * for where(criteria).exists().
33
- *
34
- * See: https://hl7.org/fhirpath/#existscriteria-expression-boolean
35
- *
36
- * @param input
37
- * @param criteria
38
- * @returns True if the collection has any elements, and false otherwise.
39
- */
40
- exists(input, criteria) {
41
- if (criteria) {
42
- return input.filter(e => !!criteria.eval(e)).length > 0;
43
- }
44
- else {
45
- return input.length > 0;
46
- }
47
- },
48
- /**
49
- * Returns true if for every element in the input collection, criteria evaluates to true.
50
- * Otherwise, the result is false.
51
- *
52
- * If the input collection is empty ({ }), the result is true.
53
- *
54
- * See: https://hl7.org/fhirpath/#allcriteria-expression-boolean
55
- *
56
- * @param input The input collection.
57
- * @param criteria The evaluation criteria.
58
- * @returns True if for every element in the input collection, criteria evaluates to true.
59
- */
60
- all(input, criteria) {
61
- for (const value of input) {
62
- if (!criteria.eval(value)) {
63
- return false;
64
- }
65
- }
66
- return true;
67
- },
68
- /**
69
- * Takes a collection of Boolean values and returns true if all the items are true.
70
- * If any items are false, the result is false.
71
- * If the input is empty ({ }), the result is true.
72
- *
73
- * See: https://hl7.org/fhirpath/#alltrue-boolean
74
- *
75
- * @param input The input collection.
76
- * @param criteria The evaluation criteria.
77
- * @returns True if all the items are true.
78
- */
79
- allTrue(input) {
80
- for (const value of input) {
81
- if (!value) {
82
- return false;
83
- }
84
- }
85
- return true;
86
- },
87
- /**
88
- * Takes a collection of Boolean values and returns true if any of the items are true.
89
- * If all the items are false, or if the input is empty ({ }), the result is false.
90
- *
91
- * See: https://hl7.org/fhirpath/#anytrue-boolean
92
- *
93
- * @param input The input collection.
94
- * @param criteria The evaluation criteria.
95
- * @returns True if any of the items are true.
96
- */
97
- anyTrue(input) {
98
- for (const value of input) {
99
- if (value) {
100
- return true;
101
- }
102
- }
103
- return false;
104
- },
105
- /**
106
- * Takes a collection of Boolean values and returns true if all the items are false.
107
- * If any items are true, the result is false.
108
- * If the input is empty ({ }), the result is true.
109
- *
110
- * See: https://hl7.org/fhirpath/#allfalse-boolean
111
- *
112
- * @param input The input collection.
113
- * @param criteria The evaluation criteria.
114
- * @returns True if all the items are false.
115
- */
116
- allFalse(input) {
117
- for (const value of input) {
118
- if (value) {
119
- return false;
120
- }
121
- }
122
- return true;
123
- },
124
- /**
125
- * Takes a collection of Boolean values and returns true if any of the items are false.
126
- * If all the items are true, or if the input is empty ({ }), the result is false.
127
- *
128
- * See: https://hl7.org/fhirpath/#anyfalse-boolean
129
- *
130
- * @param input The input collection.
131
- * @param criteria The evaluation criteria.
132
- * @returns True if for every element in the input collection, criteria evaluates to true.
133
- */
134
- anyFalse(input) {
135
- for (const value of input) {
136
- if (!value) {
137
- return true;
138
- }
139
- }
140
- return false;
141
- },
142
- /**
143
- * Returns the integer count of the number of items in the input collection.
144
- * Returns 0 when the input collection is empty.
145
- *
146
- * See: https://hl7.org/fhirpath/#count-integer
147
- *
148
- * @param input The input collection.
149
- * @returns The integer count of the number of items in the input collection.
150
- */
151
- count(input) {
152
- return input.length;
153
- },
154
- /**
155
- * Returns a collection containing only the unique items in the input collection.
156
- * To determine whether two items are the same, the = (Equals) (=) operator is used,
157
- * as defined below.
158
- *
159
- * If the input collection is empty ({ }), the result is empty.
160
- *
161
- * Note that the order of elements in the input collection is not guaranteed to be
162
- * preserved in the result.
163
- *
164
- * See: https://hl7.org/fhirpath/#distinct-collection
165
- *
166
- * @param input The input collection.
167
- * @returns The integer count of the number of items in the input collection.
168
- */
169
- distinct(input) {
170
- return Array.from(new Set(input));
171
- },
172
- /**
173
- * Returns true if all the items in the input collection are distinct.
174
- * To determine whether two items are distinct, the = (Equals) (=) operator is used,
175
- * as defined below.
176
- *
177
- * See: https://hl7.org/fhirpath/#isdistinct-boolean
178
- *
179
- * @param input The input collection.
180
- * @returns The integer count of the number of items in the input collection.
181
- */
182
- isDistinct(input) {
183
- return input.length === new Set(input).size;
184
- },
185
- /*
186
- * 5.2 Filtering and projection
187
- */
188
- /**
189
- * Returns a collection containing only those elements in the input collection
190
- * for which the stated criteria expression evaluates to true.
191
- * Elements for which the expression evaluates to false or empty ({ }) are not
192
- * included in the result.
193
- *
194
- * If the input collection is empty ({ }), the result is empty.
195
- *
196
- * If the result of evaluating the condition is other than a single boolean value,
197
- * the evaluation will end and signal an error to the calling environment,
198
- * consistent with singleton evaluation of collections behavior.
199
- *
200
- * See: https://hl7.org/fhirpath/#wherecriteria-expression-collection
201
- *
202
- * @param input The input collection.
203
- * @param condition The condition atom.
204
- * @returns A collection containing only those elements in the input collection for which the stated criteria expression evaluates to true.
205
- */
206
- where(input, criteria) {
207
- return input.filter(e => (0, utils_1.toBoolean)(criteria.eval(e)));
208
- },
209
- /*
210
- * 5.3 Subsetting
211
- */
212
- /**
213
- * Will return the single item in the input if there is just one item.
214
- * If the input collection is empty ({ }), the result is empty.
215
- * If there are multiple items, an error is signaled to the evaluation environment.
216
- * This function is useful for ensuring that an error is returned if an assumption
217
- * about cardinality is violated at run-time.
218
- *
219
- * See: https://hl7.org/fhirpath/#single-collection
220
- *
221
- * @param input The input collection.
222
- * @returns The single item in the input if there is just one item.
223
- */
224
- single(input) {
225
- if (input.length > 1) {
226
- throw new Error('Expected input length one for single()');
227
- }
228
- return input.length === 0 ? [] : input.slice(0, 1);
229
- },
230
- /**
231
- * Returns a collection containing only the first item in the input collection.
232
- * This function is equivalent to item[0], so it will return an empty collection if the input collection has no items.
233
- *
234
- * See: https://hl7.org/fhirpath/#first-collection
235
- *
236
- * @param input The input collection.
237
- * @returns A collection containing only the first item in the input collection.
238
- */
239
- first(input) {
240
- return input.length === 0 ? [] : input.slice(0, 1);
241
- },
242
- /**
243
- * Returns a collection containing only the last item in the input collection.
244
- * Will return an empty collection if the input collection has no items.
245
- *
246
- * See: https://hl7.org/fhirpath/#last-collection
247
- *
248
- * @param input The input collection.
249
- * @returns A collection containing only the last item in the input collection.
250
- */
251
- last(input) {
252
- return input.length === 0 ? [] : input.slice(input.length - 1, input.length);
253
- },
254
- /**
255
- * Returns a collection containing all but the first item in the input collection.
256
- * Will return an empty collection if the input collection has no items, or only one item.
257
- *
258
- * See: https://hl7.org/fhirpath/#tail-collection
259
- *
260
- * @param input The input collection.
261
- * @returns A collection containing all but the first item in the input collection.
262
- */
263
- tail(input) {
264
- return input.length === 0 ? [] : input.slice(1, input.length);
265
- },
266
- /**
267
- * Returns a collection containing all but the first num items in the input collection.
268
- * Will return an empty collection if there are no items remaining after the
269
- * indicated number of items have been skipped, or if the input collection is empty.
270
- * If num is less than or equal to zero, the input collection is simply returned.
271
- *
272
- * See: https://hl7.org/fhirpath/#skipnum-integer-collection
273
- *
274
- * @param input The input collection.
275
- * @returns A collection containing all but the first item in the input collection.
276
- */
277
- skip(input, num) {
278
- const numValue = num.eval(0);
279
- if (typeof numValue !== 'number') {
280
- throw new Error('Expected a number for skip(num)');
281
- }
282
- if (numValue >= input.length) {
283
- return [];
284
- }
285
- if (numValue <= 0) {
286
- return input;
287
- }
288
- return input.slice(numValue, input.length);
289
- },
290
- /**
291
- * Returns a collection containing the first num items in the input collection,
292
- * or less if there are less than num items.
293
- * If num is less than or equal to 0, or if the input collection is empty ({ }),
294
- * take returns an empty collection.
295
- *
296
- * See: https://hl7.org/fhirpath/#takenum-integer-collection
297
- *
298
- * @param input The input collection.
299
- * @returns A collection containing the first num items in the input collection.
300
- */
301
- take(input, num) {
302
- const numValue = num.eval(0);
303
- if (typeof numValue !== 'number') {
304
- throw new Error('Expected a number for take(num)');
305
- }
306
- if (numValue >= input.length) {
307
- return input;
308
- }
309
- if (numValue <= 0) {
310
- return [];
311
- }
312
- return input.slice(0, numValue);
313
- },
314
- /*
315
- * Additional functions
316
- * See: https://hl7.org/fhir/fhirpath.html#functions
317
- */
318
- /**
319
- * For each item in the collection, if it is a string that is a uri (or canonical or url), locate the target of the reference, and add it to the resulting collection. If the item does not resolve to a resource, the item is ignored and nothing is added to the output collection.
320
- * The items in the collection may also represent a Reference, in which case the Reference.reference is resolved.
321
- * @param input The input collection.
322
- * @returns
323
- */
324
- resolve(input) {
325
- return input.map(e => {
326
- let refStr;
327
- if (typeof e === 'string') {
328
- refStr = e;
329
- }
330
- else if (typeof e === 'object') {
331
- refStr = e.reference;
332
- }
333
- if (!refStr) {
334
- return undefined;
335
- }
336
- const [resourceType, id] = refStr.split('/');
337
- return { resourceType, id };
338
- }).filter(e => !!e);
339
- },
340
- /**
341
- * The as operator can be used to treat a value as a specific type.
342
- * @param context The context value.
343
- * @returns The value as the specific type.
344
- */
345
- as(context) {
346
- return context;
347
- }
348
- };
349
- //# sourceMappingURL=functions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"functions.js","sourceRoot":"","sources":["../../src/fhirpath/functions.ts"],"names":[],"mappings":";;;AACA,mCAAoC;AAEpC;;;GAGG;AACU,QAAA,SAAS,GAA2D;IAE/E;;;OAGG;IAEH;;;;;;;OAOG;IACH,KAAK,CAAC,KAAY;QAChB,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC,CA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Q,CAAC,CAAC;IAClC,CAAC;IAED;;;OAGG;IAEH;;;;;OAKG;IACH,OAAO,CAAC,KAAY;QAClB,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE;YACnB,IAAI,MAA0B,CAAC;YAC/B,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAE;gBACzB,MAAM,GAAG,CAAC,CAAC;aACZ;iBAAM,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAE;gBAChC,MAAM,GAAG,CAAC,CAAC,SAAS,CAAC;aACtB;YACD,IAAI,CAAC,MAAM,EAAE;gBACX,OAAO,SAAS,CAAC;aAClB;YACD,MAAM,CAAC,YAAY,EAAE,EAAE,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAC7C,OAAO,EAAE,YAAY,EAAE,EAAE,EAAE,CAAC;QAC9B,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACtB,CAAC;IAED;;;;OAIG;IACH,EAAE,CAAC,OAAY;QACb,OAAO,OAAO,CAAC;IACjB,CAAC;CACF,CAAC","sourcesContent":["import { Atom } from './parse';\nimport { toBoolean } from './utils';\n\n/**\n * Collection of FHIRPath functions.\n * See: https://hl7.org/fhirpath/#functions\n */\nexport const functions: Record<string, (input: any[], ...args: Atom[]) => any> = {\n\n /*\n * 5.1 Existence\n * See: https://hl7.org/fhirpath/#existence\n */\n\n /**\n * Returns true if the input collection is empty ({ }) and false otherwise.\n *\n * See: https://hl7.org/fhirpath/#empty-boolean\n *\n * @param input The input collection.\n * @returns True if the input collection is empty ({ }) and false otherwise.\n */\n empty(input: any[]): boolean {\n return input.length === 0;\n },\n\n /**\n * Returns true if the collection has any elements, and false otherwise.\n * This is the opposite of empty(), and as such is a shorthand for empty().not().\n * If the input collection is empty ({ }), the result is false.\n *\n * The function can also take an optional criteria to be applied to the collection\n * prior to the determination of the exists. In this case, the function is shorthand\n * for where(criteria).exists().\n *\n * See: https://hl7.org/fhirpath/#existscriteria-expression-boolean\n *\n * @param input\n * @param criteria\n * @returns True if the collection has any elements, and false otherwise.\n */\n exists(input: any[], criteria?: Atom): boolean {\n if (criteria) {\n return input.filter(e => !!criteria.eval(e)).length > 0;\n } else {\n return input.length > 0;\n }\n },\n\n /**\n * Returns true if for every element in the input collection, criteria evaluates to true.\n * Otherwise, the result is false.\n *\n * If the input collection is empty ({ }), the result is true.\n *\n * See: https://hl7.org/fhirpath/#allcriteria-expression-boolean\n *\n * @param input The input collection.\n * @param criteria The evaluation criteria.\n * @returns True if for every element in the input collection, criteria evaluates to true.\n */\n all(input: any, criteria: Atom): boolean {\n for (const value of input) {\n if (!criteria.eval(value)) {\n return false;\n }\n }\n return true;\n },\n\n /**\n * Takes a collection of Boolean values and returns true if all the items are true.\n * If any items are false, the result is false.\n * If the input is empty ({ }), the result is true.\n *\n * See: https://hl7.org/fhirpath/#alltrue-boolean\n *\n * @param input The input collection.\n * @param criteria The evaluation criteria.\n * @returns True if all the items are true.\n */\n allTrue(input: any): boolean {\n for (const value of input) {\n if (!value) {\n return false;\n }\n }\n return true;\n },\n\n /**\n * Takes a collection of Boolean values and returns true if any of the items are true.\n * If all the items are false, or if the input is empty ({ }), the result is false.\n *\n * See: https://hl7.org/fhirpath/#anytrue-boolean\n *\n * @param input The input collection.\n * @param criteria The evaluation criteria.\n * @returns True if any of the items are true.\n */\n anyTrue(input: any): boolean {\n for (const value of input) {\n if (value) {\n return true;\n }\n }\n return false;\n },\n\n /**\n * Takes a collection of Boolean values and returns true if all the items are false.\n * If any items are true, the result is false.\n * If the input is empty ({ }), the result is true.\n *\n * See: https://hl7.org/fhirpath/#allfalse-boolean\n *\n * @param input The input collection.\n * @param criteria The evaluation criteria.\n * @returns True if all the items are false.\n */\n allFalse(input: any): boolean {\n for (const value of input) {\n if (value) {\n return false;\n }\n }\n return true;\n },\n\n /**\n * Takes a collection of Boolean values and returns true if any of the items are false.\n * If all the items are true, or if the input is empty ({ }), the result is false.\n *\n * See: https://hl7.org/fhirpath/#anyfalse-boolean\n *\n * @param input The input collection.\n * @param criteria The evaluation criteria.\n * @returns True if for every element in the input collection, criteria evaluates to true.\n */\n anyFalse(input: any): boolean {\n for (const value of input) {\n if (!value) {\n return true;\n }\n }\n return false;\n },\n\n /**\n * Returns the integer count of the number of items in the input collection.\n * Returns 0 when the input collection is empty.\n *\n * See: https://hl7.org/fhirpath/#count-integer\n *\n * @param input The input collection.\n * @returns The integer count of the number of items in the input collection.\n */\n count(input: any[]): number {\n return input.length;\n },\n\n /**\n * Returns a collection containing only the unique items in the input collection.\n * To determine whether two items are the same, the = (Equals) (=) operator is used,\n * as defined below.\n *\n * If the input collection is empty ({ }), the result is empty.\n *\n * Note that the order of elements in the input collection is not guaranteed to be\n * preserved in the result.\n *\n * See: https://hl7.org/fhirpath/#distinct-collection\n *\n * @param input The input collection.\n * @returns The integer count of the number of items in the input collection.\n */\n distinct(input: any[]): any[] {\n return Array.from(new Set(input));\n },\n\n /**\n * Returns true if all the items in the input collection are distinct.\n * To determine whether two items are distinct, the = (Equals) (=) operator is used,\n * as defined below.\n *\n * See: https://hl7.org/fhirpath/#isdistinct-boolean\n *\n * @param input The input collection.\n * @returns The integer count of the number of items in the input collection.\n */\n isDistinct(input: any[]): boolean {\n return input.length === new Set(input).size;\n },\n\n /*\n * 5.2 Filtering and projection\n */\n\n /**\n * Returns a collection containing only those elements in the input collection\n * for which the stated criteria expression evaluates to true.\n * Elements for which the expression evaluates to false or empty ({ }) are not\n * included in the result.\n *\n * If the input collection is empty ({ }), the result is empty.\n *\n * If the result of evaluating the condition is other than a single boolean value,\n * the evaluation will end and signal an error to the calling environment,\n * consistent with singleton evaluation of collections behavior.\n *\n * See: https://hl7.org/fhirpath/#wherecriteria-expression-collection\n *\n * @param input The input collection.\n * @param condition The condition atom.\n * @returns A collection containing only those elements in the input collection for which the stated criteria expression evaluates to true.\n */\n where(input: any[], criteria: Atom): any[] {\n return input.filter(e => toBoolean(criteria.eval(e)));\n },\n\n /*\n * 5.3 Subsetting\n */\n\n /**\n * Will return the single item in the input if there is just one item.\n * If the input collection is empty ({ }), the result is empty.\n * If there are multiple items, an error is signaled to the evaluation environment.\n * This function is useful for ensuring that an error is returned if an assumption\n * about cardinality is violated at run-time.\n *\n * See: https://hl7.org/fhirpath/#single-collection\n *\n * @param input The input collection.\n * @returns The single item in the input if there is just one item.\n */\n single(input: any[]): any[] {\n if (input.length > 1) {\n throw new Error('Expected input length one for single()');\n }\n return input.length === 0 ? [] : input.slice(0, 1);\n },\n\n /**\n * Returns a collection containing only the first item in the input collection.\n * This function is equivalent to item[0], so it will return an empty collection if the input collection has no items.\n *\n * See: https://hl7.org/fhirpath/#first-collection\n *\n * @param input The input collection.\n * @returns A collection containing only the first item in the input collection.\n */\n first(input: any[]): any[] {\n return input.length === 0 ? [] : input.slice(0, 1);\n },\n\n /**\n * Returns a collection containing only the last item in the input collection.\n * Will return an empty collection if the input collection has no items.\n *\n * See: https://hl7.org/fhirpath/#last-collection\n *\n * @param input The input collection.\n * @returns A collection containing only the last item in the input collection.\n */\n last(input: any[]): any[] {\n return input.length === 0 ? [] : input.slice(input.length - 1, input.length);\n },\n\n /**\n * Returns a collection containing all but the first item in the input collection.\n * Will return an empty collection if the input collection has no items, or only one item.\n *\n * See: https://hl7.org/fhirpath/#tail-collection\n *\n * @param input The input collection.\n * @returns A collection containing all but the first item in the input collection.\n */\n tail(input: any[]): any[] {\n return input.length === 0 ? [] : input.slice(1, input.length);\n },\n\n /**\n * Returns a collection containing all but the first num items in the input collection.\n * Will return an empty collection if there are no items remaining after the\n * indicated number of items have been skipped, or if the input collection is empty.\n * If num is less than or equal to zero, the input collection is simply returned.\n *\n * See: https://hl7.org/fhirpath/#skipnum-integer-collection\n *\n * @param input The input collection.\n * @returns A collection containing all but the first item in the input collection.\n */\n skip(input: any[], num: Atom): any[] {\n const numValue = num.eval(0);\n if (typeof numValue !== 'number') {\n throw new Error('Expected a number for skip(num)');\n }\n if (numValue >= input.length) {\n return [];\n }\n if (numValue <= 0) {\n return input;\n }\n return input.slice(numValue, input.length);\n },\n\n /**\n * Returns a collection containing the first num items in the input collection,\n * or less if there are less than num items.\n * If num is less than or equal to 0, or if the input collection is empty ({ }),\n * take returns an empty collection.\n *\n * See: https://hl7.org/fhirpath/#takenum-integer-collection\n *\n * @param input The input collection.\n * @returns A collection containing the first num items in the input collection.\n */\n take(input: any[], num: Atom): any[] {\n const numValue = num.eval(0);\n if (typeof numValue !== 'number') {\n throw new Error('Expected a number for take(num)');\n }\n if (numValue >= input.length) {\n return input;\n }\n if (numValue <= 0) {\n return [];\n }\n return input.slice(0, numValue);\n },\n\n /*\n * Additional functions\n * See: https://hl7.org/fhir/fhirpath.html#functions\n */\n\n /**\n * For each item in the collection, if it is a string that is a uri (or canonical or url), locate the target of the reference, and add it to the resulting collection. If the item does not resolve to a resource, the item is ignored and nothing is added to the output collection.\n * The items in the collection may also represent a Reference, in which case the Reference.reference is resolved.\n * @param input The input collection.\n * @returns\n */\n resolve(input: any[]): any[] {\n return input.map(e => {\n let refStr: string | undefined;\n if (typeof e === 'string') {\n refStr = e;\n } else if (typeof e === 'object') {\n refStr = e.reference;\n }\n if (!refStr) {\n return undefined;\n }\n const [resourceType, id] = refStr.split('/');\n return { resourceType, id };\n }).filter(e => !!e);\n },\n\n /**\n * The as operator can be used to treat a value as a specific type.\n * @param context The context value.\n * @returns The value as the specific type.\n */\n as(context: any): any {\n return context;\n }\n};\n"]}
@@ -1,2 +0,0 @@
1
- export * from './parse';
2
- export * from './tokenize';
@@ -1,15 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
- };
12
- Object.defineProperty(exports, "__esModule", { value: true });
13
- __exportStar(require("./parse"), exports);
14
- __exportStar(require("./tokenize"), exports);
15
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/fhirpath/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0CAAwB;AACxB,6CAA2B","sourcesContent":["export * from './parse';\nexport * from './tokenize';\n"]}