@imranq2/fhirpatientsummary 1.0.0 → 1.0.2
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/lib/esm/src/generators/fhir_summary_generator.d.ts +46 -0
- package/lib/esm/src/generators/fhir_summary_generator.js +224 -0
- package/lib/esm/src/generators/narrative_generator.d.ts +40 -0
- package/lib/esm/src/generators/narrative_generator.js +76 -0
- package/lib/esm/src/narratives/templates/typescript/AdvanceDirectivesTemplate.d.ts +22 -0
- package/lib/esm/src/narratives/templates/typescript/AdvanceDirectivesTemplate.js +66 -0
- package/lib/esm/src/narratives/templates/typescript/AllergyIntoleranceTemplate.d.ts +31 -0
- package/lib/esm/src/narratives/templates/typescript/AllergyIntoleranceTemplate.js +151 -0
- package/lib/esm/src/narratives/templates/typescript/ClinicalImpressionTemplate.d.ts +15 -0
- package/lib/esm/src/narratives/templates/typescript/ClinicalImpressionTemplate.js +107 -0
- package/lib/esm/src/narratives/templates/typescript/DiagnosticResultsTemplate.d.ts +50 -0
- package/lib/esm/src/narratives/templates/typescript/DiagnosticResultsTemplate.js +149 -0
- package/lib/esm/src/narratives/templates/typescript/FamilyHistoryTemplate.d.ts +15 -0
- package/lib/esm/src/narratives/templates/typescript/FamilyHistoryTemplate.js +99 -0
- package/lib/esm/src/narratives/templates/typescript/FunctionalStatusTemplate.d.ts +22 -0
- package/lib/esm/src/narratives/templates/typescript/FunctionalStatusTemplate.js +66 -0
- package/lib/esm/src/narratives/templates/typescript/HistoryOfProceduresTemplate.d.ts +22 -0
- package/lib/esm/src/narratives/templates/typescript/HistoryOfProceduresTemplate.js +62 -0
- package/lib/esm/src/narratives/templates/typescript/ImmunizationsTemplate.d.ts +22 -0
- package/lib/esm/src/narratives/templates/typescript/ImmunizationsTemplate.js +69 -0
- package/lib/esm/src/narratives/templates/typescript/MedicalDevicesTemplate.d.ts +22 -0
- package/lib/esm/src/narratives/templates/typescript/MedicalDevicesTemplate.js +63 -0
- package/lib/esm/src/narratives/templates/typescript/MedicationSummaryTemplate.d.ts +50 -0
- package/lib/esm/src/narratives/templates/typescript/MedicationSummaryTemplate.js +202 -0
- package/lib/esm/src/narratives/templates/typescript/PastHistoryOfIllnessTemplate.d.ts +15 -0
- package/lib/esm/src/narratives/templates/typescript/PastHistoryOfIllnessTemplate.js +55 -0
- package/lib/esm/src/narratives/templates/typescript/PatientTemplate.d.ts +65 -0
- package/lib/esm/src/narratives/templates/typescript/PatientTemplate.js +154 -0
- package/lib/esm/src/narratives/templates/typescript/PlanOfCareTemplate.d.ts +15 -0
- package/lib/esm/src/narratives/templates/typescript/PlanOfCareTemplate.js +59 -0
- package/lib/esm/src/narratives/templates/typescript/PregnancyTemplate.d.ts +22 -0
- package/lib/esm/src/narratives/templates/typescript/PregnancyTemplate.js +64 -0
- package/lib/esm/src/narratives/templates/typescript/ProblemListTemplate.d.ts +22 -0
- package/lib/esm/src/narratives/templates/typescript/ProblemListTemplate.js +115 -0
- package/lib/esm/src/narratives/templates/typescript/SocialHistoryTemplate.d.ts +22 -0
- package/lib/esm/src/narratives/templates/typescript/SocialHistoryTemplate.js +66 -0
- package/lib/esm/src/narratives/templates/typescript/TemplateUtilities.d.ts +251 -0
- package/lib/esm/src/narratives/templates/typescript/TemplateUtilities.js +692 -0
- package/lib/esm/src/narratives/templates/typescript/TypeScriptTemplateMapper.d.ts +17 -0
- package/lib/esm/src/narratives/templates/typescript/TypeScriptTemplateMapper.js +60 -0
- package/lib/esm/src/narratives/templates/typescript/VitalSignsTemplate.d.ts +22 -0
- package/lib/esm/src/narratives/templates/typescript/VitalSignsTemplate.js +70 -0
- package/lib/esm/src/narratives/templates/typescript/interfaces/ITemplate.d.ts +13 -0
- package/lib/esm/src/narratives/templates/typescript/interfaces/ITemplate.js +1 -0
- package/lib/esm/src/profiles/ips_resource_profile_registry.d.ts +7 -0
- package/lib/esm/src/profiles/ips_resource_profile_registry.js +139 -0
- package/lib/esm/src/structures/ips_mandatory_sections.d.ts +7 -0
- package/lib/esm/src/structures/ips_mandatory_sections.js +8 -0
- package/lib/esm/src/structures/ips_recommended_sections.d.ts +8 -0
- package/lib/esm/src/structures/ips_recommended_sections.js +9 -0
- package/lib/esm/src/structures/ips_resource_profile.d.ts +7 -0
- package/lib/esm/src/structures/ips_resource_profile.js +1 -0
- package/lib/esm/src/structures/ips_section_loinc_codes.d.ts +4 -0
- package/lib/esm/src/structures/ips_section_loinc_codes.js +44 -0
- package/lib/esm/src/structures/ips_section_resource_map.d.ts +8 -0
- package/lib/esm/src/structures/ips_section_resource_map.js +65 -0
- package/lib/esm/src/structures/ips_sections.d.ts +19 -0
- package/lib/esm/src/structures/ips_sections.js +24 -0
- package/lib/esm/src/types/partials/Address.d.ts +16 -0
- package/lib/esm/src/types/partials/Address.js +2 -0
- package/lib/esm/src/types/partials/AllergyIntoleranceReaction.d.ts +16 -0
- package/lib/esm/src/types/partials/AllergyIntoleranceReaction.js +2 -0
- package/lib/esm/src/types/partials/Annotation.d.ts +12 -0
- package/lib/esm/src/types/partials/Annotation.js +2 -0
- package/lib/esm/src/types/partials/Attachment.d.ts +17 -0
- package/lib/esm/src/types/partials/Attachment.js +2 -0
- package/lib/esm/src/types/partials/BundleEntry.d.ts +18 -0
- package/lib/esm/src/types/partials/BundleEntry.js +2 -0
- package/lib/esm/src/types/partials/BundleLink.d.ts +9 -0
- package/lib/esm/src/types/partials/BundleLink.js +2 -0
- package/lib/esm/src/types/partials/BundleRequest.d.ts +14 -0
- package/lib/esm/src/types/partials/BundleRequest.js +2 -0
- package/lib/esm/src/types/partials/BundleResponse.d.ts +14 -0
- package/lib/esm/src/types/partials/BundleResponse.js +2 -0
- package/lib/esm/src/types/partials/BundleSearch.d.ts +9 -0
- package/lib/esm/src/types/partials/BundleSearch.js +2 -0
- package/lib/esm/src/types/partials/CarePlanActivity.d.ts +15 -0
- package/lib/esm/src/types/partials/CarePlanActivity.js +2 -0
- package/lib/esm/src/types/partials/CarePlanDetail.d.ts +33 -0
- package/lib/esm/src/types/partials/CarePlanDetail.js +2 -0
- package/lib/esm/src/types/partials/ClinicalImpressionFinding.d.ts +11 -0
- package/lib/esm/src/types/partials/ClinicalImpressionFinding.js +2 -0
- package/lib/esm/src/types/partials/ClinicalImpressionInvestigation.d.ts +10 -0
- package/lib/esm/src/types/partials/ClinicalImpressionInvestigation.js +2 -0
- package/lib/esm/src/types/partials/CodeableConcept.d.ts +8 -0
- package/lib/esm/src/types/partials/CodeableConcept.js +2 -0
- package/lib/esm/src/types/partials/CodeableReference.d.ts +9 -0
- package/lib/esm/src/types/partials/CodeableReference.js +2 -0
- package/lib/esm/src/types/partials/Coding.d.ts +11 -0
- package/lib/esm/src/types/partials/Coding.js +2 -0
- package/lib/esm/src/types/partials/CompositionAttester.d.ts +11 -0
- package/lib/esm/src/types/partials/CompositionAttester.js +2 -0
- package/lib/esm/src/types/partials/CompositionEvent.d.ts +12 -0
- package/lib/esm/src/types/partials/CompositionEvent.js +2 -0
- package/lib/esm/src/types/partials/CompositionRelatesTo.d.ts +11 -0
- package/lib/esm/src/types/partials/CompositionRelatesTo.js +2 -0
- package/lib/esm/src/types/partials/CompositionSection.d.ts +19 -0
- package/lib/esm/src/types/partials/CompositionSection.js +2 -0
- package/lib/esm/src/types/partials/ConditionEvidence.d.ts +10 -0
- package/lib/esm/src/types/partials/ConditionEvidence.js +2 -0
- package/lib/esm/src/types/partials/ConditionStage.d.ts +11 -0
- package/lib/esm/src/types/partials/ConditionStage.js +2 -0
- package/lib/esm/src/types/partials/ConsentActor.d.ts +10 -0
- package/lib/esm/src/types/partials/ConsentActor.js +2 -0
- package/lib/esm/src/types/partials/ConsentData.d.ts +9 -0
- package/lib/esm/src/types/partials/ConsentData.js +2 -0
- package/lib/esm/src/types/partials/ConsentPolicy.d.ts +9 -0
- package/lib/esm/src/types/partials/ConsentPolicy.js +2 -0
- package/lib/esm/src/types/partials/ConsentProvision.d.ts +22 -0
- package/lib/esm/src/types/partials/ConsentProvision.js +2 -0
- package/lib/esm/src/types/partials/ConsentVerification.d.ts +11 -0
- package/lib/esm/src/types/partials/ConsentVerification.js +2 -0
- package/lib/esm/src/types/partials/ContactDetail.d.ts +8 -0
- package/lib/esm/src/types/partials/ContactDetail.js +2 -0
- package/lib/esm/src/types/partials/ContactPoint.d.ts +12 -0
- package/lib/esm/src/types/partials/ContactPoint.js +2 -0
- package/lib/esm/src/types/partials/Contributor.d.ts +9 -0
- package/lib/esm/src/types/partials/Contributor.js +2 -0
- package/lib/esm/src/types/partials/DataRequirement.d.ts +21 -0
- package/lib/esm/src/types/partials/DataRequirement.js +2 -0
- package/lib/esm/src/types/partials/DataRequirementCodeFilter.d.ts +11 -0
- package/lib/esm/src/types/partials/DataRequirementCodeFilter.js +2 -0
- package/lib/esm/src/types/partials/DataRequirementDateFilter.d.ts +13 -0
- package/lib/esm/src/types/partials/DataRequirementDateFilter.js +2 -0
- package/lib/esm/src/types/partials/DataRequirementSort.d.ts +7 -0
- package/lib/esm/src/types/partials/DataRequirementSort.js +2 -0
- package/lib/esm/src/types/partials/DeviceDeviceName.d.ts +8 -0
- package/lib/esm/src/types/partials/DeviceDeviceName.js +2 -0
- package/lib/esm/src/types/partials/DeviceProperty.d.ts +11 -0
- package/lib/esm/src/types/partials/DeviceProperty.js +2 -0
- package/lib/esm/src/types/partials/DeviceSpecialization.d.ts +9 -0
- package/lib/esm/src/types/partials/DeviceSpecialization.js +2 -0
- package/lib/esm/src/types/partials/DeviceUdiCarrier.d.ts +14 -0
- package/lib/esm/src/types/partials/DeviceUdiCarrier.js +2 -0
- package/lib/esm/src/types/partials/DeviceVersion.d.ts +11 -0
- package/lib/esm/src/types/partials/DeviceVersion.js +2 -0
- package/lib/esm/src/types/partials/DiagnosticReportMedia.d.ts +9 -0
- package/lib/esm/src/types/partials/DiagnosticReportMedia.js +2 -0
- package/lib/esm/src/types/partials/Dosage.d.ts +26 -0
- package/lib/esm/src/types/partials/Dosage.js +2 -0
- package/lib/esm/src/types/partials/DosageDoseAndRate.d.ts +16 -0
- package/lib/esm/src/types/partials/DosageDoseAndRate.js +2 -0
- package/lib/esm/src/types/partials/Expression.d.ts +12 -0
- package/lib/esm/src/types/partials/Expression.js +2 -0
- package/lib/esm/src/types/partials/Extension.d.ts +99 -0
- package/lib/esm/src/types/partials/Extension.js +2 -0
- package/lib/esm/src/types/partials/FamilyMemberHistoryCondition.d.ts +19 -0
- package/lib/esm/src/types/partials/FamilyMemberHistoryCondition.js +2 -0
- package/lib/esm/src/types/partials/HumanName.d.ts +13 -0
- package/lib/esm/src/types/partials/HumanName.js +2 -0
- package/lib/esm/src/types/partials/Identifier.d.ts +15 -0
- package/lib/esm/src/types/partials/Identifier.js +2 -0
- package/lib/esm/src/types/partials/ImmunizationEducation.d.ts +12 -0
- package/lib/esm/src/types/partials/ImmunizationEducation.js +2 -0
- package/lib/esm/src/types/partials/ImmunizationPerformer.d.ts +10 -0
- package/lib/esm/src/types/partials/ImmunizationPerformer.js +2 -0
- package/lib/esm/src/types/partials/ImmunizationProtocolApplied.d.ts +16 -0
- package/lib/esm/src/types/partials/ImmunizationProtocolApplied.js +2 -0
- package/lib/esm/src/types/partials/ImmunizationReaction.d.ts +11 -0
- package/lib/esm/src/types/partials/ImmunizationReaction.js +2 -0
- package/lib/esm/src/types/partials/MedicationBatch.d.ts +9 -0
- package/lib/esm/src/types/partials/MedicationBatch.js +2 -0
- package/lib/esm/src/types/partials/MedicationIngredient.d.ts +13 -0
- package/lib/esm/src/types/partials/MedicationIngredient.js +2 -0
- package/lib/esm/src/types/partials/MedicationRequestDispenseRequest.d.ts +18 -0
- package/lib/esm/src/types/partials/MedicationRequestDispenseRequest.js +2 -0
- package/lib/esm/src/types/partials/MedicationRequestInitialFill.d.ts +9 -0
- package/lib/esm/src/types/partials/MedicationRequestInitialFill.js +2 -0
- package/lib/esm/src/types/partials/MedicationRequestSubstitution.d.ts +10 -0
- package/lib/esm/src/types/partials/MedicationRequestSubstitution.js +2 -0
- package/lib/esm/src/types/partials/Meta.d.ts +16 -0
- package/lib/esm/src/types/partials/Meta.js +2 -0
- package/lib/esm/src/types/partials/Money.d.ts +8 -0
- package/lib/esm/src/types/partials/Money.js +2 -0
- package/lib/esm/src/types/partials/Narrative.d.ts +8 -0
- package/lib/esm/src/types/partials/Narrative.js +2 -0
- package/lib/esm/src/types/partials/ObservationComponent.d.ts +31 -0
- package/lib/esm/src/types/partials/ObservationComponent.js +2 -0
- package/lib/esm/src/types/partials/ObservationReferenceRange.d.ts +15 -0
- package/lib/esm/src/types/partials/ObservationReferenceRange.js +2 -0
- package/lib/esm/src/types/partials/OrganizationContact.d.ts +14 -0
- package/lib/esm/src/types/partials/OrganizationContact.js +2 -0
- package/lib/esm/src/types/partials/ParameterDefinition.d.ts +14 -0
- package/lib/esm/src/types/partials/ParameterDefinition.js +2 -0
- package/lib/esm/src/types/partials/PatientCommunication.d.ts +9 -0
- package/lib/esm/src/types/partials/PatientCommunication.js +2 -0
- package/lib/esm/src/types/partials/PatientContact.d.ts +19 -0
- package/lib/esm/src/types/partials/PatientContact.js +2 -0
- package/lib/esm/src/types/partials/PatientLink.d.ts +9 -0
- package/lib/esm/src/types/partials/PatientLink.js +2 -0
- package/lib/esm/src/types/partials/Period.d.ts +8 -0
- package/lib/esm/src/types/partials/Period.js +2 -0
- package/lib/esm/src/types/partials/ProcedureFocalDevice.d.ts +10 -0
- package/lib/esm/src/types/partials/ProcedureFocalDevice.js +2 -0
- package/lib/esm/src/types/partials/ProcedurePerformer.d.ts +11 -0
- package/lib/esm/src/types/partials/ProcedurePerformer.js +2 -0
- package/lib/esm/src/types/partials/Quantity.d.ts +12 -0
- package/lib/esm/src/types/partials/Quantity.js +2 -0
- package/lib/esm/src/types/partials/Range.d.ts +8 -0
- package/lib/esm/src/types/partials/Range.js +2 -0
- package/lib/esm/src/types/partials/Ratio.d.ts +8 -0
- package/lib/esm/src/types/partials/Ratio.js +2 -0
- package/lib/esm/src/types/partials/RatioRange.d.ts +9 -0
- package/lib/esm/src/types/partials/RatioRange.js +2 -0
- package/lib/esm/src/types/partials/Reference.d.ts +14 -0
- package/lib/esm/src/types/partials/Reference.js +2 -0
- package/lib/esm/src/types/partials/RelatedArtifact.d.ts +16 -0
- package/lib/esm/src/types/partials/RelatedArtifact.js +2 -0
- package/lib/esm/src/types/partials/SampledData.d.ts +15 -0
- package/lib/esm/src/types/partials/SampledData.js +2 -0
- package/lib/esm/src/types/partials/Signature.d.ts +16 -0
- package/lib/esm/src/types/partials/Signature.js +2 -0
- package/lib/esm/src/types/partials/Timing.d.ts +12 -0
- package/lib/esm/src/types/partials/Timing.js +2 -0
- package/lib/esm/src/types/partials/TimingRepeat.d.ts +30 -0
- package/lib/esm/src/types/partials/TimingRepeat.js +2 -0
- package/lib/esm/src/types/partials/TriggerDefinition.d.ts +19 -0
- package/lib/esm/src/types/partials/TriggerDefinition.js +2 -0
- package/lib/esm/src/types/partials/UsageContext.d.ts +15 -0
- package/lib/esm/src/types/partials/UsageContext.js +2 -0
- package/lib/esm/src/types/resources/AllergyIntolerance.d.ts +45 -0
- package/lib/esm/src/types/resources/AllergyIntolerance.js +2 -0
- package/lib/esm/src/types/resources/Bundle.d.ts +22 -0
- package/lib/esm/src/types/resources/Bundle.js +2 -0
- package/lib/esm/src/types/resources/CarePlan.d.ts +47 -0
- package/lib/esm/src/types/resources/CarePlan.js +2 -0
- package/lib/esm/src/types/resources/ClinicalImpression.d.ts +45 -0
- package/lib/esm/src/types/resources/ClinicalImpression.js +2 -0
- package/lib/esm/src/types/resources/Composition.d.ts +39 -0
- package/lib/esm/src/types/resources/Composition.js +2 -0
- package/lib/esm/src/types/resources/Condition.d.ts +51 -0
- package/lib/esm/src/types/resources/Condition.js +2 -0
- package/lib/esm/src/types/resources/Consent.d.ts +38 -0
- package/lib/esm/src/types/resources/Consent.js +2 -0
- package/lib/esm/src/types/resources/Device.d.ts +53 -0
- package/lib/esm/src/types/resources/Device.js +2 -0
- package/lib/esm/src/types/resources/DeviceUseStatement.d.ts +38 -0
- package/lib/esm/src/types/resources/DeviceUseStatement.js +2 -0
- package/lib/esm/src/types/resources/DiagnosticReport.d.ts +43 -0
- package/lib/esm/src/types/resources/DiagnosticReport.js +2 -0
- package/lib/esm/src/types/resources/DomainResource.d.ts +16 -0
- package/lib/esm/src/types/resources/DomainResource.js +2 -0
- package/lib/esm/src/types/resources/FamilyMemberHistory.d.ts +53 -0
- package/lib/esm/src/types/resources/FamilyMemberHistory.js +2 -0
- package/lib/esm/src/types/resources/Immunization.d.ts +56 -0
- package/lib/esm/src/types/resources/Immunization.js +2 -0
- package/lib/esm/src/types/resources/Medication.d.ts +30 -0
- package/lib/esm/src/types/resources/Medication.js +2 -0
- package/lib/esm/src/types/resources/MedicationRequest.d.ts +59 -0
- package/lib/esm/src/types/resources/MedicationRequest.js +2 -0
- package/lib/esm/src/types/resources/MedicationStatement.d.ts +42 -0
- package/lib/esm/src/types/resources/MedicationStatement.js +2 -0
- package/lib/esm/src/types/resources/Observation.d.ts +69 -0
- package/lib/esm/src/types/resources/Observation.js +2 -0
- package/lib/esm/src/types/resources/Organization.d.ts +32 -0
- package/lib/esm/src/types/resources/Organization.js +2 -0
- package/lib/esm/src/types/resources/Patient.d.ts +47 -0
- package/lib/esm/src/types/resources/Patient.js +2 -0
- package/lib/esm/src/types/resources/Procedure.d.ts +59 -0
- package/lib/esm/src/types/resources/Procedure.js +2 -0
- package/lib/esm/src/types/simpleTypes/Base64Binary.d.ts +1 -0
- package/lib/esm/src/types/simpleTypes/Base64Binary.js +1 -0
- package/lib/esm/src/types/simpleTypes/Canonical.d.ts +1 -0
- package/lib/esm/src/types/simpleTypes/Canonical.js +1 -0
- package/lib/esm/src/types/simpleTypes/Date.d.ts +1 -0
- package/lib/esm/src/types/simpleTypes/Date.js +1 -0
- package/lib/esm/src/types/simpleTypes/DateTime.d.ts +1 -0
- package/lib/esm/src/types/simpleTypes/DateTime.js +1 -0
- package/lib/esm/src/types/simpleTypes/Decimal.d.ts +1 -0
- package/lib/esm/src/types/simpleTypes/Decimal.js +1 -0
- package/lib/esm/src/types/simpleTypes/Id.d.ts +1 -0
- package/lib/esm/src/types/simpleTypes/Id.js +1 -0
- package/lib/esm/src/types/simpleTypes/Instant.d.ts +1 -0
- package/lib/esm/src/types/simpleTypes/Instant.js +1 -0
- package/lib/esm/src/types/simpleTypes/Int.d.ts +1 -0
- package/lib/esm/src/types/simpleTypes/Int.js +1 -0
- package/lib/esm/src/types/simpleTypes/Markdown.d.ts +1 -0
- package/lib/esm/src/types/simpleTypes/Markdown.js +1 -0
- package/lib/esm/src/types/simpleTypes/Oid.d.ts +1 -0
- package/lib/esm/src/types/simpleTypes/Oid.js +1 -0
- package/lib/esm/src/types/simpleTypes/ResourceContainer.d.ts +1 -0
- package/lib/esm/src/types/simpleTypes/ResourceContainer.js +1 -0
- package/lib/esm/src/types/simpleTypes/Time.d.ts +1 -0
- package/lib/esm/src/types/simpleTypes/Time.js +1 -0
- package/lib/esm/src/types/simpleTypes/UnsignedInt.d.ts +1 -0
- package/lib/esm/src/types/simpleTypes/UnsignedInt.js +1 -0
- package/lib/esm/src/types/simpleTypes/Uri.d.ts +1 -0
- package/lib/esm/src/types/simpleTypes/Uri.js +1 -0
- package/lib/esm/src/types/simpleTypes/Url.d.ts +1 -0
- package/lib/esm/src/types/simpleTypes/Url.js +1 -0
- package/lib/esm/src/types/simpleTypes/Uuid.d.ts +1 -0
- package/lib/esm/src/types/simpleTypes/Uuid.js +1 -0
- package/lib/esm/src/types/simpleTypes/Xhtml.d.ts +1 -0
- package/lib/esm/src/types/simpleTypes/Xhtml.js +1 -0
- package/lib/esm/test/fhir-summary-bundle/fhir-summary-bundle.test.d.ts +1 -0
- package/lib/esm/test/fhir-summary-bundle/fhir-summary-bundle.test.js +67 -0
- package/lib/esm/test/ips-test/ips.test.d.ts +1 -0
- package/lib/esm/test/ips-test/ips.test.js +387 -0
- package/lib/esm/test/narrativeGenerator/narrativeGenerator.test.d.ts +1 -0
- package/lib/esm/test/narrativeGenerator/narrativeGenerator.test.js +641 -0
- package/lib/esm/test/summary.test.d.ts +1 -0
- package/lib/esm/test/summary.test.js +450 -0
- package/lib/esm/test/utilities/testHelpers.d.ts +21 -0
- package/lib/esm/test/utilities/testHelpers.js +129 -0
- package/package.json +11 -3
- /package/lib/{src → cjs/src}/generators/fhir_summary_generator.d.ts +0 -0
- /package/lib/{src → cjs/src}/generators/fhir_summary_generator.js +0 -0
- /package/lib/{src → cjs/src}/generators/narrative_generator.d.ts +0 -0
- /package/lib/{src → cjs/src}/generators/narrative_generator.js +0 -0
- /package/lib/{src → cjs/src}/narratives/templates/typescript/AdvanceDirectivesTemplate.d.ts +0 -0
- /package/lib/{src → cjs/src}/narratives/templates/typescript/AdvanceDirectivesTemplate.js +0 -0
- /package/lib/{src → cjs/src}/narratives/templates/typescript/AllergyIntoleranceTemplate.d.ts +0 -0
- /package/lib/{src → cjs/src}/narratives/templates/typescript/AllergyIntoleranceTemplate.js +0 -0
- /package/lib/{src → cjs/src}/narratives/templates/typescript/ClinicalImpressionTemplate.d.ts +0 -0
- /package/lib/{src → cjs/src}/narratives/templates/typescript/ClinicalImpressionTemplate.js +0 -0
- /package/lib/{src → cjs/src}/narratives/templates/typescript/DiagnosticResultsTemplate.d.ts +0 -0
- /package/lib/{src → cjs/src}/narratives/templates/typescript/DiagnosticResultsTemplate.js +0 -0
- /package/lib/{src → cjs/src}/narratives/templates/typescript/FamilyHistoryTemplate.d.ts +0 -0
- /package/lib/{src → cjs/src}/narratives/templates/typescript/FamilyHistoryTemplate.js +0 -0
- /package/lib/{src → cjs/src}/narratives/templates/typescript/FunctionalStatusTemplate.d.ts +0 -0
- /package/lib/{src → cjs/src}/narratives/templates/typescript/FunctionalStatusTemplate.js +0 -0
- /package/lib/{src → cjs/src}/narratives/templates/typescript/HistoryOfProceduresTemplate.d.ts +0 -0
- /package/lib/{src → cjs/src}/narratives/templates/typescript/HistoryOfProceduresTemplate.js +0 -0
- /package/lib/{src → cjs/src}/narratives/templates/typescript/ImmunizationsTemplate.d.ts +0 -0
- /package/lib/{src → cjs/src}/narratives/templates/typescript/ImmunizationsTemplate.js +0 -0
- /package/lib/{src → cjs/src}/narratives/templates/typescript/MedicalDevicesTemplate.d.ts +0 -0
- /package/lib/{src → cjs/src}/narratives/templates/typescript/MedicalDevicesTemplate.js +0 -0
- /package/lib/{src → cjs/src}/narratives/templates/typescript/MedicationSummaryTemplate.d.ts +0 -0
- /package/lib/{src → cjs/src}/narratives/templates/typescript/MedicationSummaryTemplate.js +0 -0
- /package/lib/{src → cjs/src}/narratives/templates/typescript/PastHistoryOfIllnessTemplate.d.ts +0 -0
- /package/lib/{src → cjs/src}/narratives/templates/typescript/PastHistoryOfIllnessTemplate.js +0 -0
- /package/lib/{src → cjs/src}/narratives/templates/typescript/PatientTemplate.d.ts +0 -0
- /package/lib/{src → cjs/src}/narratives/templates/typescript/PatientTemplate.js +0 -0
- /package/lib/{src → cjs/src}/narratives/templates/typescript/PlanOfCareTemplate.d.ts +0 -0
- /package/lib/{src → cjs/src}/narratives/templates/typescript/PlanOfCareTemplate.js +0 -0
- /package/lib/{src → cjs/src}/narratives/templates/typescript/PregnancyTemplate.d.ts +0 -0
- /package/lib/{src → cjs/src}/narratives/templates/typescript/PregnancyTemplate.js +0 -0
- /package/lib/{src → cjs/src}/narratives/templates/typescript/ProblemListTemplate.d.ts +0 -0
- /package/lib/{src → cjs/src}/narratives/templates/typescript/ProblemListTemplate.js +0 -0
- /package/lib/{src → cjs/src}/narratives/templates/typescript/SocialHistoryTemplate.d.ts +0 -0
- /package/lib/{src → cjs/src}/narratives/templates/typescript/SocialHistoryTemplate.js +0 -0
- /package/lib/{src → cjs/src}/narratives/templates/typescript/TemplateUtilities.d.ts +0 -0
- /package/lib/{src → cjs/src}/narratives/templates/typescript/TemplateUtilities.js +0 -0
- /package/lib/{src → cjs/src}/narratives/templates/typescript/TypeScriptTemplateMapper.d.ts +0 -0
- /package/lib/{src → cjs/src}/narratives/templates/typescript/TypeScriptTemplateMapper.js +0 -0
- /package/lib/{src → cjs/src}/narratives/templates/typescript/VitalSignsTemplate.d.ts +0 -0
- /package/lib/{src → cjs/src}/narratives/templates/typescript/VitalSignsTemplate.js +0 -0
- /package/lib/{src → cjs/src}/narratives/templates/typescript/interfaces/ITemplate.d.ts +0 -0
- /package/lib/{src → cjs/src}/narratives/templates/typescript/interfaces/ITemplate.js +0 -0
- /package/lib/{src → cjs/src}/profiles/ips_resource_profile_registry.d.ts +0 -0
- /package/lib/{src → cjs/src}/profiles/ips_resource_profile_registry.js +0 -0
- /package/lib/{src → cjs/src}/structures/ips_mandatory_sections.d.ts +0 -0
- /package/lib/{src → cjs/src}/structures/ips_mandatory_sections.js +0 -0
- /package/lib/{src → cjs/src}/structures/ips_recommended_sections.d.ts +0 -0
- /package/lib/{src → cjs/src}/structures/ips_recommended_sections.js +0 -0
- /package/lib/{src → cjs/src}/structures/ips_resource_profile.d.ts +0 -0
- /package/lib/{src → cjs/src}/structures/ips_resource_profile.js +0 -0
- /package/lib/{src → cjs/src}/structures/ips_section_loinc_codes.d.ts +0 -0
- /package/lib/{src → cjs/src}/structures/ips_section_loinc_codes.js +0 -0
- /package/lib/{src → cjs/src}/structures/ips_section_resource_map.d.ts +0 -0
- /package/lib/{src → cjs/src}/structures/ips_section_resource_map.js +0 -0
- /package/lib/{src → cjs/src}/structures/ips_sections.d.ts +0 -0
- /package/lib/{src → cjs/src}/structures/ips_sections.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/Address.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/Address.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/AllergyIntoleranceReaction.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/AllergyIntoleranceReaction.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/Annotation.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/Annotation.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/Attachment.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/Attachment.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/BundleEntry.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/BundleEntry.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/BundleLink.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/BundleLink.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/BundleRequest.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/BundleRequest.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/BundleResponse.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/BundleResponse.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/BundleSearch.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/BundleSearch.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/CarePlanActivity.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/CarePlanActivity.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/CarePlanDetail.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/CarePlanDetail.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/ClinicalImpressionFinding.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/ClinicalImpressionFinding.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/ClinicalImpressionInvestigation.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/ClinicalImpressionInvestigation.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/CodeableConcept.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/CodeableConcept.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/CodeableReference.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/CodeableReference.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/Coding.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/Coding.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/CompositionAttester.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/CompositionAttester.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/CompositionEvent.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/CompositionEvent.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/CompositionRelatesTo.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/CompositionRelatesTo.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/CompositionSection.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/CompositionSection.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/ConditionEvidence.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/ConditionEvidence.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/ConditionStage.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/ConditionStage.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/ConsentActor.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/ConsentActor.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/ConsentData.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/ConsentData.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/ConsentPolicy.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/ConsentPolicy.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/ConsentProvision.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/ConsentProvision.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/ConsentVerification.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/ConsentVerification.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/ContactDetail.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/ContactDetail.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/ContactPoint.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/ContactPoint.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/Contributor.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/Contributor.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/DataRequirement.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/DataRequirement.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/DataRequirementCodeFilter.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/DataRequirementCodeFilter.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/DataRequirementDateFilter.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/DataRequirementDateFilter.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/DataRequirementSort.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/DataRequirementSort.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/DeviceDeviceName.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/DeviceDeviceName.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/DeviceProperty.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/DeviceProperty.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/DeviceSpecialization.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/DeviceSpecialization.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/DeviceUdiCarrier.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/DeviceUdiCarrier.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/DeviceVersion.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/DeviceVersion.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/DiagnosticReportMedia.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/DiagnosticReportMedia.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/Dosage.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/Dosage.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/DosageDoseAndRate.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/DosageDoseAndRate.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/Expression.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/Expression.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/Extension.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/Extension.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/FamilyMemberHistoryCondition.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/FamilyMemberHistoryCondition.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/HumanName.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/HumanName.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/Identifier.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/Identifier.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/ImmunizationEducation.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/ImmunizationEducation.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/ImmunizationPerformer.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/ImmunizationPerformer.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/ImmunizationProtocolApplied.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/ImmunizationProtocolApplied.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/ImmunizationReaction.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/ImmunizationReaction.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/MedicationBatch.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/MedicationBatch.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/MedicationIngredient.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/MedicationIngredient.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/MedicationRequestDispenseRequest.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/MedicationRequestDispenseRequest.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/MedicationRequestInitialFill.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/MedicationRequestInitialFill.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/MedicationRequestSubstitution.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/MedicationRequestSubstitution.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/Meta.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/Meta.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/Money.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/Money.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/Narrative.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/Narrative.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/ObservationComponent.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/ObservationComponent.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/ObservationReferenceRange.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/ObservationReferenceRange.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/OrganizationContact.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/OrganizationContact.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/ParameterDefinition.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/ParameterDefinition.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/PatientCommunication.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/PatientCommunication.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/PatientContact.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/PatientContact.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/PatientLink.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/PatientLink.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/Period.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/Period.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/ProcedureFocalDevice.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/ProcedureFocalDevice.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/ProcedurePerformer.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/ProcedurePerformer.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/Quantity.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/Quantity.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/Range.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/Range.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/Ratio.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/Ratio.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/RatioRange.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/RatioRange.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/Reference.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/Reference.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/RelatedArtifact.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/RelatedArtifact.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/SampledData.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/SampledData.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/Signature.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/Signature.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/Timing.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/Timing.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/TimingRepeat.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/TimingRepeat.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/TriggerDefinition.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/TriggerDefinition.js +0 -0
- /package/lib/{src → cjs/src}/types/partials/UsageContext.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/partials/UsageContext.js +0 -0
- /package/lib/{src → cjs/src}/types/resources/AllergyIntolerance.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/resources/AllergyIntolerance.js +0 -0
- /package/lib/{src → cjs/src}/types/resources/Bundle.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/resources/Bundle.js +0 -0
- /package/lib/{src → cjs/src}/types/resources/CarePlan.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/resources/CarePlan.js +0 -0
- /package/lib/{src → cjs/src}/types/resources/ClinicalImpression.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/resources/ClinicalImpression.js +0 -0
- /package/lib/{src → cjs/src}/types/resources/Composition.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/resources/Composition.js +0 -0
- /package/lib/{src → cjs/src}/types/resources/Condition.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/resources/Condition.js +0 -0
- /package/lib/{src → cjs/src}/types/resources/Consent.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/resources/Consent.js +0 -0
- /package/lib/{src → cjs/src}/types/resources/Device.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/resources/Device.js +0 -0
- /package/lib/{src → cjs/src}/types/resources/DeviceUseStatement.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/resources/DeviceUseStatement.js +0 -0
- /package/lib/{src → cjs/src}/types/resources/DiagnosticReport.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/resources/DiagnosticReport.js +0 -0
- /package/lib/{src → cjs/src}/types/resources/DomainResource.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/resources/DomainResource.js +0 -0
- /package/lib/{src → cjs/src}/types/resources/FamilyMemberHistory.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/resources/FamilyMemberHistory.js +0 -0
- /package/lib/{src → cjs/src}/types/resources/Immunization.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/resources/Immunization.js +0 -0
- /package/lib/{src → cjs/src}/types/resources/Medication.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/resources/Medication.js +0 -0
- /package/lib/{src → cjs/src}/types/resources/MedicationRequest.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/resources/MedicationRequest.js +0 -0
- /package/lib/{src → cjs/src}/types/resources/MedicationStatement.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/resources/MedicationStatement.js +0 -0
- /package/lib/{src → cjs/src}/types/resources/Observation.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/resources/Observation.js +0 -0
- /package/lib/{src → cjs/src}/types/resources/Organization.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/resources/Organization.js +0 -0
- /package/lib/{src → cjs/src}/types/resources/Patient.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/resources/Patient.js +0 -0
- /package/lib/{src → cjs/src}/types/resources/Procedure.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/resources/Procedure.js +0 -0
- /package/lib/{src → cjs/src}/types/simpleTypes/Base64Binary.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/simpleTypes/Base64Binary.js +0 -0
- /package/lib/{src → cjs/src}/types/simpleTypes/Canonical.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/simpleTypes/Canonical.js +0 -0
- /package/lib/{src → cjs/src}/types/simpleTypes/Date.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/simpleTypes/Date.js +0 -0
- /package/lib/{src → cjs/src}/types/simpleTypes/DateTime.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/simpleTypes/DateTime.js +0 -0
- /package/lib/{src → cjs/src}/types/simpleTypes/Decimal.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/simpleTypes/Decimal.js +0 -0
- /package/lib/{src → cjs/src}/types/simpleTypes/Id.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/simpleTypes/Id.js +0 -0
- /package/lib/{src → cjs/src}/types/simpleTypes/Instant.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/simpleTypes/Instant.js +0 -0
- /package/lib/{src → cjs/src}/types/simpleTypes/Int.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/simpleTypes/Int.js +0 -0
- /package/lib/{src → cjs/src}/types/simpleTypes/Markdown.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/simpleTypes/Markdown.js +0 -0
- /package/lib/{src → cjs/src}/types/simpleTypes/Oid.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/simpleTypes/Oid.js +0 -0
- /package/lib/{src → cjs/src}/types/simpleTypes/ResourceContainer.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/simpleTypes/ResourceContainer.js +0 -0
- /package/lib/{src → cjs/src}/types/simpleTypes/Time.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/simpleTypes/Time.js +0 -0
- /package/lib/{src → cjs/src}/types/simpleTypes/UnsignedInt.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/simpleTypes/UnsignedInt.js +0 -0
- /package/lib/{src → cjs/src}/types/simpleTypes/Uri.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/simpleTypes/Uri.js +0 -0
- /package/lib/{src → cjs/src}/types/simpleTypes/Url.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/simpleTypes/Url.js +0 -0
- /package/lib/{src → cjs/src}/types/simpleTypes/Uuid.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/simpleTypes/Uuid.js +0 -0
- /package/lib/{src → cjs/src}/types/simpleTypes/Xhtml.d.ts +0 -0
- /package/lib/{src → cjs/src}/types/simpleTypes/Xhtml.js +0 -0
- /package/lib/{test → cjs/test}/fhir-summary-bundle/fhir-summary-bundle.test.d.ts +0 -0
- /package/lib/{test → cjs/test}/fhir-summary-bundle/fhir-summary-bundle.test.js +0 -0
- /package/lib/{test → cjs/test}/ips-test/ips.test.d.ts +0 -0
- /package/lib/{test → cjs/test}/ips-test/ips.test.js +0 -0
- /package/lib/{test → cjs/test}/narrativeGenerator/narrativeGenerator.test.d.ts +0 -0
- /package/lib/{test → cjs/test}/narrativeGenerator/narrativeGenerator.test.js +0 -0
- /package/lib/{test → cjs/test}/summary.test.d.ts +0 -0
- /package/lib/{test → cjs/test}/summary.test.js +0 -0
- /package/lib/{test → cjs/test}/utilities/testHelpers.d.ts +0 -0
- /package/lib/{test → cjs/test}/utilities/testHelpers.js +0 -0
|
@@ -0,0 +1,641 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import * as path from 'path';
|
|
11
|
+
import { NarrativeGenerator } from '../../src/generators/narrative_generator';
|
|
12
|
+
import { IPSSections } from '../../src/structures/ips_sections';
|
|
13
|
+
import { IPS_SECTION_DISPLAY_NAMES, IPS_SECTION_LOINC_CODES } from "../../src/structures/ips_section_loinc_codes";
|
|
14
|
+
import { compareNarratives, readNarrativeFile } from "../utilities/testHelpers";
|
|
15
|
+
describe('Narrative Generator Tests', () => {
|
|
16
|
+
// Mock Resources for Testing
|
|
17
|
+
const mockPatient = {
|
|
18
|
+
resourceType: 'Patient',
|
|
19
|
+
id: 'test-patient-01',
|
|
20
|
+
identifier: [{ system: 'https://example.org', value: '12345' }],
|
|
21
|
+
name: [{ family: 'Doe', given: ['John'] }],
|
|
22
|
+
gender: 'male',
|
|
23
|
+
birthDate: '1980-01-01'
|
|
24
|
+
};
|
|
25
|
+
const mockAllergies = [
|
|
26
|
+
{
|
|
27
|
+
resourceType: 'AllergyIntolerance',
|
|
28
|
+
id: 'allergy-01',
|
|
29
|
+
clinicalStatus: { coding: [{ code: 'active' }] },
|
|
30
|
+
verificationStatus: { coding: [{ code: 'confirmed' }] },
|
|
31
|
+
code: { text: 'Penicillin' },
|
|
32
|
+
patient: { reference: 'Patient/test-patient-01' }
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
resourceType: 'AllergyIntolerance',
|
|
36
|
+
id: 'allergy-02',
|
|
37
|
+
clinicalStatus: { coding: [{ code: 'active' }] },
|
|
38
|
+
verificationStatus: { coding: [{ code: 'confirmed' }] },
|
|
39
|
+
code: { text: 'Peanuts' },
|
|
40
|
+
patient: { reference: 'Patient/test-patient-01' },
|
|
41
|
+
reaction: [
|
|
42
|
+
{
|
|
43
|
+
manifestation: [
|
|
44
|
+
{ text: 'Anaphylaxis' }
|
|
45
|
+
],
|
|
46
|
+
severity: 'severe'
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
resourceType: 'AllergyIntolerance',
|
|
52
|
+
id: 'allergy-03',
|
|
53
|
+
clinicalStatus: { coding: [{ code: 'inactive' }] },
|
|
54
|
+
verificationStatus: { coding: [{ code: 'confirmed' }] },
|
|
55
|
+
code: { text: 'Latex' },
|
|
56
|
+
patient: { reference: 'Patient/test-patient-01' },
|
|
57
|
+
reaction: [
|
|
58
|
+
{
|
|
59
|
+
manifestation: [
|
|
60
|
+
{ text: 'Skin rash' }
|
|
61
|
+
],
|
|
62
|
+
severity: 'moderate'
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
];
|
|
67
|
+
const mockMedications = [
|
|
68
|
+
{
|
|
69
|
+
resourceType: 'MedicationStatement',
|
|
70
|
+
id: 'med-01',
|
|
71
|
+
status: 'active',
|
|
72
|
+
medicationCodeableConcept: { text: 'Aspirin' },
|
|
73
|
+
subject: { reference: 'Patient/test-patient-01' }
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
resourceType: 'MedicationStatement',
|
|
77
|
+
id: 'med-02',
|
|
78
|
+
status: 'active',
|
|
79
|
+
medicationCodeableConcept: { text: 'Lisinopril' },
|
|
80
|
+
subject: { reference: 'Patient/test-patient-01' },
|
|
81
|
+
dosage: [
|
|
82
|
+
{
|
|
83
|
+
text: '10mg daily',
|
|
84
|
+
timing: {
|
|
85
|
+
repeat: {
|
|
86
|
+
frequency: 1,
|
|
87
|
+
period: 1,
|
|
88
|
+
periodUnit: 'd'
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
resourceType: 'MedicationStatement',
|
|
96
|
+
id: 'med-03',
|
|
97
|
+
status: 'completed',
|
|
98
|
+
medicationCodeableConcept: { text: 'Amoxicillin' },
|
|
99
|
+
subject: { reference: 'Patient/test-patient-01' },
|
|
100
|
+
dosage: [
|
|
101
|
+
{
|
|
102
|
+
text: '500mg three times daily',
|
|
103
|
+
timing: {
|
|
104
|
+
repeat: {
|
|
105
|
+
frequency: 3,
|
|
106
|
+
period: 1,
|
|
107
|
+
periodUnit: 'd'
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
],
|
|
112
|
+
effectivePeriod: {
|
|
113
|
+
start: '2023-12-01',
|
|
114
|
+
end: '2023-12-10'
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
];
|
|
118
|
+
const mockConditions = [
|
|
119
|
+
{
|
|
120
|
+
resourceType: 'Condition',
|
|
121
|
+
id: 'condition-01',
|
|
122
|
+
clinicalStatus: { coding: [{ code: 'active' }] },
|
|
123
|
+
verificationStatus: { coding: [{ code: 'confirmed' }] },
|
|
124
|
+
code: { text: 'Hypertension' },
|
|
125
|
+
subject: { reference: 'Patient/test-patient-01' }
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
resourceType: 'Condition',
|
|
129
|
+
id: 'condition-02',
|
|
130
|
+
clinicalStatus: { coding: [{ code: 'active' }] },
|
|
131
|
+
verificationStatus: { coding: [{ code: 'confirmed' }] },
|
|
132
|
+
code: { text: 'Type 2 Diabetes Mellitus' },
|
|
133
|
+
subject: { reference: 'Patient/test-patient-01' },
|
|
134
|
+
onsetDateTime: '2020-03-15'
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
resourceType: 'Condition',
|
|
138
|
+
id: 'condition-03',
|
|
139
|
+
clinicalStatus: { coding: [{ code: 'resolved' }] },
|
|
140
|
+
verificationStatus: { coding: [{ code: 'confirmed' }] },
|
|
141
|
+
code: { text: 'Pneumonia' },
|
|
142
|
+
subject: { reference: 'Patient/test-patient-01' },
|
|
143
|
+
onsetDateTime: '2022-11-01',
|
|
144
|
+
abatementDateTime: '2022-11-30'
|
|
145
|
+
}
|
|
146
|
+
];
|
|
147
|
+
const mockImmunizations = [
|
|
148
|
+
{
|
|
149
|
+
resourceType: 'Immunization',
|
|
150
|
+
id: 'imm-01',
|
|
151
|
+
status: 'completed',
|
|
152
|
+
vaccineCode: { text: 'COVID-19 Vaccine' },
|
|
153
|
+
patient: { reference: 'Patient/test-patient-01' },
|
|
154
|
+
primarySource: true,
|
|
155
|
+
occurrenceDateTime: '2024-01-01'
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
resourceType: 'Immunization',
|
|
159
|
+
id: 'imm-02',
|
|
160
|
+
status: 'completed',
|
|
161
|
+
vaccineCode: { text: 'Influenza Vaccine' },
|
|
162
|
+
patient: { reference: 'Patient/test-patient-01' },
|
|
163
|
+
primarySource: true,
|
|
164
|
+
occurrenceDateTime: '2023-10-15',
|
|
165
|
+
lotNumber: 'FLUVAX20231015'
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
resourceType: 'Immunization',
|
|
169
|
+
id: 'imm-03',
|
|
170
|
+
status: 'completed',
|
|
171
|
+
vaccineCode: { text: 'Tetanus Vaccine' },
|
|
172
|
+
patient: { reference: 'Patient/test-patient-01' },
|
|
173
|
+
primarySource: true,
|
|
174
|
+
occurrenceDateTime: '2020-05-22',
|
|
175
|
+
doseQuantity: {
|
|
176
|
+
value: 0.5,
|
|
177
|
+
unit: 'mL'
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
];
|
|
181
|
+
const mockLaboratoryResults = [
|
|
182
|
+
{
|
|
183
|
+
resourceType: 'Observation',
|
|
184
|
+
id: 'lab-01',
|
|
185
|
+
status: 'final',
|
|
186
|
+
category: [{ coding: [{ code: 'laboratory' }] }],
|
|
187
|
+
code: { text: 'Blood Glucose' },
|
|
188
|
+
subject: { reference: 'Patient/test-patient-01' },
|
|
189
|
+
effectiveDateTime: '2023-01-01',
|
|
190
|
+
valueQuantity: { value: 100, unit: 'mg/dL' }
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
resourceType: 'Observation',
|
|
194
|
+
id: 'lab-02',
|
|
195
|
+
status: 'final',
|
|
196
|
+
category: [{ coding: [{ code: 'laboratory' }] }],
|
|
197
|
+
code: { text: 'Hemoglobin A1c' },
|
|
198
|
+
subject: { reference: 'Patient/test-patient-01' },
|
|
199
|
+
effectiveDateTime: '2023-01-01',
|
|
200
|
+
valueQuantity: { value: 6.5, unit: '%' },
|
|
201
|
+
interpretation: [{
|
|
202
|
+
coding: [{
|
|
203
|
+
system: 'http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation',
|
|
204
|
+
code: 'H',
|
|
205
|
+
display: 'High'
|
|
206
|
+
}]
|
|
207
|
+
}]
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
resourceType: 'Observation',
|
|
211
|
+
id: 'lab-03',
|
|
212
|
+
status: 'final',
|
|
213
|
+
category: [{ coding: [{ code: 'laboratory' }] }],
|
|
214
|
+
code: { text: 'Cholesterol Panel' },
|
|
215
|
+
subject: { reference: 'Patient/test-patient-01' },
|
|
216
|
+
effectiveDateTime: '2023-01-01',
|
|
217
|
+
hasMember: [
|
|
218
|
+
{ reference: 'Observation/ldl-01' },
|
|
219
|
+
{ reference: 'Observation/hdl-01' },
|
|
220
|
+
{ reference: 'Observation/triglycerides-01' }
|
|
221
|
+
]
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
resourceType: 'Observation',
|
|
225
|
+
id: 'lab-04',
|
|
226
|
+
status: 'final',
|
|
227
|
+
category: [{ coding: [{ code: 'laboratory' }] }],
|
|
228
|
+
code: { text: 'CBC with Differential' },
|
|
229
|
+
subject: { reference: 'Patient/test-patient-01' },
|
|
230
|
+
effectiveDateTime: '2023-01-15',
|
|
231
|
+
component: [
|
|
232
|
+
{
|
|
233
|
+
code: { text: 'WBC' },
|
|
234
|
+
valueQuantity: { value: 7.5, unit: '10^9/L' }
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
code: { text: 'RBC' },
|
|
238
|
+
valueQuantity: { value: 4.9, unit: '10^12/L' }
|
|
239
|
+
}
|
|
240
|
+
]
|
|
241
|
+
}
|
|
242
|
+
];
|
|
243
|
+
// Additional mock resources for other sections
|
|
244
|
+
const mockVitalSigns = [
|
|
245
|
+
{
|
|
246
|
+
resourceType: 'Observation',
|
|
247
|
+
id: 'vital-01',
|
|
248
|
+
status: 'final',
|
|
249
|
+
category: [{ coding: [{ code: 'vital-signs' }] }],
|
|
250
|
+
code: { text: 'Blood Pressure' },
|
|
251
|
+
subject: { reference: 'Patient/test-patient-01' },
|
|
252
|
+
effectiveDateTime: '2023-01-01',
|
|
253
|
+
component: [
|
|
254
|
+
{
|
|
255
|
+
code: { text: 'Systolic' },
|
|
256
|
+
valueQuantity: { value: 120, unit: 'mmHg' }
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
code: { text: 'Diastolic' },
|
|
260
|
+
valueQuantity: { value: 80, unit: 'mmHg' }
|
|
261
|
+
}
|
|
262
|
+
]
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
resourceType: 'Observation',
|
|
266
|
+
id: 'vital-02',
|
|
267
|
+
status: 'final',
|
|
268
|
+
category: [{ coding: [{ code: 'vital-signs' }] }],
|
|
269
|
+
code: { text: 'Heart Rate' },
|
|
270
|
+
subject: { reference: 'Patient/test-patient-01' },
|
|
271
|
+
effectiveDateTime: '2023-01-01',
|
|
272
|
+
valueQuantity: { value: 72, unit: 'bpm' }
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
resourceType: 'Observation',
|
|
276
|
+
id: 'vital-03',
|
|
277
|
+
status: 'final',
|
|
278
|
+
category: [{ coding: [{ code: 'vital-signs' }] }],
|
|
279
|
+
code: { text: 'Body Temperature' },
|
|
280
|
+
subject: { reference: 'Patient/test-patient-01' },
|
|
281
|
+
effectiveDateTime: '2023-01-01',
|
|
282
|
+
valueQuantity: { value: 37.0, unit: '°C' }
|
|
283
|
+
}
|
|
284
|
+
];
|
|
285
|
+
const mockMedicalDevices = [
|
|
286
|
+
{
|
|
287
|
+
resourceType: 'Device',
|
|
288
|
+
id: 'device-01',
|
|
289
|
+
status: 'active',
|
|
290
|
+
deviceName: [{ name: 'Pacemaker', type: 'user-friendly-name' }],
|
|
291
|
+
patient: { reference: 'Patient/test-patient-01' }
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
resourceType: 'Device',
|
|
295
|
+
id: 'device-02',
|
|
296
|
+
status: 'active',
|
|
297
|
+
deviceName: [{ name: 'Insulin Pump', type: 'user-friendly-name' }],
|
|
298
|
+
patient: { reference: 'Patient/test-patient-01' },
|
|
299
|
+
manufacturer: 'MedTech Inc.',
|
|
300
|
+
modelNumber: 'IP-2023',
|
|
301
|
+
manufactureDate: '2023-01-01'
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
resourceType: 'Device',
|
|
305
|
+
id: 'device-03',
|
|
306
|
+
status: 'inactive',
|
|
307
|
+
deviceName: [{ name: 'Stent', type: 'user-friendly-name' }],
|
|
308
|
+
patient: { reference: 'Patient/test-patient-01' },
|
|
309
|
+
note: [{ text: 'Removed due to infection' }]
|
|
310
|
+
}
|
|
311
|
+
];
|
|
312
|
+
const mockDiagnosticReports = [
|
|
313
|
+
{
|
|
314
|
+
resourceType: 'DiagnosticReport',
|
|
315
|
+
id: 'report-01',
|
|
316
|
+
status: 'final',
|
|
317
|
+
code: { text: 'Chest X-Ray' },
|
|
318
|
+
subject: { reference: 'Patient/test-patient-01' },
|
|
319
|
+
effectiveDateTime: '2023-01-15',
|
|
320
|
+
conclusion: 'No acute cardiopulmonary process'
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
resourceType: 'DiagnosticReport',
|
|
324
|
+
id: 'report-02',
|
|
325
|
+
status: 'final',
|
|
326
|
+
code: { text: 'MRI Brain' },
|
|
327
|
+
subject: { reference: 'Patient/test-patient-01' },
|
|
328
|
+
effectiveDateTime: '2023-02-01',
|
|
329
|
+
conclusion: 'Normal brain MRI',
|
|
330
|
+
presentedForm: [
|
|
331
|
+
{
|
|
332
|
+
contentType: 'application/pdf',
|
|
333
|
+
title: 'Brain MRI Report'
|
|
334
|
+
}
|
|
335
|
+
]
|
|
336
|
+
}
|
|
337
|
+
];
|
|
338
|
+
const mockProcedures = [
|
|
339
|
+
{
|
|
340
|
+
resourceType: 'Procedure',
|
|
341
|
+
id: 'proc-01',
|
|
342
|
+
status: 'completed',
|
|
343
|
+
code: { text: 'Appendectomy' },
|
|
344
|
+
subject: { reference: 'Patient/test-patient-01' },
|
|
345
|
+
performedDateTime: '2022-05-10'
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
resourceType: 'Procedure',
|
|
349
|
+
id: 'proc-02',
|
|
350
|
+
status: 'completed',
|
|
351
|
+
code: { text: 'Colonoscopy' },
|
|
352
|
+
subject: { reference: 'Patient/test-patient-01' },
|
|
353
|
+
performedDateTime: '2023-03-15',
|
|
354
|
+
note: [{ text: 'No polyps found' }]
|
|
355
|
+
}
|
|
356
|
+
];
|
|
357
|
+
const mockFamilyHistory = [
|
|
358
|
+
{
|
|
359
|
+
resourceType: 'FamilyMemberHistory',
|
|
360
|
+
id: 'fam-01',
|
|
361
|
+
status: 'completed',
|
|
362
|
+
patient: { reference: 'Patient/test-patient-01' },
|
|
363
|
+
relationship: { text: 'Father' },
|
|
364
|
+
condition: [
|
|
365
|
+
{
|
|
366
|
+
code: { text: 'Heart Disease' },
|
|
367
|
+
onsetAge: { value: 60, unit: 'years' }
|
|
368
|
+
}
|
|
369
|
+
]
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
resourceType: 'FamilyMemberHistory',
|
|
373
|
+
id: 'fam-02',
|
|
374
|
+
status: 'completed',
|
|
375
|
+
patient: { reference: 'Patient/test-patient-01' },
|
|
376
|
+
relationship: { text: 'Mother' },
|
|
377
|
+
condition: [
|
|
378
|
+
{
|
|
379
|
+
code: { text: 'Type 2 Diabetes' },
|
|
380
|
+
onsetAge: { value: 55, unit: 'years' }
|
|
381
|
+
}
|
|
382
|
+
]
|
|
383
|
+
}
|
|
384
|
+
];
|
|
385
|
+
const mockSocialHistory = [
|
|
386
|
+
{
|
|
387
|
+
resourceType: 'Observation',
|
|
388
|
+
id: 'social-01',
|
|
389
|
+
status: 'final',
|
|
390
|
+
category: [{ coding: [{ code: 'social-history' }] }],
|
|
391
|
+
code: { text: 'Tobacco Use' },
|
|
392
|
+
subject: { reference: 'Patient/test-patient-01' },
|
|
393
|
+
effectiveDateTime: '2023-01-01',
|
|
394
|
+
valueCodeableConcept: { text: 'Former smoker' }
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
resourceType: 'Observation',
|
|
398
|
+
id: 'social-02',
|
|
399
|
+
status: 'final',
|
|
400
|
+
category: [{ coding: [{ code: 'social-history' }] }],
|
|
401
|
+
code: { text: 'Alcohol Use' },
|
|
402
|
+
subject: { reference: 'Patient/test-patient-01' },
|
|
403
|
+
effectiveDateTime: '2023-01-01',
|
|
404
|
+
valueCodeableConcept: { text: 'Social drinker' }
|
|
405
|
+
}
|
|
406
|
+
];
|
|
407
|
+
const mockAdvanceDirectives = [
|
|
408
|
+
{
|
|
409
|
+
resourceType: 'Consent',
|
|
410
|
+
id: 'adv-01',
|
|
411
|
+
status: 'active',
|
|
412
|
+
category: [{ text: 'Advance Directive' }],
|
|
413
|
+
patient: { reference: 'Patient/test-patient-01' },
|
|
414
|
+
dateTime: '2023-01-01',
|
|
415
|
+
provision: {
|
|
416
|
+
type: 'permit',
|
|
417
|
+
period: {
|
|
418
|
+
start: '2023-01-01'
|
|
419
|
+
}
|
|
420
|
+
},
|
|
421
|
+
scope: {
|
|
422
|
+
coding: [{
|
|
423
|
+
system: 'http://terminology.hl7.org/CodeSystem/consentscope',
|
|
424
|
+
code: 'advance-directive',
|
|
425
|
+
display: 'Advance Directive'
|
|
426
|
+
}]
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
];
|
|
430
|
+
const mockCarePlans = [
|
|
431
|
+
{
|
|
432
|
+
resourceType: 'CarePlan',
|
|
433
|
+
id: 'care-01',
|
|
434
|
+
status: 'active',
|
|
435
|
+
intent: 'plan',
|
|
436
|
+
title: 'Diabetes Management Plan',
|
|
437
|
+
subject: { reference: 'Patient/test-patient-01' },
|
|
438
|
+
period: {
|
|
439
|
+
start: '2023-01-01'
|
|
440
|
+
},
|
|
441
|
+
activity: [
|
|
442
|
+
{
|
|
443
|
+
detail: {
|
|
444
|
+
status: 'in-progress',
|
|
445
|
+
description: 'Monitor blood glucose daily'
|
|
446
|
+
}
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
detail: {
|
|
450
|
+
status: 'in-progress',
|
|
451
|
+
description: 'Low-carbohydrate diet'
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
]
|
|
455
|
+
}
|
|
456
|
+
];
|
|
457
|
+
const mockClinicalImpressions = [
|
|
458
|
+
{
|
|
459
|
+
resourceType: 'ClinicalImpression',
|
|
460
|
+
id: 'imp-01',
|
|
461
|
+
status: 'completed',
|
|
462
|
+
subject: { reference: 'Patient/test-patient-01' },
|
|
463
|
+
date: '2023-01-15',
|
|
464
|
+
summary: 'Patient presents with symptoms consistent with Type 2 Diabetes',
|
|
465
|
+
finding: [
|
|
466
|
+
{
|
|
467
|
+
itemCodeableConcept: { text: 'Elevated blood glucose' }
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
itemCodeableConcept: { text: 'Polydipsia' }
|
|
471
|
+
}
|
|
472
|
+
]
|
|
473
|
+
}
|
|
474
|
+
];
|
|
475
|
+
it('should generate narrative content for patient using NarrativeGenerator', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
476
|
+
const section = IPSSections.PATIENT;
|
|
477
|
+
const result = NarrativeGenerator.generateNarrativeContent(section, [mockPatient], 'America/New_York');
|
|
478
|
+
expect(result).toBeDefined();
|
|
479
|
+
console.info(result);
|
|
480
|
+
// Read narrative from file
|
|
481
|
+
const expectedDiv = readNarrativeFile(path.join(__dirname, 'fixtures'), IPS_SECTION_LOINC_CODES[section], IPS_SECTION_DISPLAY_NAMES[section]);
|
|
482
|
+
yield compareNarratives(result, expectedDiv);
|
|
483
|
+
}));
|
|
484
|
+
it('should generate narrative content for allergies using NarrativeGenerator', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
485
|
+
const section = IPSSections.ALLERGIES;
|
|
486
|
+
const result = NarrativeGenerator.generateNarrativeContent(section, mockAllergies, 'America/New_York');
|
|
487
|
+
expect(result).toBeDefined();
|
|
488
|
+
expect(result).toContain('Allergies and Intolerances');
|
|
489
|
+
expect(result).toContain('Penicillin');
|
|
490
|
+
expect(result).toContain('Peanuts');
|
|
491
|
+
expect(result).toContain('Latex');
|
|
492
|
+
expect(result).toContain('Anaphylaxis');
|
|
493
|
+
console.info(result);
|
|
494
|
+
// Read narrative from file
|
|
495
|
+
const expectedDiv = readNarrativeFile(path.join(__dirname, 'fixtures'), IPS_SECTION_LOINC_CODES[section], IPS_SECTION_DISPLAY_NAMES[section]);
|
|
496
|
+
yield compareNarratives(result, expectedDiv);
|
|
497
|
+
}));
|
|
498
|
+
it('should generate narrative content for medications using NarrativeGenerator', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
499
|
+
const section = IPSSections.MEDICATIONS;
|
|
500
|
+
const result = NarrativeGenerator.generateNarrativeContent(section, mockMedications, 'America/New_York');
|
|
501
|
+
expect(result).toBeDefined();
|
|
502
|
+
expect(result).toContain('Medication');
|
|
503
|
+
expect(result).toContain('Aspirin');
|
|
504
|
+
expect(result).toContain('Lisinopril');
|
|
505
|
+
expect(result).toContain('10mg daily');
|
|
506
|
+
expect(result).toContain('Amoxicillin');
|
|
507
|
+
console.info(result);
|
|
508
|
+
// Read narrative from file
|
|
509
|
+
const expectedDiv = readNarrativeFile(path.join(__dirname, 'fixtures'), IPS_SECTION_LOINC_CODES[section], IPS_SECTION_DISPLAY_NAMES[section]);
|
|
510
|
+
yield compareNarratives(result, expectedDiv);
|
|
511
|
+
}));
|
|
512
|
+
it('should generate narrative content for problem list using NarrativeGenerator', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
513
|
+
const section = IPSSections.PROBLEMS;
|
|
514
|
+
const result = NarrativeGenerator.generateNarrativeContent(section, mockConditions, 'America/New_York');
|
|
515
|
+
expect(result).toBeDefined();
|
|
516
|
+
expect(result).toContain('Problems');
|
|
517
|
+
expect(result).toContain('Hypertension');
|
|
518
|
+
expect(result).toContain('Type 2 Diabetes Mellitus');
|
|
519
|
+
expect(result).toContain('Pneumonia');
|
|
520
|
+
console.info(result);
|
|
521
|
+
// Read narrative from file
|
|
522
|
+
const expectedDiv = readNarrativeFile(path.join(__dirname, 'fixtures'), IPS_SECTION_LOINC_CODES[section], IPS_SECTION_DISPLAY_NAMES[section]);
|
|
523
|
+
yield compareNarratives(result, expectedDiv);
|
|
524
|
+
}));
|
|
525
|
+
it('should generate narrative content for immunizations using NarrativeGenerator', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
526
|
+
const section = IPSSections.IMMUNIZATIONS;
|
|
527
|
+
const result = NarrativeGenerator.generateNarrativeContent(section, mockImmunizations, 'America/New_York');
|
|
528
|
+
expect(result).toBeDefined();
|
|
529
|
+
expect(result).toContain('Immunizations');
|
|
530
|
+
expect(result).toContain('COVID-19 Vaccine');
|
|
531
|
+
expect(result).toContain('Influenza Vaccine');
|
|
532
|
+
expect(result).toContain('Tetanus Vaccine');
|
|
533
|
+
console.info(result);
|
|
534
|
+
// Read narrative from file
|
|
535
|
+
const expectedDiv = readNarrativeFile(path.join(__dirname, 'fixtures'), IPS_SECTION_LOINC_CODES[section], IPS_SECTION_DISPLAY_NAMES[section]);
|
|
536
|
+
yield compareNarratives(result, expectedDiv);
|
|
537
|
+
}));
|
|
538
|
+
it('should generate narrative content for vital signs using NarrativeGenerator', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
539
|
+
const section = IPSSections.VITAL_SIGNS;
|
|
540
|
+
const result = NarrativeGenerator.generateNarrativeContent(section, mockVitalSigns, 'America/New_York');
|
|
541
|
+
expect(result).toBeDefined();
|
|
542
|
+
expect(result).toContain('Vital Signs');
|
|
543
|
+
expect(result).toContain('Blood Pressure');
|
|
544
|
+
expect(result).toContain('Heart Rate');
|
|
545
|
+
expect(result).toContain('Body Temperature');
|
|
546
|
+
console.info(result);
|
|
547
|
+
// Read narrative from file
|
|
548
|
+
const expectedDiv = readNarrativeFile(path.join(__dirname, 'fixtures'), IPS_SECTION_LOINC_CODES[section], IPS_SECTION_DISPLAY_NAMES[section]);
|
|
549
|
+
yield compareNarratives(result, expectedDiv);
|
|
550
|
+
}));
|
|
551
|
+
it('should generate narrative content for medical devices using NarrativeGenerator', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
552
|
+
const section = IPSSections.MEDICAL_DEVICES;
|
|
553
|
+
const result = NarrativeGenerator.generateNarrativeContent(section, mockMedicalDevices, 'America/New_York');
|
|
554
|
+
expect(result).toBeDefined();
|
|
555
|
+
console.info(result);
|
|
556
|
+
// Read narrative from file
|
|
557
|
+
const expectedDiv = readNarrativeFile(path.join(__dirname, 'fixtures'), IPS_SECTION_LOINC_CODES[section], IPS_SECTION_DISPLAY_NAMES[section]);
|
|
558
|
+
yield compareNarratives(result, expectedDiv);
|
|
559
|
+
}));
|
|
560
|
+
it('should generate narrative content for diagnostic reports using NarrativeGenerator', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
561
|
+
const section = IPSSections.DIAGNOSTIC_REPORTS;
|
|
562
|
+
const mockDiagnosticReportsAndLaboratoryResults = [...mockDiagnosticReports, ...mockLaboratoryResults];
|
|
563
|
+
const result = NarrativeGenerator.generateNarrativeContent(section, mockDiagnosticReportsAndLaboratoryResults, 'America/New_York');
|
|
564
|
+
expect(result).toBeDefined();
|
|
565
|
+
expect(result).toContain('Diagnostic');
|
|
566
|
+
expect(result).toContain('Chest X-Ray');
|
|
567
|
+
expect(result).toContain('MRI Brain');
|
|
568
|
+
console.info(result);
|
|
569
|
+
// Read narrative from file
|
|
570
|
+
const expectedDiv = readNarrativeFile(path.join(__dirname, 'fixtures'), IPS_SECTION_LOINC_CODES[section], IPS_SECTION_DISPLAY_NAMES[section]);
|
|
571
|
+
yield compareNarratives(result, expectedDiv);
|
|
572
|
+
}));
|
|
573
|
+
it('should generate narrative content for procedures using NarrativeGenerator', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
574
|
+
const section = IPSSections.PROCEDURES;
|
|
575
|
+
const result = NarrativeGenerator.generateNarrativeContent(section, mockProcedures, 'America/New_York');
|
|
576
|
+
expect(result).toBeDefined();
|
|
577
|
+
expect(result).toContain('Procedures');
|
|
578
|
+
expect(result).toContain('Appendectomy');
|
|
579
|
+
expect(result).toContain('Colonoscopy');
|
|
580
|
+
console.info(result);
|
|
581
|
+
// Read narrative from file
|
|
582
|
+
const expectedDiv = readNarrativeFile(path.join(__dirname, 'fixtures'), IPS_SECTION_LOINC_CODES[section], IPS_SECTION_DISPLAY_NAMES[section]);
|
|
583
|
+
yield compareNarratives(result, expectedDiv);
|
|
584
|
+
}));
|
|
585
|
+
it('should generate narrative content for family history using NarrativeGenerator', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
586
|
+
const section = IPSSections.FAMILY_HISTORY;
|
|
587
|
+
const result = NarrativeGenerator.generateNarrativeContent(section, mockFamilyHistory, 'America/New_York');
|
|
588
|
+
expect(result).toBeDefined();
|
|
589
|
+
expect(result).toContain('Family History');
|
|
590
|
+
expect(result).toContain('Heart Disease');
|
|
591
|
+
expect(result).toContain('Type 2 Diabetes');
|
|
592
|
+
console.info(result);
|
|
593
|
+
// Read narrative from file
|
|
594
|
+
const expectedDiv = readNarrativeFile(path.join(__dirname, 'fixtures'), IPS_SECTION_LOINC_CODES[section], IPS_SECTION_DISPLAY_NAMES[section]);
|
|
595
|
+
yield compareNarratives(result, expectedDiv);
|
|
596
|
+
}));
|
|
597
|
+
it('should generate narrative content for social history using NarrativeGenerator', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
598
|
+
const section = IPSSections.SOCIAL_HISTORY;
|
|
599
|
+
const result = NarrativeGenerator.generateNarrativeContent(section, mockSocialHistory, 'America/New_York');
|
|
600
|
+
expect(result).toBeDefined();
|
|
601
|
+
expect(result).toContain('Social History');
|
|
602
|
+
expect(result).toContain('Tobacco Use');
|
|
603
|
+
expect(result).toContain('Alcohol Use');
|
|
604
|
+
console.info(result);
|
|
605
|
+
// Read narrative from file
|
|
606
|
+
const expectedDiv = readNarrativeFile(path.join(__dirname, 'fixtures'), IPS_SECTION_LOINC_CODES[section], IPS_SECTION_DISPLAY_NAMES[section]);
|
|
607
|
+
yield compareNarratives(result, expectedDiv);
|
|
608
|
+
}));
|
|
609
|
+
it('should generate narrative content for advance directives using NarrativeGenerator', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
610
|
+
const section = IPSSections.ADVANCE_DIRECTIVES;
|
|
611
|
+
const result = NarrativeGenerator.generateNarrativeContent(section, mockAdvanceDirectives, 'America/New_York');
|
|
612
|
+
expect(result).toBeDefined();
|
|
613
|
+
expect(result).toContain('Advance Directives');
|
|
614
|
+
console.info(result);
|
|
615
|
+
// Read narrative from file
|
|
616
|
+
const expectedDiv = readNarrativeFile(path.join(__dirname, 'fixtures'), IPS_SECTION_LOINC_CODES[section], IPS_SECTION_DISPLAY_NAMES[section]);
|
|
617
|
+
yield compareNarratives(result, expectedDiv);
|
|
618
|
+
}));
|
|
619
|
+
it('should generate narrative content for care plans using NarrativeGenerator', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
620
|
+
const section = IPSSections.CARE_PLAN;
|
|
621
|
+
const result = NarrativeGenerator.generateNarrativeContent(section, mockCarePlans, 'America/New_York');
|
|
622
|
+
expect(result).toBeDefined();
|
|
623
|
+
expect(result).toContain('Care');
|
|
624
|
+
// expect(result).toContain('Diabetes Management Plan');
|
|
625
|
+
console.info(result);
|
|
626
|
+
// Read narrative from file
|
|
627
|
+
const expectedDiv = readNarrativeFile(path.join(__dirname, 'fixtures'), IPS_SECTION_LOINC_CODES[section], IPS_SECTION_DISPLAY_NAMES[section]);
|
|
628
|
+
yield compareNarratives(result, expectedDiv);
|
|
629
|
+
}));
|
|
630
|
+
it('should generate narrative content for clinical impressions using NarrativeGenerator', () => __awaiter(void 0, void 0, void 0, function* () {
|
|
631
|
+
const section = IPSSections.CLINICAL_IMPRESSION;
|
|
632
|
+
const result = NarrativeGenerator.generateNarrativeContent(section, mockClinicalImpressions, 'America/New_York');
|
|
633
|
+
expect(result).toBeDefined();
|
|
634
|
+
expect(result).toContain('Clinical Impressions');
|
|
635
|
+
expect(result).toContain('Type 2 Diabetes');
|
|
636
|
+
console.info(result);
|
|
637
|
+
// Read narrative from file
|
|
638
|
+
const expectedDiv = readNarrativeFile(path.join(__dirname, 'fixtures'), IPS_SECTION_LOINC_CODES[section], IPS_SECTION_DISPLAY_NAMES[section]);
|
|
639
|
+
yield compareNarratives(result, expectedDiv);
|
|
640
|
+
}));
|
|
641
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|