@bahmni/clinical-app 0.0.1-dev.463 → 0.0.1-dev.464
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ConsultationPage-CF9CchqI.js → ConsultationPage-C0EqMqyw.js} +1927 -1908
- package/dist/{DocumentsTable-P8G9FIvH-CASRvQPB.js → DocumentsTable-P8G9FIvH-5KSTR0gc.js} +1 -1
- package/dist/{FormsTable-DXuwmAMk-nIvomkJX.js → FormsTable-DXuwmAMk-BI_ad9fg.js} +1 -1
- package/dist/{LNWAZHJI-DY69ypnX.js → LNWAZHJI-B252ZBRh.js} +2 -2
- package/dist/{MWZ6AO7Z-DUm3Vj4c.js → MWZ6AO7Z-DyVJ3NHy.js} +2 -2
- package/dist/{Observations-CxxRVjYb-c2wjiOAw.js → Observations-CxxRVjYb-pedPZd7N.js} +1 -1
- package/dist/{YPM2AS64-e-J10QfI.js → YPM2AS64-CU99DV8p.js} +1 -1
- package/dist/components/forms/conditionsAndDiagnoses/SelectedConditionItem.d.ts +2 -1
- package/dist/components/forms/conditionsAndDiagnoses/SelectedConditionItem.d.ts.map +1 -1
- package/dist/constants/conditions.d.ts +6 -4
- package/dist/constants/conditions.d.ts.map +1 -1
- package/dist/{hook-C4RJtdSk.js → hook-CdlIt2Fb.js} +1 -1
- package/dist/{index-BueEljGp.js → index-BV5up1s-.js} +3 -3
- package/dist/{index-Ck_WcD0o.js → index-Be5wgoP9.js} +1 -1
- package/dist/{index-jAE3JXAv.js → index-CtWcMAiX.js} +28 -28
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/locales/locale_en.json +2 -5
- package/dist/locales/locale_es.json +2 -5
- package/dist/services/encounterBundleService.d.ts.map +1 -1
- package/dist/stores/conditionsAndDiagnosesStore.d.ts +5 -4
- package/dist/stores/conditionsAndDiagnosesStore.d.ts.map +1 -1
- package/dist/utils/conditionDuration.d.ts +28 -0
- package/dist/utils/conditionDuration.d.ts.map +1 -0
- package/package.json +1 -1
- package/dist/models/condition.d.ts +0 -13
- package/dist/models/condition.d.ts.map +0 -1
package/dist/index.js
CHANGED
|
@@ -111,12 +111,9 @@
|
|
|
111
111
|
"CONDITIONS_ADD_AS_CONDITION": "Add as Condition",
|
|
112
112
|
"CONDITIONS_AND_DIAGNOSES_FORM_TITLE": "Conditions and Diagnoses",
|
|
113
113
|
"CONDITIONS_DURATION_DAYS": "Days",
|
|
114
|
+
"CONDITIONS_DURATION_LEGEND": "Duration since onset",
|
|
114
115
|
"CONDITIONS_DURATION_MONTHS": "Months",
|
|
115
|
-
"
|
|
116
|
-
"CONDITIONS_DURATION_UNIT_REQUIRED": "Duration unit is required",
|
|
117
|
-
"CONDITIONS_DURATION_VALUE_LABEL": "Duration Value",
|
|
118
|
-
"CONDITIONS_DURATION_VALUE_PLACEHOLDER": "Enter duration",
|
|
119
|
-
"CONDITIONS_DURATION_VALUE_REQUIRED": "Duration value is required",
|
|
116
|
+
"CONDITIONS_DURATION_REQUIRED": "Enter duration in years, months or days",
|
|
120
117
|
"CONDITIONS_DURATION_YEARS": "Years",
|
|
121
118
|
"CONDITIONS_SECTION_TITLE": "Added Conditions",
|
|
122
119
|
"CONDITION_LIST_ACTIVE": "Active",
|
|
@@ -120,12 +120,9 @@
|
|
|
120
120
|
"CONDITIONS_ADD_AS_CONDITION": "Agregar como Condición",
|
|
121
121
|
"CONDITIONS_AND_DIAGNOSES_FORM_TITLE": "Condiciones y Diagnósticos",
|
|
122
122
|
"CONDITIONS_DURATION_DAYS": "Días",
|
|
123
|
+
"CONDITIONS_DURATION_LEGEND": "Duración desde el inicio",
|
|
123
124
|
"CONDITIONS_DURATION_MONTHS": "Meses",
|
|
124
|
-
"
|
|
125
|
-
"CONDITIONS_DURATION_UNIT_REQUIRED": "Se requiere la unidad de duración",
|
|
126
|
-
"CONDITIONS_DURATION_VALUE_LABEL": "Valor de Duración",
|
|
127
|
-
"CONDITIONS_DURATION_VALUE_PLACEHOLDER": "Ingrese la duración",
|
|
128
|
-
"CONDITIONS_DURATION_VALUE_REQUIRED": "Se requiere el valor de duración",
|
|
125
|
+
"CONDITIONS_DURATION_REQUIRED": "Ingrese la duración en años, meses o días",
|
|
129
126
|
"CONDITIONS_DURATION_YEARS": "Años",
|
|
130
127
|
"CONDITIONS_SECTION_TITLE": "Condiciones Agregadas",
|
|
131
128
|
"CONDITION_LIST_ACTIVE": "Activo",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encounterBundleService.d.ts","sourceRoot":"","sources":["../../src/services/encounterBundleService.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,mBAAmB,
|
|
1
|
+
{"version":3,"file":"encounterBundleService.d.ts","sourceRoot":"","sources":["../../src/services/encounterBundleService.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EAKnB,gBAAgB,EAChB,KAAK,eAAe,EACrB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAmB,SAAS,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAG7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAkBpE,UAAU,kCAAkC;IAC1C,iBAAiB,EAAE,iBAAiB,EAAE,CAAC;IACvC,gBAAgB,EAAE,SAAS,CAAC;IAC5B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,UAAU,kCAAkC;IAC1C,iBAAiB,EAAE,mBAAmB,EAAE,CAAC;IACzC,gBAAgB,EAAE,SAAS,CAAC;IAC5B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,IAAI,CAAC;CACxB;AAED,UAAU,uCAAuC;IAC/C,uBAAuB,EAAE,GAAG,CAAC,MAAM,EAAE,wBAAwB,EAAE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AACH,wBAAgB,8BAA8B,CAAC,EAC7C,oBAAoB,EACpB,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,GACjB,EAAE,oCAAoC,GAAG,WAAW,EAAE,CAwCtD;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CACxC,eAAe,EAAE,SAAS,GAAG,IAAI,EACjC,iBAAiB,EAAE,SAAS,GAC3B,WAAW,CAoBb;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,eAAe,EAAE,SAAS,GAAG,IAAI,EACjC,oBAAoB,EAAE,MAAM,GAC3B,MAAM,CAIR;AAED,wBAAsB,mBAAmB,CAAC,CAAC,EACzC,eAAe,EAAE,eAAe,GAC/B,OAAO,CAAC,CAAC,CAAC,CAEZ"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ConceptSearch, ConditionInputEntry, DiagnosisInputEntry } from '@bahmni/services';
|
|
2
2
|
import { Coding } from 'fhir/r4';
|
|
3
|
+
import { ConditionDurationField } from '../constants/conditions';
|
|
3
4
|
/**
|
|
4
5
|
* Interface defining the state and actions for managing conditions and diagnoses
|
|
5
6
|
*/
|
|
@@ -39,12 +40,12 @@ export interface ConditionsAndDiagnosesState {
|
|
|
39
40
|
*/
|
|
40
41
|
removeCondition: (conditionId: string) => void;
|
|
41
42
|
/**
|
|
42
|
-
* Updates
|
|
43
|
+
* Updates one duration field (years, months or days) for a specific condition
|
|
43
44
|
* @param conditionId - The ID of the condition to update
|
|
44
|
-
* @param
|
|
45
|
-
* @param
|
|
45
|
+
* @param field - The duration field to update
|
|
46
|
+
* @param value - The non-negative integer value, or null to clear it
|
|
46
47
|
*/
|
|
47
|
-
updateConditionDuration: (conditionId: string,
|
|
48
|
+
updateConditionDuration: (conditionId: string, field: ConditionDurationField, value: number | null) => void;
|
|
48
49
|
/**
|
|
49
50
|
* Resets the store to its initial state
|
|
50
51
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conditionsAndDiagnosesStore.d.ts","sourceRoot":"","sources":["../../src/stores/conditionsAndDiagnosesStore.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACzB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"conditionsAndDiagnosesStore.d.ts","sourceRoot":"","sources":["../../src/stores/conditionsAndDiagnosesStore.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACzB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEjC,OAAO,EAGL,KAAK,sBAAsB,EAC5B,MAAM,yBAAyB,CAAC;AAMjC;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,iBAAiB,EAAE,mBAAmB,EAAE,CAAC;IACzC,kBAAkB,EAAE,mBAAmB,EAAE,CAAC;IAE1C;;;OAGG;IACH,YAAY,EAAE,CAAC,SAAS,EAAE,aAAa,KAAK,IAAI,CAAC;IAEjD;;;OAGG;IACH,eAAe,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IAE/C;;;;OAIG;IACH,eAAe,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAEzE;;;OAGG;IACH,QAAQ,EAAE,MAAM,OAAO,CAAC;IAExB;;;;OAIG;IACH,eAAe,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC;IAElD;;;OAGG;IACH,eAAe,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IAE/C;;;;;OAKG;IACH,uBAAuB,EAAE,CACvB,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,sBAAsB,EAC7B,KAAK,EAAE,MAAM,GAAG,IAAI,KACjB,IAAI,CAAC;IAEV;;OAEG;IACH,KAAK,EAAE,MAAM,IAAI,CAAC;IAElB;;;OAGG;IACH,QAAQ,EAAE,MAAM,2BAA2B,CAAC;CAC7C;AAkBD,eAAO,MAAM,8BAA8B,0FAsNtC,CAAC;AAEN,eAAe,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ConditionInputEntry } from '@bahmni/services';
|
|
2
|
+
import { ConditionDurationField } from '../constants/conditions';
|
|
3
|
+
type ConditionDuration = Pick<ConditionInputEntry, 'durationYears' | 'durationMonths' | 'durationDays'>;
|
|
4
|
+
/**
|
|
5
|
+
* Checks whether a value can be stored in a condition duration field
|
|
6
|
+
* (null to clear, or a non-negative integer within the field's limit)
|
|
7
|
+
*/
|
|
8
|
+
export declare const isValidConditionDurationValue: (field: ConditionDurationField, value: number | null) => boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Parses raw text typed in a condition duration input.
|
|
11
|
+
* @returns null for empty input, the parsed number for valid input,
|
|
12
|
+
* or undefined when the input must be rejected
|
|
13
|
+
*/
|
|
14
|
+
export declare const parseConditionDurationInput: (field: ConditionDurationField, rawValue: string) => number | null | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* A condition has a duration when at least one of years, months or days is
|
|
17
|
+
* greater than zero. Empty fields are treated as zero.
|
|
18
|
+
*/
|
|
19
|
+
export declare const hasConditionDuration: (condition: ConditionDuration) => boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Calculates the condition onset date by subtracting the duration from the
|
|
22
|
+
* consultation date, applied in order — years, then months, then days, each
|
|
23
|
+
* step clamping to month end (per the AC's "applied in that order" wording).
|
|
24
|
+
* @returns The onset date, or undefined when the condition has no duration
|
|
25
|
+
*/
|
|
26
|
+
export declare const calculateConditionOnsetDate: (consultationDate: Date, condition: ConditionDuration) => Date | undefined;
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=conditionDuration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conditionDuration.d.ts","sourceRoot":"","sources":["../../src/utils/conditionDuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,yBAAyB,CAAC;AAEjC,KAAK,iBAAiB,GAAG,IAAI,CAC3B,mBAAmB,EACnB,eAAe,GAAG,gBAAgB,GAAG,cAAc,CACpD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,6BAA6B,GACxC,OAAO,sBAAsB,EAC7B,OAAO,MAAM,GAAG,IAAI,KACnB,OAK2C,CAAC;AAE/C;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,GACtC,OAAO,sBAAsB,EAC7B,UAAU,MAAM,KACf,MAAM,GAAG,IAAI,GAAG,SAMlB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,GAAI,WAAW,iBAAiB,KAAG,OAIjE,CAAC;AAEJ;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,GACtC,kBAAkB,IAAI,EACtB,WAAW,iBAAiB,KAC3B,IAAI,GAAG,SAcT,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export interface ConditionInputEntry {
|
|
2
|
-
id: string;
|
|
3
|
-
display: string;
|
|
4
|
-
durationValue: number | null;
|
|
5
|
-
durationUnit: 'days' | 'months' | 'years' | null;
|
|
6
|
-
errors: ConditionErrors;
|
|
7
|
-
hasBeenValidated: boolean;
|
|
8
|
-
}
|
|
9
|
-
export interface ConditionErrors {
|
|
10
|
-
durationValue?: string;
|
|
11
|
-
durationUnit?: string;
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=condition.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"condition.d.ts","sourceRoot":"","sources":["../../src/models/condition.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,YAAY,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,IAAI,CAAC;IACjD,MAAM,EAAE,eAAe,CAAC;IACxB,gBAAgB,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,eAAe;IAC9B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB"}
|