@bahmni/registration-app 0.0.1-dev.13 → 0.0.1-dev.49

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 (41) hide show
  1. package/dist/App.d.ts.map +1 -1
  2. package/dist/{LNWAZHJI-Bw_4ID3r.js → LNWAZHJI-Lqhnsp0X.js} +2 -2
  3. package/dist/{MWZ6AO7Z-CaqB01sB.js → MWZ6AO7Z-CIIFb2DP.js} +2 -2
  4. package/dist/{YPM2AS64-Ck9T4Pfw.js → YPM2AS64-BcGZU836.js} +1 -1
  5. package/dist/components/forms/additionalInfo/AdditionalInfo.d.ts +1 -1
  6. package/dist/components/forms/additionalInfo/AdditionalInfo.d.ts.map +1 -1
  7. package/dist/components/forms/addressInfo/AddressAutocompleteField.d.ts +19 -0
  8. package/dist/components/forms/addressInfo/AddressAutocompleteField.d.ts.map +1 -0
  9. package/dist/components/forms/addressInfo/AddressInfo.d.ts.map +1 -1
  10. package/dist/components/forms/profile/Profile.d.ts +3 -1
  11. package/dist/components/forms/profile/Profile.d.ts.map +1 -1
  12. package/dist/components/patientPhotoUpload/PatientPhotoUpload.d.ts +7 -0
  13. package/dist/components/patientPhotoUpload/PatientPhotoUpload.d.ts.map +1 -0
  14. package/dist/constants/app.d.ts +1 -0
  15. package/dist/constants/app.d.ts.map +1 -1
  16. package/dist/hooks/useAddressFields.d.ts +46 -0
  17. package/dist/hooks/useAddressFields.d.ts.map +1 -0
  18. package/dist/hooks/useAddressFieldsWithConfig.d.ts +32 -0
  19. package/dist/hooks/useAddressFieldsWithConfig.d.ts.map +1 -0
  20. package/dist/hooks/useAddressSuggestions.d.ts +12 -0
  21. package/dist/hooks/useAddressSuggestions.d.ts.map +1 -0
  22. package/dist/hooks/useCreatePatient.d.ts +1 -12
  23. package/dist/hooks/useCreatePatient.d.ts.map +1 -1
  24. package/dist/hooks/useUpdatePatient.d.ts +15 -0
  25. package/dist/hooks/useUpdatePatient.d.ts.map +1 -0
  26. package/dist/{index-Ce5nX17l.js → index-DM5KiMy1.js} +58195 -49530
  27. package/dist/index.css +1 -1
  28. package/dist/index.js +1 -1
  29. package/dist/locales/locale_en.json +24 -9
  30. package/dist/locales/locale_es.json +24 -9
  31. package/dist/models/patient.d.ts +3 -1
  32. package/dist/models/patient.d.ts.map +1 -1
  33. package/dist/pages/createPatientPage/CreatePatient.d.ts.map +1 -1
  34. package/dist/pages/createPatientPage/patientFormService.d.ts +1 -0
  35. package/dist/pages/createPatientPage/patientFormService.d.ts.map +1 -1
  36. package/dist/pages/patientSearchPage/index.d.ts.map +1 -1
  37. package/package.json +1 -1
  38. package/dist/components/Header/Header.d.ts +0 -18
  39. package/dist/components/Header/Header.d.ts.map +0 -1
  40. package/dist/components/Header/index.d.ts +0 -3
  41. package/dist/components/Header/index.d.ts.map +0 -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;AAUnD,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EA0C5B,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,CAAC"}
1
+ {"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../src/App.tsx"],"names":[],"mappings":"AASA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAUnD,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EA2C5B,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-Ck9T4Pfw.js";
2
- import { g as d, c as f, a as e } from "./index-Ce5nX17l.js";
1
+ import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-BcGZU836.js";
2
+ import { g as d, c as f, a as e } from "./index-DM5KiMy1.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-Ck9T4Pfw.js";
2
- import { g as v, c as C, a as e } from "./index-Ce5nX17l.js";
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-BcGZU836.js";
2
+ import { g as v, c as C, a as e } from "./index-DM5KiMy1.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-Ce5nX17l.js";
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-DM5KiMy1.js";
5
5
  var Rs = (e) => e != null, zs = (e) => e.filter(Rs);
6
6
  function Ks(e) {
7
7
  return (...t) => {
@@ -8,7 +8,7 @@ interface AdditionalInfoProps {
8
8
  ref?: React.Ref<AdditionalInfoRef>;
9
9
  }
10
10
  export declare const AdditionalInfo: {
11
- ({ initialData, ref }: AdditionalInfoProps): import("react/jsx-runtime").JSX.Element;
11
+ ({ initialData, ref }: AdditionalInfoProps): import("react/jsx-runtime").JSX.Element | null;
12
12
  displayName: string;
13
13
  };
14
14
  export default AdditionalInfo;
@@ -1 +1 @@
1
- {"version":3,"file":"AdditionalInfo.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/additionalInfo/AdditionalInfo.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAG9D,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;;CAkEvE,CAAC;AAIF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"AdditionalInfo.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/additionalInfo/AdditionalInfo.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAG9D,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;;CAqGvE,CAAC;AAIF,eAAe,cAAc,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { AddressHierarchyEntry } from '@bahmni/services';
2
+ import { AddressLevel } from '../../../hooks/useAddressFields';
3
+ interface AddressAutocompleteFieldProps {
4
+ fieldName: string;
5
+ level: AddressLevel;
6
+ isDisabled: boolean;
7
+ error?: string;
8
+ suggestions: AddressHierarchyEntry[];
9
+ selectedItem: AddressHierarchyEntry | null;
10
+ onSelectionChange: (field: string, entry: AddressHierarchyEntry | null) => void;
11
+ onInputChange: (field: string, value: string) => void;
12
+ translationKey?: string;
13
+ }
14
+ export declare const AddressAutocompleteField: {
15
+ ({ fieldName, level, isDisabled, error, suggestions, selectedItem, onSelectionChange, onInputChange, translationKey, }: AddressAutocompleteFieldProps): import("react/jsx-runtime").JSX.Element;
16
+ displayName: string;
17
+ };
18
+ export default AddressAutocompleteField;
19
+ //# sourceMappingURL=AddressAutocompleteField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AddressAutocompleteField.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/addressInfo/AddressAutocompleteField.tsx"],"names":[],"mappings":"AACA,OAAO,EAAkB,KAAK,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAE9E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAGpE,UAAU,6BAA6B;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,YAAY,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,qBAAqB,EAAE,CAAC;IACrC,YAAY,EAAE,qBAAqB,GAAG,IAAI,CAAC;IAC3C,iBAAiB,EAAE,CACjB,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,qBAAqB,GAAG,IAAI,KAChC,IAAI,CAAC;IACV,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACtD,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,eAAO,MAAM,wBAAwB;4HAUlC,6BAA6B;;CAwD/B,CAAC;AAIF,eAAe,wBAAwB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"AddressInfo.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/addressInfo/AddressInfo.tsx"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,cAAc,EACpB,MAAM,kBAAkB,CAAC;AAa1B,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,EAAE,MAAM,OAAO,CAAC;IACxB,OAAO,EAAE,MAAM,cAAc,CAAC;CAC/B,CAAC;AAoBF,UAAU,gBAAgB;IACxB,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;CACjC;AAED,eAAO,MAAM,WAAW;cAAa,gBAAgB;;CAqcpD,CAAC;AAIF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"AddressInfo.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/addressInfo/AddressInfo.tsx"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,kBAAkB,CAAC;AAc1B,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,EAAE,MAAM,OAAO,CAAC;IACxB,OAAO,EAAE,MAAM,cAAc,CAAC;CAC/B,CAAC;AAEF,UAAU,gBAAgB;IACxB,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;CACjC;AAED,eAAO,MAAM,WAAW;cAAa,gBAAgB;;CA4UpD,CAAC;AAIF,eAAe,WAAW,CAAC"}
@@ -4,6 +4,7 @@ export interface ProfileRef {
4
4
  getData: () => BasicInfoData & {
5
5
  dobEstimated: boolean;
6
6
  patientIdentifier: PatientIdentifier;
7
+ image?: string;
7
8
  };
8
9
  validate: () => boolean;
9
10
  clearData: () => void;
@@ -12,10 +13,11 @@ export interface ProfileRef {
12
13
  interface ProfileProps {
13
14
  initialData?: BasicInfoData;
14
15
  initialDobEstimated?: boolean;
16
+ patientIdentifier?: string | null;
15
17
  ref?: React.Ref<ProfileRef>;
16
18
  }
17
19
  export declare const Profile: {
18
- ({ initialData, initialDobEstimated, ref, }: ProfileProps): import("react/jsx-runtime").JSX.Element;
20
+ ({ initialData, initialDobEstimated, patientIdentifier, ref, }: ProfileProps): import("react/jsx-runtime").JSX.Element;
19
21
  displayName: string;
20
22
  };
21
23
  export default Profile;
@@ -1 +1 @@
1
- {"version":3,"file":"Profile.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/profile/Profile.tsx"],"names":[],"mappings":"AASA,OAAO,EAGL,iBAAiB,EAClB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAc7D,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,aAAa,GAAG;QAC7B,YAAY,EAAE,OAAO,CAAC;QACtB,iBAAiB,EAAE,iBAAiB,CAAC;KACtC,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,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;CAC7B;AAED,eAAO,MAAM,OAAO;iDAIjB,YAAY;;CA8Zd,CAAC;AAIF,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"Profile.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/profile/Profile.tsx"],"names":[],"mappings":"AAQA,OAAO,EAGL,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;;CA2ed,CAAC;AAIF,eAAe,OAAO,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ interface PatientPhotoUploadProps {
3
+ onPhotoConfirm: (base64Image: string) => void;
4
+ }
5
+ export declare const PatientPhotoUpload: React.FC<PatientPhotoUploadProps>;
6
+ export {};
7
+ //# sourceMappingURL=PatientPhotoUpload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PatientPhotoUpload.d.ts","sourceRoot":"","sources":["../../../src/components/patientPhotoUpload/PatientPhotoUpload.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAGrD,UAAU,uBAAuB;IAC/B,cAAc,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/C;AAmBD,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CA0PhE,CAAC"}
@@ -1,2 +1,3 @@
1
1
  export declare const REGISTRATION_NAMESPACE = "registration";
2
+ export declare const BAHMNI_REGISTRATION_SEARCH = "/bahmni-new/registration/search";
2
3
  //# sourceMappingURL=app.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/constants/app.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB,iBAAiB,CAAC"}
1
+ {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/constants/app.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB,iBAAiB,CAAC;AACrD,eAAO,MAAM,0BAA0B,oCAAoC,CAAC"}
@@ -0,0 +1,46 @@
1
+ export interface AddressLevel {
2
+ addressField: string;
3
+ name: string;
4
+ required: boolean;
5
+ isStrictEntry?: boolean;
6
+ }
7
+ export interface AddressData {
8
+ [key: string]: string | null;
9
+ }
10
+ export interface AddressHierarchyConfig {
11
+ showAddressFieldsTopDown: boolean;
12
+ strictAutocompleteFromLevel?: string;
13
+ }
14
+ export interface SelectedAddressMetadata {
15
+ [fieldName: string]: {
16
+ uuid?: string;
17
+ userGeneratedId?: string;
18
+ value: string | null;
19
+ };
20
+ }
21
+ export interface AddressHierarchyItem {
22
+ name: string;
23
+ uuid?: string;
24
+ userGeneratedId?: string;
25
+ parent?: AddressHierarchyItem | undefined;
26
+ }
27
+ export declare function useAddressFields(addressLevels: AddressLevel[], config: AddressHierarchyConfig, initialAddress?: AddressData): {
28
+ address: AddressData;
29
+ selectedMetadata: SelectedAddressMetadata;
30
+ displayLevels: AddressLevel[];
31
+ levelChunks: AddressLevel[][];
32
+ levelsWithStrictEntry: {
33
+ isStrictEntry: boolean;
34
+ addressField: string;
35
+ name: string;
36
+ required: boolean;
37
+ }[];
38
+ isFieldReadOnly: (level: AddressLevel) => boolean;
39
+ handleFieldSelect: (fieldName: string, selectedItem: AddressHierarchyItem) => void;
40
+ handleFieldChange: (fieldName: string, value: string) => void;
41
+ getParentUuid: (fieldName: string) => string | undefined;
42
+ clearChildFields: (fieldName: string) => void;
43
+ resetAddress: () => void;
44
+ setAddressData: (newAddress: AddressData) => void;
45
+ };
46
+ //# sourceMappingURL=useAddressFields.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAddressFields.d.ts","sourceRoot":"","sources":["../../src/hooks/useAddressFields.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,YAAY;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,WAAW,WAAW;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;CAC9B;AAED,MAAM,WAAW,sBAAsB;IACrC,wBAAwB,EAAE,OAAO,CAAC;IAClC,2BAA2B,CAAC,EAAE,MAAM,CAAC;CACtC;AAED,MAAM,WAAW,uBAAuB;IACtC,CAAC,SAAS,EAAE,MAAM,GAAG;QACnB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;KACtB,CAAC;CACH;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,oBAAoB,GAAG,SAAS,CAAC;CAC3C;AAED,wBAAgB,gBAAgB,CAC9B,aAAa,EAAE,YAAY,EAAE,EAC7B,MAAM,EAAE,sBAAsB,EAC9B,cAAc,CAAC,EAAE,WAAW;;;;;;;sBAjCd,MAAM;cACd,MAAM;kBACF,OAAO;;6BA2FP,YAAY,KAAG,OAAO;mCA0DlB,MAAM,gBAAgB,oBAAoB;mCAgD1C,MAAM,SAAS,MAAM;+BAarB,MAAM,KAAG,MAAM,GAAG,SAAS;kCAxF3B,MAAM;;iCAuG4B,WAAW;EAoB5D"}
@@ -0,0 +1,32 @@
1
+ import { AddressLevel, AddressData } from './useAddressFields';
2
+ export declare function useAddressFieldsWithConfig(initialAddress?: AddressData): {
3
+ isLoadingLevels: boolean;
4
+ isErrorLevels: boolean;
5
+ levelsError: Error | null;
6
+ addressLevelsFromApi: import('@bahmni/services').OrderedAddressHierarchyLevels | undefined;
7
+ getTranslationKey: (addressField: string) => string | null;
8
+ address: AddressData;
9
+ selectedMetadata: import('./useAddressFields').SelectedAddressMetadata;
10
+ displayLevels: AddressLevel[];
11
+ levelChunks: AddressLevel[][];
12
+ levelsWithStrictEntry: {
13
+ isStrictEntry: boolean;
14
+ addressField: string;
15
+ name: string;
16
+ required: boolean;
17
+ }[];
18
+ isFieldReadOnly: (level: AddressLevel) => boolean;
19
+ handleFieldSelect: (fieldName: string, selectedItem: import('./useAddressFields').AddressHierarchyItem) => void;
20
+ handleFieldChange: (fieldName: string, value: string) => void;
21
+ getParentUuid: (fieldName: string) => string | undefined;
22
+ clearChildFields: (fieldName: string) => void;
23
+ resetAddress: () => void;
24
+ setAddressData: (newAddress: AddressData) => void;
25
+ };
26
+ export declare function useAddressHierarchyLevels(): {
27
+ addressLevels: import('@bahmni/services').OrderedAddressHierarchyLevels;
28
+ isLoading: boolean;
29
+ isError: boolean;
30
+ error: Error | null;
31
+ };
32
+ //# sourceMappingURL=useAddressFieldsWithConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAddressFieldsWithConfig.d.ts","sourceRoot":"","sources":["../../src/hooks/useAddressFieldsWithConfig.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,YAAY,EAEjB,KAAK,WAAW,EACjB,MAAM,oBAAoB,CAAC;AAG5B,wBAAgB,0BAA0B,CAAC,cAAc,CAAC,EAAE,WAAW;;;;;sCAgE7C,MAAM,KAAG,MAAM,GAAG,IAAI;;;;;;;;;;;;;;;;;;EAqB/C;AAED,wBAAgB,yBAAyB;;;;;EAoBxC"}
@@ -0,0 +1,12 @@
1
+ import { AddressHierarchyEntry } from '@bahmni/services';
2
+ import { AddressLevel, SelectedAddressMetadata } from './useAddressFields';
3
+ export declare function useAddressSuggestions(autocompleteFields: string[], levelsWithStrictEntry: AddressLevel[], selectedMetadata: SelectedAddressMetadata): {
4
+ suggestions: Record<string, AddressHierarchyEntry[]>;
5
+ selectedItems: Record<string, AddressHierarchyEntry | null>;
6
+ setSelectedItems: import('react').Dispatch<import('react').SetStateAction<Record<string, AddressHierarchyEntry | null>>>;
7
+ suggestionsRef: import('react').RefObject<Record<string, AddressHierarchyEntry[]>>;
8
+ debouncedSearchAddress: (field: string, searchText: string) => void;
9
+ clearChildSuggestions: (fieldName: string) => void;
10
+ unmarkFieldAsCleared: (fieldName: string) => void;
11
+ };
12
+ //# sourceMappingURL=useAddressSuggestions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAddressSuggestions.d.ts","sourceRoot":"","sources":["../../src/hooks/useAddressSuggestions.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,kBAAkB,CAAC;AAG1B,OAAO,KAAK,EAAE,YAAY,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAEhF,wBAAgB,qBAAqB,CACnC,kBAAkB,EAAE,MAAM,EAAE,EAC5B,qBAAqB,EAAE,YAAY,EAAE,EACrC,gBAAgB,EAAE,uBAAuB;;;;;oCAqF/B,MAAM,cAAc,MAAM;uCAatB,MAAM;sCAyCiC,MAAM;EAkB5D"}
@@ -1,26 +1,15 @@
1
1
  import { PatientIdentifier, PatientAddress } from '@bahmni/services';
2
2
  import { BasicInfoData, ContactData, AdditionalData } from '../models/patient';
3
- /**
4
- * Form data structure representing all collected patient information
5
- */
6
3
  interface CreatePatientFormData {
7
4
  profile: BasicInfoData & {
8
5
  dobEstimated: boolean;
9
6
  patientIdentifier: PatientIdentifier;
7
+ image?: string;
10
8
  };
11
9
  address: PatientAddress;
12
10
  contact: ContactData;
13
11
  additional: AdditionalData;
14
12
  }
15
- /**
16
- * Custom hook for creating a patient with React Query
17
- *
18
- * Handles:
19
- * - Data transformation from form data to API payload
20
- * - Mutation execution
21
- * - Success/error notifications
22
- * - Navigation after success
23
- */
24
13
  export declare const useCreatePatient: () => import('@tanstack/react-query').UseMutationResult<import('@bahmni/services').CreatePatientResponse, Error, CreatePatientFormData, unknown>;
25
14
  export {};
26
15
  //# sourceMappingURL=useCreatePatient.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useCreatePatient.d.ts","sourceRoot":"","sources":["../../src/hooks/useCreatePatient.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,iBAAiB,EACjB,cAAc,EAIf,MAAM,kBAAkB,CAAC;AAI1B,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAE/E;;GAEG;AACH,UAAU,qBAAqB;IAC7B,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;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,kJA2C5B,CAAC"}
1
+ {"version":3,"file":"useCreatePatient.d.ts","sourceRoot":"","sources":["../../src/hooks/useCreatePatient.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,iBAAiB,EACjB,cAAc,EAQf,MAAM,kBAAkB,CAAC;AAI1B,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAE/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,kJAyC5B,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { PatientIdentifier, PatientAddress } from '@bahmni/services';
2
+ import { BasicInfoData, ContactData, AdditionalData } from '../models/patient';
3
+ interface UpdatePatientFormData {
4
+ patientUuid: string;
5
+ profile: BasicInfoData & {
6
+ dobEstimated: boolean;
7
+ patientIdentifier: PatientIdentifier;
8
+ };
9
+ address: PatientAddress;
10
+ contact: ContactData;
11
+ additional: AdditionalData;
12
+ }
13
+ export declare const useUpdatePatient: () => import('@tanstack/react-query').UseMutationResult<import('@bahmni/services').CreatePatientResponse, Error, UpdatePatientFormData, unknown>;
14
+ export {};
15
+ //# sourceMappingURL=useUpdatePatient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useUpdatePatient.d.ts","sourceRoot":"","sources":["../../src/hooks/useUpdatePatient.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,iBAAiB,EACjB,cAAc,EAQf,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAE/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,kJA4B5B,CAAC"}