@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,17 @@
|
|
|
1
|
+
import { IPSSections } from '../../../structures/ips_sections';
|
|
2
|
+
import { TBundle } from '../../../types/resources/Bundle';
|
|
3
|
+
/**
|
|
4
|
+
* Maps IPS sections to their corresponding TypeScript template classes
|
|
5
|
+
* Replaces the Jinja2 template mapping system
|
|
6
|
+
*/
|
|
7
|
+
export declare class TypeScriptTemplateMapper {
|
|
8
|
+
private static sectionToTemplate;
|
|
9
|
+
/**
|
|
10
|
+
* Generates HTML narrative for a specific IPS section
|
|
11
|
+
* @param section - The IPS section
|
|
12
|
+
* @param resource - FHIR Bundle containing resources
|
|
13
|
+
* @param timezone - Optional timezone to use for date formatting (e.g., 'America/New_York', 'Europe/London')
|
|
14
|
+
* @returns HTML string for rendering
|
|
15
|
+
*/
|
|
16
|
+
static generateNarrative(section: IPSSections, resource: TBundle, timezone: string | undefined): string;
|
|
17
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// TypeScriptTemplateMapper.ts - TypeScript replacement for IPSTemplateMapper.ts
|
|
2
|
+
import { IPSSections } from '../../../structures/ips_sections';
|
|
3
|
+
import { PatientTemplate } from './PatientTemplate';
|
|
4
|
+
import { AllergyIntoleranceTemplate } from './AllergyIntoleranceTemplate';
|
|
5
|
+
import { MedicationSummaryTemplate } from './MedicationSummaryTemplate';
|
|
6
|
+
import { ImmunizationsTemplate } from './ImmunizationsTemplate';
|
|
7
|
+
import { ProblemListTemplate } from './ProblemListTemplate';
|
|
8
|
+
import { VitalSignsTemplate } from './VitalSignsTemplate';
|
|
9
|
+
import { MedicalDevicesTemplate } from './MedicalDevicesTemplate';
|
|
10
|
+
import { DiagnosticResultsTemplate } from './DiagnosticResultsTemplate';
|
|
11
|
+
import { HistoryOfProceduresTemplate } from './HistoryOfProceduresTemplate';
|
|
12
|
+
import { SocialHistoryTemplate } from './SocialHistoryTemplate';
|
|
13
|
+
import { PastHistoryOfIllnessTemplate } from './PastHistoryOfIllnessTemplate';
|
|
14
|
+
import { PlanOfCareTemplate } from './PlanOfCareTemplate';
|
|
15
|
+
import { FunctionalStatusTemplate } from './FunctionalStatusTemplate';
|
|
16
|
+
import { PregnancyTemplate } from './PregnancyTemplate';
|
|
17
|
+
import { AdvanceDirectivesTemplate } from './AdvanceDirectivesTemplate';
|
|
18
|
+
import { FamilyHistoryTemplate } from './FamilyHistoryTemplate';
|
|
19
|
+
import { ClinicalImpressionTemplate } from './ClinicalImpressionTemplate';
|
|
20
|
+
/**
|
|
21
|
+
* Maps IPS sections to their corresponding TypeScript template classes
|
|
22
|
+
* Replaces the Jinja2 template mapping system
|
|
23
|
+
*/
|
|
24
|
+
export class TypeScriptTemplateMapper {
|
|
25
|
+
/**
|
|
26
|
+
* Generates HTML narrative for a specific IPS section
|
|
27
|
+
* @param section - The IPS section
|
|
28
|
+
* @param resource - FHIR Bundle containing resources
|
|
29
|
+
* @param timezone - Optional timezone to use for date formatting (e.g., 'America/New_York', 'Europe/London')
|
|
30
|
+
* @returns HTML string for rendering
|
|
31
|
+
*/
|
|
32
|
+
static generateNarrative(section, resource, timezone) {
|
|
33
|
+
const templateClass = this.sectionToTemplate[section];
|
|
34
|
+
if (!templateClass) {
|
|
35
|
+
throw new Error(`No template found for section: ${section}`);
|
|
36
|
+
}
|
|
37
|
+
return templateClass.generateNarrative(resource, timezone);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
// Map of section types to their template classes
|
|
41
|
+
// Each template either needs to be instantiated or has a static generateNarrative method
|
|
42
|
+
TypeScriptTemplateMapper.sectionToTemplate = {
|
|
43
|
+
[IPSSections.PATIENT]: new PatientTemplate(),
|
|
44
|
+
[IPSSections.ALLERGIES]: new AllergyIntoleranceTemplate(),
|
|
45
|
+
[IPSSections.MEDICATIONS]: new MedicationSummaryTemplate(),
|
|
46
|
+
[IPSSections.IMMUNIZATIONS]: new ImmunizationsTemplate(),
|
|
47
|
+
[IPSSections.PROBLEMS]: new ProblemListTemplate(),
|
|
48
|
+
[IPSSections.VITAL_SIGNS]: new VitalSignsTemplate(),
|
|
49
|
+
[IPSSections.MEDICAL_DEVICES]: new MedicalDevicesTemplate(),
|
|
50
|
+
[IPSSections.DIAGNOSTIC_REPORTS]: new DiagnosticResultsTemplate(),
|
|
51
|
+
[IPSSections.PROCEDURES]: new HistoryOfProceduresTemplate(),
|
|
52
|
+
[IPSSections.FAMILY_HISTORY]: new FamilyHistoryTemplate(),
|
|
53
|
+
[IPSSections.SOCIAL_HISTORY]: new SocialHistoryTemplate(),
|
|
54
|
+
[IPSSections.PREGNANCY_HISTORY]: new PregnancyTemplate(),
|
|
55
|
+
[IPSSections.FUNCTIONAL_STATUS]: new FunctionalStatusTemplate(),
|
|
56
|
+
[IPSSections.MEDICAL_HISTORY]: new PastHistoryOfIllnessTemplate(),
|
|
57
|
+
[IPSSections.CARE_PLAN]: new PlanOfCareTemplate(),
|
|
58
|
+
[IPSSections.CLINICAL_IMPRESSION]: new ClinicalImpressionTemplate(),
|
|
59
|
+
[IPSSections.ADVANCE_DIRECTIVES]: new AdvanceDirectivesTemplate()
|
|
60
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { TBundle } from '../../../types/resources/Bundle';
|
|
2
|
+
import { ITemplate } from './interfaces/ITemplate';
|
|
3
|
+
/**
|
|
4
|
+
* Class to generate HTML narrative for Vital Signs (Observation resources)
|
|
5
|
+
* This replaces the Jinja2 vitalsigns.j2 template
|
|
6
|
+
*/
|
|
7
|
+
export declare class VitalSignsTemplate implements ITemplate {
|
|
8
|
+
/**
|
|
9
|
+
* Generate HTML narrative for Vital Signs
|
|
10
|
+
* @param resource - FHIR Bundle containing Observation resources
|
|
11
|
+
* @param timezone - Optional timezone to use for date formatting (e.g., 'America/New_York', 'Europe/London')
|
|
12
|
+
* @returns HTML string for rendering
|
|
13
|
+
*/
|
|
14
|
+
generateNarrative(resource: TBundle, timezone: string | undefined): string;
|
|
15
|
+
/**
|
|
16
|
+
* Internal static implementation that actually generates the narrative
|
|
17
|
+
* @param resource - FHIR Bundle containing Observation resources
|
|
18
|
+
* @param timezone - Optional timezone to use for date formatting (e.g., 'America/New_York', 'Europe/London')
|
|
19
|
+
* @returns HTML string for rendering
|
|
20
|
+
*/
|
|
21
|
+
private static generateStaticNarrative;
|
|
22
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
// VitalSignsTemplate.ts - TypeScript replacement for Jinja2 vitalsigns.j2
|
|
2
|
+
import { TemplateUtilities } from './TemplateUtilities';
|
|
3
|
+
/**
|
|
4
|
+
* Class to generate HTML narrative for Vital Signs (Observation resources)
|
|
5
|
+
* This replaces the Jinja2 vitalsigns.j2 template
|
|
6
|
+
*/
|
|
7
|
+
export class VitalSignsTemplate {
|
|
8
|
+
/**
|
|
9
|
+
* Generate HTML narrative for Vital Signs
|
|
10
|
+
* @param resource - FHIR Bundle containing Observation resources
|
|
11
|
+
* @param timezone - Optional timezone to use for date formatting (e.g., 'America/New_York', 'Europe/London')
|
|
12
|
+
* @returns HTML string for rendering
|
|
13
|
+
*/
|
|
14
|
+
generateNarrative(resource, timezone) {
|
|
15
|
+
return VitalSignsTemplate.generateStaticNarrative(resource, timezone);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Internal static implementation that actually generates the narrative
|
|
19
|
+
* @param resource - FHIR Bundle containing Observation resources
|
|
20
|
+
* @param timezone - Optional timezone to use for date formatting (e.g., 'America/New_York', 'Europe/London')
|
|
21
|
+
* @returns HTML string for rendering
|
|
22
|
+
*/
|
|
23
|
+
static generateStaticNarrative(resource, timezone) {
|
|
24
|
+
const templateUtilities = new TemplateUtilities(resource);
|
|
25
|
+
// Start building the HTML table
|
|
26
|
+
let html = `
|
|
27
|
+
<h5>Vital Signs</h5>
|
|
28
|
+
<table class="hapiPropertyTable">
|
|
29
|
+
<thead>
|
|
30
|
+
<tr>
|
|
31
|
+
<th>Code</th>
|
|
32
|
+
<th>Result</th>
|
|
33
|
+
<th>Unit</th>
|
|
34
|
+
<th>Interpretation</th>
|
|
35
|
+
<th>Component(s)</th>
|
|
36
|
+
<th>Comments</th>
|
|
37
|
+
<th>Date</th>
|
|
38
|
+
</tr>
|
|
39
|
+
</thead>
|
|
40
|
+
<tbody>`;
|
|
41
|
+
// Check if we have entries in the bundle
|
|
42
|
+
if (resource.entry && Array.isArray(resource.entry)) {
|
|
43
|
+
// Loop through entries in the bundle
|
|
44
|
+
for (const entry of resource.entry) {
|
|
45
|
+
const obs = entry.resource;
|
|
46
|
+
// Skip composition resources
|
|
47
|
+
if (obs.resourceType === 'Composition') {
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
// Use the enhanced narrativeLinkId utility function to extract the ID directly from the resource
|
|
51
|
+
// Add a table row for this observation
|
|
52
|
+
html += `
|
|
53
|
+
<tr id="${(templateUtilities.narrativeLinkId(obs))}">
|
|
54
|
+
<td>${templateUtilities.codeableConcept(obs.code, 'display')}</td>
|
|
55
|
+
<td>${templateUtilities.extractObservationValue(obs)}</td>
|
|
56
|
+
<td>${templateUtilities.extractObservationValueUnit(obs)}</td>
|
|
57
|
+
<td>${templateUtilities.firstFromCodeableConceptList(obs.interpretation)}</td>
|
|
58
|
+
<td>${templateUtilities.renderComponent(obs.component)}</td>
|
|
59
|
+
<td>${templateUtilities.renderNotes(obs.note, timezone)}</td>
|
|
60
|
+
<td>${templateUtilities.renderEffective(obs.effectiveDateTime, timezone)}</td>
|
|
61
|
+
</tr>`;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
// Close the HTML table
|
|
65
|
+
html += `
|
|
66
|
+
</tbody>
|
|
67
|
+
</table>`;
|
|
68
|
+
return html;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TBundle } from '../../../../types/resources/Bundle';
|
|
2
|
+
/**
|
|
3
|
+
* Interface for all template classes
|
|
4
|
+
*/
|
|
5
|
+
export interface ITemplate {
|
|
6
|
+
/**
|
|
7
|
+
* Generate HTML narrative for FHIR resources
|
|
8
|
+
* @param resource - FHIR Bundle containing resources
|
|
9
|
+
* @param timezone - Optional timezone to use for date formatting (e.g., 'America/New_York', 'Europe/London')
|
|
10
|
+
* @returns HTML string for rendering
|
|
11
|
+
*/
|
|
12
|
+
generateNarrative(resource: TBundle, timezone: string | undefined): string;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IPSResourceProfile } from "../structures/ips_resource_profile";
|
|
2
|
+
import { TDomainResource } from "../types/resources/DomainResource";
|
|
3
|
+
export declare class IPSResourceProfileRegistry {
|
|
4
|
+
static readonly PROFILES: Record<string, IPSResourceProfile>;
|
|
5
|
+
static readonly RECOMMENDED_PROFILES: Record<string, IPSResourceProfile>;
|
|
6
|
+
static validateResource(resource: TDomainResource, profileType: string): boolean;
|
|
7
|
+
}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { IPSMandatorySections } from "../structures/ips_mandatory_sections";
|
|
2
|
+
import { IPSRecommendedSections } from "../structures/ips_recommended_sections";
|
|
3
|
+
export class IPSResourceProfileRegistry {
|
|
4
|
+
// Validate resource against IPS profile
|
|
5
|
+
static validateResource(resource, profileType) {
|
|
6
|
+
const profile = this.PROFILES[profileType] ||
|
|
7
|
+
this.RECOMMENDED_PROFILES[profileType];
|
|
8
|
+
if (!profile) {
|
|
9
|
+
console.warn(`No profile found for resource type: ${resource.resourceType}`);
|
|
10
|
+
return false;
|
|
11
|
+
}
|
|
12
|
+
// Check mandatory fields
|
|
13
|
+
const missingMandatoryFields = profile.mandatoryFields.filter(field => !(field in resource));
|
|
14
|
+
if (missingMandatoryFields.length > 0) {
|
|
15
|
+
console.warn(`Missing mandatory fields for ${profileType}: `, missingMandatoryFields);
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
// Comprehensive resource profiles aligned with IPS specification
|
|
22
|
+
IPSResourceProfileRegistry.PROFILES = {
|
|
23
|
+
[IPSMandatorySections.PATIENT]: {
|
|
24
|
+
resourceType: 'Patient',
|
|
25
|
+
mandatoryFields: [
|
|
26
|
+
// FHIR R4B: No required fields except resourceType, but name and gender are often expected in practice
|
|
27
|
+
],
|
|
28
|
+
recommendedFields: [
|
|
29
|
+
'name',
|
|
30
|
+
'gender',
|
|
31
|
+
'birthDate',
|
|
32
|
+
'identifier',
|
|
33
|
+
'address',
|
|
34
|
+
'telecom',
|
|
35
|
+
'communication',
|
|
36
|
+
'maritalStatus'
|
|
37
|
+
],
|
|
38
|
+
loincCode: '60591-5',
|
|
39
|
+
profileUrl: 'http://hl7.org/fhir/uv/ips/StructureDefinition/Patient-uv-ips'
|
|
40
|
+
},
|
|
41
|
+
[IPSMandatorySections.ALLERGIES]: {
|
|
42
|
+
resourceType: 'AllergyIntolerance',
|
|
43
|
+
mandatoryFields: [
|
|
44
|
+
'patient'
|
|
45
|
+
],
|
|
46
|
+
recommendedFields: [
|
|
47
|
+
'clinicalStatus',
|
|
48
|
+
'verificationStatus',
|
|
49
|
+
'code',
|
|
50
|
+
'reaction',
|
|
51
|
+
'criticality'
|
|
52
|
+
],
|
|
53
|
+
loincCode: '48765-2',
|
|
54
|
+
profileUrl: 'http://hl7.org/fhir/uv/ips/StructureDefinition/AllergyIntolerance-uv-ips'
|
|
55
|
+
},
|
|
56
|
+
[IPSMandatorySections.MEDICATIONS]: {
|
|
57
|
+
resourceType: 'MedicationStatement',
|
|
58
|
+
mandatoryFields: [
|
|
59
|
+
'status',
|
|
60
|
+
'subject'
|
|
61
|
+
],
|
|
62
|
+
recommendedFields: [
|
|
63
|
+
'medicationCodeableConcept', // or 'medicationReference'
|
|
64
|
+
'effectiveDateTime', // or 'effectivePeriod'
|
|
65
|
+
'dosage',
|
|
66
|
+
'reasonCode'
|
|
67
|
+
],
|
|
68
|
+
loincCode: '10160-0',
|
|
69
|
+
profileUrl: 'http://hl7.org/fhir/uv/ips/StructureDefinition/MedicationStatement-uv-ips'
|
|
70
|
+
},
|
|
71
|
+
[IPSMandatorySections.PROBLEMS]: {
|
|
72
|
+
resourceType: 'Condition',
|
|
73
|
+
mandatoryFields: [
|
|
74
|
+
'subject'
|
|
75
|
+
],
|
|
76
|
+
recommendedFields: [
|
|
77
|
+
'clinicalStatus',
|
|
78
|
+
'verificationStatus',
|
|
79
|
+
'code',
|
|
80
|
+
'onsetDateTime', // or 'onsetAge', 'onsetPeriod', 'onsetRange', 'onsetString'
|
|
81
|
+
'recordedDate',
|
|
82
|
+
'severity'
|
|
83
|
+
],
|
|
84
|
+
loincCode: '11450-4',
|
|
85
|
+
profileUrl: 'http://hl7.org/fhir/uv/ips/StructureDefinition/Condition-uv-ips'
|
|
86
|
+
},
|
|
87
|
+
[IPSMandatorySections.IMMUNIZATIONS]: {
|
|
88
|
+
resourceType: 'Immunization',
|
|
89
|
+
mandatoryFields: [
|
|
90
|
+
'status',
|
|
91
|
+
'vaccineCode',
|
|
92
|
+
'patient',
|
|
93
|
+
'occurrenceDateTime' // or 'occurrenceString'
|
|
94
|
+
],
|
|
95
|
+
recommendedFields: [
|
|
96
|
+
'lotNumber',
|
|
97
|
+
'manufacturer',
|
|
98
|
+
'doseQuantity'
|
|
99
|
+
],
|
|
100
|
+
loincCode: '11369-6',
|
|
101
|
+
profileUrl: 'http://hl7.org/fhir/uv/ips/StructureDefinition/Immunization-uv-ips'
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
// Additional Recommended Sections
|
|
105
|
+
IPSResourceProfileRegistry.RECOMMENDED_PROFILES = {
|
|
106
|
+
[IPSRecommendedSections.DIAGNOSTIC_REPORTS]: {
|
|
107
|
+
resourceType: 'Observation',
|
|
108
|
+
mandatoryFields: [
|
|
109
|
+
'status',
|
|
110
|
+
'code',
|
|
111
|
+
'subject',
|
|
112
|
+
'effectiveDateTime' // or 'effectivePeriod'
|
|
113
|
+
],
|
|
114
|
+
recommendedFields: [
|
|
115
|
+
'category',
|
|
116
|
+
'valueQuantity', // or value[x]
|
|
117
|
+
'interpretation',
|
|
118
|
+
'referenceRange'
|
|
119
|
+
],
|
|
120
|
+
loincCode: '26436-6',
|
|
121
|
+
profileUrl: 'http://hl7.org/fhir/uv/ips/StructureDefinition/Observation-results-uv-ips'
|
|
122
|
+
},
|
|
123
|
+
[IPSRecommendedSections.VITAL_SIGNS]: {
|
|
124
|
+
resourceType: 'Observation',
|
|
125
|
+
mandatoryFields: [
|
|
126
|
+
'status',
|
|
127
|
+
'code',
|
|
128
|
+
'subject',
|
|
129
|
+
'effectiveDateTime' // or 'effectivePeriod'
|
|
130
|
+
],
|
|
131
|
+
recommendedFields: [
|
|
132
|
+
'category',
|
|
133
|
+
'valueQuantity', // or value[x]
|
|
134
|
+
'component'
|
|
135
|
+
],
|
|
136
|
+
loincCode: '8716-3',
|
|
137
|
+
profileUrl: 'http://hl7.org/fhir/uv/ips/StructureDefinition/Observation-vitalsigns-uv-ips'
|
|
138
|
+
}
|
|
139
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export var IPSMandatorySections;
|
|
2
|
+
(function (IPSMandatorySections) {
|
|
3
|
+
IPSMandatorySections["PATIENT"] = "Patient";
|
|
4
|
+
IPSMandatorySections["ALLERGIES"] = "AllergyIntoleranceSection";
|
|
5
|
+
IPSMandatorySections["MEDICATIONS"] = "MedicationSection";
|
|
6
|
+
IPSMandatorySections["PROBLEMS"] = "ProblemSection";
|
|
7
|
+
IPSMandatorySections["IMMUNIZATIONS"] = "ImmunizationSection";
|
|
8
|
+
})(IPSMandatorySections || (IPSMandatorySections = {}));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare enum IPSRecommendedSections {
|
|
2
|
+
MEDICAL_DEVICES = "Device",
|
|
3
|
+
PREGNANCY_STATUS = "PregnancyStatus",
|
|
4
|
+
FUNCTIONAL_STATUS = "FunctionalStatus",
|
|
5
|
+
ADVANCED_DIRECTIVES = "Consent",
|
|
6
|
+
DIAGNOSTIC_REPORTS = "DiagnosticReportSection",
|
|
7
|
+
VITAL_SIGNS = "VitalSignsSection"
|
|
8
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export var IPSRecommendedSections;
|
|
2
|
+
(function (IPSRecommendedSections) {
|
|
3
|
+
IPSRecommendedSections["MEDICAL_DEVICES"] = "Device";
|
|
4
|
+
IPSRecommendedSections["PREGNANCY_STATUS"] = "PregnancyStatus";
|
|
5
|
+
IPSRecommendedSections["FUNCTIONAL_STATUS"] = "FunctionalStatus";
|
|
6
|
+
IPSRecommendedSections["ADVANCED_DIRECTIVES"] = "Consent";
|
|
7
|
+
IPSRecommendedSections["DIAGNOSTIC_REPORTS"] = "DiagnosticReportSection";
|
|
8
|
+
IPSRecommendedSections["VITAL_SIGNS"] = "VitalSignsSection";
|
|
9
|
+
})(IPSRecommendedSections || (IPSRecommendedSections = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// LOINC Codes for IPS Sections
|
|
2
|
+
import { IPSSections } from "./ips_sections";
|
|
3
|
+
/*
|
|
4
|
+
* LOINC codes for each IPS section. https://hl7.org/fhir/R4/valueset-doc-section-codes.html
|
|
5
|
+
*/
|
|
6
|
+
const IPS_SECTION_LOINC_CODES = {
|
|
7
|
+
[IPSSections.PATIENT]: '54126-4',
|
|
8
|
+
[IPSSections.ALLERGIES]: '48765-2',
|
|
9
|
+
[IPSSections.MEDICATIONS]: '10160-0',
|
|
10
|
+
[IPSSections.PROBLEMS]: '11450-4',
|
|
11
|
+
[IPSSections.IMMUNIZATIONS]: '11369-6',
|
|
12
|
+
[IPSSections.VITAL_SIGNS]: '8716-3',
|
|
13
|
+
[IPSSections.MEDICAL_DEVICES]: '46264-8',
|
|
14
|
+
[IPSSections.DIAGNOSTIC_REPORTS]: '30954-2',
|
|
15
|
+
[IPSSections.PROCEDURES]: '47519-4',
|
|
16
|
+
[IPSSections.FAMILY_HISTORY]: '10157-6',
|
|
17
|
+
[IPSSections.SOCIAL_HISTORY]: '29762-2',
|
|
18
|
+
[IPSSections.PREGNANCY_HISTORY]: '10162-6',
|
|
19
|
+
[IPSSections.FUNCTIONAL_STATUS]: '47420-5',
|
|
20
|
+
[IPSSections.MEDICAL_HISTORY]: '11348-0',
|
|
21
|
+
[IPSSections.CARE_PLAN]: '18776-5',
|
|
22
|
+
[IPSSections.CLINICAL_IMPRESSION]: '51848-0',
|
|
23
|
+
[IPSSections.ADVANCE_DIRECTIVES]: '42348-3'
|
|
24
|
+
};
|
|
25
|
+
const IPS_SECTION_DISPLAY_NAMES = {
|
|
26
|
+
[IPSSections.PATIENT]: 'Patient summary Document',
|
|
27
|
+
[IPSSections.ALLERGIES]: 'Allergies and adverse reactions Document',
|
|
28
|
+
[IPSSections.MEDICATIONS]: 'History of Medication use Narrative',
|
|
29
|
+
[IPSSections.PROBLEMS]: 'Problem list - Reported',
|
|
30
|
+
[IPSSections.IMMUNIZATIONS]: 'History of Immunization Narrative',
|
|
31
|
+
[IPSSections.VITAL_SIGNS]: 'Vital signs',
|
|
32
|
+
[IPSSections.MEDICAL_DEVICES]: 'History of medical device use',
|
|
33
|
+
[IPSSections.DIAGNOSTIC_REPORTS]: 'Relevant diagnostic tests/laboratory data Narrative',
|
|
34
|
+
[IPSSections.PROCEDURES]: 'History of Procedures Document',
|
|
35
|
+
[IPSSections.FAMILY_HISTORY]: 'History of family member diseases Narrative',
|
|
36
|
+
[IPSSections.SOCIAL_HISTORY]: 'Social history Narrative',
|
|
37
|
+
[IPSSections.PREGNANCY_HISTORY]: 'History of pregnancies Narrative',
|
|
38
|
+
[IPSSections.FUNCTIONAL_STATUS]: 'Functional status assessment note',
|
|
39
|
+
[IPSSections.MEDICAL_HISTORY]: 'History of Past illness NarrativeHistory and physical note Document',
|
|
40
|
+
[IPSSections.CARE_PLAN]: 'Plan of care note',
|
|
41
|
+
[IPSSections.CLINICAL_IMPRESSION]: 'Evaluation note',
|
|
42
|
+
[IPSSections.ADVANCE_DIRECTIVES]: 'Advance directives Document'
|
|
43
|
+
};
|
|
44
|
+
export { IPS_SECTION_LOINC_CODES, IPS_SECTION_DISPLAY_NAMES };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IPSSections } from "./ips_sections";
|
|
2
|
+
export declare const IPSSectionResourceMap: Record<IPSSections, string[]>;
|
|
3
|
+
export type IPSSectionResourceFilter = (resource: any) => boolean;
|
|
4
|
+
export declare const IPSSectionResourceFilters: Partial<Record<IPSSections, IPSSectionResourceFilter>>;
|
|
5
|
+
export declare class IPSSectionResourceHelper {
|
|
6
|
+
static getResourceTypesForSection(section: IPSSections): string[];
|
|
7
|
+
static getResourceFilterForSection(section: IPSSections): IPSSectionResourceFilter | undefined;
|
|
8
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { IPSSections } from "./ips_sections";
|
|
2
|
+
// Mapping of IPSSections to FHIR resource types
|
|
3
|
+
export const IPSSectionResourceMap = {
|
|
4
|
+
[IPSSections.PATIENT]: ['Patient'],
|
|
5
|
+
[IPSSections.ALLERGIES]: ['AllergyIntolerance'],
|
|
6
|
+
[IPSSections.MEDICATIONS]: ['MedicationRequest', 'MedicationStatement'],
|
|
7
|
+
[IPSSections.PROBLEMS]: ['Condition'],
|
|
8
|
+
[IPSSections.IMMUNIZATIONS]: ['Immunization'],
|
|
9
|
+
[IPSSections.VITAL_SIGNS]: ['Observation'],
|
|
10
|
+
[IPSSections.MEDICAL_DEVICES]: ['Device'],
|
|
11
|
+
[IPSSections.DIAGNOSTIC_REPORTS]: ['DiagnosticReport', 'Observation'], // Diagnostic reports can include Observations
|
|
12
|
+
[IPSSections.PROCEDURES]: ['Procedure'],
|
|
13
|
+
[IPSSections.FAMILY_HISTORY]: ['FamilyMemberHistory'],
|
|
14
|
+
[IPSSections.SOCIAL_HISTORY]: ['Observation'], // Social history is often Observation
|
|
15
|
+
[IPSSections.PREGNANCY_HISTORY]: ['Observation'], // Pregnancy history is often Observation
|
|
16
|
+
[IPSSections.FUNCTIONAL_STATUS]: ['Observation'], // Functional status is often Observation
|
|
17
|
+
[IPSSections.MEDICAL_HISTORY]: ['Condition'], // Medical history is often Condition
|
|
18
|
+
[IPSSections.CARE_PLAN]: ['CarePlan'],
|
|
19
|
+
[IPSSections.CLINICAL_IMPRESSION]: ['ClinicalImpression'],
|
|
20
|
+
[IPSSections.ADVANCE_DIRECTIVES]: ['DocumentReference'] // Advance directives are often stored as DocumentReference
|
|
21
|
+
};
|
|
22
|
+
export const IPSSectionResourceFilters = {
|
|
23
|
+
// Only include active allergies
|
|
24
|
+
[IPSSections.ALLERGIES]: (resource) => { var _a, _b; return resource.resourceType === 'AllergyIntolerance' && ((_b = (_a = resource.clinicalStatus) === null || _a === void 0 ? void 0 : _a.coding) === null || _b === void 0 ? void 0 : _b.some((c) => c.code === 'active')); },
|
|
25
|
+
// Only include active medication requests/statements
|
|
26
|
+
[IPSSections.MEDICATIONS]: (resource) => (resource.resourceType === 'MedicationRequest' && resource.status === 'active') ||
|
|
27
|
+
(resource.resourceType === 'MedicationStatement' && resource.status === 'active'),
|
|
28
|
+
// Only include active problems/conditions
|
|
29
|
+
[IPSSections.PROBLEMS]: (resource) => { var _a, _b; return resource.resourceType === 'Condition' && ((_b = (_a = resource.clinicalStatus) === null || _a === void 0 ? void 0 : _a.coding) === null || _b === void 0 ? void 0 : _b.some((c) => c.code === 'active')); },
|
|
30
|
+
// Only include completed immunizations
|
|
31
|
+
[IPSSections.IMMUNIZATIONS]: (resource) => resource.resourceType === 'Immunization' && resource.status === 'completed',
|
|
32
|
+
// Only include vital sign Observations (category.coding contains 'vital-signs')
|
|
33
|
+
[IPSSections.VITAL_SIGNS]: (resource) => { var _a; return resource.resourceType === 'Observation' && ((_a = resource.category) === null || _a === void 0 ? void 0 : _a.some((cat) => { var _a; return (_a = cat.coding) === null || _a === void 0 ? void 0 : _a.some((c) => c.code === 'vital-signs'); })); },
|
|
34
|
+
// Only include active devices
|
|
35
|
+
[IPSSections.MEDICAL_DEVICES]: (resource) => resource.resourceType === 'Device' && resource.status === 'active',
|
|
36
|
+
// Only include finalized diagnostic reports
|
|
37
|
+
[IPSSections.DIAGNOSTIC_REPORTS]: (resource) => ["DiagnosticReport", "Observation"].includes(resource.resourceType) && resource.status === 'final',
|
|
38
|
+
// Only include completed procedures
|
|
39
|
+
[IPSSections.PROCEDURES]: (resource) => resource.resourceType === 'Procedure' && resource.status === 'completed',
|
|
40
|
+
// Only include family history resources
|
|
41
|
+
[IPSSections.FAMILY_HISTORY]: (resource) => resource.resourceType === 'FamilyMemberHistory',
|
|
42
|
+
// Only include social history Observations (category.coding contains 'social-history')
|
|
43
|
+
[IPSSections.SOCIAL_HISTORY]: (resource) => { var _a; return resource.resourceType === 'Observation' && ((_a = resource.category) === null || _a === void 0 ? void 0 : _a.some((cat) => { var _a; return (_a = cat.coding) === null || _a === void 0 ? void 0 : _a.some((c) => c.code === 'social-history'); })); },
|
|
44
|
+
// Only include pregnancy history Observations (category.coding contains 'pregnancy')
|
|
45
|
+
[IPSSections.PREGNANCY_HISTORY]: (resource) => { var _a; return resource.resourceType === 'Observation' && ((_a = resource.category) === null || _a === void 0 ? void 0 : _a.some((cat) => { var _a; return (_a = cat.coding) === null || _a === void 0 ? void 0 : _a.some((c) => c.code === 'pregnancy'); })); },
|
|
46
|
+
// Only include functional status Observations (category.coding contains 'functional-status')
|
|
47
|
+
[IPSSections.FUNCTIONAL_STATUS]: (resource) => { var _a; return resource.resourceType === 'Observation' && ((_a = resource.category) === null || _a === void 0 ? void 0 : _a.some((cat) => { var _a; return (_a = cat.coding) === null || _a === void 0 ? void 0 : _a.some((c) => c.code === 'functional-status'); })); },
|
|
48
|
+
// Only include active medical history Conditions
|
|
49
|
+
[IPSSections.MEDICAL_HISTORY]: (resource) => { var _a, _b; return resource.resourceType === 'Condition' && ((_b = (_a = resource.clinicalStatus) === null || _a === void 0 ? void 0 : _a.coding) === null || _b === void 0 ? void 0 : _b.some((c) => c.code === 'active')); },
|
|
50
|
+
// Only include active care plans
|
|
51
|
+
[IPSSections.CARE_PLAN]: (resource) => resource.resourceType === 'CarePlan' && resource.status === 'active',
|
|
52
|
+
// Only include ClinicalImpression resources
|
|
53
|
+
[IPSSections.CLINICAL_IMPRESSION]: (resource) => resource.resourceType === 'ClinicalImpression',
|
|
54
|
+
// Patient section: only Patient resource
|
|
55
|
+
[IPSSections.PATIENT]: (resource) => resource.resourceType === 'Patient',
|
|
56
|
+
};
|
|
57
|
+
// Helper class to get resource types for a section
|
|
58
|
+
export class IPSSectionResourceHelper {
|
|
59
|
+
static getResourceTypesForSection(section) {
|
|
60
|
+
return IPSSectionResourceMap[section] || [];
|
|
61
|
+
}
|
|
62
|
+
static getResourceFilterForSection(section) {
|
|
63
|
+
return IPSSectionResourceFilters[section];
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare enum IPSSections {
|
|
2
|
+
PATIENT = "Patient",
|
|
3
|
+
ALLERGIES = "AllergyIntoleranceSection",
|
|
4
|
+
MEDICATIONS = "MedicationSection",
|
|
5
|
+
PROBLEMS = "ProblemSection",
|
|
6
|
+
IMMUNIZATIONS = "ImmunizationSection",
|
|
7
|
+
VITAL_SIGNS = "VitalSignsSection",
|
|
8
|
+
MEDICAL_DEVICES = "MedicalDeviceSection",
|
|
9
|
+
DIAGNOSTIC_REPORTS = "DiagnosticReportSection",
|
|
10
|
+
PROCEDURES = "ProcedureSection",
|
|
11
|
+
FAMILY_HISTORY = "FamilyHistorySection",
|
|
12
|
+
SOCIAL_HISTORY = "SocialHistorySection",
|
|
13
|
+
PREGNANCY_HISTORY = "PregnancyHistorySection",
|
|
14
|
+
FUNCTIONAL_STATUS = "FunctionalStatusSection",
|
|
15
|
+
MEDICAL_HISTORY = "MedicalHistorySection",
|
|
16
|
+
CARE_PLAN = "CarePlanSection",
|
|
17
|
+
CLINICAL_IMPRESSION = "ClinicalImpressionSection",
|
|
18
|
+
ADVANCE_DIRECTIVES = "AdvanceDirectivesSection"
|
|
19
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// Enum for all possible IPS sections
|
|
2
|
+
export var IPSSections;
|
|
3
|
+
(function (IPSSections) {
|
|
4
|
+
// Mandatory Sections
|
|
5
|
+
IPSSections["PATIENT"] = "Patient";
|
|
6
|
+
IPSSections["ALLERGIES"] = "AllergyIntoleranceSection";
|
|
7
|
+
IPSSections["MEDICATIONS"] = "MedicationSection";
|
|
8
|
+
IPSSections["PROBLEMS"] = "ProblemSection";
|
|
9
|
+
IPSSections["IMMUNIZATIONS"] = "ImmunizationSection";
|
|
10
|
+
// Optional Sections
|
|
11
|
+
IPSSections["VITAL_SIGNS"] = "VitalSignsSection";
|
|
12
|
+
IPSSections["MEDICAL_DEVICES"] = "MedicalDeviceSection";
|
|
13
|
+
// Additional Recommended Sections
|
|
14
|
+
IPSSections["DIAGNOSTIC_REPORTS"] = "DiagnosticReportSection";
|
|
15
|
+
IPSSections["PROCEDURES"] = "ProcedureSection";
|
|
16
|
+
IPSSections["FAMILY_HISTORY"] = "FamilyHistorySection";
|
|
17
|
+
IPSSections["SOCIAL_HISTORY"] = "SocialHistorySection";
|
|
18
|
+
IPSSections["PREGNANCY_HISTORY"] = "PregnancyHistorySection";
|
|
19
|
+
IPSSections["FUNCTIONAL_STATUS"] = "FunctionalStatusSection";
|
|
20
|
+
IPSSections["MEDICAL_HISTORY"] = "MedicalHistorySection";
|
|
21
|
+
IPSSections["CARE_PLAN"] = "CarePlanSection";
|
|
22
|
+
IPSSections["CLINICAL_IMPRESSION"] = "ClinicalImpressionSection";
|
|
23
|
+
IPSSections["ADVANCE_DIRECTIVES"] = "AdvanceDirectivesSection";
|
|
24
|
+
})(IPSSections || (IPSSections = {}));
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { TExtension } from '../partials/Extension';
|
|
2
|
+
import { TPeriod } from '../partials/Period';
|
|
3
|
+
export type TAddress = {
|
|
4
|
+
id?: string;
|
|
5
|
+
extension?: TExtension[];
|
|
6
|
+
use?: string;
|
|
7
|
+
type?: string;
|
|
8
|
+
text?: string;
|
|
9
|
+
line?: string[];
|
|
10
|
+
city?: string;
|
|
11
|
+
district?: string;
|
|
12
|
+
state?: string;
|
|
13
|
+
postalCode?: string;
|
|
14
|
+
country?: string;
|
|
15
|
+
period?: TPeriod;
|
|
16
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { TExtension } from '../partials/Extension';
|
|
2
|
+
import { TCodeableConcept } from '../partials/CodeableConcept';
|
|
3
|
+
import { TDateTime } from '../simpleTypes/DateTime';
|
|
4
|
+
import { TAnnotation } from '../partials/Annotation';
|
|
5
|
+
export type TAllergyIntoleranceReaction = {
|
|
6
|
+
id?: string;
|
|
7
|
+
extension?: TExtension[];
|
|
8
|
+
modifierExtension?: TExtension[];
|
|
9
|
+
substance?: TCodeableConcept;
|
|
10
|
+
manifestation: TCodeableConcept[];
|
|
11
|
+
description?: string;
|
|
12
|
+
onset?: TDateTime;
|
|
13
|
+
severity?: string;
|
|
14
|
+
exposureRoute?: TCodeableConcept;
|
|
15
|
+
note?: TAnnotation[];
|
|
16
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TExtension } from '../partials/Extension';
|
|
2
|
+
import { TReference } from '../partials/Reference';
|
|
3
|
+
import { TDateTime } from '../simpleTypes/DateTime';
|
|
4
|
+
import { TMarkdown } from '../simpleTypes/Markdown';
|
|
5
|
+
export type TAnnotation = {
|
|
6
|
+
id?: string;
|
|
7
|
+
extension?: TExtension[];
|
|
8
|
+
authorReference?: TReference;
|
|
9
|
+
authorString?: string;
|
|
10
|
+
time?: TDateTime;
|
|
11
|
+
text: TMarkdown;
|
|
12
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { TExtension } from '../partials/Extension';
|
|
2
|
+
import { TBase64Binary } from '../simpleTypes/Base64Binary';
|
|
3
|
+
import { TUrl } from '../simpleTypes/Url';
|
|
4
|
+
import { TUnsignedInt } from '../simpleTypes/UnsignedInt';
|
|
5
|
+
import { TDateTime } from '../simpleTypes/DateTime';
|
|
6
|
+
export type TAttachment = {
|
|
7
|
+
id?: string;
|
|
8
|
+
extension?: TExtension[];
|
|
9
|
+
contentType?: string;
|
|
10
|
+
language?: string;
|
|
11
|
+
data?: TBase64Binary;
|
|
12
|
+
url?: TUrl;
|
|
13
|
+
size?: TUnsignedInt;
|
|
14
|
+
hash?: TBase64Binary;
|
|
15
|
+
title?: string;
|
|
16
|
+
creation?: TDateTime;
|
|
17
|
+
};
|