@bahmni/registration-app 0.0.1-dev.50 → 0.0.1-dev.52
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/App.d.ts.map +1 -1
- package/dist/{LNWAZHJI-Lqhnsp0X.js → LNWAZHJI-DZ--FjwX.js} +2 -2
- package/dist/{MWZ6AO7Z-CIIFb2DP.js → MWZ6AO7Z-GD1jfC3S.js} +2 -2
- package/dist/{YPM2AS64-BcGZU836.js → YPM2AS64-DWg0bVJV.js} +1 -1
- package/dist/components/common/PersonAttributeInput.d.ts +26 -0
- package/dist/components/common/PersonAttributeInput.d.ts.map +1 -0
- package/dist/components/forms/additionalInfo/AdditionalInfo.d.ts.map +1 -1
- package/dist/components/forms/additionalInfo/additionalInfoHelpers.d.ts +11 -0
- package/dist/components/forms/additionalInfo/additionalInfoHelpers.d.ts.map +1 -0
- package/dist/components/forms/additionalInfo/additionalInfoValidation.d.ts +20 -0
- package/dist/components/forms/additionalInfo/additionalInfoValidation.d.ts.map +1 -0
- package/dist/components/forms/contactInfo/ContactInfo.d.ts +1 -1
- package/dist/components/forms/contactInfo/ContactInfo.d.ts.map +1 -1
- package/dist/components/forms/contactInfo/contactInfoHelpers.d.ts +11 -0
- package/dist/components/forms/contactInfo/contactInfoHelpers.d.ts.map +1 -0
- package/dist/components/forms/contactInfo/contactInfoValidation.d.ts +21 -0
- package/dist/components/forms/contactInfo/contactInfoValidation.d.ts.map +1 -0
- package/dist/components/forms/profile/Profile.d.ts.map +1 -1
- package/dist/components/forms/profile/dateAgeUtils.d.ts +2 -0
- package/dist/components/forms/profile/dateAgeUtils.d.ts.map +1 -1
- package/dist/contexts/PersonAttributesContext.d.ts +16 -0
- package/dist/contexts/PersonAttributesContext.d.ts.map +1 -0
- package/dist/hooks/useCreatePatient.d.ts.map +1 -1
- package/dist/hooks/usePersonAttributeFields.d.ts +35 -0
- package/dist/hooks/usePersonAttributeFields.d.ts.map +1 -0
- package/dist/hooks/usePersonAttributes.d.ts +8 -0
- package/dist/hooks/usePersonAttributes.d.ts.map +1 -0
- package/dist/hooks/useUpdatePatient.d.ts.map +1 -1
- package/dist/{index-DM5KiMy1.js → index-CAYZnFAk.js} +33246 -32849
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/locales/locale_en.json +7 -0
- package/dist/locales/locale_es.json +6 -0
- package/dist/models/patient.d.ts +2 -2
- package/dist/models/patient.d.ts.map +1 -1
- package/dist/models/validation.d.ts +2 -0
- package/dist/models/validation.d.ts.map +1 -1
- package/dist/pages/createPatientPage/CreatePatient.d.ts.map +1 -1
- package/dist/providers/PersonAttributesProvider.d.ts +9 -0
- package/dist/providers/PersonAttributesProvider.d.ts.map +1 -0
- package/dist/providers/RegistrationConfigProvider.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/App.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../src/App.tsx"],"names":[],"mappings":"AASA,OAAO,KAA8B,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../src/App.tsx"],"names":[],"mappings":"AASA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAWnD,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAgD5B,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-
|
|
2
|
-
import { g as d, c as f, a as e } from "./index-
|
|
1
|
+
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-DWg0bVJV.js";
|
|
2
|
+
import { g as d, c as f, a as e } from "./index-CAYZnFAk.js";
|
|
3
3
|
var p = (a) => {
|
|
4
4
|
const [r, t] = c({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as s, T as c, P as u, a as i, b as m, C as P, Q as d } from "./YPM2AS64-
|
|
2
|
-
import { g as v, c as C, a as e } from "./index-
|
|
1
|
+
import { c as s, T as c, P as u, a as i, b as m, C as P, Q as d } from "./YPM2AS64-DWg0bVJV.js";
|
|
2
|
+
import { g as v, c as C, a as e } from "./index-CAYZnFAk.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var ws = Object.defineProperty;
|
|
2
2
|
var xs = (e, t, n) => t in e ? ws(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var _e = (e, t, n) => xs(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
-
import { b as $e, d as K, o as xt, e as H, c as L, a as v, P as zo, m as ye, S as z, t as q, i as k, f as G, h as T, j as $s, k as sr, u as Ce, l as V, s as Vn, n as jn, p as ft, q as A, r as Cs, v as cn, w as He, x as Ss, y as _t, z as Kt, A as ks, B as Es, C as Cn, F as Ds, D as Hr, E as Nt, $ as Ko, G as Ms, H as As, I as W, J as Ur, K as Ts, L as Fs, M as lr, N as Is, O as Os, Q as Kn, R as Ls, T as Ps, U as oe, V as qs, W as _s } from "./index-
|
|
4
|
+
import { b as $e, d as K, o as xt, e as H, c as L, a as v, P as zo, m as ye, S as z, t as q, i as k, f as G, h as T, j as $s, k as sr, u as Ce, l as V, s as Vn, n as jn, p as ft, q as A, r as Cs, v as cn, w as He, x as Ss, y as _t, z as Kt, A as ks, B as Es, C as Cn, F as Ds, D as Hr, E as Nt, $ as Ko, G as Ms, H as As, I as W, J as Ur, K as Ts, L as Fs, M as lr, N as Is, O as Os, Q as Kn, R as Ls, T as Ps, U as oe, V as qs, W as _s } from "./index-CAYZnFAk.js";
|
|
5
5
|
var Rs = (e) => e != null, zs = (e) => e.filter(Rs);
|
|
6
6
|
function Ks(e) {
|
|
7
7
|
return (...t) => {
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { AttributeAnswer } from '../../hooks/usePersonAttributeFields';
|
|
2
|
+
export interface ValidationConfig {
|
|
3
|
+
pattern?: string;
|
|
4
|
+
errorMessage?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface PersonAttributeInputProps {
|
|
7
|
+
uuid: string;
|
|
8
|
+
label: string;
|
|
9
|
+
format: string;
|
|
10
|
+
value: string | number | boolean | undefined;
|
|
11
|
+
answers?: AttributeAnswer[];
|
|
12
|
+
error?: string;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
validation?: ValidationConfig;
|
|
15
|
+
onChange: (value: string | number | boolean) => void;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Dynamic person attribute input component that renders appropriate input
|
|
19
|
+
* based on the attribute format (Boolean, Concept, String, Date, Number, etc.)
|
|
20
|
+
*/
|
|
21
|
+
export declare const PersonAttributeInput: {
|
|
22
|
+
({ uuid, label, format, value, answers, error, placeholder, validation, onChange, }: PersonAttributeInputProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
displayName: string;
|
|
24
|
+
};
|
|
25
|
+
export default PersonAttributeInput;
|
|
26
|
+
//# sourceMappingURL=PersonAttributeInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PersonAttributeInput.d.ts","sourceRoot":"","sources":["../../../src/components/common/PersonAttributeInput.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAGvE,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;IAC7C,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,KAAK,IAAI,CAAC;CACtD;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB;yFAU9B,yBAAyB;;CAyJ3B,CAAC;AAIF,eAAe,oBAAoB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdditionalInfo.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/additionalInfo/AdditionalInfo.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AdditionalInfo.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/additionalInfo/AdditionalInfo.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAgB9D,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,OAAO,CAAC;IACxB,OAAO,EAAE,MAAM,cAAc,CAAC;CAC/B;AAED,UAAU,mBAAmB;IAC3B,WAAW,CAAC,EAAE,cAAc,CAAC;IAC7B,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;CACpC;AAED,eAAO,MAAM,cAAc;2BAA0B,mBAAmB;;CAwGvE,CAAC;AAIF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PersonAttributeField } from '../../../hooks/usePersonAttributeFields';
|
|
2
|
+
import { AdditionalData } from '../../../models/patient';
|
|
3
|
+
export interface ConfigAttribute {
|
|
4
|
+
field: string;
|
|
5
|
+
translationKey: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const getFieldsToShow: (attributeFields: PersonAttributeField[], configAttributes: ConfigAttribute[]) => PersonAttributeField[];
|
|
8
|
+
export declare const createFieldTranslationMap: (configAttributes: ConfigAttribute[]) => Record<string, string>;
|
|
9
|
+
export declare const initializeFormData: (fieldsToShow: PersonAttributeField[], initialData?: AdditionalData) => AdditionalData;
|
|
10
|
+
export declare const getFieldLabel: (fieldName: string, fieldTranslationMap: Record<string, string>, translateFn: (key: string) => string) => string;
|
|
11
|
+
//# sourceMappingURL=additionalInfoHelpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"additionalInfoHelpers.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/additionalInfo/additionalInfoHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AACpF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9D,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,eAAe,GAC1B,iBAAiB,oBAAoB,EAAE,EACvC,kBAAkB,eAAe,EAAE,KAClC,oBAAoB,EAStB,CAAC;AAEF,eAAO,MAAM,yBAAyB,GACpC,kBAAkB,eAAe,EAAE,KAClC,MAAM,CAAC,MAAM,EAAE,MAAM,CAMvB,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAC7B,cAAc,oBAAoB,EAAE,EACpC,cAAc,cAAc,KAC3B,cAMF,CAAC;AAEF,eAAO,MAAM,aAAa,GACxB,WAAW,MAAM,EACjB,qBAAqB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC3C,aAAa,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,KACnC,MAGF,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { PersonAttributeField } from '../../../hooks/usePersonAttributeFields';
|
|
2
|
+
import { AdditionalData } from '../../../models/patient';
|
|
3
|
+
export interface ValidationConfig {
|
|
4
|
+
pattern: string;
|
|
5
|
+
errorMessage: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ValidationResult {
|
|
8
|
+
isValid: boolean;
|
|
9
|
+
errors: Record<string, string>;
|
|
10
|
+
}
|
|
11
|
+
export interface FieldValidationConfig {
|
|
12
|
+
[fieldName: string]: ValidationConfig;
|
|
13
|
+
}
|
|
14
|
+
export declare const getValidationConfig: (fieldName: string, fieldValidationConfig?: FieldValidationConfig) => ValidationConfig | undefined;
|
|
15
|
+
export declare const validateField: (value: string | number | boolean | undefined, validationConfig: ValidationConfig) => {
|
|
16
|
+
isValid: boolean;
|
|
17
|
+
error: string;
|
|
18
|
+
};
|
|
19
|
+
export declare const validateAllFields: (fieldsToShow: PersonAttributeField[], formData: AdditionalData, fieldValidationConfig?: FieldValidationConfig) => ValidationResult;
|
|
20
|
+
//# sourceMappingURL=additionalInfoValidation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"additionalInfoValidation.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/additionalInfo/additionalInfoValidation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AACpF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9D,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAChC;AAED,MAAM,WAAW,qBAAqB;IACpC,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB,CAAC;CACvC;AACD,eAAO,MAAM,mBAAmB,GAC9B,WAAW,MAAM,EACjB,wBAAwB,qBAAqB,KAC5C,gBAAgB,GAAG,SAQrB,CAAC;AAEF,eAAO,MAAM,aAAa,GACxB,OAAO,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,EAC5C,kBAAkB,gBAAgB,KACjC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAYnC,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC5B,cAAc,oBAAoB,EAAE,EACpC,UAAU,cAAc,EACxB,wBAAwB,qBAAqB,KAC5C,gBAsBF,CAAC"}
|
|
@@ -8,7 +8,7 @@ interface ContactInfoProps {
|
|
|
8
8
|
ref?: React.Ref<ContactInfoRef>;
|
|
9
9
|
}
|
|
10
10
|
export declare const ContactInfo: {
|
|
11
|
-
({ initialData, ref }: ContactInfoProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
({ initialData, ref }: ContactInfoProps): import("react/jsx-runtime").JSX.Element | null;
|
|
12
12
|
displayName: string;
|
|
13
13
|
};
|
|
14
14
|
export default ContactInfo;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContactInfo.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/contactInfo/ContactInfo.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ContactInfo.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/contactInfo/ContactInfo.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAc3D,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,OAAO,CAAC;IACxB,OAAO,EAAE,MAAM,WAAW,CAAC;CAC5B;AAED,UAAU,gBAAgB;IACxB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;CACjC;AAED,eAAO,MAAM,WAAW;2BAA0B,gBAAgB;;CA+FjE,CAAC;AAIF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PersonAttributeField } from '../../../hooks/usePersonAttributeFields';
|
|
2
|
+
import { ContactData } from '../../../models/patient';
|
|
3
|
+
export interface ConfigAttribute {
|
|
4
|
+
field: string;
|
|
5
|
+
translationKey: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const getFieldsToShow: (attributeFields: PersonAttributeField[], configAttributes: ConfigAttribute[]) => PersonAttributeField[];
|
|
8
|
+
export declare const createFieldTranslationMap: (configAttributes: ConfigAttribute[]) => Record<string, string>;
|
|
9
|
+
export declare const initializeFormData: (fieldsToShow: PersonAttributeField[], initialData?: ContactData) => ContactData;
|
|
10
|
+
export declare const getFieldLabel: (fieldName: string, fieldTranslationMap: Record<string, string>, translateFn: (key: string) => string) => string;
|
|
11
|
+
//# sourceMappingURL=contactInfoHelpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contactInfoHelpers.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/contactInfo/contactInfoHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AACpF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,eAAe,GAC1B,iBAAiB,oBAAoB,EAAE,EACvC,kBAAkB,eAAe,EAAE,KAClC,oBAAoB,EAStB,CAAC;AAEF,eAAO,MAAM,yBAAyB,GACpC,kBAAkB,eAAe,EAAE,KAClC,MAAM,CAAC,MAAM,EAAE,MAAM,CAMvB,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAC7B,cAAc,oBAAoB,EAAE,EACpC,cAAc,WAAW,KACxB,WAUF,CAAC;AAEF,eAAO,MAAM,aAAa,GACxB,WAAW,MAAM,EACjB,qBAAqB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC3C,aAAa,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,KACnC,MAGF,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { PersonAttributeField } from '../../../hooks/usePersonAttributeFields';
|
|
2
|
+
import { ContactData } from '../../../models/patient';
|
|
3
|
+
export interface ValidationConfig {
|
|
4
|
+
pattern: string;
|
|
5
|
+
errorMessage: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ValidationResult {
|
|
8
|
+
isValid: boolean;
|
|
9
|
+
errors: Record<string, string>;
|
|
10
|
+
}
|
|
11
|
+
export interface FieldValidationConfig {
|
|
12
|
+
[fieldName: string]: ValidationConfig;
|
|
13
|
+
}
|
|
14
|
+
export declare const getValidationConfig: (fieldName: string, fieldValidationConfig?: FieldValidationConfig) => ValidationConfig | undefined;
|
|
15
|
+
export declare const validateField: (value: string | undefined, validationConfig: ValidationConfig) => {
|
|
16
|
+
isValid: boolean;
|
|
17
|
+
error: string;
|
|
18
|
+
};
|
|
19
|
+
export declare const validateAllFields: (fieldsToShow: PersonAttributeField[], formData: ContactData, fieldValidationConfig?: FieldValidationConfig) => ValidationResult;
|
|
20
|
+
export declare const isNumericPhoneValue: (value: string) => boolean;
|
|
21
|
+
//# sourceMappingURL=contactInfoValidation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contactInfoValidation.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/contactInfo/contactInfoValidation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AACpF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAChC;AAED,MAAM,WAAW,qBAAqB;IACpC,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB,CAAC;CACvC;AAED,eAAO,MAAM,mBAAmB,GAC9B,WAAW,MAAM,EACjB,wBAAwB,qBAAqB,KAC5C,gBAAgB,GAAG,SAQrB,CAAC;AAEF,eAAO,MAAM,aAAa,GACxB,OAAO,MAAM,GAAG,SAAS,EACzB,kBAAkB,gBAAgB,KACjC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAYnC,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC5B,cAAc,oBAAoB,EAAE,EACpC,UAAU,WAAW,EACrB,wBAAwB,qBAAqB,KAC5C,gBAsBF,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,OAAO,MAAM,KAAG,OAGnD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Profile.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/profile/Profile.tsx"],"names":[],"mappings":"AAQA,OAAO,
|
|
1
|
+
{"version":3,"file":"Profile.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/profile/Profile.tsx"],"names":[],"mappings":"AAQA,OAAO,EAIL,iBAAiB,EAClB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAe7D,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,aAAa,GAAG;QAC7B,YAAY,EAAE,OAAO,CAAC;QACtB,iBAAiB,EAAE,iBAAiB,CAAC;QACrC,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,QAAQ,EAAE,MAAM,OAAO,CAAC;IACxB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,aAAa,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACvE;AAED,UAAU,YAAY;IACpB,WAAW,CAAC,EAAE,aAAa,CAAC;IAC5B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;CAC7B;AAED,eAAO,MAAM,OAAO;oEAKjB,YAAY;;CA+kBd,CAAC;AAIF,eAAe,OAAO,CAAC"}
|
|
@@ -25,8 +25,10 @@ interface CreateDateAgeHandlersParams<T extends {
|
|
|
25
25
|
setValidationErrors: React.Dispatch<React.SetStateAction<{
|
|
26
26
|
firstName: string;
|
|
27
27
|
lastName: string;
|
|
28
|
+
middleName: string;
|
|
28
29
|
gender: string;
|
|
29
30
|
dateOfBirth: string;
|
|
31
|
+
birthTime: string;
|
|
30
32
|
}>>;
|
|
31
33
|
setAgeErrors: React.Dispatch<React.SetStateAction<AgeErrors>>;
|
|
32
34
|
setFormData: React.Dispatch<React.SetStateAction<T>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dateAgeUtils.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/profile/dateAgeUtils.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,eAAe,EACf,WAAW,EACZ,MAAM,yBAAyB,CAAC;AAEjC,MAAM,WAAW,UAAU;IACzB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,UAAU,eAAe;IACvB,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,iBAAiB,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACxC,qBAAqB,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IACxE,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CAAC,KAAG,eAwLnC,CAAC;AACF,eAAO,MAAM,wBAAwB,GACnC,YAAY,MAAM,EAClB,YAAY,MAAM,GAAG,IAAI,KACxB,MAAM,GAAG,IAYX,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PersonAttributeType } from '@bahmni/services';
|
|
2
|
+
/**
|
|
3
|
+
* Person attributes context interface
|
|
4
|
+
* Provides access to person attributes with loading and error states
|
|
5
|
+
*/
|
|
6
|
+
export interface PersonAttributesContextType {
|
|
7
|
+
personAttributes: PersonAttributeType[];
|
|
8
|
+
setPersonAttributes: (attributes: PersonAttributeType[]) => void;
|
|
9
|
+
isLoading: boolean;
|
|
10
|
+
setIsLoading: (isLoading: boolean) => void;
|
|
11
|
+
error: Error | null;
|
|
12
|
+
setError: (error: Error | null) => void;
|
|
13
|
+
refetch: () => Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
export declare const PersonAttributesContext: import('react').Context<PersonAttributesContextType | undefined>;
|
|
16
|
+
//# sourceMappingURL=PersonAttributesContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PersonAttributesContext.d.ts","sourceRoot":"","sources":["../../src/contexts/PersonAttributesContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAGvD;;;GAGG;AACH,MAAM,WAAW,2BAA2B;IAC1C,gBAAgB,EAAE,mBAAmB,EAAE,CAAC;IACxC,mBAAmB,EAAE,CAAC,UAAU,EAAE,mBAAmB,EAAE,KAAK,IAAI,CAAC;IACjE,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,KAAK,IAAI,CAAC;IACxC,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B;AAED,eAAO,MAAM,uBAAuB,kEAExB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCreatePatient.d.ts","sourceRoot":"","sources":["../../src/hooks/useCreatePatient.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,iBAAiB,EACjB,cAAc,
|
|
1
|
+
{"version":3,"file":"useCreatePatient.d.ts","sourceRoot":"","sources":["../../src/hooks/useCreatePatient.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,iBAAiB,EACjB,cAAc,EAMf,MAAM,kBAAkB,CAAC;AAI1B,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAG/E,UAAU,qBAAqB;IAC7B,OAAO,EAAE,aAAa,GAAG;QACvB,YAAY,EAAE,OAAO,CAAC;QACtB,iBAAiB,EAAE,iBAAiB,CAAC;QACrC,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;IACxB,OAAO,EAAE,WAAW,CAAC;IACrB,UAAU,EAAE,cAAc,CAAC;CAC5B;AAED,eAAO,MAAM,gBAAgB,kJA0C5B,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mapped concept answer for UI rendering
|
|
3
|
+
*/
|
|
4
|
+
export interface AttributeAnswer {
|
|
5
|
+
uuid: string;
|
|
6
|
+
display: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Person attribute field with all metadata for rendering
|
|
10
|
+
*/
|
|
11
|
+
export interface PersonAttributeField {
|
|
12
|
+
uuid: string;
|
|
13
|
+
name: string;
|
|
14
|
+
format: string;
|
|
15
|
+
sortWeight: number;
|
|
16
|
+
description: string | null;
|
|
17
|
+
answers?: AttributeAnswer[];
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Hook to get all person attribute fields sorted by weight
|
|
21
|
+
* No categorization - components filter by config section names
|
|
22
|
+
*/
|
|
23
|
+
export declare const usePersonAttributeFields: () => {
|
|
24
|
+
attributeFields: {
|
|
25
|
+
uuid: string;
|
|
26
|
+
name: string;
|
|
27
|
+
format: string;
|
|
28
|
+
sortWeight: number;
|
|
29
|
+
description: string | null;
|
|
30
|
+
answers: AttributeAnswer[] | undefined;
|
|
31
|
+
}[];
|
|
32
|
+
isLoading: boolean;
|
|
33
|
+
error: Error | null;
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=usePersonAttributeFields.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePersonAttributeFields.d.ts","sourceRoot":"","sources":["../../src/hooks/usePersonAttributeFields.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;CAC7B;AAED;;;GAGG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;CA+BpC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PersonAttributesContextType } from '../contexts/PersonAttributesContext';
|
|
2
|
+
/**
|
|
3
|
+
* Custom hook to access the person attributes context
|
|
4
|
+
* @returns The person attributes context values including attributes, loading state, error, and refetch
|
|
5
|
+
* @throws Error if used outside PersonAttributesProvider
|
|
6
|
+
*/
|
|
7
|
+
export declare const usePersonAttributes: () => PersonAttributesContextType;
|
|
8
|
+
//# sourceMappingURL=usePersonAttributes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePersonAttributes.d.ts","sourceRoot":"","sources":["../../src/hooks/usePersonAttributes.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,2BAA2B,EAC5B,MAAM,qCAAqC,CAAC;AAE7C;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,QAAO,2BAUtC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUpdatePatient.d.ts","sourceRoot":"","sources":["../../src/hooks/useUpdatePatient.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,iBAAiB,EACjB,cAAc,
|
|
1
|
+
{"version":3,"file":"useUpdatePatient.d.ts","sourceRoot":"","sources":["../../src/hooks/useUpdatePatient.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,iBAAiB,EACjB,cAAc,EAMf,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAG/E,UAAU,qBAAqB;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,aAAa,GAAG;QACvB,YAAY,EAAE,OAAO,CAAC;QACtB,iBAAiB,EAAE,iBAAiB,CAAC;KACtC,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;IACxB,OAAO,EAAE,WAAW,CAAC;IACrB,UAAU,EAAE,cAAc,CAAC;CAC5B;AAED,eAAO,MAAM,gBAAgB,kJA8B5B,CAAC"}
|