@coffer-org/plugin-health 1.1.0

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.
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Періоди дня для прийому ліків/добавок. Раніше жили в core/fields;
3
+ * винесені у плагін-власник (health). Опційний список 'day-periods'
4
+ * реєструється плагіном health. i18n-ключі — health.dayPeriods.*.
5
+ */
6
+ export declare const DAY_PERIOD_OPTIONS: [{
7
+ readonly value: "any";
8
+ readonly title: "health.dayPeriods.any";
9
+ }, {
10
+ readonly value: "before_breakfast";
11
+ readonly title: "health.dayPeriods.before_breakfast";
12
+ }, {
13
+ readonly value: "with_breakfast";
14
+ readonly title: "health.dayPeriods.with_breakfast";
15
+ }, {
16
+ readonly value: "after_breakfast";
17
+ readonly title: "health.dayPeriods.after_breakfast";
18
+ }, {
19
+ readonly value: "with_food";
20
+ readonly title: "health.dayPeriods.with_food";
21
+ }, {
22
+ readonly value: "after_lunch";
23
+ readonly title: "health.dayPeriods.after_lunch";
24
+ }, {
25
+ readonly value: "evening";
26
+ readonly title: "health.dayPeriods.evening";
27
+ }, {
28
+ readonly value: "before_bed";
29
+ readonly title: "health.dayPeriods.before_bed";
30
+ }, {
31
+ readonly value: "as_needed";
32
+ readonly title: "health.dayPeriods.as_needed";
33
+ }];
34
+ //# sourceMappingURL=day-periods.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"day-periods.d.ts","sourceRoot":"","sources":["../src/day-periods.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUwB,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Періоди дня для прийому ліків/добавок. Раніше жили в core/fields;
3
+ * винесені у плагін-власник (health). Опційний список 'day-periods'
4
+ * реєструється плагіном health. i18n-ключі — health.dayPeriods.*.
5
+ */
6
+ export const DAY_PERIOD_OPTIONS = [
7
+ { value: 'any', title: 'health.dayPeriods.any' },
8
+ { value: 'before_breakfast', title: 'health.dayPeriods.before_breakfast' },
9
+ { value: 'with_breakfast', title: 'health.dayPeriods.with_breakfast' },
10
+ { value: 'after_breakfast', title: 'health.dayPeriods.after_breakfast' },
11
+ { value: 'with_food', title: 'health.dayPeriods.with_food' },
12
+ { value: 'after_lunch', title: 'health.dayPeriods.after_lunch' },
13
+ { value: 'evening', title: 'health.dayPeriods.evening' },
14
+ { value: 'before_bed', title: 'health.dayPeriods.before_bed' },
15
+ { value: 'as_needed', title: 'health.dayPeriods.as_needed' },
16
+ ];
17
+ //# sourceMappingURL=day-periods.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"day-periods.js","sourceRoot":"","sources":["../src/day-periods.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,uBAAuB,EAAE;IAChD,EAAE,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,oCAAoC,EAAE;IAC1E,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,kCAAkC,EAAE;IACtE,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,mCAAmC,EAAE;IACxE,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,6BAA6B,EAAE;IAC5D,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,+BAA+B,EAAE;IAChE,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,2BAA2B,EAAE;IACxD,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,8BAA8B,EAAE;IAC9D,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,6BAA6B,EAAE;CACP,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const _default: import("@coffer-org/sdk/module").ModuleDef;
2
+ export default _default;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/health_test/index.ts"],"names":[],"mappings":";AAGA,wBAqCG"}
@@ -0,0 +1,41 @@
1
+ import { defineModule } from '@coffer-org/sdk/module';
2
+ import { field } from '@coffer-org/sdk/fields';
3
+ export default defineModule({
4
+ module: 'health_test',
5
+ vault: 'health',
6
+ label: 'health.health_test.label',
7
+ icon: 'lucide:flask-conical',
8
+ views: {
9
+ table: ['date', 'person', 'status'],
10
+ },
11
+ fields: [
12
+ field.title({ key: 'name', label: 'core.fields.name' }),
13
+ field.date({ key: 'date', label: 'health.health_test.fields.date' }),
14
+ field.string({ key: 'clinic', label: 'health.health_test.fields.clinic', config: { max: 200 } }),
15
+ field.select({
16
+ key: 'status',
17
+ label: 'health.health_test.fields.status',
18
+ options: [
19
+ { value: 'ordered', title: 'health.health_test.options.status.ordered' },
20
+ { value: 'completed', title: 'health.health_test.options.status.completed' },
21
+ { value: 'cancelled', title: 'health.health_test.options.status.cancelled' },
22
+ ],
23
+ }),
24
+ field.select({
25
+ key: 'test_type',
26
+ label: 'health.health_test.fields.test_type',
27
+ options: [
28
+ { value: 'blood', title: 'health.health_test.options.test_type.blood' },
29
+ { value: 'urine', title: 'health.health_test.options.test_type.urine' },
30
+ { value: 'ultrasound', title: 'health.health_test.options.test_type.ultrasound' },
31
+ { value: 'xray', title: 'health.health_test.options.test_type.xray' },
32
+ { value: 'mri', title: 'health.health_test.options.test_type.mri' },
33
+ { value: 'other', title: 'health.health_test.options.test_type.other' },
34
+ ],
35
+ }),
36
+ field.relation({ key: 'person', label: 'health.health_test.fields.person', vault: 'people', module: 'person' }),
37
+ field.text({ key: 'result', label: 'health.health_test.fields.result', max: 5000 }),
38
+ field.image({ key: 'attachments', label: 'health.health_test.fields.attachments', multiple: true }),
39
+ ],
40
+ });
41
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/health_test/index.ts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AY,EAAE,KAAK,EAAE,iDAAiD,EAAE;gBACjF,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,2CAA2C,EAAE;gBACrE,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,0CAA0C,EAAE;gBACnE,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,4CAA4C,EAAE;aACxE;SACF,CAAC;QACF,KAAK,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,kCAAkC,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;QAC/G,KAAK,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,kCAAkC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;QACnF,KAAK,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,aAAa,EAAE,KAAK,EAAE,uCAAuC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;KACpG;CACF,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const _default: import("@coffer-org/sdk/module").ModuleDef;
2
+ export default _default;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/health_visit/index.ts"],"names":[],"mappings":";AAGA,wBAoBG"}
@@ -0,0 +1,24 @@
1
+ import { defineModule } from '@coffer-org/sdk/module';
2
+ import { field } from '@coffer-org/sdk/fields';
3
+ export default defineModule({
4
+ module: 'health_visit',
5
+ vault: 'health',
6
+ label: 'health.health_visit.label',
7
+ icon: 'lucide:stethoscope',
8
+ views: {
9
+ table: ['date', 'person', 'specialty'],
10
+ },
11
+ fields: [
12
+ field.title({ key: 'name', label: 'core.fields.name' }),
13
+ field.date({ key: 'date', label: 'health.health_visit.fields.date' }),
14
+ field.string({ key: 'specialist', label: 'health.health_visit.fields.specialist', config: { max: 200 } }),
15
+ field.string({ key: 'specialty', label: 'health.health_visit.fields.specialty', config: { max: 100 } }),
16
+ field.string({ key: 'clinic', label: 'health.health_visit.fields.clinic', config: { max: 200 } }),
17
+ field.relation({ key: 'person', label: 'health.health_visit.fields.person', vault: 'people', module: 'person' }),
18
+ field.text({ key: 'reason', label: 'health.health_visit.fields.reason', max: 1000 }),
19
+ field.text({ key: 'result', label: 'health.health_visit.fields.result', max: 2000 }),
20
+ field.text({ key: 'next_step', label: 'health.health_visit.fields.next_step', max: 1000 }),
21
+ field.image({ key: 'attachments', label: 'health.health_visit.fields.attachments', multiple: true }),
22
+ ],
23
+ });
24
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/health_visit/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAE/C,eAAe,YAAY,CAAC;IAC1B,MAAM,EAAE,cAAc;IACtB,KAAK,EAAE,QAAQ;IACf,KAAK,EAAE,2BAA2B;IAClC,IAAI,EAAE,oBAAoB;IAC1B,KAAK,EAAE;QACL,KAAK,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,WAAW,CAAC;KACvC;IACD,MAAM,EAAE;QACN,KAAK,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,kBAAkB,EAAE,CAAC;QACvD,KAAK,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,iCAAiC,EAAE,CAAC;QACrE,KAAK,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,uCAAuC,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC;QACzG,KAAK,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,WAAW,EAAE,KAAK,EAAE,sCAAsC,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC;QACvG,KAAK,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,mCAAmC,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC;QACjG,KAAK,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,mCAAmC,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;QAChH,KAAK,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,mCAAmC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;QACpF,KAAK,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,mCAAmC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;QACpF,KAAK,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,WAAW,EAAE,KAAK,EAAE,sCAAsC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;QAC1F,KAAK,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,aAAa,EAAE,KAAK,EAAE,wCAAwC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;KACrG;CACF,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const _default: import("@coffer-org/sdk/plugin").PluginManifest;
2
+ export default _default;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAUA,wBAuBG"}
package/dist/index.js ADDED
@@ -0,0 +1,34 @@
1
+ import { defineVault } from '@coffer-org/sdk/vault';
2
+ import { definePlugin } from '@coffer-org/sdk/plugin';
3
+ import { field } from '@coffer-org/sdk/fields';
4
+ import { defineSettings } from '@coffer-org/sdk/settings';
5
+ import medicine from './medicine/index.js';
6
+ import health_visit from './health_visit/index.js';
7
+ import health_test from './health_test/index.js';
8
+ import personBody from './person_body/index.js';
9
+ import { DAY_PERIOD_OPTIONS } from './day-periods.js';
10
+ export default definePlugin({
11
+ id: 'health',
12
+ version: '1.0.0',
13
+ dependsOn: ['people'],
14
+ // Періоди дня для прийому ліків (раніше в plugin-core).
15
+ optionLists: [{ name: 'day-periods', options: [...DAY_PERIOD_OPTIONS] }],
16
+ vaults: [
17
+ {
18
+ meta: defineVault({ id: 'health', label: 'health.vault.label', icon: 'lucide:hospital' }),
19
+ modules: [medicine, health_visit, health_test],
20
+ },
21
+ ],
22
+ extends_: [personBody],
23
+ settings: defineSettings({
24
+ label: 'health.settings.label',
25
+ fields: [
26
+ field.boolean({ key: 'use_nextcloud', label: 'health.settings.use_nextcloud' }),
27
+ field.string({ key: 'caldav_calendar', label: 'health.settings.caldav_calendar' }),
28
+ field.string({ key: 'caldav_url', label: 'health.settings.caldav_url' }),
29
+ field.string({ key: 'caldav_username', label: 'health.settings.caldav_username' }),
30
+ field.password({ key: 'caldav_password', label: 'health.settings.caldav_password' }),
31
+ ],
32
+ }),
33
+ });
34
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,QAAQ,MAAM,qBAAqB,CAAC;AAC3C,OAAO,YAAY,MAAM,yBAAyB,CAAC;AACnD,OAAO,WAAW,MAAM,wBAAwB,CAAC;AACjD,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD,eAAe,YAAY,CAAC;IAC1B,EAAE,EAAE,QAAQ;IACZ,OAAO,EAAE,OAAO;IAChB,SAAS,EAAE,CAAC,QAAQ,CAAC;IACrB,wDAAwD;IACxD,WAAW,EAAE,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,CAAC,GAAG,kBAAkB,CAAC,EAAE,CAAC;IACxE,MAAM,EAAE;QACN;YACE,IAAI,EAAE,WAAW,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,oBAAoB,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC;YACzF,OAAO,EAAE,CAAC,QAAQ,EAAE,YAAY,EAAE,WAAW,CAAC;SAC/C;KACF;IACD,QAAQ,EAAE,CAAC,UAAU,CAAC;IACtB,QAAQ,EAAE,cAAc,CAAC;QACvB,KAAK,EAAE,uBAAuB;QAC9B,MAAM,EAAE;YACN,KAAK,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,eAAe,EAAE,KAAK,EAAE,+BAA+B,EAAE,CAAC;YAC/E,KAAK,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,iBAAiB,EAAE,KAAK,EAAE,iCAAiC,EAAE,CAAC;YAClF,KAAK,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,4BAA4B,EAAE,CAAC;YACxE,KAAK,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,iBAAiB,EAAE,KAAK,EAAE,iCAAiC,EAAE,CAAC;YAClF,KAAK,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,iBAAiB,EAAE,KAAK,EAAE,iCAAiC,EAAE,CAAC;SACrF;KACF,CAAC;CACH,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const _default: import("@coffer-org/sdk/module").ModuleDef;
2
+ export default _default;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/medicine/index.ts"],"names":[],"mappings":";AAGA,wBAgCG"}
@@ -0,0 +1,36 @@
1
+ import { defineModule } from '@coffer-org/sdk/module';
2
+ import { field } from '@coffer-org/sdk/fields';
3
+ export default defineModule({
4
+ module: 'medicine',
5
+ vault: 'health',
6
+ label: 'health.medicine.label',
7
+ icon: 'lucide:pill',
8
+ views: {
9
+ table: ['type', 'dose', 'frequency'],
10
+ },
11
+ fields: [
12
+ field.title({ key: 'name', label: 'core.fields.name' }),
13
+ field.image({ key: 'logo', label: 'health.medicine.fields.logo' }),
14
+ field.text({ key: 'description', label: 'health.medicine.fields.description', max: 1000 }),
15
+ field.string({ key: 'dose', label: 'health.medicine.fields.dose', config: { max: 100 } }),
16
+ field.string({ key: 'frequency', label: 'health.medicine.fields.frequency', config: { max: 100 } }),
17
+ field.select({
18
+ key: 'day_period',
19
+ label: 'health.medicine.fields.day_period',
20
+ options: 'day-periods',
21
+ multiple: true,
22
+ }),
23
+ field.period({ key: 'intakePeriods', label: 'health.medicine.fields.intakePeriods', multiple: true }),
24
+ field.select({
25
+ key: 'type',
26
+ label: 'core.fields.type',
27
+ required: true,
28
+ options: [
29
+ { value: 'vitamin', title: 'health.medicine.options.type.vitamin' },
30
+ { value: 'medication', title: 'health.medicine.options.type.medication' },
31
+ ],
32
+ }),
33
+ field.tags({ key: 'tags', label: 'health.medicine.fields.tags' }),
34
+ ],
35
+ });
36
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/medicine/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAE/C,eAAe,YAAY,CAAC;IAC1B,MAAM,EAAE,UAAU;IAClB,KAAK,EAAE,QAAQ;IACf,KAAK,EAAE,uBAAuB;IAC9B,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE;QACL,KAAK,EAAE,CAAC,MAAM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BAA6B,EAAE,CAAC;KAClE;CACF,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const _default: import("@coffer-org/sdk/extend").ExtendDef;
2
+ export default _default;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/person_body/index.ts"],"names":[],"mappings":";AAOA,wBAUG"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Extend: антропометрія людини.
3
+ * Прив'язується до people/person.
4
+ */
5
+ import { defineExtend } from '@coffer-org/sdk/extend';
6
+ import { field } from '@coffer-org/sdk/fields';
7
+ export default defineExtend({
8
+ id: 'person_body',
9
+ label: 'health.person_body.label',
10
+ icon: 'lucide:ruler',
11
+ attachTo: [{ vault: 'people', module: 'person' }],
12
+ claude: `Антропометрія людини. weightKg — вага в кг. heightCm — зріст у см.`,
13
+ fields: [
14
+ field.real({ key: 'weightKg', label: 'health.person_body.fields.weightKg', config: { min: 1, max: 500 } }),
15
+ field.int({ key: 'heightCm', label: 'health.person_body.fields.heightCm', config: { min: 50, max: 250 } }),
16
+ ],
17
+ });
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/person_body/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAE/C,eAAe,YAAY,CAAC;IAC1B,EAAE,EAAE,aAAa;IACjB,KAAK,EAAE,0BAA0B;IACjC,IAAI,EAAE,cAAc;IACpB,QAAQ,EAAE,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;IACjD,MAAM,EAAE,oEAAoE;IAC5E,MAAM,EAAE;QACN,KAAK,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,oCAAoC,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC;QAC1G,KAAK,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,oCAAoC,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC;KAC3G;CACF,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { PluginHooks } from '@coffer-org/server/plugin-hooks';
2
+ export { startSync, stopSync } from './sync.js';
3
+ export type { MedicineRecord } from './sync.js';
4
+ export declare const serverHooks: PluginHooks;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/runtime/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAEnE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAChD,YAAY,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEhD,eAAO,MAAM,WAAW,EAAE,WAOzB,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { startSync, stopSync } from './sync.js';
2
+ export { startSync, stopSync } from './sync.js';
3
+ export const serverHooks = {
4
+ init: () => {
5
+ void startSync().catch((e) => console.warn(`[health-sync] не стартував: ${e.message}`));
6
+ },
7
+ teardown: () => {
8
+ stopSync();
9
+ },
10
+ };
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/runtime/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAGhD,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAGhD,MAAM,CAAC,MAAM,WAAW,GAAgB;IACtC,IAAI,EAAE,GAAG,EAAE;QACT,KAAK,SAAS,EAAE,CAAC,KAAK,CAAC,CAAC,CAAU,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,+BAAgC,CAAW,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;IAC9G,CAAC;IACD,QAAQ,EAAE,GAAG,EAAE;QACb,QAAQ,EAAE,CAAC;IACb,CAAC;CACF,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { type IcsFile } from '@coffer-org/dav';
2
+ export interface MedicineRecord {
3
+ id: string;
4
+ name: string | null;
5
+ type: string | null;
6
+ dosageAmount: string | null;
7
+ intakePeriods: string | null;
8
+ }
9
+ export declare function buildMedEvents(records: MedicineRecord[]): IcsFile[];
10
+ export declare function startSync(): Promise<void>;
11
+ export declare function stopSync(): void;
12
+ //# sourceMappingURL=sync.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../src/runtime/sync.ts"],"names":[],"mappings":"AAEA,OAAO,EAML,KAAK,OAAO,EACb,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAwCD,wBAAgB,cAAc,CAAC,OAAO,EAAE,cAAc,EAAE,GAAG,OAAO,EAAE,CA8BnE;AAuCD,wBAAsB,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAS/C;AAED,wBAAgB,QAAQ,IAAI,IAAI,CAK/B"}
@@ -0,0 +1,116 @@
1
+ import { getEm } from '@coffer-org/server/db';
2
+ import { getPluginSettings } from '@coffer-org/server/plugin-runtime';
3
+ import { resolveDavSettings, WebDavClient, CalDavCollection, buildVEvent, buildRRule, } from '@coffer-org/dav';
4
+ const BYDAY_MAP = ['MO', 'TU', 'WE', 'TH', 'FR', 'SA', 'SU'];
5
+ const HORIZON_DAYS = 90;
6
+ function parseActiveDays(dosageAmount) {
7
+ if (!dosageAmount)
8
+ return null;
9
+ try {
10
+ const arr = JSON.parse(dosageAmount);
11
+ const days = arr.flatMap((v, i) => (v > 0 ? [BYDAY_MAP[i]] : []));
12
+ return days.length > 0 ? days : null;
13
+ }
14
+ catch {
15
+ return null;
16
+ }
17
+ }
18
+ function parsePeriods(json) {
19
+ if (!json)
20
+ return [];
21
+ try {
22
+ return JSON.parse(json);
23
+ }
24
+ catch {
25
+ return [];
26
+ }
27
+ }
28
+ function addDays(isoDate, n) {
29
+ const d = new Date(isoDate);
30
+ d.setUTCDate(d.getUTCDate() + n);
31
+ return d.toISOString().slice(0, 10);
32
+ }
33
+ function isoToIcs(isoDate) {
34
+ return isoDate.replace(/-/g, '');
35
+ }
36
+ export function buildMedEvents(records) {
37
+ const today = new Date().toISOString().slice(0, 10);
38
+ const files = [];
39
+ for (const r of records) {
40
+ let periods = parsePeriods(r.intakePeriods);
41
+ if (periods.length === 0) {
42
+ if (r.type === 'vitamin')
43
+ continue;
44
+ periods = [{ from: today, until: addDays(today, HORIZON_DAYS) }];
45
+ }
46
+ const activeDays = parseActiveDays(r.dosageAmount);
47
+ if (!activeDays)
48
+ continue; // no active weekdays (all-zero/null/invalid) → nothing to schedule
49
+ const summary = r.name ?? r.id;
50
+ periods.forEach((p, pi) => {
51
+ const uid = `medication-${r.id}-${pi}`;
52
+ const startDate = isoToIcs(p.from);
53
+ const start = `${startDate}T090000`;
54
+ const end = `${startDate}T093000`;
55
+ const rrule = buildRRule({
56
+ freq: 'WEEKLY',
57
+ byDay: activeDays,
58
+ until: `${isoToIcs(p.until)}T235959Z`,
59
+ });
60
+ const content = buildVEvent({ uid, summary, start, end, rrule });
61
+ files.push({ name: `${uid}.ics`, content });
62
+ });
63
+ }
64
+ return files;
65
+ }
66
+ async function runOnce() {
67
+ const fork = getEm().fork();
68
+ const rows = (await fork.find('health__medicine', {}));
69
+ const icsFiles = buildMedEvents(rows);
70
+ const pluginSettings = await getPluginSettings('health');
71
+ const calendar = pluginSettings['caldav_calendar'];
72
+ if (!calendar)
73
+ throw new Error('[health-sync] caldav_calendar is required but not set');
74
+ let principal;
75
+ let password;
76
+ if (pluginSettings['use_nextcloud']) {
77
+ const nc = await getPluginSettings('nextcloud');
78
+ if (!nc['nextcloud_url'])
79
+ throw new Error('[health-sync] nextcloud_url not configured');
80
+ principal = String(nc['login'] ?? '');
81
+ password = String(nc['password'] ?? '');
82
+ }
83
+ else {
84
+ principal = pluginSettings['caldav_username'] ?? '';
85
+ password = pluginSettings['caldav_password'] ?? '';
86
+ }
87
+ const settings = resolveDavSettings(calendar, { principal, password });
88
+ const ops = new WebDavClient({
89
+ collectionUrl: settings.collectionUrl,
90
+ username: settings.principal,
91
+ password: settings.password,
92
+ });
93
+ const coll = new CalDavCollection(ops);
94
+ const result = await coll.syncEvents('medication-', icsFiles);
95
+ console.log(`[health-sync] synced: ${result.written.length} written, ${result.deleted.length} deleted`);
96
+ }
97
+ const INTERVAL_MS = Number(process.env['HEALTH_SYNC_INTERVAL_MS'] ?? 0) || 6 * 60 * 60 * 1000;
98
+ let timer;
99
+ export async function startSync() {
100
+ try {
101
+ await runOnce();
102
+ }
103
+ catch (e) {
104
+ console.error(`[health-sync] initial sync failed: ${e.message}`);
105
+ }
106
+ timer = setInterval(() => {
107
+ void runOnce().catch((e) => console.error(`[health-sync] sync error: ${e.message}`));
108
+ }, INTERVAL_MS);
109
+ }
110
+ export function stopSync() {
111
+ if (timer !== undefined) {
112
+ clearInterval(timer);
113
+ timer = undefined;
114
+ }
115
+ }
116
+ //# sourceMappingURL=sync.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync.js","sourceRoot":"","sources":["../../src/runtime/sync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAu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ACD,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE;QACvB,KAAK,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC,CAAU,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,6BAA8B,CAAW,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;IAC3G,CAAC,EAAE,WAAW,CAAC,CAAC;AAClB,CAAC;AAED,MAAM,UAAU,QAAQ;IACtB,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,aAAa,CAAC,KAAK,CAAC,CAAC;QACrB,KAAK,GAAG,SAAS,CAAC;IACpB,CAAC;AACH,CAAC"}
package/package.json ADDED
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "@coffer-org/plugin-health",
3
+ "version": "1.1.0",
4
+ "type": "module",
5
+ "files": [
6
+ "dist"
7
+ ],
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "default": "./dist/index.js"
12
+ },
13
+ "./runtime": {
14
+ "types": "./dist/runtime/index.d.ts",
15
+ "default": "./dist/runtime/index.js"
16
+ }
17
+ },
18
+ "scripts": {
19
+ "build": "tsc -b tsconfig.build.json",
20
+ "prepack": "npm run build && node ../../scripts/swap-exports.mjs dist",
21
+ "postpack": "node ../../scripts/swap-exports.mjs src",
22
+ "test": "node --import tsx/esm --test 'src/runtime/*.test.ts'"
23
+ },
24
+ "dependencies": {
25
+ "@coffer-org/sdk": "^1.1.0",
26
+ "@coffer-org/server": "^1.1.0",
27
+ "@coffer-org/dav": "^1.1.0"
28
+ }
29
+ }