@acorex-platform/module-health-core-client 0.0.32 → 0.0.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/fesm2022/acorex-platform-module-health-core-client-contracts-entities-blood-type.mjs +222 -0
  2. package/fesm2022/acorex-platform-module-health-core-client-contracts-entities-blood-type.mjs.map +1 -0
  3. package/fesm2022/acorex-platform-module-health-core-client-contracts-entities-body-part.mjs +169 -0
  4. package/fesm2022/acorex-platform-module-health-core-client-contracts-entities-body-part.mjs.map +1 -0
  5. package/fesm2022/acorex-platform-module-health-core-client-contracts-entities-disability-status.mjs +222 -0
  6. package/fesm2022/acorex-platform-module-health-core-client-contracts-entities-disability-status.mjs.map +1 -0
  7. package/fesm2022/acorex-platform-module-health-core-client-contracts-entities-health-condition-type.mjs +242 -0
  8. package/fesm2022/acorex-platform-module-health-core-client-contracts-entities-health-condition-type.mjs.map +1 -0
  9. package/fesm2022/acorex-platform-module-health-core-client-contracts-entities-health-condition.mjs +450 -0
  10. package/fesm2022/acorex-platform-module-health-core-client-contracts-entities-health-condition.mjs.map +1 -0
  11. package/fesm2022/acorex-platform-module-health-core-client-contracts-entities-health-event.mjs +458 -0
  12. package/fesm2022/acorex-platform-module-health-core-client-contracts-entities-health-event.mjs.map +1 -0
  13. package/fesm2022/acorex-platform-module-health-core-client-contracts-entities-health-profile.mjs +462 -0
  14. package/fesm2022/acorex-platform-module-health-core-client-contracts-entities-health-profile.mjs.map +1 -0
  15. package/fesm2022/acorex-platform-module-health-core-client-contracts-entities-health-record-type.mjs +199 -0
  16. package/fesm2022/acorex-platform-module-health-core-client-contracts-entities-health-record-type.mjs.map +1 -0
  17. package/fesm2022/acorex-platform-module-health-core-client-contracts-entities-health-restriction.mjs +189 -0
  18. package/fesm2022/acorex-platform-module-health-core-client-contracts-entities-health-restriction.mjs.map +1 -0
  19. package/fesm2022/acorex-platform-module-health-core-client-contracts-entities-injury-type.mjs +169 -0
  20. package/fesm2022/acorex-platform-module-health-core-client-contracts-entities-injury-type.mjs.map +1 -0
  21. package/fesm2022/acorex-platform-module-health-core-client-contracts-entities-vaccination-type.mjs +169 -0
  22. package/fesm2022/acorex-platform-module-health-core-client-contracts-entities-vaccination-type.mjs.map +1 -0
  23. package/fesm2022/acorex-platform-module-health-core-client-contracts-entity-catalog-acorex-platform-module-health-core-client-contracts-entity-catalog-ChOQtTh6.mjs +128 -0
  24. package/fesm2022/acorex-platform-module-health-core-client-contracts-entity-catalog-acorex-platform-module-health-core-client-contracts-entity-catalog-ChOQtTh6.mjs.map +1 -0
  25. package/fesm2022/acorex-platform-module-health-core-client-contracts-entity-catalog-blood-type.entity-Ctb-5t-D.mjs +123 -0
  26. package/fesm2022/acorex-platform-module-health-core-client-contracts-entity-catalog-blood-type.entity-Ctb-5t-D.mjs.map +1 -0
  27. package/fesm2022/acorex-platform-module-health-core-client-contracts-entity-catalog-body-part.entity-DVSkMY6m.mjs +70 -0
  28. package/fesm2022/acorex-platform-module-health-core-client-contracts-entity-catalog-body-part.entity-DVSkMY6m.mjs.map +1 -0
  29. package/fesm2022/acorex-platform-module-health-core-client-contracts-entity-catalog-disability-status.entity-CJEwjeD6.mjs +123 -0
  30. package/fesm2022/acorex-platform-module-health-core-client-contracts-entity-catalog-disability-status.entity-CJEwjeD6.mjs.map +1 -0
  31. package/fesm2022/acorex-platform-module-health-core-client-contracts-entity-catalog-health-condition-type.entity-nMvpgBZN.mjs +143 -0
  32. package/fesm2022/acorex-platform-module-health-core-client-contracts-entity-catalog-health-condition-type.entity-nMvpgBZN.mjs.map +1 -0
  33. package/fesm2022/acorex-platform-module-health-core-client-contracts-entity-catalog-health-condition.entity-WsD5JyJg.mjs +272 -0
  34. package/fesm2022/acorex-platform-module-health-core-client-contracts-entity-catalog-health-condition.entity-WsD5JyJg.mjs.map +1 -0
  35. package/fesm2022/acorex-platform-module-health-core-client-contracts-entity-catalog-health-event.entity-CqqtU3qo.mjs +280 -0
  36. package/fesm2022/acorex-platform-module-health-core-client-contracts-entity-catalog-health-event.entity-CqqtU3qo.mjs.map +1 -0
  37. package/fesm2022/acorex-platform-module-health-core-client-contracts-entity-catalog-health-profile.entity-qqN4ZIIb.mjs +284 -0
  38. package/fesm2022/acorex-platform-module-health-core-client-contracts-entity-catalog-health-profile.entity-qqN4ZIIb.mjs.map +1 -0
  39. package/fesm2022/acorex-platform-module-health-core-client-contracts-entity-catalog-health-record-type.entity-Dgq6FTVR.mjs +100 -0
  40. package/fesm2022/acorex-platform-module-health-core-client-contracts-entity-catalog-health-record-type.entity-Dgq6FTVR.mjs.map +1 -0
  41. package/fesm2022/acorex-platform-module-health-core-client-contracts-entity-catalog-health-restriction.entity-CE1oWLLW.mjs +90 -0
  42. package/fesm2022/acorex-platform-module-health-core-client-contracts-entity-catalog-health-restriction.entity-CE1oWLLW.mjs.map +1 -0
  43. package/fesm2022/acorex-platform-module-health-core-client-contracts-entity-catalog-health-subject-form-layout.utils-BOm1lGPF.mjs +84 -0
  44. package/fesm2022/acorex-platform-module-health-core-client-contracts-entity-catalog-health-subject-form-layout.utils-BOm1lGPF.mjs.map +1 -0
  45. package/fesm2022/acorex-platform-module-health-core-client-contracts-entity-catalog-injury-type.entity-tYDRX6YY.mjs +70 -0
  46. package/fesm2022/acorex-platform-module-health-core-client-contracts-entity-catalog-injury-type.entity-tYDRX6YY.mjs.map +1 -0
  47. package/fesm2022/acorex-platform-module-health-core-client-contracts-entity-catalog-vaccination-type.entity-Cj0alpZ1.mjs +70 -0
  48. package/fesm2022/acorex-platform-module-health-core-client-contracts-entity-catalog-vaccination-type.entity-Cj0alpZ1.mjs.map +1 -0
  49. package/fesm2022/acorex-platform-module-health-core-client-contracts-entity-catalog.mjs +2 -0
  50. package/fesm2022/acorex-platform-module-health-core-client-contracts-entity-catalog.mjs.map +1 -0
  51. package/fesm2022/acorex-platform-module-health-core-client-contracts.mjs.map +1 -1
  52. package/fesm2022/acorex-platform-module-health-core-client-list-alcohol-consumption-options.query-CFQk6mlY.mjs.map +1 -1
  53. package/fesm2022/acorex-platform-module-health-core-client-list-allergy-severity-options.query-BmdEP1TK.mjs.map +1 -1
  54. package/fesm2022/acorex-platform-module-health-core-client-list-chronic-condition-status-options.query-QgsQCqLm.mjs.map +1 -1
  55. package/fesm2022/acorex-platform-module-health-core-client-list-health-risk-level-options.query-BtJdBZVT.mjs.map +1 -1
  56. package/fesm2022/acorex-platform-module-health-core-client-list-injury-mechanism-options.query-D7Tjl7eC.mjs.map +1 -1
  57. package/fesm2022/acorex-platform-module-health-core-client-list-pain-rate-options.query-C9sGCRmk.mjs.map +1 -1
  58. package/fesm2022/acorex-platform-module-health-core-client-list-smoking-status-options.query-EUVhlNLW.mjs.map +1 -1
  59. package/fesm2022/acorex-platform-module-health-core-client-list-work-capacity-options.query-YQ6BW3kG.mjs.map +1 -1
  60. package/fesm2022/acorex-platform-module-health-core-client-local-entities.mjs +39 -0
  61. package/fesm2022/acorex-platform-module-health-core-client-local-entities.mjs.map +1 -0
  62. package/fesm2022/acorex-platform-module-health-core-client-start-health-record-flow.command-BsB-MPmu.mjs.map +1 -1
  63. package/fesm2022/acorex-platform-module-health-core-client.mjs.map +1 -1
  64. package/package.json +54 -2
  65. package/types/acorex-platform-module-health-core-client-contracts-entities-blood-type.d.ts +5 -0
  66. package/types/acorex-platform-module-health-core-client-contracts-entities-body-part.d.ts +5 -0
  67. package/types/acorex-platform-module-health-core-client-contracts-entities-disability-status.d.ts +5 -0
  68. package/types/acorex-platform-module-health-core-client-contracts-entities-health-condition-type.d.ts +5 -0
  69. package/types/acorex-platform-module-health-core-client-contracts-entities-health-condition.d.ts +5 -0
  70. package/types/acorex-platform-module-health-core-client-contracts-entities-health-event.d.ts +5 -0
  71. package/types/acorex-platform-module-health-core-client-contracts-entities-health-profile.d.ts +5 -0
  72. package/types/acorex-platform-module-health-core-client-contracts-entities-health-record-type.d.ts +5 -0
  73. package/types/acorex-platform-module-health-core-client-contracts-entities-health-restriction.d.ts +5 -0
  74. package/types/acorex-platform-module-health-core-client-contracts-entities-injury-type.d.ts +5 -0
  75. package/types/acorex-platform-module-health-core-client-contracts-entities-vaccination-type.d.ts +5 -0
  76. package/types/acorex-platform-module-health-core-client-contracts-entity-catalog.d.ts +10 -0
  77. package/types/acorex-platform-module-health-core-client-contracts.d.ts +2 -1
  78. package/types/acorex-platform-module-health-core-client-local-entities.d.ts +12 -0
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-health-core-client-contracts.mjs","sources":["../../../../libs/modules/health-core/contracts/src/catalog-scope.keys.ts","../../../../libs/modules/health-core/contracts/src/commands.keys.ts","../../../../libs/modules/health-core/contracts/src/menu.keys.ts","../../../../libs/modules/health-core/contracts/src/permission.keys.ts","../../../../libs/modules/health-core/contracts/src/health-subject-form-layout.utils.ts","../../../../libs/modules/health-core/contracts/src/health-subject.utils.ts","../../../../libs/modules/health-core/contracts/src/root-config.ts","../../../../libs/modules/health-core/contracts/src/entities/blood-type/blood-type.types.ts","../../../../libs/modules/health-core/contracts/src/entities/body-part/body-part.types.ts","../../../../libs/modules/health-core/contracts/src/entities/disability-status/disability-status.types.ts","../../../../libs/modules/health-core/contracts/src/entities/health-condition/health-condition.types.ts","../../../../libs/modules/health-core/contracts/src/entities/health-condition-type/health-condition-type.types.ts","../../../../libs/modules/health-core/contracts/src/entities/health-event/health-event.types.ts","../../../../libs/modules/health-core/contracts/src/entities/health-profile/health-profile.types.ts","../../../../libs/modules/health-core/contracts/src/entities/health-record-type/health-record-type.types.ts","../../../../libs/modules/health-core/contracts/src/entities/health-restriction/health-restriction.types.ts","../../../../libs/modules/health-core/contracts/src/entities/injury-type/injury-type.types.ts","../../../../libs/modules/health-core/contracts/src/entities/vaccination-type/vaccination-type.types.ts","../../../../libs/modules/health-core/contracts/src/index.ts","../../../../libs/modules/health-core/contracts/src/acorex-platform-module-health-core-client-contracts.ts"],"sourcesContent":["/** Health catalog scope for questionnaires, question bank items, and workflow definitions. */\nexport const HEALTH_CATALOG_SCOPE = 'health-core.health';\n","export const AXMHealthCoreCommandKeys = {\n HealthEvent: {\n StartFlow: 'HealthCore.HealthEvent:StartFlow',\n },\n} as const;\n","export const AXMHealthCoreMenuKeys = {\n Root: 'health-core',\n BloodTypes: 'health-core.blood-types',\n BodyParts: 'health-core.body-parts',\n DisabilityStatuses: 'health-core.disability-statuses',\n InjuryTypes: 'health-core.injury-types',\n VaccinationTypes: 'health-core.vaccination-types',\n HealthConditionTypes: 'health-core.health-condition-types',\n HealthRestrictions: 'health-core.health-restrictions',\n HealthRecordTypes: 'health-core.health-record-types',\n HealthEvents: 'health-core.health-events',\n HealthProfiles: 'health-core.health-profiles',\n HealthConditions: 'health-core.health-conditions',\n} as const;\n","/**\n * Safety & Risk capabilities used by this module.\n * Domain capability keys for this module. Root groups live in `AXPCommonPermissionGroupKeys` (common contracts).\n */\nexport const AXPSafetyRiskPermissionKeys = {\n Access: 'SafetyRisk:Permission:Access',\n MaintainSafety: 'SafetyRisk:Permission:MaintainSafety',\n MaintainRisk: 'SafetyRisk:Permission:MaintainRisk',\n MaintainHealth: 'SafetyRisk:Permission:MaintainHealth',\n MaintainAssessments: 'SafetyRisk:Permission:MaintainAssessments',\n Setup: 'SafetyRisk:Permission:Setup',\n} as const;\n\n/**\n * @deprecated Prefer {@link AXPSafetyRiskPermissionKeys}.\n * Legacy nested shape kept so existing imports compile during migration.\n */\nexport const AXMHealthCorePermissionKeys = {\n HealthCore: {\n BloodType: { Management: AXPSafetyRiskPermissionKeys.Setup },\n BodyPart: { Management: AXPSafetyRiskPermissionKeys.Setup },\n DisabilityStatus: { Management: AXPSafetyRiskPermissionKeys.Setup },\n InjuryType: { Management: AXPSafetyRiskPermissionKeys.Setup },\n VaccinationType: { Management: AXPSafetyRiskPermissionKeys.Setup },\n HealthConditionType: { Management: AXPSafetyRiskPermissionKeys.Setup },\n HealthRestriction: { Management: AXPSafetyRiskPermissionKeys.Setup },\n HealthRecordType: { Management: AXPSafetyRiskPermissionKeys.Setup },\n HealthProfile: {\n ViewOwn: AXPSafetyRiskPermissionKeys.MaintainHealth,\n EditOwn: AXPSafetyRiskPermissionKeys.MaintainHealth,\n View: AXPSafetyRiskPermissionKeys.MaintainHealth,\n Manage: AXPSafetyRiskPermissionKeys.MaintainHealth,\n },\n HealthCondition: {\n ViewOwn: AXPSafetyRiskPermissionKeys.MaintainHealth,\n EditOwn: AXPSafetyRiskPermissionKeys.MaintainHealth,\n View: AXPSafetyRiskPermissionKeys.MaintainHealth,\n Manage: AXPSafetyRiskPermissionKeys.MaintainHealth,\n },\n HealthEvent: {\n ViewOwn: AXPSafetyRiskPermissionKeys.MaintainHealth,\n EditOwn: AXPSafetyRiskPermissionKeys.MaintainHealth,\n View: AXPSafetyRiskPermissionKeys.MaintainHealth,\n Manage: AXPSafetyRiskPermissionKeys.MaintainHealth,\n },\n },\n} as const;\n","//#region ---- Subject form layout helpers ----\n\n/** Subject lookup field omitted from create/update when injected from parent context. */\nexport const HEALTH_SUBJECT_PROPERTY_NAMES = ['subject.id'] as const;\n\ntype PropertyLayoutRef = { name: string; layout?: Record<string, unknown> };\n\n/** Omits subject lookup from master create/update layouts (subject is injected from context). */\nexport function omitHealthSubjectFromEditLayouts<T extends PropertyLayoutRef>(layouts: T[]): T[] {\n return layouts.filter(\n (layout) => !HEALTH_SUBJECT_PROPERTY_NAMES.includes(layout.name as (typeof HEALTH_SUBJECT_PROPERTY_NAMES)[number]),\n );\n}\n\n//#endregion\n","//#region ---- Imports ----\n\nimport { AXPWidgetsList } from '@acorex-platform/framework-shared/core';\nimport type { AXPEntityProperty, AXPQueryFilter } from '@acorex-platform/framework-shared/entity';\n\n//#endregion\n\n//#region ---- Subject filter helpers ----\n\n/** Person subject type for health records shared between My Profile and employee detail. */\nexport const HEALTH_PERSON_SUBJECT_TYPE = 'PersonCore.Person';\n\n/** Filters child health records by polymorphic subject on a parent entity detail context. */\nexport function healthSubjectReferenceConditions(subjectType: string): AXPQueryFilter[] {\n return [\n {\n name: 'subject.type',\n operator: { type: 'equal' },\n value: subjectType,\n },\n {\n name: 'subject.id',\n operator: { type: 'equal' },\n value: '{{context.eval(\"id\")}}',\n },\n ];\n}\n\n/**\n * Filters health records for an employee's linked person (`personId` on employee context).\n * Use for all person-scoped health records on employee detail so data matches My Profile.\n */\nexport function healthPersonSubjectReferenceConditions(\n personIdExpression = '{{context.eval(\"personId\")}}',\n): AXPQueryFilter[] {\n return [\n {\n name: 'subject.type',\n operator: { type: 'equal' },\n value: HEALTH_PERSON_SUBJECT_TYPE,\n },\n {\n name: 'subject.id',\n operator: { type: 'equal' },\n value: personIdExpression,\n },\n ];\n}\n\n//#endregion\n\n//#region ---- Subject lookup property ----\n\n/** Single polymorphic subject lookup (assessment-case `subjectRef.id` pattern). */\nexport function createHealthSubjectLookupProperty(\n groupId: string,\n options: { readonly?: boolean } = {},\n): AXPEntityProperty {\n const readonly = options.readonly ?? false;\n\n return {\n name: 'subject.id',\n title: '@health-core:terms.subject.title',\n groupId,\n options: readonly\n ? { sort: { enabled: false }, filter: { advance: { enabled: false }, inline: { enabled: false } } }\n : undefined,\n schema: {\n dataType: 'string',\n readonly,\n interface: {\n type: AXPWidgetsList.Editors.LookupBox,\n options: {\n readonly,\n entity: \"{{ context.eval('subject.type') }}\",\n valueField: 'id',\n expose: [\n { source: 'id', target: 'subject.id' },\n { source: 'title', target: 'subject.title' },\n ],\n },\n },\n },\n validations: [{ rule: 'required' }],\n };\n}\n\n//#endregion\n","const config = {\n i18n: 'health-core',\n module: 'HealthCore',\n};\n\nexport const RootConfig = {\n config,\n module: {\n name: config.module,\n title: `@${config.i18n}:module.title`,\n icon: 'fa-light fa-heart-pulse',\n },\n entities: {\n bloodType: {\n name: 'BloodType',\n title: `@${config.i18n}:blood-types.entities.blood-type.title`,\n titlePlural: `@${config.i18n}:blood-types.entities.blood-type.plural`,\n icon: 'fa-light fa-droplet',\n },\n bodyPart: {\n name: 'BodyPart',\n title: `@${config.i18n}:body-parts.entities.body-part.title`,\n titlePlural: `@${config.i18n}:body-parts.entities.body-part.plural`,\n icon: 'fa-light fa-person',\n },\n disabilityStatus: {\n name: 'DisabilityStatus',\n title: `@${config.i18n}:disability-statuses.entities.disability-status.title`,\n titlePlural: `@${config.i18n}:disability-statuses.entities.disability-status.plural`,\n icon: 'fa-light fa-wheelchair',\n },\n injuryType: {\n name: 'InjuryType',\n title: `@${config.i18n}:injury-types.entities.injury-type.title`,\n titlePlural: `@${config.i18n}:injury-types.entities.injury-type.plural`,\n icon: 'fa-light fa-bandage',\n },\n vaccinationType: {\n name: 'VaccinationType',\n title: `@${config.i18n}:vaccination-types.entities.vaccination-type.title`,\n titlePlural: `@${config.i18n}:vaccination-types.entities.vaccination-type.plural`,\n icon: 'fa-light fa-syringe',\n },\n healthConditionType: {\n name: 'HealthConditionType',\n title: `@${config.i18n}:health-condition-types.entities.health-condition-type.title`,\n titlePlural: `@${config.i18n}:health-condition-types.entities.health-condition-type.plural`,\n icon: 'fa-light fa-file-medical',\n },\n healthRestriction: {\n name: 'HealthRestriction',\n title: `@${config.i18n}:health-restrictions.entities.health-restriction.title`,\n titlePlural: `@${config.i18n}:health-restrictions.entities.health-restriction.plural`,\n icon: 'fa-light fa-ban',\n },\n healthRecordType: {\n name: 'HealthRecordType',\n title: `@${config.i18n}:health-record-types.entities.health-record-type.title`,\n titlePlural: `@${config.i18n}:health-record-types.entities.health-record-type.plural`,\n icon: 'fa-light fa-notes-medical',\n },\n healthEvent: {\n name: 'HealthEvent',\n title: `@${config.i18n}:health-events.entities.health-event.title`,\n titlePlural: `@${config.i18n}:health-events.entities.health-event.plural`,\n icon: 'fa-light fa-file-medical',\n },\n healthProfile: {\n name: 'HealthProfile',\n title: `@${config.i18n}:health-profiles.entities.health-profile.title`,\n titlePlural: `@${config.i18n}:health-profiles.entities.health-profile.plural`,\n icon: 'fa-light fa-heart-pulse',\n },\n healthCondition: {\n name: 'HealthCondition',\n title: `@${config.i18n}:health-conditions.entities.health-condition.title`,\n titlePlural: `@${config.i18n}:health-conditions.entities.health-condition.plural`,\n icon: 'fa-light fa-file-medical',\n },\n },\n queries: {\n reports: {\n getHealthEventsByType: `${config.module}:Reports:GetHealthEventsByType`,\n getWorkplaceInjuries: `${config.module}:Reports:GetWorkplaceInjuries`,\n getActiveWorkRestrictions: `${config.module}:Reports:GetActiveWorkRestrictions`,\n getFitnessForWorkStatus: `${config.module}:Reports:GetFitnessForWorkStatus`,\n getVaccinationCoverage: `${config.module}:Reports:GetVaccinationCoverage`,\n getHealthRiskDistribution: `${config.module}:Reports:GetHealthRiskDistribution`,\n getIncompleteHealthProfiles: `${config.module}:Reports:GetIncompleteHealthProfiles`,\n getIncompleteHealthProfileEmployees: `${config.module}:Reports:GetIncompleteHealthProfileEmployees`,\n },\n dashboard: {\n healthEventsTrendLine: `${config.module}:Dashboard:HealthEventsTrendLine`,\n },\n },\n} as const;\n","import { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n//#region ---- Blood Type Model ----\n\nexport interface AXMHealthCoreBloodTypeEntityModel extends AXPEntityModel<string> {\n title: AXPMultiLanguageString;\n description?: AXPMultiLanguageString | null;\n}\n\n//#endregion\n","import { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n//#region ---- Body Part Model ----\n\nexport interface AXMHealthCoreBodyPartEntityModel extends AXPEntityModel<string> {\n title: AXPMultiLanguageString;\n description?: AXPMultiLanguageString | null;\n}\n\n//#endregion\n","import { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n//#region ---- Disability Status Model ----\n\nexport interface AXMHealthCoreDisabilityStatusEntityModel extends AXPEntityModel<string> {\n title: AXPMultiLanguageString;\n description?: AXPMultiLanguageString | null;\n}\n\n//#endregion\n","//#region ---- Imports ----\n\nimport type { AXPEntityReference } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n\n//#endregion\n\n//#region ---- Restriction assignment ----\n\nexport interface AXMHealthCoreHealthConditionRestrictionItem {\n restrictionId: string;\n restriction?: { id: string; title?: unknown };\n startDate?: Date | string;\n endDate?: Date | string;\n}\n\n//#endregion\n\n//#region ---- Health condition ----\n\nexport interface AXMHealthCoreHealthConditionEntityModel extends AXPEntityModel<string> {\n subject: AXPEntityReference;\n conditionTypeId: string;\n conditionType?: { id: string; title?: unknown; kind?: string };\n diagnosedDate?: Date | string;\n restrictions?: AXMHealthCoreHealthConditionRestrictionItem[];\n notes?: string;\n}\n\n//#endregion\n","//#region ---- Imports ----\n\nimport type { AXMMetaDataBuilderValue } from '@acorex-platform/module-data-management-client/contracts';\nimport type { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n\n//#endregion\n\n//#region ---- Health condition type ----\n\nexport type AXMHealthCoreHealthConditionKind = 'allergy' | 'chronic';\n\nexport interface AXMHealthCoreHealthConditionTypeEntityModel extends AXPEntityModel<string> {\n title: unknown;\n kind: AXMHealthCoreHealthConditionKind;\n description?: unknown;\n suggestedRestrictionIds?: string[];\n suggestedRestrictions?: Array<{ id: string; title: AXPMultiLanguageString }>;\n metaDataList?: AXMMetaDataBuilderValue;\n}\n\n//#endregion\n","//#region ---- Imports ----\n\nimport { type AXPEntityReference, type AXPMultiLanguageString, AXPSystemStatusType } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n\n//#endregion\n\n//#region ---- Health event ----\n\nexport type AXMHealthCoreHealthEventStatus =\n | AXPSystemStatusType.InProgress\n | AXPSystemStatusType.WaitingSignOff\n | AXPSystemStatusType.Completed\n | AXPSystemStatusType.Cancelled;\n\nexport interface AXMHealthCoreHealthEventEntityModel extends AXPEntityModel<string> {\n subject: AXPEntityReference;\n recordTypeId: string;\n recordType?: {\n id: string;\n title?: AXPMultiLanguageString;\n };\n occurredDate?: Date | string;\n endDate?: Date | string | null;\n provider?: string;\n facility?: string;\n notes?: string;\n employeeSignature?: string;\n employeeSignedAt?: Date | string;\n managerSignature?: string;\n managerSignedAt?: Date | string;\n statusId?: AXMHealthCoreHealthEventStatus;\n status?: { id: AXMHealthCoreHealthEventStatus; title?: string };\n}\n\n//#endregion\n","//#region ---- Imports ----\n\nimport type { AXPEntityReference } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n\n//#endregion\n\n//#region ---- Health profile ----\n\nexport interface AXMHealthCoreHealthProfileEntityModel extends AXPEntityModel<string> {\n subject: AXPEntityReference;\n bloodTypeId?: string;\n bloodType?: { id: string; title?: unknown };\n disabilityStatusId?: string;\n disabilityStatus?: { id: string; title?: unknown };\n smokingStatus?: string;\n alcoholConsumption?: string;\n healthRiskLevel?: string;\n doctorName?: string;\n doctorNumber?: string;\n emergencyContactName?: string;\n emergencyContactPhone?: string;\n emergencyContactEmail?: string;\n notes?: string;\n}\n\n//#endregion\n","//#region ---- Imports ----\n\nimport type { AXMMetaDataBuilderValue } from '@acorex-platform/module-data-management-client/contracts';\nimport type { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n\n//#endregion\n\n//#region ---- Health record type ----\n\n/** Workflow template binding and admin-configured default inputs for health record types. */\nexport interface AXMHealthCoreHealthRecordTypeWorkflowConfig {\n workflowDefinitionId: string;\n workflowName: string;\n defaultInput?: Record<string, unknown>;\n}\n\n/**\n * Defines workflow defaults, questionnaire, and metadata schema for health timeline records.\n */\nexport interface AXMHealthCoreHealthRecordTypeEntityModel extends AXPEntityModel<string> {\n title: AXPMultiLanguageString;\n description?: AXPMultiLanguageString;\n workflowConfig?: AXMHealthCoreHealthRecordTypeWorkflowConfig | null;\n icon?: string;\n metaDataList?: AXMMetaDataBuilderValue;\n}\n\n//#endregion\n","//#region ---- Imports ----\n\nimport type { AXPCategoryListItem, AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n\n//#endregion\n\n//#region ---- Health restriction ----\n\nexport interface AXMHealthCoreHealthRestrictionEntityModel extends AXPEntityModel<string> {\n title: AXPMultiLanguageString;\n description?: AXPMultiLanguageString;\n categoryIds?: string[];\n categories?: AXPCategoryListItem[];\n}\n\n//#endregion\n","import { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n//#region ---- Injury Type Model ----\n\nexport interface AXMHealthCoreInjuryTypeEntityModel extends AXPEntityModel<string> {\n title: AXPMultiLanguageString;\n description?: AXPMultiLanguageString | null;\n}\n\n//#endregion\n","import { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n//#region ---- Vaccination Type Model ----\n\nexport interface AXMHealthCoreVaccinationTypeEntityModel extends AXPEntityModel<string> {\n title: AXPMultiLanguageString;\n description?: AXPMultiLanguageString | null;\n}\n\n//#endregion\n","//#region ---- Contracts barrel ----\n\nexport * from './catalog-scope.keys';\nexport * from './commands.keys';\nexport * from './menu.keys';\nexport * from './permission.keys';\n\nexport * from './health-subject-form-layout.utils';\nexport * from './health-subject.utils';\nexport * from './root-config';\n\n//#endregion\n\nexport * from './entities';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAAA;AACO,MAAM,oBAAoB,GAAG;;ACD7B,MAAM,wBAAwB,GAAG;AACtC,IAAA,WAAW,EAAE;AACX,QAAA,SAAS,EAAE,kCAAkC;AAC9C,KAAA;;;ACHI,MAAM,qBAAqB,GAAG;AACnC,IAAA,IAAI,EAAE,aAAa;AACnB,IAAA,UAAU,EAAE,yBAAyB;AACrC,IAAA,SAAS,EAAE,wBAAwB;AACnC,IAAA,kBAAkB,EAAE,iCAAiC;AACrD,IAAA,WAAW,EAAE,0BA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CAAA,CAAoC;AAC/E,YAAA,2BAA2B,EAAE,CAAA,EAAG,MAAM,CAAC,MAAM,CAAA,oCAAA,CAAsC;AACnF,YAAA,mCAAmC,EAAE,CAAA,EAAG,MAAM,CAAC,MAAM,CAAA,4CAAA,CAA8C;AACpG,SAAA;AACD,QAAA,SAAS,EAAE;AACT,YAAA,qBAAqB,EAAE,CAAA,EAAG,MAAM,CAAC,MAAM,CAAA,gCAAA,CAAkC;AAC1E,SAAA;AACF,KAAA;;;ACrFH;;ACAA;;ACAA;;ACTA;AA6BA;;AC7BA;AAqBA;;ACrBA;AAmCA;;ACnCA;AA0BA;;AC1BA;AA4BA;;AC5BA;AAgBA;;ACPA;;ACAA;;ACTA;;ACAA;;AAEG;;;;"}
1
+ {"version":3,"file":"acorex-platform-module-health-core-client-contracts.mjs","sources":["../../../../libs/modules/health-core/contracts/src/catalog-scope.keys.ts","../../../../libs/modules/health-core/contracts/src/commands.keys.ts","../../../../libs/modules/health-core/contracts/src/menu.keys.ts","../../../../libs/modules/health-core/contracts/src/permission.keys.ts","../../../../libs/modules/health-core/contracts/src/health-subject-form-layout.utils.ts","../../../../libs/modules/health-core/contracts/src/health-subject.utils.ts","../../../../libs/modules/health-core/contracts/src/root-config.ts","../../../../libs/modules/health-core/contracts/src/entities/blood-type/blood-type.types.ts","../../../../libs/modules/health-core/contracts/src/entities/body-part/body-part.types.ts","../../../../libs/modules/health-core/contracts/src/entities/disability-status/disability-status.types.ts","../../../../libs/modules/health-core/contracts/src/entities/health-condition/health-condition.types.ts","../../../../libs/modules/health-core/contracts/src/entities/health-condition-type/health-condition-type.types.ts","../../../../libs/modules/health-core/contracts/src/entities/health-event/health-event.types.ts","../../../../libs/modules/health-core/contracts/src/entities/health-profile/health-profile.types.ts","../../../../libs/modules/health-core/contracts/src/entities/health-record-type/health-record-type.types.ts","../../../../libs/modules/health-core/contracts/src/entities/health-restriction/health-restriction.types.ts","../../../../libs/modules/health-core/contracts/src/entities/injury-type/injury-type.types.ts","../../../../libs/modules/health-core/contracts/src/entities/vaccination-type/vaccination-type.types.ts","../../../../libs/modules/health-core/contracts/src/index.ts","../../../../libs/modules/health-core/contracts/src/acorex-platform-module-health-core-client-contracts.ts"],"sourcesContent":["/** Health catalog scope for questionnaires, question bank items, and workflow definitions. */\nexport const HEALTH_CATALOG_SCOPE = 'health-core.health';\n","export const AXMHealthCoreCommandKeys = {\n HealthEvent: {\n StartFlow: 'HealthCore.HealthEvent:StartFlow',\n },\n} as const;\n","export const AXMHealthCoreMenuKeys = {\n Root: 'health-core',\n BloodTypes: 'health-core.blood-types',\n BodyParts: 'health-core.body-parts',\n DisabilityStatuses: 'health-core.disability-statuses',\n InjuryTypes: 'health-core.injury-types',\n VaccinationTypes: 'health-core.vaccination-types',\n HealthConditionTypes: 'health-core.health-condition-types',\n HealthRestrictions: 'health-core.health-restrictions',\n HealthRecordTypes: 'health-core.health-record-types',\n HealthEvents: 'health-core.health-events',\n HealthProfiles: 'health-core.health-profiles',\n HealthConditions: 'health-core.health-conditions',\n} as const;\n","/**\n * Safety & Risk capabilities used by this module.\n * Domain capability keys for this module. Root groups live in `AXPCommonPermissionGroupKeys` (common contracts).\n */\nexport const AXPSafetyRiskPermissionKeys = {\n Access: 'SafetyRisk:Permission:Access',\n MaintainSafety: 'SafetyRisk:Permission:MaintainSafety',\n MaintainRisk: 'SafetyRisk:Permission:MaintainRisk',\n MaintainHealth: 'SafetyRisk:Permission:MaintainHealth',\n MaintainAssessments: 'SafetyRisk:Permission:MaintainAssessments',\n Setup: 'SafetyRisk:Permission:Setup',\n} as const;\n\n/**\n * @deprecated Prefer {@link AXPSafetyRiskPermissionKeys}.\n * Legacy nested shape kept so existing imports compile during migration.\n */\nexport const AXMHealthCorePermissionKeys = {\n HealthCore: {\n BloodType: { Management: AXPSafetyRiskPermissionKeys.Setup },\n BodyPart: { Management: AXPSafetyRiskPermissionKeys.Setup },\n DisabilityStatus: { Management: AXPSafetyRiskPermissionKeys.Setup },\n InjuryType: { Management: AXPSafetyRiskPermissionKeys.Setup },\n VaccinationType: { Management: AXPSafetyRiskPermissionKeys.Setup },\n HealthConditionType: { Management: AXPSafetyRiskPermissionKeys.Setup },\n HealthRestriction: { Management: AXPSafetyRiskPermissionKeys.Setup },\n HealthRecordType: { Management: AXPSafetyRiskPermissionKeys.Setup },\n HealthProfile: {\n ViewOwn: AXPSafetyRiskPermissionKeys.MaintainHealth,\n EditOwn: AXPSafetyRiskPermissionKeys.MaintainHealth,\n View: AXPSafetyRiskPermissionKeys.MaintainHealth,\n Manage: AXPSafetyRiskPermissionKeys.MaintainHealth,\n },\n HealthCondition: {\n ViewOwn: AXPSafetyRiskPermissionKeys.MaintainHealth,\n EditOwn: AXPSafetyRiskPermissionKeys.MaintainHealth,\n View: AXPSafetyRiskPermissionKeys.MaintainHealth,\n Manage: AXPSafetyRiskPermissionKeys.MaintainHealth,\n },\n HealthEvent: {\n ViewOwn: AXPSafetyRiskPermissionKeys.MaintainHealth,\n EditOwn: AXPSafetyRiskPermissionKeys.MaintainHealth,\n View: AXPSafetyRiskPermissionKeys.MaintainHealth,\n Manage: AXPSafetyRiskPermissionKeys.MaintainHealth,\n },\n },\n} as const;\n","//#region ---- Subject form layout helpers ----\n\n/** Subject lookup field omitted from create/update when injected from parent context. */\nexport const HEALTH_SUBJECT_PROPERTY_NAMES = ['subject.id'] as const;\n\ntype PropertyLayoutRef = { name: string; layout?: Record<string, unknown> };\n\n/** Omits subject lookup from master create/update layouts (subject is injected from context). */\nexport function omitHealthSubjectFromEditLayouts<T extends PropertyLayoutRef>(layouts: T[]): T[] {\n return layouts.filter(\n (layout) => !HEALTH_SUBJECT_PROPERTY_NAMES.includes(layout.name as (typeof HEALTH_SUBJECT_PROPERTY_NAMES)[number]),\n );\n}\n\n//#endregion\n","//#region ---- Imports ----\n\nimport { AXPWidgetsList } from '@acorex-platform/framework-shared/core';\nimport type { AXPEntityProperty, AXPQueryFilter } from '@acorex-platform/framework-shared/entity';\n\n//#endregion\n\n//#region ---- Subject filter helpers ----\n\n/** Person subject type for health records shared between My Profile and employee detail. */\nexport const HEALTH_PERSON_SUBJECT_TYPE = 'PersonCore.Person';\n\n/** Filters child health records by polymorphic subject on a parent entity detail context. */\nexport function healthSubjectReferenceConditions(subjectType: string): AXPQueryFilter[] {\n return [\n {\n name: 'subject.type',\n operator: { type: 'equal' },\n value: subjectType,\n },\n {\n name: 'subject.id',\n operator: { type: 'equal' },\n value: '{{context.eval(\"id\")}}',\n },\n ];\n}\n\n/**\n * Filters health records for an employee's linked person (`personId` on employee context).\n * Use for all person-scoped health records on employee detail so data matches My Profile.\n */\nexport function healthPersonSubjectReferenceConditions(\n personIdExpression = '{{context.eval(\"personId\")}}',\n): AXPQueryFilter[] {\n return [\n {\n name: 'subject.type',\n operator: { type: 'equal' },\n value: HEALTH_PERSON_SUBJECT_TYPE,\n },\n {\n name: 'subject.id',\n operator: { type: 'equal' },\n value: personIdExpression,\n },\n ];\n}\n\n//#endregion\n\n//#region ---- Subject lookup property ----\n\n/** Single polymorphic subject lookup (assessment-case `subjectRef.id` pattern). */\nexport function createHealthSubjectLookupProperty(\n groupId: string,\n options: { readonly?: boolean } = {},\n): AXPEntityProperty {\n const readonly = options.readonly ?? false;\n\n return {\n name: 'subject.id',\n title: '@health-core:terms.subject.title',\n groupId,\n options: readonly\n ? { sort: { enabled: false }, filter: { advance: { enabled: false }, inline: { enabled: false } } }\n : undefined,\n schema: {\n dataType: 'string',\n readonly,\n interface: {\n type: AXPWidgetsList.Editors.LookupBox,\n options: {\n readonly,\n entity: \"{{ context.eval('subject.type') }}\",\n valueField: 'id',\n expose: [\n { source: 'id', target: 'subject.id' },\n { source: 'title', target: 'subject.title' },\n ],\n },\n },\n },\n validations: [{ rule: 'required' }],\n };\n}\n\n//#endregion\n","const config = {\n i18n: 'health-core',\n module: 'HealthCore',\n};\n\nexport const RootConfig = {\n config,\n module: {\n name: config.module,\n title: `@${config.i18n}:module.title`,\n icon: 'fa-light fa-heart-pulse',\n },\n entities: {\n bloodType: {\n name: 'BloodType',\n title: `@${config.i18n}:blood-types.entities.blood-type.title`,\n titlePlural: `@${config.i18n}:blood-types.entities.blood-type.plural`,\n icon: 'fa-light fa-droplet',\n },\n bodyPart: {\n name: 'BodyPart',\n title: `@${config.i18n}:body-parts.entities.body-part.title`,\n titlePlural: `@${config.i18n}:body-parts.entities.body-part.plural`,\n icon: 'fa-light fa-person',\n },\n disabilityStatus: {\n name: 'DisabilityStatus',\n title: `@${config.i18n}:disability-statuses.entities.disability-status.title`,\n titlePlural: `@${config.i18n}:disability-statuses.entities.disability-status.plural`,\n icon: 'fa-light fa-wheelchair',\n },\n injuryType: {\n name: 'InjuryType',\n title: `@${config.i18n}:injury-types.entities.injury-type.title`,\n titlePlural: `@${config.i18n}:injury-types.entities.injury-type.plural`,\n icon: 'fa-light fa-bandage',\n },\n vaccinationType: {\n name: 'VaccinationType',\n title: `@${config.i18n}:vaccination-types.entities.vaccination-type.title`,\n titlePlural: `@${config.i18n}:vaccination-types.entities.vaccination-type.plural`,\n icon: 'fa-light fa-syringe',\n },\n healthConditionType: {\n name: 'HealthConditionType',\n title: `@${config.i18n}:health-condition-types.entities.health-condition-type.title`,\n titlePlural: `@${config.i18n}:health-condition-types.entities.health-condition-type.plural`,\n icon: 'fa-light fa-file-medical',\n },\n healthRestriction: {\n name: 'HealthRestriction',\n title: `@${config.i18n}:health-restrictions.entities.health-restriction.title`,\n titlePlural: `@${config.i18n}:health-restrictions.entities.health-restriction.plural`,\n icon: 'fa-light fa-ban',\n },\n healthRecordType: {\n name: 'HealthRecordType',\n title: `@${config.i18n}:health-record-types.entities.health-record-type.title`,\n titlePlural: `@${config.i18n}:health-record-types.entities.health-record-type.plural`,\n icon: 'fa-light fa-notes-medical',\n },\n healthEvent: {\n name: 'HealthEvent',\n title: `@${config.i18n}:health-events.entities.health-event.title`,\n titlePlural: `@${config.i18n}:health-events.entities.health-event.plural`,\n icon: 'fa-light fa-file-medical',\n },\n healthProfile: {\n name: 'HealthProfile',\n title: `@${config.i18n}:health-profiles.entities.health-profile.title`,\n titlePlural: `@${config.i18n}:health-profiles.entities.health-profile.plural`,\n icon: 'fa-light fa-heart-pulse',\n },\n healthCondition: {\n name: 'HealthCondition',\n title: `@${config.i18n}:health-conditions.entities.health-condition.title`,\n titlePlural: `@${config.i18n}:health-conditions.entities.health-condition.plural`,\n icon: 'fa-light fa-file-medical',\n },\n },\n queries: {\n reports: {\n getHealthEventsByType: `${config.module}:Reports:GetHealthEventsByType`,\n getWorkplaceInjuries: `${config.module}:Reports:GetWorkplaceInjuries`,\n getActiveWorkRestrictions: `${config.module}:Reports:GetActiveWorkRestrictions`,\n getFitnessForWorkStatus: `${config.module}:Reports:GetFitnessForWorkStatus`,\n getVaccinationCoverage: `${config.module}:Reports:GetVaccinationCoverage`,\n getHealthRiskDistribution: `${config.module}:Reports:GetHealthRiskDistribution`,\n getIncompleteHealthProfiles: `${config.module}:Reports:GetIncompleteHealthProfiles`,\n getIncompleteHealthProfileEmployees: `${config.module}:Reports:GetIncompleteHealthProfileEmployees`,\n },\n dashboard: {\n healthEventsTrendLine: `${config.module}:Dashboard:HealthEventsTrendLine`,\n },\n },\n} as const;\n","import { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n//#region ---- Blood Type Model ----\n\nexport interface AXMHealthCoreBloodTypeEntityModel extends AXPEntityModel<string> {\n title: AXPMultiLanguageString;\n description?: AXPMultiLanguageString | null;\n}\n\n//#endregion\n","import { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n//#region ---- Body Part Model ----\n\nexport interface AXMHealthCoreBodyPartEntityModel extends AXPEntityModel<string> {\n title: AXPMultiLanguageString;\n description?: AXPMultiLanguageString | null;\n}\n\n//#endregion\n","import { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n//#region ---- Disability Status Model ----\n\nexport interface AXMHealthCoreDisabilityStatusEntityModel extends AXPEntityModel<string> {\n title: AXPMultiLanguageString;\n description?: AXPMultiLanguageString | null;\n}\n\n//#endregion\n","//#region ---- Imports ----\n\nimport type { AXPEntityReference } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n\n//#endregion\n\n//#region ---- Restriction assignment ----\n\nexport interface AXMHealthCoreHealthConditionRestrictionItem {\n restrictionId: string;\n restriction?: { id: string; title?: unknown };\n startDate?: Date | string;\n endDate?: Date | string;\n}\n\n//#endregion\n\n//#region ---- Health condition ----\n\nexport interface AXMHealthCoreHealthConditionEntityModel extends AXPEntityModel<string> {\n subject: AXPEntityReference;\n conditionTypeId: string;\n conditionType?: { id: string; title?: unknown; kind?: string };\n diagnosedDate?: Date | string;\n restrictions?: AXMHealthCoreHealthConditionRestrictionItem[];\n notes?: string;\n}\n\n//#endregion\n","//#region ---- Imports ----\n\nimport type { AXMMetaDataBuilderValue } from '@acorex-platform/module-data-management-client/contracts';\nimport type { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n\n//#endregion\n\n//#region ---- Health condition type ----\n\nexport type AXMHealthCoreHealthConditionKind = 'allergy' | 'chronic';\n\nexport interface AXMHealthCoreHealthConditionTypeEntityModel extends AXPEntityModel<string> {\n title: unknown;\n kind: AXMHealthCoreHealthConditionKind;\n description?: unknown;\n suggestedRestrictionIds?: string[];\n /** Expanded from `suggestedRestrictionIds` for list/detail grids (multi-lookup join alias). */\n suggestedRestrictionsList?: Array<{ id: string; title: AXPMultiLanguageString }>;\n metaDataList?: AXMMetaDataBuilderValue;\n}\n\n//#endregion\n","//#region ---- Imports ----\n\nimport { type AXPEntityReference, type AXPMultiLanguageString, AXPSystemStatusType } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n\n//#endregion\n\n//#region ---- Health event ----\n\nexport type AXMHealthCoreHealthEventStatus =\n | AXPSystemStatusType.InProgress\n | AXPSystemStatusType.WaitingSignOff\n | AXPSystemStatusType.Completed\n | AXPSystemStatusType.Cancelled;\n\nexport interface AXMHealthCoreHealthEventEntityModel extends AXPEntityModel<string> {\n subject: AXPEntityReference;\n recordTypeId: string;\n recordType?: {\n id: string;\n title?: AXPMultiLanguageString;\n };\n occurredDate?: Date | string;\n endDate?: Date | string | null;\n provider?: string;\n facility?: string;\n notes?: string;\n employeeSignature?: string;\n employeeSignedAt?: Date | string;\n managerSignature?: string;\n managerSignedAt?: Date | string;\n statusId?: AXMHealthCoreHealthEventStatus;\n status?: { id: AXMHealthCoreHealthEventStatus; title?: string };\n}\n\n//#endregion\n","//#region ---- Imports ----\n\nimport type { AXPEntityReference } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n\n//#endregion\n\n//#region ---- Health profile ----\n\nexport interface AXMHealthCoreHealthProfileEntityModel extends AXPEntityModel<string> {\n subject: AXPEntityReference;\n bloodTypeId?: string;\n bloodType?: { id: string; title?: unknown };\n disabilityStatusId?: string;\n disabilityStatus?: { id: string; title?: unknown };\n smokingStatus?: string;\n alcoholConsumption?: string;\n healthRiskLevel?: string;\n doctorName?: string;\n doctorNumber?: string;\n emergencyContactName?: string;\n emergencyContactPhone?: string;\n emergencyContactEmail?: string;\n notes?: string;\n}\n\n//#endregion\n","//#region ---- Imports ----\n\nimport type { AXMMetaDataBuilderValue } from '@acorex-platform/module-data-management-client/contracts';\nimport type { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n\n//#endregion\n\n//#region ---- Health record type ----\n\n/** Workflow template binding and admin-configured default inputs for health record types. */\nexport interface AXMHealthCoreHealthRecordTypeWorkflowConfig {\n workflowDefinitionId: string;\n workflowName: string;\n defaultInput?: Record<string, unknown>;\n}\n\n/**\n * Defines workflow defaults, questionnaire, and metadata schema for health timeline records.\n */\nexport interface AXMHealthCoreHealthRecordTypeEntityModel extends AXPEntityModel<string> {\n title: AXPMultiLanguageString;\n description?: AXPMultiLanguageString;\n workflowConfig?: AXMHealthCoreHealthRecordTypeWorkflowConfig | null;\n icon?: string;\n metaDataList?: AXMMetaDataBuilderValue;\n}\n\n//#endregion\n","//#region ---- Imports ----\n\nimport type { AXPCategoryListItem, AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n\n//#endregion\n\n//#region ---- Health restriction ----\n\nexport interface AXMHealthCoreHealthRestrictionEntityModel extends AXPEntityModel<string> {\n title: AXPMultiLanguageString;\n description?: AXPMultiLanguageString;\n categoryIds?: string[];\n categories?: AXPCategoryListItem[];\n}\n\n//#endregion\n","import { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n//#region ---- Injury Type Model ----\n\nexport interface AXMHealthCoreInjuryTypeEntityModel extends AXPEntityModel<string> {\n title: AXPMultiLanguageString;\n description?: AXPMultiLanguageString | null;\n}\n\n//#endregion\n","import { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n//#region ---- Vaccination Type Model ----\n\nexport interface AXMHealthCoreVaccinationTypeEntityModel extends AXPEntityModel<string> {\n title: AXPMultiLanguageString;\n description?: AXPMultiLanguageString | null;\n}\n\n//#endregion\n","//#region ---- Contracts barrel ----\n\nexport * from './catalog-scope.keys';\nexport * from './commands.keys';\nexport * from './menu.keys';\nexport * from './permission.keys';\n\nexport * from './health-subject-form-layout.utils';\nexport * from './health-subject.utils';\nexport * from './root-config';\n\n//#endregion\n\nexport * from './entities';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAAA;AACO,MAAM,oBAAoB,GAAG;;ACD7B,MAAM,wBAAwB,GAAG;AACtC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AC,MAAM,CAAA,kCAAA,CAAoC;AAC/E,YAAA,uBAAuB,EAAE,CAAA,EAAG,MAAM,CAAC,MAAM,CAAA,gCAAA,CAAkC;AAC3E,YAAA,sBAAsB,EAAE,CAAA,EAAG,MAAM,CAAC,MAAM,CAAA,+BAAA,CAAiC;AACzE,YAAA,yBAAyB,EAAE,CAAA,EAAG,MAAM,CAAC,MAAM,CAAA,kCAAA,CAAoC;AAC/E,YAAA,2BAA2B,EAAE,CAAA,EAAG,MAAM,CAAC,MAAM,CAAA,oCAAA,CAAsC;AACnF,YAAA,mCAAmC,EAAE,CAAA,EAAG,MAAM,CAAC,MAAM,CAAA,4CAAA,CAA8C;AACpG,SAAA;AACD,QAAA,SAAS,EAAE;AACT,YAAA,qBAAqB,EAAE,CAAA,EAAG,MAAM,CAAC,MAAM,CAAA,gCAAA,CAAkC;AAC1E,SAAA;AACF,KAAA;;;ACrFH;;ACAA;;ACAA;;ACTA;AA6BA;;AC7BA;AAsBA;;ACtBA;AAmCA;;ACnCA;AA0BA;;AC1BA;AA4BA;;AC5BA;AAgBA;;ACPA;;ACAA;;ACTA;;ACAA;;AAEG;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-health-core-client-list-alcohol-consumption-options.query-CFQk6mlY.mjs","sources":["../../../../libs/modules/health-core/client/src/lib/features/queries/list-alcohol-consumption-options.query.ts"],"sourcesContent":["import {\n resolveCollectionSkip,\n resolveCollectionTake,\n type AXPCollectionQuery,\n type AXPCollectionQueryInput,\n type AXPQueryCollectionFetchResultPromise,\n} from '@acorex-platform/framework-shared/runtime';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessCollection,\n} from '@acorex-platform/framework-shared/core';\nimport { applyFilterArray, applySortArray } from '@acorex-platform/framework-client/core';\n\nimport { Injectable } from '@angular/core';\n\n//#region ---- Types ----\n\nexport type AXMListAlcoholConsumptionOptionsQueryInput = AXPCollectionQueryInput;\n\nexport interface AXMListAlcoholConsumptionOptionsQueryItem {\n /** Stored choice code. */\n value: string;\n /** Display title (i18n key). */\n title: string;\n}\n\n//#endregion\n\n//#region ---- Constants ----\n\n/** Same rows as the former `alcohol-consumption-options` registry data source. */\nconst ALCOHOL_CONSUMPTION_OPTIONS: AXMListAlcoholConsumptionOptionsQueryItem[] = [\n { value: 'never', title: '@health-core:datasources.alcohol-consumption-options.samples.never' },\n {\n value: 'occasional',\n title: '@health-core:datasources.alcohol-consumption-options.samples.occasional',\n },\n {\n value: 'regular',\n title: '@health-core:datasources.alcohol-consumption-options.samples.regular',\n },\n { value: 'heavy', title: '@health-core:datasources.alcohol-consumption-options.samples.heavy' },\n {\n value: 'prefer-not-to-say',\n title: '@health-core:datasources.alcohol-consumption-options.samples.prefer-not-to-say',\n },\n];\n\n//#endregion\n\n//#region ---- Query ----\n\n/**\n * Static alcohol consumption catalog — replaces the `alcohol-consumption-options` DI data source.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMListAlcoholConsumptionOptionsQuery\n implements\n AXPCollectionQuery<\n AXMListAlcoholConsumptionOptionsQueryInput,\n AXMListAlcoholConsumptionOptionsQueryItem\n >\n{\n //#region ---- Query Execution ----\n\n async fetch(\n input?: AXMListAlcoholConsumptionOptionsQueryInput | null,\n ): AXPQueryCollectionFetchResultPromise<AXMListAlcoholConsumptionOptionsQueryItem> {\n try {\n let items = [...ALCOHOL_CONSUMPTION_OPTIONS];\n\n if (input?.filter) {\n items = applyFilterArray(items, [input.filter]);\n }\n\n const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];\n const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'value' as const, dir: 'asc' as const }];\n items = applySortArray(items, sortOpt);\n\n const skip = resolveCollectionSkip(input?.skip);\n const take = resolveCollectionTake(input?.take);\n const total = items.length;\n const page = items.slice(skip, skip + take);\n\n return runtimeQuerySuccessCollection({ items: page, total });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Unknown error occurred',\n );\n }\n }\n\n //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IAAI,GAAG,qBAAqB,CAAC,KAAK,EAAE,IAAI,CAAC;AAC/C,YAAA,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM;AAC1B,YAAA,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;YAE3C,OAAO,6BAA6B,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;QAC9D;QAAE,OAAO,KAAK,EAAE;AACd,YAAA,OAAO,mBAAmB,CACxB,KAAK,YAAY,KAAK,GAAG,KAAK,CAAC,OAAO,GAAG,wBAAwB,CAClE;QACH;IACF;8GAlCW,qCAAqC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAArC,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qCAAqC,cADxB,MAAM,EAAA,CAAA,CAAA;;2FACnB,qCAAqC,EAAA,UAAA,EAAA,CAAA;kBADjD,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;;;"}
1
+ {"version":3,"file":"acorex-platform-module-health-core-client-list-alcohol-consumption-options.query-CFQk6mlY.mjs","sources":["../../../../libs/modules/health-core/client/src/lib/features/queries/list-alcohol-consumption-options.query.ts"],"sourcesContent":["import {\n resolveCollectionSkip,\n resolveCollectionTake,\n type AXPCollectionQuery,\n type AXPCollectionQueryInput,\n type AXPQueryCollectionFetchResultPromise,\n} from '@acorex-platform/framework-shared/runtime';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessCollection,\n} from '@acorex-platform/framework-shared/core';\nimport { applyFilterArray, applySortArray } from '@acorex-platform/framework-client/core';\n\nimport { Injectable } from '@angular/core';\n\n//#region ---- Types ----\n\nexport type AXMListAlcoholConsumptionOptionsQueryInput = AXPCollectionQueryInput;\n\nexport interface AXMListAlcoholConsumptionOptionsQueryItem {\n /** Stored choice code. */\n value: string;\n /** Display title (i18n key). */\n title: string;\n}\n\n//#endregion\n\n//#region ---- Constants ----\n\n/** Same rows as the former `alcohol-consumption-options` registry data source. */\nconst ALCOHOL_CONSUMPTION_OPTIONS: AXMListAlcoholConsumptionOptionsQueryItem[] = [\n { value: 'never', title: '@health-core:datasources.alcohol-consumption-options.samples.never' },\n {\n value: 'occasional',\n title: '@health-core:datasources.alcohol-consumption-options.samples.occasional',\n },\n {\n value: 'regular',\n title: '@health-core:datasources.alcohol-consumption-options.samples.regular',\n },\n { value: 'heavy', title: '@health-core:datasources.alcohol-consumption-options.samples.heavy' },\n {\n value: 'prefer-not-to-say',\n title: '@health-core:datasources.alcohol-consumption-options.samples.prefer-not-to-say',\n },\n];\n\n//#endregion\n\n//#region ---- Query ----\n\n/**\n * Static alcohol consumption catalog — replaces the `alcohol-consumption-options` DI data source.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMListAlcoholConsumptionOptionsQuery\n implements\n AXPCollectionQuery<\n AXMListAlcoholConsumptionOptionsQueryInput,\n AXMListAlcoholConsumptionOptionsQueryItem\n >\n{\n //#region ---- Query Execution ----\n\n async fetch(\n input?: AXMListAlcoholConsumptionOptionsQueryInput | null,\n ): AXPQueryCollectionFetchResultPromise<AXMListAlcoholConsumptionOptionsQueryItem> {\n try {\n let items = [...ALCOHOL_CONSUMPTION_OPTIONS];\n\n if (input?.filter) {\n items = applyFilterArray(items, [input.filter]);\n }\n\n const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];\n const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'value' as const, dir: 'asc' as const }];\n items = applySortArray(items, sortOpt);\n\n const skip = resolveCollectionSkip(input?.skip);\n const take = resolveCollectionTake(input?.take);\n const total = items.length;\n const page = items.slice(skip, skip + take);\n\n return runtimeQuerySuccessCollection({ items: page, total });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Unknown error occurred',\n );\n }\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;AA0BA;AAEA;AAEA;AACA,MAAM,2BAA2B,GAAgD;AAC/E,IAAA,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,oEAAoE,EAAE;AAC/F,IAAA;AACE,QAAA,KAAK,EAAE,YAAY;AACnB,QAAA,KAAK,EAAE,yEAAyE;AACjF,KAAA;AACD,IAAA;AACE,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,KAAK,EAAE,sEAAsE;AAC9E,KAAA;AACD,IAAA,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,oEAAoE,EAAE;AAC/F,IAAA;AACE,QAAA,KAAK,EAAE,mBAAmB;AAC1B,QAAA,KAAK,EAAE,gFAAgF;AACxF,KAAA;CACF;AAED;AAEA;AAEA;;AAEG;MAEU,qCAAqC,CAAA;;IAShD,MAAM,KAAK,CACT,KAAyD,EAAA;AAEzD,QAAA,IAAI;AACF,YAAA,IAAI,KAAK,GAAG,CAAC,GAAG,2BAA2B,CAAC;AAE5C,YAAA,IAAI,KAAK,EAAE,MAAM,EAAE;gBACjB,KAAK,GAAG,gBAAgB,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YACjD;AAEA,YAAA,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,GAAG,KAAK,EAAE,IAAI,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE;YACzF,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,GAAG,CAAC,GAAG,OAAO,GAAG,CAAC,EAAE,KAAK,EAAE,OAAgB,EAAE,GAAG,EAAE,KAAc,EAAE,CAAC;AACjG,YAAA,KAAK,GAAG,cAAc,CAAC,KAAK,EAAE,OAAO,CAAC;YAEtC,MAAM,IAAI,GAAG,qBAAqB,CAAC,KAAK,EAAE,IAAI,CAAC;YAC/C,MAAM,IAAI,GAAG,qBAAqB,CAAC,KAAK,EAAE,IAAI,CAAC;AAC/C,YAAA,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM;AAC1B,YAAA,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;YAE3C,OAAO,6BAA6B,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;QAC9D;QAAE,OAAO,KAAK,EAAE;AACd,YAAA,OAAO,mBAAmB,CACxB,KAAK,YAAY,KAAK,GAAG,KAAK,CAAC,OAAO,GAAG,wBAAwB,CAClE;QACH;IACF;8GAlCW,qCAAqC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAArC,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qCAAqC,cADxB,MAAM,EAAA,CAAA,CAAA;;2FACnB,qCAAqC,EAAA,UAAA,EAAA,CAAA;kBADjD,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-health-core-client-list-allergy-severity-options.query-BmdEP1TK.mjs","sources":["../../../../libs/modules/health-core/client/src/lib/features/queries/list-allergy-severity-options.query.ts"],"sourcesContent":["import {\n resolveCollectionSkip,\n resolveCollectionTake,\n type AXPCollectionQuery,\n type AXPCollectionQueryInput,\n type AXPQueryCollectionFetchResultPromise,\n} from '@acorex-platform/framework-shared/runtime';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessCollection,\n} from '@acorex-platform/framework-shared/core';\nimport { applyFilterArray, applySortArray } from '@acorex-platform/framework-client/core';\n\nimport { Injectable } from '@angular/core';\n\n//#region ---- Types ----\n\nexport type AXMListAllergySeverityOptionsQueryInput = AXPCollectionQueryInput;\n\nexport interface AXMListAllergySeverityOptionsQueryItem {\n /** Stored choice code. */\n value: string;\n /** Display title (i18n key). */\n title: string;\n}\n\n//#endregion\n\n//#region ---- Constants ----\n\n/** Same rows as the former `allergy-severity-options` registry data source. */\nconst ALLERGY_SEVERITY_OPTIONS: AXMListAllergySeverityOptionsQueryItem[] = [\n { value: 'mild', title: '@health-core:datasources.allergy-severity-options.samples.mild' },\n {\n value: 'moderate',\n title: '@health-core:datasources.allergy-severity-options.samples.moderate',\n },\n { value: 'severe', title: '@health-core:datasources.allergy-severity-options.samples.severe' },\n];\n\n//#endregion\n\n//#region ---- Query ----\n\n/**\n * Static allergy severity catalog — replaces the `allergy-severity-options` DI data source.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMListAllergySeverityOptionsQuery\n implements\n AXPCollectionQuery<AXMListAllergySeverityOptionsQueryInput, AXMListAllergySeverityOptionsQueryItem>\n{\n //#region ---- Query Execution ----\n\n async fetch(\n input?: AXMListAllergySeverityOptionsQueryInput | null,\n ): AXPQueryCollectionFetchResultPromise<AXMListAllergySeverityOptionsQueryItem> {\n try {\n let items = [...ALLERGY_SEVERITY_OPTIONS];\n\n if (input?.filter) {\n items = applyFilterArray(items, [input.filter]);\n }\n\n const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];\n const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'value' as const, dir: 'asc' as const }];\n items = applySortArray(items, sortOpt);\n\n const skip = resolveCollectionSkip(input?.skip);\n const take = resolveCollectionTake(input?.take);\n const total = items.length;\n const page = items.slice(skip, skip + take);\n\n return runtimeQuerySuccessCollection({ items: page, total });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Unknown error occurred',\n );\n }\n }\n\n //#endregion\n}\n\n//#endreg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C;YAE3C,OAAO,6BAA6B,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;QAC9D;QAAE,OAAO,KAAK,EAAE;AACd,YAAA,OAAO,mBAAmB,CACxB,KAAK,YAAY,KAAK,GAAG,KAAK,CAAC,OAAO,GAAG,wBAAwB,CAClE;QACH;IACF;8GA/BW,kCAAkC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAlC,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kCAAkC,cADrB,MAAM,EAAA,CAAA,CAAA;;2FACnB,kCAAkC,EAAA,UAAA,EAAA,CAAA;kBAD9C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;;;"}
1
+ {"version":3,"file":"acorex-platform-module-health-core-client-list-allergy-severity-options.query-BmdEP1TK.mjs","sources":["../../../../libs/modules/health-core/client/src/lib/features/queries/list-allergy-severity-options.query.ts"],"sourcesContent":["import {\n resolveCollectionSkip,\n resolveCollectionTake,\n type AXPCollectionQuery,\n type AXPCollectionQueryInput,\n type AXPQueryCollectionFetchResultPromise,\n} from '@acorex-platform/framework-shared/runtime';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessCollection,\n} from '@acorex-platform/framework-shared/core';\nimport { applyFilterArray, applySortArray } from '@acorex-platform/framework-client/core';\n\nimport { Injectable } from '@angular/core';\n\n//#region ---- Types ----\n\nexport type AXMListAllergySeverityOptionsQueryInput = AXPCollectionQueryInput;\n\nexport interface AXMListAllergySeverityOptionsQueryItem {\n /** Stored choice code. */\n value: string;\n /** Display title (i18n key). */\n title: string;\n}\n\n//#endregion\n\n//#region ---- Constants ----\n\n/** Same rows as the former `allergy-severity-options` registry data source. */\nconst ALLERGY_SEVERITY_OPTIONS: AXMListAllergySeverityOptionsQueryItem[] = [\n { value: 'mild', title: '@health-core:datasources.allergy-severity-options.samples.mild' },\n {\n value: 'moderate',\n title: '@health-core:datasources.allergy-severity-options.samples.moderate',\n },\n { value: 'severe', title: '@health-core:datasources.allergy-severity-options.samples.severe' },\n];\n\n//#endregion\n\n//#region ---- Query ----\n\n/**\n * Static allergy severity catalog — replaces the `allergy-severity-options` DI data source.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMListAllergySeverityOptionsQuery\n implements\n AXPCollectionQuery<AXMListAllergySeverityOptionsQueryInput, AXMListAllergySeverityOptionsQueryItem>\n{\n //#region ---- Query Execution ----\n\n async fetch(\n input?: AXMListAllergySeverityOptionsQueryInput | null,\n ): AXPQueryCollectionFetchResultPromise<AXMListAllergySeverityOptionsQueryItem> {\n try {\n let items = [...ALLERGY_SEVERITY_OPTIONS];\n\n if (input?.filter) {\n items = applyFilterArray(items, [input.filter]);\n }\n\n const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];\n const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'value' as const, dir: 'asc' as const }];\n items = applySortArray(items, sortOpt);\n\n const skip = resolveCollectionSkip(input?.skip);\n const take = resolveCollectionTake(input?.take);\n const total = items.length;\n const page = items.slice(skip, skip + take);\n\n return runtimeQuerySuccessCollection({ items: page, total });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Unknown error occurred',\n );\n }\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;AA0BA;AAEA;AAEA;AACA,MAAM,wBAAwB,GAA6C;AACzE,IAAA,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,gEAAgE,EAAE;AAC1F,IAAA;AACE,QAAA,KAAK,EAAE,UAAU;AACjB,QAAA,KAAK,EAAE,oEAAoE;AAC5E,KAAA;AACD,IAAA,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EA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CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAlC,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kCAAkC,cADrB,MAAM,EAAA,CAAA,CAAA;;2FACnB,kCAAkC,EAAA,UAAA,EAAA,CAAA;kBAD9C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-health-core-client-list-chronic-condition-status-options.query-QgsQCqLm.mjs","sources":["../../../../libs/modules/health-core/client/src/lib/features/queries/list-chronic-condition-status-options.query.ts"],"sourcesContent":["import {\n resolveCollectionSkip,\n resolveCollectionTake,\n type AXPCollectionQuery,\n type AXPCollectionQueryInput,\n type AXPQueryCollectionFetchResultPromise,\n} from '@acorex-platform/framework-shared/runtime';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessCollection,\n} from '@acorex-platform/framework-shared/core';\nimport { applyFilterArray, applySortArray } from '@acorex-platform/framework-client/core';\n\nimport { Injectable } from '@angular/core';\n\n//#region ---- Types ----\n\nexport type AXMListChronicConditionStatusOptionsQueryInput = AXPCollectionQueryInput;\n\nexport interface AXMListChronicConditionStatusOptionsQueryItem {\n /** Stored choice code. */\n value: string;\n /** Display title (i18n key). */\n title: string;\n}\n\n//#endregion\n\n//#region ---- Constants ----\n\n/** Same rows as the former `chronic-condition-status-options` registry data source. */\nconst CHRONIC_CONDITION_STATUS_OPTIONS: AXMListChronicConditionStatusOptionsQueryItem[] = [\n {\n value: 'active',\n title: '@health-core:datasources.chronic-condition-status-options.samples.active',\n },\n {\n value: 'managed',\n title: '@health-core:datasources.chronic-condition-status-options.samples.managed',\n },\n {\n value: 'resolved',\n title: '@health-core:datasources.chronic-condition-status-options.samples.resolved',\n },\n];\n\n//#endregion\n\n//#region ---- Query ----\n\n/**\n * Static chronic condition status catalog — replaces the `chronic-condition-status-options` DI data source.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMListChronicConditionStatusOptionsQuery\n implements\n AXPCollectionQuery<\n AXMListChronicConditionStatusOptionsQueryInput,\n AXMListChronicConditionStatusOptionsQueryItem\n >\n{\n //#region ---- Query Execution ----\n\n async fetch(\n input?: AXMListChronicConditionStatusOptionsQueryInput | null,\n ): AXPQueryCollectionFetchResultPromise<AXMListChronicConditionStatusOptionsQueryItem> {\n try {\n let items = [...CHRONIC_CONDITION_STATUS_OPTIONS];\n\n if (input?.filter) {\n items = applyFilterArray(items, [input.filter]);\n }\n\n const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];\n const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'value' as const, dir: 'asc' as const }];\n items = applySortArray(items, sortOpt);\n\n const skip = resolveCollectionSkip(input?.skip);\n const take = resolveCollectionTake(input?.take);\n const total = items.length;\n const page = items.slice(skip, skip + take);\n\n return runtimeQuerySuccessCollection({ items: page, total });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Unknown error occurred',\n );\n }\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;AA0BA;AAEA;AAEA;AACA,MAAM,gCAAgC,GAAoD;AACxF,IAAA;AACE,QAAA,KAAK,EAAE,QAAQ;AACf,QAAA,KAAK,EAAE,0EAA0E;AAClF,KAAA;AACD,IAAA;AACE,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,KAAK,EAAE,2EAA2E;AACnF,KAAA;AACD,IAAA;AACE,QAAA,KAAK,EAAE,UAAU;AACjB,QAAA,KAAK,EAAE,4EAA4E;AACpF,KAAA;CACF;AAED;AAEA;AAEA;;AAEG;MAEU,yCAAyC,CAAA;;IASpD,MAAM,KAAK,CACT,KAA6D,EAAA;AAE7D,QAAA,IAAI;AACF,YAAA,IAAI,KAAK,GAAG,CAAC,GAAG,gCAAgC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,EAAA,EAAA,IAAA,EAAA,yCAAyC,cAD5B,MAAM,EAAA,CAAA,CAAA;;2FACnB,yCAAyC,EAAA,UAAA,EAAA,CAAA;kBADrD,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;;;"}
1
+ {"version":3,"file":"acorex-platform-module-health-core-client-list-chronic-condition-status-options.query-QgsQCqLm.mjs","sources":["../../../../libs/modules/health-core/client/src/lib/features/queries/list-chronic-condition-status-options.query.ts"],"sourcesContent":["import {\n resolveCollectionSkip,\n resolveCollectionTake,\n type AXPCollectionQuery,\n type AXPCollectionQueryInput,\n type AXPQueryCollectionFetchResultPromise,\n} from '@acorex-platform/framework-shared/runtime';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessCollection,\n} from '@acorex-platform/framework-shared/core';\nimport { applyFilterArray, applySortArray } from '@acorex-platform/framework-client/core';\n\nimport { Injectable } from '@angular/core';\n\n//#region ---- Types ----\n\nexport type AXMListChronicConditionStatusOptionsQueryInput = AXPCollectionQueryInput;\n\nexport interface AXMListChronicConditionStatusOptionsQueryItem {\n /** Stored choice code. */\n value: string;\n /** Display title (i18n key). */\n title: string;\n}\n\n//#endregion\n\n//#region ---- Constants ----\n\n/** Same rows as the former `chronic-condition-status-options` registry data source. */\nconst CHRONIC_CONDITION_STATUS_OPTIONS: AXMListChronicConditionStatusOptionsQueryItem[] = [\n {\n value: 'active',\n title: '@health-core:datasources.chronic-condition-status-options.samples.active',\n },\n {\n value: 'managed',\n title: '@health-core:datasources.chronic-condition-status-options.samples.managed',\n },\n {\n value: 'resolved',\n title: '@health-core:datasources.chronic-condition-status-options.samples.resolved',\n },\n];\n\n//#endregion\n\n//#region ---- Query ----\n\n/**\n * Static chronic condition status catalog — replaces the `chronic-condition-status-options` DI data source.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMListChronicConditionStatusOptionsQuery\n implements\n AXPCollectionQuery<\n AXMListChronicConditionStatusOptionsQueryInput,\n AXMListChronicConditionStatusOptionsQueryItem\n >\n{\n //#region ---- Query Execution ----\n\n async fetch(\n input?: AXMListChronicConditionStatusOptionsQueryInput | null,\n ): AXPQueryCollectionFetchResultPromise<AXMListChronicConditionStatusOptionsQueryItem> {\n try {\n let items = [...CHRONIC_CONDITION_STATUS_OPTIONS];\n\n if (input?.filter) {\n items = applyFilterArray(items, [input.filter]);\n }\n\n const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];\n const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'value' as const, dir: 'asc' as const }];\n items = applySortArray(items, sortOpt);\n\n const skip = resolveCollectionSkip(input?.skip);\n const take = resolveCollectionTake(input?.take);\n const total = items.length;\n const page = items.slice(skip, skip + take);\n\n return runtimeQuerySuccessCollection({ items: page, total });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Unknown error occurred',\n );\n }\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;AA0BA;AAEA;AAEA;AACA,MAAM,gCAAgC,GAAoD;AACxF,IAAA;AACE,QAAA,KAAK,EAAE,QAAQ;AACf,QAAA,KAAK,EAAE,0EAA0E;AAClF,KAAA;AACD,IAAA;AACE,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,KAAK,EAAE,2EAA2E;AACnF,KAAA;AACD,IAAA;AACE,QAAA,KAAK,EAAE,UAAU;AACjB,QAAA,KAAK,EAAE,4EAA4E;AACpF,KAAA;CACF;AAED;AAEA;AAEA;;AAEG;MAEU,yCAAyC,CAAA;;IASpD,MAAM,KAAK,CACT,KAA6D,EAAA;AAE7D,QAAA,IAAI;AACF,YAAA,IAAI,KAAK,GAAG,CAAC,GAAG,gCAAgC,CAAC;AAEjD,YAAA,IAAI,KAAK,EAAE,MAAM,EAAE;gBACjB,KAAK,GAAG,gBAAgB,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YACjD;AAEA,YAAA,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,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,"file":"acorex-platform-module-health-core-client-list-health-risk-level-options.query-BtJdBZVT.mjs","sources":["../../../../libs/modules/health-core/client/src/lib/features/queries/list-health-risk-level-options.query.ts"],"sourcesContent":["import {\n resolveCollectionSkip,\n resolveCollectionTake,\n type AXPCollectionQuery,\n type AXPCollectionQueryInput,\n type AXPQueryCollectionFetchResultPromise,\n} from '@acorex-platform/framework-shared/runtime';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessCollection,\n} from '@acorex-platform/framework-shared/core';\nimport { applyFilterArray, applySortArray } from '@acorex-platform/framework-client/core';\n\nimport { Injectable } from '@angular/core';\n\n//#region ---- Types ----\n\nexport type AXMListHealthRiskLevelOptionsQueryInput = AXPCollectionQueryInput;\n\nexport interface AXMListHealthRiskLevelOptionsQueryItem {\n /** Stored choice code. */\n value: string;\n /** Display title (i18n key). */\n title: string;\n}\n\n//#endregion\n\n//#region ---- Constants ----\n\n/** Same rows as the former `health-risk-level-options` registry data source. */\nconst HEALTH_RISK_LEVEL_OPTIONS: AXMListHealthRiskLevelOptionsQueryItem[] = [\n { value: 'low', title: '@health-core:datasources.health-risk-level-options.samples.low' },\n { value: 'medium', title: '@health-core:datasources.health-risk-level-options.samples.medium' },\n { value: 'high', title: '@health-core:datasources.health-risk-level-options.samples.high' },\n {\n value: 'critical',\n title: '@health-core:datasources.health-risk-level-options.samples.critical',\n },\n];\n\n//#endregion\n\n//#region ---- Query ----\n\n/**\n * Static health risk level catalog — replaces the `health-risk-level-options` DI data source.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMListHealthRiskLevelOptionsQuery\n implements\n AXPCollectionQuery<AXMListHealthRiskLevelOptionsQueryInput, AXMListHealthRiskLevelOptionsQueryItem>\n{\n //#region ---- Query Execution ----\n\n async fetch(\n input?: AXMListHealthRiskLevelOptionsQueryInput | null,\n ): AXPQueryCollectionFetchResultPromise<AXMListHealthRiskLevelOptionsQueryItem> {\n try {\n let items = [...HEALTH_RISK_LEVEL_OPTIONS];\n\n if (input?.filter) {\n items = applyFilterArray(items, [input.filter]);\n }\n\n const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];\n const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'value' as const, dir: 'asc' as const }];\n items = applySortArray(items, sortOpt);\n\n const skip = resolveCollectionSkip(input?.skip);\n const take = resolveCollectionTake(input?.take);\n const total = items.length;\n const page = items.slice(skip, skip + take);\n\n return runtimeQuerySuccessCollection({ items: page, total });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Unknown error occurred',\n );\n }\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;AA0BA;AAEA;AAEA;AACA,MAAM,yBAAyB,GAA6C;AAC1E,IAAA,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,gEAAgE,EAAE;AACzF,IAAA,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,mEAAmE,EAAE;AAC/F,IAAA,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,iEAAiE,EAAE;AAC3F,IAAA;AACE,QAAA,KAAK,EAAE,UAAU;AACjB,QAAA,KAAK,EAAE,qEAAqE;AAC7E,KAAA;CACF;AAED;AAEA;AAEA;;AAEG;MAEU,kCAAkC,CAAA;;IAM7C,MAAM,KAAK,CACT,KAAsD,EAAA;AAEtD,QAAA,IAAI;AACF,YAAA,IAAI,KAAK,GAAG,CAAC,GAAG,yBAAyB,CAAC;AAE1C,YAAA,IAAI,KAAK,EAAE,MAAM,EAAE;gBACjB,KAAK,GAAG,gBAAgB,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YACjD;AAEA,YAAA,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,GAAG,KAAK,EAAE,IAAI,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE;YACzF,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,GAAG,CAAC,GAAG,OAAO,GAAG,CAAC,EAAE,KAAK,EAAE,OAAgB,EAAE,GAAG,EAAE,KAAc,EAAE,CAAC;AACjG,YAAA,KAAK,GAAG,cAAc,CAAC,KAAK,EAAE,OAAO,CAAC;YAEtC,MAAM,IAAI,GAAG,qBAAqB,CAAC,KAAK,EAAE,IAAI,CAAC;YAC/C,MAAM,IAAI,GAAG,qBAAqB,CAAC,KAAK,EAAE,IAAI,CAAC;AAC/C,YAAA,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM;AAC1B,YAAA,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;YAE3C,OAAO,6BAA6B,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;QAC9D;QAAE,OAAO,KAAK,EAAE;AACd,YAAA,OAAO,mBAAmB,CACxB,KAAK,YAAY,KAAK,GAAG,KAAK,CAAC,OAAO,GAAG,wBAAwB,CAClE;QACH;IACF;8GA/BW,kCAAkC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAlC,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kCAAkC,cADrB,MAAM,EAAA,CAAA,CAAA;;2FACnB,kCAAkC,EAAA,UAAA,EAAA,CAAA;kBAD9C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;;;"}
1
+ {"version":3,"file":"acorex-platform-module-health-core-client-list-health-risk-level-options.query-BtJdBZVT.mjs","sources":["../../../../libs/modules/health-core/client/src/lib/features/queries/list-health-risk-level-options.query.ts"],"sourcesContent":["import {\n resolveCollectionSkip,\n resolveCollectionTake,\n type AXPCollectionQuery,\n type AXPCollectionQueryInput,\n type AXPQueryCollectionFetchResultPromise,\n} from '@acorex-platform/framework-shared/runtime';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessCollection,\n} from '@acorex-platform/framework-shared/core';\nimport { applyFilterArray, applySortArray } from '@acorex-platform/framework-client/core';\n\nimport { Injectable } from '@angular/core';\n\n//#region ---- Types ----\n\nexport type AXMListHealthRiskLevelOptionsQueryInput = AXPCollectionQueryInput;\n\nexport interface AXMListHealthRiskLevelOptionsQueryItem {\n /** Stored choice code. */\n value: string;\n /** Display title (i18n key). */\n title: string;\n}\n\n//#endregion\n\n//#region ---- Constants ----\n\n/** Same rows as the former `health-risk-level-options` registry data source. */\nconst HEALTH_RISK_LEVEL_OPTIONS: AXMListHealthRiskLevelOptionsQueryItem[] = [\n { value: 'low', title: '@health-core:datasources.health-risk-level-options.samples.low' },\n { value: 'medium', title: '@health-core:datasources.health-risk-level-options.samples.medium' },\n { value: 'high', title: '@health-core:datasources.health-risk-level-options.samples.high' },\n {\n value: 'critical',\n title: '@health-core:datasources.health-risk-level-options.samples.critical',\n },\n];\n\n//#endregion\n\n//#region ---- Query ----\n\n/**\n * Static health risk level catalog — replaces the `health-risk-level-options` DI data source.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMListHealthRiskLevelOptionsQuery\n implements\n AXPCollectionQuery<AXMListHealthRiskLevelOptionsQueryInput, AXMListHealthRiskLevelOptionsQueryItem>\n{\n //#region ---- Query Execution ----\n\n async fetch(\n input?: AXMListHealthRiskLevelOptionsQueryInput | null,\n ): AXPQueryCollectionFetchResultPromise<AXMListHealthRiskLevelOptionsQueryItem> {\n try {\n let items = [...HEALTH_RISK_LEVEL_OPTIONS];\n\n if (input?.filter) {\n items = applyFilterArray(items, [input.filter]);\n }\n\n const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];\n const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'value' as const, dir: 'asc' as const }];\n items = applySortArray(items, sortOpt);\n\n const skip = resolveCollectionSkip(input?.skip);\n const take = resolveCollectionTake(input?.take);\n const total = items.length;\n const page = items.slice(skip, skip + take);\n\n return runtimeQuerySuccessCollection({ items: page, total });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Unknown error occurred',\n );\n }\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;AA0BA;AAEA;AAEA;AACA,MAAM,yBAAyB,GAA6C;AAC1E,IAAA,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,gEAAgE,EAAE;AACzF,IAAA,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,mEAAmE,EAAE;AAC/F,IAAA,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,iEAAiE,EAAE;AAC3F,IAAA;AACE,QAAA,KAAK,EAAE,UAAU;AACjB,QAAA,KAAK,EAAE,qEAAqE;AAC7E,KAAA;CACF;AAED;AAEA;AAEA;;AAEG;MAEU,kCAAkC,CAAA;;IAM7C,MAAM,KAAK,CACT,KAAsD,EAAA;AAEtD,QAAA,IAAI;AACF,YAAA,IAAI,KAAK,GAAG,CAAC,GAAG,yBAAyB,CAAC;AAE1C,YAAA,IAAI,KAAK,EAAE,MAAM,EAAE;gBACjB,KAAK,GAAG,gBAAgB,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YACjD;AAEA,YAAA,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,GAAG,KAAK,EAAE,IAAI,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE;YACzF,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,GAAG,CAAC,GAAG,OAAO,GAAG,CAAC,EAAE,KAAK,EAAE,OAAgB,EAAE,GAAG,EAAE,KAAc,EAAE,CAAC;AACjG,YAAA,KAAK,GAAG,cAAc,CAAC,KAAK,EAAE,OAAO,CAAC;YAEtC,MAAM,IAAI,GAAG,qBAAqB,CAAC,KAAK,EAAE,IAAI,CAAC;YAC/C,MAAM,IAAI,GAAG,qBAAqB,CAAC,KAAK,EAAE,IAAI,CAAC;AAC/C,YAAA,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM;AAC1B,YAAA,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;YAE3C,OAAO,6BAA6B,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;QAC9D;QAAE,OAAO,KAAK,EAAE;AACd,YAAA,OAAO,mBAAmB,CACxB,KAAK,YAAY,KAAK,GAAG,KAAK,CAAC,OAAO,GAAG,wBAAwB,CAClE;QACH;IACF;8GA/BW,kCAAkC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAlC,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kCAAkC,cADrB,MAAM,EAAA,CAAA,CAAA;;2FACnB,kCAAkC,EAAA,UAAA,EAAA,CAAA;kBAD9C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-health-core-client-list-injury-mechanism-options.query-D7Tjl7eC.mjs","sources":["../../../../libs/modules/health-core/client/src/lib/features/queries/list-injury-mechanism-options.query.ts"],"sourcesContent":["import {\n resolveCollectionSkip,\n resolveCollectionTake,\n type AXPCollectionQuery,\n type AXPCollectionQueryInput,\n type AXPQueryCollectionFetchResultPromise,\n} from '@acorex-platform/framework-shared/runtime';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessCollection,\n} from '@acorex-platform/framework-shared/core';\nimport { applyFilterArray, applySortArray } from '@acorex-platform/framework-client/core';\n\nimport { Injectable } from '@angular/core';\n\n//#region ---- Types ----\n\nexport type AXMListInjuryMechanismOptionsQueryInput = AXPCollectionQueryInput;\n\nexport interface AXMListInjuryMechanismOptionsQueryItem {\n /** Stored choice code. */\n id: string;\n /** Display title (i18n key). */\n title: string;\n}\n\n//#endregion\n\n//#region ---- Constants ----\n\nconst I18N = '@health-core:datasources.injury-mechanism-options';\n\n/** Same rows as the former `injury-mechanism-options` registry data source. */\nconst INJURY_MECHANISM_OPTIONS: AXMListInjuryMechanismOptionsQueryItem[] = [\n { id: 'slip_trip_fall', title: `${I18N}.samples.slip-trip-fall` },\n { id: 'struck_by', title: `${I18N}.samples.struck-by` },\n { id: 'struck_against', title: `${I18N}.samples.struck-against` },\n { id: 'caught_in', title: `${I18N}.samples.caught-in` },\n { id: 'overexertion', title: `${I18N}.samples.overexertion` },\n { id: 'exposure', title: `${I18N}.samples.exposure` },\n { id: 'vehicle', title: `${I18N}.samples.vehicle` },\n { id: 'cut_puncture', title: `${I18N}.samples.cut-puncture` },\n { id: 'other', title: `${I18N}.samples.other` },\n];\n\n//#endregion\n\n//#region ---- Query ----\n\n/**\n * Static injury mechanism catalog — replaces the `injury-mechanism-options` DI data source.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMListInjuryMechanismOptionsQuery\n implements\n AXPCollectionQuery<AXMListInjuryMechanismOptionsQueryInput, AXMListInjuryMechanismOptionsQueryItem>\n{\n //#region ---- Query Execution ----\n\n async fetch(\n input?: AXMListInjuryMechanismOptionsQueryInput | null,\n ): AXPQueryCollectionFetchResultPromise<AXMListInjuryMechanismOptionsQueryItem> {\n try {\n let items = [...INJURY_MECHANISM_OPTIONS];\n\n if (input?.filter) {\n items = applyFilterArray(items, [input.filter]);\n }\n\n const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];\n const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'id' as const, dir: 'asc' as const }];\n items = applySortArray(items, sortOpt);\n\n const skip = resolveCollectionSkip(input?.skip);\n const take = resolveCollectionTake(input?.take);\n const total = items.length;\n const page = items.slice(skip, skip + take);\n\n return runtimeQuerySuccessCollection({ items: page, total });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Unknown error occurred',\n );\n }\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;AA0BA;AAEA;AAEA,MAAM,IAAI,GAAG,mDAAmD;AAEhE;AACA,MAAM,wBAAwB,GAA6C;IACzE,EAAE,EAAE,EAAE,gBAAgB,EAAE,KAAK,EAAE,CAAA,EAAG,IAAI,CAAA,uBAAA,CAAyB,EAAE;IACjE,EAAE,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,CAAA,EAAG,IAAI,CAAA,kBAAA,CAAoB,EAAE;IACvD,EAAE,EAAE,EAAE,gBAAgB,EAAE,KAAK,EAAE,CAAA,EAAG,IAAI,CAAA,uBAAA,CAAyB,EAAE;IACjE,EAAE,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,CAAA,EAAG,IAAI,CAAA,kBAAA,CAAoB,EAAE;IACvD,EAAE,EAAE,EAAE,cAAc,EAAE,KAAK,EAAE,CAAA,EAAG,IAAI,CAAA,qBAAA,CAAuB,EAAE;IAC7D,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,CAAA,EAAG,IAAI,CAAA,iBAAA,CAAmB,EAAE;IACrD,EAAE,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,CAAA,EAAG,IAAI,CAAA,gBAAA,CAAkB,EAAE;IACnD,EAAE,EAAE,EAAE,cAAc,EAAE,KAAK,EAAE,CAAA,EAAG,IAAI,CAAA,qBAAA,CAAuB,EAAE;IAC7D,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,CAAA,EAAG,IAAI,CAAA,cAAA,CAAgB,EAAE;CAChD;AAED;AAE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A,CAAA;AAAlC,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kCAAkC,cADrB,MAAM,EAAA,CAAA,CAAA;;2FACnB,kCAAkC,EAAA,UAAA,EAAA,CAAA;kBAD9C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;;;"}
1
+ {"version":3,"file":"acorex-platform-module-health-core-client-list-injury-mechanism-options.query-D7Tjl7eC.mjs","sources":["../../../../libs/modules/health-core/client/src/lib/features/queries/list-injury-mechanism-options.query.ts"],"sourcesContent":["import {\n resolveCollectionSkip,\n resolveCollectionTake,\n type AXPCollectionQuery,\n type AXPCollectionQueryInput,\n type AXPQueryCollectionFetchResultPromise,\n} from '@acorex-platform/framework-shared/runtime';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessCollection,\n} from '@acorex-platform/framework-shared/core';\nimport { applyFilterArray, applySortArray } from '@acorex-platform/framework-client/core';\n\nimport { Injectable } from '@angular/core';\n\n//#region ---- Types ----\n\nexport type AXMListInjuryMechanismOptionsQueryInput = AXPCollectionQueryInput;\n\nexport interface AXMListInjuryMechanismOptionsQueryItem {\n /** Stored choice code. */\n id: string;\n /** Display title (i18n key). */\n title: string;\n}\n\n//#endregion\n\n//#region ---- Constants ----\n\nconst I18N = '@health-core:datasources.injury-mechanism-options';\n\n/** Same rows as the former `injury-mechanism-options` registry data source. */\nconst INJURY_MECHANISM_OPTIONS: AXMListInjuryMechanismOptionsQueryItem[] = [\n { id: 'slip_trip_fall', title: `${I18N}.samples.slip-trip-fall` },\n { id: 'struck_by', title: `${I18N}.samples.struck-by` },\n { id: 'struck_against', title: `${I18N}.samples.struck-against` },\n { id: 'caught_in', title: `${I18N}.samples.caught-in` },\n { id: 'overexertion', title: `${I18N}.samples.overexertion` },\n { id: 'exposure', title: `${I18N}.samples.exposure` },\n { id: 'vehicle', title: `${I18N}.samples.vehicle` },\n { id: 'cut_puncture', title: `${I18N}.samples.cut-puncture` },\n { id: 'other', title: `${I18N}.samples.other` },\n];\n\n//#endregion\n\n//#region ---- Query ----\n\n/**\n * Static injury mechanism catalog — replaces the `injury-mechanism-options` DI data source.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMListInjuryMechanismOptionsQuery\n implements\n AXPCollectionQuery<AXMListInjuryMechanismOptionsQueryInput, AXMListInjuryMechanismOptionsQueryItem>\n{\n //#region ---- Query Execution ----\n\n async fetch(\n input?: AXMListInjuryMechanismOptionsQueryInput | null,\n ): AXPQueryCollectionFetchResultPromise<AXMListInjuryMechanismOptionsQueryItem> {\n try {\n let items = [...INJURY_MECHANISM_OPTIONS];\n\n if (input?.filter) {\n items = applyFilterArray(items, [input.filter]);\n }\n\n const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];\n const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'id' as const, dir: 'asc' as const }];\n items = applySortArray(items, sortOpt);\n\n const skip = resolveCollectionSkip(input?.skip);\n const take = resolveCollectionTake(input?.take);\n const total = items.length;\n const page = items.slice(skip, skip + take);\n\n return runtimeQuerySuccessCollection({ items: page, total });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Unknown error occurred',\n );\n }\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;AA0BA;AAEA;AAEA,MAAM,IAAI,GAAG,mDAAmD;AAEhE;AACA,MAAM,wBAAwB,GAA6C;IACzE,EAAE,EAAE,EAAE,gBAAgB,EAAE,KAAK,EAAE,CAAA,EAAG,IAAI,CAAA,uBAAA,CAAyB,EAAE;IACjE,EAAE,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,CAAA,EAAG,IAAI,CAAA,kBAAA,CAAoB,EAAE;IACvD,EAAE,EAAE,EAAE,gBAAgB,EAAE,KAAK,EAAE,CAAA,EAAG,IAA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AAK,EAAE,OAAO,CAAC;YAEtC,MAAM,IAAI,GAAG,qBAAqB,CAAC,KAAK,EAAE,IAAI,CAAC;YAC/C,MAAM,IAAI,GAAG,qBAAqB,CAAC,KAAK,EAAE,IAAI,CAAC;AAC/C,YAAA,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM;AAC1B,YAAA,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;YAE3C,OAAO,6BAA6B,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;QAC9D;QAAE,OAAO,KAAK,EAAE;AACd,YAAA,OAAO,mBAAmB,CACxB,KAAK,YAAY,KAAK,GAAG,KAAK,CAAC,OAAO,GAAG,wBAAwB,CAClE;QACH;IACF;8GA/BW,kCAAkC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAlC,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kCAAkC,cADrB,MAAM,EAAA,CAAA,CAAA;;2FACnB,kCAAkC,EAAA,UAAA,EAAA,CAAA;kBAD9C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-health-core-client-list-pain-rate-options.query-C9sGCRmk.mjs","sources":["../../../../libs/modules/health-core/client/src/lib/features/queries/list-pain-rate-options.query.ts"],"sourcesContent":["import {\n resolveCollectionSkip,\n resolveCollectionTake,\n type AXPCollectionQuery,\n type AXPCollectionQueryInput,\n type AXPQueryCollectionFetchResultPromise,\n} from '@acorex-platform/framework-shared/runtime';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessCollection,\n} from '@acorex-platform/framework-shared/core';\nimport { applyFilterArray, applySortArray } from '@acorex-platform/framework-client/core';\n\nimport { Injectable } from '@angular/core';\n\n//#region ---- Types ----\n\nexport type AXMListPainRateOptionsQueryInput = AXPCollectionQueryInput;\n\nexport interface AXMListPainRateOptionsQueryItem {\n /** Stored choice code. */\n id: string;\n /** Display title (i18n key). */\n title: string;\n}\n\n//#endregion\n\n//#region ---- Constants ----\n\nconst I18N = '@health-core:datasources.pain-rate-options';\n\n/** Same rows as the former `pain-rate-options` registry data source. */\nconst PAIN_RATE_OPTIONS: AXMListPainRateOptionsQueryItem[] = [\n { id: '1', title: `${I18N}.samples.1` },\n { id: '2', title: `${I18N}.samples.2` },\n { id: '3', title: `${I18N}.samples.3` },\n { id: '4', title: `${I18N}.samples.4` },\n { id: '5', title: `${I18N}.samples.5` },\n];\n\n//#endregion\n\n//#region ---- Query ----\n\n/**\n * Static pain rate catalog — replaces the `pain-rate-options` DI data source.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMListPainRateOptionsQuery\n implements AXPCollectionQuery<AXMListPainRateOptionsQueryInput, AXMListPainRateOptionsQueryItem>\n{\n //#region ---- Query Execution ----\n\n async fetch(\n input?: AXMListPainRateOptionsQueryInput | null,\n ): AXPQueryCollectionFetchResultPromise<AXMListPainRateOptionsQueryItem> {\n try {\n let items = [...PAIN_RATE_OPTIONS];\n\n if (input?.filter) {\n items = applyFilterArray(items, [input.filter]);\n }\n\n const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];\n const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'id' as const, dir: 'asc' as const }];\n items = applySortArray(items, sortOpt);\n\n const skip = resolveCollectionSkip(input?.skip);\n const take = resolveCollectionTake(input?.take);\n const total = items.length;\n const page = items.slice(skip, skip + take);\n\n return runtimeQuerySuccessCollection({ items: page, total });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Unknown error occurred',\n );\n }\n }\n\n //#endregion\n}\n\n//#endregion\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AM,IAAI,GAAG,qBAAqB,CAAC,KAAK,EAAE,IAAI,CAAC;YAC/C,MAAM,IAAI,GAAG,qBAAqB,CAAC,KAAK,EAAE,IAAI,CAAC;AAC/C,YAAA,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM;AAC1B,YAAA,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;YAE3C,OAAO,6BAA6B,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;QAC9D;QAAE,OAAO,KAAK,EAAE;AACd,YAAA,OAAO,mBAAmB,CACxB,KAAK,YAAY,KAAK,GAAG,KAAK,CAAC,OAAO,GAAG,wBAAwB,CAClE;QACH;IACF;8GA9BW,2BAA2B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA3B,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,2BAA2B,cADd,MAAM,EAAA,CAAA,CAAA;;2FACnB,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBADvC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;;;"}
1
+ {"version":3,"file":"acorex-platform-module-health-core-client-list-pain-rate-options.query-C9sGCRmk.mjs","sources":["../../../../libs/modules/health-core/client/src/lib/features/queries/list-pain-rate-options.query.ts"],"sourcesContent":["import {\n resolveCollectionSkip,\n resolveCollectionTake,\n type AXPCollectionQuery,\n type AXPCollectionQueryInput,\n type AXPQueryCollectionFetchResultPromise,\n} from '@acorex-platform/framework-shared/runtime';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessCollection,\n} from '@acorex-platform/framework-shared/core';\nimport { applyFilterArray, applySortArray } from '@acorex-platform/framework-client/core';\n\nimport { Injectable } from '@angular/core';\n\n//#region ---- Types ----\n\nexport type AXMListPainRateOptionsQueryInput = AXPCollectionQueryInput;\n\nexport interface AXMListPainRateOptionsQueryItem {\n /** Stored choice code. */\n id: string;\n /** Display title (i18n key). */\n title: string;\n}\n\n//#endregion\n\n//#region ---- Constants ----\n\nconst I18N = '@health-core:datasources.pain-rate-options';\n\n/** Same rows as the former `pain-rate-options` registry data source. */\nconst PAIN_RATE_OPTIONS: AXMListPainRateOptionsQueryItem[] = [\n { id: '1', title: `${I18N}.samples.1` },\n { id: '2', title: `${I18N}.samples.2` },\n { id: '3', title: `${I18N}.samples.3` },\n { id: '4', title: `${I18N}.samples.4` },\n { id: '5', title: `${I18N}.samples.5` },\n];\n\n//#endregion\n\n//#region ---- Query ----\n\n/**\n * Static pain rate catalog — replaces the `pain-rate-options` DI data source.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMListPainRateOptionsQuery\n implements AXPCollectionQuery<AXMListPainRateOptionsQueryInput, AXMListPainRateOptionsQueryItem>\n{\n //#region ---- Query Execution ----\n\n async fetch(\n input?: AXMListPainRateOptionsQueryInput | null,\n ): AXPQueryCollectionFetchResultPromise<AXMListPainRateOptionsQueryItem> {\n try {\n let items = [...PAIN_RATE_OPTIONS];\n\n if (input?.filter) {\n items = applyFilterArray(items, [input.filter]);\n }\n\n const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];\n const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'id' as const, dir: 'asc' as const }];\n items = applySortArray(items, sortOpt);\n\n const skip = resolveCollectionSkip(input?.skip);\n const take = resolveCollectionTake(input?.take);\n const total = items.length;\n const page = items.slice(skip, skip + take);\n\n return runtimeQuerySuccessCollection({ items: page, total });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Unknown error occurred',\n );\n }\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;AA0BA;AAEA;AAEA,MAA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I,CAAC;YAC/C,MAAM,IAAI,GAAG,qBAAqB,CAAC,KAAK,EAAE,IAAI,CAAC;AAC/C,YAAA,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM;AAC1B,YAAA,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;YAE3C,OAAO,6BAA6B,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;QAC9D;QAAE,OAAO,KAAK,EAAE;AACd,YAAA,OAAO,mBAAmB,CACxB,KAAK,YAAY,KAAK,GAAG,KAAK,CAAC,OAAO,GAAG,wBAAwB,CAClE;QACH;IACF;8GA9BW,2BAA2B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA3B,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,2BAA2B,cADd,MAAM,EAAA,CAAA,CAAA;;2FACnB,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBADvC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-health-core-client-list-smoking-status-options.query-EUVhlNLW.mjs","sources":["../../../../libs/modules/health-core/client/src/lib/features/queries/list-smoking-status-options.query.ts"],"sourcesContent":["import {\n resolveCollectionSkip,\n resolveCollectionTake,\n type AXPCollectionQuery,\n type AXPCollectionQueryInput,\n type AXPQueryCollectionFetchResultPromise,\n} from '@acorex-platform/framework-shared/runtime';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessCollection,\n} from '@acorex-platform/framework-shared/core';\nimport { applyFilterArray, applySortArray } from '@acorex-platform/framework-client/core';\n\nimport { Injectable } from '@angular/core';\n\n//#region ---- Types ----\n\nexport type AXMListSmokingStatusOptionsQueryInput = AXPCollectionQueryInput;\n\nexport interface AXMListSmokingStatusOptionsQueryItem {\n /** Stored choice code. */\n value: string;\n /** Display title (i18n key). */\n title: string;\n}\n\n//#endregion\n\n//#region ---- Constants ----\n\n/** Same rows as the former `smoking-status-options` registry data source. */\nconst SMOKING_STATUS_OPTIONS: AXMListSmokingStatusOptionsQueryItem[] = [\n { value: 'never', title: '@health-core:datasources.smoking-status-options.samples.never' },\n { value: 'former', title: '@health-core:datasources.smoking-status-options.samples.former' },\n { value: 'current', title: '@health-core:datasources.smoking-status-options.samples.current' },\n {\n value: 'prefer-not-to-say',\n title: '@health-core:datasources.smoking-status-options.samples.prefer-not-to-say',\n },\n];\n\n//#endregion\n\n//#region ---- Query ----\n\n/**\n * Static smoking status catalog — replaces the `smoking-status-options` DI data source.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMListSmokingStatusOptionsQuery\n implements\n AXPCollectionQuery<AXMListSmokingStatusOptionsQueryInput, AXMListSmokingStatusOptionsQueryItem>\n{\n //#region ---- Query Execution ----\n\n async fetch(\n input?: AXMListSmokingStatusOptionsQueryInput | null,\n ): AXPQueryCollectionFetchResultPromise<AXMListSmokingStatusOptionsQueryItem> {\n try {\n let items = [...SMOKING_STATUS_OPTIONS];\n\n if (input?.filter) {\n items = applyFilterArray(items, [input.filter]);\n }\n\n const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];\n const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'value' as const, dir: 'asc' as const }];\n items = applySortArray(items, sortOpt);\n\n const skip = resolveCollectionSkip(input?.skip);\n const take = resolveCollectionTake(input?.take);\n const total = items.length;\n const page = items.slice(skip, skip + take);\n\n return runtimeQuerySuccessCollection({ items: page, total });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Unknown error occurred',\n );\n }\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;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C,KAAK,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;YAE3C,OAAO,6BAA6B,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;QAC9D;QAAE,OAAO,KAAK,EAAE;AACd,YAAA,OAAO,mBAAmB,CACxB,KAAK,YAAY,KAAK,GAAG,KAAK,CAAC,OAAO,GAAG,wBAAwB,CAClE;QACH;IACF;8GA/BW,gCAAgC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAhC,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gCAAgC,cADnB,MAAM,EAAA,CAAA,CAAA;;2FACnB,gCAAgC,EAAA,UAAA,EAAA,CAAA;kBAD5C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;;;"}
1
+ {"version":3,"file":"acorex-platform-module-health-core-client-list-smoking-status-options.query-EUVhlNLW.mjs","sources":["../../../../libs/modules/health-core/client/src/lib/features/queries/list-smoking-status-options.query.ts"],"sourcesContent":["import {\n resolveCollectionSkip,\n resolveCollectionTake,\n type AXPCollectionQuery,\n type AXPCollectionQueryInput,\n type AXPQueryCollectionFetchResultPromise,\n} from '@acorex-platform/framework-shared/runtime';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessCollection,\n} from '@acorex-platform/framework-shared/core';\nimport { applyFilterArray, applySortArray } from '@acorex-platform/framework-client/core';\n\nimport { Injectable } from '@angular/core';\n\n//#region ---- Types ----\n\nexport type AXMListSmokingStatusOptionsQueryInput = AXPCollectionQueryInput;\n\nexport interface AXMListSmokingStatusOptionsQueryItem {\n /** Stored choice code. */\n value: string;\n /** Display title (i18n key). */\n title: string;\n}\n\n//#endregion\n\n//#region ---- Constants ----\n\n/** Same rows as the former `smoking-status-options` registry data source. */\nconst SMOKING_STATUS_OPTIONS: AXMListSmokingStatusOptionsQueryItem[] = [\n { value: 'never', title: '@health-core:datasources.smoking-status-options.samples.never' },\n { value: 'former', title: '@health-core:datasources.smoking-status-options.samples.former' },\n { value: 'current', title: '@health-core:datasources.smoking-status-options.samples.current' },\n {\n value: 'prefer-not-to-say',\n title: '@health-core:datasources.smoking-status-options.samples.prefer-not-to-say',\n },\n];\n\n//#endregion\n\n//#region ---- Query ----\n\n/**\n * Static smoking status catalog — replaces the `smoking-status-options` DI data source.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMListSmokingStatusOptionsQuery\n implements\n AXPCollectionQuery<AXMListSmokingStatusOptionsQueryInput, AXMListSmokingStatusOptionsQueryItem>\n{\n //#region ---- Query Execution ----\n\n async fetch(\n input?: AXMListSmokingStatusOptionsQueryInput | null,\n ): AXPQueryCollectionFetchResultPromise<AXMListSmokingStatusOptionsQueryItem> {\n try {\n let items = [...SMOKING_STATUS_OPTIONS];\n\n if (input?.filter) {\n items = applyFilterArray(items, [input.filter]);\n }\n\n const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];\n const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'value' as const, dir: 'asc' as const }];\n items = applySortArray(items, sortOpt);\n\n const skip = resolveCollectionSkip(input?.skip);\n const take = resolveCollectionTake(input?.take);\n const total = items.length;\n const page = items.slice(skip, skip + take);\n\n return runtimeQuerySuccessCollection({ items: page, total });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Unknown error occurred',\n );\n }\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;AA0BA;AAEA;AAEA;AACA,MAAM,sBAAsB,GAA2C;AACrE,IAAA,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,+DAA+D,EAAE;AAC1F,IAAA,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE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AO,mBAAmB,CACxB,KAAK,YAAY,KAAK,GAAG,KAAK,CAAC,OAAO,GAAG,wBAAwB,CAClE;QACH;IACF;8GA/BW,gCAAgC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAhC,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gCAAgC,cADnB,MAAM,EAAA,CAAA,CAAA;;2FACnB,gCAAgC,EAAA,UAAA,EAAA,CAAA;kBAD5C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-health-core-client-list-work-capacity-options.query-YQ6BW3kG.mjs","sources":["../../../../libs/modules/health-core/client/src/lib/features/queries/list-work-capacity-options.query.ts"],"sourcesContent":["import {\n resolveCollectionSkip,\n resolveCollectionTake,\n type AXPCollectionQuery,\n type AXPCollectionQueryInput,\n type AXPQueryCollectionFetchResultPromise,\n} from '@acorex-platform/framework-shared/runtime';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessCollection,\n} from '@acorex-platform/framework-shared/core';\nimport { applyFilterArray, applySortArray } from '@acorex-platform/framework-client/core';\n\nimport { Injectable } from '@angular/core';\n\n//#region ---- Types ----\n\nexport type AXMListWorkCapacityOptionsQueryInput = AXPCollectionQueryInput;\n\nexport interface AXMListWorkCapacityOptionsQueryItem {\n /** Stored choice code. */\n id: string;\n /** Display title (i18n key). */\n title: string;\n}\n\n//#endregion\n\n//#region ---- Constants ----\n\nconst I18N = '@health-core:datasources.work-capacity-options';\n\n/** Same rows as the former `work-capacity-options` registry data source. */\nconst WORK_CAPACITY_OPTIONS: AXMListWorkCapacityOptionsQueryItem[] = [\n { id: 'continue', title: `${I18N}.samples.continue` },\n { id: 'modified', title: `${I18N}.samples.modified` },\n { id: 'unable', title: `${I18N}.samples.unable` },\n { id: 'hospitalised', title: `${I18N}.samples.hospitalised` },\n];\n\n//#endregion\n\n//#region ---- Query ----\n\n/**\n * Static work capacity catalog — replaces the `work-capacity-options` DI data source.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMListWorkCapacityOptionsQuery\n implements AXPCollectionQuery<AXMListWorkCapacityOptionsQueryInput, AXMListWorkCapacityOptionsQueryItem>\n{\n //#region ---- Query Execution ----\n\n async fetch(\n input?: AXMListWorkCapacityOptionsQueryInput | null,\n ): AXPQueryCollectionFetchResultPromise<AXMListWorkCapacityOptionsQueryItem> {\n try {\n let items = [...WORK_CAPACITY_OPTIONS];\n\n if (input?.filter) {\n items = applyFilterArray(items, [input.filter]);\n }\n\n const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];\n const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'id' as const, dir: 'asc' as const }];\n items = applySortArray(items, sortOpt);\n\n const skip = resolveCollectionSkip(input?.skip);\n const take = resolveCollectionTake(input?.take);\n const total = items.length;\n const page = items.slice(skip, skip + take);\n\n return runtimeQuerySuccessCollection({ items: page, total });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Unknown error occurred',\n );\n }\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;AA0BA;AAEA;AAEA,MAAM,IAAI,GAAG,gDAAgD;AAE7D;AACA,MAAM,qBAAqB,GAA0C;IACnE,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,CAAA,EAAG,IAAI,CAAA,iBAAA,CAAmB,EAAE;IACrD,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,CAAA,EAAG,IAAI,CAAA,iBAAA,CAAmB,EAAE;IACrD,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAA,EAAG,IAAI,CAAA,eAAA,CAAiB,EAAE;IAC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H;IACF;8GA9BW,+BAA+B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA/B,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,+BAA+B,cADlB,MAAM,EAAA,CAAA,CAAA;;2FACnB,+BAA+B,EAAA,UAAA,EAAA,CAAA;kBAD3C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;;;"}
1
+ {"version":3,"file":"acorex-platform-module-health-core-client-list-work-capacity-options.query-YQ6BW3kG.mjs","sources":["../../../../libs/modules/health-core/client/src/lib/features/queries/list-work-capacity-options.query.ts"],"sourcesContent":["import {\n resolveCollectionSkip,\n resolveCollectionTake,\n type AXPCollectionQuery,\n type AXPCollectionQueryInput,\n type AXPQueryCollectionFetchResultPromise,\n} from '@acorex-platform/framework-shared/runtime';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessCollection,\n} from '@acorex-platform/framework-shared/core';\nimport { applyFilterArray, applySortArray } from '@acorex-platform/framework-client/core';\n\nimport { Injectable } from '@angular/core';\n\n//#region ---- Types ----\n\nexport type AXMListWorkCapacityOptionsQueryInput = AXPCollectionQueryInput;\n\nexport interface AXMListWorkCapacityOptionsQueryItem {\n /** Stored choice code. */\n id: string;\n /** Display title (i18n key). */\n title: string;\n}\n\n//#endregion\n\n//#region ---- Constants ----\n\nconst I18N = '@health-core:datasources.work-capacity-options';\n\n/** Same rows as the former `work-capacity-options` registry data source. */\nconst WORK_CAPACITY_OPTIONS: AXMListWorkCapacityOptionsQueryItem[] = [\n { id: 'continue', title: `${I18N}.samples.continue` },\n { id: 'modified', title: `${I18N}.samples.modified` },\n { id: 'unable', title: `${I18N}.samples.unable` },\n { id: 'hospitalised', title: `${I18N}.samples.hospitalised` },\n];\n\n//#endregion\n\n//#region ---- Query ----\n\n/**\n * Static work capacity catalog — replaces the `work-capacity-options` DI data source.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMListWorkCapacityOptionsQuery\n implements AXPCollectionQuery<AXMListWorkCapacityOptionsQueryInput, AXMListWorkCapacityOptionsQueryItem>\n{\n //#region ---- Query Execution ----\n\n async fetch(\n input?: AXMListWorkCapacityOptionsQueryInput | null,\n ): AXPQueryCollectionFetchResultPromise<AXMListWorkCapacityOptionsQueryItem> {\n try {\n let items = [...WORK_CAPACITY_OPTIONS];\n\n if (input?.filter) {\n items = applyFilterArray(items, [input.filter]);\n }\n\n const rawSort = Array.isArray(input?.sort) ? input.sort : input?.sort ? [input.sort] : [];\n const sortOpt = rawSort.length > 0 ? rawSort : [{ field: 'id' as const, dir: 'asc' as const }];\n items = applySortArray(items, sortOpt);\n\n const skip = resolveCollectionSkip(input?.skip);\n const take = resolveCollectionTake(input?.take);\n const total = items.length;\n const page = items.slice(skip, skip + take);\n\n return runtimeQuerySuccessCollection({ items: page, total });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Unknown error occurred',\n );\n }\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;AA0BA;AAEA;AAEA,MAAM,IAAI,GAAG,gDAAgD;AAE7D;AACA,MAAM,qBAAqB,GAA0C;IACnE,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,CAAA,EAAG,IAAI,CAAA,iBAAA,CAAmB,EAAE;IACrD,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,CAAA,EAAG,IAAI,CAAA,iBAAA,CAAmB,EAAE;IACrD,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAA,EAAG,IAAI,CAAA,eAAA,CAAiB,EAAE;IACjD,EAAE,EAAE,EAAE,cAAc,EAAE,KAAK,EAAE,CAAA,EAAG,IAAI,CAAA,qBAAA,CAAuB,EAAE;CAC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A,EAAA,CAAA,CAAA;AAA/B,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,+BAA+B,cADlB,MAAM,EAAA,CAAA,CAAA;;2FACnB,+BAA+B,EAAA,UAAA,EAAA,CAAA;kBAD3C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
@@ -0,0 +1,39 @@
1
+ import { provideLocalEntityCatalog } from '@acorex-platform/framework-client/layout/entity';
2
+ import { RootConfig } from '@acorex-platform/module-health-core-client/contracts';
3
+ export { healthCoreLocalEntityCatalog } from '@acorex-platform/module-health-core-client/contracts/entity-catalog';
4
+
5
+ //#region ----- Imports -----
6
+ //#endregion
7
+ //#region ----- Provide local entities -----
8
+ /**
9
+ * Registers health-core layouts on the client from packaged factories.
10
+ * Each `import()` targets a secondary entry so unused entities stay out of the
11
+ * bundle. Do not add this to the demo app; demo continues to load layouts via
12
+ * `Domain:GetEntityLayout`.
13
+ */
14
+ function provideHealthCoreLocalEntities() {
15
+ return provideLocalEntityCatalog({
16
+ moduleName: RootConfig.module.name,
17
+ loaders: {
18
+ [RootConfig.entities.bloodType.name]: () => import('@acorex-platform/module-health-core-client/contracts/entities/blood-type').then((m) => m.bloodTypeFactory()),
19
+ [RootConfig.entities.bodyPart.name]: () => import('@acorex-platform/module-health-core-client/contracts/entities/body-part').then((m) => m.bodyPartFactory()),
20
+ [RootConfig.entities.disabilityStatus.name]: () => import('@acorex-platform/module-health-core-client/contracts/entities/disability-status').then((m) => m.disabilityStatusFactory()),
21
+ [RootConfig.entities.healthCondition.name]: () => import('@acorex-platform/module-health-core-client/contracts/entities/health-condition').then((m) => m.healthConditionFactory()),
22
+ [RootConfig.entities.healthConditionType.name]: () => import('@acorex-platform/module-health-core-client/contracts/entities/health-condition-type').then((m) => m.healthConditionTypeFactory()),
23
+ [RootConfig.entities.healthEvent.name]: () => import('@acorex-platform/module-health-core-client/contracts/entities/health-event').then((m) => m.healthEventFactory()),
24
+ [RootConfig.entities.healthProfile.name]: () => import('@acorex-platform/module-health-core-client/contracts/entities/health-profile').then((m) => m.healthProfileFactory()),
25
+ [RootConfig.entities.healthRecordType.name]: () => import('@acorex-platform/module-health-core-client/contracts/entities/health-record-type').then((m) => m.healthRecordTypeFactory()),
26
+ [RootConfig.entities.healthRestriction.name]: () => import('@acorex-platform/module-health-core-client/contracts/entities/health-restriction').then((m) => m.healthRestrictionFactory()),
27
+ [RootConfig.entities.injuryType.name]: () => import('@acorex-platform/module-health-core-client/contracts/entities/injury-type').then((m) => m.injuryTypeFactory()),
28
+ [RootConfig.entities.vaccinationType.name]: () => import('@acorex-platform/module-health-core-client/contracts/entities/vaccination-type').then((m) => m.vaccinationTypeFactory()),
29
+ },
30
+ });
31
+ }
32
+ //#endregion
33
+
34
+ /**
35
+ * Generated bundle index. Do not edit.
36
+ */
37
+
38
+ export { provideHealthCoreLocalEntities };
39
+ //# sourceMappingURL=acorex-platform-module-health-core-client-local-entities.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-module-health-core-client-local-entities.mjs","sources":["../../../../libs/modules/health-core/client/src/lib/provide-local-entities.ts","../../../../libs/modules/health-core/client/src/lib/acorex-platform-module-health-core-client-local-entities.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport { provideLocalEntityCatalog } from '@acorex-platform/framework-client/layout/entity';\nimport { RootConfig } from '@acorex-platform/module-health-core-client/contracts';\n\n//#endregion\n\n//#region ----- Provide local entities -----\n\n/**\n * Registers health-core layouts on the client from packaged factories.\n * Each `import()` targets a secondary entry so unused entities stay out of the\n * bundle. Do not add this to the demo app; demo continues to load layouts via\n * `Domain:GetEntityLayout`.\n */\nexport function provideHealthCoreLocalEntities() {\n return provideLocalEntityCatalog({\n moduleName: RootConfig.module.name,\n loaders: {\n [RootConfig.entities.bloodType.name]: () =>\n import('@acorex-platform/module-health-core-client/contracts/entities/blood-type').then((m) => m.bloodTypeFactory()),\n [RootConfig.entities.bodyPart.name]: () =>\n import('@acorex-platform/module-health-core-client/contracts/entities/body-part').then((m) => m.bodyPartFactory()),\n [RootConfig.entities.disabilityStatus.name]: () =>\n import('@acorex-platform/module-health-core-client/contracts/entities/disability-status').then((m) => m.disabilityStatusFactory()),\n [RootConfig.entities.healthCondition.name]: () =>\n import('@acorex-platform/module-health-core-client/contracts/entities/health-condition').then((m) => m.healthConditionFactory()),\n [RootConfig.entities.healthConditionType.name]: () =>\n import('@acorex-platform/module-health-core-client/contracts/entities/health-condition-type').then((m) => m.healthConditionTypeFactory()),\n [RootConfig.entities.healthEvent.name]: () =>\n import('@acorex-platform/module-health-core-client/contracts/entities/health-event').then((m) => m.healthEventFactory()),\n [RootConfig.entities.healthProfile.name]: () =>\n import('@acorex-platform/module-health-core-client/contracts/entities/health-profile').then((m) => m.healthProfileFactory()),\n [RootConfig.entities.healthRecordType.name]: () =>\n import('@acorex-platform/module-health-core-client/contracts/entities/health-record-type').then((m) => m.healthRecordTypeFactory()),\n [RootConfig.entities.healthRestriction.name]: () =>\n import('@acorex-platform/module-health-core-client/contracts/entities/health-restriction').then((m) => m.healthRestrictionFactory()),\n [RootConfig.entities.injuryType.name]: () =>\n import('@acorex-platform/module-health-core-client/contracts/entities/injury-type').then((m) => m.injuryTypeFactory()),\n [RootConfig.entities.vaccinationType.name]: () =>\n import('@acorex-platform/module-health-core-client/contracts/entities/vaccination-type').then((m) => m.vaccinationTypeFactory()),\n },\n });\n}\n\nexport { healthCoreLocalEntityCatalog } from '@acorex-platform/module-health-core-client/contracts/entity-catalog';\n\n//#endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './provide-local-entities';\n"],"names":[],"mappings":";;;;AAAA;AAKA;AAEA;AAEA;;;;;AAKG;SACa,8BAA8B,GAAA;AAC5C,IAAA,OAAO,yBAAyB,CAAC;AAC/B,QAAA,UAAU,EAAE,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AAQ,CAAC,gBAAgB,CAAC,IAAI,GAAG,MAC3C,OAAO,kFAAkF,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,uBAAuB,EAAE,CAAC;AACrI,YAAA,CAAC,UAAU,CAAC,QAAQ,CAAC,iBAAiB,CAAC,IAAI,GAAG,MAC5C,OAAO,kFAAkF,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,wBAAwB,EAAE,CAAC;AACtI,YAAA,CAAC,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,GAAG,MACrC,OAAO,2EAA2E,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,iBAAiB,EAAE,CAAC;AACxH,YAAA,CAAC,UAAU,CAAC,QAAQ,CAAC,eAAe,CAAC,IAAI,GAAG,MAC1C,OAAO,gFAAgF,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,sBAAsB,EAAE,CAAC;AACnI,SAAA;AACF,KAAA,CAAC;AACJ;AAIA;;AC/CA;;AAEG;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-health-core-client-start-health-record-flow.command-BsB-MPmu.mjs","sources":["../../../../libs/modules/health-core/client/src/lib/features/health-event/health-event-status.constants.ts","../../../../libs/modules/health-core/client/src/lib/features/health-event/commands/start-health-record-flow.command.ts"],"sourcesContent":["import { AXPSystemStatusType } from '@acorex-platform/framework-shared/core';\n\n//#region ---- Health event open statuses ----\n\n/** Statuses that block starting another run for the same subject and event type. */\nexport const AXMHealthCoreHealthEventOpenStatusIds = [\n AXPSystemStatusType.InProgress,\n AXPSystemStatusType.WaitingSignOff,\n] as const;\n\n//#endregion\n","//#region ---- Imports ----\n\nimport { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport {\n AXPRuntimeCommandResult,\n AXPSystemStatusType,\n runtimeQueryCollectionData,\n} from '@acorex-platform/framework-shared/core';\nimport { getRecordWorkflowInstanceId } from '@acorex-platform/framework-shared/entity';\nimport { AXDialogService } from '@acorex/components/dialog';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationService, resolveMultiLanguageString, type AXMultiLanguageString } from '@acorex/core/translation';\n\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { AXPCommandService, AXPQueryService } from '@acorex-platform/framework-client/runtime';\nimport { ENTITY_QUERY_DEFAULT, ENTITY_UPDATE_DEFAULT } from '@acorex-platform/framework-shared/runtime';\n\nimport {\n AXP_WORKFLOW_ENGINE,\n AXPWorkflowEngine,\n AXPWorkflowManager,\n} from '@acorex-platform/framework-client/workflow';\nimport { inject, Injectable } from '@angular/core';\n\nimport { RootConfig } from '@acorex-platform/module-health-core-client/contracts';\nimport { AXMHealthCoreHealthEventOpenStatusIds } from '../health-event-status.constants';\n\n//#endregion\n\n//#region ---- Types ----\n\nexport interface StartHealthEventFlowInput {\n workflowId?: string;\n subjectType?: string;\n subjectId?: string;\n subjectTitle?: string;\n recordTypeId?: string;\n recordTypeTitle?: AXMultiLanguageString | string;\n questionnaireId?: string;\n requireEmployeeSignature?: boolean;\n requireManagerSignature?: boolean;\n options?: StartHealthEventFlowOptions;\n}\n\nexport interface StartHealthEventFlowOptions {\n workflowId: string;\n input: {\n subjectType: string;\n subjectId: string;\n subjectTitle: string;\n recordTypeId: string;\n recordTypeTitle?: AXMultiLanguageString | string;\n questionnaireId?: string;\n requireEmployeeSignature?: boolean;\n requireManagerSignature?: boolean;\n assessmentCaseTitle?: string;\n };\n}\n\ninterface OpenHealthEventRow {\n id: string;\n workflowInfo?: { instanceId?: string | null; correlationId?: string | null };\n recordType?: { title?: unknown };\n}\n\n//#endregion\n\n/**\n * Starts a guided health event workflow after ensuring at most one in-progress event per subject and record type.\n */\n@Injectable({ providedIn: 'root' })\nexport class StartHealthEventFlowCommand implements AXPCommand<StartHealthEventFlowInput, void> {\n //#region ---- Services & Dependencies ----\n\n private readonly dialogService = inject(AXDialogService);\n private readonly translationService = inject(AXTranslationService);\n private readonly toastService = inject(AXToastService);\n private readonly entityService = inject(AXPEntityService);\n private readonly queryService = inject(AXPQueryService);\n private readonly commandService = inject(AXPCommandService);\n private readonly workflowManager = inject(AXPWorkflowManager);\n private readonly workflowEngine = inject(AXP_WORKFLOW_ENGINE, { optional: true });\n\n //#endregion\n\n //#region ---- Command Implementation ----\n\n async execute(input: StartHealthEventFlowInput): AXPCommandExecuteResultPromise<void> {\n const options = (input?.options ?? input) as StartHealthEventFlowOptions;\n const flowInput = options.input;\n const workflowId = options.workflowId?.trim();\n const subjectType = flowInput?.subjectType?.trim();\n const subjectId = this.resolveFlowText(flowInput?.subjectId);\n const recordTypeId = flowInput?.recordTypeId?.trim();\n const subjectTitle = this.resolveFlowText(flowInput?.subjectTitle);\n const recordTypeTitleForWorkflow = this.coerceRecordTypeTitleForWorkflow(flowInput?.recordTypeTitle);\n const recordTypeTitleDisplay = this.resolveFlowText(flowInput?.recordTypeTitle);\n const assessmentCaseTitle =\n this.resolveFlowText(flowInput?.assessmentCaseTitle) ||\n this.buildAssessmentCaseTitle(recordTypeTitleDisplay, subjectTitle);\n\n if (!workflowId || !subjectType || !subjectId || !recordTypeId) {\n return { success: false, message: { text: 'Missing workflow or subject context.' } };\n }\n\n try {\n const openEvents = await this.findOpenHealthEvents(subjectType, subjectId, recordTypeId);\n const orphanInstanceIds = await this.findOrphanRunningWorkflowInstanceIds(\n subjectType,\n subjectId,\n recordTypeId,\n workflowId,\n openEvents,\n );\n\n if (openEvents.length > 0 || orphanInstanceIds.length > 0) {\n const confirmed = await this.confirmReplace(recordTypeTitleDisplay);\n if (!confirmed) {\n return { success: false };\n }\n await this.closeOpenRuns(openEvents, orphanInstanceIds);\n }\n\n const startResult = await this.workflowManager.start(workflowId, {\n subjectType,\n subjectId,\n subjectTitle,\n recordTypeId: flowInput.recordTypeId,\n ...(recordTypeTitleForWorkflow != null ? { recordTypeTitle: recordTypeTitleForWorkflow } : {}),\n assessmentCaseTitle,\n questionnaireId: flowInput.questionnaireId,\n requireEmployeeSignature: flowInput.requireEmployeeSignature,\n requireManagerSignature: flowInput.requireManagerSignature,\n refId: subjectId,\n refType: subjectType,\n correlationId: this.buildCorrelationId(subjectType, subjectId, recordTypeId, workflowId),\n });\n\n if (!startResult.success) {\n this.toastService.show({\n color: 'danger',\n title: 'Workflow Execution Failed',\n content: startResult.error ?? 'Unknown error',\n closeButton: true,\n timeOut: 5000,\n });\n return { success: false, message: { text: startResult.error ?? 'Unknown error' } };\n }\n\n return { success: true, kind: 'object', data: undefined };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Unknown error';\n console.error('[StartHealthEventFlowCommand]', error);\n this.toastService.show({\n color: 'danger',\n title: 'Workflow Execution Error',\n content: message,\n closeButton: true,\n timeOut: 5000,\n });\n return { success: false, message: { text: message } };\n }\n }\n\n //#endregion\n\n //#region ---- Open-run detection ----\n\n private async findOpenHealthEvents(\n subjectType: string,\n subjectId: string,\n recordTypeId: string,\n ): Promise<OpenHealthEventRow[]> {\n const page = await this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.healthEvent.name)\n .data()\n .query({\n skip: 0,\n take: 10,\n filter: {\n logic: 'and',\n filters: [\n { field: 'subject.type', operator: { type: 'equal' }, value: subjectType },\n { field: 'subject.id', operator: { type: 'equal' }, value: subjectId },\n { field: 'recordTypeId', operator: { type: 'equal' }, value: recordTypeId },\n {\n field: 'statusId',\n operator: { type: 'in' },\n value: [...AXMHealthCoreHealthEventOpenStatusIds],\n },\n ],\n },\n });\n\n return (page.items ?? []) as OpenHealthEventRow[];\n }\n\n private async findOrphanRunningWorkflowInstanceIds(\n subjectType: string,\n subjectId: string,\n recordTypeId: string,\n workflowId: string,\n openEvents: OpenHealthEventRow[],\n ): Promise<string[]> {\n const linkedInstanceIds = new Set(\n openEvents\n .map((row) => getRecordWorkflowInstanceId(row))\n .filter((id): id is string => !!id),\n );\n\n try {\n const result = await this.queryService.fetch(ENTITY_QUERY_DEFAULT, {\n entity: 'WorkflowManagement.WorkflowInstance',\n skip: 0,\n take: 50,\n filter: {\n logic: 'and',\n filters: [\n {\n field: 'definitionId',\n operator: { type: 'equal' },\n value: workflowId,\n },\n { field: 'status', operator: { type: 'equal' }, value: 'Running' },\n ],\n },\n });\n\n const items = (runtimeQueryCollectionData(result)?.items ?? []) as Array<{\n id?: string;\n workflowInstance?: { workflowState?: { input?: Record<string, unknown> } };\n }>;\n\n return items\n .filter((row) => {\n const id = row.id?.trim();\n if (!id || linkedInstanceIds.has(id)) {\n return false;\n }\n const runInput = row.workflowInstance?.workflowState?.input ?? {};\n return (\n runInput['subjectType'] === subjectType &&\n runInput['subjectId'] === subjectId &&\n runInput['recordTypeId'] === recordTypeId\n );\n })\n .map((row) => row.id as string);\n } catch {\n return [];\n }\n }\n\n //#endregion\n\n //#region ---- Close and replace ----\n\n private async confirmReplace(recordTypeTitle: string | undefined): Promise<boolean> {\n const title = await this.translationService.translateAsync(\n '@health-core:health-events.messages.replace-open.confirm.title',\n );\n const message = await this.translationService.translateAsync(\n '@health-core:health-events.messages.replace-open.confirm.message',\n {\n params: {\n recordTypeTitle: String(recordTypeTitle ?? '').trim() || '—',\n },\n },\n );\n const result = await this.dialogService.confirm(title, message, 'warning', 'horizontal', false, 'cancel');\n return result.result === true;\n }\n\n private async closeOpenRuns(\n openEvents: OpenHealthEventRow[],\n orphanInstanceIds: string[],\n ): Promise<void> {\n const data = this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.healthEvent.name)\n .data();\n\n const supersedeNote = 'Closed to start a new health event run.';\n\n for (const event of openEvents) {\n await data.update(event.id, {\n statusId: AXPSystemStatusType.Cancelled,\n notes: supersedeNote,\n } as never);\n\n const instanceId = getRecordWorkflowInstanceId(event);\n if (instanceId) {\n await this.cancelWorkflowInstance(instanceId);\n }\n }\n\n for (const instanceId of orphanInstanceIds) {\n await this.cancelWorkflowInstance(instanceId);\n }\n }\n\n private async cancelWorkflowInstance(instanceId: string): Promise<void> {\n const engine = this.workflowEngine as AXPWorkflowEngine | null;\n if (engine?.cancelInstance) {\n await engine.cancelInstance(instanceId, 'superseded');\n return;\n }\n\n const now = new Date().toISOString();\n try {\n await this.commandService.execute(ENTITY_UPDATE_DEFAULT, {\n entity: 'WorkflowManagement.WorkflowInstance',\n id: instanceId,\n status: 'Finished',\n subStatus: 'Cancelled',\n finishedAt: now,\n updatedAt: now,\n });\n } catch (error: unknown) {\n console.warn('[StartHealthEventFlowCommand] Failed to cancel workflow instance:', instanceId, error);\n }\n }\n\n //#endregion\n\n //#region ---- Helpers ----\n\n private resolveFlowText(value: unknown): string {\n if (value == null || value === false) {\n return '';\n }\n if (typeof value === 'string') {\n return value.trim();\n }\n if (typeof value === 'number' || typeof value === 'boolean') {\n return String(value).trim();\n }\n return resolveMultiLanguageString(value as never, this.translationService.getActiveLang()).trim();\n }\n\n /** Preserves multi-language record type titles on the workflow instance for locale-aware task labels. */\n private coerceRecordTypeTitleForWorkflow(\n value: AXMultiLanguageString | string | undefined,\n ): AXMultiLanguageString | string | undefined {\n if (value == null) {\n return undefined;\n }\n if (typeof value === 'object') {\n return value;\n }\n const trimmed = value.trim();\n return trimmed.length > 0 ? trimmed : undefined;\n }\n\n private buildAssessmentCaseTitle(recordTypeTitle: string, subjectTitle: string): string {\n if (recordTypeTitle && subjectTitle) {\n return `${recordTypeTitle} — ${subjectTitle}`;\n }\n return recordTypeTitle || subjectTitle;\n }\n\n private buildCorrelationId(\n subjectType: string,\n subjectId: string,\n recordTypeId: string,\n workflowId: string,\n ): string {\n return `${subjectType}:${subjectId}:${recordTypeId}:${workflowId}`;\n }\n\n //#endregion\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;AAEA;AAEA;AACO,MAAM,qCAAqC,GAAG;AACnD,IAAA,mBAAmB,CAAC,UAAU;AAC9B,IAAA,mBAAmB,CAAC,cAAc;CAC1B;AAEV;;ACuDA;AAEA;;AAEG;MAEU,2BAA2B,CAAA;AADxC,I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ources":["../../../../libs/modules/health-core/client/src/lib/features/health-event/health-event-status.constants.ts","../../../../libs/modules/health-core/client/src/lib/features/health-event/commands/start-health-record-flow.command.ts"],"sourcesContent":["import { AXPSystemStatusType } from '@acorex-platform/framework-shared/core';\n\n//#region ---- Health event open statuses ----\n\n/** Statuses that block starting another run for the same subject and event type. */\nexport const AXMHealthCoreHealthEventOpenStatusIds = [\n AXPSystemStatusType.InProgress,\n AXPSystemStatusType.WaitingSignOff,\n] as const;\n\n//#endregion\n","//#region ---- Imports ----\n\nimport { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport {\n AXPRuntimeCommandResult,\n AXPSystemStatusType,\n runtimeQueryCollectionData,\n} from '@acorex-platform/framework-shared/core';\nimport { getRecordWorkflowInstanceId } from '@acorex-platform/framework-shared/entity';\nimport { AXDialogService } from '@acorex/components/dialog';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationService, resolveMultiLanguageString, type AXMultiLanguageString } from '@acorex/core/translation';\n\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { AXPCommandService, AXPQueryService } from '@acorex-platform/framework-client/runtime';\nimport { ENTITY_QUERY_DEFAULT, ENTITY_UPDATE_DEFAULT } from '@acorex-platform/framework-shared/runtime';\n\nimport {\n AXP_WORKFLOW_ENGINE,\n AXPWorkflowEngine,\n AXPWorkflowManager,\n} from '@acorex-platform/framework-client/workflow';\nimport { inject, Injectable } from '@angular/core';\n\nimport { RootConfig } from '@acorex-platform/module-health-core-client/contracts';\nimport { AXMHealthCoreHealthEventOpenStatusIds } from '../health-event-status.constants';\n\n//#endregion\n\n//#region ---- Types ----\n\nexport interface StartHealthEventFlowInput {\n workflowId?: string;\n subjectType?: string;\n subjectId?: string;\n subjectTitle?: string;\n recordTypeId?: string;\n recordTypeTitle?: AXMultiLanguageString | string;\n questionnaireId?: string;\n requireEmployeeSignature?: boolean;\n requireManagerSignature?: boolean;\n options?: StartHealthEventFlowOptions;\n}\n\nexport interface StartHealthEventFlowOptions {\n workflowId: string;\n input: {\n subjectType: string;\n subjectId: string;\n subjectTitle: string;\n recordTypeId: string;\n recordTypeTitle?: AXMultiLanguageString | string;\n questionnaireId?: string;\n requireEmployeeSignature?: boolean;\n requireManagerSignature?: boolean;\n assessmentCaseTitle?: string;\n };\n}\n\ninterface OpenHealthEventRow {\n id: string;\n workflowInfo?: { instanceId?: string | null; correlationId?: string | null };\n recordType?: { title?: unknown };\n}\n\n//#endregion\n\n/**\n * Starts a guided health event workflow after ensuring at most one in-progress event per subject and record type.\n */\n@Injectable({ providedIn: 'root' })\nexport class StartHealthEventFlowCommand implements AXPCommand<StartHealthEventFlowInput, void> {\n //#region ---- Services & Dependencies ----\n\n private readonly dialogService = inject(AXDialogService);\n private readonly translationService = inject(AXTranslationService);\n private readonly toastService = inject(AXToastService);\n private readonly entityService = inject(AXPEntityService);\n private readonly queryService = inject(AXPQueryService);\n private readonly commandService = inject(AXPCommandService);\n private readonly workflowManager = inject(AXPWorkflowManager);\n private readonly workflowEngine = inject(AXP_WORKFLOW_ENGINE, { optional: true });\n\n //#endregion\n\n //#region ---- Command Implementation ----\n\n async execute(input: StartHealthEventFlowInput): AXPCommandExecuteResultPromise<void> {\n const options = (input?.options ?? input) as StartHealthEventFlowOptions;\n const flowInput = options.input;\n const workflowId = options.workflowId?.trim();\n const subjectType = flowInput?.subjectType?.trim();\n const subjectId = this.resolveFlowText(flowInput?.subjectId);\n const recordTypeId = flowInput?.recordTypeId?.trim();\n const subjectTitle = this.resolveFlowText(flowInput?.subjectTitle);\n const recordTypeTitleForWorkflow = this.coerceRecordTypeTitleForWorkflow(flowInput?.recordTypeTitle);\n const recordTypeTitleDisplay = this.resolveFlowText(flowInput?.recordTypeTitle);\n const assessmentCaseTitle =\n this.resolveFlowText(flowInput?.assessmentCaseTitle) ||\n this.buildAssessmentCaseTitle(recordTypeTitleDisplay, subjectTitle);\n\n if (!workflowId || !subjectType || !subjectId || !recordTypeId) {\n return { success: false, message: { text: 'Missing workflow or subject context.' } };\n }\n\n try {\n const openEvents = await this.findOpenHealthEvents(subjectType, subjectId, recordTypeId);\n const orphanInstanceIds = await this.findOrphanRunningWorkflowInstanceIds(\n subjectType,\n subjectId,\n recordTypeId,\n workflowId,\n openEvents,\n );\n\n if (openEvents.length > 0 || orphanInstanceIds.length > 0) {\n const confirmed = await this.confirmReplace(recordTypeTitleDisplay);\n if (!confirmed) {\n return { success: false };\n }\n await this.closeOpenRuns(openEvents, orphanInstanceIds);\n }\n\n const startResult = await this.workflowManager.start(workflowId, {\n subjectType,\n subjectId,\n subjectTitle,\n recordTypeId: flowInput.recordTypeId,\n ...(recordTypeTitleForWorkflow != null ? { recordTypeTitle: recordTypeTitleForWorkflow } : {}),\n assessmentCaseTitle,\n questionnaireId: flowInput.questionnaireId,\n requireEmployeeSignature: flowInput.requireEmployeeSignature,\n requireManagerSignature: flowInput.requireManagerSignature,\n refId: subjectId,\n refType: subjectType,\n correlationId: this.buildCorrelationId(subjectType, subjectId, recordTypeId, workflowId),\n });\n\n if (!startResult.success) {\n this.toastService.show({\n color: 'danger',\n title: 'Workflow Execution Failed',\n content: startResult.error ?? 'Unknown error',\n closeButton: true,\n timeOut: 5000,\n });\n return { success: false, message: { text: startResult.error ?? 'Unknown error' } };\n }\n\n return { success: true, kind: 'object', data: undefined };\n } catch (error: unknown) {\n const message = error instanceof Error ? error.message : 'Unknown error';\n console.error('[StartHealthEventFlowCommand]', error);\n this.toastService.show({\n color: 'danger',\n title: 'Workflow Execution Error',\n content: message,\n closeButton: true,\n timeOut: 5000,\n });\n return { success: false, message: { text: message } };\n }\n }\n\n //#endregion\n\n //#region ---- Open-run detection ----\n\n private async findOpenHealthEvents(\n subjectType: string,\n subjectId: string,\n recordTypeId: string,\n ): Promise<OpenHealthEventRow[]> {\n const page = await this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.healthEvent.name)\n .data()\n .query({\n skip: 0,\n take: 10,\n filter: {\n logic: 'and',\n filters: [\n { field: 'subject.type', operator: { type: 'equal' }, value: subjectType },\n { field: 'subject.id', operator: { type: 'equal' }, value: subjectId },\n { field: 'recordTypeId', operator: { type: 'equal' }, value: recordTypeId },\n {\n field: 'statusId',\n operator: { type: 'in' },\n value: [...AXMHealthCoreHealthEventOpenStatusIds],\n },\n ],\n },\n });\n\n return (page.items ?? []) as OpenHealthEventRow[];\n }\n\n private async findOrphanRunningWorkflowInstanceIds(\n subjectType: string,\n subjectId: string,\n recordTypeId: string,\n workflowId: string,\n openEvents: OpenHealthEventRow[],\n ): Promise<string[]> {\n const linkedInstanceIds = new Set(\n openEvents\n .map((row) => getRecordWorkflowInstanceId(row))\n .filter((id): id is string => !!id),\n );\n\n try {\n const result = await this.queryService.fetch(ENTITY_QUERY_DEFAULT, {\n entity: 'WorkflowManagement.WorkflowInstance',\n skip: 0,\n take: 50,\n filter: {\n logic: 'and',\n filters: [\n {\n field: 'definitionId',\n operator: { type: 'equal' },\n value: workflowId,\n },\n { field: 'status', operator: { type: 'equal' }, value: 'Running' },\n ],\n },\n });\n\n const items = (runtimeQueryCollectionData(result)?.items ?? []) as Array<{\n id?: string;\n workflowInstance?: { workflowState?: { input?: Record<string, unknown> } };\n }>;\n\n return items\n .filter((row) => {\n const id = row.id?.trim();\n if (!id || linkedInstanceIds.has(id)) {\n return false;\n }\n const runInput = row.workflowInstance?.workflowState?.input ?? {};\n return (\n runInput['subjectType'] === subjectType &&\n runInput['subjectId'] === subjectId &&\n runInput['recordTypeId'] === recordTypeId\n );\n })\n .map((row) => row.id as string);\n } catch {\n return [];\n }\n }\n\n //#endregion\n\n //#region ---- Close and replace ----\n\n private async confirmReplace(recordTypeTitle: string | undefined): Promise<boolean> {\n const title = await this.translationService.translateAsync(\n '@health-core:health-events.messages.replace-open.confirm.title',\n );\n const message = await this.translationService.translateAsync(\n '@health-core:health-events.messages.replace-open.confirm.message',\n {\n params: {\n recordTypeTitle: String(recordTypeTitle ?? '').trim() || '—',\n },\n },\n );\n const result = await this.dialogService.confirm(title, message, 'warning', 'horizontal', false, 'cancel');\n return result.result === true;\n }\n\n private async closeOpenRuns(\n openEvents: OpenHealthEventRow[],\n orphanInstanceIds: string[],\n ): Promise<void> {\n const data = this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.healthEvent.name)\n .data();\n\n const supersedeNote = 'Closed to start a new health event run.';\n\n for (const event of openEvents) {\n await data.update(event.id, {\n statusId: AXPSystemStatusType.Cancelled,\n notes: supersedeNote,\n } as never);\n\n const instanceId = getRecordWorkflowInstanceId(event);\n if (instanceId) {\n await this.cancelWorkflowInstance(instanceId);\n }\n }\n\n for (const instanceId of orphanInstanceIds) {\n await this.cancelWorkflowInstance(instanceId);\n }\n }\n\n private async cancelWorkflowInstance(instanceId: string): Promise<void> {\n const engine = this.workflowEngine as AXPWorkflowEngine | null;\n if (engine?.cancelInstance) {\n await engine.cancelInstance(instanceId, 'superseded');\n return;\n }\n\n const now = new Date().toISOString();\n try {\n await this.commandService.execute(ENTITY_UPDATE_DEFAULT, {\n entity: 'WorkflowManagement.WorkflowInstance',\n id: instanceId,\n status: 'Finished',\n subStatus: 'Cancelled',\n finishedAt: now,\n updatedAt: now,\n });\n } catch (error: unknown) {\n console.warn('[StartHealthEventFlowCommand] Failed to cancel workflow instance:', instanceId, error);\n }\n }\n\n //#endregion\n\n //#region ---- Helpers ----\n\n private resolveFlowText(value: unknown): string {\n if (value == null || value === false) {\n return '';\n }\n if (typeof value === 'string') {\n return value.trim();\n }\n if (typeof value === 'number' || typeof value === 'boolean') {\n return String(value).trim();\n }\n return resolveMultiLanguageString(value as never, this.translationService.getActiveLang()).trim();\n }\n\n /** Preserves multi-language record type titles on the workflow instance for locale-aware task labels. */\n private coerceRecordTypeTitleForWorkflow(\n value: AXMultiLanguageString | string | undefined,\n ): AXMultiLanguageString | string | undefined {\n if (value == null) {\n return undefined;\n }\n if (typeof value === 'object') {\n return value;\n }\n const trimmed = value.trim();\n return trimmed.length > 0 ? trimmed : undefined;\n }\n\n private buildAssessmentCaseTitle(recordTypeTitle: string, subjectTitle: string): string {\n if (recordTypeTitle && subjectTitle) {\n return `${recordTypeTitle} — ${subjectTitle}`;\n }\n return recordTypeTitle || subjectTitle;\n }\n\n private buildCorrelationId(\n subjectType: string,\n subjectId: string,\n recordTypeId: string,\n workflowId: string,\n ): string {\n return `${subjectType}:${subjectId}:${recordTypeId}:${workflowId}`;\n }\n\n //#endregion\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;AAEA;AAEA;AACO,MAAM,qCAAqC,GAAG;AACnD,IAAA,mBAAmB,CAAC,UAAU;AAC9B,IAAA,mBAAmB,CAAC,cAAc;CAC1B;AAEV;;ACuDA;AAEA;;AAEG;MAEU,2BAA2B,CAAA;AADxC,IAAA,WAAA,GAAA;;AAImB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,eAAe,CAAC;AACvC,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AACjD,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC;AACrC,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACxC,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,eAAe,CAAC;AACtC,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC1C,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,kBAAkB,CAAC;QAC5C,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,mBAAmB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAgSlF,IAAA;;;IA1RC,MAAM,OAAO,CAAC,KAAgC,EAAA;QAC5C,MAAM,OAAO,IAAI,KAAK,EAAE,OAAO,IAAI,KAAK,CAAgC;AACxE,QAAA,MAAM,SAAS,GAAG,OAAO,CAAC,KAAK;QAC/B,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,EAAE,IAA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