@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.
- package/README.md +32 -26
- package/dist/cjs/index.js +1818 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/index.min.js +16 -0
- package/dist/cjs/index.min.js.map +1 -0
- package/dist/esm/index.js +1769 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/index.min.js +16 -0
- package/dist/esm/index.min.js.map +1 -0
- package/dist/{cache.d.ts → types/cache.d.ts} +2 -3
- package/dist/types/client.d.ts +230 -0
- package/dist/{crypto.d.ts → types/crypto.d.ts} +0 -0
- package/dist/{eventtarget.d.ts → types/eventtarget.d.ts} +3 -3
- package/dist/{format.d.ts → types/format.d.ts} +1 -1
- package/dist/{index.d.ts → types/index.d.ts} +0 -2
- package/dist/types/jwt.d.ts +5 -0
- package/dist/{outcomes.d.ts → types/outcomes.d.ts} +7 -2
- package/dist/{search.d.ts → types/search.d.ts} +4 -0
- package/dist/{searchparams.d.ts → types/searchparams.d.ts} +1 -1
- package/dist/{storage.d.ts → types/storage.d.ts} +2 -2
- package/dist/{types.d.ts → types/types.d.ts} +18 -4
- package/dist/{utils.d.ts → types/utils.d.ts} +7 -1
- package/package.json +14 -9
- package/dist/cache.js +0 -36
- package/dist/cache.js.map +0 -1
- package/dist/client.d.ts +0 -233
- package/dist/client.js +0 -541
- package/dist/client.js.map +0 -1
- package/dist/crypto.js +0 -33
- package/dist/crypto.js.map +0 -1
- package/dist/eventtarget.js +0 -38
- package/dist/eventtarget.js.map +0 -1
- package/dist/fhir/AccessPolicy.d.ts +0 -75
- package/dist/fhir/AccessPolicy.js +0 -7
- package/dist/fhir/AccessPolicy.js.map +0 -1
- package/dist/fhir/Account.d.ts +0 -247
- package/dist/fhir/Account.js +0 -7
- package/dist/fhir/Account.js.map +0 -1
- package/dist/fhir/ActivityDefinition.d.ts +0 -500
- package/dist/fhir/ActivityDefinition.js +0 -7
- package/dist/fhir/ActivityDefinition.js.map +0 -1
- package/dist/fhir/Address.d.ts +0 -75
- package/dist/fhir/Address.js +0 -7
- package/dist/fhir/Address.js.map +0 -1
- package/dist/fhir/AdverseEvent.d.ts +0 -303
- package/dist/fhir/AdverseEvent.js +0 -7
- package/dist/fhir/AdverseEvent.js.map +0 -1
- package/dist/fhir/Age.d.ts +0 -47
- package/dist/fhir/Age.js +0 -7
- package/dist/fhir/Age.js.map +0 -1
- package/dist/fhir/AllergyIntolerance.d.ts +0 -283
- package/dist/fhir/AllergyIntolerance.js +0 -7
- package/dist/fhir/AllergyIntolerance.js.map +0 -1
- package/dist/fhir/Annotation.d.ts +0 -42
- package/dist/fhir/Annotation.js +0 -7
- package/dist/fhir/Annotation.js.map +0 -1
- package/dist/fhir/Appointment.d.ts +0 -284
- package/dist/fhir/Appointment.js +0 -7
- package/dist/fhir/Appointment.js.map +0 -1
- package/dist/fhir/AppointmentResponse.d.ts +0 -131
- package/dist/fhir/AppointmentResponse.js +0 -7
- package/dist/fhir/AppointmentResponse.js.map +0 -1
- package/dist/fhir/Attachment.d.ts +0 -58
- package/dist/fhir/Attachment.js +0 -7
- package/dist/fhir/Attachment.js.map +0 -1
- package/dist/fhir/AuditEvent.d.ts +0 -458
- package/dist/fhir/AuditEvent.js +0 -7
- package/dist/fhir/AuditEvent.js.map +0 -1
- package/dist/fhir/Basic.d.ts +0 -110
- package/dist/fhir/Basic.js +0 -7
- package/dist/fhir/Basic.js.map +0 -1
- package/dist/fhir/Binary.d.ts +0 -59
- package/dist/fhir/Binary.js +0 -7
- package/dist/fhir/Binary.js.map +0 -1
- package/dist/fhir/BiologicallyDerivedProduct.d.ts +0 -358
- package/dist/fhir/BiologicallyDerivedProduct.js +0 -7
- package/dist/fhir/BiologicallyDerivedProduct.js.map +0 -1
- package/dist/fhir/BodyStructure.d.ts +0 -119
- package/dist/fhir/BodyStructure.js +0 -7
- package/dist/fhir/BodyStructure.js.map +0 -1
- package/dist/fhir/Bot.d.ts +0 -49
- package/dist/fhir/Bot.js +0 -7
- package/dist/fhir/Bot.js.map +0 -1
- package/dist/fhir/Bundle.d.ts +0 -379
- package/dist/fhir/Bundle.js +0 -7
- package/dist/fhir/Bundle.js.map +0 -1
- package/dist/fhir/CapabilityStatement.d.ts +0 -1044
- package/dist/fhir/CapabilityStatement.js +0 -7
- package/dist/fhir/CapabilityStatement.js.map +0 -1
- package/dist/fhir/CarePlan.d.ts +0 -446
- package/dist/fhir/CarePlan.js +0 -7
- package/dist/fhir/CarePlan.js.map +0 -1
- package/dist/fhir/CareTeam.d.ts +0 -211
- package/dist/fhir/CareTeam.js +0 -7
- package/dist/fhir/CareTeam.js.map +0 -1
- package/dist/fhir/CatalogEntry.d.ts +0 -195
- package/dist/fhir/CatalogEntry.js +0 -7
- package/dist/fhir/CatalogEntry.js.map +0 -1
- package/dist/fhir/ChargeItem.d.ts +0 -287
- package/dist/fhir/ChargeItem.js +0 -7
- package/dist/fhir/ChargeItem.js.map +0 -1
- package/dist/fhir/ChargeItemDefinition.d.ts +0 -401
- package/dist/fhir/ChargeItemDefinition.js +0 -7
- package/dist/fhir/ChargeItemDefinition.js.map +0 -1
- package/dist/fhir/Claim.d.ts +0 -1092
- package/dist/fhir/Claim.js +0 -7
- package/dist/fhir/Claim.js.map +0 -1
- package/dist/fhir/ClaimResponse.d.ts +0 -1040
- package/dist/fhir/ClaimResponse.js +0 -7
- package/dist/fhir/ClaimResponse.js.map +0 -1
- package/dist/fhir/ClientApplication.d.ts +0 -46
- package/dist/fhir/ClientApplication.js +0 -7
- package/dist/fhir/ClientApplication.js.map +0 -1
- package/dist/fhir/ClinicalImpression.d.ts +0 -306
- package/dist/fhir/ClinicalImpression.js +0 -7
- package/dist/fhir/ClinicalImpression.js.map +0 -1
- package/dist/fhir/CodeSystem.d.ts +0 -541
- package/dist/fhir/CodeSystem.js +0 -7
- package/dist/fhir/CodeSystem.js.map +0 -1
- package/dist/fhir/CodeableConcept.d.ts +0 -33
- package/dist/fhir/CodeableConcept.js +0 -7
- package/dist/fhir/CodeableConcept.js.map +0 -1
- package/dist/fhir/Coding.d.ts +0 -50
- package/dist/fhir/Coding.js +0 -7
- package/dist/fhir/Coding.js.map +0 -1
- package/dist/fhir/Communication.d.ts +0 -264
- package/dist/fhir/Communication.js +0 -7
- package/dist/fhir/Communication.js.map +0 -1
- package/dist/fhir/CommunicationRequest.d.ts +0 -261
- package/dist/fhir/CommunicationRequest.js +0 -7
- package/dist/fhir/CommunicationRequest.js.map +0 -1
- package/dist/fhir/CompartmentDefinition.d.ts +0 -217
- package/dist/fhir/CompartmentDefinition.js +0 -7
- package/dist/fhir/CompartmentDefinition.js.map +0 -1
- package/dist/fhir/Composition.d.ts +0 -429
- package/dist/fhir/Composition.js +0 -7
- package/dist/fhir/Composition.js.map +0 -1
- package/dist/fhir/ConceptMap.d.ts +0 -518
- package/dist/fhir/ConceptMap.js +0 -7
- package/dist/fhir/ConceptMap.js.map +0 -1
- package/dist/fhir/Condition.d.ts +0 -326
- package/dist/fhir/Condition.js +0 -7
- package/dist/fhir/Condition.js.map +0 -1
- package/dist/fhir/Consent.d.ts +0 -460
- package/dist/fhir/Consent.js +0 -7
- package/dist/fhir/Consent.js.map +0 -1
- package/dist/fhir/ContactDetail.d.ts +0 -31
- package/dist/fhir/ContactDetail.js +0 -7
- package/dist/fhir/ContactDetail.js.map +0 -1
- package/dist/fhir/ContactPoint.d.ts +0 -47
- package/dist/fhir/ContactPoint.js +0 -7
- package/dist/fhir/ContactPoint.js.map +0 -1
- package/dist/fhir/Contract.d.ts +0 -1452
- package/dist/fhir/Contract.js +0 -7
- package/dist/fhir/Contract.js.map +0 -1
- package/dist/fhir/Contributor.d.ts +0 -37
- package/dist/fhir/Contributor.js +0 -7
- package/dist/fhir/Contributor.js.map +0 -1
- package/dist/fhir/Count.d.ts +0 -49
- package/dist/fhir/Count.js +0 -7
- package/dist/fhir/Count.js.map +0 -1
- package/dist/fhir/Coverage.d.ts +0 -327
- package/dist/fhir/Coverage.js +0 -7
- package/dist/fhir/Coverage.js.map +0 -1
- package/dist/fhir/CoverageEligibilityRequest.d.ts +0 -404
- package/dist/fhir/CoverageEligibilityRequest.js +0 -7
- package/dist/fhir/CoverageEligibilityRequest.js.map +0 -1
- package/dist/fhir/CoverageEligibilityResponse.d.ts +0 -434
- package/dist/fhir/CoverageEligibilityResponse.js +0 -7
- package/dist/fhir/CoverageEligibilityResponse.js.map +0 -1
- package/dist/fhir/DataRequirement.d.ts +0 -239
- package/dist/fhir/DataRequirement.js +0 -7
- package/dist/fhir/DataRequirement.js.map +0 -1
- package/dist/fhir/DetectedIssue.d.ts +0 -252
- package/dist/fhir/DetectedIssue.js +0 -7
- package/dist/fhir/DetectedIssue.js.map +0 -1
- package/dist/fhir/Device.d.ts +0 -493
- package/dist/fhir/Device.js +0 -7
- package/dist/fhir/Device.js.map +0 -1
- package/dist/fhir/DeviceDefinition.d.ts +0 -486
- package/dist/fhir/DeviceDefinition.js +0 -7
- package/dist/fhir/DeviceDefinition.js.map +0 -1
- package/dist/fhir/DeviceMetric.d.ts +0 -199
- package/dist/fhir/DeviceMetric.js +0 -7
- package/dist/fhir/DeviceMetric.js.map +0 -1
- package/dist/fhir/DeviceRequest.d.ts +0 -296
- package/dist/fhir/DeviceRequest.js +0 -7
- package/dist/fhir/DeviceRequest.js.map +0 -1
- package/dist/fhir/DeviceUseStatement.d.ts +0 -168
- package/dist/fhir/DeviceUseStatement.js +0 -7
- package/dist/fhir/DeviceUseStatement.js.map +0 -1
- package/dist/fhir/DiagnosticReport.d.ts +0 -254
- package/dist/fhir/DiagnosticReport.js +0 -7
- package/dist/fhir/DiagnosticReport.js.map +0 -1
- package/dist/fhir/Distance.d.ts +0 -47
- package/dist/fhir/Distance.js +0 -7
- package/dist/fhir/Distance.js.map +0 -1
- package/dist/fhir/DocumentManifest.d.ts +0 -196
- package/dist/fhir/DocumentManifest.js +0 -7
- package/dist/fhir/DocumentManifest.js.map +0 -1
- package/dist/fhir/DocumentReference.d.ts +0 -349
- package/dist/fhir/DocumentReference.js +0 -7
- package/dist/fhir/DocumentReference.js.map +0 -1
- package/dist/fhir/Dosage.d.ts +0 -152
- package/dist/fhir/Dosage.js +0 -7
- package/dist/fhir/Dosage.js.map +0 -1
- package/dist/fhir/Duration.d.ts +0 -46
- package/dist/fhir/Duration.js +0 -7
- package/dist/fhir/Duration.js.map +0 -1
- package/dist/fhir/EffectEvidenceSynthesis.d.ts +0 -591
- package/dist/fhir/EffectEvidenceSynthesis.js +0 -7
- package/dist/fhir/EffectEvidenceSynthesis.js.map +0 -1
- package/dist/fhir/Element.d.ts +0 -21
- package/dist/fhir/Element.js +0 -7
- package/dist/fhir/Element.js.map +0 -1
- package/dist/fhir/ElementDefinition.d.ts +0 -2701
- package/dist/fhir/ElementDefinition.js +0 -7
- package/dist/fhir/ElementDefinition.js.map +0 -1
- package/dist/fhir/Encounter.d.ts +0 -558
- package/dist/fhir/Encounter.js +0 -7
- package/dist/fhir/Encounter.js.map +0 -1
- package/dist/fhir/Endpoint.d.ts +0 -140
- package/dist/fhir/Endpoint.js +0 -7
- package/dist/fhir/Endpoint.js.map +0 -1
- package/dist/fhir/EnrollmentRequest.d.ts +0 -113
- package/dist/fhir/EnrollmentRequest.js +0 -7
- package/dist/fhir/EnrollmentRequest.js.map +0 -1
- package/dist/fhir/EnrollmentResponse.d.ts +0 -117
- package/dist/fhir/EnrollmentResponse.js +0 -7
- package/dist/fhir/EnrollmentResponse.js.map +0 -1
- package/dist/fhir/EpisodeOfCare.d.ts +0 -246
- package/dist/fhir/EpisodeOfCare.js +0 -7
- package/dist/fhir/EpisodeOfCare.js.map +0 -1
- package/dist/fhir/EventDefinition.d.ts +0 -253
- package/dist/fhir/EventDefinition.js +0 -7
- package/dist/fhir/EventDefinition.js.map +0 -1
- package/dist/fhir/Evidence.d.ts +0 -252
- package/dist/fhir/Evidence.js +0 -7
- package/dist/fhir/Evidence.js.map +0 -1
- package/dist/fhir/EvidenceVariable.d.ts +0 -370
- package/dist/fhir/EvidenceVariable.js +0 -7
- package/dist/fhir/EvidenceVariable.js.map +0 -1
- package/dist/fhir/ExampleScenario.d.ts +0 -628
- package/dist/fhir/ExampleScenario.js +0 -7
- package/dist/fhir/ExampleScenario.js.map +0 -1
- package/dist/fhir/ExplanationOfBenefit.d.ts +0 -1841
- package/dist/fhir/ExplanationOfBenefit.js +0 -7
- package/dist/fhir/ExplanationOfBenefit.js.map +0 -1
- package/dist/fhir/Expression.d.ts +0 -45
- package/dist/fhir/Expression.js +0 -7
- package/dist/fhir/Expression.js.map +0 -1
- package/dist/fhir/Extension.d.ts +0 -306
- package/dist/fhir/Extension.js +0 -7
- package/dist/fhir/Extension.js.map +0 -1
- package/dist/fhir/FamilyMemberHistory.d.ts +0 -306
- package/dist/fhir/FamilyMemberHistory.js +0 -7
- package/dist/fhir/FamilyMemberHistory.js.map +0 -1
- package/dist/fhir/Flag.d.ts +0 -132
- package/dist/fhir/Flag.js +0 -7
- package/dist/fhir/Flag.js.map +0 -1
- package/dist/fhir/Goal.d.ts +0 -299
- package/dist/fhir/Goal.js +0 -7
- package/dist/fhir/Goal.js.map +0 -1
- package/dist/fhir/GraphDefinition.d.ts +0 -350
- package/dist/fhir/GraphDefinition.js +0 -7
- package/dist/fhir/GraphDefinition.js.map +0 -1
- package/dist/fhir/Group.d.ts +0 -271
- package/dist/fhir/Group.js +0 -7
- package/dist/fhir/Group.js.map +0 -1
- package/dist/fhir/GuidanceResponse.d.ts +0 -196
- package/dist/fhir/GuidanceResponse.js +0 -7
- package/dist/fhir/GuidanceResponse.js.map +0 -1
- package/dist/fhir/HealthcareService.d.ts +0 -356
- package/dist/fhir/HealthcareService.js +0 -7
- package/dist/fhir/HealthcareService.js.map +0 -1
- package/dist/fhir/HumanName.d.ts +0 -58
- package/dist/fhir/HumanName.js +0 -7
- package/dist/fhir/HumanName.js.map +0 -1
- package/dist/fhir/Identifier.d.ts +0 -53
- package/dist/fhir/Identifier.js +0 -7
- package/dist/fhir/Identifier.js.map +0 -1
- package/dist/fhir/ImagingStudy.d.ts +0 -407
- package/dist/fhir/ImagingStudy.js +0 -7
- package/dist/fhir/ImagingStudy.js.map +0 -1
- package/dist/fhir/Immunization.d.ts +0 -444
- package/dist/fhir/Immunization.js +0 -7
- package/dist/fhir/Immunization.js.map +0 -1
- package/dist/fhir/ImmunizationEvaluation.d.ts +0 -149
- package/dist/fhir/ImmunizationEvaluation.js +0 -7
- package/dist/fhir/ImmunizationEvaluation.js.map +0 -1
- package/dist/fhir/ImmunizationRecommendation.d.ts +0 -254
- package/dist/fhir/ImmunizationRecommendation.js +0 -7
- package/dist/fhir/ImmunizationRecommendation.js.map +0 -1
- package/dist/fhir/ImplementationGuide.d.ts +0 -824
- package/dist/fhir/ImplementationGuide.js +0 -7
- package/dist/fhir/ImplementationGuide.js.map +0 -1
- package/dist/fhir/InsurancePlan.d.ts +0 -624
- package/dist/fhir/InsurancePlan.js +0 -7
- package/dist/fhir/InsurancePlan.js.map +0 -1
- package/dist/fhir/Invoice.d.ts +0 -346
- package/dist/fhir/Invoice.js +0 -7
- package/dist/fhir/Invoice.js.map +0 -1
- package/dist/fhir/JsonWebKey.d.ts +0 -99
- package/dist/fhir/JsonWebKey.js +0 -7
- package/dist/fhir/JsonWebKey.js.map +0 -1
- package/dist/fhir/Library.d.ts +0 -277
- package/dist/fhir/Library.js +0 -7
- package/dist/fhir/Library.js.map +0 -1
- package/dist/fhir/Linkage.d.ts +0 -146
- package/dist/fhir/Linkage.js +0 -7
- package/dist/fhir/Linkage.js.map +0 -1
- package/dist/fhir/List.d.ts +0 -200
- package/dist/fhir/List.js +0 -7
- package/dist/fhir/List.js.map +0 -1
- package/dist/fhir/Location.d.ts +0 -277
- package/dist/fhir/Location.js +0 -7
- package/dist/fhir/Location.js.map +0 -1
- package/dist/fhir/Login.d.ts +0 -119
- package/dist/fhir/Login.js +0 -7
- package/dist/fhir/Login.js.map +0 -1
- package/dist/fhir/MarketingStatus.d.ts +0 -82
- package/dist/fhir/MarketingStatus.js +0 -7
- package/dist/fhir/MarketingStatus.js.map +0 -1
- package/dist/fhir/Measure.d.ts +0 -620
- package/dist/fhir/Measure.js +0 -7
- package/dist/fhir/Measure.js.map +0 -1
- package/dist/fhir/MeasureReport.d.ts +0 -463
- package/dist/fhir/MeasureReport.js +0 -7
- package/dist/fhir/MeasureReport.js.map +0 -1
- package/dist/fhir/Media.d.ts +0 -205
- package/dist/fhir/Media.js +0 -7
- package/dist/fhir/Media.js.map +0 -1
- package/dist/fhir/Medication.d.ts +0 -230
- package/dist/fhir/Medication.js +0 -7
- package/dist/fhir/Medication.js.map +0 -1
- package/dist/fhir/MedicationAdministration.d.ts +0 -352
- package/dist/fhir/MedicationAdministration.js +0 -7
- package/dist/fhir/MedicationAdministration.js.map +0 -1
- package/dist/fhir/MedicationDispense.d.ts +0 -343
- package/dist/fhir/MedicationDispense.js +0 -7
- package/dist/fhir/MedicationDispense.js.map +0 -1
- package/dist/fhir/MedicationKnowledge.d.ts +0 -992
- package/dist/fhir/MedicationKnowledge.js +0 -7
- package/dist/fhir/MedicationKnowledge.js.map +0 -1
- package/dist/fhir/MedicationRequest.d.ts +0 -481
- package/dist/fhir/MedicationRequest.js +0 -7
- package/dist/fhir/MedicationRequest.js.map +0 -1
- package/dist/fhir/MedicationStatement.d.ts +0 -228
- package/dist/fhir/MedicationStatement.js +0 -7
- package/dist/fhir/MedicationStatement.js.map +0 -1
- package/dist/fhir/MedicinalProduct.d.ts +0 -453
- package/dist/fhir/MedicinalProduct.js +0 -7
- package/dist/fhir/MedicinalProduct.js.map +0 -1
- package/dist/fhir/MedicinalProductAuthorization.d.ts +0 -271
- package/dist/fhir/MedicinalProductAuthorization.js +0 -7
- package/dist/fhir/MedicinalProductAuthorization.js.map +0 -1
- package/dist/fhir/MedicinalProductContraindication.d.ts +0 -170
- package/dist/fhir/MedicinalProductContraindication.js +0 -7
- package/dist/fhir/MedicinalProductContraindication.js.map +0 -1
- package/dist/fhir/MedicinalProductIndication.d.ts +0 -179
- package/dist/fhir/MedicinalProductIndication.js +0 -7
- package/dist/fhir/MedicinalProductIndication.js.map +0 -1
- package/dist/fhir/MedicinalProductIngredient.d.ts +0 -336
- package/dist/fhir/MedicinalProductIngredient.js +0 -7
- package/dist/fhir/MedicinalProductIngredient.js.map +0 -1
- package/dist/fhir/MedicinalProductInteraction.d.ts +0 -158
- package/dist/fhir/MedicinalProductInteraction.js +0 -7
- package/dist/fhir/MedicinalProductInteraction.js.map +0 -1
- package/dist/fhir/MedicinalProductManufactured.d.ts +0 -113
- package/dist/fhir/MedicinalProductManufactured.js +0 -7
- package/dist/fhir/MedicinalProductManufactured.js.map +0 -1
- package/dist/fhir/MedicinalProductPackaged.d.ts +0 -259
- package/dist/fhir/MedicinalProductPackaged.js +0 -7
- package/dist/fhir/MedicinalProductPackaged.js.map +0 -1
- package/dist/fhir/MedicinalProductPharmaceutical.d.ts +0 -331
- package/dist/fhir/MedicinalProductPharmaceutical.js +0 -7
- package/dist/fhir/MedicinalProductPharmaceutical.js.map +0 -1
- package/dist/fhir/MedicinalProductUndesirableEffect.d.ts +0 -101
- package/dist/fhir/MedicinalProductUndesirableEffect.js +0 -7
- package/dist/fhir/MedicinalProductUndesirableEffect.js.map +0 -1
- package/dist/fhir/MessageDefinition.d.ts +0 -330
- package/dist/fhir/MessageDefinition.js +0 -7
- package/dist/fhir/MessageDefinition.js.map +0 -1
- package/dist/fhir/MessageHeader.d.ts +0 -323
- package/dist/fhir/MessageHeader.js +0 -7
- package/dist/fhir/MessageHeader.js.map +0 -1
- package/dist/fhir/Meta.d.ts +0 -75
- package/dist/fhir/Meta.js +0 -7
- package/dist/fhir/Meta.js.map +0 -1
- package/dist/fhir/MolecularSequence.d.ts +0 -760
- package/dist/fhir/MolecularSequence.js +0 -7
- package/dist/fhir/MolecularSequence.js.map +0 -1
- package/dist/fhir/Money.d.ts +0 -29
- package/dist/fhir/Money.js +0 -7
- package/dist/fhir/Money.js.map +0 -1
- package/dist/fhir/NamingSystem.d.ts +0 -218
- package/dist/fhir/NamingSystem.js +0 -7
- package/dist/fhir/NamingSystem.js.map +0 -1
- package/dist/fhir/Narrative.d.ts +0 -32
- package/dist/fhir/Narrative.js +0 -7
- package/dist/fhir/Narrative.js.map +0 -1
- package/dist/fhir/NutritionOrder.d.ts +0 -566
- package/dist/fhir/NutritionOrder.js +0 -7
- package/dist/fhir/NutritionOrder.js.map +0 -1
- package/dist/fhir/Observation.d.ts +0 -520
- package/dist/fhir/Observation.js +0 -7
- package/dist/fhir/Observation.js.map +0 -1
- package/dist/fhir/ObservationDefinition.d.ts +0 -278
- package/dist/fhir/ObservationDefinition.js +0 -7
- package/dist/fhir/ObservationDefinition.js.map +0 -1
- package/dist/fhir/OperationDefinition.d.ts +0 -468
- package/dist/fhir/OperationDefinition.js +0 -7
- package/dist/fhir/OperationDefinition.js.map +0 -1
- package/dist/fhir/OperationOutcome.d.ts +0 -160
- package/dist/fhir/OperationOutcome.js +0 -7
- package/dist/fhir/OperationOutcome.js.map +0 -1
- package/dist/fhir/Organization.d.ts +0 -184
- package/dist/fhir/Organization.js +0 -7
- package/dist/fhir/Organization.js.map +0 -1
- package/dist/fhir/OrganizationAffiliation.d.ts +0 -145
- package/dist/fhir/OrganizationAffiliation.js +0 -7
- package/dist/fhir/OrganizationAffiliation.js.map +0 -1
- package/dist/fhir/ParameterDefinition.d.ts +0 -57
- package/dist/fhir/ParameterDefinition.js +0 -7
- package/dist/fhir/ParameterDefinition.js.map +0 -1
- package/dist/fhir/Parameters.d.ts +0 -319
- package/dist/fhir/Parameters.js +0 -7
- package/dist/fhir/Parameters.js.map +0 -1
- package/dist/fhir/PasswordChangeRequest.d.ts +0 -51
- package/dist/fhir/PasswordChangeRequest.js +0 -7
- package/dist/fhir/PasswordChangeRequest.js.map +0 -1
- package/dist/fhir/Patient.d.ts +0 -342
- package/dist/fhir/Patient.js +0 -7
- package/dist/fhir/Patient.js.map +0 -1
- package/dist/fhir/PaymentNotice.d.ts +0 -135
- package/dist/fhir/PaymentNotice.js +0 -7
- package/dist/fhir/PaymentNotice.js.map +0 -1
- package/dist/fhir/PaymentReconciliation.d.ts +0 -280
- package/dist/fhir/PaymentReconciliation.js +0 -7
- package/dist/fhir/PaymentReconciliation.js.map +0 -1
- package/dist/fhir/Period.d.ts +0 -32
- package/dist/fhir/Period.js +0 -7
- package/dist/fhir/Period.js.map +0 -1
- package/dist/fhir/Person.d.ts +0 -175
- package/dist/fhir/Person.js +0 -7
- package/dist/fhir/Person.js.map +0 -1
- package/dist/fhir/PlanDefinition.d.ts +0 -837
- package/dist/fhir/PlanDefinition.js +0 -7
- package/dist/fhir/PlanDefinition.js.map +0 -1
- package/dist/fhir/Population.d.ts +0 -62
- package/dist/fhir/Population.js +0 -7
- package/dist/fhir/Population.js.map +0 -1
- package/dist/fhir/Practitioner.d.ts +0 -191
- package/dist/fhir/Practitioner.js +0 -7
- package/dist/fhir/Practitioner.js.map +0 -1
- package/dist/fhir/PractitionerRole.d.ts +0 -259
- package/dist/fhir/PractitionerRole.js +0 -7
- package/dist/fhir/PractitionerRole.js.map +0 -1
- package/dist/fhir/Procedure.d.ts +0 -372
- package/dist/fhir/Procedure.js +0 -7
- package/dist/fhir/Procedure.js.map +0 -1
- package/dist/fhir/ProdCharacteristic.d.ts +0 -112
- package/dist/fhir/ProdCharacteristic.js +0 -7
- package/dist/fhir/ProdCharacteristic.js.map +0 -1
- package/dist/fhir/ProductShelfLife.d.ts +0 -70
- package/dist/fhir/ProductShelfLife.js +0 -7
- package/dist/fhir/ProductShelfLife.js.map +0 -1
- package/dist/fhir/Project.d.ts +0 -43
- package/dist/fhir/Project.js +0 -7
- package/dist/fhir/Project.js.map +0 -1
- package/dist/fhir/ProjectMembership.d.ts +0 -66
- package/dist/fhir/ProjectMembership.js +0 -7
- package/dist/fhir/ProjectMembership.js.map +0 -1
- package/dist/fhir/Provenance.d.ts +0 -258
- package/dist/fhir/Provenance.js +0 -7
- package/dist/fhir/Provenance.js.map +0 -1
- package/dist/fhir/Quantity.d.ts +0 -46
- package/dist/fhir/Quantity.js +0 -7
- package/dist/fhir/Quantity.js.map +0 -1
- package/dist/fhir/Questionnaire.d.ts +0 -603
- package/dist/fhir/Questionnaire.js +0 -7
- package/dist/fhir/Questionnaire.js.map +0 -1
- package/dist/fhir/QuestionnaireResponse.d.ts +0 -313
- package/dist/fhir/QuestionnaireResponse.js +0 -7
- package/dist/fhir/QuestionnaireResponse.js.map +0 -1
- package/dist/fhir/Range.d.ts +0 -30
- package/dist/fhir/Range.js +0 -7
- package/dist/fhir/Range.js.map +0 -1
- package/dist/fhir/Ratio.d.ts +0 -30
- package/dist/fhir/Ratio.js +0 -7
- package/dist/fhir/Ratio.js.map +0 -1
- package/dist/fhir/Reference.d.ts +0 -67
- package/dist/fhir/Reference.js +0 -7
- package/dist/fhir/Reference.js.map +0 -1
- package/dist/fhir/RefreshToken.d.ts +0 -45
- package/dist/fhir/RefreshToken.js +0 -7
- package/dist/fhir/RefreshToken.js.map +0 -1
- package/dist/fhir/RelatedArtifact.d.ts +0 -57
- package/dist/fhir/RelatedArtifact.js +0 -7
- package/dist/fhir/RelatedArtifact.js.map +0 -1
- package/dist/fhir/RelatedPerson.d.ts +0 -190
- package/dist/fhir/RelatedPerson.js +0 -7
- package/dist/fhir/RelatedPerson.js.map +0 -1
- package/dist/fhir/RequestGroup.d.ts +0 -434
- package/dist/fhir/RequestGroup.js +0 -7
- package/dist/fhir/RequestGroup.js.map +0 -1
- package/dist/fhir/ResearchDefinition.d.ts +0 -291
- package/dist/fhir/ResearchDefinition.js +0 -7
- package/dist/fhir/ResearchDefinition.js.map +0 -1
- package/dist/fhir/ResearchElementDefinition.d.ts +0 -431
- package/dist/fhir/ResearchElementDefinition.js +0 -7
- package/dist/fhir/ResearchElementDefinition.js.map +0 -1
- package/dist/fhir/ResearchStudy.d.ts +0 -318
- package/dist/fhir/ResearchStudy.js +0 -7
- package/dist/fhir/ResearchStudy.js.map +0 -1
- package/dist/fhir/ResearchSubject.d.ts +0 -119
- package/dist/fhir/ResearchSubject.js +0 -7
- package/dist/fhir/ResearchSubject.js.map +0 -1
- package/dist/fhir/Resource.d.ts +0 -156
- package/dist/fhir/Resource.js +0 -7
- package/dist/fhir/Resource.js.map +0 -1
- package/dist/fhir/RiskAssessment.d.ts +0 -246
- package/dist/fhir/RiskAssessment.js +0 -7
- package/dist/fhir/RiskAssessment.js.map +0 -1
- package/dist/fhir/RiskEvidenceSynthesis.d.ts +0 -530
- package/dist/fhir/RiskEvidenceSynthesis.js +0 -7
- package/dist/fhir/RiskEvidenceSynthesis.js.map +0 -1
- package/dist/fhir/SampledData.d.ts +0 -62
- package/dist/fhir/SampledData.js +0 -7
- package/dist/fhir/SampledData.js.map +0 -1
- package/dist/fhir/Schedule.d.ts +0 -129
- package/dist/fhir/Schedule.js +0 -7
- package/dist/fhir/Schedule.js.map +0 -1
- package/dist/fhir/SearchParameter.d.ts +0 -277
- package/dist/fhir/SearchParameter.js +0 -7
- package/dist/fhir/SearchParameter.js.map +0 -1
- package/dist/fhir/ServiceRequest.d.ts +0 -309
- package/dist/fhir/ServiceRequest.js +0 -7
- package/dist/fhir/ServiceRequest.js.map +0 -1
- package/dist/fhir/Signature.d.ts +0 -71
- package/dist/fhir/Signature.js +0 -7
- package/dist/fhir/Signature.js.map +0 -1
- package/dist/fhir/Slot.d.ts +0 -134
- package/dist/fhir/Slot.js +0 -7
- package/dist/fhir/Slot.js.map +0 -1
- package/dist/fhir/Specimen.d.ts +0 -366
- package/dist/fhir/Specimen.js +0 -7
- package/dist/fhir/Specimen.js.map +0 -1
- package/dist/fhir/SpecimenDefinition.d.ts +0 -363
- package/dist/fhir/SpecimenDefinition.js +0 -7
- package/dist/fhir/SpecimenDefinition.js.map +0 -1
- package/dist/fhir/StructureDefinition.d.ts +0 -438
- package/dist/fhir/StructureDefinition.js +0 -7
- package/dist/fhir/StructureDefinition.js.map +0 -1
- package/dist/fhir/StructureMap.d.ts +0 -904
- package/dist/fhir/StructureMap.js +0 -7
- package/dist/fhir/StructureMap.js.map +0 -1
- package/dist/fhir/Subscription.d.ts +0 -172
- package/dist/fhir/Subscription.js +0 -7
- package/dist/fhir/Subscription.js.map +0 -1
- package/dist/fhir/Substance.d.ts +0 -213
- package/dist/fhir/Substance.js +0 -7
- package/dist/fhir/Substance.js.map +0 -1
- package/dist/fhir/SubstanceAmount.d.ts +0 -115
- package/dist/fhir/SubstanceAmount.js +0 -7
- package/dist/fhir/SubstanceAmount.js.map +0 -1
- package/dist/fhir/SubstanceNucleicAcid.d.ts +0 -309
- package/dist/fhir/SubstanceNucleicAcid.js +0 -7
- package/dist/fhir/SubstanceNucleicAcid.js.map +0 -1
- package/dist/fhir/SubstancePolymer.d.ts +0 -405
- package/dist/fhir/SubstancePolymer.js +0 -7
- package/dist/fhir/SubstancePolymer.js.map +0 -1
- package/dist/fhir/SubstanceProtein.d.ts +0 -218
- package/dist/fhir/SubstanceProtein.js +0 -7
- package/dist/fhir/SubstanceProtein.js.map +0 -1
- package/dist/fhir/SubstanceReferenceInformation.d.ts +0 -330
- package/dist/fhir/SubstanceReferenceInformation.js +0 -7
- package/dist/fhir/SubstanceReferenceInformation.js.map +0 -1
- package/dist/fhir/SubstanceSourceMaterial.d.ts +0 -521
- package/dist/fhir/SubstanceSourceMaterial.js +0 -7
- package/dist/fhir/SubstanceSourceMaterial.js.map +0 -1
- package/dist/fhir/SubstanceSpecification.d.ts +0 -827
- package/dist/fhir/SubstanceSpecification.js +0 -7
- package/dist/fhir/SubstanceSpecification.js.map +0 -1
- package/dist/fhir/SupplyDelivery.d.ts +0 -205
- package/dist/fhir/SupplyDelivery.js +0 -7
- package/dist/fhir/SupplyDelivery.js.map +0 -1
- package/dist/fhir/SupplyRequest.d.ts +0 -237
- package/dist/fhir/SupplyRequest.js +0 -7
- package/dist/fhir/SupplyRequest.js.map +0 -1
- package/dist/fhir/Task.d.ts +0 -807
- package/dist/fhir/Task.js +0 -7
- package/dist/fhir/Task.js.map +0 -1
- package/dist/fhir/TerminologyCapabilities.d.ts +0 -716
- package/dist/fhir/TerminologyCapabilities.js +0 -7
- package/dist/fhir/TerminologyCapabilities.js.map +0 -1
- package/dist/fhir/TestReport.d.ts +0 -549
- package/dist/fhir/TestReport.js +0 -7
- package/dist/fhir/TestReport.js.map +0 -1
- package/dist/fhir/TestScript.d.ts +0 -1184
- package/dist/fhir/TestScript.js +0 -7
- package/dist/fhir/TestScript.js.map +0 -1
- package/dist/fhir/Timing.d.ts +0 -178
- package/dist/fhir/Timing.js +0 -7
- package/dist/fhir/Timing.js.map +0 -1
- package/dist/fhir/TriggerDefinition.d.ts +0 -65
- package/dist/fhir/TriggerDefinition.js +0 -7
- package/dist/fhir/TriggerDefinition.js.map +0 -1
- package/dist/fhir/UsageContext.d.ts +0 -61
- package/dist/fhir/UsageContext.js +0 -7
- package/dist/fhir/UsageContext.js.map +0 -1
- package/dist/fhir/User.d.ts +0 -45
- package/dist/fhir/User.js +0 -7
- package/dist/fhir/User.js.map +0 -1
- package/dist/fhir/ValueSet.d.ts +0 -725
- package/dist/fhir/ValueSet.js +0 -7
- package/dist/fhir/ValueSet.js.map +0 -1
- package/dist/fhir/VerificationResult.d.ts +0 -340
- package/dist/fhir/VerificationResult.js +0 -7
- package/dist/fhir/VerificationResult.js.map +0 -1
- package/dist/fhir/VisionPrescription.d.ts +0 -264
- package/dist/fhir/VisionPrescription.js +0 -7
- package/dist/fhir/VisionPrescription.js.map +0 -1
- package/dist/fhir/index.d.ts +0 -196
- package/dist/fhir/index.js +0 -213
- package/dist/fhir/index.js.map +0 -1
- package/dist/fhirpath/functions.d.ts +0 -6
- package/dist/fhirpath/functions.js +0 -349
- package/dist/fhirpath/functions.js.map +0 -1
- package/dist/fhirpath/index.d.ts +0 -2
- package/dist/fhirpath/index.js +0 -15
- package/dist/fhirpath/index.js.map +0 -1
- package/dist/fhirpath/parse.d.ts +0 -10
- package/dist/fhirpath/parse.js +0 -266
- package/dist/fhirpath/parse.js.map +0 -1
- package/dist/fhirpath/tokenize.d.ts +0 -13
- package/dist/fhirpath/tokenize.js +0 -39
- package/dist/fhirpath/tokenize.js.map +0 -1
- package/dist/fhirpath/utils.d.ts +0 -13
- package/dist/fhirpath/utils.js +0 -34
- package/dist/fhirpath/utils.js.map +0 -1
- package/dist/format.js +0 -56
- package/dist/format.js.map +0 -1
- package/dist/index.js +0 -22
- package/dist/index.js.map +0 -1
- package/dist/jwt.d.ts +0 -5
- package/dist/jwt.js +0 -28
- package/dist/jwt.js.map +0 -1
- package/dist/outcomes.js +0 -140
- package/dist/outcomes.js.map +0 -1
- package/dist/search.js +0 -120
- package/dist/search.js.map +0 -1
- package/dist/searchparams.js +0 -129
- package/dist/searchparams.js.map +0 -1
- package/dist/storage.js +0 -90
- package/dist/storage.js.map +0 -1
- package/dist/types.js +0 -171
- package/dist/types.js.map +0 -1
- package/dist/utils.js +0 -234
- package/dist/utils.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ElementDefinition, SearchParameter, StructureDefinition } from '
|
|
1
|
+
import { ElementDefinition, SearchParameter, StructureDefinition } from '@medplum/fhirtypes';
|
|
2
2
|
/**
|
|
3
3
|
* List of property types.
|
|
4
4
|
* http://www.hl7.org/fhir/valueset-defined-types.html
|
|
@@ -109,16 +109,30 @@ export interface TypeSchema {
|
|
|
109
109
|
properties: {
|
|
110
110
|
[name: string]: ElementDefinition;
|
|
111
111
|
};
|
|
112
|
-
searchParams?:
|
|
112
|
+
searchParams?: {
|
|
113
|
+
[code: string]: SearchParameter;
|
|
114
|
+
};
|
|
113
115
|
description?: string;
|
|
114
116
|
parentType?: string;
|
|
115
117
|
}
|
|
118
|
+
/**
|
|
119
|
+
* Creates a new empty IndexedStructureDefinition.
|
|
120
|
+
* @returns The empty IndexedStructureDefinition.
|
|
121
|
+
*/
|
|
122
|
+
export declare function createSchema(): IndexedStructureDefinition;
|
|
116
123
|
/**
|
|
117
124
|
* Indexes a StructureDefinition for fast lookup.
|
|
118
125
|
* See comments on IndexedStructureDefinition for more details.
|
|
126
|
+
* @param schema The output IndexedStructureDefinition.
|
|
119
127
|
* @param structureDefinition The original StructureDefinition.
|
|
120
|
-
* @return An indexed IndexedStructureDefinition.
|
|
121
128
|
*/
|
|
122
|
-
export declare function indexStructureDefinition(
|
|
129
|
+
export declare function indexStructureDefinition(schema: IndexedStructureDefinition, structureDefinition: StructureDefinition): void;
|
|
130
|
+
/**
|
|
131
|
+
* Indexes a SearchParameter resource for fast lookup.
|
|
132
|
+
* Indexes by SearchParameter.code, which is the query string parameter name.
|
|
133
|
+
* @param schema The output IndexedStructureDefinition.
|
|
134
|
+
* @param searchParam The SearchParameter resource.
|
|
135
|
+
*/
|
|
136
|
+
export declare function indexSearchParameter(schema: IndexedStructureDefinition, searchParam: SearchParameter): void;
|
|
123
137
|
export declare function buildTypeName(components: string[]): string;
|
|
124
138
|
export declare function getPropertyDisplayName(property: ElementDefinition): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Patient, Practitioner, Reference, RelatedPerson, Resource } from '
|
|
1
|
+
import { Patient, Practitioner, Reference, RelatedPerson, Resource } from '@medplum/fhirtypes';
|
|
2
2
|
export declare type ProfileResource = Patient | Practitioner | RelatedPerson;
|
|
3
3
|
/**
|
|
4
4
|
* Creates a reference resource.
|
|
@@ -12,6 +12,12 @@ export declare function createReference<T extends Resource>(resource: T): Refere
|
|
|
12
12
|
* @returns A reference string of the form resourceType/id.
|
|
13
13
|
*/
|
|
14
14
|
export declare function getReferenceString(resource: Resource): string;
|
|
15
|
+
/**
|
|
16
|
+
* Returns the ID portion of a reference.
|
|
17
|
+
* @param reference A FHIR reference.
|
|
18
|
+
* @returns The ID portion of a reference.
|
|
19
|
+
*/
|
|
20
|
+
export declare function resolveId(reference: Reference | undefined): string | undefined;
|
|
15
21
|
/**
|
|
16
22
|
* Returns true if the resource is a "ProfileResource".
|
|
17
23
|
* @param resource The FHIR resource.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medplum/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Medplum TS/JS Library",
|
|
5
5
|
"author": "Medplum <hello@medplum.com>",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -12,15 +12,20 @@
|
|
|
12
12
|
},
|
|
13
13
|
"scripts": {
|
|
14
14
|
"clean": "rimraf dist",
|
|
15
|
-
"build": "npm run clean && tsc",
|
|
16
|
-
"
|
|
17
|
-
"
|
|
15
|
+
"build": "npm run clean && tsc && npm run rollup",
|
|
16
|
+
"rollup": "rollup --config rollup.config.js",
|
|
17
|
+
"test": "jest"
|
|
18
18
|
},
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
"main": "dist/index.js",
|
|
23
|
-
"
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@medplum/fhirtypes": "0.4.1"
|
|
21
|
+
},
|
|
22
|
+
"main": "dist/cjs/index.js",
|
|
23
|
+
"module": "dist/esm/index.js",
|
|
24
|
+
"exports": {
|
|
25
|
+
"require": "./dist/cjs/index.js",
|
|
26
|
+
"import": "./dist/esm/index.js"
|
|
27
|
+
},
|
|
28
|
+
"types": "dist/types/index.d.ts",
|
|
24
29
|
"sideEffects": false,
|
|
25
30
|
"keywords": [
|
|
26
31
|
"medplum",
|
package/dist/cache.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LRUCache = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* LRU cache (least recently used)
|
|
6
|
-
* Source: https://stackoverflow.com/a/46432113
|
|
7
|
-
*/
|
|
8
|
-
class LRUCache {
|
|
9
|
-
constructor(max = 10) {
|
|
10
|
-
this.max = max;
|
|
11
|
-
this.cache = new Map();
|
|
12
|
-
}
|
|
13
|
-
get(key) {
|
|
14
|
-
const item = this.cache.get(key);
|
|
15
|
-
if (item) {
|
|
16
|
-
this.cache.delete(key);
|
|
17
|
-
this.cache.set(key, item);
|
|
18
|
-
}
|
|
19
|
-
return item;
|
|
20
|
-
}
|
|
21
|
-
set(key, val) {
|
|
22
|
-
if (this.cache.has(key)) {
|
|
23
|
-
this.cache.delete(key);
|
|
24
|
-
}
|
|
25
|
-
else if (this.cache.size >= this.max) {
|
|
26
|
-
this.cache.delete(this.first());
|
|
27
|
-
}
|
|
28
|
-
this.cache.set(key, val);
|
|
29
|
-
}
|
|
30
|
-
first() {
|
|
31
|
-
// This works because the Map class maintains ordered keys.
|
|
32
|
-
return this.cache.keys().next().value;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
exports.LRUCache = LRUCache;
|
|
36
|
-
//# sourceMappingURL=cache.js.map
|
package/dist/cache.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cache.js","sourceRoot":"","sources":["../src/cache.ts"],"names":[],"mappings":";;;AACA;;;GAGG;AACH,MAAa,QAAQ;IAInB,YAAY,GAAG,GAAG,EAAE;QAClB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,KAAK,GAAG,IAAI,GAAG,EAAE,CAAC;IACzB,CAAC;IAED,GAAG,CAAC,GAAW;QACb,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACjC,IAAI,IAAI,EAAE;YACR,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YACvB,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;SAC3B;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,GAAG,CAAC,GAAW,EAAE,GAAM;QACrB,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;YACvB,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;SACxB;aAAM,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC,GAAG,EAAE;YACtC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;SACjC;QACD,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAC3B,CAAC;IAEO,KAAK;QACX,2DAA2D;QAC3D,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC;IACxC,CAAC;CACF;AA/BD,4BA+BC","sourcesContent":["\n/**\n * LRU cache (least recently used)\n * Source: https://stackoverflow.com/a/46432113\n */\nexport class LRUCache<T> {\n private readonly max: number;\n private readonly cache: Map<string, T>;\n\n constructor(max = 10) {\n this.max = max;\n this.cache = new Map();\n }\n\n get(key: string): T | undefined {\n const item = this.cache.get(key);\n if (item) {\n this.cache.delete(key);\n this.cache.set(key, item);\n }\n return item;\n }\n\n set(key: string, val: T) {\n if (this.cache.has(key)) {\n this.cache.delete(key);\n } else if (this.cache.size >= this.max) {\n this.cache.delete(this.first());\n }\n this.cache.set(key, val);\n }\n\n private first() {\n // This works because the Map class maintains ordered keys.\n return this.cache.keys().next().value;\n }\n}\n"]}
|
package/dist/client.d.ts
DELETED
|
@@ -1,233 +0,0 @@
|
|
|
1
|
-
import { EventTarget } from './eventtarget';
|
|
2
|
-
import { Binary, Bundle, Project, Reference, Resource, ValueSet } from './fhir';
|
|
3
|
-
import { SearchRequest } from './search';
|
|
4
|
-
import { IndexedStructureDefinition } from './types';
|
|
5
|
-
import { ProfileResource } from './utils';
|
|
6
|
-
export interface MedplumClientOptions {
|
|
7
|
-
/**
|
|
8
|
-
* The client ID.
|
|
9
|
-
* Required.
|
|
10
|
-
*/
|
|
11
|
-
clientId: string;
|
|
12
|
-
/**
|
|
13
|
-
* Base server URL.
|
|
14
|
-
* Optional. Default value is "https://api.medplum.com/".
|
|
15
|
-
* Use this to point to a custom Medplum deployment.
|
|
16
|
-
*/
|
|
17
|
-
baseUrl?: string;
|
|
18
|
-
/**
|
|
19
|
-
* OAuth2 authorize URL.
|
|
20
|
-
* Optional. Default value is baseUrl + "/oauth2/authorize".
|
|
21
|
-
* Use this if you want to use a separate OAuth server.
|
|
22
|
-
*/
|
|
23
|
-
authorizeUrl?: string;
|
|
24
|
-
/**
|
|
25
|
-
* OAuth2 token URL.
|
|
26
|
-
* Optional. Default value is baseUrl + "/oauth2/token".
|
|
27
|
-
* Use this if you want to use a separate OAuth server.
|
|
28
|
-
*/
|
|
29
|
-
tokenUrl?: string;
|
|
30
|
-
/**
|
|
31
|
-
* OAuth2 logout URL.
|
|
32
|
-
* Optional. Default value is baseUrl + "/oauth2/logout".
|
|
33
|
-
* Use this if you want to use a separate OAuth server.
|
|
34
|
-
*/
|
|
35
|
-
logoutUrl?: string;
|
|
36
|
-
/**
|
|
37
|
-
* Number of resources to store in the cache.
|
|
38
|
-
* Optional. Default value is 1000.
|
|
39
|
-
* Consider using this for performance of displaying Patient or Practitioner resources.
|
|
40
|
-
*/
|
|
41
|
-
resourceCacheSize?: number;
|
|
42
|
-
/**
|
|
43
|
-
* Number of blob URLs to store in the cache.
|
|
44
|
-
* Optional. Default value is 100.
|
|
45
|
-
* Consider using this for performance of displaying Patient or Practitioner resources.
|
|
46
|
-
*/
|
|
47
|
-
blobCacheSize?: number;
|
|
48
|
-
/**
|
|
49
|
-
* Optional fetch implementation.
|
|
50
|
-
* Optional. Default is window.fetch.
|
|
51
|
-
* For nodejs applications, consider the 'node-fetch' package.
|
|
52
|
-
*/
|
|
53
|
-
fetch?: FetchLike;
|
|
54
|
-
/**
|
|
55
|
-
* Optional callback for when the client is unauthenticated.
|
|
56
|
-
* Default is do nothing.
|
|
57
|
-
* For client side applications, consider redirecting to a sign in page.
|
|
58
|
-
*/
|
|
59
|
-
onUnauthenticated?: () => void;
|
|
60
|
-
}
|
|
61
|
-
export interface FetchLike {
|
|
62
|
-
(url: string, options?: any): Promise<any>;
|
|
63
|
-
}
|
|
64
|
-
interface LoginResponse {
|
|
65
|
-
project: Project;
|
|
66
|
-
profile: ProfileResource;
|
|
67
|
-
accessToken: string;
|
|
68
|
-
refreshToken: string;
|
|
69
|
-
}
|
|
70
|
-
export interface RegisterRequest {
|
|
71
|
-
firstName: string;
|
|
72
|
-
lastName: string;
|
|
73
|
-
projectName: string;
|
|
74
|
-
email: string;
|
|
75
|
-
password: string;
|
|
76
|
-
remember?: boolean;
|
|
77
|
-
}
|
|
78
|
-
export interface GoogleCredentialResponse {
|
|
79
|
-
readonly clientId: string;
|
|
80
|
-
readonly credential: string;
|
|
81
|
-
}
|
|
82
|
-
export declare class MedplumClient extends EventTarget {
|
|
83
|
-
private readonly fetch;
|
|
84
|
-
private readonly storage;
|
|
85
|
-
private readonly schema;
|
|
86
|
-
private readonly resourceCache;
|
|
87
|
-
private readonly blobUrlCache;
|
|
88
|
-
private readonly baseUrl;
|
|
89
|
-
private readonly clientId;
|
|
90
|
-
private readonly authorizeUrl;
|
|
91
|
-
private readonly tokenUrl;
|
|
92
|
-
private readonly logoutUrl;
|
|
93
|
-
private readonly onUnauthenticated?;
|
|
94
|
-
private activeLogin?;
|
|
95
|
-
constructor(options: MedplumClientOptions);
|
|
96
|
-
/**
|
|
97
|
-
* Clears all auth state including local storage and session storage.
|
|
98
|
-
*/
|
|
99
|
-
clear(): void;
|
|
100
|
-
get(url: string, blob?: boolean): Promise<any>;
|
|
101
|
-
post(url: string, body: any, contentType?: string): Promise<any>;
|
|
102
|
-
put(url: string, body: any, contentType?: string): Promise<any>;
|
|
103
|
-
/**
|
|
104
|
-
* Tries to register a new user.
|
|
105
|
-
* @param request The registration request.
|
|
106
|
-
* @returns Promise to the user profile resource.
|
|
107
|
-
*/
|
|
108
|
-
register(request: RegisterRequest): Promise<ProfileResource>;
|
|
109
|
-
/**
|
|
110
|
-
* Tries to sign in with email and password.
|
|
111
|
-
* @param email The user email address.
|
|
112
|
-
* @param password The user password.
|
|
113
|
-
* @param role The login role.
|
|
114
|
-
* @param scope The OAuth2 login scope.
|
|
115
|
-
* @param remember Optional flag to "remember" to generate a refresh token and persist in local storage.
|
|
116
|
-
* @returns Promise to the user profile resource.
|
|
117
|
-
*/
|
|
118
|
-
signIn(email: string, password: string, role: string, scope: string, remember?: boolean): Promise<ProfileResource>;
|
|
119
|
-
/**
|
|
120
|
-
* Tries to sign in with Google authentication.
|
|
121
|
-
* The response parameter is the result of a Google authentication.
|
|
122
|
-
* See: https://developers.google.com/identity/gsi/web/guides/handle-credential-responses-js-functions
|
|
123
|
-
* @param googleResponse The Google credential response.
|
|
124
|
-
* @returns Promise to the user profile resource.
|
|
125
|
-
*/
|
|
126
|
-
signInWithGoogle(googleResponse: GoogleCredentialResponse): Promise<ProfileResource>;
|
|
127
|
-
/**
|
|
128
|
-
* Handles a login response.
|
|
129
|
-
* This can be used for both "register" and "signIn".
|
|
130
|
-
* @param response The login response.
|
|
131
|
-
* @returns The user profile.
|
|
132
|
-
*/
|
|
133
|
-
private handleLoginResponse;
|
|
134
|
-
/**
|
|
135
|
-
* Signs out locally.
|
|
136
|
-
* Does not invalidate tokens with the server.
|
|
137
|
-
*/
|
|
138
|
-
signOut(): Promise<void>;
|
|
139
|
-
/**
|
|
140
|
-
* Tries to sign in the user.
|
|
141
|
-
* Returns true if the user is signed in.
|
|
142
|
-
* This may result in navigating away to the sign in page.
|
|
143
|
-
*/
|
|
144
|
-
signInWithRedirect(): Promise<ProfileResource | void> | undefined;
|
|
145
|
-
/**
|
|
146
|
-
* Tries to sign out the user.
|
|
147
|
-
* See: https://docs.aws.amazon.com/cognito/latest/developerguide/logout-endpoint.html
|
|
148
|
-
*/
|
|
149
|
-
signOutWithRedirect(): void;
|
|
150
|
-
fhirUrl(...path: string[]): string;
|
|
151
|
-
search<T extends Resource>(search: string | SearchRequest): Promise<Bundle<T>>;
|
|
152
|
-
/**
|
|
153
|
-
* Searches a ValueSet resource using the "expand" operation.
|
|
154
|
-
* See: https://www.hl7.org/fhir/operation-valueset-expand.html
|
|
155
|
-
* @param system The ValueSet system url.
|
|
156
|
-
* @param filter The search string.
|
|
157
|
-
* @returns Promise to expanded ValueSet.
|
|
158
|
-
*/
|
|
159
|
-
searchValueSet(system: string, filter: string): Promise<ValueSet>;
|
|
160
|
-
read<T extends Resource>(resourceType: string, id: string): Promise<T>;
|
|
161
|
-
readCached<T extends Resource>(resourceType: string, id: string): Promise<T>;
|
|
162
|
-
readReference<T extends Resource>(reference: Reference<T>): Promise<T>;
|
|
163
|
-
readCachedReference<T extends Resource>(reference: Reference<T>): Promise<T>;
|
|
164
|
-
getTypeDefinition(resourceType: string): Promise<IndexedStructureDefinition>;
|
|
165
|
-
readHistory<T extends Resource>(resourceType: string, id: string): Promise<Bundle<T>>;
|
|
166
|
-
readPatientEverything(id: string): Promise<Bundle>;
|
|
167
|
-
readBlob(url: string): Promise<Blob>;
|
|
168
|
-
readBlobAsObjectUrl(url: string): Promise<string>;
|
|
169
|
-
readCachedBlobAsObjectUrl(url: string): Promise<string>;
|
|
170
|
-
readBinary(id: string): Promise<Blob>;
|
|
171
|
-
create<T extends Resource>(resource: T): Promise<T>;
|
|
172
|
-
createBinary(data: any, contentType: string): Promise<Binary>;
|
|
173
|
-
update<T extends Resource>(resource: T): Promise<T>;
|
|
174
|
-
patch(resourceType: string, id: string, operations: any): Promise<any>;
|
|
175
|
-
graphql(gql: any): Promise<any>;
|
|
176
|
-
subscribe(criteria: string, handler: (e: Resource) => void): Promise<EventSource>;
|
|
177
|
-
getActiveLogin(): LoginResponse | undefined;
|
|
178
|
-
setActiveLogin(login: LoginResponse): void;
|
|
179
|
-
getLogins(): LoginResponse[];
|
|
180
|
-
addLogin(newLogin: LoginResponse): void;
|
|
181
|
-
getProfile(): ProfileResource | undefined;
|
|
182
|
-
/**
|
|
183
|
-
* Makes an HTTP request.
|
|
184
|
-
* @param {string} method
|
|
185
|
-
* @param {string} url
|
|
186
|
-
* @param {string=} contentType
|
|
187
|
-
* @param {Object=} body
|
|
188
|
-
* @param {boolean=} blob
|
|
189
|
-
*/
|
|
190
|
-
private request;
|
|
191
|
-
/**
|
|
192
|
-
* Handles an unauthenticated response from the server.
|
|
193
|
-
* First, tries to refresh the access token and retry the request.
|
|
194
|
-
* Otherwise, calls unauthenticated callbacks and rejects.
|
|
195
|
-
* @param method The HTTP method of the original request.
|
|
196
|
-
* @param url The URL of the original request.
|
|
197
|
-
* @param contentType The content type of the original request.
|
|
198
|
-
* @param body The body of the original request.
|
|
199
|
-
* @param blob Optional blob flag of the original request.
|
|
200
|
-
*/
|
|
201
|
-
private handleUnauthenticated;
|
|
202
|
-
/**
|
|
203
|
-
* Redirects the user to the login screen for authorization.
|
|
204
|
-
* Clears all auth state including local storage and session storage.
|
|
205
|
-
* See: https://openid.net/specs/openid-connect-core-1_0.html#AuthorizationEndpoint
|
|
206
|
-
*/
|
|
207
|
-
private requestAuthorization;
|
|
208
|
-
/**
|
|
209
|
-
* Processes an OAuth authorization code.
|
|
210
|
-
* See: https://openid.net/specs/openid-connect-core-1_0.html#TokenRequest
|
|
211
|
-
* @param code The authorization code received by URL parameter.
|
|
212
|
-
*/
|
|
213
|
-
private processCode;
|
|
214
|
-
/**
|
|
215
|
-
* Tries to refresh the auth tokens.
|
|
216
|
-
* See: https://openid.net/specs/openid-connect-core-1_0.html#RefreshTokens
|
|
217
|
-
*/
|
|
218
|
-
private refresh;
|
|
219
|
-
/**
|
|
220
|
-
* Makes a POST request to the tokens endpoint.
|
|
221
|
-
* See: https://openid.net/specs/openid-connect-core-1_0.html#TokenEndpoint
|
|
222
|
-
* @param formBody Token parameters in URL encoded format.
|
|
223
|
-
*/
|
|
224
|
-
private fetchTokens;
|
|
225
|
-
/**
|
|
226
|
-
* Verifies the tokens received from the auth server.
|
|
227
|
-
* Validates the JWT against the JWKS.
|
|
228
|
-
* See: https://openid.net/specs/openid-connect-core-1_0.html#TokenEndpoint
|
|
229
|
-
* @param tokens
|
|
230
|
-
*/
|
|
231
|
-
private verifyTokens;
|
|
232
|
-
}
|
|
233
|
-
export {};
|